From d56ffd46a0edd65d08c002dfeb5ec16f3d631047 Mon Sep 17 00:00:00 2001
From: Simon
Date: Thu, 6 Apr 2023 23:25:14 +0000
Subject: [PATCH 01/12] Attempt to use mapbox
---
.devcontainer/devcontainer.json | 2 +-
dist/bom-radar-card.js | 10741 +++++++++++++++++++++++++++++-
elements/formfield.js | 20 +-
elements/ignore/select.js | 16 +-
elements/ignore/switch.js | 2 +-
elements/ignore/textfield.js | 2 +-
elements/select.js | 106 +-
elements/slider.js | 34 +-
elements/switch.js | 34 +-
elements/textfield.js | 36 +-
package.json | 12 +-
rollup-plugins/ignore.js | 48 +-
rollup.config.dev.js | 6 +-
rollup.config.js | 7 +-
src/bom-radar-card.ts | 1316 ++--
src/const.ts | 2 +-
src/editor.ts | 14 +-
tsconfig.json | 9 +-
18 files changed, 11346 insertions(+), 1061 deletions(-)
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index e0bcf96..054c7d4 100755
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,7 +1,7 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "BOM Radar Card Development",
- "image": "ludeeus/container:monster",
+ "image": "mcr.microsoft.com/devcontainers/typescript-node",
"context": "..",
"appPort": ["5124:5000", "9124:8123"],
"postCreateCommand": "npm install",
diff --git a/dist/bom-radar-card.js b/dist/bom-radar-card.js
index ca16e2c..4403ded 100644
--- a/dist/bom-radar-card.js
+++ b/dist/bom-radar-card.js
@@ -1,78 +1,156 @@
-var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};function t(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,i=1,n=arguments.length;i=0;d--)(r=e[d])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o}function r(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */
+/* global Reflect, Promise */
+
+var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+};
+
+function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+}
+
+var __assign = function() {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+};
+
+function __decorate(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+}
+
+function __values(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m) return m.call(o);
+ if (o && typeof o.length === "number") return {
+ next: function () {
+ if (o && i >= o.length) o = void 0;
+ return { value: o && o[i++], done: !o };
+ }
+ };
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+}
+
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const a=window,o=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),l=new WeakMap;class s{constructor(e,t,i){if(this._$cssResult$=!0,i!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(o&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=l.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&l.set(t,e))}return e}toString(){return this.cssText}}const c=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[n+1]),e[0]);return new s(i,e,d)},m=(e,t)=>{o?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const i=document.createElement("style"),n=a.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=t.cssText,e.appendChild(i)}))},p=o?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new s("string"==typeof e?e:e+"",void 0,d))(t)})(e):e
+ */
+const t$4=window,e$a=t$4.ShadowRoot&&(void 0===t$4.ShadyCSS||t$4.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$4=Symbol(),n$4=new WeakMap;class o$6{constructor(t,e,n){if(this._$cssResult$=!0,n!==s$4)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$a&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n$4.set(s,t));}return t}toString(){return this.cssText}}const r$3=t=>new o$6("string"==typeof t?t:t+"",void 0,s$4),i$5=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>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.")})(s)+t[n+1]),t[0]);return new o$6(n,t,s$4)},S$1=(s,n)=>{e$a?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),o=t$4.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=e.cssText,s.appendChild(n);}));},c$1=e$a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t;
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */;var h;const u=window,f=u.trustedTypes,g=f?f.emptyScript:"",b=u.reactiveElementPolyfillSupport,v={toAttribute(e,t){switch(t){case Boolean:e=e?g:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},x=(e,t)=>t!==e&&(t==t||e==e),_={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:x};class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;null!==(t=this.h)&&void 0!==t||(this.h=[]),this.h.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,i)=>{const n=this._$Ep(i,t);void 0!==n&&(this._$Ev.set(n,i),e.push(n))})),e}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const r=this[e];this[t]=n,this.requestUpdate(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||_}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(p(e))}else void 0!==e&&t.push(p(e));return t}static _$Ep(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,i;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return m(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=_){var n;const r=this.constructor._$Ep(e,i);if(void 0!==r&&!0===i.reflect){const a=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:v).toAttribute(t,i.type);this._$El=e,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$El=null}}_$AK(e,t){var i;const n=this.constructor,r=n._$Ev.get(e);if(void 0!==r&&this._$El!==r){const e=n.getPropertyOptions(r),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(i=e.converter)||void 0===i?void 0:i.fromAttribute)?e.converter:v;this._$El=r,this[r]=a.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,i){let n=!0;void 0!==e&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||x)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}
+ */var s$3;const e$9=window,r$2=e$9.trustedTypes,h$1=r$2?r$2.emptyScript:"",o$5=e$9.reactiveElementPolyfillSupport,n$3={toAttribute(t,i){switch(i){case Boolean:t=t?h$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t);}catch(t){s=null;}}return s}},a$1=(t,i)=>i!==t&&(i==i||t==t),l$5={attribute:!0,type:String,converter:n$3,reflect:!1,hasChanged:a$1};class d$1 extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u();}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t);}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e));})),t}static createProperty(t,i=l$5){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e);}}static getPropertyDescriptor(t,i,s){return {get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l$5}static finalize(){if(this.hasOwnProperty("finalized"))return !1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s]);}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(c$1(i));}else void 0!==i&&s.push(c$1(i));return s}static _$Ep(t,i){const s=i.attribute;return !1===s?void 0:"string"==typeof s?s:"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 i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t));}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1);}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i]);}));}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return S$1(s,this.constructor.elementStyles),s}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 i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}));}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}));}attributeChangedCallback(t,i,s){this._$AK(t,s);}_$EO(t,i,s=l$5){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n$3).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null;}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n$3;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null;}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a$1)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(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,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek();}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s);}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.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,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek();}updated(t){}firstUpdated(t){}}d$1.finalized=!0,d$1.elementProperties=new Map,d$1.elementStyles=[],d$1.shadowRootOptions={mode:"open"},null==o$5||o$5({ReactiveElement:d$1}),(null!==(s$3=e$9.reactiveElementVersions)&&void 0!==s$3?s$3:e$9.reactiveElementVersions=[]).push("1.6.1");
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
-var w;y.finalized=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==b||b({ReactiveElement:y}),(null!==(h=u.reactiveElementVersions)&&void 0!==h?h:u.reactiveElementVersions=[]).push("1.4.1");const E=window,T=E.trustedTypes,I=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,C="?"+A,S=`<${C}>`,R=document,k=(e="")=>R.createComment(e),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,L=Array.isArray,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,$=/>/g,M=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),N=/'/g,B=/"/g,H=/^(?:script|style|textarea|title)$/i,P=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),z=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),U=new WeakMap,X=R.createTreeWalker(R,129,null,!1),W=(e,t)=>{const i=e.length-1,n=[];let r,a=2===t?"":"",o=F;for(let t=0;t"===l[0]?(o=null!=r?r:F,s=-1):void 0===l[1]?s=-2:(s=o.lastIndex-l[2].length,d=l[1],o=void 0===l[3]?M:'"'===l[3]?B:N):o===B||o===N?o=M:o===D||o===$?o=F:(o=M,r=void 0);const m=o===M&&e[t+1].startsWith("/>")?" ":"";a+=o===F?i+S:s>=0?(n.push(d),i.slice(0,s)+"$lit$"+i.slice(s)+A+m):i+A+(-2===s?(n.push(void 0),t):m)}const d=a+(e[i]||">")+(2===t?" ":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==I?I.createHTML(d):d,n]};class j{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let r=0,a=0;const o=e.length-1,d=this.parts,[l,s]=W(e,t);if(this.el=j.createElement(l,i),X.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=X.nextNode())&&d.length0){n.textContent=T?T.emptyScript:"";for(let i=0;iL(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.O(e):this.$(e)}S(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}k(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}$(e){this._$AH!==V&&O(this._$AH)?this._$AA.nextSibling.data=e:this.k(R.createTextNode(e)),this._$AH=e}T(e){var t;const{values:i,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=j.createElement(n.h,this.options)),n);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.m(i);else{const e=new q(r,this),t=e.p(this.options);e.m(i),this.k(t),this._$AH=e}}_$AC(e){let t=U.get(e.strings);return void 0===t&&U.set(e.strings,t=new j(e)),t}O(e){L(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const r of e)n===t.length?t.push(i=new Y(this.S(k()),this.S(k()),this,this.options)):i=t[n],i._$AI(r),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,n){const r=this.strings;let a=!1;if(void 0===r)e=G(this,e,t,0),a=!O(e)||e!==this._$AH&&e!==z,a&&(this._$AH=e);else{const n=e;let o,d;for(e=r[0],o=0;ot}):void 0,o$4="$lit$",n$2=`lit$${(Math.random()+"").slice(9)}$`,l$4="?"+n$2,h=`<${l$4}>`,r$1=document,d=()=>r$1.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r$1.createTreeWalker(r$1,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?"":"",u=f$1;for(let i=0;i"===c[0]?(u=null!=r?r:f$1,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f$1:(u=p,r=void 0);const w=u===p&&t[i+1].startsWith("/>")?" ":"";d+=u===f$1?s+h:v>=0?(l.push(e),s.slice(0,v)+o$4+s.slice(v)+n$2+w):s+n$2+(-2===v?(l.push(void 0),i):w);}const c=d+(t[s]||">")+(2===i?" ":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return [void 0!==e$8?e$8.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes);}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s$2?s$2.emptyScript:"";for(let s=0;s2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else {const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new M(i.insertBefore(d(),t),t,void 0,null!=s?s:{});}return l._$AI(t),l};
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */
-var ne,re;null==ie||ie(j,Y),(null!==(w=E.litHtmlVersions)&&void 0!==w?w:E.litHtmlVersions=[]).push("2.3.1");class ae extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{var n,r;const a=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:t;let o=a._$litPart$;if(void 0===o){const e=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;a._$litPart$=o=new Y(t.insertBefore(k(),e),e,void 0,null!=i?i:{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return z}}ae.finalized=!0,ae._$litElement$=!0,null===(ne=globalThis.litElementHydrateSupport)||void 0===ne||ne.call(globalThis,{LitElement:ae});const oe=globalThis.litElementPolyfillSupport;null==oe||oe({LitElement:ae}),(null!==(re=globalThis.litElementVersions)&&void 0!==re?re:globalThis.litElementVersions=[]).push("3.2.2");
+ */var l$3,o$3;class s$1 extends d$1{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 i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(i,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 T}}s$1.finalized=!0,s$1._$litElement$=!0,null===(l$3=globalThis.litElementHydrateSupport)||void 0===l$3||l$3.call(globalThis,{LitElement:s$1});const n$1=globalThis.litElementPolyfillSupport;null==n$1||n$1({LitElement:s$1});(null!==(o$3=globalThis.litElementVersions)&&void 0!==o$3?o$3:globalThis.litElementVersions=[]).push("3.3.0");
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
-const de=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:i,elements:n}=t;return{kind:i,elements:n,finisher(t){customElements.define(e,t)}}})(e,t)
+const e$7=e=>n=>"function"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return {kind:t,elements:s,finisher(n){customElements.define(e,n);}}})(e,n);
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */,le=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(i){i.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}};function se(e){return(t,i)=>void 0!==i?((e,t,i)=>{t.constructor.createProperty(i,e)})(e,t,i):le(e,t)
+ */
+const i$3=(i,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i);}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this));},finisher(n){n.createProperty(e.key,i);}};function e$6(e){return (n,t)=>void 0!==t?((i,e,n)=>{e.constructor.createProperty(n,i);})(e,n,t):i$3(e,n)}
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */}function ce(e){return se({...e,state:!0})}
+ */function t$2(t){return e$6({...t,state:!0})}
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const me=({finisher:e,descriptor:t})=>(i,n)=>{var r;if(void 0===n){const n=null!==(r=i.originalKey)&&void 0!==r?r:i.key,a=null!=t?{kind:"method",placement:"prototype",key:n,descriptor:t(i.key)}:{...i,key:n};return null!=e&&(a.finisher=function(t){e(t,n)}),a}{const r=i.constructor;void 0!==t&&Object.defineProperty(i,n,t(n)),null==e||e(r,n)}}
+ */
+const o$2=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:"method",placement:"prototype",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n);}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n);}};
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */;function pe(e){return me({finisher:(t,i)=>{Object.assign(t.prototype[i],e)}})}
+ */function e$5(e){return o$2({finisher:(r,t)=>{Object.assign(r.prototype[t],e);}})}
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */function he(e,t){return me({descriptor:i=>{const n={get(){var t,i;return null!==(i=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[t]&&(this[t]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(e))&&void 0!==n?n:null),this[t]}}return n}})}
+ */function i$2(i,n){return o$2({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n="symbol"==typeof o?Symbol():"__"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]};}return t}})}
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */function ue(e){return me({descriptor:t=>({async get(){var t;return await this.updateComplete,null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0})})}
+ */
+function e$4(e){return o$2({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})}
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */var fe;const ge=null!=(null===(fe=window.HTMLSlotElement)||void 0===fe?void 0:fe.prototype.assignedElements)?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter((e=>e.nodeType===Node.ELEMENT_NODE));
+ */var n;const e$3=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l$2(n){const{slot:l,selector:t}=null!=n?n:{};return o$2({descriptor:o=>({get(){var o;const r="slot"+(l?`[name=${l}]`:":not([name])"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e$3(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */
-function be(e,t,i){let n,r=e;return"object"==typeof e?(r=e.slot,n=e):n={flatten:t},i?function(e){const{slot:t,selector:i}=null!=e?e:{};return me({descriptor:n=>({get(){var n;const r="slot"+(t?`[name=${t}]`:":not([name])"),a=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(r),o=null!=a?ge(a,e):[];return i?o.filter((e=>e.matches(i))):o},enumerable:!0,configurable:!0})})}({slot:r,flatten:t,selector:i}):me({descriptor:e=>({get(){var e,t;const i="slot"+(r?`[name=${r}]`:":not([name])"),a=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(i);return null!==(t=null==a?void 0:a.assignedNodes(n))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}var ve,xe;!function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none"}(ve||(ve={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(xe||(xe={}));var _e=function(e,t,i,n){n=n||{},i=null==i?{}:i;var r=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return r.detail=i,e.dispatchEvent(r),r
+ */function o$1(o,n,r){let l,s=o;return "object"==typeof o?(s=o.slot,l=o):l={flatten:n},r?l$2({slot:s,flatten:n,selector:r}):o$2({descriptor:e=>({get(){var e,t;const o="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}
+
+var t$1,r;!function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none";}(t$1||(t$1={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24";}(r||(r={}));var ne=function(e,t,r,n){n=n||{},r=null==r?{}:r;var i=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return i.detail=r,e.dispatchEvent(i),i};
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */};
+ */function e$2(e){return class extends e{createRenderRoot(){const e=this.constructor,{registry:s,elementDefinitions:n,shadowRootOptions:o}=e;n&&!s&&(e.registry=new CustomElementRegistry,Object.entries(n).forEach((([t,s])=>e.registry.define(t,s))));const i=this.renderOptions.creationScope=this.attachShadow({...o,customElements:e.registry});return S$1(i,this.constructor.elementStyles),i}}}
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -95,7 +173,86 @@ function be(e,t,i){let n,r=e;return"object"==typeof e?(r=e.slot,n=e):n={flatten:
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var ye=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),we={ROOT:"mdc-form-field"},Ee={LABEL_SELECTOR:".mdc-form-field > label"},Te=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.click=function(){r.handleClick()},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return we},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Ee},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},n.prototype.handleClick=function(){var e=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){e.adapter.deactivateInputRipple()}))},n}(ye);
+var MDCFoundation = /** @class */ (function () {
+ function MDCFoundation(adapter) {
+ if (adapter === void 0) { adapter = {}; }
+ this.adapter = adapter;
+ }
+ Object.defineProperty(MDCFoundation, "cssClasses", {
+ get: function () {
+ // Classes extending MDCFoundation should implement this method to return an object which exports every
+ // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}
+ return {};
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCFoundation, "strings", {
+ get: function () {
+ // Classes extending MDCFoundation should implement this method to return an object which exports all
+ // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}
+ return {};
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCFoundation, "numbers", {
+ get: function () {
+ // Classes extending MDCFoundation should implement this method to return an object which exports all
+ // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}
+ return {};
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCFoundation, "defaultAdapter", {
+ get: function () {
+ // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient
+ // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter
+ // validation.
+ return {};
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCFoundation.prototype.init = function () {
+ // Subclasses should override this method to perform initialization routines (registering events, etc.)
+ };
+ MDCFoundation.prototype.destroy = function () {
+ // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)
+ };
+ return MDCFoundation;
+}());
+
+/**
+ * @license
+ * Copyright 2017 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+var cssClasses$b = {
+ ROOT: 'mdc-form-field',
+};
+var strings$8 = {
+ LABEL_SELECTOR: '.mdc-form-field > label',
+};
+
/**
* @license
* Copyright 2017 Google Inc.
@@ -118,55 +275,401 @@ var ye=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+var MDCFormFieldFoundation = /** @class */ (function (_super) {
+ __extends(MDCFormFieldFoundation, _super);
+ function MDCFormFieldFoundation(adapter) {
+ var _this = _super.call(this, __assign(__assign({}, MDCFormFieldFoundation.defaultAdapter), adapter)) || this;
+ _this.click = function () {
+ _this.handleClick();
+ };
+ return _this;
+ }
+ Object.defineProperty(MDCFormFieldFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$b;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCFormFieldFoundation, "strings", {
+ get: function () {
+ return strings$8;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCFormFieldFoundation, "defaultAdapter", {
+ get: function () {
+ return {
+ activateInputRipple: function () { return undefined; },
+ deactivateInputRipple: function () { return undefined; },
+ deregisterInteractionHandler: function () { return undefined; },
+ registerInteractionHandler: function () { return undefined; },
+ };
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCFormFieldFoundation.prototype.init = function () {
+ this.adapter.registerInteractionHandler('click', this.click);
+ };
+ MDCFormFieldFoundation.prototype.destroy = function () {
+ this.adapter.deregisterInteractionHandler('click', this.click);
+ };
+ MDCFormFieldFoundation.prototype.handleClick = function () {
+ var _this = this;
+ this.adapter.activateInputRipple();
+ requestAnimationFrame(function () {
+ _this.adapter.deactivateInputRipple();
+ });
+ };
+ return MDCFormFieldFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCFormFieldFoundation$1 = MDCFormFieldFoundation;
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-const Ie=e=>e.nodeType===Node.ELEMENT_NODE;function Ae(e){return{addClass:t=>{e.classList.add(t)},removeClass:t=>{e.classList.remove(t)},hasClass:t=>e.classList.contains(t)}}const Ce=()=>{},Se={get passive(){return!1}};document.addEventListener("x",Ce,Se),document.removeEventListener("x",Ce);const Re=(e=window.document)=>{let t=e.activeElement;const i=[];if(!t)return i;for(;t&&(i.push(t),t.shadowRoot);)t=t.shadowRoot.activeElement;return i},ke=e=>{const t=Re();if(!t.length)return!1;const i=t[t.length-1],n=new Event("check-if-focused",{bubbles:!0,composed:!0});let r=[];const a=e=>{r=e.composedPath()};return document.body.addEventListener("check-if-focused",a),i.dispatchEvent(n),document.body.removeEventListener("check-if-focused",a),-1!==r.indexOf(e)};
+// Style preference for leading underscores.
+// tslint:disable:strip-private-property-underscore
+/**
+ * Determines whether a node is an element.
+ *
+ * @param node Node to check
+ */
+const isNodeElement = (node) => {
+ return node.nodeType === Node.ELEMENT_NODE;
+};
+function addHasRemoveClass(element) {
+ return {
+ addClass: (className) => {
+ element.classList.add(className);
+ },
+ removeClass: (className) => {
+ element.classList.remove(className);
+ },
+ hasClass: (className) => element.classList.contains(className),
+ };
+}
+const fn = () => { };
+const optionsBlock = {
+ get passive() {
+ return false;
+ }
+};
+document.addEventListener('x', fn, optionsBlock);
+document.removeEventListener('x', fn);
+const deepActiveElementPath = (doc = window.document) => {
+ let activeElement = doc.activeElement;
+ const path = [];
+ if (!activeElement) {
+ return path;
+ }
+ while (activeElement) {
+ path.push(activeElement);
+ if (activeElement.shadowRoot) {
+ activeElement = activeElement.shadowRoot.activeElement;
+ }
+ else {
+ break;
+ }
+ }
+ return path;
+};
+const doesElementContainFocus = (element) => {
+ const activePath = deepActiveElementPath();
+ if (!activePath.length) {
+ return false;
+ }
+ const deepActiveElement = activePath[activePath.length - 1];
+ const focusEv = new Event('check-if-focused', { bubbles: true, composed: true });
+ let composedPath = [];
+ const listener = (ev) => {
+ composedPath = ev.composedPath();
+ };
+ document.body.addEventListener('check-if-focused', listener);
+ deepActiveElement.dispatchEvent(focusEv);
+ document.body.removeEventListener('check-if-focused', listener);
+ return composedPath.indexOf(element) !== -1;
+};
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class Oe extends ae{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
+/** @soyCompatible */
+class BaseElement extends s$1 {
+ click() {
+ if (this.mdcRoot) {
+ this.mdcRoot.focus();
+ this.mdcRoot.click();
+ return;
+ }
+ super.click();
+ }
+ /**
+ * Create and attach the MDC Foundation to the instance
+ */
+ createFoundation() {
+ if (this.mdcFoundation !== undefined) {
+ this.mdcFoundation.destroy();
+ }
+ if (this.mdcFoundationClass) {
+ this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());
+ this.mdcFoundation.init();
+ }
+ }
+ firstUpdated() {
+ this.createFoundation();
+ }
+}
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */var Le,Fe;const De=null!==(Fe=null===(Le=window.ShadyDOM)||void 0===Le?void 0:Le.inUse)&&void 0!==Fe&&Fe;class $e extends Oe{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=e=>{this.disabled||this.setFormData(e.formData)}}findFormElement(){if(!this.shadowRoot||De)return null;const e=this.getRootNode().querySelectorAll("form");for(const t of Array.from(e))if(t.contains(this))return t;return null}connectedCallback(){var e;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(e=this.containingForm)||void 0===e||e.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.containingForm)||void 0===e||e.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}}$e.shadowRootOptions={mode:"open",delegatesFocus:!0},n([se({type:Boolean})],$e.prototype,"disabled",void 0);
+ */
+var _a$1, _b$1;
+// ShadyDOM should submit elements in component internals
+const USING_SHADY_DOM = (_b$1 = (_a$1 = window.ShadyDOM) === null || _a$1 === void 0 ? void 0 : _a$1.inUse) !== null && _b$1 !== void 0 ? _b$1 : false;
+/** @soyCompatible */
+class FormElement extends BaseElement {
+ constructor() {
+ super(...arguments);
+ /**
+ * Disabled state for the component. When `disabled` is set to `true`, the
+ * component will not be added to form submission.
+ */
+ this.disabled = false;
+ /**
+ * Form element that contains this element
+ */
+ this.containingForm = null;
+ this.formDataListener = (ev) => {
+ if (!this.disabled) {
+ this.setFormData(ev.formData);
+ }
+ };
+ }
+ findFormElement() {
+ // If the component internals are not in Shadow DOM, subscribing to form
+ // data events could lead to duplicated data, which may not work correctly
+ // on the server side.
+ if (!this.shadowRoot || USING_SHADY_DOM) {
+ return null;
+ }
+ const root = this.getRootNode();
+ const forms = root.querySelectorAll('form');
+ for (const form of Array.from(forms)) {
+ if (form.contains(this)) {
+ return form;
+ }
+ }
+ return null;
+ }
+ connectedCallback() {
+ var _a;
+ super.connectedCallback();
+ this.containingForm = this.findFormElement();
+ (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.formDataListener);
+ }
+ disconnectedCallback() {
+ var _a;
+ super.disconnectedCallback();
+ (_a = this.containingForm) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.formDataListener);
+ this.containingForm = null;
+ }
+ click() {
+ if (this.formElement && !this.disabled) {
+ this.formElement.focus();
+ this.formElement.click();
+ }
+ }
+ firstUpdated() {
+ super.firstUpdated();
+ if (this.shadowRoot) {
+ this.mdcRoot.addEventListener('change', (e) => {
+ this.dispatchEvent(new Event('change', e));
+ });
+ }
+ }
+}
+FormElement.shadowRootOptions = { mode: 'open', delegatesFocus: true };
+__decorate([
+ e$6({ type: Boolean })
+], FormElement.prototype, "disabled", void 0);
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-const Me=e=>(t,i)=>{if(t.constructor._observers){if(!t.constructor.hasOwnProperty("_observers")){const e=t.constructor._observers;t.constructor._observers=new Map,e.forEach(((e,i)=>t.constructor._observers.set(i,e)))}}else{t.constructor._observers=new Map;const e=t.updated;t.updated=function(t){e.call(this,t),t.forEach(((e,t)=>{const i=this.constructor._observers.get(t);void 0!==i&&i.call(this,this[t],e)}))}}t.constructor._observers.set(i,e)}
+/**
+ * Specifies an observer callback that is run when the decorated property
+ * changes. The observer receives the current and old value as arguments.
+ */
+const observer = (observer) =>
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+(proto, propName) => {
+ // if we haven't wrapped `updated` in this class, do so
+ if (!proto.constructor
+ ._observers) {
+ proto.constructor._observers = new Map();
+ const userUpdated = proto.updated;
+ proto.updated = function (changedProperties) {
+ userUpdated.call(this, changedProperties);
+ changedProperties.forEach((v, k) => {
+ const observers = this.constructor
+ ._observers;
+ const observer = observers.get(k);
+ if (observer !== undefined) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ observer.call(this, this[k], v);
+ }
+ });
+ };
+ // clone any existing observers (superclasses)
+ // eslint-disable-next-line no-prototype-builtins
+ }
+ else if (!proto.constructor.hasOwnProperty('_observers')) {
+ const observers = proto.constructor._observers;
+ proto.constructor._observers = new Map();
+ observers.forEach(
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (v, k) => proto.constructor._observers.set(k, v));
+ }
+ // set this method
+ proto.constructor._observers.set(propName, observer);
+};
+
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */,Ne=1,Be=3,He=4,Pe=e=>(...t)=>({_$litDirective$:e,values:t});class ze{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}
+ */
+const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i$1{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)}}
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const Ve=Pe(class extends ze{constructor(e){var t;if(super(e),e.type!==Ne||"class"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){var i,n;if(void 0===this.nt){this.nt=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!(null===(i=this.st)||void 0===i?void 0:i.has(e))&&this.nt.add(e);return this.render(t)}const r=e.element.classList;this.nt.forEach((e=>{e in t||(r.remove(e),this.nt.delete(e))}));for(const e in t){const i=!!t[e];i===this.nt.has(e)||(null===(n=this.st)||void 0===n?void 0:n.has(e))||(i?(r.add(e),this.nt.add(e)):(r.remove(e),this.nt.delete(e)))}return z}});
+ */const o=e$1(class extends i$1{constructor(t$1){var i;if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||(null===(i=t$1.strings)||void 0===i?void 0:i.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((i=>t[i])).join(" ")+" "}update(i,[s]){var r,o;if(void 0===this.nt){this.nt=new Set,void 0!==i.strings&&(this.st=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.st)||void 0===r?void 0:r.has(t))&&this.nt.add(t);return this.render(s)}const e=i.element.classList;this.nt.forEach((t=>{t in s||(e.remove(t),this.nt.delete(t));}));for(const t in s){const i=!!s[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.nt.add(t)):(e.remove(t),this.nt.delete(t)));}return T}});
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */class Ue extends Oe{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=Te}createAdapter(){return{registerInteractionHandler:(e,t)=>{this.labelEl.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.labelEl.removeEventListener(e,t)},activateInputRipple:async()=>{const e=this.input;if(e instanceof $e){const t=await e.ripple;t&&t.startPress()}},deactivateInputRipple:async()=>{const e=this.input;if(e instanceof $e){const t=await e.ripple;t&&t.endPress()}}}}get input(){var e,t;return null!==(t=null===(e=this.slottedInputs)||void 0===e?void 0:e[0])&&void 0!==t?t:null}render(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return P`
-
+ */
+class FormfieldBase extends BaseElement {
+ constructor() {
+ super(...arguments);
+ this.alignEnd = false;
+ this.spaceBetween = false;
+ this.nowrap = false;
+ this.label = '';
+ this.mdcFoundationClass = MDCFormFieldFoundation$1;
+ }
+ createAdapter() {
+ return {
+ registerInteractionHandler: (type, handler) => {
+ this.labelEl.addEventListener(type, handler);
+ },
+ deregisterInteractionHandler: (type, handler) => {
+ this.labelEl.removeEventListener(type, handler);
+ },
+ activateInputRipple: async () => {
+ const input = this.input;
+ if (input instanceof FormElement) {
+ const ripple = await input.ripple;
+ if (ripple) {
+ ripple.startPress();
+ }
+ }
+ },
+ deactivateInputRipple: async () => {
+ const input = this.input;
+ if (input instanceof FormElement) {
+ const ripple = await input.ripple;
+ if (ripple) {
+ ripple.endPress();
+ }
+ }
+ },
+ };
+ }
+ get input() {
+ var _a, _b;
+ return (_b = (_a = this.slottedInputs) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;
+ }
+ render() {
+ const classes = {
+ 'mdc-form-field--align-end': this.alignEnd,
+ 'mdc-form-field--space-between': this.spaceBetween,
+ 'mdc-form-field--nowrap': this.nowrap
+ };
+ return x `
+
${this.label}
-
`}click(){this._labelClick()}_labelClick(){const e=this.input;e&&(e.focus(),e.click())}}n([se({type:Boolean})],Ue.prototype,"alignEnd",void 0),n([se({type:Boolean})],Ue.prototype,"spaceBetween",void 0),n([se({type:Boolean})],Ue.prototype,"nowrap",void 0),n([se({type:String}),Me((async function(e){var t;null===(t=this.input)||void 0===t||t.setAttribute("aria-label",e)}))],Ue.prototype,"label",void 0),n([he(".mdc-form-field")],Ue.prototype,"mdcRoot",void 0),n([be("",!0,"*")],Ue.prototype,"slottedInputs",void 0),n([he("label")],Ue.prototype,"labelEl",void 0);
+
`;
+ }
+ click() {
+ this._labelClick();
+ }
+ _labelClick() {
+ const input = this.input;
+ if (input) {
+ input.focus();
+ input.click();
+ }
+ }
+}
+__decorate([
+ e$6({ type: Boolean })
+], FormfieldBase.prototype, "alignEnd", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], FormfieldBase.prototype, "spaceBetween", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], FormfieldBase.prototype, "nowrap", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(async function (label) {
+ var _a;
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-label', label);
+ })
+], FormfieldBase.prototype, "label", void 0);
+__decorate([
+ i$2('.mdc-form-field')
+], FormfieldBase.prototype, "mdcRoot", void 0);
+__decorate([
+ o$1('', true, '*')
+], FormfieldBase.prototype, "slottedInputs", void 0);
+__decorate([
+ i$2('label')
+], FormfieldBase.prototype, "labelEl", void 0);
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
*/
-const Xe=c`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`,We={"mwc-formfield":class extends Ue{static get styles(){return Xe}}};
+const styles$a = i$5 `.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`;
+
+const formfieldDefinition = {
+ 'mwc-formfield': class extends FormfieldBase {
+ static get styles() {
+ return styles$a;
+ }
+ }
+};
+
/**
* @license
* Copyright 2020 Google Inc.
@@ -189,7 +692,104 @@ const Xe=c`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smooth
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var je="Unknown",Ge="Backspace",qe="Enter",Ye="Spacebar",Ke="PageUp",Ze="PageDown",Qe="End",Je="Home",et="ArrowLeft",tt="ArrowUp",it="ArrowRight",nt="ArrowDown",rt="Delete",at="Escape",ot="Tab",dt=new Set;dt.add(Ge),dt.add(qe),dt.add(Ye),dt.add(Ke),dt.add(Ze),dt.add(Qe),dt.add(Je),dt.add(et),dt.add(tt),dt.add(it),dt.add(nt),dt.add(rt),dt.add(at),dt.add(ot);var lt=8,st=13,ct=32,mt=33,pt=34,ht=35,ut=36,ft=37,gt=38,bt=39,vt=40,xt=46,_t=27,yt=9,wt=new Map;wt.set(lt,Ge),wt.set(st,qe),wt.set(ct,Ye),wt.set(mt,Ke),wt.set(pt,Ze),wt.set(ht,Qe),wt.set(ut,Je),wt.set(ft,et),wt.set(gt,tt),wt.set(bt,it),wt.set(vt,nt),wt.set(xt,rt),wt.set(_t,at),wt.set(yt,ot);var Et,Tt,It=new Set;function At(e){var t=e.key;if(dt.has(t))return t;var i=wt.get(e.keyCode);return i||je}
+/**
+ * KEY provides normalized string values for keys.
+ */
+var KEY = {
+ UNKNOWN: 'Unknown',
+ BACKSPACE: 'Backspace',
+ ENTER: 'Enter',
+ SPACEBAR: 'Spacebar',
+ PAGE_UP: 'PageUp',
+ PAGE_DOWN: 'PageDown',
+ END: 'End',
+ HOME: 'Home',
+ ARROW_LEFT: 'ArrowLeft',
+ ARROW_UP: 'ArrowUp',
+ ARROW_RIGHT: 'ArrowRight',
+ ARROW_DOWN: 'ArrowDown',
+ DELETE: 'Delete',
+ ESCAPE: 'Escape',
+ TAB: 'Tab',
+};
+var normalizedKeys = new Set();
+// IE11 has no support for new Map with iterable so we need to initialize this
+// by hand.
+normalizedKeys.add(KEY.BACKSPACE);
+normalizedKeys.add(KEY.ENTER);
+normalizedKeys.add(KEY.SPACEBAR);
+normalizedKeys.add(KEY.PAGE_UP);
+normalizedKeys.add(KEY.PAGE_DOWN);
+normalizedKeys.add(KEY.END);
+normalizedKeys.add(KEY.HOME);
+normalizedKeys.add(KEY.ARROW_LEFT);
+normalizedKeys.add(KEY.ARROW_UP);
+normalizedKeys.add(KEY.ARROW_RIGHT);
+normalizedKeys.add(KEY.ARROW_DOWN);
+normalizedKeys.add(KEY.DELETE);
+normalizedKeys.add(KEY.ESCAPE);
+normalizedKeys.add(KEY.TAB);
+var KEY_CODE = {
+ BACKSPACE: 8,
+ ENTER: 13,
+ SPACEBAR: 32,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ END: 35,
+ HOME: 36,
+ ARROW_LEFT: 37,
+ ARROW_UP: 38,
+ ARROW_RIGHT: 39,
+ ARROW_DOWN: 40,
+ DELETE: 46,
+ ESCAPE: 27,
+ TAB: 9,
+};
+var mappedKeyCodes = new Map();
+// IE11 has no support for new Map with iterable so we need to initialize this
+// by hand.
+mappedKeyCodes.set(KEY_CODE.BACKSPACE, KEY.BACKSPACE);
+mappedKeyCodes.set(KEY_CODE.ENTER, KEY.ENTER);
+mappedKeyCodes.set(KEY_CODE.SPACEBAR, KEY.SPACEBAR);
+mappedKeyCodes.set(KEY_CODE.PAGE_UP, KEY.PAGE_UP);
+mappedKeyCodes.set(KEY_CODE.PAGE_DOWN, KEY.PAGE_DOWN);
+mappedKeyCodes.set(KEY_CODE.END, KEY.END);
+mappedKeyCodes.set(KEY_CODE.HOME, KEY.HOME);
+mappedKeyCodes.set(KEY_CODE.ARROW_LEFT, KEY.ARROW_LEFT);
+mappedKeyCodes.set(KEY_CODE.ARROW_UP, KEY.ARROW_UP);
+mappedKeyCodes.set(KEY_CODE.ARROW_RIGHT, KEY.ARROW_RIGHT);
+mappedKeyCodes.set(KEY_CODE.ARROW_DOWN, KEY.ARROW_DOWN);
+mappedKeyCodes.set(KEY_CODE.DELETE, KEY.DELETE);
+mappedKeyCodes.set(KEY_CODE.ESCAPE, KEY.ESCAPE);
+mappedKeyCodes.set(KEY_CODE.TAB, KEY.TAB);
+var navigationKeys = new Set();
+// IE11 has no support for new Set with iterable so we need to initialize this
+// by hand.
+navigationKeys.add(KEY.PAGE_UP);
+navigationKeys.add(KEY.PAGE_DOWN);
+navigationKeys.add(KEY.END);
+navigationKeys.add(KEY.HOME);
+navigationKeys.add(KEY.ARROW_LEFT);
+navigationKeys.add(KEY.ARROW_UP);
+navigationKeys.add(KEY.ARROW_RIGHT);
+navigationKeys.add(KEY.ARROW_DOWN);
+/**
+ * normalizeKey returns the normalized string for a navigational action.
+ */
+function normalizeKey(evt) {
+ var key = evt.key;
+ // If the event already has a normalized key, return it
+ if (normalizedKeys.has(key)) {
+ return key;
+ }
+ // tslint:disable-next-line:deprecation
+ var mappedKey = mappedKeyCodes.get(evt.keyCode);
+ if (mappedKey) {
+ return mappedKey;
+ }
+ return KEY.UNKNOWN;
+}
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -211,7 +811,381 @@ var je="Unknown",Ge="Backspace",qe="Enter",Ye="Spacebar",Ke="PageUp",Ze="PageDow
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */It.add(Ke),It.add(Ze),It.add(Qe),It.add(Je),It.add(et),It.add(tt),It.add(it),It.add(nt);var Ct="mdc-list-item--activated",St="mdc-list-item",Rt="mdc-list-item--disabled",kt="mdc-list-item--selected",Ot="mdc-list-item__text",Lt="mdc-list-item__primary-text",Ft="mdc-list";(Et={})[""+Ct]="mdc-list-item--activated",Et[""+St]="mdc-list-item",Et[""+Rt]="mdc-list-item--disabled",Et[""+kt]="mdc-list-item--selected",Et[""+Lt]="mdc-list-item__primary-text",Et[""+Ft]="mdc-list";var Dt=((Tt={})[""+Ct]="mdc-deprecated-list-item--activated",Tt[""+St]="mdc-deprecated-list-item",Tt[""+Rt]="mdc-deprecated-list-item--disabled",Tt[""+kt]="mdc-deprecated-list-item--selected",Tt[""+Ot]="mdc-deprecated-list-item__text",Tt[""+Lt]="mdc-deprecated-list-item__primary-text",Tt[""+Ft]="mdc-deprecated-list",Tt),$t={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+St+" button:not(:disabled),\n ."+St+" a,\n ."+Dt[St]+" button:not(:disabled),\n ."+Dt[St]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+St+" button:not(:disabled),\n ."+St+" a,\n ."+St+' input[type="radio"]:not(:disabled),\n .'+St+' input[type="checkbox"]:not(:disabled),\n .'+Dt[St]+" button:not(:disabled),\n ."+Dt[St]+" a,\n ."+Dt[St]+' input[type="radio"]:not(:disabled),\n .'+Dt[St]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},Mt={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},Nt=["input","button","textarea","select"],Bt=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===Nt.indexOf(i)&&e.preventDefault()}};function Ht(e,t){for(var i=new Map,n=0;nt&&!i(a[d].index)){l=d;break}if(-1!==l)return n.sortedIndexCursor=l,a[n.sortedIndexCursor].index;return-1}(a,o,l,t):function(e,t,i){var n=i.typeaheadBuffer[0],r=e.get(n);if(!r)return-1;var a=r[i.sortedIndexCursor];if(0===a.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(a.index))return a.index;var o=(i.sortedIndexCursor+1)%r.length,d=-1;for(;o!==i.sortedIndexCursor;){var l=r[o],s=0===l.text.lastIndexOf(i.typeaheadBuffer,0),c=!t(l.index);if(s&&c){d=o;break}o=(o+1)%r.length}if(-1!==d)return i.sortedIndexCursor=d,r[i.sortedIndexCursor].index;return-1}(a,l,t),-1===i||d||r(i),i}function zt(e){return e.typeaheadBuffer.length>0}
+ */
+var _a, _b;
+var cssClasses$a = {
+ LIST_ITEM_ACTIVATED_CLASS: 'mdc-list-item--activated',
+ LIST_ITEM_CLASS: 'mdc-list-item',
+ LIST_ITEM_DISABLED_CLASS: 'mdc-list-item--disabled',
+ LIST_ITEM_SELECTED_CLASS: 'mdc-list-item--selected',
+ LIST_ITEM_TEXT_CLASS: 'mdc-list-item__text',
+ LIST_ITEM_PRIMARY_TEXT_CLASS: 'mdc-list-item__primary-text',
+ ROOT: 'mdc-list',
+};
+(_a = {},
+ _a["" + cssClasses$a.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-list-item--activated',
+ _a["" + cssClasses$a.LIST_ITEM_CLASS] = 'mdc-list-item',
+ _a["" + cssClasses$a.LIST_ITEM_DISABLED_CLASS] = 'mdc-list-item--disabled',
+ _a["" + cssClasses$a.LIST_ITEM_SELECTED_CLASS] = 'mdc-list-item--selected',
+ _a["" + cssClasses$a.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-list-item__primary-text',
+ _a["" + cssClasses$a.ROOT] = 'mdc-list',
+ _a);
+var deprecatedClassNameMap = (_b = {},
+ _b["" + cssClasses$a.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-deprecated-list-item--activated',
+ _b["" + cssClasses$a.LIST_ITEM_CLASS] = 'mdc-deprecated-list-item',
+ _b["" + cssClasses$a.LIST_ITEM_DISABLED_CLASS] = 'mdc-deprecated-list-item--disabled',
+ _b["" + cssClasses$a.LIST_ITEM_SELECTED_CLASS] = 'mdc-deprecated-list-item--selected',
+ _b["" + cssClasses$a.LIST_ITEM_TEXT_CLASS] = 'mdc-deprecated-list-item__text',
+ _b["" + cssClasses$a.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-deprecated-list-item__primary-text',
+ _b["" + cssClasses$a.ROOT] = 'mdc-deprecated-list',
+ _b);
+var strings$7 = {
+ ACTION_EVENT: 'MDCList:action',
+ ARIA_CHECKED: 'aria-checked',
+ ARIA_CHECKED_CHECKBOX_SELECTOR: '[role="checkbox"][aria-checked="true"]',
+ ARIA_CHECKED_RADIO_SELECTOR: '[role="radio"][aria-checked="true"]',
+ ARIA_CURRENT: 'aria-current',
+ ARIA_DISABLED: 'aria-disabled',
+ ARIA_ORIENTATION: 'aria-orientation',
+ ARIA_ORIENTATION_HORIZONTAL: 'horizontal',
+ ARIA_ROLE_CHECKBOX_SELECTOR: '[role="checkbox"]',
+ ARIA_SELECTED: 'aria-selected',
+ ARIA_INTERACTIVE_ROLES_SELECTOR: '[role="listbox"], [role="menu"]',
+ ARIA_MULTI_SELECTABLE_SELECTOR: '[aria-multiselectable="true"]',
+ CHECKBOX_RADIO_SELECTOR: 'input[type="checkbox"], input[type="radio"]',
+ CHECKBOX_SELECTOR: 'input[type="checkbox"]',
+ CHILD_ELEMENTS_TO_TOGGLE_TABINDEX: "\n ." + cssClasses$a.LIST_ITEM_CLASS + " button:not(:disabled),\n ." + cssClasses$a.LIST_ITEM_CLASS + " a,\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " button:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " a\n ",
+ DEPRECATED_SELECTOR: '.mdc-deprecated-list',
+ FOCUSABLE_CHILD_ELEMENTS: "\n ." + cssClasses$a.LIST_ITEM_CLASS + " button:not(:disabled),\n ." + cssClasses$a.LIST_ITEM_CLASS + " a,\n ." + cssClasses$a.LIST_ITEM_CLASS + " input[type=\"radio\"]:not(:disabled),\n ." + cssClasses$a.LIST_ITEM_CLASS + " input[type=\"checkbox\"]:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " button:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " a,\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " input[type=\"radio\"]:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$a.LIST_ITEM_CLASS] + " input[type=\"checkbox\"]:not(:disabled)\n ",
+ RADIO_SELECTOR: 'input[type="radio"]',
+ SELECTED_ITEM_SELECTOR: '[aria-selected="true"], [aria-current="true"]',
+};
+var numbers$7 = {
+ UNSET_INDEX: -1,
+ TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS: 300
+};
+
+/**
+ * @license
+ * Copyright 2020 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+var ELEMENTS_KEY_ALLOWED_IN$1 = ['input', 'button', 'textarea', 'select'];
+/**
+ * Ensures that preventDefault is only called if the containing element
+ * doesn't consume the event, and it will cause an unintended scroll.
+ *
+ * @param evt keyboard event to be prevented.
+ */
+var preventDefaultEvent = function (evt) {
+ var target = evt.target;
+ if (!target) {
+ return;
+ }
+ var tagName = ("" + target.tagName).toLowerCase();
+ if (ELEMENTS_KEY_ALLOWED_IN$1.indexOf(tagName) === -1) {
+ evt.preventDefault();
+ }
+};
+
+/**
+ * @license
+ * Copyright 2020 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+/**
+ * Initializes a state object for typeahead. Use the same reference for calls to
+ * typeahead functions.
+ *
+ * @return The current state of the typeahead process. Each state reference
+ * represents a typeahead instance as the reference is typically mutated
+ * in-place.
+ */
+function initState() {
+ var state = {
+ bufferClearTimeout: 0,
+ currentFirstChar: '',
+ sortedIndexCursor: 0,
+ typeaheadBuffer: '',
+ };
+ return state;
+}
+/**
+ * Initializes typeahead state by indexing the current list items by primary
+ * text into the sortedIndexByFirstChar data structure.
+ *
+ * @param listItemCount numer of items in the list
+ * @param getPrimaryTextByItemIndex function that returns the primary text at a
+ * given index
+ *
+ * @return Map that maps the first character of the primary text to the full
+ * list text and it's index
+ */
+function initSortedIndex(listItemCount, getPrimaryTextByItemIndex) {
+ var sortedIndexByFirstChar = new Map();
+ // Aggregate item text to index mapping
+ for (var i = 0; i < listItemCount; i++) {
+ var primaryText = getPrimaryTextByItemIndex(i).trim();
+ if (!primaryText) {
+ continue;
+ }
+ var firstChar = primaryText[0].toLowerCase();
+ if (!sortedIndexByFirstChar.has(firstChar)) {
+ sortedIndexByFirstChar.set(firstChar, []);
+ }
+ sortedIndexByFirstChar.get(firstChar).push({ text: primaryText.toLowerCase(), index: i });
+ }
+ // Sort the mapping
+ // TODO(b/157162694): Investigate replacing forEach with Map.values()
+ sortedIndexByFirstChar.forEach(function (values) {
+ values.sort(function (first, second) {
+ return first.index - second.index;
+ });
+ });
+ return sortedIndexByFirstChar;
+}
+/**
+ * Given the next desired character from the user, it attempts to find the next
+ * list option matching the buffer. Wraps around if at the end of options.
+ *
+ * @param opts Options and accessors
+ * - nextChar - the next character to match against items
+ * - sortedIndexByFirstChar - output of `initSortedIndex(...)`
+ * - focusedItemIndex - the index of the currently focused item
+ * - focusItemAtIndex - function that focuses a list item at given index
+ * - skipFocus - whether or not to focus the matched item
+ * - isItemAtIndexDisabled - function that determines whether an item at a
+ * given index is disabled
+ * @param state The typeahead state instance. See `initState`.
+ *
+ * @return The index of the matched item, or -1 if no match.
+ */
+function matchItem(opts, state) {
+ var nextChar = opts.nextChar, focusItemAtIndex = opts.focusItemAtIndex, sortedIndexByFirstChar = opts.sortedIndexByFirstChar, focusedItemIndex = opts.focusedItemIndex, skipFocus = opts.skipFocus, isItemAtIndexDisabled = opts.isItemAtIndexDisabled;
+ clearTimeout(state.bufferClearTimeout);
+ state.bufferClearTimeout = setTimeout(function () {
+ clearBuffer(state);
+ }, numbers$7.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS);
+ state.typeaheadBuffer = state.typeaheadBuffer + nextChar;
+ var index;
+ if (state.typeaheadBuffer.length === 1) {
+ index = matchFirstChar(sortedIndexByFirstChar, focusedItemIndex, isItemAtIndexDisabled, state);
+ }
+ else {
+ index = matchAllChars(sortedIndexByFirstChar, isItemAtIndexDisabled, state);
+ }
+ if (index !== -1 && !skipFocus) {
+ focusItemAtIndex(index);
+ }
+ return index;
+}
+/**
+ * Matches the user's single input character in the buffer to the
+ * next option that begins with such character. Wraps around if at
+ * end of options. Returns -1 if no match is found.
+ */
+function matchFirstChar(sortedIndexByFirstChar, focusedItemIndex, isItemAtIndexDisabled, state) {
+ var firstChar = state.typeaheadBuffer[0];
+ var itemsMatchingFirstChar = sortedIndexByFirstChar.get(firstChar);
+ if (!itemsMatchingFirstChar) {
+ return -1;
+ }
+ // Has the same firstChar been recently matched?
+ // Also, did starting index remain the same between key presses?
+ // If both hold true, simply increment index.
+ if (firstChar === state.currentFirstChar &&
+ itemsMatchingFirstChar[state.sortedIndexCursor].index ===
+ focusedItemIndex) {
+ state.sortedIndexCursor =
+ (state.sortedIndexCursor + 1) % itemsMatchingFirstChar.length;
+ var newIndex = itemsMatchingFirstChar[state.sortedIndexCursor].index;
+ if (!isItemAtIndexDisabled(newIndex)) {
+ return newIndex;
+ }
+ }
+ // If we're here, it means one of the following happened:
+ // - either firstChar or startingIndex has changed, invalidating the
+ // cursor.
+ // - The next item of typeahead is disabled, so we have to look further.
+ state.currentFirstChar = firstChar;
+ var newCursorPosition = -1;
+ var cursorPosition;
+ // Find the first non-disabled item as a fallback.
+ for (cursorPosition = 0; cursorPosition < itemsMatchingFirstChar.length; cursorPosition++) {
+ if (!isItemAtIndexDisabled(itemsMatchingFirstChar[cursorPosition].index)) {
+ newCursorPosition = cursorPosition;
+ break;
+ }
+ }
+ // Advance cursor to first item matching the firstChar that is positioned
+ // after starting item. Cursor is unchanged from fallback if there's no
+ // such item.
+ for (; cursorPosition < itemsMatchingFirstChar.length; cursorPosition++) {
+ if (itemsMatchingFirstChar[cursorPosition].index > focusedItemIndex &&
+ !isItemAtIndexDisabled(itemsMatchingFirstChar[cursorPosition].index)) {
+ newCursorPosition = cursorPosition;
+ break;
+ }
+ }
+ if (newCursorPosition !== -1) {
+ state.sortedIndexCursor = newCursorPosition;
+ return itemsMatchingFirstChar[state.sortedIndexCursor].index;
+ }
+ return -1;
+}
+/**
+ * Attempts to find the next item that matches all of the typeahead buffer.
+ * Wraps around if at end of options. Returns -1 if no match is found.
+ */
+function matchAllChars(sortedIndexByFirstChar, isItemAtIndexDisabled, state) {
+ var firstChar = state.typeaheadBuffer[0];
+ var itemsMatchingFirstChar = sortedIndexByFirstChar.get(firstChar);
+ if (!itemsMatchingFirstChar) {
+ return -1;
+ }
+ // Do nothing if text already matches
+ var startingItem = itemsMatchingFirstChar[state.sortedIndexCursor];
+ if (startingItem.text.lastIndexOf(state.typeaheadBuffer, 0) === 0 &&
+ !isItemAtIndexDisabled(startingItem.index)) {
+ return startingItem.index;
+ }
+ // Find next item that matches completely; if no match, we'll eventually
+ // loop around to same position
+ var cursorPosition = (state.sortedIndexCursor + 1) % itemsMatchingFirstChar.length;
+ var nextCursorPosition = -1;
+ while (cursorPosition !== state.sortedIndexCursor) {
+ var currentItem = itemsMatchingFirstChar[cursorPosition];
+ var matches = currentItem.text.lastIndexOf(state.typeaheadBuffer, 0) === 0;
+ var isEnabled = !isItemAtIndexDisabled(currentItem.index);
+ if (matches && isEnabled) {
+ nextCursorPosition = cursorPosition;
+ break;
+ }
+ cursorPosition = (cursorPosition + 1) % itemsMatchingFirstChar.length;
+ }
+ if (nextCursorPosition !== -1) {
+ state.sortedIndexCursor = nextCursorPosition;
+ return itemsMatchingFirstChar[state.sortedIndexCursor].index;
+ }
+ return -1;
+}
+/**
+ * Whether or not the given typeahead instaance state is currently typing.
+ *
+ * @param state The typeahead state instance. See `initState`.
+ */
+function isTypingInProgress(state) {
+ return state.typeaheadBuffer.length > 0;
+}
+/**
+ * Clears the typeahaed buffer so that it resets item matching to the first
+ * character.
+ *
+ * @param state The typeahead state instance. See `initState`.
+ */
+function clearBuffer(state) {
+ state.typeaheadBuffer = '';
+}
+/**
+ * Given a keydown event, it calculates whether or not to automatically focus a
+ * list item depending on what was typed mimicing the typeahead functionality of
+ * a standard element that is open.
+ *
+ * @param opts Options and accessors
+ * - event - the KeyboardEvent to handle and parse
+ * - sortedIndexByFirstChar - output of `initSortedIndex(...)`
+ * - focusedItemIndex - the index of the currently focused item
+ * - focusItemAtIndex - function that focuses a list item at given index
+ * - isItemAtFocusedIndexDisabled - whether or not the currently focused item
+ * is disabled
+ * - isTargetListItem - whether or not the event target is a list item
+ * @param state The typeahead state instance. See `initState`.
+ *
+ * @returns index of the item matched by the keydown. -1 if not matched.
+ */
+function handleKeydown(opts, state) {
+ var event = opts.event, isTargetListItem = opts.isTargetListItem, focusedItemIndex = opts.focusedItemIndex, focusItemAtIndex = opts.focusItemAtIndex, sortedIndexByFirstChar = opts.sortedIndexByFirstChar, isItemAtIndexDisabled = opts.isItemAtIndexDisabled;
+ var isArrowLeft = normalizeKey(event) === 'ArrowLeft';
+ var isArrowUp = normalizeKey(event) === 'ArrowUp';
+ var isArrowRight = normalizeKey(event) === 'ArrowRight';
+ var isArrowDown = normalizeKey(event) === 'ArrowDown';
+ var isHome = normalizeKey(event) === 'Home';
+ var isEnd = normalizeKey(event) === 'End';
+ var isEnter = normalizeKey(event) === 'Enter';
+ var isSpace = normalizeKey(event) === 'Spacebar';
+ if (event.ctrlKey || event.metaKey || isArrowLeft || isArrowUp ||
+ isArrowRight || isArrowDown || isHome || isEnd || isEnter) {
+ return -1;
+ }
+ var isCharacterKey = !isSpace && event.key.length === 1;
+ if (isCharacterKey) {
+ preventDefaultEvent(event);
+ var matchItemOpts = {
+ focusItemAtIndex: focusItemAtIndex,
+ focusedItemIndex: focusedItemIndex,
+ nextChar: event.key.toLowerCase(),
+ sortedIndexByFirstChar: sortedIndexByFirstChar,
+ skipFocus: false,
+ isItemAtIndexDisabled: isItemAtIndexDisabled,
+ };
+ return matchItem(matchItemOpts, state);
+ }
+ if (!isSpace) {
+ return -1;
+ }
+ if (isTargetListItem) {
+ preventDefaultEvent(event);
+ }
+ var typeaheadOnListItem = isTargetListItem && isTypingInProgress(state);
+ if (typeaheadOnListItem) {
+ var matchItemOpts = {
+ focusItemAtIndex: focusItemAtIndex,
+ focusedItemIndex: focusedItemIndex,
+ nextChar: ' ',
+ sortedIndexByFirstChar: sortedIndexByFirstChar,
+ skipFocus: false,
+ isItemAtIndexDisabled: isItemAtIndexDisabled,
+ };
+ // space participates in typeahead matching if in rapid typing mode
+ return matchItem(matchItemOpts, state);
+ }
+ return -1;
+}
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -234,7 +1208,13 @@ var je="Unknown",Ge="Backspace",qe="Enter",Ye="Spacebar",Ke="PageUp",Ze="PageDow
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var Vt={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Ut=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Vt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},n.prototype.getWidth=function(){return this.adapter.getWidth()},n.prototype.shake=function(e){var t=n.cssClasses.LABEL_SHAKE;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.float=function(e){var t=n.cssClasses,i=t.LABEL_FLOAT_ABOVE,r=t.LABEL_SHAKE;e?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},n.prototype.setRequired=function(e){var t=n.cssClasses.LABEL_REQUIRED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.handleShakeAnimationEnd=function(){var e=n.cssClasses.LABEL_SHAKE;this.adapter.removeClass(e)},n}(ye);
+var cssClasses$9 = {
+ LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above',
+ LABEL_REQUIRED: 'mdc-floating-label--required',
+ LABEL_SHAKE: 'mdc-floating-label--shake',
+ ROOT: 'mdc-floating-label',
+};
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -256,7 +1236,156 @@ var Vt={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */const Xt=Pe(class extends ze{constructor(e){switch(super(e),this.foundation=null,this.previousPart=null,e.type){case Ne:case Be:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(e,[t]){if(e!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-floating-label");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),getWidth:()=>e.scrollWidth,registerInteractionHandler:(t,i)=>{e.addEventListener(t,i)},deregisterInteractionHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new Ut(i),this.foundation.init()}return this.render(t)}render(e){return this.foundation}});
+ */
+var MDCFloatingLabelFoundation = /** @class */ (function (_super) {
+ __extends(MDCFloatingLabelFoundation, _super);
+ function MDCFloatingLabelFoundation(adapter) {
+ var _this = _super.call(this, __assign(__assign({}, MDCFloatingLabelFoundation.defaultAdapter), adapter)) || this;
+ _this.shakeAnimationEndHandler = function () {
+ _this.handleShakeAnimationEnd();
+ };
+ return _this;
+ }
+ Object.defineProperty(MDCFloatingLabelFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$9;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCFloatingLabelFoundation, "defaultAdapter", {
+ /**
+ * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.
+ */
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
+ return {
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ getWidth: function () { return 0; },
+ registerInteractionHandler: function () { return undefined; },
+ deregisterInteractionHandler: function () { return undefined; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCFloatingLabelFoundation.prototype.init = function () {
+ this.adapter.registerInteractionHandler('animationend', this.shakeAnimationEndHandler);
+ };
+ MDCFloatingLabelFoundation.prototype.destroy = function () {
+ this.adapter.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler);
+ };
+ /**
+ * Returns the width of the label element.
+ */
+ MDCFloatingLabelFoundation.prototype.getWidth = function () {
+ return this.adapter.getWidth();
+ };
+ /**
+ * Styles the label to produce a shake animation to indicate an error.
+ * @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class.
+ */
+ MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) {
+ var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;
+ if (shouldShake) {
+ this.adapter.addClass(LABEL_SHAKE);
+ }
+ else {
+ this.adapter.removeClass(LABEL_SHAKE);
+ }
+ };
+ /**
+ * Styles the label to float or dock.
+ * @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label.
+ */
+ MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) {
+ var _a = MDCFloatingLabelFoundation.cssClasses, LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, LABEL_SHAKE = _a.LABEL_SHAKE;
+ if (shouldFloat) {
+ this.adapter.addClass(LABEL_FLOAT_ABOVE);
+ }
+ else {
+ this.adapter.removeClass(LABEL_FLOAT_ABOVE);
+ this.adapter.removeClass(LABEL_SHAKE);
+ }
+ };
+ /**
+ * Styles the label as required.
+ * @param isRequired If true, adds an asterisk to the label, indicating that it is required.
+ */
+ MDCFloatingLabelFoundation.prototype.setRequired = function (isRequired) {
+ var LABEL_REQUIRED = MDCFloatingLabelFoundation.cssClasses.LABEL_REQUIRED;
+ if (isRequired) {
+ this.adapter.addClass(LABEL_REQUIRED);
+ }
+ else {
+ this.adapter.removeClass(LABEL_REQUIRED);
+ }
+ };
+ MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd = function () {
+ var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;
+ this.adapter.removeClass(LABEL_SHAKE);
+ };
+ return MDCFloatingLabelFoundation;
+}(MDCFoundation));
+
+/**
+ * @license
+ * Copyright 2018 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const createAdapter$1 = (labelElement) => {
+ return {
+ addClass: (className) => labelElement.classList.add(className),
+ removeClass: (className) => labelElement.classList.remove(className),
+ getWidth: () => labelElement.scrollWidth,
+ registerInteractionHandler: (evtType, handler) => {
+ labelElement.addEventListener(evtType, handler);
+ },
+ deregisterInteractionHandler: (evtType, handler) => {
+ labelElement.removeEventListener(evtType, handler);
+ },
+ };
+};
+class FloatingLabelDirective extends i$1 {
+ constructor(partInfo) {
+ super(partInfo);
+ this.foundation = null;
+ this.previousPart = null;
+ switch (partInfo.type) {
+ // Only allow Attribute and Part bindings
+ case t.ATTRIBUTE:
+ case t.PROPERTY:
+ break;
+ default:
+ throw new Error('FloatingLabel directive only support attribute and property parts');
+ }
+ }
+ /**
+ * There is no PropertyPart in Lit 2 so far. For more info see:
+ * https://github.com/lit/lit/issues/1863
+ */
+ update(part, [label]) {
+ if (part !== this.previousPart) {
+ if (this.foundation) {
+ this.foundation.destroy();
+ }
+ this.previousPart = part;
+ const labelElement = part.element;
+ labelElement.classList.add('mdc-floating-label');
+ const adapter = createAdapter$1(labelElement);
+ this.foundation = new MDCFloatingLabelFoundation(adapter);
+ this.foundation.init();
+ }
+ return this.render(label);
+ }
+ render(_label) {
+ return this.foundation;
+ }
+}
+const floatingLabel = e$1(FloatingLabelDirective);
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -278,7 +1407,12 @@ var Vt={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var Wt={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},jt=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.transitionEndHandler=function(e){r.handleTransitionEnd(e)},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Wt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},n.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},n.prototype.activate=function(){this.adapter.removeClass(Wt.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Wt.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(e){this.adapter.setStyle("transform-origin",e+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(Wt.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(e){var t=this.adapter.hasClass(Wt.LINE_RIPPLE_DEACTIVATING);"opacity"===e.propertyName&&t&&(this.adapter.removeClass(Wt.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Wt.LINE_RIPPLE_DEACTIVATING))},n}(ye);
+ */
+var cssClasses$8 = {
+ LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active',
+ LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating',
+};
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -300,7 +1434,128 @@ var Vt={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */const Gt=Pe(class extends ze{constructor(e){switch(super(e),this.previousPart=null,this.foundation=null,e.type){case Ne:case Be:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(e,t){if(this.previousPart!==e){this.foundation&&this.foundation.destroy(),this.previousPart=e;const t=e.element;t.classList.add("mdc-line-ripple");const i=(e=>({addClass:t=>e.classList.add(t),removeClass:t=>e.classList.remove(t),hasClass:t=>e.classList.contains(t),setStyle:(t,i)=>e.style.setProperty(t,i),registerEventHandler:(t,i)=>{e.addEventListener(t,i)},deregisterEventHandler:(t,i)=>{e.removeEventListener(t,i)}}))(t);this.foundation=new jt(i),this.foundation.init()}return this.render()}render(){return this.foundation}});
+ */
+var MDCLineRippleFoundation = /** @class */ (function (_super) {
+ __extends(MDCLineRippleFoundation, _super);
+ function MDCLineRippleFoundation(adapter) {
+ var _this = _super.call(this, __assign(__assign({}, MDCLineRippleFoundation.defaultAdapter), adapter)) || this;
+ _this.transitionEndHandler = function (evt) {
+ _this.handleTransitionEnd(evt);
+ };
+ return _this;
+ }
+ Object.defineProperty(MDCLineRippleFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$8;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCLineRippleFoundation, "defaultAdapter", {
+ /**
+ * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.
+ */
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
+ return {
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ hasClass: function () { return false; },
+ setStyle: function () { return undefined; },
+ registerEventHandler: function () { return undefined; },
+ deregisterEventHandler: function () { return undefined; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCLineRippleFoundation.prototype.init = function () {
+ this.adapter.registerEventHandler('transitionend', this.transitionEndHandler);
+ };
+ MDCLineRippleFoundation.prototype.destroy = function () {
+ this.adapter.deregisterEventHandler('transitionend', this.transitionEndHandler);
+ };
+ MDCLineRippleFoundation.prototype.activate = function () {
+ this.adapter.removeClass(cssClasses$8.LINE_RIPPLE_DEACTIVATING);
+ this.adapter.addClass(cssClasses$8.LINE_RIPPLE_ACTIVE);
+ };
+ MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) {
+ this.adapter.setStyle('transform-origin', xCoordinate + "px center");
+ };
+ MDCLineRippleFoundation.prototype.deactivate = function () {
+ this.adapter.addClass(cssClasses$8.LINE_RIPPLE_DEACTIVATING);
+ };
+ MDCLineRippleFoundation.prototype.handleTransitionEnd = function (evt) {
+ // Wait for the line ripple to be either transparent or opaque
+ // before emitting the animation end event
+ var isDeactivating = this.adapter.hasClass(cssClasses$8.LINE_RIPPLE_DEACTIVATING);
+ if (evt.propertyName === 'opacity') {
+ if (isDeactivating) {
+ this.adapter.removeClass(cssClasses$8.LINE_RIPPLE_ACTIVE);
+ this.adapter.removeClass(cssClasses$8.LINE_RIPPLE_DEACTIVATING);
+ }
+ }
+ };
+ return MDCLineRippleFoundation;
+}(MDCFoundation));
+
+/**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const createAdapter = (lineElement) => {
+ return {
+ addClass: (className) => lineElement.classList.add(className),
+ removeClass: (className) => lineElement.classList.remove(className),
+ hasClass: (className) => lineElement.classList.contains(className),
+ setStyle: (propertyName, value) => lineElement.style.setProperty(propertyName, value),
+ registerEventHandler: (evtType, handler) => {
+ lineElement.addEventListener(evtType, handler);
+ },
+ deregisterEventHandler: (evtType, handler) => {
+ lineElement.removeEventListener(evtType, handler);
+ },
+ };
+};
+class LineRippleDirective extends i$1 {
+ constructor(partInfo) {
+ super(partInfo);
+ this.previousPart = null;
+ this.foundation = null;
+ switch (partInfo.type) {
+ case t.ATTRIBUTE:
+ case t.PROPERTY:
+ return;
+ default:
+ throw new Error('LineRipple only support attribute and property parts.');
+ }
+ }
+ /**
+ * There is no PropertyPart in Lit 2 so far. For more info see:
+ * https://github.com/lit/lit/issues/1863
+ */
+ update(part, _params) {
+ if (this.previousPart !== part) {
+ if (this.foundation) {
+ this.foundation.destroy();
+ }
+ this.previousPart = part;
+ const lineElement = part.element;
+ lineElement.classList.add('mdc-line-ripple');
+ const adapter = createAdapter(lineElement);
+ this.foundation = new MDCLineRippleFoundation(adapter);
+ this.foundation.init();
+ }
+ return this.render();
+ }
+ render() {
+ return this.foundation;
+ }
+}
+const lineRipple = e$1(LineRippleDirective);
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -322,7 +1577,83 @@ var Vt={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var qt,Yt,Kt={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},Zt={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},Qt={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(e){e[e.BOTTOM=1]="BOTTOM",e[e.CENTER=2]="CENTER",e[e.RIGHT=4]="RIGHT",e[e.FLIP_RTL=8]="FLIP_RTL"}(qt||(qt={})),function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=4]="TOP_RIGHT",e[e.BOTTOM_LEFT=1]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",e[e.TOP_START=8]="TOP_START",e[e.TOP_END=12]="TOP_END",e[e.BOTTOM_START=9]="BOTTOM_START",e[e.BOTTOM_END=13]="BOTTOM_END"}(Yt||(Yt={}));
+ */
+var cssClasses$7 = {
+ ANCHOR: 'mdc-menu-surface--anchor',
+ ANIMATING_CLOSED: 'mdc-menu-surface--animating-closed',
+ ANIMATING_OPEN: 'mdc-menu-surface--animating-open',
+ FIXED: 'mdc-menu-surface--fixed',
+ IS_OPEN_BELOW: 'mdc-menu-surface--is-open-below',
+ OPEN: 'mdc-menu-surface--open',
+ ROOT: 'mdc-menu-surface',
+};
+// tslint:disable:object-literal-sort-keys
+var strings$6 = {
+ CLOSED_EVENT: 'MDCMenuSurface:closed',
+ CLOSING_EVENT: 'MDCMenuSurface:closing',
+ OPENED_EVENT: 'MDCMenuSurface:opened',
+ FOCUSABLE_ELEMENTS: [
+ 'button:not(:disabled)',
+ '[href]:not([aria-disabled="true"])',
+ 'input:not(:disabled)',
+ 'select:not(:disabled)',
+ 'textarea:not(:disabled)',
+ '[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])',
+ ].join(', '),
+};
+// tslint:enable:object-literal-sort-keys
+var numbers$6 = {
+ /** Total duration of menu-surface open animation. */
+ TRANSITION_OPEN_DURATION: 120,
+ /** Total duration of menu-surface close animation. */
+ TRANSITION_CLOSE_DURATION: 75,
+ /**
+ * Margin left to the edge of the viewport when menu-surface is at maximum
+ * possible height. Also used as a viewport margin.
+ */
+ MARGIN_TO_EDGE: 32,
+ /**
+ * Ratio of anchor width to menu-surface width for switching from corner
+ * positioning to center positioning.
+ */
+ ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: 0.67,
+ /**
+ * Amount of time to wait before restoring focus when closing the menu
+ * surface. This is important because if a touch event triggered the menu
+ * close, and the subsequent mouse event occurs after focus is restored, then
+ * the restored focus would be lost.
+ */
+ TOUCH_EVENT_WAIT_MS: 30,
+};
+/**
+ * Enum for bits in the {@see Corner) bitmap.
+ */
+var CornerBit;
+(function (CornerBit) {
+ CornerBit[CornerBit["BOTTOM"] = 1] = "BOTTOM";
+ CornerBit[CornerBit["CENTER"] = 2] = "CENTER";
+ CornerBit[CornerBit["RIGHT"] = 4] = "RIGHT";
+ CornerBit[CornerBit["FLIP_RTL"] = 8] = "FLIP_RTL";
+})(CornerBit || (CornerBit = {}));
+/**
+ * Enum for representing an element corner for positioning the menu-surface.
+ *
+ * The START constants map to LEFT if element directionality is left
+ * to right and RIGHT if the directionality is right to left.
+ * Likewise END maps to RIGHT or LEFT depending on the directionality.
+ */
+var Corner;
+(function (Corner) {
+ Corner[Corner["TOP_LEFT"] = 0] = "TOP_LEFT";
+ Corner[Corner["TOP_RIGHT"] = 4] = "TOP_RIGHT";
+ Corner[Corner["BOTTOM_LEFT"] = 1] = "BOTTOM_LEFT";
+ Corner[Corner["BOTTOM_RIGHT"] = 5] = "BOTTOM_RIGHT";
+ Corner[Corner["TOP_START"] = 8] = "TOP_START";
+ Corner[Corner["TOP_END"] = 12] = "TOP_END";
+ Corner[Corner["BOTTOM_START"] = 9] = "BOTTOM_START";
+ Corner[Corner["BOTTOM_END"] = 13] = "BOTTOM_END";
+})(Corner || (Corner = {}));
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -345,20 +1676,611 @@ var Vt={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var Jt={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},ei={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},ti={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},ii=function(e){function n(t,r){void 0===r&&(r={});var a=e.call(this,i(i({},n.defaultAdapter),t))||this;return a.disabled=!1,a.isMenuOpen=!1,a.useDefaultValidation=!0,a.customValidity=!0,a.lastSelectedIndex=ti.UNSET_INDEX,a.clickDebounceTimeout=0,a.recentlyClicked=!1,a.leadingIcon=r.leadingIcon,a.helperText=r.helperText,a}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Jt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return ti},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return ei},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),n.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},n.prototype.setSelectedIndex=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),e>=this.adapter.getMenuItemCount()||(e===ti.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),i||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},n.prototype.setValue=function(e,t){void 0===t&&(t=!1);var i=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(i,!1,t)},n.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==ti.UNSET_INDEX?t[e]:""},n.prototype.getDisabled=function(){return this.disabled},n.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(Jt.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(Jt.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},n.prototype.openMenu=function(){this.adapter.addClass(Jt.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},n.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},n.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(Jt.FOCUSED),i=e||t,n=this.adapter.hasClass(Jt.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(n)}},n.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},n.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},n.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},n.prototype.handleMenuClosed=function(){this.adapter.removeClass(Jt.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},n.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(Jt.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},n.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},n.prototype.handleFocus=function(){this.adapter.addClass(Jt.FOCUSED),this.layout(),this.adapter.activateBottomLine()},n.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},n.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},n.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(Jt.FOCUSED)){var t=At(e)===qe,i=At(e)===Ye,n=At(e)===tt,r=At(e)===nt;if(!(e.ctrlKey||e.metaKey)&&(!i&&e.key&&1===e.key.length||i&&this.adapter.isTypeaheadInProgress())){var a=i?" ":e.key,o=this.adapter.typeaheadMatchItem(a,this.getSelectedIndex());return o>=0&&this.setSelectedIndex(o),void e.preventDefault()}(t||i||n||r)&&(n&&this.getSelectedIndex()>0?this.setSelectedIndex(this.getSelectedIndex()-1):r&&this.getSelectedIndex()= this.adapter.getMenuItemCount()) {
+ return;
+ }
+ if (index === numbers$5.UNSET_INDEX) {
+ this.adapter.setSelectedText('');
+ }
+ else {
+ this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(index).trim());
+ }
+ this.adapter.setSelectedIndex(index);
+ if (closeMenu) {
+ this.adapter.closeMenu();
+ }
+ if (!skipNotify && this.lastSelectedIndex !== index) {
+ this.handleChange();
+ }
+ this.lastSelectedIndex = index;
+ };
+ MDCSelectFoundation.prototype.setValue = function (value, skipNotify) {
+ if (skipNotify === void 0) { skipNotify = false; }
+ var index = this.adapter.getMenuItemValues().indexOf(value);
+ this.setSelectedIndex(index, /** closeMenu */ false, skipNotify);
+ };
+ MDCSelectFoundation.prototype.getValue = function () {
+ var index = this.adapter.getSelectedIndex();
+ var menuItemValues = this.adapter.getMenuItemValues();
+ return index !== numbers$5.UNSET_INDEX ? menuItemValues[index] : '';
+ };
+ MDCSelectFoundation.prototype.getDisabled = function () {
+ return this.disabled;
+ };
+ MDCSelectFoundation.prototype.setDisabled = function (isDisabled) {
+ this.disabled = isDisabled;
+ if (this.disabled) {
+ this.adapter.addClass(cssClasses$6.DISABLED);
+ this.adapter.closeMenu();
+ }
+ else {
+ this.adapter.removeClass(cssClasses$6.DISABLED);
+ }
+ if (this.leadingIcon) {
+ this.leadingIcon.setDisabled(this.disabled);
+ }
+ if (this.disabled) {
+ // Prevent click events from focusing select. Simply pointer-events: none
+ // is not enough since screenreader clicks may bypass this.
+ this.adapter.removeSelectAnchorAttr('tabindex');
+ }
+ else {
+ this.adapter.setSelectAnchorAttr('tabindex', '0');
+ }
+ this.adapter.setSelectAnchorAttr('aria-disabled', this.disabled.toString());
+ };
+ /** Opens the menu. */
+ MDCSelectFoundation.prototype.openMenu = function () {
+ this.adapter.addClass(cssClasses$6.ACTIVATED);
+ this.adapter.openMenu();
+ this.isMenuOpen = true;
+ this.adapter.setSelectAnchorAttr('aria-expanded', 'true');
+ };
+ /**
+ * @param content Sets the content of the helper text.
+ */
+ MDCSelectFoundation.prototype.setHelperTextContent = function (content) {
+ if (this.helperText) {
+ this.helperText.setContent(content);
+ }
+ };
+ /**
+ * Re-calculates if the notched outline should be notched and if the label
+ * should float.
+ */
+ MDCSelectFoundation.prototype.layout = function () {
+ if (this.adapter.hasLabel()) {
+ var optionHasValue = this.getValue().length > 0;
+ var isFocused = this.adapter.hasClass(cssClasses$6.FOCUSED);
+ var shouldFloatAndNotch = optionHasValue || isFocused;
+ var isRequired = this.adapter.hasClass(cssClasses$6.REQUIRED);
+ this.notchOutline(shouldFloatAndNotch);
+ this.adapter.floatLabel(shouldFloatAndNotch);
+ this.adapter.setLabelRequired(isRequired);
+ }
+ };
+ /**
+ * Synchronizes the list of options with the state of the foundation. Call
+ * this whenever menu options are dynamically updated.
+ */
+ MDCSelectFoundation.prototype.layoutOptions = function () {
+ var menuItemValues = this.adapter.getMenuItemValues();
+ var selectedIndex = menuItemValues.indexOf(this.getValue());
+ this.setSelectedIndex(selectedIndex, /** closeMenu */ false, /** skipNotify */ true);
+ };
+ MDCSelectFoundation.prototype.handleMenuOpened = function () {
+ if (this.adapter.getMenuItemValues().length === 0) {
+ return;
+ }
+ // Menu should open to the last selected element, should open to first menu item otherwise.
+ var selectedIndex = this.getSelectedIndex();
+ var focusItemIndex = selectedIndex >= 0 ? selectedIndex : 0;
+ this.adapter.focusMenuItemAtIndex(focusItemIndex);
+ };
+ MDCSelectFoundation.prototype.handleMenuClosing = function () {
+ this.adapter.setSelectAnchorAttr('aria-expanded', 'false');
+ };
+ MDCSelectFoundation.prototype.handleMenuClosed = function () {
+ this.adapter.removeClass(cssClasses$6.ACTIVATED);
+ this.isMenuOpen = false;
+ // Unfocus the select if menu is closed without a selection
+ if (!this.adapter.isSelectAnchorFocused()) {
+ this.blur();
+ }
+ };
+ /**
+ * Handles value changes, via change event or programmatic updates.
+ */
+ MDCSelectFoundation.prototype.handleChange = function () {
+ this.layout();
+ this.adapter.notifyChange(this.getValue());
+ var isRequired = this.adapter.hasClass(cssClasses$6.REQUIRED);
+ if (isRequired && this.useDefaultValidation) {
+ this.setValid(this.isValid());
+ }
+ };
+ MDCSelectFoundation.prototype.handleMenuItemAction = function (index) {
+ this.setSelectedIndex(index, /** closeMenu */ true);
+ };
+ /**
+ * Handles focus events from select element.
+ */
+ MDCSelectFoundation.prototype.handleFocus = function () {
+ this.adapter.addClass(cssClasses$6.FOCUSED);
+ this.layout();
+ this.adapter.activateBottomLine();
+ };
+ /**
+ * Handles blur events from select element.
+ */
+ MDCSelectFoundation.prototype.handleBlur = function () {
+ if (this.isMenuOpen) {
+ return;
+ }
+ this.blur();
+ };
+ MDCSelectFoundation.prototype.handleClick = function (normalizedX) {
+ if (this.disabled || this.recentlyClicked) {
+ return;
+ }
+ this.setClickDebounceTimeout();
+ if (this.isMenuOpen) {
+ this.adapter.closeMenu();
+ return;
+ }
+ this.adapter.setRippleCenter(normalizedX);
+ this.openMenu();
+ };
+ /**
+ * Handles keydown events on select element. Depending on the type of
+ * character typed, does typeahead matching or opens menu.
+ */
+ MDCSelectFoundation.prototype.handleKeydown = function (event) {
+ if (this.isMenuOpen || !this.adapter.hasClass(cssClasses$6.FOCUSED)) {
+ return;
+ }
+ var isEnter = normalizeKey(event) === KEY.ENTER;
+ var isSpace = normalizeKey(event) === KEY.SPACEBAR;
+ var arrowUp = normalizeKey(event) === KEY.ARROW_UP;
+ var arrowDown = normalizeKey(event) === KEY.ARROW_DOWN;
+ var isModifier = event.ctrlKey || event.metaKey;
+ // Typeahead
+ if (!isModifier &&
+ (!isSpace && event.key && event.key.length === 1 ||
+ isSpace && this.adapter.isTypeaheadInProgress())) {
+ var key = isSpace ? ' ' : event.key;
+ var typeaheadNextIndex = this.adapter.typeaheadMatchItem(key, this.getSelectedIndex());
+ if (typeaheadNextIndex >= 0) {
+ this.setSelectedIndex(typeaheadNextIndex);
+ }
+ event.preventDefault();
+ return;
+ }
+ if (!isEnter && !isSpace && !arrowUp && !arrowDown) {
+ return;
+ }
+ // Increment/decrement index as necessary and open menu.
+ if (arrowUp && this.getSelectedIndex() > 0) {
+ this.setSelectedIndex(this.getSelectedIndex() - 1);
+ }
+ else if (arrowDown &&
+ this.getSelectedIndex() < this.adapter.getMenuItemCount() - 1) {
+ this.setSelectedIndex(this.getSelectedIndex() + 1);
+ }
+ this.openMenu();
+ event.preventDefault();
+ };
+ /**
+ * Opens/closes the notched outline.
+ */
+ MDCSelectFoundation.prototype.notchOutline = function (openNotch) {
+ if (!this.adapter.hasOutline()) {
+ return;
+ }
+ var isFocused = this.adapter.hasClass(cssClasses$6.FOCUSED);
+ if (openNotch) {
+ var labelScale = numbers$5.LABEL_SCALE;
+ var labelWidth = this.adapter.getLabelWidth() * labelScale;
+ this.adapter.notchOutline(labelWidth);
+ }
+ else if (!isFocused) {
+ this.adapter.closeOutline();
+ }
+ };
+ /**
+ * Sets the aria label of the leading icon.
+ */
+ MDCSelectFoundation.prototype.setLeadingIconAriaLabel = function (label) {
+ if (this.leadingIcon) {
+ this.leadingIcon.setAriaLabel(label);
+ }
+ };
+ /**
+ * Sets the text content of the leading icon.
+ */
+ MDCSelectFoundation.prototype.setLeadingIconContent = function (content) {
+ if (this.leadingIcon) {
+ this.leadingIcon.setContent(content);
+ }
+ };
+ MDCSelectFoundation.prototype.getUseDefaultValidation = function () {
+ return this.useDefaultValidation;
+ };
+ MDCSelectFoundation.prototype.setUseDefaultValidation = function (useDefaultValidation) {
+ this.useDefaultValidation = useDefaultValidation;
+ };
+ MDCSelectFoundation.prototype.setValid = function (isValid) {
+ if (!this.useDefaultValidation) {
+ this.customValidity = isValid;
+ }
+ this.adapter.setSelectAnchorAttr('aria-invalid', (!isValid).toString());
+ if (isValid) {
+ this.adapter.removeClass(cssClasses$6.INVALID);
+ this.adapter.removeMenuClass(cssClasses$6.MENU_INVALID);
+ }
+ else {
+ this.adapter.addClass(cssClasses$6.INVALID);
+ this.adapter.addMenuClass(cssClasses$6.MENU_INVALID);
+ }
+ this.syncHelperTextValidity(isValid);
+ };
+ MDCSelectFoundation.prototype.isValid = function () {
+ if (this.useDefaultValidation &&
+ this.adapter.hasClass(cssClasses$6.REQUIRED) &&
+ !this.adapter.hasClass(cssClasses$6.DISABLED)) {
+ // See notes for required attribute under https://www.w3.org/TR/html52/sec-forms.html#the-select-element
+ // TL;DR: Invalid if no index is selected, or if the first index is selected and has an empty value.
+ return this.getSelectedIndex() !== numbers$5.UNSET_INDEX &&
+ (this.getSelectedIndex() !== 0 || Boolean(this.getValue()));
+ }
+ return this.customValidity;
+ };
+ MDCSelectFoundation.prototype.setRequired = function (isRequired) {
+ if (isRequired) {
+ this.adapter.addClass(cssClasses$6.REQUIRED);
+ }
+ else {
+ this.adapter.removeClass(cssClasses$6.REQUIRED);
+ }
+ this.adapter.setSelectAnchorAttr('aria-required', isRequired.toString());
+ this.adapter.setLabelRequired(isRequired);
+ };
+ MDCSelectFoundation.prototype.getRequired = function () {
+ return this.adapter.getSelectAnchorAttr('aria-required') === 'true';
+ };
+ MDCSelectFoundation.prototype.init = function () {
+ var anchorEl = this.adapter.getAnchorElement();
+ if (anchorEl) {
+ this.adapter.setMenuAnchorElement(anchorEl);
+ this.adapter.setMenuAnchorCorner(Corner.BOTTOM_START);
+ }
+ this.adapter.setMenuWrapFocus(false);
+ this.setDisabled(this.adapter.hasClass(cssClasses$6.DISABLED));
+ this.syncHelperTextValidity(!this.adapter.hasClass(cssClasses$6.INVALID));
+ this.layout();
+ this.layoutOptions();
+ };
+ /**
+ * Unfocuses the select component.
+ */
+ MDCSelectFoundation.prototype.blur = function () {
+ this.adapter.removeClass(cssClasses$6.FOCUSED);
+ this.layout();
+ this.adapter.deactivateBottomLine();
+ var isRequired = this.adapter.hasClass(cssClasses$6.REQUIRED);
+ if (isRequired && this.useDefaultValidation) {
+ this.setValid(this.isValid());
+ }
+ };
+ MDCSelectFoundation.prototype.syncHelperTextValidity = function (isValid) {
+ if (!this.helperText) {
+ return;
+ }
+ this.helperText.setValidity(isValid);
+ var helperTextVisible = this.helperText.isVisible();
+ var helperTextId = this.helperText.getId();
+ if (helperTextVisible && helperTextId) {
+ this.adapter.setSelectAnchorAttr(strings$5.ARIA_DESCRIBEDBY, helperTextId);
+ }
+ else {
+ // Needed because screenreaders will read labels pointed to by
+ // `aria-describedby` even if they are `aria-hidden`.
+ this.adapter.removeSelectAnchorAttr(strings$5.ARIA_DESCRIBEDBY);
+ }
+ };
+ MDCSelectFoundation.prototype.setClickDebounceTimeout = function () {
+ var _this = this;
+ clearTimeout(this.clickDebounceTimeout);
+ this.clickDebounceTimeout = setTimeout(function () {
+ _this.recentlyClicked = false;
+ }, numbers$5.CLICK_DEBOUNCE_TIMEOUT_MS);
+ this.recentlyClicked = true;
+ };
+ return MDCSelectFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCSelectFoundation$1 = MDCSelectFoundation;
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */
-const ni=e=>null!=e?e:V
+ */const l$1=l=>null!=l?l:A;
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */,ri=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class ai extends $e{constructor(){super(...arguments),this.mdcFoundationClass=ii,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=ri()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const e=this.menuElement;return e?e.selected:null}get index(){const e=this.menuElement;return e?e.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const e={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},t={"mdc-select__menu--invalid":!this.isUiValid},i=this.label?"label":void 0,n=this.shouldRenderHelperText?"helper-text":void 0;return P`
+ */
+const createValidityObj$1 = (customValidity = {}) => {
+ /*
+ * We need to make ValidityState an object because it is readonly and
+ * we cannot use the spread operator. Also, we don't export
+ * `CustomValidityState` because it is a leaky implementation and the user
+ * already has access to `ValidityState` in lib.dom.ts. Also an interface
+ * {a: Type} can be casted to {readonly a: Type} so passing any object
+ * should be fine.
+ */
+ const objectifiedCustomValidity = {};
+ // eslint-disable-next-line guard-for-in
+ for (const propName in customValidity) {
+ /*
+ * Casting is needed because ValidityState's props are all readonly and
+ * thus cannot be set on `onjectifiedCustomValidity`. In the end, the
+ * interface is the same as ValidityState (but not readonly), but the
+ * function signature casts the output to ValidityState (thus readonly).
+ */
+ objectifiedCustomValidity[propName] =
+ customValidity[propName];
+ }
+ return Object.assign({ badInput: false, customError: false, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false, stepMismatch: false, tooLong: false, tooShort: false, typeMismatch: false, valid: true, valueMissing: false }, objectifiedCustomValidity);
+};
+/**
+ * @fires selected {SelectedDetail}
+ * @fires action {ActionDetail}
+ * @fires opened
+ * @fires closed
+ * @fires change
+ * @fires invalid
+ */
+class SelectBase extends FormElement {
+ constructor() {
+ super(...arguments);
+ this.mdcFoundationClass = MDCSelectFoundation$1;
+ this.disabled = false;
+ this.outlined = false;
+ this.label = '';
+ this.outlineOpen = false;
+ this.outlineWidth = 0;
+ this.value = '';
+ this.name = '';
+ this.selectedText = '';
+ this.icon = '';
+ this.menuOpen = false;
+ this.helper = '';
+ this.validateOnInitialRender = false;
+ this.validationMessage = '';
+ this.required = false;
+ this.naturalMenuWidth = false;
+ this.isUiValid = true;
+ this.fixedMenuPosition = false;
+ // Transiently holds current typeahead prefix from user.
+ this.typeaheadState = initState();
+ this.sortedIndexByFirstChar = new Map();
+ this.menuElement_ = null;
+ this.listeners = [];
+ this.onBodyClickBound = () => undefined;
+ this._menuUpdateComplete = null;
+ this.valueSetDirectly = false;
+ this.validityTransform = null;
+ this._validity = createValidityObj$1();
+ }
+ get items() {
+ // memoize menuElement to prevent unnecessary querySelector calls.
+ if (!this.menuElement_) {
+ this.menuElement_ = this.menuElement;
+ }
+ if (this.menuElement_) {
+ return this.menuElement_.items;
+ }
+ return [];
+ }
+ get selected() {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ return menuElement.selected;
+ }
+ return null;
+ }
+ get index() {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ return menuElement.index;
+ }
+ return -1;
+ }
+ get shouldRenderHelperText() {
+ return !!this.helper || !!this.validationMessage;
+ }
+ get validity() {
+ this._checkValidity(this.value);
+ return this._validity;
+ }
+ render() {
+ const classes = {
+ 'mdc-select--disabled': this.disabled,
+ 'mdc-select--no-label': !this.label,
+ 'mdc-select--filled': !this.outlined,
+ 'mdc-select--outlined': this.outlined,
+ 'mdc-select--with-leading-icon': !!this.icon,
+ 'mdc-select--required': this.required,
+ 'mdc-select--invalid': !this.isUiValid,
+ };
+ const menuClasses = {
+ 'mdc-select__menu--invalid': !this.isUiValid,
+ };
+ const labelledby = !!this.label ? 'label' : undefined;
+ const describedby = this.shouldRenderHelperText ? 'helper-text' : undefined;
+ return x `
+ class="mdc-select ${o(classes)}">
null!=e?e:V
aria-expanded=${this.menuOpen}
aria-invalid=${!this.isUiValid}
aria-haspopup="listbox"
- aria-labelledby=${ni(i)}
+ aria-labelledby=${l$1(labelledby)}
aria-required=${this.required}
- aria-describedby=${ni(n)}
+ aria-describedby=${l$1(describedby)}
@click=${this.onClick}
@focus=${this.onFocus}
@blur=${this.onBlur}
@keydown=${this.onKeydown}>
${this.renderRipple()}
- ${this.outlined?this.renderOutline():this.renderLabel()}
+ ${this.outlined ? this.renderOutline() : this.renderLabel()}
${this.renderLeadingIcon()}
${this.selectedText}
@@ -410,9 +2332,9 @@ const ni=e=>null!=e?e:V
- ${this.renderHelperText()}`}renderRipple(){return this.outlined?V:P`
+ ${this.renderHelperText()}`;
+ }
+ renderRipple() {
+ if (this.outlined) {
+ return A;
+ }
+ return x `
- `}renderOutline(){return this.outlined?P`
+ `;
+ }
+ renderOutline() {
+ if (!this.outlined) {
+ return A;
+ }
+ return x `
${this.renderLabel()}
- `:V}renderLabel(){return this.label?P`
+ `;
+ }
+ renderLabel() {
+ if (!this.label) {
+ return A;
+ }
+ return x `
${this.label}
- `:V}renderLeadingIcon(){return this.icon?P`${this.icon}
`:V}renderLineRipple(){return this.outlined?V:P`
-
- `}renderHelperText(){if(!this.shouldRenderHelperText)return V;const e=this.validationMessage&&!this.isUiValid;return P`
+ `;
+ }
+ renderLeadingIcon() {
+ if (!this.icon) {
+ return A;
+ }
+ return x `${this.icon}
`;
+ }
+ renderLineRipple() {
+ if (this.outlined) {
+ return A;
+ }
+ return x `
+
+ `;
+ }
+ renderHelperText() {
+ if (!this.shouldRenderHelperText) {
+ return A;
+ }
+ const showValidationMessage = this.validationMessage && !this.isUiValid;
+ const classes = {
+ 'mdc-select-helper-text--validation-msg': showValidationMessage,
+ };
+ return x `
${e?this.validationMessage:this.helper}
`}createAdapter(){return Object.assign(Object.assign({},Ae(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map((e=>e.value))},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>zt(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},n=Pt(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=ri(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((e=>requestAnimationFrame(e))),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=Ht(this.items.length,(e=>this.items[e].text))}onItemsUpdated(){this.sortedIndexByFirstChar=Ht(this.items.length,(e=>this.items[e].text))}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i0,r=i&&this.index{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled},this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const n=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(n),!this.outlined)return;this.outlineOpen=n,await this.updateComplete;const r=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=r)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}n([he(".mdc-select")],ai.prototype,"mdcRoot",void 0),n([he(".formElement")],ai.prototype,"formElement",void 0),n([he("slot")],ai.prototype,"slotElement",void 0),n([he("select")],ai.prototype,"nativeSelectElement",void 0),n([he("input")],ai.prototype,"nativeInputElement",void 0),n([he(".mdc-line-ripple")],ai.prototype,"lineRippleElement",void 0),n([he(".mdc-floating-label")],ai.prototype,"labelElement",void 0),n([he("mwc-notched-outline")],ai.prototype,"outlineElement",void 0),n([he(".mdc-menu")],ai.prototype,"menuElement",void 0),n([he(".mdc-select__anchor")],ai.prototype,"anchorElement",void 0),n([se({type:Boolean,attribute:"disabled",reflect:!0}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)}))],ai.prototype,"disabled",void 0),n([se({type:Boolean}),Me((function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)}))],ai.prototype,"outlined",void 0),n([se({type:String}),Me((function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)}))],ai.prototype,"label",void 0),n([ce()],ai.prototype,"outlineOpen",void 0),n([ce()],ai.prototype,"outlineWidth",void 0),n([se({type:String}),Me((function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}}))],ai.prototype,"value",void 0),n([se()],ai.prototype,"name",void 0),n([ce()],ai.prototype,"selectedText",void 0),n([se({type:String})],ai.prototype,"icon",void 0),n([ce()],ai.prototype,"menuOpen",void 0),n([se({type:String})],ai.prototype,"helper",void 0),n([se({type:Boolean})],ai.prototype,"validateOnInitialRender",void 0),n([se({type:String})],ai.prototype,"validationMessage",void 0),n([se({type:Boolean})],ai.prototype,"required",void 0),n([se({type:Boolean})],ai.prototype,"naturalMenuWidth",void 0),n([ce()],ai.prototype,"isUiValid",void 0),n([se({type:Boolean})],ai.prototype,"fixedMenuPosition",void 0),n([pe({capture:!0})],ai.prototype,"handleTypeahead",null);
+ class="mdc-select-helper-text ${o(classes)}"
+ id="helper-text">${showValidationMessage ? this.validationMessage : this.helper}
`;
+ }
+ createAdapter() {
+ return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { activateBottomLine: () => {
+ if (this.lineRippleElement) {
+ this.lineRippleElement.lineRippleFoundation.activate();
+ }
+ }, deactivateBottomLine: () => {
+ if (this.lineRippleElement) {
+ this.lineRippleElement.lineRippleFoundation.deactivate();
+ }
+ }, hasLabel: () => {
+ return !!this.label;
+ }, floatLabel: (shouldFloat) => {
+ if (this.labelElement) {
+ this.labelElement.floatingLabelFoundation.float(shouldFloat);
+ }
+ }, getLabelWidth: () => {
+ if (this.labelElement) {
+ return this.labelElement.floatingLabelFoundation.getWidth();
+ }
+ return 0;
+ }, setLabelRequired: (isRequired) => {
+ if (this.labelElement) {
+ this.labelElement.floatingLabelFoundation.setRequired(isRequired);
+ }
+ }, hasOutline: () => this.outlined, notchOutline: (labelWidth) => {
+ const outlineElement = this.outlineElement;
+ if (outlineElement && !this.outlineOpen) {
+ this.outlineWidth = labelWidth;
+ this.outlineOpen = true;
+ }
+ }, closeOutline: () => {
+ if (this.outlineElement) {
+ this.outlineOpen = false;
+ }
+ }, setRippleCenter: (normalizedX) => {
+ if (this.lineRippleElement) {
+ const foundation = this.lineRippleElement.lineRippleFoundation;
+ foundation.setRippleCenter(normalizedX);
+ }
+ }, notifyChange: async (value) => {
+ if (!this.valueSetDirectly && value === this.value) {
+ return;
+ }
+ this.valueSetDirectly = false;
+ this.value = value;
+ await this.updateComplete;
+ const ev = new Event('change', { bubbles: true });
+ this.dispatchEvent(ev);
+ }, setSelectedText: (value) => this.selectedText = value, isSelectAnchorFocused: () => {
+ const selectAnchorElement = this.anchorElement;
+ if (!selectAnchorElement) {
+ return false;
+ }
+ const rootNode = selectAnchorElement.getRootNode();
+ return rootNode.activeElement === selectAnchorElement;
+ }, getSelectAnchorAttr: (attr) => {
+ const selectAnchorElement = this.anchorElement;
+ if (!selectAnchorElement) {
+ return null;
+ }
+ return selectAnchorElement.getAttribute(attr);
+ }, setSelectAnchorAttr: (attr, value) => {
+ const selectAnchorElement = this.anchorElement;
+ if (!selectAnchorElement) {
+ return;
+ }
+ selectAnchorElement.setAttribute(attr, value);
+ }, removeSelectAnchorAttr: (attr) => {
+ const selectAnchorElement = this.anchorElement;
+ if (!selectAnchorElement) {
+ return;
+ }
+ selectAnchorElement.removeAttribute(attr);
+ }, openMenu: () => {
+ this.menuOpen = true;
+ }, closeMenu: () => {
+ this.menuOpen = false;
+ }, addMenuClass: () => undefined, removeMenuClass: () => undefined, getAnchorElement: () => this.anchorElement, setMenuAnchorElement: () => {
+ /* Handled by anchor directive */
+ }, setMenuAnchorCorner: () => {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ menuElement.corner = 'BOTTOM_START';
+ }
+ }, setMenuWrapFocus: (wrapFocus) => {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ menuElement.wrapFocus = wrapFocus;
+ }
+ }, focusMenuItemAtIndex: (index) => {
+ const menuElement = this.menuElement;
+ if (!menuElement) {
+ return;
+ }
+ const element = menuElement.items[index];
+ if (!element) {
+ return;
+ }
+ element.focus();
+ }, getMenuItemCount: () => {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ return menuElement.items.length;
+ }
+ return 0;
+ }, getMenuItemValues: () => {
+ const menuElement = this.menuElement;
+ if (!menuElement) {
+ return [];
+ }
+ const items = menuElement.items;
+ return items.map((item) => item.value);
+ }, getMenuItemTextAtIndex: (index) => {
+ const menuElement = this.menuElement;
+ if (!menuElement) {
+ return '';
+ }
+ const element = menuElement.items[index];
+ if (!element) {
+ return '';
+ }
+ return element.text;
+ }, getSelectedIndex: () => this.index, setSelectedIndex: () => undefined, isTypeaheadInProgress: () => isTypingInProgress(this.typeaheadState), typeaheadMatchItem: (nextChar, startingIndex) => {
+ if (!this.menuElement) {
+ return -1;
+ }
+ const opts = {
+ focusItemAtIndex: (index) => {
+ this.menuElement.focusItemAtIndex(index);
+ },
+ focusedItemIndex: startingIndex ?
+ startingIndex :
+ this.menuElement.getFocusedItemIndex(),
+ nextChar,
+ sortedIndexByFirstChar: this.sortedIndexByFirstChar,
+ skipFocus: false,
+ isItemAtIndexDisabled: (index) => this.items[index].disabled,
+ };
+ const index = matchItem(opts, this.typeaheadState);
+ if (index !== -1) {
+ this.select(index);
+ }
+ return index;
+ } });
+ }
+ checkValidity() {
+ const isValid = this._checkValidity(this.value);
+ if (!isValid) {
+ const invalidEvent = new Event('invalid', { bubbles: false, cancelable: true });
+ this.dispatchEvent(invalidEvent);
+ }
+ return isValid;
+ }
+ reportValidity() {
+ const isValid = this.checkValidity();
+ this.isUiValid = isValid;
+ return isValid;
+ }
+ _checkValidity(value) {
+ const nativeValidity = this.formElement.validity;
+ let validity = createValidityObj$1(nativeValidity);
+ if (this.validityTransform) {
+ const customValidity = this.validityTransform(value, validity);
+ validity = Object.assign(Object.assign({}, validity), customValidity);
+ }
+ this._validity = validity;
+ return this._validity.valid;
+ }
+ setCustomValidity(message) {
+ this.validationMessage = message;
+ this.formElement.setCustomValidity(message);
+ }
+ // tslint:disable:ban-ts-ignore
+ async getUpdateComplete() {
+ await this._menuUpdateComplete;
+ // @ts-ignore
+ const result = await super.getUpdateComplete();
+ return result;
+ }
+ // tslint:enable:ban-ts-ignore
+ async firstUpdated() {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ this._menuUpdateComplete = menuElement.updateComplete;
+ await this._menuUpdateComplete;
+ }
+ super.firstUpdated();
+ this.mdcFoundation.isValid = () => true;
+ this.mdcFoundation.setValid = () => undefined;
+ this.mdcFoundation.setDisabled(this.disabled);
+ if (this.validateOnInitialRender) {
+ this.reportValidity();
+ }
+ // Select an option based on init value
+ if (!this.selected) {
+ if (!this.items.length && this.slotElement &&
+ this.slotElement.assignedNodes({ flatten: true }).length) {
+ // Shady DOM initial render fix
+ await new Promise((res) => requestAnimationFrame(res));
+ await this.layout();
+ }
+ const hasEmptyFirstOption = this.items.length && this.items[0].value === '';
+ if (!this.value && hasEmptyFirstOption) {
+ this.select(0);
+ return;
+ }
+ this.selectByValue(this.value);
+ }
+ this.sortedIndexByFirstChar = initSortedIndex(this.items.length, (index) => this.items[index].text);
+ }
+ onItemsUpdated() {
+ this.sortedIndexByFirstChar = initSortedIndex(this.items.length, (index) => this.items[index].text);
+ }
+ select(index) {
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ menuElement.select(index);
+ }
+ }
+ selectByValue(value) {
+ let indexToSelect = -1;
+ for (let i = 0; i < this.items.length; i++) {
+ const item = this.items[i];
+ if (item.value === value) {
+ indexToSelect = i;
+ break;
+ }
+ }
+ this.valueSetDirectly = true;
+ this.select(indexToSelect);
+ this.mdcFoundation.handleChange();
+ }
+ disconnectedCallback() {
+ super.disconnectedCallback();
+ for (const listener of this.listeners) {
+ listener.target.removeEventListener(listener.name, listener.cb);
+ }
+ }
+ focus() {
+ const focusEvt = new CustomEvent('focus');
+ const selectAnchorElement = this.anchorElement;
+ if (selectAnchorElement) {
+ selectAnchorElement.dispatchEvent(focusEvt);
+ selectAnchorElement.focus();
+ }
+ }
+ blur() {
+ const focusEvt = new CustomEvent('blur');
+ const selectAnchorElement = this.anchorElement;
+ if (selectAnchorElement) {
+ selectAnchorElement.dispatchEvent(focusEvt);
+ selectAnchorElement.blur();
+ }
+ }
+ onFocus() {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handleFocus();
+ }
+ }
+ onBlur() {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handleBlur();
+ }
+ const menuElement = this.menuElement;
+ if (menuElement && !menuElement.open) {
+ this.reportValidity();
+ }
+ }
+ onClick(evt) {
+ if (this.mdcFoundation) {
+ this.focus();
+ const targetClientRect = evt.target.getBoundingClientRect();
+ let xCoord = 0;
+ if ('touches' in evt) {
+ xCoord = evt.touches[0].clientX;
+ }
+ else {
+ xCoord = evt.clientX;
+ }
+ const normalizedX = xCoord - targetClientRect.left;
+ this.mdcFoundation.handleClick(normalizedX);
+ }
+ }
+ onKeydown(evt) {
+ const arrowUp = normalizeKey(evt) === KEY.ARROW_UP;
+ const arrowDown = normalizeKey(evt) === KEY.ARROW_DOWN;
+ if (arrowDown || arrowUp) {
+ const shouldSelectNextItem = arrowUp && this.index > 0;
+ const shouldSelectPrevItem = arrowDown && this.index < this.items.length - 1;
+ if (shouldSelectNextItem) {
+ this.select(this.index - 1);
+ }
+ else if (shouldSelectPrevItem) {
+ this.select(this.index + 1);
+ }
+ evt.preventDefault();
+ this.mdcFoundation.openMenu();
+ return;
+ }
+ this.mdcFoundation.handleKeydown(evt);
+ }
+ // must capture to run before list foundation captures event
+ handleTypeahead(event) {
+ if (!this.menuElement) {
+ return;
+ }
+ const focusedItemIndex = this.menuElement.getFocusedItemIndex();
+ const target = isNodeElement(event.target) ?
+ event.target :
+ null;
+ const isTargetListItem = target ? target.hasAttribute('mwc-list-item') : false;
+ const opts = {
+ event,
+ focusItemAtIndex: (index) => {
+ this.menuElement.focusItemAtIndex(index);
+ },
+ focusedItemIndex,
+ isTargetListItem,
+ sortedIndexByFirstChar: this.sortedIndexByFirstChar,
+ isItemAtIndexDisabled: (index) => this.items[index].disabled,
+ };
+ handleKeydown(opts, this.typeaheadState);
+ }
+ async onSelected(event) {
+ if (!this.mdcFoundation) {
+ await this.updateComplete;
+ }
+ this.mdcFoundation.handleMenuItemAction(event.detail.index);
+ const item = this.items[event.detail.index];
+ if (item) {
+ this.value = item.value;
+ }
+ }
+ onOpened() {
+ if (this.mdcFoundation) {
+ this.menuOpen = true;
+ this.mdcFoundation.handleMenuOpened();
+ }
+ }
+ onClosed() {
+ if (this.mdcFoundation) {
+ this.menuOpen = false;
+ this.mdcFoundation.handleMenuClosed();
+ }
+ }
+ setFormData(formData) {
+ if (this.name && this.selected !== null) {
+ formData.append(this.name, this.value);
+ }
+ }
+ async layout(updateItems = true) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.layout();
+ }
+ await this.updateComplete;
+ const menuElement = this.menuElement;
+ if (menuElement) {
+ menuElement.layout(updateItems);
+ }
+ const labelElement = this.labelElement;
+ if (!labelElement) {
+ this.outlineOpen = false;
+ return;
+ }
+ const shouldFloat = !!this.label && !!this.value;
+ labelElement.floatingLabelFoundation.float(shouldFloat);
+ if (!this.outlined) {
+ return;
+ }
+ this.outlineOpen = shouldFloat;
+ await this.updateComplete;
+ /* When the textfield automatically notches due to a value and label
+ * being defined, the textfield may be set to `display: none` by the user.
+ * this means that the notch is of size 0px. We provide this function so
+ * that the user may manually resize the notch to the floated label's
+ * width.
+ */
+ const labelWidth = labelElement.floatingLabelFoundation.getWidth();
+ if (this.outlineOpen) {
+ this.outlineWidth = labelWidth;
+ }
+ }
+ async layoutOptions() {
+ if (!this.mdcFoundation) {
+ return;
+ }
+ this.mdcFoundation.layoutOptions();
+ }
+}
+__decorate([
+ i$2('.mdc-select')
+], SelectBase.prototype, "mdcRoot", void 0);
+__decorate([
+ i$2('.formElement')
+], SelectBase.prototype, "formElement", void 0);
+__decorate([
+ i$2('slot')
+], SelectBase.prototype, "slotElement", void 0);
+__decorate([
+ i$2('select')
+], SelectBase.prototype, "nativeSelectElement", void 0);
+__decorate([
+ i$2('input')
+], SelectBase.prototype, "nativeInputElement", void 0);
+__decorate([
+ i$2('.mdc-line-ripple')
+], SelectBase.prototype, "lineRippleElement", void 0);
+__decorate([
+ i$2('.mdc-floating-label')
+], SelectBase.prototype, "labelElement", void 0);
+__decorate([
+ i$2('mwc-notched-outline')
+], SelectBase.prototype, "outlineElement", void 0);
+__decorate([
+ i$2('.mdc-menu')
+], SelectBase.prototype, "menuElement", void 0);
+__decorate([
+ i$2('.mdc-select__anchor')
+], SelectBase.prototype, "anchorElement", void 0);
+__decorate([
+ e$6({ type: Boolean, attribute: 'disabled', reflect: true }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.setDisabled(value);
+ }
+ })
+], SelectBase.prototype, "disabled", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (_newVal, oldVal) {
+ if (oldVal !== undefined && this.outlined !== oldVal) {
+ this.layout(false);
+ }
+ })
+], SelectBase.prototype, "outlined", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (_newVal, oldVal) {
+ if (oldVal !== undefined && this.label !== oldVal) {
+ this.layout(false);
+ }
+ })
+], SelectBase.prototype, "label", void 0);
+__decorate([
+ t$2()
+], SelectBase.prototype, "outlineOpen", void 0);
+__decorate([
+ t$2()
+], SelectBase.prototype, "outlineWidth", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ const initialization = this.selected === null && !!value;
+ const valueSetByUser = this.selected && this.selected.value !== value;
+ if (initialization || valueSetByUser) {
+ this.selectByValue(value);
+ }
+ this.reportValidity();
+ }
+ })
+], SelectBase.prototype, "value", void 0);
+__decorate([
+ e$6()
+], SelectBase.prototype, "name", void 0);
+__decorate([
+ t$2()
+], SelectBase.prototype, "selectedText", void 0);
+__decorate([
+ e$6({ type: String })
+], SelectBase.prototype, "icon", void 0);
+__decorate([
+ t$2()
+], SelectBase.prototype, "menuOpen", void 0);
+__decorate([
+ e$6({ type: String })
+], SelectBase.prototype, "helper", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], SelectBase.prototype, "validateOnInitialRender", void 0);
+__decorate([
+ e$6({ type: String })
+], SelectBase.prototype, "validationMessage", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], SelectBase.prototype, "required", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], SelectBase.prototype, "naturalMenuWidth", void 0);
+__decorate([
+ t$2()
+], SelectBase.prototype, "isUiValid", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], SelectBase.prototype, "fixedMenuPosition", void 0);
+__decorate([
+ e$5({ capture: true })
+], SelectBase.prototype, "handleTypeahead", null);
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-const oi=(e,t)=>e-t,di=["input","button","textarea","select"];function li(e){return e instanceof Set}const si=e=>{const t=e===Mt.UNSET_INDEX?new Set:e;return li(t)?new Set(t):new Set([t])};class ci extends ye{constructor(e){super(Object.assign(Object.assign({},ci.defaultAdapter),e)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=Mt.UNSET_INDEX,this.focusedItemIndex_=Mt.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return $t}static get numbers(){return Mt}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(e){this.wrapFocus_=e}setMulti(e){this.isMulti_=e;const t=this.selectedIndex_;if(e){if(!li(t)){const e=t===Mt.UNSET_INDEX;this.selectedIndex_=e?new Set:new Set([t])}}else if(li(t))if(t.size){const e=Array.from(t).sort(oi);this.selectedIndex_=e[0]}else this.selectedIndex_=Mt.UNSET_INDEX}setVerticalOrientation(e){this.isVertical_=e}setUseActivatedClass(e){this.useActivatedClass_=e}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(e){this.isIndexValid_(e)&&(this.isMulti_?this.setMultiSelectionAtIndex_(si(e)):this.setSingleSelectionAtIndex_(e))}handleFocusIn(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,0)}handleFocusOut(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,-1),setTimeout((()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()}),0)}handleKeydown(e,t,i){const n="ArrowLeft"===At(e),r="ArrowUp"===At(e),a="ArrowRight"===At(e),o="ArrowDown"===At(e),d="Home"===At(e),l="End"===At(e),s="Enter"===At(e),c="Spacebar"===At(e);if(this.adapter.isRootFocused())return void(r||l?(e.preventDefault(),this.focusLastElement()):(o||d)&&(e.preventDefault(),this.focusFirstElement()));let m,p=this.adapter.getFocusedElementIndex();if(!(-1===p&&(p=i,p<0))){if(this.isVertical_&&o||!this.isVertical_&&a)this.preventDefaultEvent(e),m=this.focusNextElement(p);else if(this.isVertical_&&r||!this.isVertical_&&n)this.preventDefaultEvent(e),m=this.focusPrevElement(p);else if(d)this.preventDefaultEvent(e),m=this.focusFirstElement();else if(l)this.preventDefaultEvent(e),m=this.focusLastElement();else if((s||c)&&t){const t=e.target;if(t&&"A"===t.tagName&&s)return;this.preventDefaultEvent(e),this.setSelectedIndexOnAction_(p,!0)}this.focusedItemIndex_=p,void 0!==m&&(this.setTabindexAtIndex_(m),this.focusedItemIndex_=m)}}handleSingleSelection(e,t,i){e!==Mt.UNSET_INDEX&&(this.setSelectedIndexOnAction_(e,t,i),this.setTabindexAtIndex_(e),this.focusedItemIndex_=e)}focusNextElement(e){let t=e+1;if(t>=this.adapter.getListItemCount()){if(!this.wrapFocus_)return e;t=0}return this.adapter.focusItemAtIndex(t),t}focusPrevElement(e){let t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-1}return this.adapter.focusItemAtIndex(t),t}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const e=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(e),e}setEnabled(e,t){this.isIndexValid_(e)&&this.adapter.setDisabledStateForElementIndex(e,!t)}preventDefaultEvent(e){const t=`${e.target.tagName}`.toLowerCase();-1===di.indexOf(t)&&e.preventDefault()}setSingleSelectionAtIndex_(e,t=!0){this.selectedIndex_!==e&&(this.selectedIndex_!==Mt.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0),this.setAriaForSingleSelectionAtIndex_(e),this.selectedIndex_=e,this.adapter.notifySelected(e))}setMultiSelectionAtIndex_(e,t=!0){const i=((e,t)=>{const i=Array.from(e),n=Array.from(t),r={added:[],removed:[]},a=i.sort(oi),o=n.sort(oi);let d=0,l=0;for(;d=0&&this.focusedItemIndex_!==e&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(e,0)}setTabindexToFirstSelectedItem_(){let e=0;"number"==typeof this.selectedIndex_&&this.selectedIndex_!==Mt.UNSET_INDEX?e=this.selectedIndex_:li(this.selectedIndex_)&&this.selectedIndex_.size>0&&(e=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(e)}isIndexValid_(e){if(e instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(0===e.size)return!0;{let t=!1;for(const i of e)if(t=this.isIndexInRange_(i),t)break;return t}}if("number"==typeof e){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return e===Mt.UNSET_INDEX||this.isIndexInRange_(e)}return!1}isIndexInRange_(e){const t=this.adapter.getListItemCount();return e>=0&&e {
+ return a - b;
+};
+const findIndexDiff = (oldSet, newSet) => {
+ const oldArr = Array.from(oldSet);
+ const newArr = Array.from(newSet);
+ const diff = { added: [], removed: [] };
+ const oldSorted = oldArr.sort(integerSort);
+ const newSorted = newArr.sort(integerSort);
+ let i = 0;
+ let j = 0;
+ while (i < oldSorted.length || j < newSorted.length) {
+ const oldVal = oldSorted[i];
+ const newVal = newSorted[j];
+ if (oldVal === newVal) {
+ i++;
+ j++;
+ continue;
+ }
+ if (oldVal !== undefined && (newVal === undefined || oldVal < newVal)) {
+ diff.removed.push(oldVal);
+ i++;
+ continue;
+ }
+ if (newVal !== undefined && (oldVal === undefined || newVal < oldVal)) {
+ diff.added.push(newVal);
+ j++;
+ continue;
+ }
+ }
+ return diff;
+};
+const ELEMENTS_KEY_ALLOWED_IN = ['input', 'button', 'textarea', 'select'];
+function isIndexSet(selectedIndex) {
+ return selectedIndex instanceof Set;
+}
+const createSetFromIndex = (index) => {
+ const entry = index === numbers$7.UNSET_INDEX ? new Set() : index;
+ return isIndexSet(entry) ? new Set(entry) : new Set([entry]);
+};
+class MDCListFoundation extends MDCFoundation {
+ constructor(adapter) {
+ super(Object.assign(Object.assign({}, MDCListFoundation.defaultAdapter), adapter));
+ this.isMulti_ = false;
+ this.wrapFocus_ = false;
+ this.isVertical_ = true;
+ this.selectedIndex_ = numbers$7.UNSET_INDEX;
+ this.focusedItemIndex_ = numbers$7.UNSET_INDEX;
+ this.useActivatedClass_ = false;
+ this.ariaCurrentAttrValue_ = null;
+ }
+ static get strings() {
+ return strings$7;
+ }
+ static get numbers() {
+ return numbers$7;
+ }
+ static get defaultAdapter() {
+ return {
+ focusItemAtIndex: () => undefined,
+ getFocusedElementIndex: () => 0,
+ getListItemCount: () => 0,
+ isFocusInsideList: () => false,
+ isRootFocused: () => false,
+ notifyAction: () => undefined,
+ notifySelected: () => undefined,
+ getSelectedStateForElementIndex: () => false,
+ setDisabledStateForElementIndex: () => undefined,
+ getDisabledStateForElementIndex: () => false,
+ setSelectedStateForElementIndex: () => undefined,
+ setActivatedStateForElementIndex: () => undefined,
+ setTabIndexForElementIndex: () => undefined,
+ setAttributeForElementIndex: () => undefined,
+ getAttributeForElementIndex: () => null,
+ };
+ }
+ /**
+ * Sets the private wrapFocus_ variable.
+ */
+ setWrapFocus(value) {
+ this.wrapFocus_ = value;
+ }
+ /**
+ * Sets the private wrapFocus_ variable.
+ */
+ setMulti(value) {
+ this.isMulti_ = value;
+ const currentIndex = this.selectedIndex_;
+ if (value) {
+ // number to set
+ if (!isIndexSet(currentIndex)) {
+ const isUnset = currentIndex === numbers$7.UNSET_INDEX;
+ this.selectedIndex_ = isUnset ? new Set() : new Set([currentIndex]);
+ }
+ }
+ else {
+ // set to first sorted number in set
+ if (isIndexSet(currentIndex)) {
+ if (currentIndex.size) {
+ const vals = Array.from(currentIndex).sort(integerSort);
+ this.selectedIndex_ = vals[0];
+ }
+ else {
+ this.selectedIndex_ = numbers$7.UNSET_INDEX;
+ }
+ }
+ }
+ }
+ /**
+ * Sets the isVertical_ private variable.
+ */
+ setVerticalOrientation(value) {
+ this.isVertical_ = value;
+ }
+ /**
+ * Sets the useActivatedClass_ private variable.
+ */
+ setUseActivatedClass(useActivated) {
+ this.useActivatedClass_ = useActivated;
+ }
+ getSelectedIndex() {
+ return this.selectedIndex_;
+ }
+ setSelectedIndex(index) {
+ if (!this.isIndexValid_(index)) {
+ return;
+ }
+ if (this.isMulti_) {
+ this.setMultiSelectionAtIndex_(createSetFromIndex(index));
+ }
+ else {
+ this.setSingleSelectionAtIndex_(index);
+ }
+ }
+ /**
+ * Focus in handler for the list items.
+ */
+ handleFocusIn(_, listItemIndex) {
+ if (listItemIndex >= 0) {
+ this.adapter.setTabIndexForElementIndex(listItemIndex, 0);
+ }
+ }
+ /**
+ * Focus out handler for the list items.
+ */
+ handleFocusOut(_, listItemIndex) {
+ if (listItemIndex >= 0) {
+ this.adapter.setTabIndexForElementIndex(listItemIndex, -1);
+ }
+ /**
+ * Between Focusout & Focusin some browsers do not have focus on any
+ * element. Setting a delay to wait till the focus is moved to next element.
+ */
+ setTimeout(() => {
+ if (!this.adapter.isFocusInsideList()) {
+ this.setTabindexToFirstSelectedItem_();
+ }
+ }, 0);
+ }
+ /**
+ * Key handler for the list.
+ */
+ handleKeydown(event, isRootListItem, listItemIndex) {
+ const isArrowLeft = normalizeKey(event) === 'ArrowLeft';
+ const isArrowUp = normalizeKey(event) === 'ArrowUp';
+ const isArrowRight = normalizeKey(event) === 'ArrowRight';
+ const isArrowDown = normalizeKey(event) === 'ArrowDown';
+ const isHome = normalizeKey(event) === 'Home';
+ const isEnd = normalizeKey(event) === 'End';
+ const isEnter = normalizeKey(event) === 'Enter';
+ const isSpace = normalizeKey(event) === 'Spacebar';
+ if (this.adapter.isRootFocused()) {
+ if (isArrowUp || isEnd) {
+ event.preventDefault();
+ this.focusLastElement();
+ }
+ else if (isArrowDown || isHome) {
+ event.preventDefault();
+ this.focusFirstElement();
+ }
+ return;
+ }
+ let currentIndex = this.adapter.getFocusedElementIndex();
+ if (currentIndex === -1) {
+ currentIndex = listItemIndex;
+ if (currentIndex < 0) {
+ // If this event doesn't have a mdc-deprecated-list-item ancestor from
+ // the current list (not from a sublist), return early.
+ return;
+ }
+ }
+ let nextIndex;
+ if ((this.isVertical_ && isArrowDown) ||
+ (!this.isVertical_ && isArrowRight)) {
+ this.preventDefaultEvent(event);
+ nextIndex = this.focusNextElement(currentIndex);
+ }
+ else if ((this.isVertical_ && isArrowUp) || (!this.isVertical_ && isArrowLeft)) {
+ this.preventDefaultEvent(event);
+ nextIndex = this.focusPrevElement(currentIndex);
+ }
+ else if (isHome) {
+ this.preventDefaultEvent(event);
+ nextIndex = this.focusFirstElement();
+ }
+ else if (isEnd) {
+ this.preventDefaultEvent(event);
+ nextIndex = this.focusLastElement();
+ }
+ else if (isEnter || isSpace) {
+ if (isRootListItem) {
+ // Return early if enter key is pressed on anchor element which triggers
+ // synthetic MouseEvent event.
+ const target = event.target;
+ if (target && target.tagName === 'A' && isEnter) {
+ return;
+ }
+ this.preventDefaultEvent(event);
+ this.setSelectedIndexOnAction_(currentIndex, true);
+ }
+ }
+ this.focusedItemIndex_ = currentIndex;
+ if (nextIndex !== undefined) {
+ this.setTabindexAtIndex_(nextIndex);
+ this.focusedItemIndex_ = nextIndex;
+ }
+ }
+ /**
+ * Click handler for the list.
+ */
+ handleSingleSelection(index, isInteraction, force) {
+ if (index === numbers$7.UNSET_INDEX) {
+ return;
+ }
+ this.setSelectedIndexOnAction_(index, isInteraction, force);
+ this.setTabindexAtIndex_(index);
+ this.focusedItemIndex_ = index;
+ }
+ /**
+ * Focuses the next element on the list.
+ */
+ focusNextElement(index) {
+ const count = this.adapter.getListItemCount();
+ let nextIndex = index + 1;
+ if (nextIndex >= count) {
+ if (this.wrapFocus_) {
+ nextIndex = 0;
+ }
+ else {
+ // Return early because last item is already focused.
+ return index;
+ }
+ }
+ this.adapter.focusItemAtIndex(nextIndex);
+ return nextIndex;
+ }
+ /**
+ * Focuses the previous element on the list.
+ */
+ focusPrevElement(index) {
+ let prevIndex = index - 1;
+ if (prevIndex < 0) {
+ if (this.wrapFocus_) {
+ prevIndex = this.adapter.getListItemCount() - 1;
+ }
+ else {
+ // Return early because first item is already focused.
+ return index;
+ }
+ }
+ this.adapter.focusItemAtIndex(prevIndex);
+ return prevIndex;
+ }
+ focusFirstElement() {
+ this.adapter.focusItemAtIndex(0);
+ return 0;
+ }
+ focusLastElement() {
+ const lastIndex = this.adapter.getListItemCount() - 1;
+ this.adapter.focusItemAtIndex(lastIndex);
+ return lastIndex;
+ }
+ /**
+ * @param itemIndex Index of the list item
+ * @param isEnabled Sets the list item to enabled or disabled.
+ */
+ setEnabled(itemIndex, isEnabled) {
+ if (!this.isIndexValid_(itemIndex)) {
+ return;
+ }
+ this.adapter.setDisabledStateForElementIndex(itemIndex, !isEnabled);
+ }
+ /**
+ * Ensures that preventDefault is only called if the containing element
+ * doesn't consume the event, and it will cause an unintended scroll.
+ */
+ preventDefaultEvent(evt) {
+ const target = evt.target;
+ const tagName = `${target.tagName}`.toLowerCase();
+ if (ELEMENTS_KEY_ALLOWED_IN.indexOf(tagName) === -1) {
+ evt.preventDefault();
+ }
+ }
+ setSingleSelectionAtIndex_(index, isInteraction = true) {
+ if (this.selectedIndex_ === index) {
+ return;
+ }
+ // unset previous
+ if (this.selectedIndex_ !== numbers$7.UNSET_INDEX) {
+ this.adapter.setSelectedStateForElementIndex(this.selectedIndex_, false);
+ if (this.useActivatedClass_) {
+ this.adapter.setActivatedStateForElementIndex(this.selectedIndex_, false);
+ }
+ }
+ // set new
+ if (isInteraction) {
+ this.adapter.setSelectedStateForElementIndex(index, true);
+ }
+ if (this.useActivatedClass_) {
+ this.adapter.setActivatedStateForElementIndex(index, true);
+ }
+ this.setAriaForSingleSelectionAtIndex_(index);
+ this.selectedIndex_ = index;
+ this.adapter.notifySelected(index);
+ }
+ setMultiSelectionAtIndex_(newIndex, isInteraction = true) {
+ const oldIndex = createSetFromIndex(this.selectedIndex_);
+ const diff = findIndexDiff(oldIndex, newIndex);
+ if (!diff.removed.length && !diff.added.length) {
+ return;
+ }
+ for (const removed of diff.removed) {
+ if (isInteraction) {
+ this.adapter.setSelectedStateForElementIndex(removed, false);
+ }
+ if (this.useActivatedClass_) {
+ this.adapter.setActivatedStateForElementIndex(removed, false);
+ }
+ }
+ for (const added of diff.added) {
+ if (isInteraction) {
+ this.adapter.setSelectedStateForElementIndex(added, true);
+ }
+ if (this.useActivatedClass_) {
+ this.adapter.setActivatedStateForElementIndex(added, true);
+ }
+ }
+ this.selectedIndex_ = newIndex;
+ this.adapter.notifySelected(newIndex, diff);
+ }
+ /**
+ * Sets aria attribute for single selection at given index.
+ */
+ setAriaForSingleSelectionAtIndex_(index) {
+ // Detect the presence of aria-current and get the value only during list
+ // initialization when it is in unset state.
+ if (this.selectedIndex_ === numbers$7.UNSET_INDEX) {
+ this.ariaCurrentAttrValue_ =
+ this.adapter.getAttributeForElementIndex(index, strings$7.ARIA_CURRENT);
+ }
+ const isAriaCurrent = this.ariaCurrentAttrValue_ !== null;
+ const ariaAttribute = isAriaCurrent ? strings$7.ARIA_CURRENT : strings$7.ARIA_SELECTED;
+ if (this.selectedIndex_ !== numbers$7.UNSET_INDEX) {
+ this.adapter.setAttributeForElementIndex(this.selectedIndex_, ariaAttribute, 'false');
+ }
+ const ariaAttributeValue = isAriaCurrent ? this.ariaCurrentAttrValue_ : 'true';
+ this.adapter.setAttributeForElementIndex(index, ariaAttribute, ariaAttributeValue);
+ }
+ setTabindexAtIndex_(index) {
+ if (this.focusedItemIndex_ === numbers$7.UNSET_INDEX && index !== 0) {
+ // If no list item was selected set first list item's tabindex to -1.
+ // Generally, tabindex is set to 0 on first list item of list that has no
+ // preselected items.
+ this.adapter.setTabIndexForElementIndex(0, -1);
+ }
+ else if (this.focusedItemIndex_ >= 0 && this.focusedItemIndex_ !== index) {
+ this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_, -1);
+ }
+ this.adapter.setTabIndexForElementIndex(index, 0);
+ }
+ setTabindexToFirstSelectedItem_() {
+ let targetIndex = 0;
+ if (typeof this.selectedIndex_ === 'number' &&
+ this.selectedIndex_ !== numbers$7.UNSET_INDEX) {
+ targetIndex = this.selectedIndex_;
+ }
+ else if (isIndexSet(this.selectedIndex_) && this.selectedIndex_.size > 0) {
+ targetIndex = Math.min(...this.selectedIndex_);
+ }
+ this.setTabindexAtIndex_(targetIndex);
+ }
+ isIndexValid_(index) {
+ if (index instanceof Set) {
+ if (!this.isMulti_) {
+ throw new Error('MDCListFoundation: Array of index is only supported for checkbox based list');
+ }
+ if (index.size === 0) {
+ return true;
+ }
+ else {
+ let isOneInRange = false;
+ for (const entry of index) {
+ isOneInRange = this.isIndexInRange_(entry);
+ if (isOneInRange) {
+ break;
+ }
+ }
+ return isOneInRange;
+ }
+ }
+ else if (typeof index === 'number') {
+ if (this.isMulti_) {
+ throw new Error('MDCListFoundation: Expected array of index for checkbox based list but got number: ' +
+ index);
+ }
+ return index === numbers$7.UNSET_INDEX || this.isIndexInRange_(index);
+ }
+ else {
+ return false;
+ }
+ }
+ isIndexInRange_(index) {
+ const listSize = this.adapter.getListItemCount();
+ return index >= 0 && index < listSize;
+ }
+ /**
+ * Sets selected index on user action, toggles checkbox / radio based on
+ * toggleCheckbox value. User interaction should not toggle list item(s) when
+ * disabled.
+ */
+ setSelectedIndexOnAction_(index, isInteraction, force) {
+ if (this.adapter.getDisabledStateForElementIndex(index)) {
+ return;
+ }
+ let checkedIndex = index;
+ if (this.isMulti_) {
+ checkedIndex = new Set([index]);
+ }
+ if (!this.isIndexValid_(checkedIndex)) {
+ return;
+ }
+ if (this.isMulti_) {
+ this.toggleMultiAtIndex(index, force, isInteraction);
+ }
+ else {
+ if (isInteraction || force) {
+ this.setSingleSelectionAtIndex_(index, isInteraction);
+ }
+ else {
+ const isDeselection = this.selectedIndex_ === index;
+ if (isDeselection) {
+ this.setSingleSelectionAtIndex_(numbers$7.UNSET_INDEX);
+ }
+ }
+ }
+ if (isInteraction) {
+ this.adapter.notifyAction(index);
+ }
+ }
+ toggleMultiAtIndex(index, force, isInteraction = true) {
+ let newSelectionValue = false;
+ if (force === undefined) {
+ newSelectionValue = !this.adapter.getSelectedStateForElementIndex(index);
+ }
+ else {
+ newSelectionValue = force;
+ }
+ const newSet = createSetFromIndex(this.selectedIndex_);
+ if (newSelectionValue) {
+ newSet.add(index);
+ }
+ else {
+ newSet.delete(index);
+ }
+ this.setMultiSelectionAtIndex_(newSet, isInteraction);
+ }
+}
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */const mi=e=>e.hasAttribute("mwc-list-item");function pi(){const e=this.itemsReadyResolver;this.itemsReady=new Promise((e=>this.itemsReadyResolver=e)),e()}class hi extends Oe{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=ci,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const e=function(e,t=50){let i;return function(n=!0){clearTimeout(i),i=setTimeout((()=>{e(n)}),t)}}(this.layout.bind(this));this.debouncedLayout=(t=!0)=>{pi.call(this),e(t)}}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.itemsReady,e}get items(){return this.items_}updateItems(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[],i=[];for(const e of t)mi(e)&&(i.push(e),e._managingList=this),e.hasAttribute("divider")&&!e.hasAttribute("role")&&e.setAttribute("role","separator");this.items_=i;const n=new Set;if(this.items_.forEach(((e,t)=>{this.itemRoles?e.setAttribute("role",this.itemRoles):e.removeAttribute("role"),e.selected&&n.add(t)})),this.multi)this.select(n);else{const e=n.size?n.entries().next().value[1]:-1;this.select(e)}const r=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(r)}get selected(){const e=this.index;if(!li(e))return-1===e?null:this.items[e];const t=[];for(const i of e)t.push(this.items[i]);return t}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const e=null===this.innerRole?void 0:this.innerRole,t=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return P`
+ */
+function debounceLayout(callback, waitInMS = 50) {
+ let timeoutId;
+ // tslint:disable-next-line
+ return function (updateItems = true) {
+ clearTimeout(timeoutId);
+ timeoutId = setTimeout(() => {
+ callback(updateItems);
+ }, waitInMS);
+ };
+}
+const isListItem = (element) => {
+ return element.hasAttribute('mwc-list-item');
+};
+function clearAndCreateItemsReadyPromise() {
+ const oldResolver = this.itemsReadyResolver;
+ this.itemsReady = new Promise((res) => {
+ // TODO(b/175626389): Type '(value: never[] | PromiseLike) => void'
+ // is not assignable to type '(value?: never[] | PromiseLike |
+ // undefined) => void'.
+ return this.itemsReadyResolver = res;
+ });
+ oldResolver();
+}
+/**
+ * @fires selected {SelectedDetail}
+ * @fires action {ActionDetail}
+ * @fires items-updated
+ */
+class ListBase extends BaseElement {
+ constructor() {
+ super();
+ this.mdcAdapter = null;
+ this.mdcFoundationClass = MDCListFoundation;
+ this.activatable = false;
+ this.multi = false;
+ this.wrapFocus = false;
+ this.itemRoles = null;
+ this.innerRole = null;
+ this.innerAriaLabel = null;
+ this.rootTabbable = false;
+ this.previousTabindex = null;
+ this.noninteractive = false;
+ this.itemsReadyResolver = (() => {
+ //
+ });
+ this.itemsReady = Promise.resolve([]);
+ // tslint:enable:ban-ts-ignore
+ this.items_ = [];
+ const debouncedFunction = debounceLayout(this.layout.bind(this));
+ this.debouncedLayout = (updateItems = true) => {
+ clearAndCreateItemsReadyPromise.call(this);
+ debouncedFunction(updateItems);
+ };
+ }
+ // tslint:disable:ban-ts-ignore
+ async getUpdateComplete() {
+ // @ts-ignore
+ const result = await super.getUpdateComplete();
+ await this.itemsReady;
+ return result;
+ }
+ get items() {
+ return this.items_;
+ }
+ updateItems() {
+ var _a;
+ const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : [];
+ const listItems = [];
+ for (const node of nodes) {
+ if (isListItem(node)) {
+ listItems.push(node);
+ node._managingList = this;
+ }
+ if (node.hasAttribute('divider') && !node.hasAttribute('role')) {
+ node.setAttribute('role', 'separator');
+ }
+ }
+ this.items_ = listItems;
+ const selectedIndices = new Set();
+ this.items_.forEach((item, index) => {
+ if (this.itemRoles) {
+ item.setAttribute('role', this.itemRoles);
+ }
+ else {
+ item.removeAttribute('role');
+ }
+ if (item.selected) {
+ selectedIndices.add(index);
+ }
+ });
+ if (this.multi) {
+ this.select(selectedIndices);
+ }
+ else {
+ const index = selectedIndices.size ? selectedIndices.entries().next().value[1] : -1;
+ this.select(index);
+ }
+ const itemsUpdatedEv = new Event('items-updated', { bubbles: true, composed: true });
+ this.dispatchEvent(itemsUpdatedEv);
+ }
+ get selected() {
+ const index = this.index;
+ if (!isIndexSet(index)) {
+ if (index === -1) {
+ return null;
+ }
+ return this.items[index];
+ }
+ const selected = [];
+ for (const entry of index) {
+ selected.push(this.items[entry]);
+ }
+ return selected;
+ }
+ get index() {
+ if (this.mdcFoundation) {
+ return this.mdcFoundation.getSelectedIndex();
+ }
+ return -1;
+ }
+ render() {
+ const role = this.innerRole === null ? undefined : this.innerRole;
+ const ariaLabel = this.innerAriaLabel === null ? undefined : this.innerAriaLabel;
+ const tabindex = this.rootTabbable ? '0' : '-1';
+ return x `
e-t,di=["input","button","textarea","select"];function li(e){ret
${this.renderPlaceholder()}
- `}renderPlaceholder(){var e;const t=null!==(e=this.assignedElements)&&void 0!==e?e:[];return void 0!==this.emptyMessage&&0===t.length?P`
+ `;
+ }
+ renderPlaceholder() {
+ var _a;
+ const nodes = (_a = this.assignedElements) !== null && _a !== void 0 ? _a : [];
+ if (this.emptyMessage !== undefined && nodes.length === 0) {
+ return x `
${this.emptyMessage}
- `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusIn(e,t)}}onFocusOut(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusOut(e,t)}}onKeydown(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e),i=e.target,n=mi(i);this.mdcFoundation.handleKeydown(e,n,t)}}onRequestSelected(e){if(this.mdcFoundation){let t=this.getIndexOfTarget(e);if(-1===t&&(this.layout(),t=this.getIndexOfTarget(e),-1===t))return;if(this.items[t].disabled)return;const i=e.detail.selected,n=e.detail.source;this.mdcFoundation.handleSingleSelection(t,"interaction"===n,i),e.stopPropagation()}}getIndexOfTarget(e){const t=this.items,i=e.composedPath();for(const e of i){let i=-1;if(Ie(e)&&mi(e)&&(i=t.indexOf(e)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(e,t)=>{if(!this.mdcRoot)return"";const i=this.items[e];return i?i.getAttribute(t):""},setAttributeForElementIndex:(e,t,i)=>{if(!this.mdcRoot)return;const n=this.items[e];n&&n.setAttribute(t,i)},focusItemAtIndex:e=>{const t=this.items[e];t&&t.focus()},setTabIndexForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.tabindex=t)},notifyAction:e=>{const t={bubbles:!0,composed:!0};t.detail={index:e};const i=new CustomEvent("action",t);this.dispatchEvent(i)},notifySelected:(e,t)=>{const i={bubbles:!0,composed:!0};i.detail={index:e,diff:t};const n=new CustomEvent("selected",i);this.dispatchEvent(n)},isFocusInsideList:()=>ke(this),isRootFocused:()=>{const e=this.mdcRoot;return e.getRootNode().activeElement===e},setDisabledStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.disabled=t)},getDisabledStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.disabled},setSelectedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.selected=t)},getSelectedStateForElementIndex:e=>{const t=this.items[e];return!!t&&t.selected},setActivatedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.activated=t)}},this.mdcAdapter}selectUi(e,t=!1){const i=this.items[e];i&&(i.selected=!0,i.activated=t)}deselectUi(e){const t=this.items[e];t&&(t.selected=!1,t.activated=!1)}select(e){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(e)}toggle(e,t){this.multi&&this.mdcFoundation.toggleMultiAtIndex(e,t)}onListItemConnected(e){const t=e.target;this.layout(-1===this.items.indexOf(t))}layout(e=!0){e&&this.updateItems();const t=this.items[0];for(const e of this.items)e.tabindex=-1;t&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=t):t.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const e=Re();if(!e.length)return-1;for(let t=e.length-1;t>=0;t--){const i=e[t];if(mi(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(e){for(const e of this.items)if(0===e.tabindex){e.tabindex=-1;break}this.items[e].tabindex=0,this.items[e].focus()}focus(){const e=this.mdcRoot;e&&e.focus()}blur(){const e=this.mdcRoot;e&&e.blur()}}n([se({type:String})],hi.prototype,"emptyMessage",void 0),n([he(".mdc-deprecated-list")],hi.prototype,"mdcRoot",void 0),n([be("",!0,"*")],hi.prototype,"assignedElements",void 0),n([be("",!0,'[tabindex="0"]')],hi.prototype,"tabbableElements",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(e)}))],hi.prototype,"activatable",void 0),n([se({type:Boolean}),Me((function(e,t){this.mdcFoundation&&this.mdcFoundation.setMulti(e),void 0!==t&&this.layout()}))],hi.prototype,"multi",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(e)}))],hi.prototype,"wrapFocus",void 0),n([se({type:String}),Me((function(e,t){void 0!==t&&this.updateItems()}))],hi.prototype,"itemRoles",void 0),n([se({type:String})],hi.prototype,"innerRole",void 0),n([se({type:String})],hi.prototype,"innerAriaLabel",void 0),n([se({type:Boolean})],hi.prototype,"rootTabbable",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){var t,i;if(e){const e=null!==(i=null===(t=this.tabbableElements)||void 0===t?void 0:t[0])&&void 0!==i?i:null;this.previousTabindex=e,e&&e.setAttribute("tabindex","-1")}else!e&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],hi.prototype,"noninteractive",void 0);
+ `;
+ }
+ return null;
+ }
+ firstUpdated() {
+ super.firstUpdated();
+ if (!this.items.length) {
+ // required because this is called before observers
+ this.mdcFoundation.setMulti(this.multi);
+ // for when children upgrade before list
+ this.layout();
+ }
+ }
+ onFocusIn(evt) {
+ if (this.mdcFoundation && this.mdcRoot) {
+ const index = this.getIndexOfTarget(evt);
+ this.mdcFoundation.handleFocusIn(evt, index);
+ }
+ }
+ onFocusOut(evt) {
+ if (this.mdcFoundation && this.mdcRoot) {
+ const index = this.getIndexOfTarget(evt);
+ this.mdcFoundation.handleFocusOut(evt, index);
+ }
+ }
+ onKeydown(evt) {
+ if (this.mdcFoundation && this.mdcRoot) {
+ const index = this.getIndexOfTarget(evt);
+ const target = evt.target;
+ const isRootListItem = isListItem(target);
+ this.mdcFoundation.handleKeydown(evt, isRootListItem, index);
+ }
+ }
+ onRequestSelected(evt) {
+ if (this.mdcFoundation) {
+ let index = this.getIndexOfTarget(evt);
+ // might happen in shady dom slowness. Recalc children
+ if (index === -1) {
+ this.layout();
+ index = this.getIndexOfTarget(evt);
+ // still not found; may not be mwc-list-item. Unsupported case.
+ if (index === -1) {
+ return;
+ }
+ }
+ const element = this.items[index];
+ if (element.disabled) {
+ return;
+ }
+ const selected = evt.detail.selected;
+ const source = evt.detail.source;
+ this.mdcFoundation.handleSingleSelection(index, source === 'interaction', selected);
+ evt.stopPropagation();
+ }
+ }
+ getIndexOfTarget(evt) {
+ const elements = this.items;
+ const path = evt.composedPath();
+ for (const pathItem of path) {
+ let index = -1;
+ if (isNodeElement(pathItem) && isListItem(pathItem)) {
+ index = elements.indexOf(pathItem);
+ }
+ if (index !== -1) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ createAdapter() {
+ this.mdcAdapter = {
+ getListItemCount: () => {
+ if (this.mdcRoot) {
+ return this.items.length;
+ }
+ return 0;
+ },
+ getFocusedElementIndex: this.getFocusedItemIndex,
+ getAttributeForElementIndex: (index, attr) => {
+ const listElement = this.mdcRoot;
+ if (!listElement) {
+ return '';
+ }
+ const element = this.items[index];
+ return element ? element.getAttribute(attr) : '';
+ },
+ setAttributeForElementIndex: (index, attr, val) => {
+ if (!this.mdcRoot) {
+ return;
+ }
+ const element = this.items[index];
+ if (element) {
+ element.setAttribute(attr, val);
+ }
+ },
+ focusItemAtIndex: (index) => {
+ const element = this.items[index];
+ if (element) {
+ element.focus();
+ }
+ },
+ setTabIndexForElementIndex: (index, value) => {
+ const item = this.items[index];
+ if (item) {
+ item.tabindex = value;
+ }
+ },
+ notifyAction: (index) => {
+ const init = { bubbles: true, composed: true };
+ init.detail = { index };
+ const ev = new CustomEvent('action', init);
+ this.dispatchEvent(ev);
+ },
+ notifySelected: (index, diff) => {
+ const init = { bubbles: true, composed: true };
+ init.detail = { index, diff };
+ const ev = new CustomEvent('selected', init);
+ this.dispatchEvent(ev);
+ },
+ isFocusInsideList: () => {
+ return doesElementContainFocus(this);
+ },
+ isRootFocused: () => {
+ const mdcRoot = this.mdcRoot;
+ const root = mdcRoot.getRootNode();
+ return root.activeElement === mdcRoot;
+ },
+ setDisabledStateForElementIndex: (index, value) => {
+ const item = this.items[index];
+ if (!item) {
+ return;
+ }
+ item.disabled = value;
+ },
+ getDisabledStateForElementIndex: (index) => {
+ const item = this.items[index];
+ if (!item) {
+ return false;
+ }
+ return item.disabled;
+ },
+ setSelectedStateForElementIndex: (index, value) => {
+ const item = this.items[index];
+ if (!item) {
+ return;
+ }
+ item.selected = value;
+ },
+ getSelectedStateForElementIndex: (index) => {
+ const item = this.items[index];
+ if (!item) {
+ return false;
+ }
+ return item.selected;
+ },
+ setActivatedStateForElementIndex: (index, value) => {
+ const item = this.items[index];
+ if (!item) {
+ return;
+ }
+ item.activated = value;
+ },
+ };
+ return this.mdcAdapter;
+ }
+ selectUi(index, activate = false) {
+ const item = this.items[index];
+ if (item) {
+ item.selected = true;
+ item.activated = activate;
+ }
+ }
+ deselectUi(index) {
+ const item = this.items[index];
+ if (item) {
+ item.selected = false;
+ item.activated = false;
+ }
+ }
+ select(index) {
+ if (!this.mdcFoundation) {
+ return;
+ }
+ this.mdcFoundation.setSelectedIndex(index);
+ }
+ toggle(index, force) {
+ if (this.multi) {
+ this.mdcFoundation.toggleMultiAtIndex(index, force);
+ }
+ }
+ onListItemConnected(e) {
+ const target = e.target;
+ this.layout(this.items.indexOf(target) === -1);
+ }
+ layout(updateItems = true) {
+ if (updateItems) {
+ this.updateItems();
+ }
+ const first = this.items[0];
+ for (const item of this.items) {
+ item.tabindex = -1;
+ }
+ if (first) {
+ if (this.noninteractive) {
+ if (!this.previousTabindex) {
+ this.previousTabindex = first;
+ }
+ }
+ else {
+ first.tabindex = 0;
+ }
+ }
+ this.itemsReadyResolver();
+ }
+ getFocusedItemIndex() {
+ if (!this.mdcRoot) {
+ return -1;
+ }
+ if (!this.items.length) {
+ return -1;
+ }
+ const activeElementPath = deepActiveElementPath();
+ if (!activeElementPath.length) {
+ return -1;
+ }
+ for (let i = activeElementPath.length - 1; i >= 0; i--) {
+ const activeItem = activeElementPath[i];
+ if (isListItem(activeItem)) {
+ return this.items.indexOf(activeItem);
+ }
+ }
+ return -1;
+ }
+ focusItemAtIndex(index) {
+ for (const item of this.items) {
+ if (item.tabindex === 0) {
+ item.tabindex = -1;
+ break;
+ }
+ }
+ this.items[index].tabindex = 0;
+ this.items[index].focus();
+ }
+ focus() {
+ const root = this.mdcRoot;
+ if (root) {
+ root.focus();
+ }
+ }
+ blur() {
+ const root = this.mdcRoot;
+ if (root) {
+ root.blur();
+ }
+ }
+}
+__decorate([
+ e$6({ type: String })
+], ListBase.prototype, "emptyMessage", void 0);
+__decorate([
+ i$2('.mdc-deprecated-list')
+], ListBase.prototype, "mdcRoot", void 0);
+__decorate([
+ o$1('', true, '*')
+], ListBase.prototype, "assignedElements", void 0);
+__decorate([
+ o$1('', true, '[tabindex="0"]')
+], ListBase.prototype, "tabbableElements", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.setUseActivatedClass(value);
+ }
+ })
+], ListBase.prototype, "activatable", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (newValue, oldValue) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.setMulti(newValue);
+ }
+ if (oldValue !== undefined) {
+ this.layout();
+ }
+ })
+], ListBase.prototype, "multi", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.setWrapFocus(value);
+ }
+ })
+], ListBase.prototype, "wrapFocus", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (_newValue, oldValue) {
+ if (oldValue !== undefined) {
+ this.updateItems();
+ }
+ })
+], ListBase.prototype, "itemRoles", void 0);
+__decorate([
+ e$6({ type: String })
+], ListBase.prototype, "innerRole", void 0);
+__decorate([
+ e$6({ type: String })
+], ListBase.prototype, "innerAriaLabel", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], ListBase.prototype, "rootTabbable", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true }),
+ observer(function (value) {
+ var _a, _b;
+ if (value) {
+ const tabbable = (_b = (_a = this.tabbableElements) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null;
+ this.previousTabindex = tabbable;
+ if (tabbable) {
+ tabbable.setAttribute('tabindex', '-1');
+ }
+ }
+ else if (!value && this.previousTabindex) {
+ this.previousTabindex.setAttribute('tabindex', '0');
+ this.previousTabindex = null;
+ }
+ })
+], ListBase.prototype, "noninteractive", void 0);
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class ui{constructor(e){this.startPress=t=>{e().then((e=>{e&&e.startPress(t)}))},this.endPress=()=>{e().then((e=>{e&&e.endPress()}))},this.startFocus=()=>{e().then((e=>{e&&e.startFocus()}))},this.endFocus=()=>{e().then((e=>{e&&e.endFocus()}))},this.startHover=()=>{e().then((e=>{e&&e.startHover()}))},this.endHover=()=>{e().then((e=>{e&&e.endHover()}))}}}
+/**
+ * Class that encapsulates the events handlers for `mwc-ripple`
+ *
+ *
+ * Example:
+ * ```
+ * class XFoo extends LitElement {
+ * async getRipple() {
+ * this.renderRipple = true;
+ * await this.updateComplete;
+ * return this.renderRoot.querySelector('mwc-ripple');
+ * }
+ * rippleHandlers = new RippleHandlers(() => this.getRipple());
+ *
+ * render() {
+ * return html`
+ *
+ * ${this.renderRipple ? html` ` : ''}
+ * `;
+ * }
+ * }
+ * ```
+ */
+class RippleHandlers {
+ constructor(
+ /** Function that returns a `mwc-ripple` */
+ rippleFn) {
+ this.startPress = (ev) => {
+ rippleFn().then((r) => {
+ r && r.startPress(ev);
+ });
+ };
+ this.endPress = () => {
+ rippleFn().then((r) => {
+ r && r.endPress();
+ });
+ };
+ this.startFocus = () => {
+ rippleFn().then((r) => {
+ r && r.startFocus();
+ });
+ };
+ this.endFocus = () => {
+ rippleFn().then((r) => {
+ r && r.endFocus();
+ });
+ };
+ this.startHover = () => {
+ rippleFn().then((r) => {
+ r && r.startHover();
+ });
+ };
+ this.endHover = () => {
+ rippleFn().then((r) => {
+ r && r.endHover();
+ });
+ };
+ }
+}
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */class fi extends ae{constructor(){super(...arguments),this.value="",this.group=null,this.tabindex=-1,this.disabled=!1,this.twoline=!1,this.activated=!1,this.graphic=null,this.multipleGraphics=!1,this.hasMeta=!1,this.noninteractive=!1,this.selected=!1,this.shouldRenderRipple=!1,this._managingList=null,this.boundOnClick=this.onClick.bind(this),this._firstChanged=!0,this._skipPropRequest=!1,this.rippleHandlers=new ui((()=>(this.shouldRenderRipple=!0,this.ripple))),this.listeners=[{target:this,eventNames:["click"],cb:()=>{this.onClick()}},{target:this,eventNames:["mouseenter"],cb:this.rippleHandlers.startHover},{target:this,eventNames:["mouseleave"],cb:this.rippleHandlers.endHover},{target:this,eventNames:["focus"],cb:this.rippleHandlers.startFocus},{target:this,eventNames:["blur"],cb:this.rippleHandlers.endFocus},{target:this,eventNames:["mousedown","touchstart"],cb:e=>{const t=e.type;this.onDown("mousedown"===t?"mouseup":"touchend",e)}}]}get text(){const e=this.textContent;return e?e.trim():""}render(){const e=this.renderText(),t=this.graphic?this.renderGraphic():P``,i=this.hasMeta?this.renderMeta():P``;return P`
+ */
+/**
+ * @fires request-selected {RequestSelectedDetail}
+ * @fires list-item-rendered
+ */
+class ListItemBase extends s$1 {
+ constructor() {
+ super(...arguments);
+ this.value = '';
+ this.group = null;
+ this.tabindex = -1;
+ this.disabled = false;
+ this.twoline = false;
+ this.activated = false;
+ this.graphic = null;
+ this.multipleGraphics = false;
+ this.hasMeta = false;
+ this.noninteractive = false;
+ this.selected = false;
+ this.shouldRenderRipple = false;
+ this._managingList = null;
+ this.boundOnClick = this.onClick.bind(this);
+ this._firstChanged = true;
+ this._skipPropRequest = false;
+ this.rippleHandlers = new RippleHandlers(() => {
+ this.shouldRenderRipple = true;
+ return this.ripple;
+ });
+ this.listeners = [
+ {
+ target: this,
+ eventNames: ['click'],
+ cb: () => {
+ this.onClick();
+ },
+ },
+ {
+ target: this,
+ eventNames: ['mouseenter'],
+ cb: this.rippleHandlers.startHover,
+ },
+ {
+ target: this,
+ eventNames: ['mouseleave'],
+ cb: this.rippleHandlers.endHover,
+ },
+ {
+ target: this,
+ eventNames: ['focus'],
+ cb: this.rippleHandlers.startFocus,
+ },
+ {
+ target: this,
+ eventNames: ['blur'],
+ cb: this.rippleHandlers.endFocus,
+ },
+ {
+ target: this,
+ eventNames: ['mousedown', 'touchstart'],
+ cb: (e) => {
+ const name = e.type;
+ this.onDown(name === 'mousedown' ? 'mouseup' : 'touchend', e);
+ },
+ },
+ ];
+ }
+ get text() {
+ const textContent = this.textContent;
+ return textContent ? textContent.trim() : '';
+ }
+ render() {
+ const text = this.renderText();
+ const graphic = this.graphic ? this.renderGraphic() : x ``;
+ const meta = this.hasMeta ? this.renderMeta() : x ``;
+ return x `
${this.renderRipple()}
- ${t}
- ${e}
- ${i}`}renderRipple(){return this.shouldRenderRipple?P`
+ ${graphic}
+ ${text}
+ ${meta}`;
+ }
+ renderRipple() {
+ if (this.shouldRenderRipple) {
+ return x `
- `:this.activated?P`
`:""}renderGraphic(){const e={multi:this.multipleGraphics};return P`
-
+ `;
+ }
+ else if (this.activated) {
+ return x `
`;
+ }
+ else {
+ return '';
+ }
+ }
+ renderGraphic() {
+ const graphicClasses = {
+ multi: this.multipleGraphics,
+ };
+ return x `
+
- `}renderMeta(){return P`
+ `;
+ }
+ renderMeta() {
+ return x `
- `}renderText(){const e=this.twoline?this.renderTwoline():this.renderSingleLine();return P`
+ `;
+ }
+ renderText() {
+ const inner = this.twoline ? this.renderTwoline() : this.renderSingleLine();
+ return x `
- ${e}
- `}renderSingleLine(){return P` `}renderTwoline(){return P`
+ ${inner}
+ `;
+ }
+ renderSingleLine() {
+ return x ` `;
+ }
+ renderTwoline() {
+ return x `
- `}onClick(){this.fireRequestSelected(!this.selected,"interaction")}onDown(e,t){const i=()=>{window.removeEventListener(e,i),this.rippleHandlers.endPress()};window.addEventListener(e,i),this.rippleHandlers.startPress(t)}fireRequestSelected(e,t){if(this.noninteractive)return;const i=new CustomEvent("request-selected",{bubbles:!0,composed:!0,detail:{source:t,selected:e}});this.dispatchEvent(i)}connectedCallback(){super.connectedCallback(),this.noninteractive||this.setAttribute("mwc-list-item","");for(const e of this.listeners)for(const t of e.eventNames)e.target.addEventListener(t,e.cb,{passive:!0})}disconnectedCallback(){super.disconnectedCallback();for(const e of this.listeners)for(const t of e.eventNames)e.target.removeEventListener(t,e.cb);this._managingList&&(this._managingList.debouncedLayout?this._managingList.debouncedLayout(!0):this._managingList.layout(!0))}firstUpdated(){const e=new Event("list-item-rendered",{bubbles:!0,composed:!0});this.dispatchEvent(e)}}n([he("slot")],fi.prototype,"slotElement",void 0),n([ue("mwc-ripple")],fi.prototype,"ripple",void 0),n([se({type:String})],fi.prototype,"value",void 0),n([se({type:String,reflect:!0})],fi.prototype,"group",void 0),n([se({type:Number,reflect:!0})],fi.prototype,"tabindex",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){e?this.setAttribute("aria-disabled","true"):this.setAttribute("aria-disabled","false")}))],fi.prototype,"disabled",void 0),n([se({type:Boolean,reflect:!0})],fi.prototype,"twoline",void 0),n([se({type:Boolean,reflect:!0})],fi.prototype,"activated",void 0),n([se({type:String,reflect:!0})],fi.prototype,"graphic",void 0),n([se({type:Boolean})],fi.prototype,"multipleGraphics",void 0),n([se({type:Boolean})],fi.prototype,"hasMeta",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){e?(this.removeAttribute("aria-checked"),this.removeAttribute("mwc-list-item"),this.selected=!1,this.activated=!1,this.tabIndex=-1):this.setAttribute("mwc-list-item","")}))],fi.prototype,"noninteractive",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e){const t=this.getAttribute("role"),i="gridcell"===t||"option"===t||"row"===t||"tab"===t;i&&e?this.setAttribute("aria-selected","true"):i&&this.setAttribute("aria-selected","false"),this._firstChanged?this._firstChanged=!1:this._skipPropRequest||this.fireRequestSelected(e,"property")}))],fi.prototype,"selected",void 0),n([ce()],fi.prototype,"shouldRenderRipple",void 0),n([ce()],fi.prototype,"_managingList",void 0);
+ `;
+ }
+ onClick() {
+ this.fireRequestSelected(!this.selected, 'interaction');
+ }
+ onDown(upName, evt) {
+ const onUp = () => {
+ window.removeEventListener(upName, onUp);
+ this.rippleHandlers.endPress();
+ };
+ window.addEventListener(upName, onUp);
+ this.rippleHandlers.startPress(evt);
+ }
+ fireRequestSelected(selected, source) {
+ if (this.noninteractive) {
+ return;
+ }
+ const customEv = new CustomEvent('request-selected', { bubbles: true, composed: true, detail: { source, selected } });
+ this.dispatchEvent(customEv);
+ }
+ connectedCallback() {
+ super.connectedCallback();
+ if (!this.noninteractive) {
+ this.setAttribute('mwc-list-item', '');
+ }
+ for (const listener of this.listeners) {
+ for (const eventName of listener.eventNames) {
+ listener.target.addEventListener(eventName, listener.cb, { passive: true });
+ }
+ }
+ }
+ disconnectedCallback() {
+ super.disconnectedCallback();
+ for (const listener of this.listeners) {
+ for (const eventName of listener.eventNames) {
+ listener.target.removeEventListener(eventName, listener.cb);
+ }
+ }
+ if (this._managingList) {
+ this._managingList.debouncedLayout ?
+ this._managingList.debouncedLayout(true) :
+ this._managingList.layout(true);
+ }
+ }
+ // composed flag, event fire through shadow root and up through composed tree
+ firstUpdated() {
+ const ev = new Event('list-item-rendered', { bubbles: true, composed: true });
+ this.dispatchEvent(ev);
+ }
+}
+__decorate([
+ i$2('slot')
+], ListItemBase.prototype, "slotElement", void 0);
+__decorate([
+ e$4('mwc-ripple')
+], ListItemBase.prototype, "ripple", void 0);
+__decorate([
+ e$6({ type: String })
+], ListItemBase.prototype, "value", void 0);
+__decorate([
+ e$6({ type: String, reflect: true })
+], ListItemBase.prototype, "group", void 0);
+__decorate([
+ e$6({ type: Number, reflect: true })
+], ListItemBase.prototype, "tabindex", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true }),
+ observer(function (value) {
+ if (value) {
+ this.setAttribute('aria-disabled', 'true');
+ }
+ else {
+ this.setAttribute('aria-disabled', 'false');
+ }
+ })
+], ListItemBase.prototype, "disabled", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], ListItemBase.prototype, "twoline", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], ListItemBase.prototype, "activated", void 0);
+__decorate([
+ e$6({ type: String, reflect: true })
+], ListItemBase.prototype, "graphic", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], ListItemBase.prototype, "multipleGraphics", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], ListItemBase.prototype, "hasMeta", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true }),
+ observer(function (value) {
+ if (value) {
+ this.removeAttribute('aria-checked');
+ this.removeAttribute('mwc-list-item');
+ this.selected = false;
+ this.activated = false;
+ this.tabIndex = -1;
+ }
+ else {
+ this.setAttribute('mwc-list-item', '');
+ }
+ })
+], ListItemBase.prototype, "noninteractive", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true }),
+ observer(function (value) {
+ const role = this.getAttribute('role');
+ const isAriaSelectable = role === 'gridcell' || role === 'option' ||
+ role === 'row' || role === 'tab';
+ if (isAriaSelectable && value) {
+ this.setAttribute('aria-selected', 'true');
+ }
+ else if (isAriaSelectable) {
+ this.setAttribute('aria-selected', 'false');
+ }
+ if (this._firstChanged) {
+ this._firstChanged = false;
+ return;
+ }
+ if (this._skipPropRequest) {
+ return;
+ }
+ this.fireRequestSelected(value, 'property');
+ })
+], ListItemBase.prototype, "selected", void 0);
+__decorate([
+ t$2()
+], ListItemBase.prototype, "shouldRenderRipple", void 0);
+__decorate([
+ t$2()
+], ListItemBase.prototype, "_managingList", void 0);
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -526,7 +4222,30 @@ class ui{constructor(e){this.startPress=t=>{e().then((e=>{e&&e.startPress(t)}))}
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var gi,bi={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},vi={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},xi={FOCUS_ROOT_INDEX:-1};!function(e){e[e.NONE=0]="NONE",e[e.LIST_ROOT=1]="LIST_ROOT",e[e.FIRST_ITEM=2]="FIRST_ITEM",e[e.LAST_ITEM=3]="LAST_ITEM"}(gi||(gi={}));
+var cssClasses$5 = {
+ MENU_SELECTED_LIST_ITEM: 'mdc-menu-item--selected',
+ MENU_SELECTION_GROUP: 'mdc-menu__selection-group',
+ ROOT: 'mdc-menu',
+};
+var strings$4 = {
+ ARIA_CHECKED_ATTR: 'aria-checked',
+ ARIA_DISABLED_ATTR: 'aria-disabled',
+ CHECKBOX_SELECTOR: 'input[type="checkbox"]',
+ LIST_SELECTOR: '.mdc-list,.mdc-deprecated-list',
+ SELECTED_EVENT: 'MDCMenu:selected',
+ SKIP_RESTORE_FOCUS: 'data-menu-item-skip-restore-focus',
+};
+var numbers$4 = {
+ FOCUS_ROOT_INDEX: -1,
+};
+var DefaultFocusState;
+(function (DefaultFocusState) {
+ DefaultFocusState[DefaultFocusState["NONE"] = 0] = "NONE";
+ DefaultFocusState[DefaultFocusState["LIST_ROOT"] = 1] = "LIST_ROOT";
+ DefaultFocusState[DefaultFocusState["FIRST_ITEM"] = 2] = "FIRST_ITEM";
+ DefaultFocusState[DefaultFocusState["LAST_ITEM"] = 3] = "LAST_ITEM";
+})(DefaultFocusState || (DefaultFocusState = {}));
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -549,13 +4268,833 @@ var gi,bi={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROU
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var _i=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.isSurfaceOpen=!1,r.isQuickOpen=!1,r.isHoistedElement=!1,r.isFixedPosition=!1,r.isHorizontallyCenteredOnViewport=!1,r.maxHeight=0,r.openBottomBias=0,r.openAnimationEndTimerId=0,r.closeAnimationEndTimerId=0,r.animationRequestId=0,r.anchorCorner=Yt.TOP_START,r.originCorner=Yt.TOP_START,r.anchorMargin={top:0,right:0,bottom:0,left:0},r.position={x:0,y:0},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Kt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Zt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Qt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"Corner",{get:function(){return Yt},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e=n.cssClasses,t=e.ROOT,i=e.OPEN;if(!this.adapter.hasClass(t))throw new Error(t+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},n.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},n.prototype.setAnchorCorner=function(e){this.anchorCorner=e},n.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^qt.RIGHT},n.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},n.prototype.setIsHoisted=function(e){this.isHoistedElement=e},n.prototype.setFixedPosition=function(e){this.isFixedPosition=e},n.prototype.isFixed=function(){return this.isFixedPosition},n.prototype.setAbsolutePosition=function(e,t){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(t)?t:0},n.prototype.setIsHorizontallyCenteredOnViewport=function(e){this.isHorizontallyCenteredOnViewport=e},n.prototype.setQuickOpen=function(e){this.isQuickOpen=e},n.prototype.setMaxHeight=function(e){this.maxHeight=e},n.prototype.setOpenBottomBias=function(e){this.openBottomBias=e},n.prototype.isOpen=function(){return this.isSurfaceOpen},n.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(n.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(n.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.adapter.addClass(n.cssClasses.OPEN),e.openAnimationEndTimerId=setTimeout((function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(n.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()}),Qt.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},n.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(n.cssClasses.OPEN),this.adapter.removeClass(n.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(n.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){t.adapter.removeClass(n.cssClasses.OPEN),t.adapter.removeClass(n.cssClasses.IS_OPEN_BELOW),t.closeAnimationEndTimerId=setTimeout((function(){t.closeAnimationEndTimerId=0,t.adapter.removeClass(n.cssClasses.ANIMATING_CLOSED),t.adapter.notifyClose()}),Qt.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()}},n.prototype.handleBodyClick=function(e){var t=e.target;this.adapter.isElementInContainer(t)||this.close()},n.prototype.handleKeydown=function(e){var t=e.keyCode;("Escape"===e.key||27===t)&&this.close()},n.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var t=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(t),r=this.hasBit(t,qt.BOTTOM)?"bottom":"top",a=this.hasBit(t,qt.RIGHT)?"right":"left",o=this.getHorizontalOriginOffset(t),d=this.getVerticalOriginOffset(t),l=this.measurements,s=l.anchorSize,c=l.surfaceSize,m=((e={})[a]=o,e[r]=d,e);s.width/c.width>Qt.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(a="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(m),this.adapter.setTransformOrigin(a+" "+r),this.adapter.setPosition(m),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(t,qt.BOTTOM)||this.adapter.addClass(n.cssClasses.IS_OPEN_BELOW)},n.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),t=this.adapter.getBodyDimensions(),i=this.adapter.getWindowDimensions(),n=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:t,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:i.width-e.right,bottom:i.height-e.bottom,left:e.left},viewportSize:i,windowScroll:n}},n.prototype.getoriginCorner=function(){var e,t,i=this.originCorner,r=this.measurements,a=r.viewportDistance,o=r.anchorSize,d=r.surfaceSize,l=n.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,qt.BOTTOM)?(e=a.top-l+this.anchorMargin.bottom,t=a.bottom-l-this.anchorMargin.bottom):(e=a.top-l+this.anchorMargin.top,t=a.bottom-l+o.height-this.anchorMargin.top),!(t-d.height>0)&&e>t+this.openBottomBias&&(i=this.setBit(i,qt.BOTTOM));var s,c,m=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,qt.FLIP_RTL),h=this.hasBit(this.anchorCorner,qt.RIGHT)||this.hasBit(i,qt.RIGHT),u=!1;(u=m&&p?!h:h)?(s=a.left+o.width+this.anchorMargin.right,c=a.right-this.anchorMargin.right):(s=a.left+this.anchorMargin.left,c=a.right+o.width-this.anchorMargin.left);var f=s-d.width>0,g=c-d.width>0,b=this.hasBit(i,qt.FLIP_RTL)&&this.hasBit(i,qt.RIGHT);return g&&b&&m||!f&&b?i=this.unsetBit(i,qt.RIGHT):(f&&u&&m||f&&!u&&h||!g&&s>=c)&&(i=this.setBit(i,qt.RIGHT)),i},n.prototype.getMenuSurfaceMaxHeight=function(e){if(this.maxHeight>0)return this.maxHeight;var t=this.measurements.viewportDistance,i=0,r=this.hasBit(e,qt.BOTTOM),a=this.hasBit(this.anchorCorner,qt.BOTTOM),o=n.numbers.MARGIN_TO_EDGE;return r?(i=t.top+this.anchorMargin.top-o,a||(i+=this.measurements.anchorSize.height)):(i=t.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-o,a&&(i-=this.measurements.anchorSize.height)),i},n.prototype.getHorizontalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,qt.RIGHT),n=this.hasBit(this.anchorCorner,qt.RIGHT);if(i){var r=n?t.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?r-(this.measurements.viewportSize.width-this.measurements.bodySize.width):r}return n?t.width-this.anchorMargin.right:this.anchorMargin.left},n.prototype.getVerticalOriginOffset=function(e){var t=this.measurements.anchorSize,i=this.hasBit(e,qt.BOTTOM),n=this.hasBit(this.anchorCorner,qt.BOTTOM);return i?n?t.height-this.anchorMargin.top:-this.anchorMargin.bottom:n?t.height+this.anchorMargin.bottom:this.anchorMargin.top},n.prototype.adjustPositionForHoistedElement=function(e){var t,i,n=this.measurements,a=n.windowScroll,o=n.viewportDistance,d=n.surfaceSize,l=n.viewportSize,s=Object.keys(e);try{for(var c=r(s),m=c.next();!m.done;m=c.next()){var p=m.value,h=e[p]||0;!this.isHorizontallyCenteredOnViewport||"left"!==p&&"right"!==p?(h+=o[p],this.isFixedPosition||("top"===p?h+=a.y:"bottom"===p?h-=a.y:"left"===p?h+=a.x:h-=a.x),e[p]=h):e[p]=(l.width-d.width)/2}}catch(e){t={error:e}}finally{try{m&&!m.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}},n.prototype.maybeRestoreFocus=function(){var e=this,t=this.adapter.isFocused(),i=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(t||i)&&setTimeout((function(){e.adapter.restoreFocus()}),Qt.TOUCH_EVENT_WAIT_MS)},n.prototype.hasBit=function(e,t){return Boolean(e&t)},n.prototype.setBit=function(e,t){return e|t},n.prototype.unsetBit=function(e,t){return e^t},n.prototype.isFinite=function(e){return"number"==typeof e&&isFinite(e)},n}(ye),yi=_i,wi=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.closeAnimationEndTimerId=0,r.defaultFocusState=gi.LIST_ROOT,r.selectedIndex=-1,r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return bi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return vi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return xi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),n.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},n.prototype.handleKeydown=function(e){var t=e.key,i=e.keyCode;("Tab"===t||9===i)&&this.adapter.closeSurface(!0)},n.prototype.handleItemAction=function(e){var t=this,i=this.adapter.getElementIndex(e);if(!(i<0)){this.adapter.notifySelected({index:i});var n="true"===this.adapter.getAttributeFromElementAtIndex(i,vi.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(n),this.closeAnimationEndTimerId=setTimeout((function(){var i=t.adapter.getElementIndex(e);i>=0&&t.adapter.isSelectableItemAtIndex(i)&&t.setSelectedIndex(i)}),_i.numbers.TRANSITION_CLOSE_DURATION)}},n.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case gi.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case gi.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case gi.NONE:break;default:this.adapter.focusListRoot()}},n.prototype.setDefaultFocusState=function(e){this.defaultFocusState=e},n.prototype.getSelectedIndex=function(){return this.selectedIndex},n.prototype.setSelectedIndex=function(e){if(this.validatedIndex(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var t=this.adapter.getSelectedSiblingOfItemAtIndex(e);t>=0&&(this.adapter.removeAttributeFromElementAtIndex(t,vi.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(t,bi.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,bi.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,vi.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=e},n.prototype.setEnabled=function(e,t){this.validatedIndex(e),t?(this.adapter.removeClassFromElementAtIndex(e,Rt),this.adapter.addAttributeToElementAtIndex(e,vi.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,Rt),this.adapter.addAttributeToElementAtIndex(e,vi.ARIA_DISABLED_ATTR,"true"))},n.prototype.validatedIndex=function(e){var t=this.adapter.getMenuItemCount();if(!(e>=0&&e+----------+
+ * | ANCHOR |
+ * +----------+
+ * Origin corner --->+--------------+
+ * | |
+ * | |
+ * | MENU SURFACE |
+ * | |
+ * | |
+ * +--------------+
+ */
+ _this.originCorner = Corner.TOP_START;
+ _this.anchorMargin = { top: 0, right: 0, bottom: 0, left: 0 };
+ _this.position = { x: 0, y: 0 };
+ return _this;
+ }
+ Object.defineProperty(MDCMenuSurfaceFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$7;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuSurfaceFoundation, "strings", {
+ get: function () {
+ return strings$6;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuSurfaceFoundation, "numbers", {
+ get: function () {
+ return numbers$6;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuSurfaceFoundation, "Corner", {
+ get: function () {
+ return Corner;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuSurfaceFoundation, "defaultAdapter", {
+ /**
+ * @see {@link MDCMenuSurfaceAdapter} for typing information on parameters and return types.
+ */
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
+ return {
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ hasClass: function () { return false; },
+ hasAnchor: function () { return false; },
+ isElementInContainer: function () { return false; },
+ isFocused: function () { return false; },
+ isRtl: function () { return false; },
+ getInnerDimensions: function () { return ({ height: 0, width: 0 }); },
+ getAnchorDimensions: function () { return null; },
+ getWindowDimensions: function () { return ({ height: 0, width: 0 }); },
+ getBodyDimensions: function () { return ({ height: 0, width: 0 }); },
+ getWindowScroll: function () { return ({ x: 0, y: 0 }); },
+ setPosition: function () { return undefined; },
+ setMaxHeight: function () { return undefined; },
+ setTransformOrigin: function () { return undefined; },
+ saveFocus: function () { return undefined; },
+ restoreFocus: function () { return undefined; },
+ notifyClose: function () { return undefined; },
+ notifyOpen: function () { return undefined; },
+ notifyClosing: function () { return undefined; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCMenuSurfaceFoundation.prototype.init = function () {
+ var _a = MDCMenuSurfaceFoundation.cssClasses, ROOT = _a.ROOT, OPEN = _a.OPEN;
+ if (!this.adapter.hasClass(ROOT)) {
+ throw new Error(ROOT + " class required in root element.");
+ }
+ if (this.adapter.hasClass(OPEN)) {
+ this.isSurfaceOpen = true;
+ }
+ };
+ MDCMenuSurfaceFoundation.prototype.destroy = function () {
+ clearTimeout(this.openAnimationEndTimerId);
+ clearTimeout(this.closeAnimationEndTimerId);
+ // Cancel any currently running animations.
+ cancelAnimationFrame(this.animationRequestId);
+ };
+ /**
+ * @param corner Default anchor corner alignment of top-left menu surface
+ * corner.
+ */
+ MDCMenuSurfaceFoundation.prototype.setAnchorCorner = function (corner) {
+ this.anchorCorner = corner;
+ };
+ /**
+ * Flip menu corner horizontally.
+ */
+ MDCMenuSurfaceFoundation.prototype.flipCornerHorizontally = function () {
+ this.originCorner = this.originCorner ^ CornerBit.RIGHT;
+ };
+ /**
+ * @param margin Set of margin values from anchor.
+ */
+ MDCMenuSurfaceFoundation.prototype.setAnchorMargin = function (margin) {
+ this.anchorMargin.top = margin.top || 0;
+ this.anchorMargin.right = margin.right || 0;
+ this.anchorMargin.bottom = margin.bottom || 0;
+ this.anchorMargin.left = margin.left || 0;
+ };
+ /** Used to indicate if the menu-surface is hoisted to the body. */
+ MDCMenuSurfaceFoundation.prototype.setIsHoisted = function (isHoisted) {
+ this.isHoistedElement = isHoisted;
+ };
+ /**
+ * Used to set the menu-surface calculations based on a fixed position menu.
+ */
+ MDCMenuSurfaceFoundation.prototype.setFixedPosition = function (isFixedPosition) {
+ this.isFixedPosition = isFixedPosition;
+ };
+ /**
+ * @return Returns true if menu is in fixed (`position: fixed`) position.
+ */
+ MDCMenuSurfaceFoundation.prototype.isFixed = function () {
+ return this.isFixedPosition;
+ };
+ /** Sets the menu-surface position on the page. */
+ MDCMenuSurfaceFoundation.prototype.setAbsolutePosition = function (x, y) {
+ this.position.x = this.isFinite(x) ? x : 0;
+ this.position.y = this.isFinite(y) ? y : 0;
+ };
+ /** Sets whether menu-surface should be horizontally centered to viewport. */
+ MDCMenuSurfaceFoundation.prototype.setIsHorizontallyCenteredOnViewport = function (isCentered) {
+ this.isHorizontallyCenteredOnViewport = isCentered;
+ };
+ MDCMenuSurfaceFoundation.prototype.setQuickOpen = function (quickOpen) {
+ this.isQuickOpen = quickOpen;
+ };
+ /**
+ * Sets maximum menu-surface height on open.
+ * @param maxHeight The desired max-height. Set to 0 (default) to
+ * automatically calculate max height based on available viewport space.
+ */
+ MDCMenuSurfaceFoundation.prototype.setMaxHeight = function (maxHeight) {
+ this.maxHeight = maxHeight;
+ };
+ /**
+ * Set to a positive integer to influence the menu to preferentially open
+ * below the anchor instead of above.
+ * @param bias A value of `x` simulates an extra `x` pixels of available space
+ * below the menu during positioning calculations.
+ */
+ MDCMenuSurfaceFoundation.prototype.setOpenBottomBias = function (bias) {
+ this.openBottomBias = bias;
+ };
+ MDCMenuSurfaceFoundation.prototype.isOpen = function () {
+ return this.isSurfaceOpen;
+ };
+ /**
+ * Open the menu surface.
+ */
+ MDCMenuSurfaceFoundation.prototype.open = function () {
+ var _this = this;
+ if (this.isSurfaceOpen) {
+ return;
+ }
+ this.adapter.saveFocus();
+ if (this.isQuickOpen) {
+ this.isSurfaceOpen = true;
+ this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.OPEN);
+ this.dimensions = this.adapter.getInnerDimensions();
+ this.autoposition();
+ this.adapter.notifyOpen();
+ }
+ else {
+ this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_OPEN);
+ this.animationRequestId = requestAnimationFrame(function () {
+ _this.dimensions = _this.adapter.getInnerDimensions();
+ _this.autoposition();
+ _this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.OPEN);
+ _this.openAnimationEndTimerId = setTimeout(function () {
+ _this.openAnimationEndTimerId = 0;
+ _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_OPEN);
+ _this.adapter.notifyOpen();
+ }, numbers$6.TRANSITION_OPEN_DURATION);
+ });
+ this.isSurfaceOpen = true;
+ }
+ };
+ /**
+ * Closes the menu surface.
+ */
+ MDCMenuSurfaceFoundation.prototype.close = function (skipRestoreFocus) {
+ var _this = this;
+ if (skipRestoreFocus === void 0) { skipRestoreFocus = false; }
+ if (!this.isSurfaceOpen) {
+ return;
+ }
+ this.adapter.notifyClosing();
+ if (this.isQuickOpen) {
+ this.isSurfaceOpen = false;
+ if (!skipRestoreFocus) {
+ this.maybeRestoreFocus();
+ }
+ this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.OPEN);
+ this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.IS_OPEN_BELOW);
+ this.adapter.notifyClose();
+ return;
+ }
+ this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_CLOSED);
+ requestAnimationFrame(function () {
+ _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.OPEN);
+ _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.IS_OPEN_BELOW);
+ _this.closeAnimationEndTimerId = setTimeout(function () {
+ _this.closeAnimationEndTimerId = 0;
+ _this.adapter.removeClass(MDCMenuSurfaceFoundation.cssClasses.ANIMATING_CLOSED);
+ _this.adapter.notifyClose();
+ }, numbers$6.TRANSITION_CLOSE_DURATION);
+ });
+ this.isSurfaceOpen = false;
+ if (!skipRestoreFocus) {
+ this.maybeRestoreFocus();
+ }
+ };
+ /** Handle clicks and close if not within menu-surface element. */
+ MDCMenuSurfaceFoundation.prototype.handleBodyClick = function (evt) {
+ var el = evt.target;
+ if (this.adapter.isElementInContainer(el)) {
+ return;
+ }
+ this.close();
+ };
+ /** Handle keys that close the surface. */
+ MDCMenuSurfaceFoundation.prototype.handleKeydown = function (evt) {
+ var keyCode = evt.keyCode, key = evt.key;
+ var isEscape = key === 'Escape' || keyCode === 27;
+ if (isEscape) {
+ this.close();
+ }
+ };
+ MDCMenuSurfaceFoundation.prototype.autoposition = function () {
+ var _a;
+ // Compute measurements for autoposition methods reuse.
+ this.measurements = this.getAutoLayoutmeasurements();
+ var corner = this.getoriginCorner();
+ var maxMenuSurfaceHeight = this.getMenuSurfaceMaxHeight(corner);
+ var verticalAlignment = this.hasBit(corner, CornerBit.BOTTOM) ? 'bottom' : 'top';
+ var horizontalAlignment = this.hasBit(corner, CornerBit.RIGHT) ? 'right' : 'left';
+ var horizontalOffset = this.getHorizontalOriginOffset(corner);
+ var verticalOffset = this.getVerticalOriginOffset(corner);
+ var _b = this.measurements, anchorSize = _b.anchorSize, surfaceSize = _b.surfaceSize;
+ var position = (_a = {},
+ _a[horizontalAlignment] = horizontalOffset,
+ _a[verticalAlignment] = verticalOffset,
+ _a);
+ // Center align when anchor width is comparable or greater than menu
+ // surface, otherwise keep corner.
+ if (anchorSize.width / surfaceSize.width >
+ numbers$6.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO) {
+ horizontalAlignment = 'center';
+ }
+ // If the menu-surface has been hoisted to the body, it's no longer relative
+ // to the anchor element
+ if (this.isHoistedElement || this.isFixedPosition) {
+ this.adjustPositionForHoistedElement(position);
+ }
+ this.adapter.setTransformOrigin(horizontalAlignment + " " + verticalAlignment);
+ this.adapter.setPosition(position);
+ this.adapter.setMaxHeight(maxMenuSurfaceHeight ? maxMenuSurfaceHeight + 'px' : '');
+ // If it is opened from the top then add is-open-below class
+ if (!this.hasBit(corner, CornerBit.BOTTOM)) {
+ this.adapter.addClass(MDCMenuSurfaceFoundation.cssClasses.IS_OPEN_BELOW);
+ }
+ };
+ /**
+ * @return Measurements used to position menu surface popup.
+ */
+ MDCMenuSurfaceFoundation.prototype.getAutoLayoutmeasurements = function () {
+ var anchorRect = this.adapter.getAnchorDimensions();
+ var bodySize = this.adapter.getBodyDimensions();
+ var viewportSize = this.adapter.getWindowDimensions();
+ var windowScroll = this.adapter.getWindowScroll();
+ if (!anchorRect) {
+ // tslint:disable:object-literal-sort-keys Positional properties are more readable when they're grouped together
+ anchorRect = {
+ top: this.position.y,
+ right: this.position.x,
+ bottom: this.position.y,
+ left: this.position.x,
+ width: 0,
+ height: 0,
+ };
+ // tslint:enable:object-literal-sort-keys
+ }
+ return {
+ anchorSize: anchorRect,
+ bodySize: bodySize,
+ surfaceSize: this.dimensions,
+ viewportDistance: {
+ // tslint:disable:object-literal-sort-keys Positional properties are more readable when they're grouped together
+ top: anchorRect.top,
+ right: viewportSize.width - anchorRect.right,
+ bottom: viewportSize.height - anchorRect.bottom,
+ left: anchorRect.left,
+ // tslint:enable:object-literal-sort-keys
+ },
+ viewportSize: viewportSize,
+ windowScroll: windowScroll,
+ };
+ };
+ /**
+ * Computes the corner of the anchor from which to animate and position the
+ * menu surface.
+ *
+ * Only LEFT or RIGHT bit is used to position the menu surface ignoring RTL
+ * context. E.g., menu surface will be positioned from right side on TOP_END.
+ */
+ MDCMenuSurfaceFoundation.prototype.getoriginCorner = function () {
+ var corner = this.originCorner;
+ var _a = this.measurements, viewportDistance = _a.viewportDistance, anchorSize = _a.anchorSize, surfaceSize = _a.surfaceSize;
+ var MARGIN_TO_EDGE = MDCMenuSurfaceFoundation.numbers.MARGIN_TO_EDGE;
+ var isAnchoredToBottom = this.hasBit(this.anchorCorner, CornerBit.BOTTOM);
+ var availableTop;
+ var availableBottom;
+ if (isAnchoredToBottom) {
+ availableTop =
+ viewportDistance.top - MARGIN_TO_EDGE + this.anchorMargin.bottom;
+ availableBottom =
+ viewportDistance.bottom - MARGIN_TO_EDGE - this.anchorMargin.bottom;
+ }
+ else {
+ availableTop =
+ viewportDistance.top - MARGIN_TO_EDGE + this.anchorMargin.top;
+ availableBottom = viewportDistance.bottom - MARGIN_TO_EDGE +
+ anchorSize.height - this.anchorMargin.top;
+ }
+ var isAvailableBottom = availableBottom - surfaceSize.height > 0;
+ if (!isAvailableBottom &&
+ availableTop > availableBottom + this.openBottomBias) {
+ // Attach bottom side of surface to the anchor.
+ corner = this.setBit(corner, CornerBit.BOTTOM);
+ }
+ var isRtl = this.adapter.isRtl();
+ var isFlipRtl = this.hasBit(this.anchorCorner, CornerBit.FLIP_RTL);
+ var hasRightBit = this.hasBit(this.anchorCorner, CornerBit.RIGHT) ||
+ this.hasBit(corner, CornerBit.RIGHT);
+ // Whether surface attached to right side of anchor element.
+ var isAnchoredToRight = false;
+ // Anchored to start
+ if (isRtl && isFlipRtl) {
+ isAnchoredToRight = !hasRightBit;
+ }
+ else {
+ // Anchored to right
+ isAnchoredToRight = hasRightBit;
+ }
+ var availableLeft;
+ var availableRight;
+ if (isAnchoredToRight) {
+ availableLeft =
+ viewportDistance.left + anchorSize.width + this.anchorMargin.right;
+ availableRight = viewportDistance.right - this.anchorMargin.right;
+ }
+ else {
+ availableLeft = viewportDistance.left + this.anchorMargin.left;
+ availableRight =
+ viewportDistance.right + anchorSize.width - this.anchorMargin.left;
+ }
+ var isAvailableLeft = availableLeft - surfaceSize.width > 0;
+ var isAvailableRight = availableRight - surfaceSize.width > 0;
+ var isOriginCornerAlignedToEnd = this.hasBit(corner, CornerBit.FLIP_RTL) &&
+ this.hasBit(corner, CornerBit.RIGHT);
+ if (isAvailableRight && isOriginCornerAlignedToEnd && isRtl ||
+ !isAvailableLeft && isOriginCornerAlignedToEnd) {
+ // Attach left side of surface to the anchor.
+ corner = this.unsetBit(corner, CornerBit.RIGHT);
+ }
+ else if (isAvailableLeft && isAnchoredToRight && isRtl ||
+ (isAvailableLeft && !isAnchoredToRight && hasRightBit) ||
+ (!isAvailableRight && availableLeft >= availableRight)) {
+ // Attach right side of surface to the anchor.
+ corner = this.setBit(corner, CornerBit.RIGHT);
+ }
+ return corner;
+ };
+ /**
+ * @param corner Origin corner of the menu surface.
+ * @return Maximum height of the menu surface, based on available space. 0
+ * indicates should not be set.
+ */
+ MDCMenuSurfaceFoundation.prototype.getMenuSurfaceMaxHeight = function (corner) {
+ if (this.maxHeight > 0) {
+ return this.maxHeight;
+ }
+ var viewportDistance = this.measurements.viewportDistance;
+ var maxHeight = 0;
+ var isBottomAligned = this.hasBit(corner, CornerBit.BOTTOM);
+ var isBottomAnchored = this.hasBit(this.anchorCorner, CornerBit.BOTTOM);
+ var MARGIN_TO_EDGE = MDCMenuSurfaceFoundation.numbers.MARGIN_TO_EDGE;
+ // When maximum height is not specified, it is handled from CSS.
+ if (isBottomAligned) {
+ maxHeight = viewportDistance.top + this.anchorMargin.top - MARGIN_TO_EDGE;
+ if (!isBottomAnchored) {
+ maxHeight += this.measurements.anchorSize.height;
+ }
+ }
+ else {
+ maxHeight = viewportDistance.bottom - this.anchorMargin.bottom +
+ this.measurements.anchorSize.height - MARGIN_TO_EDGE;
+ if (isBottomAnchored) {
+ maxHeight -= this.measurements.anchorSize.height;
+ }
+ }
+ return maxHeight;
+ };
+ /**
+ * @param corner Origin corner of the menu surface.
+ * @return Horizontal offset of menu surface origin corner from corresponding
+ * anchor corner.
+ */
+ MDCMenuSurfaceFoundation.prototype.getHorizontalOriginOffset = function (corner) {
+ var anchorSize = this.measurements.anchorSize;
+ // isRightAligned corresponds to using the 'right' property on the surface.
+ var isRightAligned = this.hasBit(corner, CornerBit.RIGHT);
+ var avoidHorizontalOverlap = this.hasBit(this.anchorCorner, CornerBit.RIGHT);
+ if (isRightAligned) {
+ var rightOffset = avoidHorizontalOverlap ?
+ anchorSize.width - this.anchorMargin.left :
+ this.anchorMargin.right;
+ // For hoisted or fixed elements, adjust the offset by the difference
+ // between viewport width and body width so when we calculate the right
+ // value (`adjustPositionForHoistedElement`) based on the element
+ // position, the right property is correct.
+ if (this.isHoistedElement || this.isFixedPosition) {
+ return rightOffset -
+ (this.measurements.viewportSize.width -
+ this.measurements.bodySize.width);
+ }
+ return rightOffset;
+ }
+ return avoidHorizontalOverlap ? anchorSize.width - this.anchorMargin.right :
+ this.anchorMargin.left;
+ };
+ /**
+ * @param corner Origin corner of the menu surface.
+ * @return Vertical offset of menu surface origin corner from corresponding
+ * anchor corner.
+ */
+ MDCMenuSurfaceFoundation.prototype.getVerticalOriginOffset = function (corner) {
+ var anchorSize = this.measurements.anchorSize;
+ var isBottomAligned = this.hasBit(corner, CornerBit.BOTTOM);
+ var avoidVerticalOverlap = this.hasBit(this.anchorCorner, CornerBit.BOTTOM);
+ var y = 0;
+ if (isBottomAligned) {
+ y = avoidVerticalOverlap ? anchorSize.height - this.anchorMargin.top :
+ -this.anchorMargin.bottom;
+ }
+ else {
+ y = avoidVerticalOverlap ?
+ (anchorSize.height + this.anchorMargin.bottom) :
+ this.anchorMargin.top;
+ }
+ return y;
+ };
+ /**
+ * Calculates the offsets for positioning the menu-surface when the
+ * menu-surface has been hoisted to the body.
+ */
+ MDCMenuSurfaceFoundation.prototype.adjustPositionForHoistedElement = function (position) {
+ var e_1, _a;
+ var _b = this.measurements, windowScroll = _b.windowScroll, viewportDistance = _b.viewportDistance, surfaceSize = _b.surfaceSize, viewportSize = _b.viewportSize;
+ var props = Object.keys(position);
+ try {
+ for (var props_1 = __values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) {
+ var prop = props_1_1.value;
+ var value = position[prop] || 0;
+ if (this.isHorizontallyCenteredOnViewport &&
+ (prop === 'left' || prop === 'right')) {
+ position[prop] = (viewportSize.width - surfaceSize.width) / 2;
+ continue;
+ }
+ // Hoisted surfaces need to have the anchor elements location on the page
+ // added to the position properties for proper alignment on the body.
+ value += viewportDistance[prop];
+ // Surfaces that are absolutely positioned need to have additional
+ // calculations for scroll and bottom positioning.
+ if (!this.isFixedPosition) {
+ if (prop === 'top') {
+ value += windowScroll.y;
+ }
+ else if (prop === 'bottom') {
+ value -= windowScroll.y;
+ }
+ else if (prop === 'left') {
+ value += windowScroll.x;
+ }
+ else { // prop === 'right'
+ value -= windowScroll.x;
+ }
+ }
+ position[prop] = value;
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (props_1_1 && !props_1_1.done && (_a = props_1.return)) _a.call(props_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ };
+ /**
+ * The last focused element when the menu surface was opened should regain
+ * focus, if the user is focused on or within the menu surface when it is
+ * closed.
+ */
+ MDCMenuSurfaceFoundation.prototype.maybeRestoreFocus = function () {
+ var _this = this;
+ var isRootFocused = this.adapter.isFocused();
+ var childHasFocus = document.activeElement &&
+ this.adapter.isElementInContainer(document.activeElement);
+ if (isRootFocused || childHasFocus) {
+ // Wait before restoring focus when closing the menu surface. This is
+ // important because if a touch event triggered the menu close, and the
+ // subsequent mouse event occurs after focus is restored, then the
+ // restored focus would be lost.
+ setTimeout(function () {
+ _this.adapter.restoreFocus();
+ }, numbers$6.TOUCH_EVENT_WAIT_MS);
+ }
+ };
+ MDCMenuSurfaceFoundation.prototype.hasBit = function (corner, bit) {
+ return Boolean(corner & bit); // tslint:disable-line:no-bitwise
+ };
+ MDCMenuSurfaceFoundation.prototype.setBit = function (corner, bit) {
+ return corner | bit; // tslint:disable-line:no-bitwise
+ };
+ MDCMenuSurfaceFoundation.prototype.unsetBit = function (corner, bit) {
+ return corner ^ bit;
+ };
+ /**
+ * isFinite that doesn't force conversion to number type.
+ * Equivalent to Number.isFinite in ES2015, which is not supported in IE.
+ */
+ MDCMenuSurfaceFoundation.prototype.isFinite = function (num) {
+ return typeof num === 'number' && isFinite(num);
+ };
+ return MDCMenuSurfaceFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCMenuSurfaceFoundation$1 = MDCMenuSurfaceFoundation;
+
+/**
+ * @license
+ * Copyright 2018 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+var MDCMenuFoundation = /** @class */ (function (_super) {
+ __extends(MDCMenuFoundation, _super);
+ function MDCMenuFoundation(adapter) {
+ var _this = _super.call(this, __assign(__assign({}, MDCMenuFoundation.defaultAdapter), adapter)) || this;
+ _this.closeAnimationEndTimerId = 0;
+ _this.defaultFocusState = DefaultFocusState.LIST_ROOT;
+ _this.selectedIndex = -1;
+ return _this;
+ }
+ Object.defineProperty(MDCMenuFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$5;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuFoundation, "strings", {
+ get: function () {
+ return strings$4;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuFoundation, "numbers", {
+ get: function () {
+ return numbers$4;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCMenuFoundation, "defaultAdapter", {
+ /**
+ * @see {@link MDCMenuAdapter} for typing information on parameters and return types.
+ */
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
+ return {
+ addClassToElementAtIndex: function () { return undefined; },
+ removeClassFromElementAtIndex: function () { return undefined; },
+ addAttributeToElementAtIndex: function () { return undefined; },
+ removeAttributeFromElementAtIndex: function () { return undefined; },
+ getAttributeFromElementAtIndex: function () { return null; },
+ elementContainsClass: function () { return false; },
+ closeSurface: function () { return undefined; },
+ getElementIndex: function () { return -1; },
+ notifySelected: function () { return undefined; },
+ getMenuItemCount: function () { return 0; },
+ focusItemAtIndex: function () { return undefined; },
+ focusListRoot: function () { return undefined; },
+ getSelectedSiblingOfItemAtIndex: function () { return -1; },
+ isSelectableItemAtIndex: function () { return false; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCMenuFoundation.prototype.destroy = function () {
+ if (this.closeAnimationEndTimerId) {
+ clearTimeout(this.closeAnimationEndTimerId);
+ }
+ this.adapter.closeSurface();
+ };
+ MDCMenuFoundation.prototype.handleKeydown = function (evt) {
+ var key = evt.key, keyCode = evt.keyCode;
+ var isTab = key === 'Tab' || keyCode === 9;
+ if (isTab) {
+ this.adapter.closeSurface(/** skipRestoreFocus */ true);
+ }
+ };
+ MDCMenuFoundation.prototype.handleItemAction = function (listItem) {
+ var _this = this;
+ var index = this.adapter.getElementIndex(listItem);
+ if (index < 0) {
+ return;
+ }
+ this.adapter.notifySelected({ index: index });
+ var skipRestoreFocus = this.adapter.getAttributeFromElementAtIndex(index, strings$4.SKIP_RESTORE_FOCUS) === 'true';
+ this.adapter.closeSurface(skipRestoreFocus);
+ // Wait for the menu to close before adding/removing classes that affect styles.
+ this.closeAnimationEndTimerId = setTimeout(function () {
+ // Recompute the index in case the menu contents have changed.
+ var recomputedIndex = _this.adapter.getElementIndex(listItem);
+ if (recomputedIndex >= 0 &&
+ _this.adapter.isSelectableItemAtIndex(recomputedIndex)) {
+ _this.setSelectedIndex(recomputedIndex);
+ }
+ }, MDCMenuSurfaceFoundation.numbers.TRANSITION_CLOSE_DURATION);
+ };
+ MDCMenuFoundation.prototype.handleMenuSurfaceOpened = function () {
+ switch (this.defaultFocusState) {
+ case DefaultFocusState.FIRST_ITEM:
+ this.adapter.focusItemAtIndex(0);
+ break;
+ case DefaultFocusState.LAST_ITEM:
+ this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount() - 1);
+ break;
+ case DefaultFocusState.NONE:
+ // Do nothing.
+ break;
+ default:
+ this.adapter.focusListRoot();
+ break;
+ }
+ };
+ /**
+ * Sets default focus state where the menu should focus every time when menu
+ * is opened. Focuses the list root (`DefaultFocusState.LIST_ROOT`) element by
+ * default.
+ */
+ MDCMenuFoundation.prototype.setDefaultFocusState = function (focusState) {
+ this.defaultFocusState = focusState;
+ };
+ /** @return Index of the currently selected list item within the menu. */
+ MDCMenuFoundation.prototype.getSelectedIndex = function () {
+ return this.selectedIndex;
+ };
+ /**
+ * Selects the list item at `index` within the menu.
+ * @param index Index of list item within the menu.
+ */
+ MDCMenuFoundation.prototype.setSelectedIndex = function (index) {
+ this.validatedIndex(index);
+ if (!this.adapter.isSelectableItemAtIndex(index)) {
+ throw new Error('MDCMenuFoundation: No selection group at specified index.');
+ }
+ var prevSelectedIndex = this.adapter.getSelectedSiblingOfItemAtIndex(index);
+ if (prevSelectedIndex >= 0) {
+ this.adapter.removeAttributeFromElementAtIndex(prevSelectedIndex, strings$4.ARIA_CHECKED_ATTR);
+ this.adapter.removeClassFromElementAtIndex(prevSelectedIndex, cssClasses$5.MENU_SELECTED_LIST_ITEM);
+ }
+ this.adapter.addClassToElementAtIndex(index, cssClasses$5.MENU_SELECTED_LIST_ITEM);
+ this.adapter.addAttributeToElementAtIndex(index, strings$4.ARIA_CHECKED_ATTR, 'true');
+ this.selectedIndex = index;
+ };
+ /**
+ * Sets the enabled state to isEnabled for the menu item at the given index.
+ * @param index Index of the menu item
+ * @param isEnabled The desired enabled state of the menu item.
+ */
+ MDCMenuFoundation.prototype.setEnabled = function (index, isEnabled) {
+ this.validatedIndex(index);
+ if (isEnabled) {
+ this.adapter.removeClassFromElementAtIndex(index, cssClasses$a.LIST_ITEM_DISABLED_CLASS);
+ this.adapter.addAttributeToElementAtIndex(index, strings$4.ARIA_DISABLED_ATTR, 'false');
+ }
+ else {
+ this.adapter.addClassToElementAtIndex(index, cssClasses$a.LIST_ITEM_DISABLED_CLASS);
+ this.adapter.addAttributeToElementAtIndex(index, strings$4.ARIA_DISABLED_ATTR, 'true');
+ }
+ };
+ MDCMenuFoundation.prototype.validatedIndex = function (index) {
+ var menuSize = this.adapter.getMenuItemCount();
+ var isIndexInRange = index >= 0 && index < menuSize;
+ if (!isIndexInRange) {
+ throw new Error('MDCMenuFoundation: No list item at specified index.');
+ }
+ };
+ return MDCMenuFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCMenuFoundation$1 = MDCMenuFoundation;
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class Ei extends Oe{constructor(){super(...arguments),this.mdcFoundationClass=wi,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_||(this.listElement_=this.renderRoot.querySelector("mwc-list")),this.listElement_}get items(){const e=this.listElement;return e?e.items:[]}get index(){const e=this.listElement;return e?e.index:-1}get selected(){const e=this.listElement;return e?e.selected:null}render(){const e="menu"===this.innerRole?"menuitem":"option";return P`
+/**
+ * @fires selected {SelectedDetail}
+ * @fires action {ActionDetail}
+ * @fires items-updated
+ * @fires opened
+ * @fires closed
+ */
+class MenuBase extends BaseElement {
+ constructor() {
+ super(...arguments);
+ this.mdcFoundationClass = MDCMenuFoundation$1;
+ this.listElement_ = null;
+ this.anchor = null;
+ this.open = false;
+ this.quick = false;
+ this.wrapFocus = false;
+ this.innerRole = 'menu';
+ this.innerAriaLabel = null;
+ this.corner = 'TOP_START';
+ this.x = null;
+ this.y = null;
+ this.absolute = false;
+ this.multi = false;
+ this.activatable = false;
+ this.fixed = false;
+ this.forceGroupSelection = false;
+ this.fullwidth = false;
+ this.menuCorner = 'START';
+ this.stayOpenOnBodyClick = false;
+ this.defaultFocus = 'LIST_ROOT';
+ this._listUpdateComplete = null;
+ }
+ get listElement() {
+ if (!this.listElement_) {
+ this.listElement_ = this.renderRoot.querySelector('mwc-list');
+ return this.listElement_;
+ }
+ return this.listElement_;
+ }
+ get items() {
+ const listElement = this.listElement;
+ if (listElement) {
+ return listElement.items;
+ }
+ return [];
+ }
+ get index() {
+ const listElement = this.listElement;
+ if (listElement) {
+ return listElement.index;
+ }
+ return -1;
+ }
+ get selected() {
+ const listElement = this.listElement;
+ if (listElement) {
+ return listElement.selected;
+ }
+ return null;
+ }
+ render() {
+ const itemRoles = this.innerRole === 'menu' ? 'menuitem' : 'option';
+ return x `
- `}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?this.forceGroupSelection&&!n.selected&&i.toggle(e,!0):n.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&("mdc-menu-item--selected"===t?n.selected&&i.toggle(e,!1):n.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const n=this.listElement;if(!n)return;const r=n.items[e];r&&r.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const n=i.items[e];n&&n.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const n=i.items[e];return n?n.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let n=0;n{const t=this.listElement;if(!t)return!1;const i=t.items[e];return!!i&&i.hasAttribute("group")}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,n=t.items[i];n&&this.mdcFoundation.handleItemAction(n)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}n([he(".mdc-menu")],Ei.prototype,"mdcRoot",void 0),n([he("slot")],Ei.prototype,"slotElement",void 0),n([se({type:Object})],Ei.prototype,"anchor",void 0),n([se({type:Boolean,reflect:!0})],Ei.prototype,"open",void 0),n([se({type:Boolean})],Ei.prototype,"quick",void 0),n([se({type:Boolean})],Ei.prototype,"wrapFocus",void 0),n([se({type:String})],Ei.prototype,"innerRole",void 0),n([se({type:String})],Ei.prototype,"innerAriaLabel",void 0),n([se({type:String})],Ei.prototype,"corner",void 0),n([se({type:Number})],Ei.prototype,"x",void 0),n([se({type:Number})],Ei.prototype,"y",void 0),n([se({type:Boolean})],Ei.prototype,"absolute",void 0),n([se({type:Boolean})],Ei.prototype,"multi",void 0),n([se({type:Boolean})],Ei.prototype,"activatable",void 0),n([se({type:Boolean})],Ei.prototype,"fixed",void 0),n([se({type:Boolean})],Ei.prototype,"forceGroupSelection",void 0),n([se({type:Boolean})],Ei.prototype,"fullwidth",void 0),n([se({type:String})],Ei.prototype,"menuCorner",void 0),n([se({type:Boolean})],Ei.prototype,"stayOpenOnBodyClick",void 0),n([se({type:String}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(gi[e])}))],Ei.prototype,"defaultFocus",void 0);
+ `;
+ }
+ createAdapter() {
+ return {
+ addClassToElementAtIndex: (index, className) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return;
+ }
+ const element = listElement.items[index];
+ if (!element) {
+ return;
+ }
+ if (className === 'mdc-menu-item--selected') {
+ if (this.forceGroupSelection && !element.selected) {
+ listElement.toggle(index, true);
+ }
+ }
+ else {
+ element.classList.add(className);
+ }
+ },
+ removeClassFromElementAtIndex: (index, className) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return;
+ }
+ const element = listElement.items[index];
+ if (!element) {
+ return;
+ }
+ if (className === 'mdc-menu-item--selected') {
+ if (element.selected) {
+ listElement.toggle(index, false);
+ }
+ }
+ else {
+ element.classList.remove(className);
+ }
+ },
+ addAttributeToElementAtIndex: (index, attr, value) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return;
+ }
+ const element = listElement.items[index];
+ if (!element) {
+ return;
+ }
+ element.setAttribute(attr, value);
+ },
+ removeAttributeFromElementAtIndex: (index, attr) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return;
+ }
+ const element = listElement.items[index];
+ if (!element) {
+ return;
+ }
+ element.removeAttribute(attr);
+ },
+ getAttributeFromElementAtIndex: (index, attr) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return null;
+ }
+ const element = listElement.items[index];
+ if (!element) {
+ return null;
+ }
+ return element.getAttribute(attr);
+ },
+ elementContainsClass: (element, className) => element.classList.contains(className),
+ closeSurface: () => {
+ this.open = false;
+ },
+ getElementIndex: (element) => {
+ const listElement = this.listElement;
+ if (listElement) {
+ return listElement.items.indexOf(element);
+ }
+ return -1;
+ },
+ notifySelected: () => { },
+ getMenuItemCount: () => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return 0;
+ }
+ return listElement.items.length;
+ },
+ focusItemAtIndex: (index) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return;
+ }
+ const element = listElement.items[index];
+ if (element) {
+ element.focus();
+ }
+ },
+ focusListRoot: () => {
+ if (this.listElement) {
+ this.listElement.focus();
+ }
+ },
+ getSelectedSiblingOfItemAtIndex: (index) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return -1;
+ }
+ const elementAtIndex = listElement.items[index];
+ if (!elementAtIndex || !elementAtIndex.group) {
+ return -1;
+ }
+ for (let i = 0; i < listElement.items.length; i++) {
+ if (i === index) {
+ continue;
+ }
+ const current = listElement.items[i];
+ if (current.selected && current.group === elementAtIndex.group) {
+ return i;
+ }
+ }
+ return -1;
+ },
+ isSelectableItemAtIndex: (index) => {
+ const listElement = this.listElement;
+ if (!listElement) {
+ return false;
+ }
+ const elementAtIndex = listElement.items[index];
+ if (!elementAtIndex) {
+ return false;
+ }
+ return elementAtIndex.hasAttribute('group');
+ },
+ };
+ }
+ onKeydown(evt) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handleKeydown(evt);
+ }
+ }
+ onAction(evt) {
+ const listElement = this.listElement;
+ if (this.mdcFoundation && listElement) {
+ const index = evt.detail.index;
+ const el = listElement.items[index];
+ if (el) {
+ this.mdcFoundation.handleItemAction(el);
+ }
+ }
+ }
+ onOpened() {
+ this.open = true;
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handleMenuSurfaceOpened();
+ }
+ }
+ onClosed() {
+ this.open = false;
+ }
+ // tslint:disable:ban-ts-ignore
+ async getUpdateComplete() {
+ await this._listUpdateComplete;
+ // @ts-ignore
+ const result = await super.getUpdateComplete();
+ return result;
+ }
+ // tslint:enable:ban-ts-ignore
+ async firstUpdated() {
+ super.firstUpdated();
+ const listElement = this.listElement;
+ if (listElement) {
+ this._listUpdateComplete = listElement.updateComplete;
+ await this._listUpdateComplete;
+ }
+ }
+ select(index) {
+ const listElement = this.listElement;
+ if (listElement) {
+ listElement.select(index);
+ }
+ }
+ close() {
+ this.open = false;
+ }
+ show() {
+ this.open = true;
+ }
+ getFocusedItemIndex() {
+ const listElement = this.listElement;
+ if (listElement) {
+ return listElement.getFocusedItemIndex();
+ }
+ return -1;
+ }
+ focusItemAtIndex(index) {
+ const listElement = this.listElement;
+ if (listElement) {
+ listElement.focusItemAtIndex(index);
+ }
+ }
+ layout(updateItems = true) {
+ const listElement = this.listElement;
+ if (listElement) {
+ listElement.layout(updateItems);
+ }
+ }
+}
+__decorate([
+ i$2('.mdc-menu')
+], MenuBase.prototype, "mdcRoot", void 0);
+__decorate([
+ i$2('slot')
+], MenuBase.prototype, "slotElement", void 0);
+__decorate([
+ e$6({ type: Object })
+], MenuBase.prototype, "anchor", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], MenuBase.prototype, "open", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "quick", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "wrapFocus", void 0);
+__decorate([
+ e$6({ type: String })
+], MenuBase.prototype, "innerRole", void 0);
+__decorate([
+ e$6({ type: String })
+], MenuBase.prototype, "innerAriaLabel", void 0);
+__decorate([
+ e$6({ type: String })
+], MenuBase.prototype, "corner", void 0);
+__decorate([
+ e$6({ type: Number })
+], MenuBase.prototype, "x", void 0);
+__decorate([
+ e$6({ type: Number })
+], MenuBase.prototype, "y", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "absolute", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "multi", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "activatable", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "fixed", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "forceGroupSelection", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "fullwidth", void 0);
+__decorate([
+ e$6({ type: String })
+], MenuBase.prototype, "menuCorner", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuBase.prototype, "stayOpenOnBodyClick", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.setDefaultFocusState(DefaultFocusState[value]);
+ }
+ })
+], MenuBase.prototype, "defaultFocus", void 0);
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */
-const Ti=Pe(class extends ze{constructor(e){var t;if(super(e),e.type!==Ne||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const n=e[i];return null==n?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.vt){this.vt=new Set;for(const e in t)this.vt.add(e);return this.render(t)}this.vt.forEach((e=>{null==t[e]&&(this.vt.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const n=t[e];null!=n&&(this.vt.add(e),e.includes("-")?i.setProperty(e,n):i[e]=n)}return z}}),Ii={TOP_LEFT:Yt.TOP_LEFT,TOP_RIGHT:Yt.TOP_RIGHT,BOTTOM_LEFT:Yt.BOTTOM_LEFT,BOTTOM_RIGHT:Yt.BOTTOM_RIGHT,TOP_START:Yt.TOP_START,TOP_END:Yt.TOP_END,BOTTOM_START:Yt.BOTTOM_START,BOTTOM_END:Yt.BOTTOM_END};
+ */const i=e$1(class extends i$1{constructor(t$1){var e;if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||(null===(e=t$1.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.vt){this.vt=new Set;for(const t in r)this.vt.add(t);return this.render(r)}this.vt.forEach((t=>{null==r[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="");}));for(const t in r){const e=r[t];null!=e&&(this.vt.add(t),t.includes("-")?s.setProperty(t,e):s[t]=e);}return T}});
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */class Ai extends Oe{constructor(){super(...arguments),this.mdcFoundationClass=yi,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=Yt.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){const e={"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth},t={top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin};return P`
+ */
+// tslint:disable:no-bitwise
+// required for closure compiler
+const stringToCorner = {
+ 'TOP_LEFT': Corner.TOP_LEFT,
+ 'TOP_RIGHT': Corner.TOP_RIGHT,
+ 'BOTTOM_LEFT': Corner.BOTTOM_LEFT,
+ 'BOTTOM_RIGHT': Corner.BOTTOM_RIGHT,
+ 'TOP_START': Corner.TOP_START,
+ 'TOP_END': Corner.TOP_END,
+ 'BOTTOM_START': Corner.BOTTOM_START,
+ 'BOTTOM_END': Corner.BOTTOM_END,
+};
+/**
+ * @fires opened
+ * @fires closed
+ */
+class MenuSurfaceBase extends BaseElement {
+ constructor() {
+ super(...arguments);
+ this.mdcFoundationClass = MDCMenuSurfaceFoundation$1;
+ this.absolute = false;
+ this.fullwidth = false;
+ this.fixed = false;
+ this.x = null;
+ this.y = null;
+ // must be defined before open or else race condition in foundation occurs.
+ this.quick = false;
+ this.open = false;
+ this.stayOpenOnBodyClick = false;
+ this.bitwiseCorner = Corner.TOP_START;
+ this.previousMenuCorner = null;
+ // must be defined before observer of anchor corner for initialization
+ this.menuCorner = 'START';
+ this.corner = 'TOP_START';
+ this.styleTop = '';
+ this.styleLeft = '';
+ this.styleRight = '';
+ this.styleBottom = '';
+ this.styleMaxHeight = '';
+ this.styleTransformOrigin = '';
+ this.anchor = null;
+ this.previouslyFocused = null;
+ this.previousAnchor = null;
+ this.onBodyClickBound = () => undefined;
+ }
+ render() {
+ const classes = {
+ 'mdc-menu-surface--fixed': this.fixed,
+ 'mdc-menu-surface--fullwidth': this.fullwidth,
+ };
+ const styles = {
+ 'top': this.styleTop,
+ 'left': this.styleLeft,
+ 'right': this.styleRight,
+ 'bottom': this.styleBottom,
+ 'max-height': this.styleMaxHeight,
+ 'transform-origin': this.styleTransformOrigin,
+ };
+ return x `
`}createAdapter(){return Object.assign(Object.assign({},Ae(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(e)},notifyClosing:()=>{const e=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(e)},notifyOpen:()=>{const e=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(e)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>ke(this),saveFocus:()=>{const e=Re(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;-1===e.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}close(){this.open=!1}show(){this.open=!0}}n([he(".mdc-menu-surface")],Ai.prototype,"mdcRoot",void 0),n([he("slot")],Ai.prototype,"slotElement",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(e)}))],Ai.prototype,"absolute",void 0),n([se({type:Boolean})],Ai.prototype,"fullwidth",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(e)}))],Ai.prototype,"fixed",void 0),n([se({type:Number}),Me((function(e){this.mdcFoundation&&null!==this.y&&null!==e&&(this.mdcFoundation.setAbsolutePosition(e,this.y),this.mdcFoundation.setAnchorMargin({left:e,top:this.y,right:-e,bottom:this.y}))}))],Ai.prototype,"x",void 0),n([se({type:Number}),Me((function(e){this.mdcFoundation&&null!==this.x&&null!==e&&(this.mdcFoundation.setAbsolutePosition(this.x,e),this.mdcFoundation.setAnchorMargin({left:this.x,top:e,right:-this.x,bottom:e}))}))],Ai.prototype,"y",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(e)}))],Ai.prototype,"quick",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():void 0!==t&&this.mdcFoundation.close())}))],Ai.prototype,"open",void 0),n([se({type:Boolean})],Ai.prototype,"stayOpenOnBodyClick",void 0),n([ce(),Me((function(e){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(e)}))],Ai.prototype,"bitwiseCorner",void 0),n([se({type:String}),Me((function(e){if(this.mdcFoundation){const t="START"===e||"END"===e,i=null===this.previousMenuCorner,n=!i&&e!==this.previousMenuCorner,r=i&&"END"===e;t&&(n||r)&&(this.bitwiseCorner=this.bitwiseCorner^qt.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=e)}}))],Ai.prototype,"menuCorner",void 0),n([se({type:String}),Me((function(e){if(this.mdcFoundation&&e){let t=Ii[e];"END"===this.menuCorner&&(t^=qt.RIGHT),this.bitwiseCorner=t}}))],Ai.prototype,"corner",void 0),n([ce()],Ai.prototype,"styleTop",void 0),n([ce()],Ai.prototype,"styleLeft",void 0),n([ce()],Ai.prototype,"styleRight",void 0),n([ce()],Ai.prototype,"styleBottom",void 0),n([ce()],Ai.prototype,"styleMaxHeight",void 0),n([ce()],Ai.prototype,"styleTransformOrigin",void 0);
+ `;
+ }
+ createAdapter() {
+ return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { hasAnchor: () => {
+ return !!this.anchor;
+ }, notifyClose: () => {
+ const init = { bubbles: true, composed: true };
+ const ev = new CustomEvent('closed', init);
+ this.open = false;
+ this.mdcRoot.dispatchEvent(ev);
+ }, notifyClosing: () => {
+ const init = { bubbles: true, composed: true };
+ const ev = new CustomEvent('closing', init);
+ this.mdcRoot.dispatchEvent(ev);
+ }, notifyOpen: () => {
+ const init = { bubbles: true, composed: true };
+ const ev = new CustomEvent('opened', init);
+ this.open = true;
+ this.mdcRoot.dispatchEvent(ev);
+ }, isElementInContainer: () => false, isRtl: () => {
+ if (this.mdcRoot) {
+ return getComputedStyle(this.mdcRoot).direction === 'rtl';
+ }
+ return false;
+ }, setTransformOrigin: (origin) => {
+ const root = this.mdcRoot;
+ if (!root) {
+ return;
+ }
+ this.styleTransformOrigin = origin;
+ }, isFocused: () => {
+ return doesElementContainFocus(this);
+ }, saveFocus: () => {
+ const activeElementPath = deepActiveElementPath();
+ const pathLength = activeElementPath.length;
+ if (!pathLength) {
+ this.previouslyFocused = null;
+ }
+ this.previouslyFocused = activeElementPath[pathLength - 1];
+ }, restoreFocus: () => {
+ if (!this.previouslyFocused) {
+ return;
+ }
+ if ('focus' in this.previouslyFocused) {
+ this.previouslyFocused.focus();
+ }
+ }, getInnerDimensions: () => {
+ const mdcRoot = this.mdcRoot;
+ if (!mdcRoot) {
+ return { width: 0, height: 0 };
+ }
+ return { width: mdcRoot.offsetWidth, height: mdcRoot.offsetHeight };
+ }, getAnchorDimensions: () => {
+ const anchorElement = this.anchor;
+ return anchorElement ? anchorElement.getBoundingClientRect() : null;
+ }, getBodyDimensions: () => {
+ return {
+ width: document.body.clientWidth,
+ height: document.body.clientHeight,
+ };
+ }, getWindowDimensions: () => {
+ return {
+ width: window.innerWidth,
+ height: window.innerHeight,
+ };
+ }, getWindowScroll: () => {
+ return {
+ x: window.pageXOffset,
+ y: window.pageYOffset,
+ };
+ }, setPosition: (position) => {
+ const mdcRoot = this.mdcRoot;
+ if (!mdcRoot) {
+ return;
+ }
+ this.styleLeft = 'left' in position ? `${position.left}px` : '';
+ this.styleRight = 'right' in position ? `${position.right}px` : '';
+ this.styleTop = 'top' in position ? `${position.top}px` : '';
+ this.styleBottom = 'bottom' in position ? `${position.bottom}px` : '';
+ }, setMaxHeight: async (height) => {
+ const mdcRoot = this.mdcRoot;
+ if (!mdcRoot) {
+ return;
+ }
+ // must set both for IE support as IE will not set a var
+ this.styleMaxHeight = height;
+ await this.updateComplete;
+ this.styleMaxHeight = `var(--mdc-menu-max-height, ${height})`;
+ } });
+ }
+ onKeydown(evt) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handleKeydown(evt);
+ }
+ }
+ onBodyClick(evt) {
+ if (this.stayOpenOnBodyClick) {
+ return;
+ }
+ const path = evt.composedPath();
+ if (path.indexOf(this) === -1) {
+ this.close();
+ }
+ }
+ registerBodyClick() {
+ this.onBodyClickBound = this.onBodyClick.bind(this);
+ // capture otherwise listener closes menu after quick menu opens
+ document.body.addEventListener('click', this.onBodyClickBound, { passive: true, capture: true });
+ }
+ deregisterBodyClick() {
+ document.body.removeEventListener('click', this.onBodyClickBound, { capture: true });
+ }
+ close() {
+ this.open = false;
+ }
+ show() {
+ this.open = true;
+ }
+}
+__decorate([
+ i$2('.mdc-menu-surface')
+], MenuSurfaceBase.prototype, "mdcRoot", void 0);
+__decorate([
+ i$2('slot')
+], MenuSurfaceBase.prototype, "slotElement", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (isAbsolute) {
+ if (this.mdcFoundation && !this.fixed) {
+ this.mdcFoundation.setIsHoisted(isAbsolute);
+ }
+ })
+], MenuSurfaceBase.prototype, "absolute", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuSurfaceBase.prototype, "fullwidth", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (isFixed) {
+ if (this.mdcFoundation && !this.absolute) {
+ this.mdcFoundation.setFixedPosition(isFixed);
+ }
+ })
+], MenuSurfaceBase.prototype, "fixed", void 0);
+__decorate([
+ e$6({ type: Number }),
+ observer(function (value) {
+ if (this.mdcFoundation && this.y !== null && value !== null) {
+ this.mdcFoundation.setAbsolutePosition(value, this.y);
+ this.mdcFoundation.setAnchorMargin({ left: value, top: this.y, right: -value, bottom: this.y });
+ }
+ })
+], MenuSurfaceBase.prototype, "x", void 0);
+__decorate([
+ e$6({ type: Number }),
+ observer(function (value) {
+ if (this.mdcFoundation && this.x !== null && value !== null) {
+ this.mdcFoundation.setAbsolutePosition(this.x, value);
+ this.mdcFoundation.setAnchorMargin({ left: this.x, top: value, right: -this.x, bottom: value });
+ }
+ })
+], MenuSurfaceBase.prototype, "y", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.setQuickOpen(value);
+ }
+ })
+], MenuSurfaceBase.prototype, "quick", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true }),
+ observer(function (isOpen, wasOpen) {
+ if (this.mdcFoundation) {
+ if (isOpen) {
+ this.mdcFoundation.open();
+ // wasOpen helps with first render (when it is `undefined`) perf
+ }
+ else if (wasOpen !== undefined) {
+ this.mdcFoundation.close();
+ }
+ }
+ })
+], MenuSurfaceBase.prototype, "open", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], MenuSurfaceBase.prototype, "stayOpenOnBodyClick", void 0);
+__decorate([
+ t$2(),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ if (value) {
+ this.mdcFoundation.setAnchorCorner(value);
+ }
+ else {
+ this.mdcFoundation.setAnchorCorner(value);
+ }
+ }
+ })
+], MenuSurfaceBase.prototype, "bitwiseCorner", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ const isValidValue = value === 'START' || value === 'END';
+ const isFirstTimeSet = this.previousMenuCorner === null;
+ const cornerChanged = !isFirstTimeSet && value !== this.previousMenuCorner;
+ const initiallySetToEnd = isFirstTimeSet && value === 'END';
+ if (isValidValue && (cornerChanged || initiallySetToEnd)) {
+ this.bitwiseCorner = this.bitwiseCorner ^ CornerBit.RIGHT;
+ this.mdcFoundation.flipCornerHorizontally();
+ this.previousMenuCorner = value;
+ }
+ }
+ })
+], MenuSurfaceBase.prototype, "menuCorner", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (value) {
+ if (this.mdcFoundation) {
+ if (value) {
+ let newCorner = stringToCorner[value];
+ if (this.menuCorner === 'END') {
+ newCorner = newCorner ^ CornerBit.RIGHT;
+ }
+ this.bitwiseCorner = newCorner;
+ }
+ }
+ })
+], MenuSurfaceBase.prototype, "corner", void 0);
+__decorate([
+ t$2()
+], MenuSurfaceBase.prototype, "styleTop", void 0);
+__decorate([
+ t$2()
+], MenuSurfaceBase.prototype, "styleLeft", void 0);
+__decorate([
+ t$2()
+], MenuSurfaceBase.prototype, "styleRight", void 0);
+__decorate([
+ t$2()
+], MenuSurfaceBase.prototype, "styleBottom", void 0);
+__decorate([
+ t$2()
+], MenuSurfaceBase.prototype, "styleMaxHeight", void 0);
+__decorate([
+ t$2()
+], MenuSurfaceBase.prototype, "styleTransformOrigin", void 0);
+
+/**
+ * @license
+ * Copyright 2018 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+function matches(element, selector) {
+ var nativeMatches = element.matches
+ || element.webkitMatchesSelector
+ || element.msMatchesSelector;
+ return nativeMatches.call(element, selector);
+}
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -627,7 +5779,59 @@ const Ti=Pe(class extends ze{constructor(e){var t;if(super(e),e.type!==Ne||"styl
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var Ci={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Si={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Ri={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
+var cssClasses$4 = {
+ // Ripple is a special case where the "root" component is really a "mixin" of sorts,
+ // given that it's an 'upgrade' to an existing component. That being said it is the root
+ // CSS class that all other CSS classes derive from.
+ BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',
+ FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',
+ FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',
+ ROOT: 'mdc-ripple-upgraded',
+ UNBOUNDED: 'mdc-ripple-upgraded--unbounded',
+};
+var strings$3 = {
+ VAR_FG_SCALE: '--mdc-ripple-fg-scale',
+ VAR_FG_SIZE: '--mdc-ripple-fg-size',
+ VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',
+ VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',
+ VAR_LEFT: '--mdc-ripple-left',
+ VAR_TOP: '--mdc-ripple-top',
+};
+var numbers$3 = {
+ DEACTIVATION_TIMEOUT_MS: 225,
+ FG_DEACTIVATION_MS: 150,
+ INITIAL_ORIGIN_SCALE: 0.6,
+ PADDING: 10,
+ TAP_DELAY_MS: 300, // Delay between touch and simulated mouse events on touch devices
+};
+
+/**
+ * Stores result from supportsCssVariables to avoid redundant processing to
+ * detect CSS custom variable support.
+ */
+function getNormalizedEventCoords(evt, pageOffset, clientRect) {
+ if (!evt) {
+ return { x: 0, y: 0 };
+ }
+ var x = pageOffset.x, y = pageOffset.y;
+ var documentX = x + clientRect.left;
+ var documentY = y + clientRect.top;
+ var normalizedX;
+ var normalizedY;
+ // Determine touch point relative to the ripple container.
+ if (evt.type === 'touchstart') {
+ var touchEvent = evt;
+ normalizedX = touchEvent.changedTouches[0].pageX - documentX;
+ normalizedY = touchEvent.changedTouches[0].pageY - documentY;
+ }
+ else {
+ var mouseEvent = evt;
+ normalizedX = mouseEvent.pageX - documentX;
+ normalizedY = mouseEvent.pageY - documentY;
+ }
+ return { x: normalizedX, y: normalizedY };
+}
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -650,13 +5854,735 @@ var Ci={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var ki=["touchstart","pointerdown","mousedown","keydown"],Oi=["touchend","pointerup","mouseup","contextmenu"],Li=[],Fi=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(e){r.activateImpl(e)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return Ci},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Si},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Ri},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e=this,t=this.supportsPressRipple();if(this.registerRootHandlers(t),t){var i=n.cssClasses,r=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(r),e.adapter.isUnbounded()&&(e.adapter.addClass(a),e.layoutInternal())}))}},n.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(n.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(n.cssClasses.FG_DEACTIVATION));var t=n.cssClasses,i=t.ROOT,r=t.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(r),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},n.prototype.activate=function(e){this.activateImpl(e)},n.prototype.deactivate=function(){this.deactivateImpl()},n.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},n.prototype.setUnbounded=function(e){var t=n.cssClasses.UNBOUNDED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(n.cssClasses.BG_FOCUSED)}))},n.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},n.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},n.prototype.registerRootHandlers=function(e){var t,i;if(e){try{for(var n=r(ki),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},n.prototype.registerDeactivationHandlers=function(e){var t,i;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var n=r(Oi),a=n.next();!a.done;a=n.next()){var o=a.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},n.prototype.deregisterRootHandlers=function(){var e,t;try{for(var i=r(ki),n=i.next();!n.done;n=i.next()){var a=n.value;this.adapter.deregisterInteractionHandler(a,this.activateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},n.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=r(Oi),n=i.next();!n.done;n=i.next()){var a=n.value;this.adapter.deregisterDocumentInteractionHandler(a,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},n.prototype.removeCssVars=function(){var e=this,t=n.strings;Object.keys(t).forEach((function(i){0===i.indexOf("VAR_")&&e.adapter.updateCssVariable(t[i],null)}))},n.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var n=this.previousActivationEvent;if(!(n&&void 0!==e&&n.type!==e.type))i.isActivated=!0,i.isProgrammatic=void 0===e,i.activationEvent=e,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&Li.length>0&&Li.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(Li.push(e.target),this.registerDeactivationHandlers(e)),i.wasElementMadeActive=this.checkElementMadeActive(e),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){Li=[],i.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(i.wasElementMadeActive=t.checkElementMadeActive(e),i.wasElementMadeActive&&t.animateActivation()),i.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},n.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},n.prototype.animateActivation=function(){var e=this,t=n.strings,i=t.VAR_FG_TRANSLATE_START,r=t.VAR_FG_TRANSLATE_END,a=n.cssClasses,o=a.FG_DEACTIVATION,d=a.FG_ACTIVATION,l=n.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var s="",c="";if(!this.adapter.isUnbounded()){var m=this.getFgTranslationCoordinates(),p=m.startPoint,h=m.endPoint;s=p.x+"px, "+p.y+"px",c=h.x+"px, "+h.y+"px"}this.adapter.updateCssVariable(i,s),this.adapter.updateCssVariable(r,c),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(o),this.adapter.computeBoundingRect(),this.adapter.addClass(d),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),l)},n.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,i=t.activationEvent;return e=t.wasActivatedByPointer?function(e,t,i){if(!e)return{x:0,y:0};var n,r,a=t.x,o=t.y,d=a+i.left,l=o+i.top;if("touchstart"===e.type){var s=e;n=s.changedTouches[0].pageX-d,r=s.changedTouches[0].pageY-l}else{var c=e;n=c.pageX-d,r=c.pageY-l}return{x:n,y:r}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2},{startPoint:e={x:e.x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},n.prototype.runDeactivationUXLogicIfReady=function(){var e=this,t=n.cssClasses.FG_DEACTIVATION,i=this.activationState,r=i.hasDeactivationUXRun,a=i.isActivated;(r||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(t),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(t)}),Ri.FG_DEACTIVATION_MS))},n.prototype.rmBoundedActivationClasses=function(){var e=n.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},n.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),n.numbers.TAP_DELAY_MS)},n.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var n=i({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(n),e.resetActivationState()})))}},n.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,i=e.wasElementMadeActive;(t||i)&&this.runDeactivationUXLogicIfReady()},n.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var t=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?t:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+n.numbers.PADDING;var i=Math.floor(t*n.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},n.prototype.updateLayoutCssVars=function(){var e=n.strings,t=e.VAR_FG_SIZE,i=e.VAR_LEFT,r=e.VAR_TOP,a=e.VAR_FG_SCALE;this.adapter.updateCssVariable(t,this.initialSize+"px"),this.adapter.updateCssVariable(a,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(r,this.unboundedCoords.top+"px"))},n}(ye),Di=Fi;
+// Activation events registered on the root element of each instance for activation
+var ACTIVATION_EVENT_TYPES = [
+ 'touchstart', 'pointerdown', 'mousedown', 'keydown',
+];
+// Deactivation events registered on documentElement when a pointer-related down event occurs
+var POINTER_DEACTIVATION_EVENT_TYPES = [
+ 'touchend', 'pointerup', 'mouseup', 'contextmenu',
+];
+// simultaneous nested activations
+var activatedTargets = [];
+var MDCRippleFoundation = /** @class */ (function (_super) {
+ __extends(MDCRippleFoundation, _super);
+ function MDCRippleFoundation(adapter) {
+ var _this = _super.call(this, __assign(__assign({}, MDCRippleFoundation.defaultAdapter), adapter)) || this;
+ _this.activationAnimationHasEnded = false;
+ _this.activationTimer = 0;
+ _this.fgDeactivationRemovalTimer = 0;
+ _this.fgScale = '0';
+ _this.frame = { width: 0, height: 0 };
+ _this.initialSize = 0;
+ _this.layoutFrame = 0;
+ _this.maxRadius = 0;
+ _this.unboundedCoords = { left: 0, top: 0 };
+ _this.activationState = _this.defaultActivationState();
+ _this.activationTimerCallback = function () {
+ _this.activationAnimationHasEnded = true;
+ _this.runDeactivationUXLogicIfReady();
+ };
+ _this.activateHandler = function (e) {
+ _this.activateImpl(e);
+ };
+ _this.deactivateHandler = function () {
+ _this.deactivateImpl();
+ };
+ _this.focusHandler = function () {
+ _this.handleFocus();
+ };
+ _this.blurHandler = function () {
+ _this.handleBlur();
+ };
+ _this.resizeHandler = function () {
+ _this.layout();
+ };
+ return _this;
+ }
+ Object.defineProperty(MDCRippleFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$4;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCRippleFoundation, "strings", {
+ get: function () {
+ return strings$3;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCRippleFoundation, "numbers", {
+ get: function () {
+ return numbers$3;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCRippleFoundation, "defaultAdapter", {
+ get: function () {
+ return {
+ addClass: function () { return undefined; },
+ browserSupportsCssVars: function () { return true; },
+ computeBoundingRect: function () {
+ return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });
+ },
+ containsEventTarget: function () { return true; },
+ deregisterDocumentInteractionHandler: function () { return undefined; },
+ deregisterInteractionHandler: function () { return undefined; },
+ deregisterResizeHandler: function () { return undefined; },
+ getWindowPageOffset: function () { return ({ x: 0, y: 0 }); },
+ isSurfaceActive: function () { return true; },
+ isSurfaceDisabled: function () { return true; },
+ isUnbounded: function () { return true; },
+ registerDocumentInteractionHandler: function () { return undefined; },
+ registerInteractionHandler: function () { return undefined; },
+ registerResizeHandler: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ updateCssVariable: function () { return undefined; },
+ };
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCRippleFoundation.prototype.init = function () {
+ var _this = this;
+ var supportsPressRipple = this.supportsPressRipple();
+ this.registerRootHandlers(supportsPressRipple);
+ if (supportsPressRipple) {
+ var _a = MDCRippleFoundation.cssClasses, ROOT_1 = _a.ROOT, UNBOUNDED_1 = _a.UNBOUNDED;
+ requestAnimationFrame(function () {
+ _this.adapter.addClass(ROOT_1);
+ if (_this.adapter.isUnbounded()) {
+ _this.adapter.addClass(UNBOUNDED_1);
+ // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple
+ _this.layoutInternal();
+ }
+ });
+ }
+ };
+ MDCRippleFoundation.prototype.destroy = function () {
+ var _this = this;
+ if (this.supportsPressRipple()) {
+ if (this.activationTimer) {
+ clearTimeout(this.activationTimer);
+ this.activationTimer = 0;
+ this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);
+ }
+ if (this.fgDeactivationRemovalTimer) {
+ clearTimeout(this.fgDeactivationRemovalTimer);
+ this.fgDeactivationRemovalTimer = 0;
+ this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);
+ }
+ var _a = MDCRippleFoundation.cssClasses, ROOT_2 = _a.ROOT, UNBOUNDED_2 = _a.UNBOUNDED;
+ requestAnimationFrame(function () {
+ _this.adapter.removeClass(ROOT_2);
+ _this.adapter.removeClass(UNBOUNDED_2);
+ _this.removeCssVars();
+ });
+ }
+ this.deregisterRootHandlers();
+ this.deregisterDeactivationHandlers();
+ };
+ /**
+ * @param evt Optional event containing position information.
+ */
+ MDCRippleFoundation.prototype.activate = function (evt) {
+ this.activateImpl(evt);
+ };
+ MDCRippleFoundation.prototype.deactivate = function () {
+ this.deactivateImpl();
+ };
+ MDCRippleFoundation.prototype.layout = function () {
+ var _this = this;
+ if (this.layoutFrame) {
+ cancelAnimationFrame(this.layoutFrame);
+ }
+ this.layoutFrame = requestAnimationFrame(function () {
+ _this.layoutInternal();
+ _this.layoutFrame = 0;
+ });
+ };
+ MDCRippleFoundation.prototype.setUnbounded = function (unbounded) {
+ var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED;
+ if (unbounded) {
+ this.adapter.addClass(UNBOUNDED);
+ }
+ else {
+ this.adapter.removeClass(UNBOUNDED);
+ }
+ };
+ MDCRippleFoundation.prototype.handleFocus = function () {
+ var _this = this;
+ requestAnimationFrame(function () { return _this.adapter.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });
+ };
+ MDCRippleFoundation.prototype.handleBlur = function () {
+ var _this = this;
+ requestAnimationFrame(function () { return _this.adapter.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });
+ };
+ /**
+ * We compute this property so that we are not querying information about the client
+ * until the point in time where the foundation requests it. This prevents scenarios where
+ * client-side feature-detection may happen too early, such as when components are rendered on the server
+ * and then initialized at mount time on the client.
+ */
+ MDCRippleFoundation.prototype.supportsPressRipple = function () {
+ return this.adapter.browserSupportsCssVars();
+ };
+ MDCRippleFoundation.prototype.defaultActivationState = function () {
+ return {
+ activationEvent: undefined,
+ hasDeactivationUXRun: false,
+ isActivated: false,
+ isProgrammatic: false,
+ wasActivatedByPointer: false,
+ wasElementMadeActive: false,
+ };
+ };
+ /**
+ * supportsPressRipple Passed from init to save a redundant function call
+ */
+ MDCRippleFoundation.prototype.registerRootHandlers = function (supportsPressRipple) {
+ var e_1, _a;
+ if (supportsPressRipple) {
+ try {
+ for (var ACTIVATION_EVENT_TYPES_1 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next(); !ACTIVATION_EVENT_TYPES_1_1.done; ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next()) {
+ var evtType = ACTIVATION_EVENT_TYPES_1_1.value;
+ this.adapter.registerInteractionHandler(evtType, this.activateHandler);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (ACTIVATION_EVENT_TYPES_1_1 && !ACTIVATION_EVENT_TYPES_1_1.done && (_a = ACTIVATION_EVENT_TYPES_1.return)) _a.call(ACTIVATION_EVENT_TYPES_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ if (this.adapter.isUnbounded()) {
+ this.adapter.registerResizeHandler(this.resizeHandler);
+ }
+ }
+ this.adapter.registerInteractionHandler('focus', this.focusHandler);
+ this.adapter.registerInteractionHandler('blur', this.blurHandler);
+ };
+ MDCRippleFoundation.prototype.registerDeactivationHandlers = function (evt) {
+ var e_2, _a;
+ if (evt.type === 'keydown') {
+ this.adapter.registerInteractionHandler('keyup', this.deactivateHandler);
+ }
+ else {
+ try {
+ for (var POINTER_DEACTIVATION_EVENT_TYPES_1 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next(); !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done; POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next()) {
+ var evtType = POINTER_DEACTIVATION_EVENT_TYPES_1_1.value;
+ this.adapter.registerDocumentInteractionHandler(evtType, this.deactivateHandler);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (POINTER_DEACTIVATION_EVENT_TYPES_1_1 && !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_1.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ }
+ };
+ MDCRippleFoundation.prototype.deregisterRootHandlers = function () {
+ var e_3, _a;
+ try {
+ for (var ACTIVATION_EVENT_TYPES_2 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next(); !ACTIVATION_EVENT_TYPES_2_1.done; ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next()) {
+ var evtType = ACTIVATION_EVENT_TYPES_2_1.value;
+ this.adapter.deregisterInteractionHandler(evtType, this.activateHandler);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (ACTIVATION_EVENT_TYPES_2_1 && !ACTIVATION_EVENT_TYPES_2_1.done && (_a = ACTIVATION_EVENT_TYPES_2.return)) _a.call(ACTIVATION_EVENT_TYPES_2);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ this.adapter.deregisterInteractionHandler('focus', this.focusHandler);
+ this.adapter.deregisterInteractionHandler('blur', this.blurHandler);
+ if (this.adapter.isUnbounded()) {
+ this.adapter.deregisterResizeHandler(this.resizeHandler);
+ }
+ };
+ MDCRippleFoundation.prototype.deregisterDeactivationHandlers = function () {
+ var e_4, _a;
+ this.adapter.deregisterInteractionHandler('keyup', this.deactivateHandler);
+ try {
+ for (var POINTER_DEACTIVATION_EVENT_TYPES_2 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next(); !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done; POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next()) {
+ var evtType = POINTER_DEACTIVATION_EVENT_TYPES_2_1.value;
+ this.adapter.deregisterDocumentInteractionHandler(evtType, this.deactivateHandler);
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (POINTER_DEACTIVATION_EVENT_TYPES_2_1 && !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_2.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_2);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ };
+ MDCRippleFoundation.prototype.removeCssVars = function () {
+ var _this = this;
+ var rippleStrings = MDCRippleFoundation.strings;
+ var keys = Object.keys(rippleStrings);
+ keys.forEach(function (key) {
+ if (key.indexOf('VAR_') === 0) {
+ _this.adapter.updateCssVariable(rippleStrings[key], null);
+ }
+ });
+ };
+ MDCRippleFoundation.prototype.activateImpl = function (evt) {
+ var _this = this;
+ if (this.adapter.isSurfaceDisabled()) {
+ return;
+ }
+ var activationState = this.activationState;
+ if (activationState.isActivated) {
+ return;
+ }
+ // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction
+ var previousActivationEvent = this.previousActivationEvent;
+ var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;
+ if (isSameInteraction) {
+ return;
+ }
+ activationState.isActivated = true;
+ activationState.isProgrammatic = evt === undefined;
+ activationState.activationEvent = evt;
+ activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown');
+ var hasActivatedChild = evt !== undefined &&
+ activatedTargets.length > 0 &&
+ activatedTargets.some(function (target) { return _this.adapter.containsEventTarget(target); });
+ if (hasActivatedChild) {
+ // Immediately reset activation state, while preserving logic that prevents touch follow-on events
+ this.resetActivationState();
+ return;
+ }
+ if (evt !== undefined) {
+ activatedTargets.push(evt.target);
+ this.registerDeactivationHandlers(evt);
+ }
+ activationState.wasElementMadeActive = this.checkElementMadeActive(evt);
+ if (activationState.wasElementMadeActive) {
+ this.animateActivation();
+ }
+ requestAnimationFrame(function () {
+ // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples
+ activatedTargets = [];
+ if (!activationState.wasElementMadeActive
+ && evt !== undefined
+ && (evt.key === ' ' || evt.keyCode === 32)) {
+ // If space was pressed, try again within an rAF call to detect :active, because different UAs report
+ // active states inconsistently when they're called within event handling code:
+ // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971
+ // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741
+ // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS
+ // variable is set within a rAF callback for a submit button interaction (#2241).
+ activationState.wasElementMadeActive = _this.checkElementMadeActive(evt);
+ if (activationState.wasElementMadeActive) {
+ _this.animateActivation();
+ }
+ }
+ if (!activationState.wasElementMadeActive) {
+ // Reset activation state immediately if element was not made active.
+ _this.activationState = _this.defaultActivationState();
+ }
+ });
+ };
+ MDCRippleFoundation.prototype.checkElementMadeActive = function (evt) {
+ return (evt !== undefined && evt.type === 'keydown') ?
+ this.adapter.isSurfaceActive() :
+ true;
+ };
+ MDCRippleFoundation.prototype.animateActivation = function () {
+ var _this = this;
+ var _a = MDCRippleFoundation.strings, VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START, VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END;
+ var _b = MDCRippleFoundation.cssClasses, FG_DEACTIVATION = _b.FG_DEACTIVATION, FG_ACTIVATION = _b.FG_ACTIVATION;
+ var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS;
+ this.layoutInternal();
+ var translateStart = '';
+ var translateEnd = '';
+ if (!this.adapter.isUnbounded()) {
+ var _c = this.getFgTranslationCoordinates(), startPoint = _c.startPoint, endPoint = _c.endPoint;
+ translateStart = startPoint.x + "px, " + startPoint.y + "px";
+ translateEnd = endPoint.x + "px, " + endPoint.y + "px";
+ }
+ this.adapter.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);
+ this.adapter.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);
+ // Cancel any ongoing activation/deactivation animations
+ clearTimeout(this.activationTimer);
+ clearTimeout(this.fgDeactivationRemovalTimer);
+ this.rmBoundedActivationClasses();
+ this.adapter.removeClass(FG_DEACTIVATION);
+ // Force layout in order to re-trigger the animation.
+ this.adapter.computeBoundingRect();
+ this.adapter.addClass(FG_ACTIVATION);
+ this.activationTimer = setTimeout(function () {
+ _this.activationTimerCallback();
+ }, DEACTIVATION_TIMEOUT_MS);
+ };
+ MDCRippleFoundation.prototype.getFgTranslationCoordinates = function () {
+ var _a = this.activationState, activationEvent = _a.activationEvent, wasActivatedByPointer = _a.wasActivatedByPointer;
+ var startPoint;
+ if (wasActivatedByPointer) {
+ startPoint = getNormalizedEventCoords(activationEvent, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect());
+ }
+ else {
+ startPoint = {
+ x: this.frame.width / 2,
+ y: this.frame.height / 2,
+ };
+ }
+ // Center the element around the start point.
+ startPoint = {
+ x: startPoint.x - (this.initialSize / 2),
+ y: startPoint.y - (this.initialSize / 2),
+ };
+ var endPoint = {
+ x: (this.frame.width / 2) - (this.initialSize / 2),
+ y: (this.frame.height / 2) - (this.initialSize / 2),
+ };
+ return { startPoint: startPoint, endPoint: endPoint };
+ };
+ MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady = function () {
+ var _this = this;
+ // This method is called both when a pointing device is released, and when the activation animation ends.
+ // The deactivation animation should only run after both of those occur.
+ var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION;
+ var _a = this.activationState, hasDeactivationUXRun = _a.hasDeactivationUXRun, isActivated = _a.isActivated;
+ var activationHasEnded = hasDeactivationUXRun || !isActivated;
+ if (activationHasEnded && this.activationAnimationHasEnded) {
+ this.rmBoundedActivationClasses();
+ this.adapter.addClass(FG_DEACTIVATION);
+ this.fgDeactivationRemovalTimer = setTimeout(function () {
+ _this.adapter.removeClass(FG_DEACTIVATION);
+ }, numbers$3.FG_DEACTIVATION_MS);
+ }
+ };
+ MDCRippleFoundation.prototype.rmBoundedActivationClasses = function () {
+ var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION;
+ this.adapter.removeClass(FG_ACTIVATION);
+ this.activationAnimationHasEnded = false;
+ this.adapter.computeBoundingRect();
+ };
+ MDCRippleFoundation.prototype.resetActivationState = function () {
+ var _this = this;
+ this.previousActivationEvent = this.activationState.activationEvent;
+ this.activationState = this.defaultActivationState();
+ // Touch devices may fire additional events for the same interaction within a short time.
+ // Store the previous event until it's safe to assume that subsequent events are for new interactions.
+ setTimeout(function () { return _this.previousActivationEvent = undefined; }, MDCRippleFoundation.numbers.TAP_DELAY_MS);
+ };
+ MDCRippleFoundation.prototype.deactivateImpl = function () {
+ var _this = this;
+ var activationState = this.activationState;
+ // This can happen in scenarios such as when you have a keyup event that blurs the element.
+ if (!activationState.isActivated) {
+ return;
+ }
+ var state = __assign({}, activationState);
+ if (activationState.isProgrammatic) {
+ requestAnimationFrame(function () {
+ _this.animateDeactivation(state);
+ });
+ this.resetActivationState();
+ }
+ else {
+ this.deregisterDeactivationHandlers();
+ requestAnimationFrame(function () {
+ _this.activationState.hasDeactivationUXRun = true;
+ _this.animateDeactivation(state);
+ _this.resetActivationState();
+ });
+ }
+ };
+ MDCRippleFoundation.prototype.animateDeactivation = function (_a) {
+ var wasActivatedByPointer = _a.wasActivatedByPointer, wasElementMadeActive = _a.wasElementMadeActive;
+ if (wasActivatedByPointer || wasElementMadeActive) {
+ this.runDeactivationUXLogicIfReady();
+ }
+ };
+ MDCRippleFoundation.prototype.layoutInternal = function () {
+ var _this = this;
+ this.frame = this.adapter.computeBoundingRect();
+ var maxDim = Math.max(this.frame.height, this.frame.width);
+ // Surface diameter is treated differently for unbounded vs. bounded ripples.
+ // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately
+ // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically
+ // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter
+ // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via
+ // `overflow: hidden`.
+ var getBoundedRadius = function () {
+ var hypotenuse = Math.sqrt(Math.pow(_this.frame.width, 2) + Math.pow(_this.frame.height, 2));
+ return hypotenuse + MDCRippleFoundation.numbers.PADDING;
+ };
+ this.maxRadius = this.adapter.isUnbounded() ? maxDim : getBoundedRadius();
+ // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform
+ var initialSize = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);
+ // Unbounded ripple size should always be even number to equally center align.
+ if (this.adapter.isUnbounded() && initialSize % 2 !== 0) {
+ this.initialSize = initialSize - 1;
+ }
+ else {
+ this.initialSize = initialSize;
+ }
+ this.fgScale = "" + this.maxRadius / this.initialSize;
+ this.updateLayoutCssVars();
+ };
+ MDCRippleFoundation.prototype.updateLayoutCssVars = function () {
+ var _a = MDCRippleFoundation.strings, VAR_FG_SIZE = _a.VAR_FG_SIZE, VAR_LEFT = _a.VAR_LEFT, VAR_TOP = _a.VAR_TOP, VAR_FG_SCALE = _a.VAR_FG_SCALE;
+ this.adapter.updateCssVariable(VAR_FG_SIZE, this.initialSize + "px");
+ this.adapter.updateCssVariable(VAR_FG_SCALE, this.fgScale);
+ if (this.adapter.isUnbounded()) {
+ this.unboundedCoords = {
+ left: Math.round((this.frame.width / 2) - (this.initialSize / 2)),
+ top: Math.round((this.frame.height / 2) - (this.initialSize / 2)),
+ };
+ this.adapter.updateCssVariable(VAR_LEFT, this.unboundedCoords.left + "px");
+ this.adapter.updateCssVariable(VAR_TOP, this.unboundedCoords.top + "px");
+ }
+ };
+ return MDCRippleFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCRippleFoundation$1 = MDCRippleFoundation;
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class $i extends Oe{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=Di}get isActive(){return e=this.parentElement||this,t=":active",(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t);
+/** @soyCompatible */
+class RippleBase extends BaseElement {
+ constructor() {
+ super(...arguments);
+ this.primary = false;
+ this.accent = false;
+ this.unbounded = false;
+ this.disabled = false;
+ this.activated = false;
+ this.selected = false;
+ this.internalUseStateLayerCustomProperties = false;
+ this.hovering = false;
+ this.bgFocused = false;
+ this.fgActivation = false;
+ this.fgDeactivation = false;
+ this.fgScale = '';
+ this.fgSize = '';
+ this.translateStart = '';
+ this.translateEnd = '';
+ this.leftPos = '';
+ this.topPos = '';
+ this.mdcFoundationClass = MDCRippleFoundation$1;
+ }
+ get isActive() {
+ return matches(this.parentElement || this, ':active');
+ }
+ createAdapter() {
+ return {
+ browserSupportsCssVars: () => true,
+ isUnbounded: () => this.unbounded,
+ isSurfaceActive: () => this.isActive,
+ isSurfaceDisabled: () => this.disabled,
+ addClass: (className) => {
+ switch (className) {
+ case 'mdc-ripple-upgraded--background-focused':
+ this.bgFocused = true;
+ break;
+ case 'mdc-ripple-upgraded--foreground-activation':
+ this.fgActivation = true;
+ break;
+ case 'mdc-ripple-upgraded--foreground-deactivation':
+ this.fgDeactivation = true;
+ break;
+ }
+ },
+ removeClass: (className) => {
+ switch (className) {
+ case 'mdc-ripple-upgraded--background-focused':
+ this.bgFocused = false;
+ break;
+ case 'mdc-ripple-upgraded--foreground-activation':
+ this.fgActivation = false;
+ break;
+ case 'mdc-ripple-upgraded--foreground-deactivation':
+ this.fgDeactivation = false;
+ break;
+ }
+ },
+ containsEventTarget: () => true,
+ registerInteractionHandler: () => undefined,
+ deregisterInteractionHandler: () => undefined,
+ registerDocumentInteractionHandler: () => undefined,
+ deregisterDocumentInteractionHandler: () => undefined,
+ registerResizeHandler: () => undefined,
+ deregisterResizeHandler: () => undefined,
+ updateCssVariable: (varName, value) => {
+ switch (varName) {
+ case '--mdc-ripple-fg-scale':
+ this.fgScale = value;
+ break;
+ case '--mdc-ripple-fg-size':
+ this.fgSize = value;
+ break;
+ case '--mdc-ripple-fg-translate-end':
+ this.translateEnd = value;
+ break;
+ case '--mdc-ripple-fg-translate-start':
+ this.translateStart = value;
+ break;
+ case '--mdc-ripple-left':
+ this.leftPos = value;
+ break;
+ case '--mdc-ripple-top':
+ this.topPos = value;
+ break;
+ }
+ },
+ computeBoundingRect: () => (this.parentElement || this).getBoundingClientRect(),
+ getWindowPageOffset: () => ({ x: window.pageXOffset, y: window.pageYOffset }),
+ };
+ }
+ startPress(ev) {
+ this.waitForFoundation(() => {
+ this.mdcFoundation.activate(ev);
+ });
+ }
+ endPress() {
+ this.waitForFoundation(() => {
+ this.mdcFoundation.deactivate();
+ });
+ }
+ startFocus() {
+ this.waitForFoundation(() => {
+ this.mdcFoundation.handleFocus();
+ });
+ }
+ endFocus() {
+ this.waitForFoundation(() => {
+ this.mdcFoundation.handleBlur();
+ });
+ }
+ startHover() {
+ this.hovering = true;
+ }
+ endHover() {
+ this.hovering = false;
+ }
+ /**
+ * Wait for the MDCFoundation to be created by `firstUpdated`
+ */
+ waitForFoundation(fn) {
+ if (this.mdcFoundation) {
+ fn();
+ }
+ else {
+ this.updateComplete.then(fn);
+ }
+ }
+ update(changedProperties) {
+ if (changedProperties.has('disabled')) {
+ // stop hovering when ripple is disabled to prevent a stuck "hover" state
+ // When re-enabled, the outer component will get a `mouseenter` event on
+ // the first movement, which will call `startHover()`
+ if (this.disabled) {
+ this.endHover();
+ }
+ }
+ super.update(changedProperties);
+ }
+ /** @soyTemplate */
+ render() {
+ const shouldActivateInPrimary = this.activated && (this.primary || !this.accent);
+ const shouldSelectInPrimary = this.selected && (this.primary || !this.accent);
+ /** @classMap */
+ const classes = {
+ 'mdc-ripple-surface--accent': this.accent,
+ 'mdc-ripple-surface--primary--activated': shouldActivateInPrimary,
+ 'mdc-ripple-surface--accent--activated': this.accent && this.activated,
+ 'mdc-ripple-surface--primary--selected': shouldSelectInPrimary,
+ 'mdc-ripple-surface--accent--selected': this.accent && this.selected,
+ 'mdc-ripple-surface--disabled': this.disabled,
+ 'mdc-ripple-surface--hover': this.hovering,
+ 'mdc-ripple-surface--primary': this.primary,
+ 'mdc-ripple-surface--selected': this.selected,
+ 'mdc-ripple-upgraded--background-focused': this.bgFocused,
+ 'mdc-ripple-upgraded--foreground-activation': this.fgActivation,
+ 'mdc-ripple-upgraded--foreground-deactivation': this.fgDeactivation,
+ 'mdc-ripple-upgraded--unbounded': this.unbounded,
+ 'mdc-ripple-surface--internal-use-state-layer-custom-properties': this.internalUseStateLayerCustomProperties,
+ };
+ return x `
+
`;
+ }
+}
+__decorate([
+ i$2('.mdc-ripple-surface')
+], RippleBase.prototype, "mdcRoot", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "primary", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "accent", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "unbounded", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "disabled", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "activated", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "selected", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], RippleBase.prototype, "internalUseStateLayerCustomProperties", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "hovering", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "bgFocused", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "fgActivation", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "fgDeactivation", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "fgScale", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "fgSize", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "translateStart", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "translateEnd", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "leftPos", void 0);
+__decorate([
+ t$2()
+], RippleBase.prototype, "topPos", void 0);
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -679,12 +6605,22 @@ class $i extends Oe{constructor(){super(...arguments),this.primary=!1,this.accen
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var e,t}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:e=>{switch(e){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(e,t)=>{switch(e){case"--mdc-ripple-fg-scale":this.fgScale=t;break;case"--mdc-ripple-fg-size":this.fgSize=t;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=t;break;case"--mdc-ripple-fg-translate-start":this.translateStart=t;break;case"--mdc-ripple-left":this.leftPos=t;break;case"--mdc-ripple-top":this.topPos=t}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(e){this.waitForFoundation((()=>{this.mdcFoundation.activate(e)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(e){this.mdcFoundation?e():this.updateComplete.then(e)}update(e){e.has("disabled")&&this.disabled&&this.endHover(),super.update(e)}render(){const e=this.activated&&(this.primary||!this.accent),t=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":e,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":t,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return P`
-
`}}n([he(".mdc-ripple-surface")],$i.prototype,"mdcRoot",void 0),n([se({type:Boolean})],$i.prototype,"primary",void 0),n([se({type:Boolean})],$i.prototype,"accent",void 0),n([se({type:Boolean})],$i.prototype,"unbounded",void 0),n([se({type:Boolean})],$i.prototype,"disabled",void 0),n([se({type:Boolean})],$i.prototype,"activated",void 0),n([se({type:Boolean})],$i.prototype,"selected",void 0),n([se({type:Boolean})],$i.prototype,"internalUseStateLayerCustomProperties",void 0),n([ce()],$i.prototype,"hovering",void 0),n([ce()],$i.prototype,"bgFocused",void 0),n([ce()],$i.prototype,"fgActivation",void 0),n([ce()],$i.prototype,"fgDeactivation",void 0),n([ce()],$i.prototype,"fgScale",void 0),n([ce()],$i.prototype,"fgSize",void 0),n([ce()],$i.prototype,"translateStart",void 0),n([ce()],$i.prototype,"translateEnd",void 0),n([ce()],$i.prototype,"leftPos",void 0),n([ce()],$i.prototype,"topPos",void 0);
+var strings$2 = {
+ NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch',
+};
+var numbers$2 = {
+ // This should stay in sync with $mdc-notched-outline-padding * 2.
+ NOTCH_ELEMENT_PADDING: 8,
+};
+var cssClasses$3 = {
+ NO_LABEL: 'mdc-notched-outline--no-label',
+ OUTLINE_NOTCHED: 'mdc-notched-outline--notched',
+ OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded',
+};
+
/**
* @license
- * Copyright 2018 Google Inc.
+ * Copyright 2017 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -704,62 +6640,350 @@ var e,t}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>thi
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var Mi={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},Ni={NOTCH_ELEMENT_PADDING:8},Bi={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},Hi=function(e){function n(t){return e.call(this,i(i({},n.defaultAdapter),t))||this}return t(n,e),Object.defineProperty(n,"strings",{get:function(){return Mi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return Bi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return Ni},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),n.prototype.notch=function(e){var t=n.cssClasses.OUTLINE_NOTCHED;e>0&&(e+=Ni.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(e),this.adapter.addClass(t)},n.prototype.closeNotch=function(){var e=n.cssClasses.OUTLINE_NOTCHED;this.adapter.removeClass(e),this.adapter.removeNotchWidthProperty()},n}(ye);
+var MDCNotchedOutlineFoundation = /** @class */ (function (_super) {
+ __extends(MDCNotchedOutlineFoundation, _super);
+ function MDCNotchedOutlineFoundation(adapter) {
+ return _super.call(this, __assign(__assign({}, MDCNotchedOutlineFoundation.defaultAdapter), adapter)) || this;
+ }
+ Object.defineProperty(MDCNotchedOutlineFoundation, "strings", {
+ get: function () {
+ return strings$2;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCNotchedOutlineFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$3;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCNotchedOutlineFoundation, "numbers", {
+ get: function () {
+ return numbers$2;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCNotchedOutlineFoundation, "defaultAdapter", {
+ /**
+ * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.
+ */
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
+ return {
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ setNotchWidthProperty: function () { return undefined; },
+ removeNotchWidthProperty: function () { return undefined; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ /**
+ * Adds the outline notched selector and updates the notch width calculated based off of notchWidth.
+ */
+ MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) {
+ var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;
+ if (notchWidth > 0) {
+ notchWidth += numbers$2.NOTCH_ELEMENT_PADDING; // Add padding from left/right.
+ }
+ this.adapter.setNotchWidthProperty(notchWidth);
+ this.adapter.addClass(OUTLINE_NOTCHED);
+ };
+ /**
+ * Removes notched outline selector to close the notch in the outline.
+ */
+ MDCNotchedOutlineFoundation.prototype.closeNotch = function () {
+ var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;
+ this.adapter.removeClass(OUTLINE_NOTCHED);
+ this.adapter.removeNotchWidthProperty();
+ };
+ return MDCNotchedOutlineFoundation;
+}(MDCFoundation));
+
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class Pi extends Oe{constructor(){super(...arguments),this.mdcFoundationClass=Hi,this.width=0,this.open=!1,this.lastOpen=this.open}createAdapter(){return{addClass:e=>this.mdcRoot.classList.add(e),removeClass:e=>this.mdcRoot.classList.remove(e),setNotchWidthProperty:e=>this.notchElement.style.setProperty("width",`${e}px`),removeNotchWidthProperty:()=>this.notchElement.style.removeProperty("width")}}openOrClose(e,t){this.mdcFoundation&&(e&&void 0!==t?this.mdcFoundation.notch(t):this.mdcFoundation.closeNotch())}render(){this.openOrClose(this.open,this.width);const e=Ve({"mdc-notched-outline--notched":this.open});return P`
-
+class NotchedOutlineBase extends BaseElement {
+ constructor() {
+ super(...arguments);
+ this.mdcFoundationClass = MDCNotchedOutlineFoundation;
+ this.width = 0;
+ this.open = false;
+ this.lastOpen = this.open;
+ }
+ createAdapter() {
+ return {
+ addClass: (className) => this.mdcRoot.classList.add(className),
+ removeClass: (className) => this.mdcRoot.classList.remove(className),
+ setNotchWidthProperty: (width) => this.notchElement.style.setProperty('width', `${width}px`),
+ removeNotchWidthProperty: () => this.notchElement.style.removeProperty('width'),
+ };
+ }
+ openOrClose(shouldOpen, width) {
+ if (!this.mdcFoundation) {
+ return;
+ }
+ if (shouldOpen && width !== undefined) {
+ this.mdcFoundation.notch(width);
+ }
+ else {
+ this.mdcFoundation.closeNotch();
+ }
+ }
+ render() {
+ this.openOrClose(this.open, this.width);
+ const classes = o({
+ 'mdc-notched-outline--notched': this.open,
+ });
+ return x `
+
- `}}n([he(".mdc-notched-outline")],Pi.prototype,"mdcRoot",void 0),n([se({type:Number})],Pi.prototype,"width",void 0),n([se({type:Boolean,reflect:!0})],Pi.prototype,"open",void 0),n([he(".mdc-notched-outline__notch")],Pi.prototype,"notchElement",void 0);
+ `;
+ }
+}
+__decorate([
+ i$2('.mdc-notched-outline')
+], NotchedOutlineBase.prototype, "mdcRoot", void 0);
+__decorate([
+ e$6({ type: Number })
+], NotchedOutlineBase.prototype, "width", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], NotchedOutlineBase.prototype, "open", void 0);
+__decorate([
+ i$2('.mdc-notched-outline__notch')
+], NotchedOutlineBase.prototype, "notchElement", void 0);
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
*/
-const zi=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`
+const styles$9 = i$5 `.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
- */,Vi=c`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`
+ */
+const styles$8 = i$5 `@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
- */,Ui=c`:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`
+ */
+const styles$7 = i$5 `:host{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;height:48px;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mdc-list-side-padding, 16px);padding-right:var(--mdc-list-side-padding, 16px);outline:none;height:48px;color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host:focus{outline:none}:host([activated]){color:#6200ee;color:var(--mdc-theme-primary, #6200ee);--mdc-ripple-color: var( --mdc-theme-primary, #6200ee )}:host([activated]) .mdc-deprecated-list-item__graphic{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host([activated]) .fake-activated-ripple::before{position:absolute;display:block;top:0;bottom:0;left:0;right:0;width:100%;height:100%;pointer-events:none;z-index:1;content:"";opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12);background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-deprecated-list-item__graphic{flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;display:inline-flex}.mdc-deprecated-list-item__graphic ::slotted(*){flex-shrink:0;align-items:center;justify-content:center;fill:currentColor;width:100%;height:100%;text-align:center}.mdc-deprecated-list-item__meta{width:var(--mdc-list-item-meta-size, 24px);height:var(--mdc-list-item-meta-size, 24px);margin-left:auto;margin-right:0;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-hint-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-item__meta.multi{width:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:var(--mdc-list-item-meta-size, 24px);line-height:var(--mdc-list-item-meta-size, 24px)}.mdc-deprecated-list-item__meta ::slotted(.material-icons),.mdc-deprecated-list-item__meta ::slotted(mwc-icon){line-height:var(--mdc-list-item-meta-size, 24px) !important}.mdc-deprecated-list-item__meta ::slotted(:not(.material-icons):not(mwc-icon)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}[dir=rtl] .mdc-deprecated-list-item__meta,.mdc-deprecated-list-item__meta[dir=rtl]{margin-left:0;margin-right:auto}.mdc-deprecated-list-item__meta ::slotted(*){width:100%;height:100%}.mdc-deprecated-list-item__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-deprecated-list-item__text ::slotted([for]),.mdc-deprecated-list-item__text[for]{pointer-events:none}.mdc-deprecated-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;margin-bottom:-20px;display:block}.mdc-deprecated-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-deprecated-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-deprecated-list-item__secondary-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal;display:block}.mdc-deprecated-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-deprecated-list--dense .mdc-deprecated-list-item__secondary-text{font-size:inherit}* ::slotted(a),a{color:inherit;text-decoration:none}:host([twoline]){height:72px}:host([twoline]) .mdc-deprecated-list-item__text{align-self:flex-start}:host([disabled]),:host([noninteractive]){cursor:default;pointer-events:none}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*){opacity:.38}:host([disabled]) .mdc-deprecated-list-item__text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__primary-text ::slotted(*),:host([disabled]) .mdc-deprecated-list-item__secondary-text ::slotted(*){color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-list-item__secondary-text ::slotted(*){color:rgba(0, 0, 0, 0.54);color:var(--mdc-theme-text-secondary-on-background, rgba(0, 0, 0, 0.54))}.mdc-deprecated-list-item__graphic ::slotted(*){background-color:transparent;color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-icon-on-background, rgba(0, 0, 0, 0.38))}.mdc-deprecated-list-group__subheader ::slotted(*){color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 40px);height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 40px);line-height:var(--mdc-list-item-graphic-size, 40px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 40px) !important}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic ::slotted(*){border-radius:50%}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 16px)}[dir=rtl] :host([graphic=avatar]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=medium]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=large]) .mdc-deprecated-list-item__graphic,[dir=rtl] :host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=avatar]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=medium]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=large]) .mdc-deprecated-list-item__graphic[dir=rtl],:host([graphic=control]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 16px);margin-right:0}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 24px);height:var(--mdc-list-item-graphic-size, 24px);margin-left:0;margin-right:var(--mdc-list-item-graphic-margin, 32px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 24px);line-height:var(--mdc-list-item-graphic-size, 24px)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=icon]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 24px) !important}[dir=rtl] :host([graphic=icon]) .mdc-deprecated-list-item__graphic,:host([graphic=icon]) .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:var(--mdc-list-item-graphic-margin, 32px);margin-right:0}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:56px}:host([graphic=medium]:not([twoLine])),:host([graphic=large]:not([twoLine])){height:72px}:host([graphic=medium]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic{width:var(--mdc-list-item-graphic-size, 56px);height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic.multi,:host([graphic=large]) .mdc-deprecated-list-item__graphic.multi{width:auto}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(*),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(*){width:var(--mdc-list-item-graphic-size, 56px);line-height:var(--mdc-list-item-graphic-size, 56px)}:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=medium]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(.material-icons),:host([graphic=large]) .mdc-deprecated-list-item__graphic ::slotted(mwc-icon){line-height:var(--mdc-list-item-graphic-size, 56px) !important}:host([graphic=large]){padding-left:0px}`;
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
- */,Xi=c`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
+ */
+const styles$6 = i$5 `.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`;
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
- */,Wi=c`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`
+ */
+const styles$5 = i$5 `mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
- */,ji=c`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`
+ */
+const styles$4 = i$5 `.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
- */,Gi=c`.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`,qi={"mwc-select":class extends ai{static get styles(){return zi}},"mwc-list":class extends hi{static get styles(){return Vi}},"mwc-list-item":class extends fi{static get styles(){return Ui}},"mwc-ripple":class extends $i{static get styles(){return Xi}},"mwc-menu":class extends Ei{static get styles(){return Wi}},"mwc-menu-surface":class extends Ai{static get styles(){return ji}},"mwc-notched-outline":class extends Pi{static get styles(){return Gi}}};function Yi(e,t,i){if(void 0!==t)
+ */
+const styles$3 = i$5 `.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}:host{display:block;position:absolute;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] :host,:host([dir=rtl]){text-align:right}::slotted(.mdc-floating-label){display:inline-block;position:relative;top:17px;bottom:auto;max-width:100%}::slotted(.mdc-floating-label--float-above){text-overflow:clip}.mdc-notched-outline--upgraded ::slotted(.mdc-floating-label--float-above){max-width:calc(100% / 0.75)}.mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__leading,.mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-color:var(--mdc-notched-outline-border-color, var(--mdc-theme-primary, #6200ee));border-width:1px;border-width:var(--mdc-notched-outline-stroke-width, 1px)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0;padding-top:var(--mdc-notched-outline-notch-offset, 0)}`;
+
+const selectDefinition = {
+ 'mwc-select': class extends SelectBase {
+ static get styles() {
+ return styles$9;
+ }
+ },
+ 'mwc-list': class extends ListBase {
+ static get styles() {
+ return styles$8;
+ }
+ },
+ 'mwc-list-item': class extends ListItemBase {
+ static get styles() {
+ return styles$7;
+ }
+ },
+ 'mwc-ripple': class extends RippleBase {
+ static get styles() {
+ return styles$6;
+ }
+ },
+ 'mwc-menu': class extends MenuBase {
+ static get styles() {
+ return styles$5;
+ }
+ },
+ 'mwc-menu-surface': class extends MenuSurfaceBase {
+ static get styles() {
+ return styles$4;
+ }
+ },
+ 'mwc-notched-outline': class extends NotchedOutlineBase {
+ static get styles() {
+ return styles$3;
+ }
+ }
+};
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-return function(e,t,i){const n=e.constructor;if(!i){const e=`__${t}`;if(!(i=n.getPropertyDescriptor(t,e)))throw new Error("@ariaProperty must be used after a @property decorator")}const r=i;let a="";if(!r.set)throw new Error(`@ariaProperty requires a setter for ${t}`);if(e.dispatchWizEvent)return i;const o={configurable:!0,enumerable:!0,set(e){if(""===a){const e=n.getPropertyOptions(t);a="string"==typeof e.attribute?e.attribute:t}this.hasAttribute(a)&&this.removeAttribute(a),r.set.call(this,e)}};return r.get&&(o.get=function(){return r.get.call(this)}),o}(e,t,i);throw new Error("@ariaProperty only supports TypeScript Decorators")}
+/**
+ * TypeScript version of the decorator
+ * @see https://www.typescriptlang.org/docs/handbook/decorators.html#property-decorators
+ */
+function tsDecorator(prototype, name, descriptor) {
+ const constructor = prototype.constructor;
+ if (!descriptor) {
+ /**
+ * lit uses internal properties with two leading underscores to
+ * provide storage for accessors
+ */
+ const litInternalPropertyKey = `__${name}`;
+ descriptor =
+ constructor.getPropertyDescriptor(name, litInternalPropertyKey);
+ if (!descriptor) {
+ throw new Error('@ariaProperty must be used after a @property decorator');
+ }
+ }
+ // descriptor must exist at this point, reassign so typescript understands
+ const propDescriptor = descriptor;
+ let attribute = '';
+ if (!propDescriptor.set) {
+ throw new Error(`@ariaProperty requires a setter for ${name}`);
+ }
+ // TODO(b/202853219): Remove this check when internal tooling is
+ // compatible
+ // tslint:disable-next-line:no-any bail if applied to internal generated class
+ if (prototype.dispatchWizEvent) {
+ return descriptor;
+ }
+ const wrappedDescriptor = {
+ configurable: true,
+ enumerable: true,
+ set(value) {
+ if (attribute === '') {
+ const options = constructor.getPropertyOptions(name);
+ // if attribute is not a string, use `name` instead
+ attribute =
+ typeof options.attribute === 'string' ? options.attribute : name;
+ }
+ if (this.hasAttribute(attribute)) {
+ this.removeAttribute(attribute);
+ }
+ propDescriptor.set.call(this, value);
+ }
+ };
+ if (propDescriptor.get) {
+ wrappedDescriptor.get = function () {
+ return propDescriptor.get.call(this);
+ };
+ }
+ return wrappedDescriptor;
+}
+/**
+ * A property decorator proxies an aria attribute to an internal node
+ *
+ * This decorator is only intended for use with ARIA attributes, such as `role`
+ * and `aria-label` due to screenreader needs.
+ *
+ * Upon first render, `@ariaProperty` will remove the attribute from the host
+ * element to prevent screenreaders from reading the host instead of the
+ * internal node.
+ *
+ * This decorator should only be used for non-Symbol public fields decorated
+ * with `@property`, or on a setter with an optional getter.
+ *
+ * @example
+ * ```ts
+ * class MyElement {
+ * @ariaProperty
+ * @property({ type: String, attribute: 'aria-label' })
+ * ariaLabel!: string;
+ * }
+ * ```
+ * @category Decorator
+ * @ExportDecoratedItems
+ */
+function ariaProperty(protoOrDescriptor, name,
+// tslint:disable-next-line:no-any any is required as a return type from decorators
+descriptor) {
+ if (name !== undefined) {
+ return tsDecorator(protoOrDescriptor, name, descriptor);
+ }
+ else {
+ throw new Error('@ariaProperty only supports TypeScript Decorators');
+ }
+}
+
+/**
+ * @license
+ * Copyright 2018 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+/** CSS classes used by the switch. */
+var cssClasses$2 = {
+ /** Class used for a switch that is in the "checked" (on) position. */
+ CHECKED: 'mdc-switch--checked',
+ /** Class used for a switch that is disabled. */
+ DISABLED: 'mdc-switch--disabled',
+};
+/** String constants used by the switch. */
+var strings$1 = {
+ /** Aria attribute for checked or unchecked state of switch */
+ ARIA_CHECKED_ATTR: 'aria-checked',
+ /** A CSS selector used to locate the native HTML control for the switch. */
+ NATIVE_CONTROL_SELECTOR: '.mdc-switch__native-control',
+ /** A CSS selector used to locate the ripple surface element for the switch. */
+ RIPPLE_SURFACE_SELECTOR: '.mdc-switch__thumb-underlay',
+};
+
/**
* @license
* Copyright 2018 Google Inc.
@@ -781,18 +7005,151 @@ return function(e,t,i){const n=e.constructor;if(!i){const e=`__${t}`;if(!(i=n.ge
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var Ki={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},Zi={ARIA_CHECKED_ATTR:"aria-checked",NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},Qi=function(e){function n(t){return e.call(this,i(i({},n.defaultAdapter),t))||this}return t(n,e),Object.defineProperty(n,"strings",{get:function(){return Zi},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return Ki},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){},setNativeControlAttr:function(){}}},enumerable:!1,configurable:!0}),n.prototype.setChecked=function(e){this.adapter.setNativeControlChecked(e),this.updateAriaChecked(e),this.updateCheckedStyling(e)},n.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(Ki.DISABLED):this.adapter.removeClass(Ki.DISABLED)},n.prototype.handleChange=function(e){var t=e.target;this.updateAriaChecked(t.checked),this.updateCheckedStyling(t.checked)},n.prototype.updateCheckedStyling=function(e){e?this.adapter.addClass(Ki.CHECKED):this.adapter.removeClass(Ki.CHECKED)},n.prototype.updateAriaChecked=function(e){this.adapter.setNativeControlAttr(Zi.ARIA_CHECKED_ATTR,""+!!e)},n}(ye);
+ */
+var MDCSwitchFoundation = /** @class */ (function (_super) {
+ __extends(MDCSwitchFoundation, _super);
+ function MDCSwitchFoundation(adapter) {
+ return _super.call(this, __assign(__assign({}, MDCSwitchFoundation.defaultAdapter), adapter)) || this;
+ }
+ Object.defineProperty(MDCSwitchFoundation, "strings", {
+ /** The string constants used by the switch. */
+ get: function () {
+ return strings$1;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCSwitchFoundation, "cssClasses", {
+ /** The CSS classes used by the switch. */
+ get: function () {
+ return cssClasses$2;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCSwitchFoundation, "defaultAdapter", {
+ /** The default Adapter for the switch. */
+ get: function () {
+ return {
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ setNativeControlChecked: function () { return undefined; },
+ setNativeControlDisabled: function () { return undefined; },
+ setNativeControlAttr: function () { return undefined; },
+ };
+ },
+ enumerable: false,
+ configurable: true
+ });
+ /** Sets the checked state of the switch. */
+ MDCSwitchFoundation.prototype.setChecked = function (checked) {
+ this.adapter.setNativeControlChecked(checked);
+ this.updateAriaChecked(checked);
+ this.updateCheckedStyling(checked);
+ };
+ /** Sets the disabled state of the switch. */
+ MDCSwitchFoundation.prototype.setDisabled = function (disabled) {
+ this.adapter.setNativeControlDisabled(disabled);
+ if (disabled) {
+ this.adapter.addClass(cssClasses$2.DISABLED);
+ }
+ else {
+ this.adapter.removeClass(cssClasses$2.DISABLED);
+ }
+ };
+ /** Handles the change event for the switch native control. */
+ MDCSwitchFoundation.prototype.handleChange = function (evt) {
+ var nativeControl = evt.target;
+ this.updateAriaChecked(nativeControl.checked);
+ this.updateCheckedStyling(nativeControl.checked);
+ };
+ /** Updates the styling of the switch based on its checked state. */
+ MDCSwitchFoundation.prototype.updateCheckedStyling = function (checked) {
+ if (checked) {
+ this.adapter.addClass(cssClasses$2.CHECKED);
+ }
+ else {
+ this.adapter.removeClass(cssClasses$2.CHECKED);
+ }
+ };
+ MDCSwitchFoundation.prototype.updateAriaChecked = function (checked) {
+ this.adapter.setNativeControlAttr(strings$1.ARIA_CHECKED_ATTR, "" + !!checked);
+ };
+ return MDCSwitchFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCSwitchFoundation$1 = MDCSwitchFoundation;
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class Ji extends Oe{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.shouldRenderRipple=!1,this.mdcFoundationClass=Qi,this.rippleHandlers=new ui((()=>(this.shouldRenderRipple=!0,this.ripple)))}changeHandler(e){this.mdcFoundation.handleChange(e),this.checked=this.formElement.checked}createAdapter(){return Object.assign(Object.assign({},Ae(this.mdcRoot)),{setNativeControlChecked:e=>{this.formElement.checked=e},setNativeControlDisabled:e=>{this.formElement.disabled=e},setNativeControlAttr:(e,t)=>{this.formElement.setAttribute(e,t)}})}renderRipple(){return this.shouldRenderRipple?P`
+class SwitchBase extends BaseElement {
+ constructor() {
+ super(...arguments);
+ this.checked = false;
+ this.disabled = false;
+ this.shouldRenderRipple = false;
+ this.mdcFoundationClass = MDCSwitchFoundation$1;
+ this.rippleHandlers = new RippleHandlers(() => {
+ this.shouldRenderRipple = true;
+ return this.ripple;
+ });
+ }
+ changeHandler(e) {
+ this.mdcFoundation.handleChange(e);
+ // catch "click" event and sync properties
+ this.checked = this.formElement.checked;
+ }
+ createAdapter() {
+ return Object.assign(Object.assign({}, addHasRemoveClass(this.mdcRoot)), { setNativeControlChecked: (checked) => {
+ this.formElement.checked = checked;
+ }, setNativeControlDisabled: (disabled) => {
+ this.formElement.disabled = disabled;
+ }, setNativeControlAttr: (attr, value) => {
+ this.formElement.setAttribute(attr, value);
+ } });
+ }
+ renderRipple() {
+ return this.shouldRenderRipple ? x `
- `:""}focus(){const e=this.formElement;e&&(this.rippleHandlers.startFocus(),e.focus())}blur(){const e=this.formElement;e&&(this.rippleHandlers.endFocus(),e.blur())}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(e=>{this.dispatchEvent(new Event("change",e))}))}render(){return P`
+ ` :
+ '';
+ }
+ focus() {
+ const formElement = this.formElement;
+ if (formElement) {
+ this.rippleHandlers.startFocus();
+ formElement.focus();
+ }
+ }
+ blur() {
+ const formElement = this.formElement;
+ if (formElement) {
+ this.rippleHandlers.endFocus();
+ formElement.blur();
+ }
+ }
+ click() {
+ if (this.formElement && !this.disabled) {
+ this.formElement.focus();
+ this.formElement.click();
+ }
+ }
+ firstUpdated() {
+ super.firstUpdated();
+ if (this.shadowRoot) {
+ this.mdcRoot.addEventListener('change', (e) => {
+ this.dispatchEvent(new Event('change', e));
+ });
+ }
+ }
+ render() {
+ return x `
@@ -803,8 +7160,8 @@ class Ji extends Oe{constructor(){super(...arguments),this.checked=!1,this.disab
id="basic-switch"
class="mdc-switch__native-control"
role="switch"
- aria-label="${ni(this.ariaLabel)}"
- aria-labelledby="${ni(this.ariaLabelledBy)}"
+ aria-label="${l$1(this.ariaLabel)}"
+ aria-labelledby="${l$1(this.ariaLabelledBy)}"
@change="${this.changeHandler}"
@focus="${this.handleRippleFocus}"
@blur="${this.handleRippleBlur}"
@@ -816,13 +7173,173 @@ class Ji extends Oe{constructor(){super(...arguments),this.checked=!1,this.disab
@touchcancel="${this.handleRippleDeactivate}">
- `}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}n([se({type:Boolean}),Me((function(e){this.mdcFoundation.setChecked(e)}))],Ji.prototype,"checked",void 0),n([se({type:Boolean}),Me((function(e){this.mdcFoundation.setDisabled(e)}))],Ji.prototype,"disabled",void 0),n([Yi,se({attribute:"aria-label"})],Ji.prototype,"ariaLabel",void 0),n([Yi,se({attribute:"aria-labelledby"})],Ji.prototype,"ariaLabelledBy",void 0),n([he(".mdc-switch")],Ji.prototype,"mdcRoot",void 0),n([he("input")],Ji.prototype,"formElement",void 0),n([ue("mwc-ripple")],Ji.prototype,"ripple",void 0),n([ce()],Ji.prototype,"shouldRenderRipple",void 0),n([pe({passive:!0})],Ji.prototype,"handleRippleMouseDown",null),n([pe({passive:!0})],Ji.prototype,"handleRippleTouchStart",null);
+ `;
+ }
+ handleRippleMouseDown(event) {
+ const onUp = () => {
+ window.removeEventListener('mouseup', onUp);
+ this.handleRippleDeactivate();
+ };
+ window.addEventListener('mouseup', onUp);
+ this.rippleHandlers.startPress(event);
+ }
+ handleRippleTouchStart(event) {
+ this.rippleHandlers.startPress(event);
+ }
+ handleRippleDeactivate() {
+ this.rippleHandlers.endPress();
+ }
+ handleRippleMouseEnter() {
+ this.rippleHandlers.startHover();
+ }
+ handleRippleMouseLeave() {
+ this.rippleHandlers.endHover();
+ }
+ handleRippleFocus() {
+ this.rippleHandlers.startFocus();
+ }
+ handleRippleBlur() {
+ this.rippleHandlers.endFocus();
+ }
+}
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (value) {
+ this.mdcFoundation.setChecked(value);
+ })
+], SwitchBase.prototype, "checked", void 0);
+__decorate([
+ e$6({ type: Boolean }),
+ observer(function (value) {
+ this.mdcFoundation.setDisabled(value);
+ })
+], SwitchBase.prototype, "disabled", void 0);
+__decorate([
+ ariaProperty,
+ e$6({ attribute: 'aria-label' })
+], SwitchBase.prototype, "ariaLabel", void 0);
+__decorate([
+ ariaProperty,
+ e$6({ attribute: 'aria-labelledby' })
+], SwitchBase.prototype, "ariaLabelledBy", void 0);
+__decorate([
+ i$2('.mdc-switch')
+], SwitchBase.prototype, "mdcRoot", void 0);
+__decorate([
+ i$2('input')
+], SwitchBase.prototype, "formElement", void 0);
+__decorate([
+ e$4('mwc-ripple')
+], SwitchBase.prototype, "ripple", void 0);
+__decorate([
+ t$2()
+], SwitchBase.prototype, "shouldRenderRipple", void 0);
+__decorate([
+ e$5({ passive: true })
+], SwitchBase.prototype, "handleRippleMouseDown", null);
+__decorate([
+ e$5({ passive: true })
+], SwitchBase.prototype, "handleRippleTouchStart", null);
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
*/
-const en=c`.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-14px}.mdc-switch__native-control{width:64px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;background-color:var(--mdc-theme-on-surface, #000)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-color:#fff;border-color:var(--mdc-theme-surface, #fff)}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto;transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:36px;height:14px;border:1px solid transparent;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-16px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(16px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent}`,tn={"mwc-switch":class extends Ji{static get styles(){return en}},"mwc-ripple":class extends $i{static get styles(){return Xi}}};
+const styles$2 = i$5 `.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-14px}.mdc-switch__native-control{width:64px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;background-color:var(--mdc-theme-on-surface, #000)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-color:#fff;border-color:var(--mdc-theme-surface, #fff)}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto;transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:36px;height:14px;border:1px solid transparent;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-16px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-16px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(16px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent}`;
+
+const switchDefinition = {
+ 'mwc-switch': class extends SwitchBase {
+ static get styles() {
+ return styles$2;
+ }
+ },
+ 'mwc-ripple': class extends RippleBase {
+ static get styles() {
+ return styles$6;
+ }
+ }
+};
+
+/**
+ * @license
+ * Copyright 2016 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+var strings = {
+ ARIA_CONTROLS: 'aria-controls',
+ ARIA_DESCRIBEDBY: 'aria-describedby',
+ INPUT_SELECTOR: '.mdc-text-field__input',
+ LABEL_SELECTOR: '.mdc-floating-label',
+ LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',
+ LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',
+ OUTLINE_SELECTOR: '.mdc-notched-outline',
+ PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',
+ SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',
+ TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'
+};
+var cssClasses$1 = {
+ DISABLED: 'mdc-text-field--disabled',
+ FOCUSED: 'mdc-text-field--focused',
+ HELPER_LINE: 'mdc-text-field-helper-line',
+ INVALID: 'mdc-text-field--invalid',
+ LABEL_FLOATING: 'mdc-text-field--label-floating',
+ NO_LABEL: 'mdc-text-field--no-label',
+ OUTLINED: 'mdc-text-field--outlined',
+ ROOT: 'mdc-text-field',
+ TEXTAREA: 'mdc-text-field--textarea',
+ WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',
+ WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',
+ WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter',
+};
+var numbers$1 = {
+ LABEL_SCALE: 0.75,
+};
+/**
+ * Whitelist based off of
+ * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation
+ * under the "Validation-related attributes" section.
+ */
+var VALIDATION_ATTR_WHITELIST = [
+ 'pattern',
+ 'min',
+ 'max',
+ 'required',
+ 'step',
+ 'minlength',
+ 'maxlength',
+];
+/**
+ * Label should always float for these types as they show some UI even if value
+ * is empty.
+ */
+var ALWAYS_FLOAT_TYPES = [
+ 'color',
+ 'date',
+ 'datetime-local',
+ 'month',
+ 'range',
+ 'time',
+ 'week',
+];
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -845,84 +7362,1198 @@ const en=c`.mdc-switch__thumb-underlay{left:-14px;right:initial;top:-17px;width:
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var nn={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},rn={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},an={LABEL_SCALE:.75},on=["pattern","min","max","required","step","minlength","maxlength"],dn=["color","date","datetime-local","month","range","time","week"],ln=["mousedown","touchstart"],sn=["click","keydown"],cn=function(e){function n(t,r){void 0===r&&(r={});var a=e.call(this,i(i({},n.defaultAdapter),t))||this;return a.isFocused=!1,a.receivedUserInput=!1,a.valid=!0,a.useNativeValidation=!0,a.validateOnValueChange=!0,a.helperText=r.helperText,a.characterCounter=r.characterCounter,a.leadingIcon=r.leadingIcon,a.trailingIcon=r.trailingIcon,a.inputFocusHandler=function(){a.activateFocus()},a.inputBlurHandler=function(){a.deactivateFocus()},a.inputInputHandler=function(){a.handleInput()},a.setPointerXOffset=function(e){a.setTransformOrigin(e)},a.textFieldInteractionHandler=function(){a.handleTextFieldInteraction()},a.validationAttributeChangeHandler=function(e){a.handleValidationAttributeChange(e)},a}return t(n,e),Object.defineProperty(n,"cssClasses",{get:function(){return rn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return nn},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return an},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var e=this.getNativeInput().type;return dn.indexOf(e)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e,t,i,n;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var a=r(ln),o=a.next();!o.done;o=a.next()){var d=o.value;this.adapter.registerInputInteractionHandler(d,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}try{for(var l=r(sn),s=l.next();!s.done;s=l.next()){d=s.value;this.adapter.registerTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var e,t,i,n;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var a=r(ln),o=a.next();!o.done;o=a.next()){var d=o.value;this.adapter.deregisterInputInteractionHandler(d,this.setPointerXOffset)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}try{for(var l=r(sn),s=l.next();!s.done;s=l.next()){d=s.value;this.adapter.deregisterTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var e=this.adapter.getNativeInput();e&&e.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(e){var t=this;e.some((function(e){return on.indexOf(e)>-1&&(t.styleValidity(!0),t.adapter.setLabelRequired(t.getNativeInput().required),!0)})),e.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(e){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(e){var t=this.adapter.getLabelWidth()*an.LABEL_SCALE;this.adapter.notchOutline(t)}else this.adapter.closeOutline()},n.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},n.prototype.setTransformOrigin=function(e){if(!this.isDisabled()&&!this.adapter.hasOutline()){var t=e.touches,i=t?t[0]:e,n=i.target.getBoundingClientRect(),r=i.clientX-n.left;this.adapter.setLineRippleTransformOrigin(r)}},n.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},n.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},n.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var e=this.isValid();this.styleValidity(e),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},n.prototype.getValue=function(){return this.getNativeInput().value},n.prototype.setValue=function(e){if(this.getValue()!==e&&(this.getNativeInput().value=e),this.setcharacterCounter(e.length),this.validateOnValueChange){var t=this.isValid();this.styleValidity(t)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},n.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},n.prototype.setValid=function(e){this.valid=e,this.styleValidity(e);var t=!e&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(t)},n.prototype.setValidateOnValueChange=function(e){this.validateOnValueChange=e},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(e){this.useNativeValidation=e},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(e){this.getNativeInput().disabled=e,this.styleDisabled(e)},n.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},n.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},n.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},n.prototype.setTrailingIconAriaLabel=function(e){this.trailingIcon&&this.trailingIcon.setAriaLabel(e)},n.prototype.setTrailingIconContent=function(e){this.trailingIcon&&this.trailingIcon.setContent(e)},n.prototype.setcharacterCounter=function(e){if(this.characterCounter){var t=this.getNativeInput().maxLength;if(-1===t)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(e,t)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(e){var t=n.cssClasses.INVALID;if(e?this.adapter.removeClass(t):this.adapter.addClass(t),this.helperText){if(this.helperText.setValidity(e),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),r=this.helperText.getId();i&&r?this.adapter.setInputAttr(nn.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(nn.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(e){var t=n.cssClasses.FOCUSED;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.styleDisabled=function(e){var t=n.cssClasses,i=t.DISABLED,r=t.INVALID;e?(this.adapter.addClass(i),this.adapter.removeClass(r)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(e),this.trailingIcon&&this.trailingIcon.setDisabled(e)},n.prototype.styleFloating=function(e){var t=n.cssClasses.LABEL_FLOATING;e?this.adapter.addClass(t):this.adapter.removeClass(t)},n.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},n}(ye),mn=cn;
+var POINTERDOWN_EVENTS = ['mousedown', 'touchstart'];
+var INTERACTION_EVENTS = ['click', 'keydown'];
+var MDCTextFieldFoundation = /** @class */ (function (_super) {
+ __extends(MDCTextFieldFoundation, _super);
+ /**
+ * @param adapter
+ * @param foundationMap Map from subcomponent names to their subfoundations.
+ */
+ function MDCTextFieldFoundation(adapter, foundationMap) {
+ if (foundationMap === void 0) { foundationMap = {}; }
+ var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this;
+ _this.isFocused = false;
+ _this.receivedUserInput = false;
+ _this.valid = true;
+ _this.useNativeValidation = true;
+ _this.validateOnValueChange = true;
+ _this.helperText = foundationMap.helperText;
+ _this.characterCounter = foundationMap.characterCounter;
+ _this.leadingIcon = foundationMap.leadingIcon;
+ _this.trailingIcon = foundationMap.trailingIcon;
+ _this.inputFocusHandler = function () {
+ _this.activateFocus();
+ };
+ _this.inputBlurHandler = function () {
+ _this.deactivateFocus();
+ };
+ _this.inputInputHandler = function () {
+ _this.handleInput();
+ };
+ _this.setPointerXOffset = function (evt) {
+ _this.setTransformOrigin(evt);
+ };
+ _this.textFieldInteractionHandler = function () {
+ _this.handleTextFieldInteraction();
+ };
+ _this.validationAttributeChangeHandler = function (attributesList) {
+ _this.handleValidationAttributeChange(attributesList);
+ };
+ return _this;
+ }
+ Object.defineProperty(MDCTextFieldFoundation, "cssClasses", {
+ get: function () {
+ return cssClasses$1;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCTextFieldFoundation, "strings", {
+ get: function () {
+ return strings;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCTextFieldFoundation, "numbers", {
+ get: function () {
+ return numbers$1;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldAlwaysFloat", {
+ get: function () {
+ var type = this.getNativeInput().type;
+ return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldFloat", {
+ get: function () {
+ return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||
+ this.isBadInput();
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCTextFieldFoundation.prototype, "shouldShake", {
+ get: function () {
+ return !this.isFocused && !this.isValid() && !!this.getValue();
+ },
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(MDCTextFieldFoundation, "defaultAdapter", {
+ /**
+ * See {@link MDCTextFieldAdapter} for typing information on parameters and
+ * return types.
+ */
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
+ return {
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ hasClass: function () { return true; },
+ setInputAttr: function () { return undefined; },
+ removeInputAttr: function () { return undefined; },
+ registerTextFieldInteractionHandler: function () { return undefined; },
+ deregisterTextFieldInteractionHandler: function () { return undefined; },
+ registerInputInteractionHandler: function () { return undefined; },
+ deregisterInputInteractionHandler: function () { return undefined; },
+ registerValidationAttributeChangeHandler: function () {
+ return new MutationObserver(function () { return undefined; });
+ },
+ deregisterValidationAttributeChangeHandler: function () { return undefined; },
+ getNativeInput: function () { return null; },
+ isFocused: function () { return false; },
+ activateLineRipple: function () { return undefined; },
+ deactivateLineRipple: function () { return undefined; },
+ setLineRippleTransformOrigin: function () { return undefined; },
+ shakeLabel: function () { return undefined; },
+ floatLabel: function () { return undefined; },
+ setLabelRequired: function () { return undefined; },
+ hasLabel: function () { return false; },
+ getLabelWidth: function () { return 0; },
+ hasOutline: function () { return false; },
+ notchOutline: function () { return undefined; },
+ closeOutline: function () { return undefined; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCTextFieldFoundation.prototype.init = function () {
+ var e_1, _a, e_2, _b;
+ if (this.adapter.hasLabel() && this.getNativeInput().required) {
+ this.adapter.setLabelRequired(true);
+ }
+ if (this.adapter.isFocused()) {
+ this.inputFocusHandler();
+ }
+ else if (this.adapter.hasLabel() && this.shouldFloat) {
+ this.notchOutline(true);
+ this.adapter.floatLabel(true);
+ this.styleFloating(true);
+ }
+ this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler);
+ this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);
+ this.adapter.registerInputInteractionHandler('input', this.inputInputHandler);
+ try {
+ for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) {
+ var evtType = POINTERDOWN_EVENTS_1_1.value;
+ this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset);
+ }
+ }
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
+ finally {
+ try {
+ if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1);
+ }
+ finally { if (e_1) throw e_1.error; }
+ }
+ try {
+ for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {
+ var evtType = INTERACTION_EVENTS_1_1.value;
+ this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);
+ }
+ }
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
+ finally {
+ try {
+ if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1);
+ }
+ finally { if (e_2) throw e_2.error; }
+ }
+ this.validationObserver =
+ this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler);
+ this.setcharacterCounter(this.getValue().length);
+ };
+ MDCTextFieldFoundation.prototype.destroy = function () {
+ var e_3, _a, e_4, _b;
+ this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler);
+ this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler);
+ this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler);
+ try {
+ for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) {
+ var evtType = POINTERDOWN_EVENTS_2_1.value;
+ this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset);
+ }
+ }
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
+ finally {
+ try {
+ if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2);
+ }
+ finally { if (e_3) throw e_3.error; }
+ }
+ try {
+ for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {
+ var evtType = INTERACTION_EVENTS_2_1.value;
+ this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);
+ }
+ }
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
+ finally {
+ try {
+ if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2);
+ }
+ finally { if (e_4) throw e_4.error; }
+ }
+ this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);
+ };
+ /**
+ * Handles user interactions with the Text Field.
+ */
+ MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () {
+ var nativeInput = this.adapter.getNativeInput();
+ if (nativeInput && nativeInput.disabled) {
+ return;
+ }
+ this.receivedUserInput = true;
+ };
+ /**
+ * Handles validation attribute changes
+ */
+ MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) {
+ var _this = this;
+ attributesList.some(function (attributeName) {
+ if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {
+ _this.styleValidity(true);
+ _this.adapter.setLabelRequired(_this.getNativeInput().required);
+ return true;
+ }
+ return false;
+ });
+ if (attributesList.indexOf('maxlength') > -1) {
+ this.setcharacterCounter(this.getValue().length);
+ }
+ };
+ /**
+ * Opens/closes the notched outline.
+ */
+ MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) {
+ if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {
+ return;
+ }
+ if (openNotch) {
+ var labelWidth = this.adapter.getLabelWidth() * numbers$1.LABEL_SCALE;
+ this.adapter.notchOutline(labelWidth);
+ }
+ else {
+ this.adapter.closeOutline();
+ }
+ };
+ /**
+ * Activates the text field focus state.
+ */
+ MDCTextFieldFoundation.prototype.activateFocus = function () {
+ this.isFocused = true;
+ this.styleFocused(this.isFocused);
+ this.adapter.activateLineRipple();
+ if (this.adapter.hasLabel()) {
+ this.notchOutline(this.shouldFloat);
+ this.adapter.floatLabel(this.shouldFloat);
+ this.styleFloating(this.shouldFloat);
+ this.adapter.shakeLabel(this.shouldShake);
+ }
+ if (this.helperText &&
+ (this.helperText.isPersistent() || !this.helperText.isValidation() ||
+ !this.valid)) {
+ this.helperText.showToScreenReader();
+ }
+ };
+ /**
+ * Sets the line ripple's transform origin, so that the line ripple activate
+ * animation will animate out from the user's click location.
+ */
+ MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) {
+ if (this.isDisabled() || this.adapter.hasOutline()) {
+ return;
+ }
+ var touches = evt.touches;
+ var targetEvent = touches ? touches[0] : evt;
+ var targetClientRect = targetEvent.target.getBoundingClientRect();
+ var normalizedX = targetEvent.clientX - targetClientRect.left;
+ this.adapter.setLineRippleTransformOrigin(normalizedX);
+ };
+ /**
+ * Handles input change of text input and text area.
+ */
+ MDCTextFieldFoundation.prototype.handleInput = function () {
+ this.autoCompleteFocus();
+ this.setcharacterCounter(this.getValue().length);
+ };
+ /**
+ * Activates the Text Field's focus state in cases when the input value
+ * changes without user input (e.g. programmatically).
+ */
+ MDCTextFieldFoundation.prototype.autoCompleteFocus = function () {
+ if (!this.receivedUserInput) {
+ this.activateFocus();
+ }
+ };
+ /**
+ * Deactivates the Text Field's focus state.
+ */
+ MDCTextFieldFoundation.prototype.deactivateFocus = function () {
+ this.isFocused = false;
+ this.adapter.deactivateLineRipple();
+ var isValid = this.isValid();
+ this.styleValidity(isValid);
+ this.styleFocused(this.isFocused);
+ if (this.adapter.hasLabel()) {
+ this.notchOutline(this.shouldFloat);
+ this.adapter.floatLabel(this.shouldFloat);
+ this.styleFloating(this.shouldFloat);
+ this.adapter.shakeLabel(this.shouldShake);
+ }
+ if (!this.shouldFloat) {
+ this.receivedUserInput = false;
+ }
+ };
+ MDCTextFieldFoundation.prototype.getValue = function () {
+ return this.getNativeInput().value;
+ };
+ /**
+ * @param value The value to set on the input Element.
+ */
+ MDCTextFieldFoundation.prototype.setValue = function (value) {
+ // Prevent Safari from moving the caret to the end of the input when the
+ // value has not changed.
+ if (this.getValue() !== value) {
+ this.getNativeInput().value = value;
+ }
+ this.setcharacterCounter(value.length);
+ if (this.validateOnValueChange) {
+ var isValid = this.isValid();
+ this.styleValidity(isValid);
+ }
+ if (this.adapter.hasLabel()) {
+ this.notchOutline(this.shouldFloat);
+ this.adapter.floatLabel(this.shouldFloat);
+ this.styleFloating(this.shouldFloat);
+ if (this.validateOnValueChange) {
+ this.adapter.shakeLabel(this.shouldShake);
+ }
+ }
+ };
+ /**
+ * @return The custom validity state, if set; otherwise, the result of a
+ * native validity check.
+ */
+ MDCTextFieldFoundation.prototype.isValid = function () {
+ return this.useNativeValidation ? this.isNativeInputValid() : this.valid;
+ };
+ /**
+ * @param isValid Sets the custom validity state of the Text Field.
+ */
+ MDCTextFieldFoundation.prototype.setValid = function (isValid) {
+ this.valid = isValid;
+ this.styleValidity(isValid);
+ var shouldShake = !isValid && !this.isFocused && !!this.getValue();
+ if (this.adapter.hasLabel()) {
+ this.adapter.shakeLabel(shouldShake);
+ }
+ };
+ /**
+ * @param shouldValidate Whether or not validity should be updated on
+ * value change.
+ */
+ MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) {
+ this.validateOnValueChange = shouldValidate;
+ };
+ /**
+ * @return Whether or not validity should be updated on value change. `true`
+ * by default.
+ */
+ MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () {
+ return this.validateOnValueChange;
+ };
+ /**
+ * Enables or disables the use of native validation. Use this for custom
+ * validation.
+ * @param useNativeValidation Set this to false to ignore native input
+ * validation.
+ */
+ MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) {
+ this.useNativeValidation = useNativeValidation;
+ };
+ MDCTextFieldFoundation.prototype.isDisabled = function () {
+ return this.getNativeInput().disabled;
+ };
+ /**
+ * @param disabled Sets the text-field disabled or enabled.
+ */
+ MDCTextFieldFoundation.prototype.setDisabled = function (disabled) {
+ this.getNativeInput().disabled = disabled;
+ this.styleDisabled(disabled);
+ };
+ /**
+ * @param content Sets the content of the helper text.
+ */
+ MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) {
+ if (this.helperText) {
+ this.helperText.setContent(content);
+ }
+ };
+ /**
+ * Sets the aria label of the leading icon.
+ */
+ MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) {
+ if (this.leadingIcon) {
+ this.leadingIcon.setAriaLabel(label);
+ }
+ };
+ /**
+ * Sets the text content of the leading icon.
+ */
+ MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) {
+ if (this.leadingIcon) {
+ this.leadingIcon.setContent(content);
+ }
+ };
+ /**
+ * Sets the aria label of the trailing icon.
+ */
+ MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) {
+ if (this.trailingIcon) {
+ this.trailingIcon.setAriaLabel(label);
+ }
+ };
+ /**
+ * Sets the text content of the trailing icon.
+ */
+ MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) {
+ if (this.trailingIcon) {
+ this.trailingIcon.setContent(content);
+ }
+ };
+ /**
+ * Sets character counter values that shows characters used and the total
+ * character limit.
+ */
+ MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) {
+ if (!this.characterCounter) {
+ return;
+ }
+ var maxLength = this.getNativeInput().maxLength;
+ if (maxLength === -1) {
+ throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');
+ }
+ this.characterCounter.setCounterValue(currentLength, maxLength);
+ };
+ /**
+ * @return True if the Text Field input fails in converting the user-supplied
+ * value.
+ */
+ MDCTextFieldFoundation.prototype.isBadInput = function () {
+ // The badInput property is not supported in IE 11 💩.
+ return this.getNativeInput().validity.badInput || false;
+ };
+ /**
+ * @return The result of native validity checking (ValidityState.valid).
+ */
+ MDCTextFieldFoundation.prototype.isNativeInputValid = function () {
+ return this.getNativeInput().validity.valid;
+ };
+ /**
+ * Styles the component based on the validity state.
+ */
+ MDCTextFieldFoundation.prototype.styleValidity = function (isValid) {
+ var INVALID = MDCTextFieldFoundation.cssClasses.INVALID;
+ if (isValid) {
+ this.adapter.removeClass(INVALID);
+ }
+ else {
+ this.adapter.addClass(INVALID);
+ }
+ if (this.helperText) {
+ this.helperText.setValidity(isValid);
+ // We dynamically set or unset aria-describedby for validation helper text
+ // only, based on whether the field is valid
+ var helperTextValidation = this.helperText.isValidation();
+ if (!helperTextValidation) {
+ return;
+ }
+ var helperTextVisible = this.helperText.isVisible();
+ var helperTextId = this.helperText.getId();
+ if (helperTextVisible && helperTextId) {
+ this.adapter.setInputAttr(strings.ARIA_DESCRIBEDBY, helperTextId);
+ }
+ else {
+ this.adapter.removeInputAttr(strings.ARIA_DESCRIBEDBY);
+ }
+ }
+ };
+ /**
+ * Styles the component based on the focused state.
+ */
+ MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) {
+ var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED;
+ if (isFocused) {
+ this.adapter.addClass(FOCUSED);
+ }
+ else {
+ this.adapter.removeClass(FOCUSED);
+ }
+ };
+ /**
+ * Styles the component based on the disabled state.
+ */
+ MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) {
+ var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID;
+ if (isDisabled) {
+ this.adapter.addClass(DISABLED);
+ this.adapter.removeClass(INVALID);
+ }
+ else {
+ this.adapter.removeClass(DISABLED);
+ }
+ if (this.leadingIcon) {
+ this.leadingIcon.setDisabled(isDisabled);
+ }
+ if (this.trailingIcon) {
+ this.trailingIcon.setDisabled(isDisabled);
+ }
+ };
+ /**
+ * Styles the component based on the label floating state.
+ */
+ MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) {
+ var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING;
+ if (isFloating) {
+ this.adapter.addClass(LABEL_FLOATING);
+ }
+ else {
+ this.adapter.removeClass(LABEL_FLOATING);
+ }
+ };
+ /**
+ * @return The native text input element from the host environment, or an
+ * object with the same shape for unit tests.
+ */
+ MDCTextFieldFoundation.prototype.getNativeInput = function () {
+ // this.adapter may be undefined in foundation unit tests. This happens when
+ // testdouble is creating a mock object and invokes the
+ // shouldShake/shouldFloat getters (which in turn call getValue(), which
+ // calls this method) before init() has been called from the MDCTextField
+ // constructor. To work around that issue, we return a dummy object.
+ var nativeInput = this.adapter ? this.adapter.getNativeInput() : null;
+ return nativeInput || {
+ disabled: false,
+ maxLength: -1,
+ required: false,
+ type: 'input',
+ validity: {
+ badInput: false,
+ valid: true,
+ },
+ value: '',
+ };
+ };
+ return MDCTextFieldFoundation;
+}(MDCFoundation));
+// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
+var MDCTextFieldFoundation$1 = MDCTextFieldFoundation;
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */
-const pn={},hn=Pe(class extends ze{constructor(e){if(super(e),e.type!==Be&&e.type!==Ne&&e.type!==He)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===z||t===V)return t;const i=e.element,n=e.name;if(e.type===Be){if(t===i[n])return z}else if(e.type===He){if(!!t===i.hasAttribute(n))return z}else if(e.type===Ne&&i.getAttribute(n)===t+"")return z;return((e,t=pn)=>{e._$AH=t;
+ */const e=o=>void 0===o.strings,f={},s=(o,l=f)=>o._$AH=l;
+
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */})(e),t}}),un=["touchstart","touchmove","scroll","mousewheel"],fn=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class gn extends $e{constructor(){super(...arguments),this.mdcFoundationClass=mn,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=fn(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&-1!==this.maxLength,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return P`
-
+ */const l=e$1(class extends i$1{constructor(r){if(super(r),r.type!==t.PROPERTY&&r.type!==t.ATTRIBUTE&&r.type!==t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!e(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(i,[t$1]){if(t$1===T||t$1===A)return t$1;const o=i.element,l=i.name;if(i.type===t.PROPERTY){if(t$1===o[l])return T}else if(i.type===t.BOOLEAN_ATTRIBUTE){if(!!t$1===o.hasAttribute(l))return T}else if(i.type===t.ATTRIBUTE&&o.getAttribute(l)===t$1+"")return T;return s(i),t$1}});
+
+/**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const passiveEvents = ['touchstart', 'touchmove', 'scroll', 'mousewheel'];
+const createValidityObj = (customValidity = {}) => {
+ /*
+ * We need to make ValidityState an object because it is readonly and
+ * we cannot use the spread operator. Also, we don't export
+ * `CustomValidityState` because it is a leaky implementation and the user
+ * already has access to `ValidityState` in lib.dom.ts. Also an interface
+ * {a: Type} can be casted to {readonly a: Type} so passing any object
+ * should be fine.
+ */
+ const objectifiedCustomValidity = {};
+ // eslint-disable-next-line guard-for-in
+ for (const propName in customValidity) {
+ /*
+ * Casting is needed because ValidityState's props are all readonly and
+ * thus cannot be set on `onjectifiedCustomValidity`. In the end, the
+ * interface is the same as ValidityState (but not readonly), but the
+ * function signature casts the output to ValidityState (thus readonly).
+ */
+ objectifiedCustomValidity[propName] =
+ customValidity[propName];
+ }
+ return Object.assign({ badInput: false, customError: false, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false, stepMismatch: false, tooLong: false, tooShort: false, typeMismatch: false, valid: true, valueMissing: false }, objectifiedCustomValidity);
+};
+/** @soyCompatible */
+class TextFieldBase extends FormElement {
+ constructor() {
+ super(...arguments);
+ this.mdcFoundationClass = MDCTextFieldFoundation$1;
+ this.value = '';
+ this.type = 'text';
+ this.placeholder = '';
+ this.label = '';
+ this.icon = '';
+ this.iconTrailing = '';
+ this.disabled = false;
+ this.required = false;
+ this.minLength = -1;
+ this.maxLength = -1;
+ this.outlined = false;
+ this.helper = '';
+ this.validateOnInitialRender = false;
+ this.validationMessage = '';
+ this.autoValidate = false;
+ this.pattern = '';
+ this.min = '';
+ this.max = '';
+ /**
+ * step can be a number or the keyword "any".
+ *
+ * Use `String` typing to pass down the value as a string and let the native
+ * input cast internally as needed.
+ */
+ this.step = null;
+ this.size = null;
+ this.helperPersistent = false;
+ this.charCounter = false;
+ this.endAligned = false;
+ this.prefix = '';
+ this.suffix = '';
+ this.name = '';
+ this.readOnly = false;
+ this.autocapitalize = '';
+ this.outlineOpen = false;
+ this.outlineWidth = 0;
+ this.isUiValid = true;
+ this.focused = false;
+ this._validity = createValidityObj();
+ this.validityTransform = null;
+ }
+ get validity() {
+ this._checkValidity(this.value);
+ return this._validity;
+ }
+ get willValidate() {
+ return this.formElement.willValidate;
+ }
+ get selectionStart() {
+ return this.formElement.selectionStart;
+ }
+ get selectionEnd() {
+ return this.formElement.selectionEnd;
+ }
+ focus() {
+ const focusEvt = new CustomEvent('focus');
+ this.formElement.dispatchEvent(focusEvt);
+ this.formElement.focus();
+ }
+ blur() {
+ const blurEvt = new CustomEvent('blur');
+ this.formElement.dispatchEvent(blurEvt);
+ this.formElement.blur();
+ }
+ select() {
+ this.formElement.select();
+ }
+ setSelectionRange(selectionStart, selectionEnd, selectionDirection) {
+ this.formElement.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
+ }
+ update(changedProperties) {
+ if (changedProperties.has('autoValidate') && this.mdcFoundation) {
+ this.mdcFoundation.setValidateOnValueChange(this.autoValidate);
+ }
+ if (changedProperties.has('value') && typeof this.value !== 'string') {
+ this.value = `${this.value}`;
+ }
+ super.update(changedProperties);
+ }
+ setFormData(formData) {
+ if (this.name) {
+ formData.append(this.name, this.value);
+ }
+ }
+ /** @soyTemplate */
+ render() {
+ const shouldRenderCharCounter = this.charCounter && this.maxLength !== -1;
+ const shouldRenderHelperText = !!this.helper || !!this.validationMessage || shouldRenderCharCounter;
+ /** @classMap */
+ const classes = {
+ 'mdc-text-field--disabled': this.disabled,
+ 'mdc-text-field--no-label': !this.label,
+ 'mdc-text-field--filled': !this.outlined,
+ 'mdc-text-field--outlined': this.outlined,
+ 'mdc-text-field--with-leading-icon': this.icon,
+ 'mdc-text-field--with-trailing-icon': this.iconTrailing,
+ 'mdc-text-field--end-aligned': this.endAligned,
+ };
+ return x `
+
${this.renderRipple()}
- ${this.outlined?this.renderOutline():this.renderLabel()}
+ ${this.outlined ? this.renderOutline() : this.renderLabel()}
${this.renderLeadingIcon()}
${this.renderPrefix()}
- ${this.renderInput(t)}
+ ${this.renderInput(shouldRenderHelperText)}
${this.renderSuffix()}
${this.renderTrailingIcon()}
${this.renderLineRipple()}
- ${this.renderHelperText(t,e)}
- `}updated(e){e.has("value")&&void 0!==e.get("value")&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":P`
+ ${this.renderHelperText(shouldRenderHelperText, shouldRenderCharCounter)}
+ `;
+ }
+ updated(changedProperties) {
+ if (changedProperties.has('value') &&
+ changedProperties.get('value') !== undefined) {
+ this.mdcFoundation.setValue(this.value);
+ if (this.autoValidate) {
+ this.reportValidity();
+ }
+ }
+ }
+ /** @soyTemplate */
+ renderRipple() {
+ return this.outlined ? '' : x `
- `}renderOutline(){return this.outlined?P`
+ `;
+ }
+ /** @soyTemplate */
+ renderOutline() {
+ return !this.outlined ? '' : x `
${this.renderLabel()}
- `:""}renderLabel(){return this.label?P`
+ `;
+ }
+ /** @soyTemplate */
+ renderLabel() {
+ return !this.label ?
+ '' :
+ x `
${this.label}
- `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(e,t=!1){return P`${e} `}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(e,t=!1){return P`
- ${e} `}renderInput(e){const t=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,n=this.autocapitalize?this.autocapitalize:void 0,r=this.validationMessage&&!this.isUiValid,a=this.label?"label":void 0,o=e?"helper-text":void 0,d=this.focused||this.helperPersistent||r?"helper-text":void 0;return P`
+ `;
+ }
+ /** @soyTemplate */
+ renderLeadingIcon() {
+ return this.icon ? this.renderIcon(this.icon) : '';
+ }
+ /** @soyTemplate */
+ renderTrailingIcon() {
+ return this.iconTrailing ? this.renderIcon(this.iconTrailing, true) : '';
+ }
+ /** @soyTemplate */
+ renderIcon(icon, isTrailingIcon = false) {
+ /** @classMap */
+ const classes = {
+ 'mdc-text-field__icon--leading': !isTrailingIcon,
+ 'mdc-text-field__icon--trailing': isTrailingIcon
+ };
+ return x `${icon} `;
+ }
+ /** @soyTemplate */
+ renderPrefix() {
+ return this.prefix ? this.renderAffix(this.prefix) : '';
+ }
+ /** @soyTemplate */
+ renderSuffix() {
+ return this.suffix ? this.renderAffix(this.suffix, true) : '';
+ }
+ /** @soyTemplate */
+ renderAffix(content, isSuffix = false) {
+ /** @classMap */
+ const classes = {
+ 'mdc-text-field__affix--prefix': !isSuffix,
+ 'mdc-text-field__affix--suffix': isSuffix
+ };
+ return x `
+ ${content} `;
+ }
+ /** @soyTemplate */
+ renderInput(shouldRenderHelperText) {
+ const minOrUndef = this.minLength === -1 ? undefined : this.minLength;
+ const maxOrUndef = this.maxLength === -1 ? undefined : this.maxLength;
+ const autocapitalizeOrUndef = this.autocapitalize ?
+ this.autocapitalize :
+ undefined;
+ const showValidationMessage = this.validationMessage && !this.isUiValid;
+ const ariaLabelledbyOrUndef = !!this.label ? 'label' : undefined;
+ const ariaControlsOrUndef = shouldRenderHelperText ? 'helper-text' : undefined;
+ const ariaDescribedbyOrUndef = this.focused || this.helperPersistent || showValidationMessage ?
+ 'helper-text' :
+ undefined;
+ // TODO: live() directive needs casting for lit-analyzer
+ // https://github.com/runem/lit-analyzer/pull/91/files
+ // TODO: lit-analyzer labels min/max as (number|string) instead of string
+ return x `
`}renderLineRipple(){return this.outlined?"":P`
-
- `}renderHelperText(e,t){const i=this.validationMessage&&!this.isUiValid,n={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},r=this.focused||this.helperPersistent||i?void 0:"true",a=i?this.validationMessage:this.helper;return e?P`
+ @blur="${this.onInputBlur}">`;
+ }
+ /** @soyTemplate */
+ renderLineRipple() {
+ return this.outlined ?
+ '' :
+ x `
+
+ `;
+ }
+ /** @soyTemplate */
+ renderHelperText(shouldRenderHelperText, shouldRenderCharCounter) {
+ const showValidationMessage = this.validationMessage && !this.isUiValid;
+ /** @classMap */
+ const classes = {
+ 'mdc-text-field-helper-text--persistent': this.helperPersistent,
+ 'mdc-text-field-helper-text--validation-msg': showValidationMessage,
+ };
+ const ariaHiddenOrUndef = this.focused || this.helperPersistent || showValidationMessage ?
+ undefined :
+ 'true';
+ const helperText = showValidationMessage ? this.validationMessage : this.helper;
+ return !shouldRenderHelperText ? '' : x `
${a}
- ${this.renderCharCounter(t)}
-
`:""}renderCharCounter(e){const t=Math.min(this.value.length,this.maxLength);return e?P`
+ aria-hidden="${l$1(ariaHiddenOrUndef)}"
+ class="mdc-text-field-helper-text ${o(classes)}"
+ >${helperText}
+ ${this.renderCharCounter(shouldRenderCharCounter)}
+ `;
+ }
+ /** @soyTemplate */
+ renderCharCounter(shouldRenderCharCounter) {
+ const length = Math.min(this.value.length, this.maxLength);
+ return !shouldRenderCharCounter ? '' : x `
${t} / ${this.maxLength} `:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=fn(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=new MutationObserver((t=>{e((e=>e.map((e=>e.attributeName)).filter((e=>e)))(t))}));return t.observe(this.formElement,{attributes:!0}),t},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},Ae(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in un}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await(null===(e=this.outlineElement)||void 0===e?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(e=this.outlineElement)||void 0===e||e.updateComplete.then((()=>{var e;this.outlineWidth=(null===(e=this.labelElement)||void 0===e?void 0:e.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e)return void(this.outlineOpen=!1);const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}n([he(".mdc-text-field")],gn.prototype,"mdcRoot",void 0),n([he("input")],gn.prototype,"formElement",void 0),n([he(".mdc-floating-label")],gn.prototype,"labelElement",void 0),n([he(".mdc-line-ripple")],gn.prototype,"lineRippleElement",void 0),n([he("mwc-notched-outline")],gn.prototype,"outlineElement",void 0),n([he(".mdc-notched-outline__notch")],gn.prototype,"notchElement",void 0),n([se({type:String})],gn.prototype,"value",void 0),n([se({type:String})],gn.prototype,"type",void 0),n([se({type:String})],gn.prototype,"placeholder",void 0),n([se({type:String}),Me((function(e,t){void 0!==t&&this.label!==t&&this.layout()}))],gn.prototype,"label",void 0),n([se({type:String})],gn.prototype,"icon",void 0),n([se({type:String})],gn.prototype,"iconTrailing",void 0),n([se({type:Boolean,reflect:!0})],gn.prototype,"disabled",void 0),n([se({type:Boolean})],gn.prototype,"required",void 0),n([se({type:Number})],gn.prototype,"minLength",void 0),n([se({type:Number})],gn.prototype,"maxLength",void 0),n([se({type:Boolean,reflect:!0}),Me((function(e,t){void 0!==t&&this.outlined!==t&&this.layout()}))],gn.prototype,"outlined",void 0),n([se({type:String})],gn.prototype,"helper",void 0),n([se({type:Boolean})],gn.prototype,"validateOnInitialRender",void 0),n([se({type:String})],gn.prototype,"validationMessage",void 0),n([se({type:Boolean})],gn.prototype,"autoValidate",void 0),n([se({type:String})],gn.prototype,"pattern",void 0),n([se({type:String})],gn.prototype,"min",void 0),n([se({type:String})],gn.prototype,"max",void 0),n([se({type:String})],gn.prototype,"step",void 0),n([se({type:Number})],gn.prototype,"size",void 0),n([se({type:Boolean})],gn.prototype,"helperPersistent",void 0),n([se({type:Boolean})],gn.prototype,"charCounter",void 0),n([se({type:Boolean})],gn.prototype,"endAligned",void 0),n([se({type:String})],gn.prototype,"prefix",void 0),n([se({type:String})],gn.prototype,"suffix",void 0),n([se({type:String})],gn.prototype,"name",void 0),n([se({type:String})],gn.prototype,"inputMode",void 0),n([se({type:Boolean})],gn.prototype,"readOnly",void 0),n([se({type:String})],gn.prototype,"autocapitalize",void 0),n([ce()],gn.prototype,"outlineOpen",void 0),n([ce()],gn.prototype,"outlineWidth",void 0),n([ce()],gn.prototype,"isUiValid",void 0),n([ce()],gn.prototype,"focused",void 0),n([pe({passive:!0})],gn.prototype,"handleInputChange",null);
+ >${length} / ${this.maxLength}`;
+ }
+ onInputFocus() {
+ this.focused = true;
+ }
+ onInputBlur() {
+ this.focused = false;
+ this.reportValidity();
+ }
+ checkValidity() {
+ const isValid = this._checkValidity(this.value);
+ if (!isValid) {
+ const invalidEvent = new Event('invalid', { bubbles: false, cancelable: true });
+ this.dispatchEvent(invalidEvent);
+ }
+ return isValid;
+ }
+ reportValidity() {
+ const isValid = this.checkValidity();
+ this.mdcFoundation.setValid(isValid);
+ this.isUiValid = isValid;
+ return isValid;
+ }
+ _checkValidity(value) {
+ const nativeValidity = this.formElement.validity;
+ let validity = createValidityObj(nativeValidity);
+ if (this.validityTransform) {
+ const customValidity = this.validityTransform(value, validity);
+ validity = Object.assign(Object.assign({}, validity), customValidity);
+ this.mdcFoundation.setUseNativeValidation(false);
+ }
+ else {
+ this.mdcFoundation.setUseNativeValidation(true);
+ }
+ this._validity = validity;
+ return this._validity.valid;
+ }
+ setCustomValidity(message) {
+ this.validationMessage = message;
+ this.formElement.setCustomValidity(message);
+ }
+ handleInputChange() {
+ this.value = this.formElement.value;
+ }
+ createAdapter() {
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getRootAdapterMethods()), this.getInputAdapterMethods()), this.getLabelAdapterMethods()), this.getLineRippleAdapterMethods()), this.getOutlineAdapterMethods());
+ }
+ getRootAdapterMethods() {
+ return Object.assign({ registerTextFieldInteractionHandler: (evtType, handler) => this.addEventListener(evtType, handler), deregisterTextFieldInteractionHandler: (evtType, handler) => this.removeEventListener(evtType, handler), registerValidationAttributeChangeHandler: (handler) => {
+ const getAttributesList = (mutationsList) => {
+ return mutationsList.map((mutation) => mutation.attributeName)
+ .filter((attributeName) => attributeName);
+ };
+ const observer = new MutationObserver((mutationsList) => {
+ handler(getAttributesList(mutationsList));
+ });
+ const config = { attributes: true };
+ observer.observe(this.formElement, config);
+ return observer;
+ }, deregisterValidationAttributeChangeHandler: (observer) => observer.disconnect() }, addHasRemoveClass(this.mdcRoot));
+ }
+ getInputAdapterMethods() {
+ return {
+ getNativeInput: () => this.formElement,
+ // since HelperTextFoundation is not used, aria-describedby a11y logic
+ // is implemented in render method instead of these adapter methods
+ setInputAttr: () => undefined,
+ removeInputAttr: () => undefined,
+ isFocused: () => this.shadowRoot ?
+ this.shadowRoot.activeElement === this.formElement :
+ false,
+ registerInputInteractionHandler: (evtType, handler) => this.formElement.addEventListener(evtType, handler, { passive: evtType in passiveEvents }),
+ deregisterInputInteractionHandler: (evtType, handler) => this.formElement.removeEventListener(evtType, handler),
+ };
+ }
+ getLabelAdapterMethods() {
+ return {
+ floatLabel: (shouldFloat) => this.labelElement &&
+ this.labelElement.floatingLabelFoundation.float(shouldFloat),
+ getLabelWidth: () => {
+ return this.labelElement ?
+ this.labelElement.floatingLabelFoundation.getWidth() :
+ 0;
+ },
+ hasLabel: () => Boolean(this.labelElement),
+ shakeLabel: (shouldShake) => this.labelElement &&
+ this.labelElement.floatingLabelFoundation.shake(shouldShake),
+ setLabelRequired: (isRequired) => {
+ if (this.labelElement) {
+ this.labelElement.floatingLabelFoundation.setRequired(isRequired);
+ }
+ },
+ };
+ }
+ getLineRippleAdapterMethods() {
+ return {
+ activateLineRipple: () => {
+ if (this.lineRippleElement) {
+ this.lineRippleElement.lineRippleFoundation.activate();
+ }
+ },
+ deactivateLineRipple: () => {
+ if (this.lineRippleElement) {
+ this.lineRippleElement.lineRippleFoundation.deactivate();
+ }
+ },
+ setLineRippleTransformOrigin: (normalizedX) => {
+ if (this.lineRippleElement) {
+ this.lineRippleElement.lineRippleFoundation.setRippleCenter(normalizedX);
+ }
+ },
+ };
+ }
+ // tslint:disable:ban-ts-ignore
+ async getUpdateComplete() {
+ var _a;
+ // @ts-ignore
+ const result = await super.getUpdateComplete();
+ await ((_a = this.outlineElement) === null || _a === void 0 ? void 0 : _a.updateComplete);
+ return result;
+ }
+ // tslint:enable:ban-ts-ignore
+ firstUpdated() {
+ var _a;
+ super.firstUpdated();
+ this.mdcFoundation.setValidateOnValueChange(this.autoValidate);
+ if (this.validateOnInitialRender) {
+ this.reportValidity();
+ }
+ // wait for the outline element to render to update the notch width
+ (_a = this.outlineElement) === null || _a === void 0 ? void 0 : _a.updateComplete.then(() => {
+ var _a;
+ // `foundation.notchOutline()` assumes the label isn't floating and
+ // multiplies by a constant, but the label is already is floating at this
+ // stage, therefore directly set the outline width to the label width
+ this.outlineWidth =
+ ((_a = this.labelElement) === null || _a === void 0 ? void 0 : _a.floatingLabelFoundation.getWidth()) || 0;
+ });
+ }
+ getOutlineAdapterMethods() {
+ return {
+ closeOutline: () => this.outlineElement && (this.outlineOpen = false),
+ hasOutline: () => Boolean(this.outlineElement),
+ notchOutline: (labelWidth) => {
+ const outlineElement = this.outlineElement;
+ if (outlineElement && !this.outlineOpen) {
+ this.outlineWidth = labelWidth;
+ this.outlineOpen = true;
+ }
+ }
+ };
+ }
+ async layout() {
+ await this.updateComplete;
+ const labelElement = this.labelElement;
+ if (!labelElement) {
+ this.outlineOpen = false;
+ return;
+ }
+ const shouldFloat = !!this.label && !!this.value;
+ labelElement.floatingLabelFoundation.float(shouldFloat);
+ if (!this.outlined) {
+ return;
+ }
+ this.outlineOpen = shouldFloat;
+ await this.updateComplete;
+ /* When the textfield automatically notches due to a value and label
+ * being defined, the textfield may be set to `display: none` by the user.
+ * this means that the notch is of size 0px. We provide this function so
+ * that the user may manually resize the notch to the floated label's
+ * width.
+ */
+ const labelWidth = labelElement.floatingLabelFoundation.getWidth();
+ if (this.outlineOpen) {
+ this.outlineWidth = labelWidth;
+ await this.updateComplete;
+ }
+ }
+}
+__decorate([
+ i$2('.mdc-text-field')
+], TextFieldBase.prototype, "mdcRoot", void 0);
+__decorate([
+ i$2('input')
+], TextFieldBase.prototype, "formElement", void 0);
+__decorate([
+ i$2('.mdc-floating-label')
+], TextFieldBase.prototype, "labelElement", void 0);
+__decorate([
+ i$2('.mdc-line-ripple')
+], TextFieldBase.prototype, "lineRippleElement", void 0);
+__decorate([
+ i$2('mwc-notched-outline')
+], TextFieldBase.prototype, "outlineElement", void 0);
+__decorate([
+ i$2('.mdc-notched-outline__notch')
+], TextFieldBase.prototype, "notchElement", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "value", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "type", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "placeholder", void 0);
+__decorate([
+ e$6({ type: String }),
+ observer(function (_newVal, oldVal) {
+ if (oldVal !== undefined && this.label !== oldVal) {
+ this.layout();
+ }
+ })
+], TextFieldBase.prototype, "label", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "icon", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "iconTrailing", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], TextFieldBase.prototype, "disabled", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "required", void 0);
+__decorate([
+ e$6({ type: Number })
+], TextFieldBase.prototype, "minLength", void 0);
+__decorate([
+ e$6({ type: Number })
+], TextFieldBase.prototype, "maxLength", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true }),
+ observer(function (_newVal, oldVal) {
+ if (oldVal !== undefined && this.outlined !== oldVal) {
+ this.layout();
+ }
+ })
+], TextFieldBase.prototype, "outlined", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "helper", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "validateOnInitialRender", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "validationMessage", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "autoValidate", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "pattern", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "min", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "max", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "step", void 0);
+__decorate([
+ e$6({ type: Number })
+], TextFieldBase.prototype, "size", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "helperPersistent", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "charCounter", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "endAligned", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "prefix", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "suffix", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "name", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "inputMode", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], TextFieldBase.prototype, "readOnly", void 0);
+__decorate([
+ e$6({ type: String })
+], TextFieldBase.prototype, "autocapitalize", void 0);
+__decorate([
+ t$2()
+], TextFieldBase.prototype, "outlineOpen", void 0);
+__decorate([
+ t$2()
+], TextFieldBase.prototype, "outlineWidth", void 0);
+__decorate([
+ t$2()
+], TextFieldBase.prototype, "isUiValid", void 0);
+__decorate([
+ t$2()
+], TextFieldBase.prototype, "focused", void 0);
+__decorate([
+ e$5({ passive: true })
+], TextFieldBase.prototype, "handleInputChange", null);
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
*/
-const bn=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{content:none}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`,vn={"mwc-textfield":class extends gn{static get styles(){return bn}},"mwc-notched-outline":class extends Pi{static get styles(){return Gi}}};
+const styles$1 = i$5 `.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px;z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{content:none}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;
+
+const textfieldDefinition = {
+ 'mwc-textfield': class extends TextFieldBase {
+ static get styles() {
+ return styles$1;
+ }
+ },
+ 'mwc-notched-outline': class extends NotchedOutlineBase {
+ static get styles() {
+ return styles$3;
+ }
+ }
+};
+
/**
* @license
* Copyright 2020 Google Inc.
@@ -945,7 +8576,25 @@ const bn=c`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-sm
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var xn,_n;!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(xn||(xn={})),function(e){e[e.START=1]="START",e[e.END=2]="END"}(_n||(_n={}));
+/** Tick mark enum, for discrete sliders. */
+var TickMark;
+(function (TickMark) {
+ TickMark[TickMark["ACTIVE"] = 0] = "ACTIVE";
+ TickMark[TickMark["INACTIVE"] = 1] = "INACTIVE";
+})(TickMark || (TickMark = {}));
+/**
+ * Thumb types: range slider has two thumbs (START, END) whereas single point
+ * slider only has one thumb (END).
+ */
+var Thumb;
+(function (Thumb) {
+ // Thumb at start of slider (e.g. in LTR mode, left thumb on range slider).
+ Thumb[Thumb["START"] = 1] = "START";
+ // Thumb at end of slider (e.g. in LTR mode, right thumb on range slider,
+ // or only thumb on single point slider).
+ Thumb[Thumb["END"] = 2] = "END";
+})(Thumb || (Thumb = {}));
+
/**
* @license
* Copyright 2020 Google Inc.
@@ -968,7 +8617,69 @@ var xn,_n;!function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"}(xn||(x
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-var yn=function(){function e(){this.rafIDs=new Map}return e.prototype.request=function(e,t){var i=this;this.cancel(e);var n=requestAnimationFrame((function(n){i.rafIDs.delete(e),t(n)}));this.rafIDs.set(e,n)},e.prototype.cancel=function(e){var t=this.rafIDs.get(e);t&&(cancelAnimationFrame(t),this.rafIDs.delete(e))},e.prototype.cancelAll=function(){var e=this;this.rafIDs.forEach((function(t,i){e.cancel(i)}))},e.prototype.getQueue=function(){var e=[];return this.rafIDs.forEach((function(t,i){e.push(i)})),e},e}(),wn={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}};
+/**
+ * AnimationFrame provides a user-friendly abstraction around requesting
+ * and canceling animation frames.
+ */
+var AnimationFrame = /** @class */ (function () {
+ function AnimationFrame() {
+ this.rafIDs = new Map();
+ }
+ /**
+ * Requests an animation frame. Cancels any existing frame with the same key.
+ * @param {string} key The key for this callback.
+ * @param {FrameRequestCallback} callback The callback to be executed.
+ */
+ AnimationFrame.prototype.request = function (key, callback) {
+ var _this = this;
+ this.cancel(key);
+ var frameID = requestAnimationFrame(function (frame) {
+ _this.rafIDs.delete(key);
+ // Callback must come *after* the key is deleted so that nested calls to
+ // request with the same key are not deleted.
+ callback(frame);
+ });
+ this.rafIDs.set(key, frameID);
+ };
+ /**
+ * Cancels a queued callback with the given key.
+ * @param {string} key The key for this callback.
+ */
+ AnimationFrame.prototype.cancel = function (key) {
+ var rafID = this.rafIDs.get(key);
+ if (rafID) {
+ cancelAnimationFrame(rafID);
+ this.rafIDs.delete(key);
+ }
+ };
+ /**
+ * Cancels all queued callback.
+ */
+ AnimationFrame.prototype.cancelAll = function () {
+ var _this = this;
+ // Need to use forEach because it's the only iteration method supported
+ // by IE11. Suppress the underscore because we don't need it.
+ // tslint:disable-next-line:enforce-name-casing
+ this.rafIDs.forEach(function (_, key) {
+ _this.cancel(key);
+ });
+ };
+ /**
+ * Returns the queue of unexecuted callback keys.
+ */
+ AnimationFrame.prototype.getQueue = function () {
+ var queue = [];
+ // Need to use forEach because it's the only iteration method supported
+ // by IE11. Suppress the underscore because we don't need it.
+ // tslint:disable-next-line:enforce-name-casing
+ this.rafIDs.forEach(function (_, key) {
+ queue.push(key);
+ });
+ return queue;
+ };
+ return AnimationFrame;
+}());
+
/**
* @license
* Copyright 2016 Google Inc.
@@ -990,7 +8701,98 @@ var yn=function(){function e(){this.rafIDs=new Map}return e.prototype.request=fu
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */function En(e,t){if(function(e){return Boolean(e.document)&&"function"==typeof e.document.createElement}(e)&&t in wn){var i=e.document.createElement("div"),n=wn[t],r=n.standard,a=n.prefixed;return r in i.style?r:a}return t}
+ */
+var cssPropertyNameMap = {
+ animation: {
+ prefixed: '-webkit-animation',
+ standard: 'animation',
+ },
+ transform: {
+ prefixed: '-webkit-transform',
+ standard: 'transform',
+ },
+ transition: {
+ prefixed: '-webkit-transition',
+ standard: 'transition',
+ },
+};
+function isWindow(windowObj) {
+ return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function';
+}
+function getCorrectPropertyName(windowObj, cssProperty) {
+ if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) {
+ var el = windowObj.document.createElement('div');
+ var _a = cssPropertyNameMap[cssProperty], standard = _a.standard, prefixed = _a.prefixed;
+ var isStandard = standard in el.style;
+ return isStandard ? standard : prefixed;
+ }
+ return cssProperty;
+}
+
+/**
+ * @license
+ * Copyright 2020 Google Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+/** Slider element classes. */
+var cssClasses = {
+ DISABLED: 'mdc-slider--disabled',
+ DISCRETE: 'mdc-slider--discrete',
+ INPUT: 'mdc-slider__input',
+ RANGE: 'mdc-slider--range',
+ THUMB: 'mdc-slider__thumb',
+ // Applied when thumb is in the focused state.
+ THUMB_FOCUSED: 'mdc-slider__thumb--focused',
+ THUMB_KNOB: 'mdc-slider__thumb-knob',
+ // Class added to the top thumb (for overlapping thumbs in range slider).
+ THUMB_TOP: 'mdc-slider__thumb--top',
+ THUMB_WITH_INDICATOR: 'mdc-slider__thumb--with-indicator',
+ TICK_MARKS: 'mdc-slider--tick-marks',
+ TICK_MARKS_CONTAINER: 'mdc-slider__tick-marks',
+ TICK_MARK_ACTIVE: 'mdc-slider__tick-mark--active',
+ TICK_MARK_INACTIVE: 'mdc-slider__tick-mark--inactive',
+ TRACK: 'mdc-slider__track',
+ // The active track fill element that will be scaled as the value changes.
+ TRACK_ACTIVE: 'mdc-slider__track--active_fill',
+ VALUE_INDICATOR_TEXT: 'mdc-slider__value-indicator-text',
+};
+/** Slider numbers. */
+var numbers = {
+ // Default step size.
+ STEP_SIZE: 1,
+ // Minimum absolute difference between clientX of move event / down event
+ // for which to update thumb, in the case of overlapping thumbs.
+ // This is needed to reduce chances of choosing the thumb based on
+ // pointer jitter.
+ THUMB_UPDATE_MIN_PX: 5,
+};
+/** Slider attributes. */
+var attributes = {
+ ARIA_VALUETEXT: 'aria-valuetext',
+ INPUT_DISABLED: 'disabled',
+ INPUT_MIN: 'min',
+ INPUT_MAX: 'max',
+ INPUT_VALUE: 'value',
+ INPUT_STEP: 'step',
+};
+
/**
* @license
* Copyright 2020 Google Inc.
@@ -1012,25 +8814,982 @@ var yn=function(){function e(){this.rafIDs=new Map}return e.prototype.request=fu
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var Tn,In="mdc-slider--disabled",An="mdc-slider--discrete",Cn="mdc-slider--range",Sn="mdc-slider__thumb--focused",Rn="mdc-slider__thumb--top",kn="mdc-slider__thumb--with-indicator",On="mdc-slider--tick-marks",Ln=1,Fn=5,Dn="aria-valuetext",$n="disabled",Mn="min",Nn="max",Bn="value",Hn="step";!function(e){e.SLIDER_UPDATE="slider_update"}(Tn||(Tn={}));var Pn="undefined"!=typeof window,zn=function(e){function n(t){var r=e.call(this,i(i({},n.defaultAdapter),t))||this;return r.initialStylesRemoved=!1,r.isDisabled=!1,r.isDiscrete=!1,r.step=Ln,r.hasTickMarks=!1,r.isRange=!1,r.thumb=null,r.downEventClientX=null,r.startThumbKnobWidth=0,r.endThumbKnobWidth=0,r.animFrame=new yn,r}return t(n,e),Object.defineProperty(n,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},getThumbKnobWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),n.prototype.init=function(){var e=this;this.isDisabled=this.adapter.hasClass(In),this.isDiscrete=this.adapter.hasClass(An),this.hasTickMarks=this.adapter.hasClass(On),this.isRange=this.adapter.hasClass(Cn);var t=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(Mn,this.isRange?_n.START:_n.END),Mn),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(Nn,_n.END),Nn),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(Bn,_n.END),Bn),r=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(Bn,_n.START),Bn):t,a=this.adapter.getInputAttribute(Hn,_n.END),o=a?this.convertAttributeValueToNumber(a,Hn):this.step;this.validateProperties({min:t,max:i,value:n,valueStart:r,step:o}),this.min=t,this.max=i,this.value=n,this.valueStart=r,this.step=o,this.numDecimalPlaces=Vn(this.step),this.valueBeforeDownEvent=n,this.valueStartBeforeDownEvent=r,this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){e.handleInputChange(_n.START)},this.inputEndChangeListener=function(){e.handleInputChange(_n.END)},this.inputStartFocusListener=function(){e.handleInputFocus(_n.START)},this.inputEndFocusListener=function(){e.handleInputFocus(_n.END)},this.inputStartBlurListener=function(){e.handleInputBlur(_n.START)},this.inputEndBlurListener=function(){e.handleInputBlur(_n.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},n.prototype.destroy=function(){this.deregisterEventHandlers()},n.prototype.setMin=function(e){this.min=e,this.isRange||(this.valueStart=e),this.updateUI()},n.prototype.setMax=function(e){this.max=e,this.updateUI()},n.prototype.getMin=function(){return this.min},n.prototype.getMax=function(){return this.max},n.prototype.getValue=function(){return this.value},n.prototype.setValue=function(e){if(this.isRange&&e= start thumb value ("+this.valueStart+")");this.updateValue(e,_n.END)},n.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},n.prototype.setValueStart=function(e){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&e>this.value)throw new Error("start thumb value ("+e+") must be <= end thumb value ("+this.value+")");this.updateValue(e,_n.START)},n.prototype.setStep=function(e){this.step=e,this.numDecimalPlaces=Vn(e),this.updateUI()},n.prototype.setIsDiscrete=function(e){this.isDiscrete=e,this.updateValueIndicatorUI(),this.updateTickMarksUI()},n.prototype.getStep=function(){return this.step},n.prototype.setHasTickMarks=function(e){this.hasTickMarks=e,this.updateTickMarksUI()},n.prototype.getDisabled=function(){return this.isDisabled},n.prototype.setDisabled=function(e){this.isDisabled=e,e?(this.adapter.addClass(In),this.isRange&&this.adapter.setInputAttribute($n,"",_n.START),this.adapter.setInputAttribute($n,"",_n.END)):(this.adapter.removeClass(In),this.isRange&&this.adapter.removeInputAttribute($n,_n.START),this.adapter.removeInputAttribute($n,_n.END))},n.prototype.getIsRange=function(){return this.isRange},n.prototype.layout=function(e){var t=(void 0===e?{}:e).skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(_n.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(_n.END)),t||this.updateUI()},n.prototype.handleResize=function(){this.layout()},n.prototype.handleDown=function(e){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX;this.downEventClientX=t;var i=this.mapClientXOnSliderScale(t);this.thumb=this.getThumbFromDownEvent(t,i),null!==this.thumb&&(this.handleDragStart(e,i,this.thumb),this.updateValue(i,this.thumb,{emitInputEvent:!0}))}},n.prototype.handleMove=function(e){if(!this.isDisabled){e.preventDefault();var t=null!=e.clientX?e.clientX:e.targetTouches[0].clientX,i=null!=this.thumb;if(this.thumb=this.getThumbFromMoveEvent(t),null!==this.thumb){var n=this.mapClientXOnSliderScale(t);i||(this.handleDragStart(e,n,this.thumb),this.adapter.emitDragStartEvent(n,this.thumb)),this.updateValue(n,this.thumb,{emitInputEvent:!0})}}},n.prototype.handleUp=function(){if(!this.isDisabled&&null!==this.thumb){var e=this.thumb===_n.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,t=this.thumb===_n.START?this.valueStart:this.value;e!==t&&this.adapter.emitChangeEvent(t,this.thumb),this.adapter.emitDragEndEvent(t,this.thumb),this.thumb=null}},n.prototype.handleThumbMouseenter=function(){this.isDiscrete&&this.isRange&&(this.adapter.addThumbClass(kn,_n.START),this.adapter.addThumbClass(kn,_n.END))},n.prototype.handleThumbMouseleave=function(){this.isDiscrete&&this.isRange&&(this.adapter.isInputFocused(_n.START)||this.adapter.isInputFocused(_n.END)||(this.adapter.removeThumbClass(kn,_n.START),this.adapter.removeThumbClass(kn,_n.END)))},n.prototype.handleMousedownOrTouchstart=function(e){var t=this,i="mousedown"===e.type?"mousemove":"touchmove";this.adapter.registerBodyEventHandler(i,this.moveListener);var n=function(){t.handleUp(),t.adapter.deregisterBodyEventHandler(i,t.moveListener),t.adapter.deregisterEventHandler("mouseup",n),t.adapter.deregisterEventHandler("touchend",n)};this.adapter.registerBodyEventHandler("mouseup",n),this.adapter.registerBodyEventHandler("touchend",n),this.handleDown(e)},n.prototype.handlePointerdown=function(e){this.adapter.setPointerCapture(e.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(e)},n.prototype.handleInputChange=function(e){var t=Number(this.adapter.getInputValue(e));e===_n.START?this.setValueStart(t):this.setValue(t),this.adapter.emitChangeEvent(e===_n.START?this.valueStart:this.value,e),this.adapter.emitInputEvent(e===_n.START?this.valueStart:this.value,e)},n.prototype.handleInputFocus=function(e){if(this.adapter.addThumbClass(Sn,e),this.isDiscrete&&(this.adapter.addThumbClass(kn,e),this.isRange)){var t=e===_n.START?_n.END:_n.START;this.adapter.addThumbClass(kn,t)}},n.prototype.handleInputBlur=function(e){if(this.adapter.removeThumbClass(Sn,e),this.isDiscrete&&(this.adapter.removeThumbClass(kn,e),this.isRange)){var t=e===_n.START?_n.END:_n.START;this.adapter.removeThumbClass(kn,t)}},n.prototype.handleDragStart=function(e,t,i){this.adapter.emitDragStartEvent(t,i),this.adapter.focusInput(i),e.preventDefault()},n.prototype.getThumbFromDownEvent=function(e,t){if(!this.isRange)return _n.END;var i=this.adapter.getThumbBoundingClientRect(_n.START),n=this.adapter.getThumbBoundingClientRect(_n.END),r=e>=i.left&&e<=i.right,a=e>=n.left&&e<=n.right;return r&&a?null:r?_n.START:a?_n.END:tthis.value?_n.END:t-this.valueStart<=this.value-t?_n.START:_n.END},n.prototype.getThumbFromMoveEvent=function(e){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw new Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-e)this.value?this.value:this.isRange&&t===_n.END&&e=r}else{n=e+this.startThumbKnobWidth/2>=t-this.endThumbKnobWidth/2}n?(this.adapter.addThumbClass(Rn,i||_n.END),this.adapter.removeThumbClass(Rn,i===_n.START?_n.END:_n.START)):(this.adapter.removeThumbClass(Rn,_n.START),this.adapter.removeThumbClass(Rn,_n.END))},n.prototype.convertAttributeValueToNumber=function(e,t){if(null===e)throw new Error("MDCSliderFoundation: `"+t+"` must be non-null.");var i=Number(e);if(isNaN(i))throw new Error("MDCSliderFoundation: `"+t+"` value is `"+e+"`, but must be a number.");return i},n.prototype.validateProperties=function(e){var t=e.min,i=e.max,n=e.value,r=e.valueStart,a=e.step;if(t>=i)throw new Error("MDCSliderFoundation: min must be strictly less than max. Current: [min: "+t+", max: "+i+"]");if(a<=0)throw new Error("MDCSliderFoundation: step must be a positive number. Current step: "+this.step);if(this.isRange){if(ni||ri)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+r+", end value: "+n+"]");if(r>n)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+r+", end value: "+n+"]");var o=(n-t)/a;if((r-t)/a%1!=0||o%1!=0)throw new Error("MDCSliderFoundation: Slider values must be valid based on the step value. Current values: [start value: "+r+", end value: "+n+"]")}else{if(ni)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current value: "+n);if((o=(n-t)/a)%1!=0)throw new Error("MDCSliderFoundation: Slider value must be valid based on the step value. Current value: "+n)}},n.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),n.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(_n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(_n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(_n.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(_n.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(_n.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(_n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(_n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(_n.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(_n.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(_n.END,"blur",this.inputEndBlurListener)},n.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),n.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(_n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(_n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(_n.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(_n.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(_n.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(_n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(_n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(_n.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(_n.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(_n.END,"blur",this.inputEndBlurListener)},n.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},n.SUPPORTS_POINTER_EVENTS=Pn&&Boolean(window.PointerEvent)&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),n}(ye);function Vn(e){var t=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(e));if(!t)return 0;var i=t[1]||"",n=t[2]||0;return Math.max(0,("0"===i?0:i.length)-Number(n))}
+ */
+var AnimationKeys;
+(function (AnimationKeys) {
+ AnimationKeys["SLIDER_UPDATE"] = "slider_update";
+})(AnimationKeys || (AnimationKeys = {}));
+// Accessing `window` without a `typeof` check will throw on Node environments.
+var HAS_WINDOW = typeof window !== 'undefined';
+/**
+ * Foundation class for slider. Responsibilities include:
+ * - Updating slider values (internal state and DOM updates) based on client
+ * 'x' position.
+ * - Updating DOM after slider property updates (e.g. min, max).
+ */
+var MDCSliderFoundation = /** @class */ (function (_super) {
+ __extends(MDCSliderFoundation, _super);
+ function MDCSliderFoundation(adapter) {
+ var _this = _super.call(this, __assign(__assign({}, MDCSliderFoundation.defaultAdapter), adapter)) || this;
+ // Whether the initial styles (to position the thumb, before component
+ // initialization) have been removed.
+ _this.initialStylesRemoved = false;
+ _this.isDisabled = false;
+ _this.isDiscrete = false;
+ _this.step = numbers.STEP_SIZE;
+ _this.hasTickMarks = false;
+ // The following properties are only set for range sliders.
+ _this.isRange = false;
+ // Tracks the thumb being moved across a slider pointer interaction (down,
+ // move event).
+ _this.thumb = null;
+ // `clientX` from the most recent down event. Used in subsequent move
+ // events to determine which thumb to move (in the case of
+ // overlapping thumbs).
+ _this.downEventClientX = null;
+ // Width of the start thumb knob.
+ _this.startThumbKnobWidth = 0;
+ // Width of the end thumb knob.
+ _this.endThumbKnobWidth = 0;
+ _this.animFrame = new AnimationFrame();
+ return _this;
+ }
+ Object.defineProperty(MDCSliderFoundation, "defaultAdapter", {
+ get: function () {
+ // tslint:disable:object-literal-sort-keys Methods should be in the same
+ // order as the adapter interface.
+ return {
+ hasClass: function () { return false; },
+ addClass: function () { return undefined; },
+ removeClass: function () { return undefined; },
+ addThumbClass: function () { return undefined; },
+ removeThumbClass: function () { return undefined; },
+ getAttribute: function () { return null; },
+ getInputValue: function () { return ''; },
+ setInputValue: function () { return undefined; },
+ getInputAttribute: function () { return null; },
+ setInputAttribute: function () { return null; },
+ removeInputAttribute: function () { return null; },
+ focusInput: function () { return undefined; },
+ isInputFocused: function () { return false; },
+ getThumbKnobWidth: function () { return 0; },
+ getThumbBoundingClientRect: function () {
+ return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });
+ },
+ getBoundingClientRect: function () {
+ return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });
+ },
+ isRTL: function () { return false; },
+ setThumbStyleProperty: function () { return undefined; },
+ removeThumbStyleProperty: function () { return undefined; },
+ setTrackActiveStyleProperty: function () { return undefined; },
+ removeTrackActiveStyleProperty: function () { return undefined; },
+ setValueIndicatorText: function () { return undefined; },
+ getValueToAriaValueTextFn: function () { return null; },
+ updateTickMarks: function () { return undefined; },
+ setPointerCapture: function () { return undefined; },
+ emitChangeEvent: function () { return undefined; },
+ emitInputEvent: function () { return undefined; },
+ emitDragStartEvent: function () { return undefined; },
+ emitDragEndEvent: function () { return undefined; },
+ registerEventHandler: function () { return undefined; },
+ deregisterEventHandler: function () { return undefined; },
+ registerThumbEventHandler: function () { return undefined; },
+ deregisterThumbEventHandler: function () { return undefined; },
+ registerInputEventHandler: function () { return undefined; },
+ deregisterInputEventHandler: function () { return undefined; },
+ registerBodyEventHandler: function () { return undefined; },
+ deregisterBodyEventHandler: function () { return undefined; },
+ registerWindowEventHandler: function () { return undefined; },
+ deregisterWindowEventHandler: function () { return undefined; },
+ };
+ // tslint:enable:object-literal-sort-keys
+ },
+ enumerable: false,
+ configurable: true
+ });
+ MDCSliderFoundation.prototype.init = function () {
+ var _this = this;
+ this.isDisabled = this.adapter.hasClass(cssClasses.DISABLED);
+ this.isDiscrete = this.adapter.hasClass(cssClasses.DISCRETE);
+ this.hasTickMarks = this.adapter.hasClass(cssClasses.TICK_MARKS);
+ this.isRange = this.adapter.hasClass(cssClasses.RANGE);
+ var min = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(attributes.INPUT_MIN, this.isRange ? Thumb.START : Thumb.END), attributes.INPUT_MIN);
+ var max = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(attributes.INPUT_MAX, Thumb.END), attributes.INPUT_MAX);
+ var value = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(attributes.INPUT_VALUE, Thumb.END), attributes.INPUT_VALUE);
+ var valueStart = this.isRange ?
+ this.convertAttributeValueToNumber(this.adapter.getInputAttribute(attributes.INPUT_VALUE, Thumb.START), attributes.INPUT_VALUE) :
+ min;
+ var stepAttr = this.adapter.getInputAttribute(attributes.INPUT_STEP, Thumb.END);
+ var step = stepAttr ?
+ this.convertAttributeValueToNumber(stepAttr, attributes.INPUT_STEP) :
+ this.step;
+ this.validateProperties({ min: min, max: max, value: value, valueStart: valueStart, step: step });
+ this.min = min;
+ this.max = max;
+ this.value = value;
+ this.valueStart = valueStart;
+ this.step = step;
+ this.numDecimalPlaces = getNumDecimalPlaces(this.step);
+ this.valueBeforeDownEvent = value;
+ this.valueStartBeforeDownEvent = valueStart;
+ this.mousedownOrTouchstartListener =
+ this.handleMousedownOrTouchstart.bind(this);
+ this.moveListener = this.handleMove.bind(this);
+ this.pointerdownListener = this.handlePointerdown.bind(this);
+ this.pointerupListener = this.handlePointerup.bind(this);
+ this.thumbMouseenterListener = this.handleThumbMouseenter.bind(this);
+ this.thumbMouseleaveListener = this.handleThumbMouseleave.bind(this);
+ this.inputStartChangeListener = function () {
+ _this.handleInputChange(Thumb.START);
+ };
+ this.inputEndChangeListener = function () {
+ _this.handleInputChange(Thumb.END);
+ };
+ this.inputStartFocusListener = function () {
+ _this.handleInputFocus(Thumb.START);
+ };
+ this.inputEndFocusListener = function () {
+ _this.handleInputFocus(Thumb.END);
+ };
+ this.inputStartBlurListener = function () {
+ _this.handleInputBlur(Thumb.START);
+ };
+ this.inputEndBlurListener = function () {
+ _this.handleInputBlur(Thumb.END);
+ };
+ this.resizeListener = this.handleResize.bind(this);
+ this.registerEventHandlers();
+ };
+ MDCSliderFoundation.prototype.destroy = function () {
+ this.deregisterEventHandlers();
+ };
+ MDCSliderFoundation.prototype.setMin = function (value) {
+ this.min = value;
+ if (!this.isRange) {
+ this.valueStart = value;
+ }
+ this.updateUI();
+ };
+ MDCSliderFoundation.prototype.setMax = function (value) {
+ this.max = value;
+ this.updateUI();
+ };
+ MDCSliderFoundation.prototype.getMin = function () {
+ return this.min;
+ };
+ MDCSliderFoundation.prototype.getMax = function () {
+ return this.max;
+ };
+ /**
+ * - For single point sliders, returns the thumb value.
+ * - For range (two-thumb) sliders, returns the end thumb's value.
+ */
+ MDCSliderFoundation.prototype.getValue = function () {
+ return this.value;
+ };
+ /**
+ * - For single point sliders, sets the thumb value.
+ * - For range (two-thumb) sliders, sets the end thumb's value.
+ */
+ MDCSliderFoundation.prototype.setValue = function (value) {
+ if (this.isRange && value < this.valueStart) {
+ throw new Error("end thumb value (" + value + ") must be >= start thumb " +
+ ("value (" + this.valueStart + ")"));
+ }
+ this.updateValue(value, Thumb.END);
+ };
+ /**
+ * Only applicable for range sliders.
+ * @return The start thumb's value.
+ */
+ MDCSliderFoundation.prototype.getValueStart = function () {
+ if (!this.isRange) {
+ throw new Error('`valueStart` is only applicable for range sliders.');
+ }
+ return this.valueStart;
+ };
+ /**
+ * Only applicable for range sliders. Sets the start thumb's value.
+ */
+ MDCSliderFoundation.prototype.setValueStart = function (valueStart) {
+ if (!this.isRange) {
+ throw new Error('`valueStart` is only applicable for range sliders.');
+ }
+ if (this.isRange && valueStart > this.value) {
+ throw new Error("start thumb value (" + valueStart + ") must be <= end thumb " +
+ ("value (" + this.value + ")"));
+ }
+ this.updateValue(valueStart, Thumb.START);
+ };
+ MDCSliderFoundation.prototype.setStep = function (value) {
+ this.step = value;
+ this.numDecimalPlaces = getNumDecimalPlaces(value);
+ this.updateUI();
+ };
+ MDCSliderFoundation.prototype.setIsDiscrete = function (value) {
+ this.isDiscrete = value;
+ this.updateValueIndicatorUI();
+ this.updateTickMarksUI();
+ };
+ MDCSliderFoundation.prototype.getStep = function () {
+ return this.step;
+ };
+ MDCSliderFoundation.prototype.setHasTickMarks = function (value) {
+ this.hasTickMarks = value;
+ this.updateTickMarksUI();
+ };
+ MDCSliderFoundation.prototype.getDisabled = function () {
+ return this.isDisabled;
+ };
+ /**
+ * Sets disabled state, including updating styles and thumb tabindex.
+ */
+ MDCSliderFoundation.prototype.setDisabled = function (disabled) {
+ this.isDisabled = disabled;
+ if (disabled) {
+ this.adapter.addClass(cssClasses.DISABLED);
+ if (this.isRange) {
+ this.adapter.setInputAttribute(attributes.INPUT_DISABLED, '', Thumb.START);
+ }
+ this.adapter.setInputAttribute(attributes.INPUT_DISABLED, '', Thumb.END);
+ }
+ else {
+ this.adapter.removeClass(cssClasses.DISABLED);
+ if (this.isRange) {
+ this.adapter.removeInputAttribute(attributes.INPUT_DISABLED, Thumb.START);
+ }
+ this.adapter.removeInputAttribute(attributes.INPUT_DISABLED, Thumb.END);
+ }
+ };
+ /** @return Whether the slider is a range slider. */
+ MDCSliderFoundation.prototype.getIsRange = function () {
+ return this.isRange;
+ };
+ /**
+ * - Syncs slider boundingClientRect with the current DOM.
+ * - Updates UI based on internal state.
+ */
+ MDCSliderFoundation.prototype.layout = function (_a) {
+ var _b = _a === void 0 ? {} : _a, skipUpdateUI = _b.skipUpdateUI;
+ this.rect = this.adapter.getBoundingClientRect();
+ if (this.isRange) {
+ this.startThumbKnobWidth = this.adapter.getThumbKnobWidth(Thumb.START);
+ this.endThumbKnobWidth = this.adapter.getThumbKnobWidth(Thumb.END);
+ }
+ if (!skipUpdateUI) {
+ this.updateUI();
+ }
+ };
+ /** Handles resize events on the window. */
+ MDCSliderFoundation.prototype.handleResize = function () {
+ this.layout();
+ };
+ /**
+ * Handles pointer down events on the slider root element.
+ */
+ MDCSliderFoundation.prototype.handleDown = function (event) {
+ if (this.isDisabled)
+ return;
+ this.valueStartBeforeDownEvent = this.valueStart;
+ this.valueBeforeDownEvent = this.value;
+ var clientX = event.clientX != null ?
+ event.clientX :
+ event.targetTouches[0].clientX;
+ this.downEventClientX = clientX;
+ var value = this.mapClientXOnSliderScale(clientX);
+ this.thumb = this.getThumbFromDownEvent(clientX, value);
+ if (this.thumb === null)
+ return;
+ this.handleDragStart(event, value, this.thumb);
+ this.updateValue(value, this.thumb, { emitInputEvent: true });
+ };
+ /**
+ * Handles pointer move events on the slider root element.
+ */
+ MDCSliderFoundation.prototype.handleMove = function (event) {
+ if (this.isDisabled)
+ return;
+ // Prevent scrolling.
+ event.preventDefault();
+ var clientX = event.clientX != null ?
+ event.clientX :
+ event.targetTouches[0].clientX;
+ var dragAlreadyStarted = this.thumb != null;
+ this.thumb = this.getThumbFromMoveEvent(clientX);
+ if (this.thumb === null)
+ return;
+ var value = this.mapClientXOnSliderScale(clientX);
+ if (!dragAlreadyStarted) {
+ this.handleDragStart(event, value, this.thumb);
+ this.adapter.emitDragStartEvent(value, this.thumb);
+ }
+ this.updateValue(value, this.thumb, { emitInputEvent: true });
+ };
+ /**
+ * Handles pointer up events on the slider root element.
+ */
+ MDCSliderFoundation.prototype.handleUp = function () {
+ if (this.isDisabled || this.thumb === null)
+ return;
+ var oldValue = this.thumb === Thumb.START ?
+ this.valueStartBeforeDownEvent :
+ this.valueBeforeDownEvent;
+ var newValue = this.thumb === Thumb.START ? this.valueStart : this.value;
+ if (oldValue !== newValue) {
+ this.adapter.emitChangeEvent(newValue, this.thumb);
+ }
+ this.adapter.emitDragEndEvent(newValue, this.thumb);
+ this.thumb = null;
+ };
+ /**
+ * For range, discrete slider, shows the value indicator on both thumbs.
+ */
+ MDCSliderFoundation.prototype.handleThumbMouseenter = function () {
+ if (!this.isDiscrete || !this.isRange)
+ return;
+ this.adapter.addThumbClass(cssClasses.THUMB_WITH_INDICATOR, Thumb.START);
+ this.adapter.addThumbClass(cssClasses.THUMB_WITH_INDICATOR, Thumb.END);
+ };
+ /**
+ * For range, discrete slider, hides the value indicator on both thumbs.
+ */
+ MDCSliderFoundation.prototype.handleThumbMouseleave = function () {
+ if (!this.isDiscrete || !this.isRange)
+ return;
+ if (this.adapter.isInputFocused(Thumb.START) ||
+ this.adapter.isInputFocused(Thumb.END)) {
+ // Leave value indicator shown if either input is focused.
+ return;
+ }
+ this.adapter.removeThumbClass(cssClasses.THUMB_WITH_INDICATOR, Thumb.START);
+ this.adapter.removeThumbClass(cssClasses.THUMB_WITH_INDICATOR, Thumb.END);
+ };
+ MDCSliderFoundation.prototype.handleMousedownOrTouchstart = function (event) {
+ var _this = this;
+ var moveEventType = event.type === 'mousedown' ? 'mousemove' : 'touchmove';
+ // After a down event on the slider root, listen for move events on
+ // body (so the slider value is updated for events outside of the
+ // slider root).
+ this.adapter.registerBodyEventHandler(moveEventType, this.moveListener);
+ var upHandler = function () {
+ _this.handleUp();
+ // Once the drag is finished (up event on body), remove the move
+ // handler.
+ _this.adapter.deregisterBodyEventHandler(moveEventType, _this.moveListener);
+ // Also stop listening for subsequent up events.
+ _this.adapter.deregisterEventHandler('mouseup', upHandler);
+ _this.adapter.deregisterEventHandler('touchend', upHandler);
+ };
+ this.adapter.registerBodyEventHandler('mouseup', upHandler);
+ this.adapter.registerBodyEventHandler('touchend', upHandler);
+ this.handleDown(event);
+ };
+ MDCSliderFoundation.prototype.handlePointerdown = function (event) {
+ this.adapter.setPointerCapture(event.pointerId);
+ this.adapter.registerEventHandler('pointermove', this.moveListener);
+ this.handleDown(event);
+ };
+ /**
+ * Handles input `change` event by setting internal slider value to match
+ * input's new value.
+ */
+ MDCSliderFoundation.prototype.handleInputChange = function (thumb) {
+ var value = Number(this.adapter.getInputValue(thumb));
+ if (thumb === Thumb.START) {
+ this.setValueStart(value);
+ }
+ else {
+ this.setValue(value);
+ }
+ this.adapter.emitChangeEvent(thumb === Thumb.START ? this.valueStart : this.value, thumb);
+ this.adapter.emitInputEvent(thumb === Thumb.START ? this.valueStart : this.value, thumb);
+ };
+ /** Shows activated state and value indicator on thumb(s). */
+ MDCSliderFoundation.prototype.handleInputFocus = function (thumb) {
+ this.adapter.addThumbClass(cssClasses.THUMB_FOCUSED, thumb);
+ if (!this.isDiscrete)
+ return;
+ this.adapter.addThumbClass(cssClasses.THUMB_WITH_INDICATOR, thumb);
+ if (this.isRange) {
+ var otherThumb = thumb === Thumb.START ? Thumb.END : Thumb.START;
+ this.adapter.addThumbClass(cssClasses.THUMB_WITH_INDICATOR, otherThumb);
+ }
+ };
+ /** Removes activated state and value indicator from thumb(s). */
+ MDCSliderFoundation.prototype.handleInputBlur = function (thumb) {
+ this.adapter.removeThumbClass(cssClasses.THUMB_FOCUSED, thumb);
+ if (!this.isDiscrete)
+ return;
+ this.adapter.removeThumbClass(cssClasses.THUMB_WITH_INDICATOR, thumb);
+ if (this.isRange) {
+ var otherThumb = thumb === Thumb.START ? Thumb.END : Thumb.START;
+ this.adapter.removeThumbClass(cssClasses.THUMB_WITH_INDICATOR, otherThumb);
+ }
+ };
+ /**
+ * Emits custom dragStart event, along with focusing the underlying input.
+ */
+ MDCSliderFoundation.prototype.handleDragStart = function (event, value, thumb) {
+ this.adapter.emitDragStartEvent(value, thumb);
+ this.adapter.focusInput(thumb);
+ // Prevent the input (that we just focused) from losing focus.
+ event.preventDefault();
+ };
+ /**
+ * @return The thumb to be moved based on initial down event.
+ */
+ MDCSliderFoundation.prototype.getThumbFromDownEvent = function (clientX, value) {
+ // For single point slider, thumb to be moved is always the END (only)
+ // thumb.
+ if (!this.isRange)
+ return Thumb.END;
+ // Check if event press point is in the bounds of any thumb.
+ var thumbStartRect = this.adapter.getThumbBoundingClientRect(Thumb.START);
+ var thumbEndRect = this.adapter.getThumbBoundingClientRect(Thumb.END);
+ var inThumbStartBounds = clientX >= thumbStartRect.left && clientX <= thumbStartRect.right;
+ var inThumbEndBounds = clientX >= thumbEndRect.left && clientX <= thumbEndRect.right;
+ if (inThumbStartBounds && inThumbEndBounds) {
+ // Thumbs overlapping. Thumb to be moved cannot be determined yet.
+ return null;
+ }
+ // If press is in bounds for either thumb on down event, that's the thumb
+ // to be moved.
+ if (inThumbStartBounds) {
+ return Thumb.START;
+ }
+ if (inThumbEndBounds) {
+ return Thumb.END;
+ }
+ // For presses outside the range, return whichever thumb is closer.
+ if (value < this.valueStart) {
+ return Thumb.START;
+ }
+ if (value > this.value) {
+ return Thumb.END;
+ }
+ // For presses inside the range, return whichever thumb is closer.
+ return (value - this.valueStart <= this.value - value) ? Thumb.START :
+ Thumb.END;
+ };
+ /**
+ * @return The thumb to be moved based on move event (based on drag
+ * direction from original down event). Only applicable if thumbs
+ * were overlapping in the down event.
+ */
+ MDCSliderFoundation.prototype.getThumbFromMoveEvent = function (clientX) {
+ // Thumb has already been chosen.
+ if (this.thumb !== null)
+ return this.thumb;
+ if (this.downEventClientX === null) {
+ throw new Error('`downEventClientX` is null after move event.');
+ }
+ var moveDistanceUnderThreshold = Math.abs(this.downEventClientX - clientX) < numbers.THUMB_UPDATE_MIN_PX;
+ if (moveDistanceUnderThreshold)
+ return this.thumb;
+ var draggedThumbToLeft = clientX < this.downEventClientX;
+ if (draggedThumbToLeft) {
+ return this.adapter.isRTL() ? Thumb.END : Thumb.START;
+ }
+ else {
+ return this.adapter.isRTL() ? Thumb.START : Thumb.END;
+ }
+ };
+ /**
+ * Updates UI based on internal state.
+ * @param thumb Thumb whose value is being updated. If undefined, UI is
+ * updated for both thumbs based on current internal state.
+ */
+ MDCSliderFoundation.prototype.updateUI = function (thumb) {
+ this.updateThumbAndInputAttributes(thumb);
+ this.updateThumbAndTrackUI(thumb);
+ this.updateValueIndicatorUI(thumb);
+ this.updateTickMarksUI();
+ };
+ /**
+ * Updates thumb and input attributes based on current value.
+ * @param thumb Thumb whose aria attributes to update.
+ */
+ MDCSliderFoundation.prototype.updateThumbAndInputAttributes = function (thumb) {
+ if (!thumb)
+ return;
+ var value = this.isRange && thumb === Thumb.START ? this.valueStart : this.value;
+ var valueStr = String(value);
+ this.adapter.setInputAttribute(attributes.INPUT_VALUE, valueStr, thumb);
+ if (this.isRange && thumb === Thumb.START) {
+ this.adapter.setInputAttribute(attributes.INPUT_MIN, valueStr, Thumb.END);
+ }
+ else if (this.isRange && thumb === Thumb.END) {
+ this.adapter.setInputAttribute(attributes.INPUT_MAX, valueStr, Thumb.START);
+ }
+ // Sync attribute with property.
+ if (this.adapter.getInputValue(thumb) !== valueStr) {
+ this.adapter.setInputValue(valueStr, thumb);
+ }
+ var valueToAriaValueTextFn = this.adapter.getValueToAriaValueTextFn();
+ if (valueToAriaValueTextFn) {
+ this.adapter.setInputAttribute(attributes.ARIA_VALUETEXT, valueToAriaValueTextFn(value), thumb);
+ }
+ };
+ /**
+ * Updates value indicator UI based on current value.
+ * @param thumb Thumb whose value indicator to update. If undefined, all
+ * thumbs' value indicators are updated.
+ */
+ MDCSliderFoundation.prototype.updateValueIndicatorUI = function (thumb) {
+ if (!this.isDiscrete)
+ return;
+ var value = this.isRange && thumb === Thumb.START ? this.valueStart : this.value;
+ this.adapter.setValueIndicatorText(value, thumb === Thumb.START ? Thumb.START : Thumb.END);
+ if (!thumb && this.isRange) {
+ this.adapter.setValueIndicatorText(this.valueStart, Thumb.START);
+ }
+ };
+ /**
+ * Updates tick marks UI within slider, based on current min, max, and step.
+ */
+ MDCSliderFoundation.prototype.updateTickMarksUI = function () {
+ if (!this.isDiscrete || !this.hasTickMarks)
+ return;
+ var numTickMarksInactiveStart = (this.valueStart - this.min) / this.step;
+ var numTickMarksActive = (this.value - this.valueStart) / this.step + 1;
+ var numTickMarksInactiveEnd = (this.max - this.value) / this.step;
+ var tickMarksInactiveStart = Array.from({ length: numTickMarksInactiveStart })
+ .fill(TickMark.INACTIVE);
+ var tickMarksActive = Array.from({ length: numTickMarksActive })
+ .fill(TickMark.ACTIVE);
+ var tickMarksInactiveEnd = Array.from({ length: numTickMarksInactiveEnd })
+ .fill(TickMark.INACTIVE);
+ this.adapter.updateTickMarks(tickMarksInactiveStart.concat(tickMarksActive)
+ .concat(tickMarksInactiveEnd));
+ };
+ /** Maps clientX to a value on the slider scale. */
+ MDCSliderFoundation.prototype.mapClientXOnSliderScale = function (clientX) {
+ var xPos = clientX - this.rect.left;
+ var pctComplete = xPos / this.rect.width;
+ if (this.adapter.isRTL()) {
+ pctComplete = 1 - pctComplete;
+ }
+ // Fit the percentage complete between the range [min,max]
+ // by remapping from [0, 1] to [min, min+(max-min)].
+ var value = this.min + pctComplete * (this.max - this.min);
+ if (value === this.max || value === this.min) {
+ return value;
+ }
+ return Number(this.quantize(value).toFixed(this.numDecimalPlaces));
+ };
+ /** Calculates the quantized value based on step value. */
+ MDCSliderFoundation.prototype.quantize = function (value) {
+ var numSteps = Math.round((value - this.min) / this.step);
+ return this.min + numSteps * this.step;
+ };
+ /**
+ * Updates slider value (internal state and UI) based on the given value.
+ */
+ MDCSliderFoundation.prototype.updateValue = function (value, thumb, _a) {
+ var _b = _a === void 0 ? {} : _a, emitInputEvent = _b.emitInputEvent;
+ value = this.clampValue(value, thumb);
+ if (this.isRange && thumb === Thumb.START) {
+ // Exit early if current value is the same as the new value.
+ if (this.valueStart === value)
+ return;
+ this.valueStart = value;
+ }
+ else {
+ // Exit early if current value is the same as the new value.
+ if (this.value === value)
+ return;
+ this.value = value;
+ }
+ this.updateUI(thumb);
+ if (emitInputEvent) {
+ this.adapter.emitInputEvent(thumb === Thumb.START ? this.valueStart : this.value, thumb);
+ }
+ };
+ /**
+ * Clamps the given value for the given thumb based on slider properties:
+ * - Restricts value within [min, max].
+ * - If range slider, clamp start value <= end value, and
+ * end value >= start value.
+ */
+ MDCSliderFoundation.prototype.clampValue = function (value, thumb) {
+ // Clamp value to [min, max] range.
+ value = Math.min(Math.max(value, this.min), this.max);
+ var thumbStartMovedPastThumbEnd = this.isRange && thumb === Thumb.START && value > this.value;
+ if (thumbStartMovedPastThumbEnd) {
+ return this.value;
+ }
+ var thumbEndMovedPastThumbStart = this.isRange && thumb === Thumb.END && value < this.valueStart;
+ if (thumbEndMovedPastThumbStart) {
+ return this.valueStart;
+ }
+ return value;
+ };
+ /**
+ * Updates the active track and thumb style properties to reflect current
+ * value.
+ */
+ MDCSliderFoundation.prototype.updateThumbAndTrackUI = function (thumb) {
+ var _this = this;
+ var _a = this, max = _a.max, min = _a.min;
+ var pctComplete = (this.value - this.valueStart) / (max - min);
+ var rangePx = pctComplete * this.rect.width;
+ var isRtl = this.adapter.isRTL();
+ var transformProp = HAS_WINDOW ? getCorrectPropertyName(window, 'transform') : 'transform';
+ if (this.isRange) {
+ var thumbLeftPos_1 = this.adapter.isRTL() ?
+ (max - this.value) / (max - min) * this.rect.width :
+ (this.valueStart - min) / (max - min) * this.rect.width;
+ var thumbRightPos_1 = thumbLeftPos_1 + rangePx;
+ this.animFrame.request(AnimationKeys.SLIDER_UPDATE, function () {
+ // Set active track styles, accounting for animation direction by
+ // setting `transform-origin`.
+ var trackAnimatesFromRight = (!isRtl && thumb === Thumb.START) ||
+ (isRtl && thumb !== Thumb.START);
+ if (trackAnimatesFromRight) {
+ _this.adapter.setTrackActiveStyleProperty('transform-origin', 'right');
+ _this.adapter.setTrackActiveStyleProperty('left', 'unset');
+ _this.adapter.setTrackActiveStyleProperty('right', _this.rect.width - thumbRightPos_1 + "px");
+ }
+ else {
+ _this.adapter.setTrackActiveStyleProperty('transform-origin', 'left');
+ _this.adapter.setTrackActiveStyleProperty('right', 'unset');
+ _this.adapter.setTrackActiveStyleProperty('left', thumbLeftPos_1 + "px");
+ }
+ _this.adapter.setTrackActiveStyleProperty(transformProp, "scaleX(" + pctComplete + ")");
+ // Set thumb styles.
+ var thumbStartPos = isRtl ? thumbRightPos_1 : thumbLeftPos_1;
+ var thumbEndPos = _this.adapter.isRTL() ? thumbLeftPos_1 : thumbRightPos_1;
+ if (thumb === Thumb.START || !thumb || !_this.initialStylesRemoved) {
+ _this.adapter.setThumbStyleProperty(transformProp, "translateX(" + thumbStartPos + "px)", Thumb.START);
+ }
+ if (thumb === Thumb.END || !thumb || !_this.initialStylesRemoved) {
+ _this.adapter.setThumbStyleProperty(transformProp, "translateX(" + thumbEndPos + "px)", Thumb.END);
+ }
+ _this.removeInitialStyles(isRtl);
+ _this.updateOverlappingThumbsUI(thumbStartPos, thumbEndPos, thumb);
+ });
+ }
+ else {
+ this.animFrame.request(AnimationKeys.SLIDER_UPDATE, function () {
+ var thumbStartPos = isRtl ? _this.rect.width - rangePx : rangePx;
+ _this.adapter.setThumbStyleProperty(transformProp, "translateX(" + thumbStartPos + "px)", Thumb.END);
+ _this.adapter.setTrackActiveStyleProperty(transformProp, "scaleX(" + pctComplete + ")");
+ _this.removeInitialStyles(isRtl);
+ });
+ }
+ };
+ /**
+ * Removes initial inline styles if not already removed. `left:<...>%`
+ * inline styles can be added to position the thumb correctly before JS
+ * initialization. However, they need to be removed before the JS starts
+ * positioning the thumb. This is because the JS uses
+ * `transform:translateX(<...>)px` (for performance reasons) to position
+ * the thumb (which is not possible for initial styles since we need the
+ * bounding rect measurements).
+ */
+ MDCSliderFoundation.prototype.removeInitialStyles = function (isRtl) {
+ if (this.initialStylesRemoved)
+ return;
+ // Remove thumb position properties that were added for initial render.
+ var position = isRtl ? 'right' : 'left';
+ this.adapter.removeThumbStyleProperty(position, Thumb.END);
+ if (this.isRange) {
+ this.adapter.removeThumbStyleProperty(position, Thumb.START);
+ }
+ this.initialStylesRemoved = true;
+ this.resetTrackAndThumbAnimation();
+ };
+ /**
+ * Resets track/thumb animation to prevent animation when adding
+ * `transform` styles to thumb initially.
+ */
+ MDCSliderFoundation.prototype.resetTrackAndThumbAnimation = function () {
+ var _this = this;
+ if (!this.isDiscrete)
+ return;
+ // Set transition properties to default (no animation), so that the
+ // newly added `transform` styles do not animate thumb/track from
+ // their default positions.
+ var transitionProp = HAS_WINDOW ?
+ getCorrectPropertyName(window, 'transition') :
+ 'transition';
+ var transitionDefault = 'all 0s ease 0s';
+ this.adapter.setThumbStyleProperty(transitionProp, transitionDefault, Thumb.END);
+ if (this.isRange) {
+ this.adapter.setThumbStyleProperty(transitionProp, transitionDefault, Thumb.START);
+ }
+ this.adapter.setTrackActiveStyleProperty(transitionProp, transitionDefault);
+ // In the next frame, remove the transition inline styles we just
+ // added, such that any animations added in the CSS can now take effect.
+ requestAnimationFrame(function () {
+ _this.adapter.removeThumbStyleProperty(transitionProp, Thumb.END);
+ _this.adapter.removeTrackActiveStyleProperty(transitionProp);
+ if (_this.isRange) {
+ _this.adapter.removeThumbStyleProperty(transitionProp, Thumb.START);
+ }
+ });
+ };
+ /**
+ * Adds THUMB_TOP class to active thumb if thumb knobs overlap; otherwise
+ * removes THUMB_TOP class from both thumbs.
+ * @param thumb Thumb that is active (being moved).
+ */
+ MDCSliderFoundation.prototype.updateOverlappingThumbsUI = function (thumbStartPos, thumbEndPos, thumb) {
+ var thumbsOverlap = false;
+ if (this.adapter.isRTL()) {
+ var startThumbLeftEdge = thumbStartPos - this.startThumbKnobWidth / 2;
+ var endThumbRightEdge = thumbEndPos + this.endThumbKnobWidth / 2;
+ thumbsOverlap = endThumbRightEdge >= startThumbLeftEdge;
+ }
+ else {
+ var startThumbRightEdge = thumbStartPos + this.startThumbKnobWidth / 2;
+ var endThumbLeftEdge = thumbEndPos - this.endThumbKnobWidth / 2;
+ thumbsOverlap = startThumbRightEdge >= endThumbLeftEdge;
+ }
+ if (thumbsOverlap) {
+ this.adapter.addThumbClass(cssClasses.THUMB_TOP,
+ // If no thumb was dragged (in the case of initial layout), end
+ // thumb is on top by default.
+ thumb || Thumb.END);
+ this.adapter.removeThumbClass(cssClasses.THUMB_TOP, thumb === Thumb.START ? Thumb.END : Thumb.START);
+ }
+ else {
+ this.adapter.removeThumbClass(cssClasses.THUMB_TOP, Thumb.START);
+ this.adapter.removeThumbClass(cssClasses.THUMB_TOP, Thumb.END);
+ }
+ };
+ /**
+ * Converts attribute value to a number, e.g. '100' => 100. Throws errors
+ * for invalid values.
+ * @param attributeValue Attribute value, e.g. 100.
+ * @param attributeName Attribute name, e.g. `aria-valuemax`.
+ */
+ MDCSliderFoundation.prototype.convertAttributeValueToNumber = function (attributeValue, attributeName) {
+ if (attributeValue === null) {
+ throw new Error("MDCSliderFoundation: `" + attributeName + "` must be non-null.");
+ }
+ var value = Number(attributeValue);
+ if (isNaN(value)) {
+ throw new Error("MDCSliderFoundation: `" + attributeName + "` value is " +
+ ("`" + attributeValue + "`, but must be a number."));
+ }
+ return value;
+ };
+ /** Checks that the given properties are valid slider values. */
+ MDCSliderFoundation.prototype.validateProperties = function (_a) {
+ var min = _a.min, max = _a.max, value = _a.value, valueStart = _a.valueStart, step = _a.step;
+ if (min >= max) {
+ throw new Error("MDCSliderFoundation: min must be strictly less than max. " +
+ ("Current: [min: " + min + ", max: " + max + "]"));
+ }
+ if (step <= 0) {
+ throw new Error("MDCSliderFoundation: step must be a positive number. " +
+ ("Current step: " + this.step));
+ }
+ if (this.isRange) {
+ if (value < min || value > max || valueStart < min || valueStart > max) {
+ throw new Error("MDCSliderFoundation: values must be in [min, max] range. " +
+ ("Current values: [start value: " + valueStart + ", end value: " + value + "]"));
+ }
+ if (valueStart > value) {
+ throw new Error("MDCSliderFoundation: start value must be <= end value. " +
+ ("Current values: [start value: " + valueStart + ", end value: " + value + "]"));
+ }
+ var numStepsValueStartFromMin = (valueStart - min) / step;
+ var numStepsValueFromMin = (value - min) / step;
+ if ((numStepsValueStartFromMin % 1) !== 0 ||
+ (numStepsValueFromMin % 1) !== 0) {
+ throw new Error("MDCSliderFoundation: Slider values must be valid based on the " +
+ ("step value. Current values: [start value: " + valueStart + ", ") +
+ ("end value: " + value + "]"));
+ }
+ }
+ else { // Single point slider.
+ if (value < min || value > max) {
+ throw new Error("MDCSliderFoundation: value must be in [min, max] range. " +
+ ("Current value: " + value));
+ }
+ var numStepsValueFromMin = (value - min) / step;
+ if ((numStepsValueFromMin % 1) !== 0) {
+ throw new Error("MDCSliderFoundation: Slider value must be valid based on the " +
+ ("step value. Current value: " + value));
+ }
+ }
+ };
+ MDCSliderFoundation.prototype.registerEventHandlers = function () {
+ this.adapter.registerWindowEventHandler('resize', this.resizeListener);
+ if (MDCSliderFoundation.SUPPORTS_POINTER_EVENTS) {
+ // If supported, use pointer events API with #setPointerCapture.
+ this.adapter.registerEventHandler('pointerdown', this.pointerdownListener);
+ this.adapter.registerEventHandler('pointerup', this.pointerupListener);
+ }
+ else {
+ // Otherwise, fall back to mousedown/touchstart events.
+ this.adapter.registerEventHandler('mousedown', this.mousedownOrTouchstartListener);
+ this.adapter.registerEventHandler('touchstart', this.mousedownOrTouchstartListener);
+ }
+ if (this.isRange) {
+ this.adapter.registerThumbEventHandler(Thumb.START, 'mouseenter', this.thumbMouseenterListener);
+ this.adapter.registerThumbEventHandler(Thumb.START, 'mouseleave', this.thumbMouseleaveListener);
+ this.adapter.registerInputEventHandler(Thumb.START, 'change', this.inputStartChangeListener);
+ this.adapter.registerInputEventHandler(Thumb.START, 'focus', this.inputStartFocusListener);
+ this.adapter.registerInputEventHandler(Thumb.START, 'blur', this.inputStartBlurListener);
+ }
+ this.adapter.registerThumbEventHandler(Thumb.END, 'mouseenter', this.thumbMouseenterListener);
+ this.adapter.registerThumbEventHandler(Thumb.END, 'mouseleave', this.thumbMouseleaveListener);
+ this.adapter.registerInputEventHandler(Thumb.END, 'change', this.inputEndChangeListener);
+ this.adapter.registerInputEventHandler(Thumb.END, 'focus', this.inputEndFocusListener);
+ this.adapter.registerInputEventHandler(Thumb.END, 'blur', this.inputEndBlurListener);
+ };
+ MDCSliderFoundation.prototype.deregisterEventHandlers = function () {
+ this.adapter.deregisterWindowEventHandler('resize', this.resizeListener);
+ if (MDCSliderFoundation.SUPPORTS_POINTER_EVENTS) {
+ this.adapter.deregisterEventHandler('pointerdown', this.pointerdownListener);
+ this.adapter.deregisterEventHandler('pointerup', this.pointerupListener);
+ }
+ else {
+ this.adapter.deregisterEventHandler('mousedown', this.mousedownOrTouchstartListener);
+ this.adapter.deregisterEventHandler('touchstart', this.mousedownOrTouchstartListener);
+ }
+ if (this.isRange) {
+ this.adapter.deregisterThumbEventHandler(Thumb.START, 'mouseenter', this.thumbMouseenterListener);
+ this.adapter.deregisterThumbEventHandler(Thumb.START, 'mouseleave', this.thumbMouseleaveListener);
+ this.adapter.deregisterInputEventHandler(Thumb.START, 'change', this.inputStartChangeListener);
+ this.adapter.deregisterInputEventHandler(Thumb.START, 'focus', this.inputStartFocusListener);
+ this.adapter.deregisterInputEventHandler(Thumb.START, 'blur', this.inputStartBlurListener);
+ }
+ this.adapter.deregisterThumbEventHandler(Thumb.END, 'mouseenter', this.thumbMouseenterListener);
+ this.adapter.deregisterThumbEventHandler(Thumb.END, 'mouseleave', this.thumbMouseleaveListener);
+ this.adapter.deregisterInputEventHandler(Thumb.END, 'change', this.inputEndChangeListener);
+ this.adapter.deregisterInputEventHandler(Thumb.END, 'focus', this.inputEndFocusListener);
+ this.adapter.deregisterInputEventHandler(Thumb.END, 'blur', this.inputEndBlurListener);
+ };
+ MDCSliderFoundation.prototype.handlePointerup = function () {
+ this.handleUp();
+ this.adapter.deregisterEventHandler('pointermove', this.moveListener);
+ };
+ MDCSliderFoundation.SUPPORTS_POINTER_EVENTS = HAS_WINDOW && Boolean(window.PointerEvent) &&
+ // #setPointerCapture is buggy on iOS, so we can't use pointer events
+ // until the following bug is fixed:
+ // https://bugs.webkit.org/show_bug.cgi?id=220196
+ !isIOS();
+ return MDCSliderFoundation;
+}(MDCFoundation));
+function isIOS() {
+ // Source:
+ // https://stackoverflow.com/questions/9038625/detect-if-device-is-ios
+ return [
+ 'iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone',
+ 'iPod'
+ ].includes(navigator.platform)
+ // iPad on iOS 13 detection
+ || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);
+}
+/**
+ * Given a number, returns the number of digits that appear after the
+ * decimal point.
+ * See
+ * https://stackoverflow.com/questions/9539513/is-there-a-reliable-way-in-javascript-to-obtain-the-number-of-decimal-places-of
+ */
+function getNumDecimalPlaces(n) {
+ // Pull out the fraction and the exponent.
+ var match = /(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(n));
+ // NaN or Infinity or integer.
+ // We arbitrarily decide that Infinity is integral.
+ if (!match)
+ return 0;
+ var fraction = match[1] || ''; // E.g. 1.234e-2 => 234
+ var exponent = match[2] || 0; // E.g. 1.234e-2 => -2
+ // Count the number of digits in the fraction and subtract the
+ // exponent to simulate moving the decimal point left by exponent places.
+ // 1.234e+2 has 1 fraction digit and '234'.length - 2 == 1
+ // 1.234e-2 has 5 fraction digit and '234'.length - -2 == 5
+ return Math.max(0, // lower limit
+ (fraction === '0' ? 0 : fraction.length) - Number(exponent));
+}
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */class Un extends $e{constructor(){super(...arguments),this.mdcFoundationClass=zn,this.disabled=!1,this.min=0,this.max=100,this.valueEnd=0,this.name="",this.step=1,this.withTickMarks=!1,this.discrete=!1,this.tickMarks=[],this.trackTransformOriginStyle="",this.trackLeftStyle="",this.trackRightStyle="",this.trackTransitionStyle="",this.endThumbWithIndicator=!1,this.endThumbTop=!1,this.shouldRenderEndRipple=!1,this.endThumbTransformStyle="",this.endThumbTransitionStyle="",this.valueToAriaTextTransform=null,this.valueToValueIndicatorTransform=e=>`${e}`,this.boundMoveListener=null,this.endRippleHandlers=new ui((()=>(this.shouldRenderEndRipple=!0,this.endRipple)))}update(e){if(e.has("valueEnd")&&this.mdcFoundation){this.mdcFoundation.setValue(this.valueEnd);const e=this.mdcFoundation.getValue();e!==this.valueEnd&&(this.valueEnd=e)}e.has("discrete")&&(this.discrete||(this.tickMarks=[])),super.update(e)}render(){return this.renderRootEl(P`
+ */
+class SliderBase extends FormElement {
+ constructor() {
+ super(...arguments);
+ this.mdcFoundationClass = MDCSliderFoundation;
+ this.disabled = false;
+ this.min = 0;
+ this.max = 100;
+ this.valueEnd = 0;
+ this.name = '';
+ this.step = 1;
+ this.withTickMarks = false;
+ this.discrete = false;
+ this.tickMarks = [];
+ this.trackTransformOriginStyle = '';
+ this.trackLeftStyle = '';
+ this.trackRightStyle = '';
+ this.trackTransitionStyle = '';
+ this.endThumbWithIndicator = false;
+ this.endThumbTop = false;
+ this.shouldRenderEndRipple = false;
+ this.endThumbTransformStyle = '';
+ this.endThumbTransitionStyle = '';
+ this.valueToAriaTextTransform = null;
+ this.valueToValueIndicatorTransform = (value) => {
+ return `${value}`;
+ };
+ this.boundMoveListener = null;
+ this.endRippleHandlers = new RippleHandlers(() => {
+ this.shouldRenderEndRipple = true;
+ return this.endRipple;
+ });
+ }
+ update(changed) {
+ if (changed.has('valueEnd') && this.mdcFoundation) {
+ this.mdcFoundation.setValue(this.valueEnd);
+ const validVal = this.mdcFoundation.getValue();
+ if (validVal !== this.valueEnd) {
+ this.valueEnd = validVal;
+ }
+ }
+ if (changed.has('discrete')) {
+ if (!this.discrete) {
+ this.tickMarks = [];
+ }
+ }
+ super.update(changed);
+ }
+ render() {
+ return this.renderRootEl(x `
${this.renderStartInput()}
${this.renderEndInput()}
${this.renderTrack()}
${this.renderTickMarks()}
${this.renderStartThumb()}
- ${this.renderEndThumb()}`)}renderRootEl(e){const t=Ve({"mdc-slider--disabled":this.disabled,"mdc-slider--discrete":this.discrete});return P`
+ ${this.renderEndThumb()}`);
+ }
+ renderRootEl(content) {
+ const rootClasses = o({
+ 'mdc-slider--disabled': this.disabled,
+ 'mdc-slider--discrete': this.discrete,
+ });
+ return x `
- ${e}
-
`}renderStartInput(){return V}renderEndInput(){var e;return P`
+ ${content}
+ `;
+ }
+ renderStartInput() {
+ return A;
+ }
+ renderEndInput() {
+ var _a;
+ return x `
- `}renderTrack(){return V}renderTickMarks(){return this.withTickMarks?P`
+ aria-label=${l$1(this.ariaLabel)}
+ aria-labelledby=${l$1(this.ariaLabelledBy)}
+ aria-describedby=${l$1(this.ariaDescribedBy)}
+ aria-valuetext=${l$1((_a = this.valueToAriaTextTransform) === null || _a === void 0 ? void 0 : _a.call(this, this.valueEnd))}>
+ `;
+ }
+ renderTrack() {
+ return A;
+ }
+ renderTickMarks() {
+ return !this.withTickMarks ? A : x `
- ${this.tickMarks.map((e=>{const t=e===xn.ACTIVE;return P`
`}))}
-
`:V}renderStartThumb(){return V}renderEndThumb(){const e=Ve({"mdc-slider__thumb--with-indicator":this.endThumbWithIndicator,"mdc-slider__thumb--top":this.endThumbTop}),t=Ti({"-webkit-transform":this.endThumbTransformStyle,transform:this.endThumbTransformStyle,"-webkit-transition":this.endThumbTransitionStyle,transition:this.endThumbTransitionStyle,left:this.endThumbTransformStyle||"rtl"===getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`,right:this.endThumbTransformStyle||"rtl"!==getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`}),i=this.shouldRenderEndRipple?P` `:V;return P`
+ ${this.tickMarks.map((tickMark) => {
+ const isActive = tickMark === TickMark.ACTIVE;
+ return x `
`;
+ })}
+ `;
+ }
+ renderStartThumb() {
+ return A;
+ }
+ renderEndThumb() {
+ const endThumbClasses = o({
+ 'mdc-slider__thumb--with-indicator': this.endThumbWithIndicator,
+ 'mdc-slider__thumb--top': this.endThumbTop,
+ });
+ const endThumbStyles = i({
+ '-webkit-transform': this.endThumbTransformStyle,
+ 'transform': this.endThumbTransformStyle,
+ '-webkit-transition': this.endThumbTransitionStyle,
+ 'transition': this.endThumbTransitionStyle,
+ 'left': this.endThumbTransformStyle ?
+ '' :
+ getComputedStyle(this).direction === 'rtl' ?
+ '' :
+ `calc(${(this.valueEnd - this.min) / (this.max - this.min) *
+ 100}% - 24px)`,
+ 'right': this.endThumbTransformStyle ?
+ '' :
+ getComputedStyle(this).direction !== 'rtl' ?
+ '' :
+ `calc(${(this.valueEnd - this.min) / (this.max - this.min) *
+ 100}% - 24px)`,
+ });
+ const ripple = !this.shouldRenderEndRipple ?
+ A :
+ x ` `;
+ return x `
- ${i}
+ ${ripple}
${this.renderValueIndicator(this.valueToValueIndicatorTransform(this.valueEnd))}
- `}renderValueIndicator(e){return this.discrete?P`
+ `;
+ }
+ renderValueIndicator(text) {
+ return this.discrete ? x `
`:V}disconnectedCallback(){super.disconnectedCallback(),this.mdcFoundation&&this.mdcFoundation.destroy()}createAdapter(){}async firstUpdated(){super.firstUpdated(),await this.layout(!0)}updated(e){super.updated(e),this.mdcFoundation&&(e.has("disabled")&&this.mdcFoundation.setDisabled(this.disabled),e.has("min")&&this.mdcFoundation.setMin(this.min),e.has("max")&&this.mdcFoundation.setMax(this.max),e.has("step")&&this.mdcFoundation.setStep(this.step),e.has("discrete")&&this.mdcFoundation.setIsDiscrete(this.discrete),e.has("withTickMarks")&&this.mdcFoundation.setHasTickMarks(this.withTickMarks))}async layout(e=!1){var t;null===(t=this.mdcFoundation)||void 0===t||t.layout({skipUpdateUI:e}),this.requestUpdate(),await this.updateComplete}onEndChange(e){var t;this.valueEnd=Number(e.target.value),null===(t=this.mdcFoundation)||void 0===t||t.handleInputChange(_n.END)}onEndFocus(){var e;null===(e=this.mdcFoundation)||void 0===e||e.handleInputFocus(_n.END),this.endRippleHandlers.startFocus()}onEndBlur(){var e;null===(e=this.mdcFoundation)||void 0===e||e.handleInputBlur(_n.END),this.endRippleHandlers.endFocus()}onEndMouseenter(){var e;null===(e=this.mdcFoundation)||void 0===e||e.handleThumbMouseenter(),this.endRippleHandlers.startHover()}onEndMouseleave(){var e;null===(e=this.mdcFoundation)||void 0===e||e.handleThumbMouseleave(),this.endRippleHandlers.endHover()}onPointerdown(e){this.layout(),this.mdcFoundation&&(this.mdcFoundation.handlePointerdown(e),this.boundMoveListener=this.mdcFoundation.handleMove.bind(this.mdcFoundation),this.mdcRoot.addEventListener("pointermove",this.boundMoveListener))}onPointerup(){this.mdcFoundation&&(this.mdcFoundation.handleUp(),this.boundMoveListener&&(this.mdcRoot.removeEventListener("pointermove",this.boundMoveListener),this.boundMoveListener=null))}onContextmenu(e){e.preventDefault()}setFormData(e){this.name&&e.append(this.name,`${this.valueEnd}`)}}n([he("input.end")],Un.prototype,"formElement",void 0),n([he(".mdc-slider")],Un.prototype,"mdcRoot",void 0),n([he(".end.mdc-slider__thumb")],Un.prototype,"endThumb",void 0),n([he(".end.mdc-slider__thumb .mdc-slider__thumb-knob")],Un.prototype,"endThumbKnob",void 0),n([ue(".end .ripple")],Un.prototype,"endRipple",void 0),n([se({type:Boolean,reflect:!0})],Un.prototype,"disabled",void 0),n([se({type:Number})],Un.prototype,"min",void 0),n([se({type:Number})],Un.prototype,"max",void 0),n([se({type:Number})],Un.prototype,"valueEnd",void 0),n([se({type:String})],Un.prototype,"name",void 0),n([se({type:Number})],Un.prototype,"step",void 0),n([se({type:Boolean})],Un.prototype,"withTickMarks",void 0),n([se({type:Boolean})],Un.prototype,"discrete",void 0),n([ce()],Un.prototype,"tickMarks",void 0),n([ce()],Un.prototype,"trackTransformOriginStyle",void 0),n([ce()],Un.prototype,"trackLeftStyle",void 0),n([ce()],Un.prototype,"trackRightStyle",void 0),n([ce()],Un.prototype,"trackTransitionStyle",void 0),n([ce()],Un.prototype,"endThumbWithIndicator",void 0),n([ce()],Un.prototype,"endThumbTop",void 0),n([ce()],Un.prototype,"shouldRenderEndRipple",void 0),n([ce()],Un.prototype,"endThumbTransformStyle",void 0),n([ce()],Un.prototype,"endThumbTransitionStyle",void 0),n([Yi,se({type:String,attribute:"aria-label"})],Un.prototype,"ariaLabel",void 0),n([Yi,se({type:String,attribute:"aria-labelledby"})],Un.prototype,"ariaLabelledBy",void 0),n([Yi,se({type:String,attribute:"aria-describedby"})],Un.prototype,"ariaDescribedBy",void 0);
+ ` :
+ A;
+ }
+ disconnectedCallback() {
+ super.disconnectedCallback();
+ if (this.mdcFoundation) {
+ this.mdcFoundation.destroy();
+ }
+ }
+ createAdapter() { }
+ async firstUpdated() {
+ super.firstUpdated();
+ await this.layout(true);
+ }
+ updated(changed) {
+ super.updated(changed);
+ if (!this.mdcFoundation) {
+ return;
+ }
+ if (changed.has('disabled')) {
+ this.mdcFoundation.setDisabled(this.disabled);
+ }
+ if (changed.has('min')) {
+ this.mdcFoundation.setMin(this.min);
+ }
+ if (changed.has('max')) {
+ this.mdcFoundation.setMax(this.max);
+ }
+ if (changed.has('step')) {
+ this.mdcFoundation.setStep(this.step);
+ }
+ if (changed.has('discrete')) {
+ this.mdcFoundation.setIsDiscrete(this.discrete);
+ }
+ if (changed.has('withTickMarks')) {
+ this.mdcFoundation.setHasTickMarks(this.withTickMarks);
+ }
+ }
+ async layout(skipUpdateUI = false) {
+ var _a;
+ (_a = this.mdcFoundation) === null || _a === void 0 ? void 0 : _a.layout({ skipUpdateUI });
+ this.requestUpdate();
+ await this.updateComplete;
+ }
+ onEndChange(e) {
+ var _a;
+ this.valueEnd = Number(e.target.value);
+ (_a = this.mdcFoundation) === null || _a === void 0 ? void 0 : _a.handleInputChange(Thumb.END);
+ }
+ onEndFocus() {
+ var _a;
+ (_a = this.mdcFoundation) === null || _a === void 0 ? void 0 : _a.handleInputFocus(Thumb.END);
+ this.endRippleHandlers.startFocus();
+ }
+ onEndBlur() {
+ var _a;
+ (_a = this.mdcFoundation) === null || _a === void 0 ? void 0 : _a.handleInputBlur(Thumb.END);
+ this.endRippleHandlers.endFocus();
+ }
+ onEndMouseenter() {
+ var _a;
+ (_a = this.mdcFoundation) === null || _a === void 0 ? void 0 : _a.handleThumbMouseenter();
+ this.endRippleHandlers.startHover();
+ }
+ onEndMouseleave() {
+ var _a;
+ (_a = this.mdcFoundation) === null || _a === void 0 ? void 0 : _a.handleThumbMouseleave();
+ this.endRippleHandlers.endHover();
+ }
+ onPointerdown(e) {
+ this.layout();
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handlePointerdown(e);
+ this.boundMoveListener =
+ this.mdcFoundation.handleMove.bind(this.mdcFoundation);
+ this.mdcRoot.addEventListener('pointermove', this.boundMoveListener);
+ }
+ }
+ onPointerup() {
+ if (this.mdcFoundation) {
+ this.mdcFoundation.handleUp();
+ if (this.boundMoveListener) {
+ this.mdcRoot.removeEventListener('pointermove', this.boundMoveListener);
+ this.boundMoveListener = null;
+ }
+ }
+ }
+ onContextmenu(e) {
+ // prevents context menu otherwise pointerdown will fire but not pointerup
+ e.preventDefault();
+ }
+ setFormData(formData) {
+ if (this.name) {
+ formData.append(this.name, `${this.valueEnd}`);
+ }
+ }
+}
+__decorate([
+ i$2('input.end')
+], SliderBase.prototype, "formElement", void 0);
+__decorate([
+ i$2('.mdc-slider')
+], SliderBase.prototype, "mdcRoot", void 0);
+__decorate([
+ i$2('.end.mdc-slider__thumb')
+], SliderBase.prototype, "endThumb", void 0);
+__decorate([
+ i$2('.end.mdc-slider__thumb .mdc-slider__thumb-knob')
+], SliderBase.prototype, "endThumbKnob", void 0);
+__decorate([
+ e$4('.end .ripple')
+], SliderBase.prototype, "endRipple", void 0);
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], SliderBase.prototype, "disabled", void 0);
+__decorate([
+ e$6({ type: Number })
+], SliderBase.prototype, "min", void 0);
+__decorate([
+ e$6({ type: Number })
+], SliderBase.prototype, "max", void 0);
+__decorate([
+ e$6({ type: Number })
+], SliderBase.prototype, "valueEnd", void 0);
+__decorate([
+ e$6({ type: String })
+], SliderBase.prototype, "name", void 0);
+__decorate([
+ e$6({ type: Number })
+], SliderBase.prototype, "step", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], SliderBase.prototype, "withTickMarks", void 0);
+__decorate([
+ e$6({ type: Boolean })
+], SliderBase.prototype, "discrete", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "tickMarks", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "trackTransformOriginStyle", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "trackLeftStyle", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "trackRightStyle", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "trackTransitionStyle", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "endThumbWithIndicator", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "endThumbTop", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "shouldRenderEndRipple", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "endThumbTransformStyle", void 0);
+__decorate([
+ t$2()
+], SliderBase.prototype, "endThumbTransitionStyle", void 0);
+__decorate([
+ ariaProperty,
+ e$6({ type: String, attribute: 'aria-label' })
+], SliderBase.prototype, "ariaLabel", void 0);
+__decorate([
+ ariaProperty,
+ e$6({ type: String, attribute: 'aria-labelledby' })
+], SliderBase.prototype, "ariaLabelledBy", void 0);
+__decorate([
+ ariaProperty,
+ e$6({ type: String, attribute: 'aria-describedby' })
+], SliderBase.prototype, "ariaDescribedBy", void 0);
+
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
-class Xn extends Un{get value(){return this.valueEnd}set value(e){this.valueEnd=e}renderTrack(){const e=Ti({"transform-origin":this.trackTransformOriginStyle,left:this.trackLeftStyle,right:this.trackRightStyle,"-webkit-transform":`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,transform:`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,"-webkit-transition":this.trackTransitionStyle,transition:this.trackTransitionStyle});return P`
+class SliderSingleBase extends SliderBase {
+ get value() {
+ return this.valueEnd;
+ }
+ set value(newVal) {
+ this.valueEnd = newVal;
+ }
+ renderTrack() {
+ const trackStyles = i({
+ 'transform-origin': this.trackTransformOriginStyle,
+ 'left': this.trackLeftStyle,
+ 'right': this.trackRightStyle,
+ '-webkit-transform': `scaleX(${(this.valueEnd - this.min) / (this.max - this.min)})`,
+ 'transform': `scaleX(${(this.valueEnd - this.min) / (this.max - this.min)})`,
+ '-webkit-transition': this.trackTransitionStyle,
+ 'transition': this.trackTransitionStyle,
+ });
+ return x `
`}createAdapter(){return{addClass:e=>{if("mdc-slider--disabled"===e)this.disabled=!0},removeClass:e=>{if("mdc-slider--disabled"===e)this.disabled=!1},hasClass:e=>{switch(e){case"mdc-slider--disabled":return this.disabled;case"mdc-slider--discrete":return this.discrete;default:return!1}},addThumbClass:(e,t)=>{if(t!==_n.START&&"mdc-slider__thumb--with-indicator"===e)this.endThumbWithIndicator=!0},removeThumbClass:(e,t)=>{if(t!==_n.START&&"mdc-slider__thumb--with-indicator"===e)this.endThumbWithIndicator=!1},registerEventHandler:()=>{},deregisterEventHandler:()=>{},registerBodyEventHandler:(e,t)=>{document.body.addEventListener(e,t)},deregisterBodyEventHandler:(e,t)=>{document.body.removeEventListener(e,t)},registerInputEventHandler:(e,t,i)=>{e!==_n.START&&this.formElement.addEventListener(t,i)},deregisterInputEventHandler:(e,t,i)=>{e!==_n.START&&this.formElement.removeEventListener(t,i)},registerThumbEventHandler:()=>{},deregisterThumbEventHandler:()=>{},registerWindowEventHandler:(e,t)=>{window.addEventListener(e,t)},deregisterWindowEventHandler:(e,t)=>{window.addEventListener(e,t)},emitChangeEvent:(e,t)=>{if(t===_n.START)return;const i=new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:e,thumb:t}});this.dispatchEvent(i)},emitDragEndEvent:(e,t)=>{t!==_n.START&&this.endRippleHandlers.endPress()},emitDragStartEvent:(e,t)=>{t!==_n.START&&this.endRippleHandlers.startPress()},emitInputEvent:(e,t)=>{if(t===_n.START)return;const i=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:e,thumb:t}});this.dispatchEvent(i)},focusInput:e=>{e!==_n.START&&this.formElement.focus()},getAttribute:()=>"",getBoundingClientRect:()=>this.mdcRoot.getBoundingClientRect(),getInputAttribute:(e,t)=>{if(t===_n.START)return null;switch(e){case"min":return this.min.toString();case"max":return this.max.toString();case"value":return this.valueEnd.toString();case"step":return this.step.toString();default:return null}},getInputValue:e=>e===_n.START?"":this.valueEnd.toString(),getThumbBoundingClientRect:e=>e===_n.START?this.getBoundingClientRect():this.endThumb.getBoundingClientRect(),getThumbKnobWidth:e=>e===_n.START?0:this.endThumbKnob.getBoundingClientRect().width,getValueToAriaValueTextFn:()=>this.valueToAriaTextTransform,isInputFocused:e=>{if(e===_n.START)return!1;const t=Re();return t[t.length-1]===this.formElement},isRTL:()=>"rtl"===getComputedStyle(this).direction,setInputAttribute:(e,t,i)=>{_n.START},removeInputAttribute:e=>{},setThumbStyleProperty:(e,t,i)=>{if(i!==_n.START)switch(e){case"transform":case"-webkit-transform":this.endThumbTransformStyle=t;break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=t}},removeThumbStyleProperty:(e,t)=>{if(t!==_n.START)switch(e){case"left":case"right":break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=""}},setTrackActiveStyleProperty:(e,t)=>{switch(e){case"transform-origin":this.trackTransformOriginStyle=t;break;case"left":this.trackLeftStyle=t;break;case"right":this.trackRightStyle=t;break;case"transform":case"-webkit-transform":break;case"transition":case"-webkit-transition":this.trackTransitionStyle=t}},removeTrackActiveStyleProperty:e=>{switch(e){case"transition":case"-webkit-transition":this.trackTransitionStyle=""}},setInputValue:(e,t)=>{t!==_n.START&&(this.valueEnd=Number(e))},setPointerCapture:e=>{this.mdcRoot.setPointerCapture(e)},setValueIndicatorText:()=>{},updateTickMarks:e=>{this.tickMarks=e}}}}n([se({type:Number})],Xn.prototype,"value",null);
+ `;
+ }
+ createAdapter() {
+ return {
+ addClass: (className) => {
+ switch (className) {
+ case 'mdc-slider--disabled':
+ this.disabled = true;
+ break;
+ }
+ },
+ removeClass: (className) => {
+ switch (className) {
+ case 'mdc-slider--disabled':
+ this.disabled = false;
+ break;
+ }
+ },
+ hasClass: (className) => {
+ switch (className) {
+ case 'mdc-slider--disabled':
+ return this.disabled;
+ case 'mdc-slider--discrete':
+ return this.discrete;
+ default:
+ return false;
+ }
+ },
+ addThumbClass: (className, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ switch (className) {
+ case 'mdc-slider__thumb--with-indicator':
+ this.endThumbWithIndicator = true;
+ break;
+ }
+ },
+ removeThumbClass: (className, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ switch (className) {
+ case 'mdc-slider__thumb--with-indicator':
+ this.endThumbWithIndicator = false;
+ break;
+ }
+ },
+ registerEventHandler: () => {
+ // handled in bindings
+ },
+ deregisterEventHandler: () => {
+ // handled in bindings
+ },
+ registerBodyEventHandler: (eventName, handler) => {
+ document.body.addEventListener(eventName, handler);
+ },
+ deregisterBodyEventHandler: (eventName, handler) => {
+ document.body.removeEventListener(eventName, handler);
+ },
+ registerInputEventHandler: (thumb, eventName, handler) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ this.formElement.addEventListener(eventName, handler);
+ },
+ deregisterInputEventHandler: (thumb, eventName, handler) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ this.formElement.removeEventListener(eventName, handler);
+ },
+ registerThumbEventHandler: () => {
+ // handled by bindings
+ },
+ deregisterThumbEventHandler: () => {
+ // handled by bindings
+ },
+ registerWindowEventHandler: (eventName, handler) => {
+ window.addEventListener(eventName, handler);
+ },
+ deregisterWindowEventHandler: (eventName, handler) => {
+ window.addEventListener(eventName, handler);
+ },
+ emitChangeEvent: (value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ const event = new CustomEvent('change', { bubbles: true, composed: true, detail: { value, thumb } });
+ this.dispatchEvent(event);
+ },
+ emitDragEndEvent: (_value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ // Emitting event is not yet implemented. See issue:
+ // https://github.com/material-components/material-components-web/issues/6448
+ this.endRippleHandlers.endPress();
+ },
+ emitDragStartEvent: (_value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ // Emitting event is not yet implemented. See issue:
+ // https://github.com/material-components/material-components-web/issues/6448
+ this.endRippleHandlers.startPress();
+ },
+ emitInputEvent: (value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ const event = new CustomEvent('input', { bubbles: true, composed: true, detail: { value, thumb } });
+ this.dispatchEvent(event);
+ },
+ focusInput: (thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ this.formElement.focus();
+ },
+ getAttribute: () => {
+ // never seems to actually be used
+ return '';
+ },
+ getBoundingClientRect: () => {
+ return this.mdcRoot.getBoundingClientRect();
+ },
+ getInputAttribute: (attrName, thumb) => {
+ if (thumb === Thumb.START) {
+ return null;
+ }
+ switch (attrName) {
+ case 'min':
+ return this.min.toString();
+ case 'max':
+ return this.max.toString();
+ case 'value':
+ return this.valueEnd.toString();
+ case 'step':
+ return this.step.toString();
+ default:
+ return null;
+ }
+ },
+ getInputValue: (thumb) => {
+ if (thumb === Thumb.START) {
+ return '';
+ }
+ return this.valueEnd.toString();
+ },
+ getThumbBoundingClientRect: (thumb) => {
+ if (thumb === Thumb.START) {
+ return this.getBoundingClientRect();
+ }
+ return this.endThumb.getBoundingClientRect();
+ },
+ getThumbKnobWidth: (thumb) => {
+ if (thumb === Thumb.START) {
+ return 0;
+ }
+ return this.endThumbKnob.getBoundingClientRect().width;
+ },
+ getValueToAriaValueTextFn: () => {
+ return this.valueToAriaTextTransform;
+ },
+ isInputFocused: (thumb) => {
+ if (thumb === Thumb.START) {
+ return false;
+ }
+ const activeElements = deepActiveElementPath();
+ return activeElements[activeElements.length - 1] === this.formElement;
+ },
+ isRTL: () => {
+ return getComputedStyle(this).direction === 'rtl';
+ },
+ setInputAttribute: (attribute, _value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ },
+ removeInputAttribute: (attribute) => {
+ },
+ setThumbStyleProperty: (name, value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ switch (name) {
+ case 'transform':
+ case '-webkit-transform':
+ this.endThumbTransformStyle = value;
+ break;
+ case 'transition':
+ case '-webkit-transition':
+ this.endThumbTransitionStyle = value;
+ break;
+ }
+ },
+ removeThumbStyleProperty: (name, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ switch (name) {
+ case 'left':
+ case 'right':
+ // handled by bindings
+ break;
+ case 'transition':
+ case '-webkit-transition':
+ this.endThumbTransitionStyle = '';
+ break;
+ }
+ },
+ setTrackActiveStyleProperty: (name, value) => {
+ switch (name) {
+ case 'transform-origin':
+ this.trackTransformOriginStyle = value;
+ break;
+ case 'left':
+ this.trackLeftStyle = value;
+ break;
+ case 'right':
+ this.trackRightStyle = value;
+ break;
+ case 'transform':
+ case '-webkit-transform':
+ // handled by bindings
+ break;
+ case 'transition':
+ case '-webkit-transition':
+ this.trackTransitionStyle = value;
+ break;
+ }
+ },
+ removeTrackActiveStyleProperty: (name) => {
+ switch (name) {
+ case 'transition':
+ case '-webkit-transition':
+ this.trackTransitionStyle = '';
+ break;
+ }
+ },
+ setInputValue: (value, thumb) => {
+ if (thumb === Thumb.START) {
+ return;
+ }
+ this.valueEnd = Number(value);
+ },
+ setPointerCapture: (pointerId) => {
+ this.mdcRoot.setPointerCapture(pointerId);
+ },
+ setValueIndicatorText: () => {
+ // handled by bindings
+ },
+ updateTickMarks: (tickMarks) => {
+ this.tickMarks = tickMarks;
+ },
+ };
+ }
+}
+__decorate([
+ e$6({ type: Number })
+], SliderSingleBase.prototype, "value", null);
+
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
*/
-const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__track--active_fill{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%)}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0,0,0,.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.6}.mdc-slider.mdc-slider--disabled{opacity:.38;cursor:auto}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}:host{outline:none;display:block;-webkit-tap-highlight-color:transparent}.ripple{--mdc-ripple-color:#6200ee;--mdc-ripple-color:var(--mdc-theme-primary, #6200ee)}`,jn={"mwc-slider":class extends Xn{static get styles(){return Wn}},"mwc-ripple":class extends $i{static get styles(){return Xi}}};let Gn=class extends(function(e){return class extends e{createRenderRoot(){const e=this.constructor,{registry:t,elementDefinitions:i,shadowRootOptions:n}=e;i&&!t&&(e.registry=new CustomElementRegistry,Object.entries(i).forEach((([t,i])=>e.registry.define(t,i))));const r=this.renderOptions.creationScope=this.attachShadow({...n,customElements:e.registry});return m(r,this.constructor.elementStyles),r}}}(ae)){constructor(){super(...arguments),this._initialized=!1}setConfig(e){this._config=e,this.loadCardHelpers()}shouldUpdate(){return this._initialized||this._initialize(),!0}get _name(){var e;return(null===(e=this._config)||void 0===e?void 0:e.name)||""}get _entity(){var e;return(null===(e=this._config)||void 0===e?void 0:e.entity)||""}get _show_warning(){var e;return(null===(e=this._config)||void 0===e?void 0:e.show_warning)||!1}get _show_error(){var e;return(null===(e=this._config)||void 0===e?void 0:e.show_error)||!1}render(){if(!this.hass||!this._helpers)return P``;let e;return e=this._config,P`
+const styles = i$5 `.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__track--active_fill{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%)}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0,0,0,.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.6}.mdc-slider.mdc-slider--disabled{opacity:.38;cursor:auto}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}:host{outline:none;display:block;-webkit-tap-highlight-color:transparent}.ripple{--mdc-ripple-color:#6200ee;--mdc-ripple-color:var(--mdc-theme-primary, #6200ee)}`;
+
+const sliderDefinition = {
+ 'mwc-slider': class extends SliderSingleBase {
+ static get styles() {
+ return styles;
+ }
+ },
+ 'mwc-ripple': class extends RippleBase {
+ static get styles() {
+ return styles$6;
+ }
+ }
+};
+
+let BomRadarCardEditor = class BomRadarCardEditor extends e$2(s$1) {
+ constructor() {
+ super(...arguments);
+ this._initialized = false;
+ }
+ setConfig(config) {
+ this._config = config;
+ this.loadCardHelpers();
+ }
+ shouldUpdate() {
+ if (!this._initialized) {
+ this._initialize();
+ }
+ return true;
+ }
+ get _name() {
+ var _a;
+ return ((_a = this._config) === null || _a === void 0 ? void 0 : _a.name) || '';
+ }
+ get _entity() {
+ var _a;
+ return ((_a = this._config) === null || _a === void 0 ? void 0 : _a.entity) || '';
+ }
+ get _show_warning() {
+ var _a;
+ return ((_a = this._config) === null || _a === void 0 ? void 0 : _a.show_warning) || false;
+ }
+ get _show_error() {
+ var _a;
+ return ((_a = this._config) === null || _a === void 0 ? void 0 : _a.show_error) || false;
+ }
+ render() {
+ if (!this.hass || !this._helpers) {
+ return x ``;
+ }
+ let config;
+ // eslint-disable-next-line prefer-const
+ config = this._config;
+ return x `
-
e.stopPropagation()}
+ ev.stopPropagation()}
>
Bureau of Meteorology
@@ -1110,7 +10424,8 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
RainViewer - Dark Sky
- e.stopPropagation()}
+ ev.stopPropagation()}
>
Light
@@ -1118,7 +10433,8 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
Satellite
Dark
- e.stopPropagation()}
+ ev.stopPropagation()}
>
4
@@ -1132,67 +10448,67 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
-
+
-
+
@@ -1200,22 +10516,22 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
-
+
-
+
@@ -1223,22 +10539,22 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
-
+
-
+
@@ -1246,15 +10562,15 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
-
+
@@ -1263,8 +10579,8 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
@@ -1272,19 +10588,79 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
- `}_initialize(){void 0!==this.hass&&void 0!==this._config&&void 0!==this._helpers&&(this._initialized=!0)}async loadCardHelpers(){this._helpers=await window.loadCardHelpers()}_valueChangedSwitch(e){const t=e.target;this._config&&this.hass&&t&&(this._config=Object.assign(Object.assign({},this._config),{[t.configValue]:t.checked}),_e(this,"config-changed",{config:this._config}))}_valueChangedNumber(e){if(!this._config||!this.hass)return;const t=e.target;this[`_${t.configValue}`]!==t.value&&(t.configValue&&(""===t.value||null===t.value?delete this._config[t.configValue]:this._config=Object.assign(Object.assign({},this._config),{[t.configValue]:Number(t.value)})),_e(this,"config-changed",{config:this._config}))}_valueChangedString(e){if(!this._config||!this.hass)return;const t=e.target;this[`_${t.configValue}`]!==t.value&&(t.configValue&&(""===t.value?delete this._config[t.configValue]:this._config=Object.assign(Object.assign({},this._config),{[t.configValue]:t.value})),_e(this,"config-changed",{config:this._config}))}};Gn.elementDefinitions=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},vn),qi),tn),We),jn),Gn.styles=c`
+ `;
+ }
+ _initialize() {
+ if (this.hass === undefined)
+ return;
+ if (this._config === undefined)
+ return;
+ if (this._helpers === undefined)
+ return;
+ this._initialized = true;
+ }
+ async loadCardHelpers() {
+ this._helpers = await window.loadCardHelpers();
+ }
+ _valueChangedSwitch(ev) {
+ const target = ev.target;
+ if (!this._config || !this.hass || !target) {
+ return;
+ }
+ this._config = Object.assign(Object.assign({}, this._config), { [target.configValue]: target.checked });
+ ne(this, 'config-changed', { config: this._config });
+ }
+ _valueChangedNumber(ev) {
+ if (!this._config || !this.hass) {
+ return;
+ }
+ const target = ev.target;
+ if (this[`_${target.configValue}`] === target.value) {
+ return;
+ }
+ if (target.configValue) {
+ if (target.value === '' || target.value === null) {
+ delete this._config[target.configValue];
+ }
+ else {
+ this._config = Object.assign(Object.assign({}, this._config), { [target.configValue]: Number(target.value) });
+ }
+ }
+ ne(this, 'config-changed', { config: this._config });
+ }
+ _valueChangedString(ev) {
+ if (!this._config || !this.hass) {
+ return;
+ }
+ const target = ev.target;
+ if (this[`_${target.configValue}`] === target.value) {
+ return;
+ }
+ if (target.configValue) {
+ if (target.value === '') {
+ delete this._config[target.configValue];
+ }
+ else {
+ this._config = Object.assign(Object.assign({}, this._config), { [target.configValue]: target.value });
+ }
+ }
+ ne(this, 'config-changed', { config: this._config });
+ }
+};
+BomRadarCardEditor.elementDefinitions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, textfieldDefinition), selectDefinition), switchDefinition), formfieldDefinition), sliderDefinition);
+BomRadarCardEditor.styles = i$5 `
mwc-select,
mwc-textfield {
margin-bottom: 16px;
@@ -1329,21 +10705,881 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
flex: 1;
padding-right: 4px;
}
- `,n([se({attribute:!1})],Gn.prototype,"hass",void 0),n([ce()],Gn.prototype,"_config",void 0),n([ce()],Gn.prototype,"_helpers",void 0),Gn=n([de("bom-radar-card-editor")],Gn);var qn={version:"Version",invalid_configuration:"Invalid configuration",show_warning:"Show Warning"},Yn={common:qn},Kn={version:"Versjon",invalid_configuration:"Ikke gyldig konfiguration",show_warning:"Vis advarsel"},Zn={common:Kn};const Qn={en:Object.freeze({__proto__:null,common:qn,default:Yn}),nb:Object.freeze({__proto__:null,common:Kn,default:Zn})};function Jn(e,t="",i=""){const n=(localStorage.getItem("selectedLanguage")||"en").replace(/['"]+/g,"").replace("-","_");let r;try{r=e.split(".").reduce(((e,t)=>e[t]),Qn[n])}catch(t){r=e.split(".").reduce(((e,t)=>e[t]),Qn.en)}return void 0===r&&(r=e.split(".").reduce(((e,t)=>e[t]),Qn.en)),""!==t&&""!==i&&(r=r.replace(t,i)),r}console.info(`%c BOM-RADAR-CARD \n%c ${Jn("common.version")} 2.1.1 `,"color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),window.customCards=window.customCards||[],window.customCards.push({type:"bom-radar-card",name:"BoM Radar Card",description:"A rain radar card using the new tiled images from the Australian BoM"});let er=class extends ae{constructor(){super(...arguments),this.isPanel=!1}static async getConfigElement(){return document.createElement("bom-radar-card-editor")}static getStubConfig(){return{}}setConfig(e){this._config=e}getCardSize(){return 10}shouldUpdate(){return!0}render(){if(this._config.show_warning)return this.showWarning(Jn("common.show_warning"));const e=`\n \n \n \n BOM Radar Card \n \n \n \n \n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `; */
+ const padding = this.isPanel
+ ? this.offsetParent
+ ? this.offsetParent.clientHeight - 2 - (this.editMode === true ? 59 : 0) + `px`
+ : `540px`
+ : this._config.square_map !== undefined
+ ? this._config.square_map
+ ? `${this.getBoundingClientRect().width + 48}px`
+ : `540px`
+ : `540px`;
+ const cardTitle = this._config.card_title !== undefined ? x `${this._config.card_title}
` : ``;
+ return x `
-
- ${i}
-
-
+
+ ${cardTitle}
+
- `}showWarning(e){return P`
-
${e}
- `}showError(e){const t=document.createElement("hui-error-card");return t.setConfig({type:"error",error:e,origConfig:this._config}),P`
- ${t}
- `}get styles(){return c`
+ `;
+ }
+ showWarning(warning) {
+ return x `
+
${warning}
+ `;
+ }
+ showError(error) {
+ const errorCard = document.createElement('hui-error-card');
+ errorCard.setConfig({
+ type: 'error',
+ error,
+ origConfig: this._config,
+ });
+ return x `
+ ${errorCard}
+ `;
+ }
+ get styles() {
+ return i$5 `
.text-container {
font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;
}
@@ -1354,6 +11590,12 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
width: 100%;
position: relative;
}
+ #map {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ width: 100%;
+ }
iframe {
position: absolute;
border: none;
@@ -1366,4 +11608,23 @@ const Wn=c`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relativ
margin: 8px 0px 4px 8px;
font-size: 1.5em;
}
- `}};n([se({type:Boolean,reflect:!0})],er.prototype,"isPanel",void 0),n([se({attribute:!1})],er.prototype,"hass",void 0),n([se({attribute:!1})],er.prototype,"_config",void 0),n([se({attribute:!1})],er.prototype,"editMode",void 0),er=n([de("bom-radar-card")],er);export{er as BomRadarCard};
+ `;
+ }
+};
+__decorate([
+ e$6({ type: Boolean, reflect: true })
+], BomRadarCard.prototype, "isPanel", void 0);
+__decorate([
+ e$6({ attribute: false })
+], BomRadarCard.prototype, "hass", void 0);
+__decorate([
+ e$6({ attribute: false })
+], BomRadarCard.prototype, "_config", void 0);
+__decorate([
+ e$6({ attribute: false })
+], BomRadarCard.prototype, "editMode", void 0);
+BomRadarCard = __decorate([
+ e$7('bom-radar-card')
+], BomRadarCard);
+
+export { BomRadarCard };
diff --git a/elements/formfield.js b/elements/formfield.js
index 36479ce..9138e81 100644
--- a/elements/formfield.js
+++ b/elements/formfield.js
@@ -1,10 +1,10 @@
-import { FormfieldBase } from '@material/mwc-formfield/mwc-formfield-base.js';
-import { styles as formfieldStyles } from '@material/mwc-formfield/mwc-formfield.css.js';
-
-export const formfieldDefinition = {
- 'mwc-formfield': class extends FormfieldBase {
- static get styles() {
- return formfieldStyles;
- }
- },
-};
+import { FormfieldBase } from '@material/mwc-formfield/mwc-formfield-base.js';
+import { styles as formfieldStyles } from '@material/mwc-formfield/mwc-formfield.css.js';
+
+export const formfieldDefinition = {
+ 'mwc-formfield': class extends FormfieldBase {
+ static get styles() {
+ return formfieldStyles;
+ }
+ },
+};
diff --git a/elements/ignore/select.js b/elements/ignore/select.js
index b1e1d15..3dde6c5 100644
--- a/elements/ignore/select.js
+++ b/elements/ignore/select.js
@@ -1,8 +1,8 @@
-export const ignoreSelectFiles = [
- '@material/mwc-ripple/mwc-ripple.js',
- '@material/mwc-menu/mwc-menu.js',
- '@material/mwc-menu/mwc-menu-surface.js',
- '@material/mwc-list/mwc-list.js',
- '@material/mwc-list/mwc-list-item.js',
- '@material/mwc-icon/mwc-icon.js',
-];
+export const ignoreSelectFiles = [
+ '@material/mwc-ripple/mwc-ripple.js',
+ '@material/mwc-menu/mwc-menu.js',
+ '@material/mwc-menu/mwc-menu-surface.js',
+ '@material/mwc-list/mwc-list.js',
+ '@material/mwc-list/mwc-list-item.js',
+ '@material/mwc-icon/mwc-icon.js',
+];
diff --git a/elements/ignore/switch.js b/elements/ignore/switch.js
index e13a8a7..5d3d699 100644
--- a/elements/ignore/switch.js
+++ b/elements/ignore/switch.js
@@ -1 +1 @@
-export const ignoreSwitchFiles = ['@material/mwc-ripple/mwc-ripple.js'];
+export const ignoreSwitchFiles = ['@material/mwc-ripple/mwc-ripple.js'];
diff --git a/elements/ignore/textfield.js b/elements/ignore/textfield.js
index 987fd50..632aa92 100644
--- a/elements/ignore/textfield.js
+++ b/elements/ignore/textfield.js
@@ -1 +1 @@
-export const ignoreTextfieldFiles = ['@material/mwc-notched-outline/mwc-notched-outline.js'];
+export const ignoreTextfieldFiles = ['@material/mwc-notched-outline/mwc-notched-outline.js'];
diff --git a/elements/select.js b/elements/select.js
index 3a8a055..fb01d4f 100644
--- a/elements/select.js
+++ b/elements/select.js
@@ -1,53 +1,53 @@
-import { SelectBase } from '@material/mwc-select/mwc-select-base.js';
-import { ListBase } from '@material/mwc-list/mwc-list-base.js';
-import { ListItemBase } from '@material/mwc-list/mwc-list-item-base.js';
-import { MenuBase } from '@material/mwc-menu/mwc-menu-base.js';
-import { MenuSurfaceBase } from '@material/mwc-menu/mwc-menu-surface-base.js';
-import { RippleBase } from '@material/mwc-ripple/mwc-ripple-base.js';
-import { NotchedOutlineBase } from '@material/mwc-notched-outline/mwc-notched-outline-base.js';
-
-import { styles as selectStyles } from '@material/mwc-select/mwc-select.css';
-import { styles as listStyles } from '@material/mwc-list/mwc-list.css';
-import { styles as listItemStyles } from '@material/mwc-list//mwc-list-item.css';
-import { styles as rippleStyles } from '@material/mwc-ripple/mwc-ripple.css';
-import { styles as menuStyles } from '@material/mwc-menu/mwc-menu.css';
-import { styles as menuSurfaceStyles } from '@material/mwc-menu/mwc-menu-surface.css';
-import { styles as notchedOutlineStyles } from '@material/mwc-notched-outline/mwc-notched-outline.css';
-
-export const selectDefinition = {
- 'mwc-select': class extends SelectBase {
- static get styles() {
- return selectStyles;
- }
- },
- 'mwc-list': class extends ListBase {
- static get styles() {
- return listStyles;
- }
- },
- 'mwc-list-item': class extends ListItemBase {
- static get styles() {
- return listItemStyles;
- }
- },
- 'mwc-ripple': class extends RippleBase {
- static get styles() {
- return rippleStyles;
- }
- },
- 'mwc-menu': class extends MenuBase {
- static get styles() {
- return menuStyles;
- }
- },
- 'mwc-menu-surface': class extends MenuSurfaceBase {
- static get styles() {
- return menuSurfaceStyles;
- }
- },
- 'mwc-notched-outline': class extends NotchedOutlineBase {
- static get styles() {
- return notchedOutlineStyles;
- }
- },
-};
+import { SelectBase } from '@material/mwc-select/mwc-select-base.js';
+import { ListBase } from '@material/mwc-list/mwc-list-base.js';
+import { ListItemBase } from '@material/mwc-list/mwc-list-item-base.js';
+import { MenuBase } from '@material/mwc-menu/mwc-menu-base.js';
+import { MenuSurfaceBase } from '@material/mwc-menu/mwc-menu-surface-base.js';
+import { RippleBase } from '@material/mwc-ripple/mwc-ripple-base.js';
+import { NotchedOutlineBase } from '@material/mwc-notched-outline/mwc-notched-outline-base.js';
+
+import { styles as selectStyles } from '@material/mwc-select/mwc-select.css';
+import { styles as listStyles } from '@material/mwc-list/mwc-list.css';
+import { styles as listItemStyles } from '@material/mwc-list//mwc-list-item.css';
+import { styles as rippleStyles } from '@material/mwc-ripple/mwc-ripple.css';
+import { styles as menuStyles } from '@material/mwc-menu/mwc-menu.css';
+import { styles as menuSurfaceStyles } from '@material/mwc-menu/mwc-menu-surface.css';
+import { styles as notchedOutlineStyles } from '@material/mwc-notched-outline/mwc-notched-outline.css';
+
+export const selectDefinition = {
+ 'mwc-select': class extends SelectBase {
+ static get styles() {
+ return selectStyles;
+ }
+ },
+ 'mwc-list': class extends ListBase {
+ static get styles() {
+ return listStyles;
+ }
+ },
+ 'mwc-list-item': class extends ListItemBase {
+ static get styles() {
+ return listItemStyles;
+ }
+ },
+ 'mwc-ripple': class extends RippleBase {
+ static get styles() {
+ return rippleStyles;
+ }
+ },
+ 'mwc-menu': class extends MenuBase {
+ static get styles() {
+ return menuStyles;
+ }
+ },
+ 'mwc-menu-surface': class extends MenuSurfaceBase {
+ static get styles() {
+ return menuSurfaceStyles;
+ }
+ },
+ 'mwc-notched-outline': class extends NotchedOutlineBase {
+ static get styles() {
+ return notchedOutlineStyles;
+ }
+ },
+};
diff --git a/elements/slider.js b/elements/slider.js
index 486d2fd..5acc82b 100644
--- a/elements/slider.js
+++ b/elements/slider.js
@@ -1,17 +1,17 @@
-import { SliderSingleBase } from '@material/mwc-slider/slider-single-base.js';
-import { RippleBase } from '@material/mwc-ripple/mwc-ripple-base.js';
-import { styles as sliderStyles } from '@material/mwc-slider/mwc-slider.css';
-import { styles as rippleStyles } from '@material/mwc-ripple/mwc-ripple.css';
-
-export const sliderDefinition = {
- 'mwc-slider': class extends SliderSingleBase {
- static get styles() {
- return sliderStyles;
- }
- },
- 'mwc-ripple': class extends RippleBase {
- static get styles() {
- return rippleStyles;
- }
- },
-};
+import { SliderSingleBase } from '@material/mwc-slider/slider-single-base.js';
+import { RippleBase } from '@material/mwc-ripple/mwc-ripple-base.js';
+import { styles as sliderStyles } from '@material/mwc-slider/mwc-slider.css';
+import { styles as rippleStyles } from '@material/mwc-ripple/mwc-ripple.css';
+
+export const sliderDefinition = {
+ 'mwc-slider': class extends SliderSingleBase {
+ static get styles() {
+ return sliderStyles;
+ }
+ },
+ 'mwc-ripple': class extends RippleBase {
+ static get styles() {
+ return rippleStyles;
+ }
+ },
+};
diff --git a/elements/switch.js b/elements/switch.js
index 023589d..791fd9f 100644
--- a/elements/switch.js
+++ b/elements/switch.js
@@ -1,17 +1,17 @@
-import { SwitchBase } from '@material/mwc-switch/deprecated/mwc-switch-base.js';
-import { RippleBase } from '@material/mwc-ripple/mwc-ripple-base.js';
-import { styles as switchStyles } from '@material/mwc-switch/deprecated/mwc-switch.css';
-import { styles as rippleStyles } from '@material/mwc-ripple/mwc-ripple.css';
-
-export const switchDefinition = {
- 'mwc-switch': class extends SwitchBase {
- static get styles() {
- return switchStyles;
- }
- },
- 'mwc-ripple': class extends RippleBase {
- static get styles() {
- return rippleStyles;
- }
- },
-};
+import { SwitchBase } from '@material/mwc-switch/deprecated/mwc-switch-base.js';
+import { RippleBase } from '@material/mwc-ripple/mwc-ripple-base.js';
+import { styles as switchStyles } from '@material/mwc-switch/deprecated/mwc-switch.css';
+import { styles as rippleStyles } from '@material/mwc-ripple/mwc-ripple.css';
+
+export const switchDefinition = {
+ 'mwc-switch': class extends SwitchBase {
+ static get styles() {
+ return switchStyles;
+ }
+ },
+ 'mwc-ripple': class extends RippleBase {
+ static get styles() {
+ return rippleStyles;
+ }
+ },
+};
diff --git a/elements/textfield.js b/elements/textfield.js
index c644020..77cdef2 100644
--- a/elements/textfield.js
+++ b/elements/textfield.js
@@ -1,18 +1,18 @@
-import { TextFieldBase } from '@material/mwc-textfield/mwc-textfield-base.js';
-import { NotchedOutlineBase } from '@material/mwc-notched-outline/mwc-notched-outline-base.js';
-
-import { styles as textfieldStyles } from '@material/mwc-textfield/mwc-textfield.css';
-import { styles as notchedOutlineStyles } from '@material/mwc-notched-outline/mwc-notched-outline.css';
-
-export const textfieldDefinition = {
- 'mwc-textfield': class extends TextFieldBase {
- static get styles() {
- return textfieldStyles;
- }
- },
- 'mwc-notched-outline': class extends NotchedOutlineBase {
- static get styles() {
- return notchedOutlineStyles;
- }
- },
-};
+import { TextFieldBase } from '@material/mwc-textfield/mwc-textfield-base.js';
+import { NotchedOutlineBase } from '@material/mwc-notched-outline/mwc-notched-outline-base.js';
+
+import { styles as textfieldStyles } from '@material/mwc-textfield/mwc-textfield.css';
+import { styles as notchedOutlineStyles } from '@material/mwc-notched-outline/mwc-notched-outline.css';
+
+export const textfieldDefinition = {
+ 'mwc-textfield': class extends TextFieldBase {
+ static get styles() {
+ return textfieldStyles;
+ }
+ },
+ 'mwc-notched-outline': class extends NotchedOutlineBase {
+ static get styles() {
+ return notchedOutlineStyles;
+ }
+ },
+};
diff --git a/package.json b/package.json
index fc26c9f..4546e89 100755
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "bom-radar-card",
- "version": "2.1.1",
- "description": "A rain radar card using the new tiled images from the Australian BOM",
+ "version": "3.0.0",
+ "description": "A rain radar card using the new vector tiles from the Australian BOM",
"keywords": [
"home-assistant",
"homeassistant",
@@ -28,6 +28,7 @@
"custom-card-helpers": "^1.9.0",
"home-assistant-js-websocket": "^5.11.1",
"lit": "^2.2.2",
+ "mapbox.js": "^3.3.1",
"randombytes": "^2.1.0",
"safe-buffer": "^5.2.1",
"serialize-javascript": "^6.0.0",
@@ -38,7 +39,11 @@
"@babel/core": "^7.19.3",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.19.3",
+ "@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-json": "^4.1.0",
+ "@rollup/plugin-node-resolve": "^15.0.1",
+ "@types/geojson": "^7946.0.10",
+ "@types/mapbox-gl": "^2.7.10",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"eslint": "^7.32.0",
@@ -46,6 +51,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-prettier": "^4.2.1",
+ "mapbox-gl": "^2.13.0",
"prettier": "^2.7.1",
"rollup": "^2.79.1",
"rollup-plugin-babel": "^4.4.0",
@@ -54,7 +60,7 @@
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
- "typescript": "^4.8.4"
+ "typescript": "^5.0.3"
},
"resolutions": {
"lit": "^2.2.0",
diff --git a/rollup-plugins/ignore.js b/rollup-plugins/ignore.js
index 029995c..e69209d 100644
--- a/rollup-plugins/ignore.js
+++ b/rollup-plugins/ignore.js
@@ -1,24 +1,24 @@
-export default function (userOptions = {}) {
- // Files need to be absolute paths.
- // This only works if the file has no exports
- // and only is imported for its side effects
- const files = userOptions.files || [];
-
- if (files.length === 0) {
- return {
- name: 'ignore',
- };
- }
-
- return {
- name: 'ignore',
-
- load(id) {
- return files.some((toIgnorePath) => id.startsWith(toIgnorePath))
- ? {
- code: '',
- }
- : null;
- },
- };
-}
+export default function (userOptions = {}) {
+ // Files need to be absolute paths.
+ // This only works if the file has no exports
+ // and only is imported for its side effects
+ const files = userOptions.files || [];
+
+ if (files.length === 0) {
+ return {
+ name: 'ignore',
+ };
+ }
+
+ return {
+ name: 'ignore',
+
+ load(id) {
+ return files.some((toIgnorePath) => id.startsWith(toIgnorePath))
+ ? {
+ code: '',
+ }
+ : null;
+ },
+ };
+}
diff --git a/rollup.config.dev.js b/rollup.config.dev.js
index dea03e6..4662626 100644
--- a/rollup.config.dev.js
+++ b/rollup.config.dev.js
@@ -1,5 +1,6 @@
-import resolve from 'rollup-plugin-node-resolve';
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
import babel from 'rollup-plugin-babel';
import serve from 'rollup-plugin-serve';
@@ -18,12 +19,13 @@ export default {
},
plugins: [
resolve(),
+ commonjs(),
typescript(),
json(),
babel({
exclude: 'node_modules/**',
}),
- terser(),
+// terser(),
serve({
contentBase: './dist',
host: '0.0.0.0',
diff --git a/rollup.config.js b/rollup.config.js
index 20ffcdc..acd80f3 100755
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,6 +1,6 @@
import typescript from 'rollup-plugin-typescript2';
-import commonjs from 'rollup-plugin-commonjs';
-import nodeResolve from 'rollup-plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+import nodeResolve from '@rollup/plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import { terser } from 'rollup-plugin-terser';
import serve from 'rollup-plugin-serve';
@@ -9,7 +9,8 @@ import ignore from './rollup-plugins/ignore';
import { ignoreTextfieldFiles } from './elements/ignore/textfield';
import { ignoreSelectFiles } from './elements/ignore/select';
import { ignoreSwitchFiles } from './elements/ignore/switch';
-const dev = process.env.ROLLUP_WATCH;
+
+const dev = true;
const serveopts = {
contentBase: ['./dist'],
diff --git a/src/bom-radar-card.ts b/src/bom-radar-card.ts
index a8ea226..2562b94 100755
--- a/src/bom-radar-card.ts
+++ b/src/bom-radar-card.ts
@@ -6,9 +6,10 @@ import './editor';
import { BomRadarCardConfig } from './types';
import { CARD_VERSION } from './const';
-
import { localize } from './localize/localize';
+import * as mapboxgl from 'mapbox-gl';
+
/* eslint no-console: 0 */
console.info(
`%c BOM-RADAR-CARD \n%c ${localize('common.version')} ${CARD_VERSION} `,
@@ -22,10 +23,9 @@ console.info(
(window as any).customCards.push({
type: 'bom-radar-card',
name: 'BoM Radar Card',
- description: 'A rain radar card using the new tiled images from the Australian BoM',
+ description: 'A rain radar card using the new vector tiles from the Australian BoM',
});
-// TODO Name your custom element
@customElement('bom-radar-card')
export class BomRadarCard extends LitElement implements LovelaceCard {
public static async getConfigElement(): Promise
{
@@ -65,6 +65,18 @@ export class BomRadarCard extends LitElement implements LovelaceCard {
return 10;
}
+ protected firstUpdated(): void {
+ const m = new mapboxgl.Map({
+ accessToken: 'pk.eyJ1IjoiYm9tLWRjLXByb2QiLCJhIjoiY2w4dHA5ZHE3MDlsejN3bnFwZW5vZ2xxdyJ9.KQjQkhGAu78U2Lu5Rxxh4w',
+ container: 'map',
+ // Choose from Mapbox's core styles, or make your own style with Mapbox Studio
+ style: 'mapbox://styles/mapbox/dark-v11',
+ //style: 'mapbox://styles/bom-dc-prod/cl82p806e000b15q6o92eppcb',
+ zoom: 7,
+ center: [149.1, -35.3]
+ });
+ }
+
protected shouldUpdate(/*changedProps: PropertyValues*/): boolean {
return true;
// return hasConfigOrEntityChanged(this, changedProps, false);
@@ -76,662 +88,662 @@ export class BomRadarCard extends LitElement implements LovelaceCard {
return this.showWarning(localize('common.show_warning'));
}
- const doc = `
-
-
-
- BOM Radar Card
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- `;
+ radarImage[0].addTo(radarMap);
+
+ radarImage[idx].setOpacity(radarOpacity);
+ document.getElementById('timestamp').innerHTML = radarTime[idx];
+ d.setTime(d.valueOf() + (frameCount - 1) * framePeriod);
+
+ townLayer = L.tileLayer(
+ label_url,
+ {
+ subdomains: 'abcd',
+ detectRetina: false,
+ tileSize: labelSize,
+ zoomOffset: labelZoom,
+ },
+ ).addTo(radarMap);
+ townLayer.setZIndex(2);
+
+ ${this._config.show_marker === true
+ ? "var myIcon = L.icon({ \
+ iconUrl: '/local/community/bom-radar-card/'+svg_icon, \
+ iconSize: [16, 16], \
+ }); \
+ L.marker([markerLat, markerLon], { icon: myIcon, interactive: false }).addTo(radarMap);"
+ : ''
+ }
+
+ ${this._config.show_range === true
+ ? this.hass.config.unit_system.length === 'km' ?
+ 'L.circle([markerLat, markerLon], { radius: 50000, weight: 1, fill: false, opacity: 0.3, interactive: false }).addTo(radarMap); \
+ L.circle([markerLat, markerLon], { radius: 100000, weight: 1, fill: false, opacity: 0.3, interactive: false }).addTo(radarMap); \
+ L.circle([markerLat, markerLon], { radius: 200000, weight: 1, fill: false, opacity: 0.3, interactive: false }).addTo(radarMap);':
+ 'L.circle([markerLat, markerLon], { radius: 48280, weight: 1, fill: false, opacity: 0.3, interactive: false }).addTo(radarMap); \
+ L.circle([markerLat, markerLon], { radius: 96561, weight: 1, fill: false, opacity: 0.3, interactive: false }).addTo(radarMap); \
+ L.circle([markerLat, markerLon], { radius: 193121, weight: 1, fill: false, opacity: 0.3, interactive: false }).addTo(radarMap);'
+ : ''
+ }
+
+ ${this._config.show_radar_location === true
+ ? "radarMap.createPane('overlayRadarLocation'); \
+ radarMap.getPane('overlayRadarLocation').style.zIndex = 401; \
+ radarMap.getPane('overlayRadarLocation').style.pointerEvents = 'none'; \
+ radarLocations.forEach(function (coords) { \
+ L.circleMarker([coords[0], coords[1]], { radius: locationRadius, weight: locationRadius/2, color: locationLineColour, fillColor: locationFillColour, fillOpacity: 1.0, interactive: false, pane: 'overlayRadarLocation' }).addTo(radarMap); \
+ L.circleMarker([coords[0], coords[1]], { radius: Math.max(10, locationRadius*1.5), stroke: false, fill: true, fillOpacity: 0.0, interactive: true, pane: 'overlayRadarLocation' }).addTo(radarMap).bindTooltip(coords[2]); \
+ });"
+ : ''
+ }
+
+ ${this._config.show_radar_coverage === true
+ ? "radarMap.createPane('overlayRadarCoverage'); \
+ radarMap.getPane('overlayRadarCoverage').style.opacity = 0.1; \
+ radarMap.getPane('overlayRadarCoverage').style.zIndex = 400; \
+ radarMap.getPane('overlayRadarCoverage').style.pointerEvents = 'none'; \
+ radarLocations.forEach(function (coords) { \
+ L.circle([coords[0], coords[1]], { radius: 250000, weight: 1, stroke: false, fill: true, fillOpacity: 1, interactive: false, pane: 'overlayRadarCoverage' }).addTo(radarMap); \
+ });"
+ : ''
+ }
+
+ setTimeout(function() {
+ nextFrame();
+ }, timeout);
+ setUpdateTimeout();
+
+ function setUpdateTimeout() {
+ d.setTime(d.valueOf() + framePeriod);
+ x = new Date();
+ setTimeout(triggerRadarUpdate, d.valueOf() - x.valueOf() + frameLag);
+ }
+
+ function triggerRadarUpdate() {
+ doRadarUpdate = true;
+ }
+
+ function updateRadar() {
+ if ((${this._config.data_source === undefined}) || (${this._config.data_source === "BoM"})) {
+ t = getRadarTime(d.valueOf());
+ } else {
+ t = d.valueOf()/1000;
+ }
+ newLayer = L.tileLayer(tileURL, {
+ time: t,
+ maxZoom: maxZoom,
+ tileSize: 256,
+ zoomOffset: 0,
+ opacity: 0,
+ });
+ newLayer.addTo(radarMap);
+ newTime = getRadarTimeString(d.valueOf());
+
+ radarImage[0].remove();
+ for (i = 0; i < frameCount - 1; i++) {
+ radarImage[i] = radarImage[i + 1];
+ radarTime[i] = radarTime[i + 1];
+ }
+ radarImage[frameCount - 1] = newLayer;
+ radarTime[frameCount - 1] = newTime;
+ idx = 0;
+ doRadarUpdate = false;
+
+ setUpdateTimeout();
+ }
+
+ function getRadarTime(date) {
+ x = new Date(date);
+ return (
+ x.getUTCFullYear().toString() +
+ (x.getUTCMonth() + 1).toString().padStart(2, '0') +
+ x
+ .getUTCDate()
+ .toString()
+ .padStart(2, '0') +
+ x
+ .getUTCHours()
+ .toString()
+ .padStart(2, '0') +
+ x
+ .getUTCMinutes()
+ .toString()
+ .padStart(2, '0')
+ );
+ }
+
+ function getRadarTimeString(date) {
+ x = new Date(date);
+ return (
+ weekday[x.getDay()] +
+ ' ' +
+ month[x.getMonth()] +
+ ' ' +
+ x
+ .getDate()
+ .toString()
+ .padStart(2, '0') +
+ ' ' +
+ x
+ .getHours()
+ .toString()
+ .padStart(2, '0') +
+ ':' +
+ x
+ .getMinutes()
+ .toString()
+ .padStart(2, '0')
+ );
+ }
+
+ function nextFrame() {
+ if (run) {
+ nextImage();
+ }
+ setTimeout(function() {
+ nextFrame();
+ }, (idx == frameCount) ? restartDelay : timeout);
+ }
+
+ function skipNext() {
+ if (idx == frameCount-1) {
+ idx += 1;
+ }
+ nextImage();
+ }
+
+ function skipBack() {
+ if (idx == frameCount) {
+ radarImage[frameCount - 1].setOpacity(0);
+ idx -= 1;
+ } else if (idx < frameCount) {
+ radarImage[idx].setOpacity(0);
+ }
+ idx -= 1;
+ if (doRadarUpdate && idx == 1) {
+ updateRadar();
+ }
+ if (idx < 0) {
+ idx = frameCount-1;
+ }
+ document.getElementById("progress-bar").style.width = (idx+1)*barSize+"px";
+ document.getElementById('timestamp').innerHTML = radarTime[idx];
+ radarImage[idx].setOpacity(radarOpacity);
+ }
+
+ function nextImage() {
+ if (idx == frameCount) {
+ radarImage[frameCount - 1].setOpacity(0);
+ } else if (idx < frameCount - 1) {
+ radarImage[idx].setOpacity(0);
+ }
+ idx += 1;
+ if (doRadarUpdate && idx == 1) {
+ updateRadar();
+ }
+ if (idx == frameCount + 1) {
+ idx = 0;
+ }
+ if (idx != frameCount + 1) {
+ document.getElementById("progress-bar").style.width = (idx+1)*barSize+"px";
+ }
+ if (idx < frameCount) {
+ document.getElementById('timestamp').innerHTML = radarTime[idx];
+ radarImage[idx].setOpacity(radarOpacity);
+ }
+ }
+
+ function resizeWindow() {
+ this.document.getElementById("color-bar").width = this.frameElement.offsetWidth;
+ this.document.getElementById("img-color-bar").width = this.frameElement.offsetWidth;
+ this.document.getElementById("mapid").width = this.frameElement.offsetWidth;
+ this.document.getElementById("mapid").height = ${this.isPanel
+ ? this.offsetParent
+ ? this.offsetParent.clientHeight - 48 - 2 - (this.editMode === true ? 59 : 0)
+ : 492
+ : this._config.square_map !== undefined
+ ? this._config.square_map
+ ? this.getBoundingClientRect().width
+ : 492
+ : 492
+ }
+ this.document.getElementById("div-progress-bar").width = this.frameElement.offsetWidth;
+ this.document.getElementById("bottom-container").width = this.frameElement.offsetWidth;
+ barSize = this.frameElement.offsetWidth/frameCount;
+ }
+
+
+