diff --git a/polr-ytube-media-card.js b/polr-ytube-media-card.js index 1490bdc..51e77b8 100644 --- a/polr-ytube-media-card.js +++ b/polr-ytube-media-card.js @@ -1,441 +1,180 @@ -/****************************************************************************** -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."); -} - -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - +var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};function e(e,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=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i=0;o--)(r=t[o])&&(l=(a<3?r(l):a>3?r(e,i,l):r(e,i))||l);return a>3&&l&&Object.defineProperty(e,i,l),l}function r(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")} /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const t$3=window,e$8=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$4=Symbol(),n$7=new WeakMap;let o$8 = class o{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$8&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n$7.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n$7.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new o$8("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$8(n,t,s$4)},S$1=(s,n)=>{e$8?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),o=t$3.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=e.cssText,s.appendChild(n);}));},c$1=e$8?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t; - +const a=window,l=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),d=new WeakMap;let c=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(l&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,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.")})(i)+t[n+1]),t[0]);return new c(i,t,o)},m=l?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new c("string"==typeof t?t:t+"",void 0,o))(e)})(t):t /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var s$3;const e$7=window,r$1=e$7.trustedTypes,h$1=r$1?r$1.emptyScript:"",o$7=e$7.reactiveElementPolyfillSupport,n$6={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$4={attribute:!0,type:String,converter:n$6,reflect:!1,hasChanged:a$1},d$1="finalized";let u$1 = class u 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$4){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$4}static finalize(){if(this.hasOwnProperty(d$1))return !1;this[d$1]=!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$4){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$6).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$6;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){}};u$1[d$1]=!0,u$1.elementProperties=new Map,u$1.elementStyles=[],u$1.shadowRootOptions={mode:"open"},null==o$7||o$7({ReactiveElement:u$1}),(null!==(s$3=e$7.reactiveElementVersions)&&void 0!==s$3?s$3:e$7.reactiveElementVersions=[]).push("1.6.2"); - + */;var h;const p=window,u=p.trustedTypes,f=u?u.emptyScript:"",g=p.reactiveElementPolyfillSupport,b={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},v=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:v},x="finalized";let y=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty(x))return!1;this[x]=!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,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(m(t))}else void 0!==t&&e.push(m(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{l?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=a.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=_){var n;const r=this.constructor._$Ep(t,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:b).toAttribute(e,i.type);this._$El=t,null==a?this.removeAttribute(r):this.setAttribute(r,a),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),a="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:b;this._$El=r,this[r]=a.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||v)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var t$2;const i$4=window,s$2=i$4.trustedTypes,e$6=s$2?s$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,o$6="$lit$",n$5=`lit$${(Math.random()+"").slice(9)}$`,l$3="?"+n$5,h=`<${l$3}>`,r=document,d=()=>r.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.createTreeWalker(r,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$6+s.slice(v)+n$5+w):s+n$5+(-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$6?e$6.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}; - +var w;y[x]=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:y}),(null!==(h=p.reactiveElementVersions)&&void 0!==h?h:p.reactiveElementVersions=[]).push("1.6.2");const E=window,A=E.trustedTypes,C=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,T="?"+k,I=`<${T}>`,L=document,R=()=>L.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,z="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,M=/>/g,F=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),N=/'/g,H=/"/g,D=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),U=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),W=new WeakMap,j=L.createTreeWalker(L,129,null,!1),X=(t,e)=>{const i=t.length-1,n=[];let r,a=2===e?"":"",l=P;for(let e=0;e"===d[0]?(l=null!=r?r:P,c=-1):void 0===d[1]?c=-2:(c=l.lastIndex-d[2].length,o=d[1],l=void 0===d[3]?F:'"'===d[3]?H:N):l===H||l===N?l=F:l===V||l===M?l=P:(l=F,r=void 0);const m=l===F&&t[e+1].startsWith("/>")?" ":"";a+=l===P?i+I:c>=0?(n.push(o),i.slice(0,c)+S+i.slice(c)+k+m):i+k+(-2===c?(n.push(void 0),e):m)}const o=a+(t[i]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==C?C.createHTML(o):o,n]};class q{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,a=0;const l=t.length-1,o=this.parts,[d,c]=X(t,e);if(this.el=q.createElement(d,i),j.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=j.nextNode())&&o.length0){n.textContent=A?A.emptyScript:"";for(let i=0;i$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=q.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new G(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new q(t)),e}T(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new Z(this.k(R()),this.k(R()),this,this.options)):i=e[n],i._$AI(r),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let a=!1;if(void 0===r)t=K(this,t,e,0),a=!O(t)||t!==this._$AH&&t!==U,a&&(this._$AH=t);else{const n=t;let l,o;for(t=r[0],l=0;l{var n,r;const a=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let l=a._$litPart$;if(void 0===l){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;a._$litPart$=l=new Z(e.insertBefore(R(),t),t,void 0,null!=i?i:{})}return l._$AI(t),l})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return U}};ot.finalized=!0,ot._$litElement$=!0,null===(at=globalThis.litElementHydrateSupport)||void 0===at||at.call(globalThis,{LitElement:ot});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ot}),(null!==(lt=globalThis.litElementVersions)&&void 0!==lt?lt:globalThis.litElementVersions=[]).push("3.3.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const e$5=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); - +const ct=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){customElements.define(t,e)}}})(t,e) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -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);}},e$4=(i,e,n)=>{e.constructor.createProperty(n,i);};function n$3(n){return (t,o)=>void 0!==o?e$4(n,t,o):i$3(n,t)} - + */,st=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},mt=(t,e,i)=>{e.constructor.createProperty(i,t)};function ht(t){return(e,i)=>void 0!==i?mt(t,e,i):st(t,e) /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function t$1(t){return n$3({...t,state:!0})} - + */}function pt(t){return ht({...t,state:!0})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -const o$4=({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);}}; - + */const ut=({finisher:t,descriptor:e})=>(i,n)=>{var r;if(void 0===n){const n=null!==(r=i.originalKey)&&void 0!==r?r:i.key,a=null!=e?{kind:"method",placement:"prototype",key:n,descriptor:e(i.key)}:{...i,key:n};return null!=t&&(a.finisher=function(e){t(e,n)}),a}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,n,e(n)),null==t||t(r,n)}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function e$3(e){return o$4({finisher:(r,t)=>{Object.assign(r.prototype[t],e);}})} - + */;function ft(t){return ut({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function i$2(i,n){return o$4({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}})} - + */function gt(t,e){return ut({descriptor:i=>{const n={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;n.get=function(){var i,n;return void 0===this[e]&&(this[e]=null!==(n=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null),this[e]}}return n}})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */ -function e$2(e){return o$4({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})})} - + */function bt(t){return ut({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var n$2;null!=(null===(n$2=window.HTMLSlotElement)||void 0===n$2?void 0:n$2.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE)); - -class PoLRYTubeItem { -} -const PlayableMediaList = ["track", "playlist", "tv_show", "album"]; -const FetchableMediaContentType = [ - "vid_channel", - "playlist", - "track", - "speakers", - "music", -]; -const isNumeric = (num) => (typeof num === "number" || - (typeof num === "string" && num.trim() !== "")) && - !isNaN(num); -function areDeeplyEqual(obj1, obj2, ignoreKeys) { - if (obj1 === obj2) - return true; - if (Array.isArray(obj1) && Array.isArray(obj2)) { - if (obj1.length !== obj2.length) - return false; - return obj1.every((elem, index) => { - return areDeeplyEqual(elem, obj2[index], ignoreKeys); - }); - } - if (typeof obj1 === "object" && - typeof obj2 === "object" && - obj1 !== null && - obj2 !== null) { - if (Array.isArray(obj1) || Array.isArray(obj2)) - return false; - const keys1 = Object.keys(obj1); - const keys2 = Object.keys(obj2); - if (keys1.length !== keys2.length || - !keys1.every((key) => keys2.includes(key))) - return false; - for (let key in obj1) { - if (ignoreKeys.includes(key)) - continue; - let isEqual = areDeeplyEqual(obj1[key], obj2[key], ignoreKeys); - if (!isEqual) { - return false; - } - } - return true; - } - return false; -} - -const ArrowLeftIcon = x ` + */var vt;null===(vt=window.HTMLSlotElement)||void 0===vt||vt.prototype.assignedElements;class _t{}const xt=["track","playlist","tv_show","album"],yt=["vid_channel","playlist","track","speakers","music"];function wt(t,e,i){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every(((t,n)=>wt(t,e[n],i)));if("object"==typeof t&&"object"==typeof e&&null!==t&&null!==e){if(Array.isArray(t)||Array.isArray(e))return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length||!n.every((t=>r.includes(t))))return!1;for(let n in t){if(i.includes(n))continue;if(!wt(t[n],e[n],i))return!1}return!0}return!1}const Et=B` arrow-left -`; -const CastAudioIcon = x ` +`,At=B` -`; -const CloseIcon = x ` +`,Ct=B` -`; -const ForwardBurgerIcon = x ` +`,St=B` forwardburger -`; -const RadioTowerIcon = x ` +`,kt=B` -`; -const RepeatIcon = x ` +`,Tt=B` repeat -`; -const ShuffleVariantIcon = x ` +`,It=B` shuffle-variant -`; -const SkipNextIcon = x ` +`,Lt=B` skip-next -`; -const SkipPreviousIcon = x ` +`,Rt=B` skip-previous -`; -const PauseIcon = x ` +`,Ot=B` pause -`; -const PlayIcon = x ` +`,$t=B` play -`; -const ThumbUpIcon = x ` +`,zt=B` thumb-up -`; -const ThumbUpOutlineIcon = x ` +`,Pt=B` thumb-up-outline -`; -const VolumeHighIcon = x ` +`,Vt=B` volume-high -`; -const VolumeOffIcon = x ` volume-off -`; - -let PoLRYTubeList = class PoLRYTubeList extends s$1 { - updated(_changedProperties) { - // this.renderRoot.querySelector(".current")?.scrollIntoView({ - // behavior: "smooth", - // block: "start", - // inline: "center", - // }); - } - _is_current(element) { - if (this.entity == null) - return false; - if (!isNumeric(element.media_content_id)) - return false; - if ("current_track" in this.entity["attributes"]) { - return (parseInt(element.media_content_id) - 1 == - this.entity["attributes"]["current_track"]); - } - return false; - } - render() { - if (this.state == 4 /* PoLRYTubeListState.LOADING */) { - return x `
Loading...
`; - } - if (this.state == 8 /* PoLRYTubeListState.NO_RESULTS */) { - return x `
No results
`; - } - if (this.state == 16 /* PoLRYTubeListState.ERROR */) { - return x `
Unknown Error
`; - } - if (this.state == 2 /* PoLRYTubeListState.HAS_RESULTS */) { - if (this.elements.length == 0) - return x ``; - const renderedElements = this.elements.map((element) => { - return x ` +`;let Ft=class extends ot{updated(t){}_is_current(t){return null!=this.entity&&(("number"==typeof(e=t.media_content_id)||"string"==typeof e&&""!==e.trim())&&!isNaN(e)&&("current_track"in this.entity.attributes&&parseInt(t.media_content_id)-1==this.entity.attributes.current_track));var e}render(){if(4==this.state)return B`
Loading...
`;if(8==this.state)return B`
No results
`;if(16==this.state)return B`
Unknown Error
`;if(2==this.state){if(0==this.elements.length)return B``;const t=this.elements.map((t=>B`
- ${this._renderThumbnail(element)} -
${element.title}
+ class="element ${this._is_current(t)?"current":""}"> + ${this._renderThumbnail(t)} +
${t.title}
- ${this._renderMoreButton(element)} - ${this._renderRadioButton(element)} - ${this._renderPlayButton(element)} + ${this._renderMoreButton(t)} + ${this._renderRadioButton(t)} + ${this._renderPlayButton(t)}
- `; - }); - return x ` + `));return B`
-
${renderedElements}
+
${t}
- `; - } - } - _renderMoreButton(element) { - if (!element["can_expand"]) - return x ``; - return x ` - this._fireNavigateEvent(element)}> - ${ForwardBurgerIcon} + `}}_renderMoreButton(t){return t.can_expand?B` + this._fireNavigateEvent(t)}> + ${St} - `; - } - _renderPlayButton(element) { - if (!element.can_play) - return x ``; - return x ` - this._play(element)}> - ${PlayIcon} + `:B``}_renderPlayButton(t){return t.can_play?B` + this._play(t)}> + ${$t} - `; - } - _renderRadioButton(element) { - if (this._is_current(element) || - element.media_content_type == "track") { - const id = element.media_content_type == "track" - ? element.media_content_id - : this.entity["attributes"]["videoId"]; - return x ` - this._startRadio(id)}> - ${RadioTowerIcon} + `:B``}_renderRadioButton(t){if(this._is_current(t)||"track"==t.media_content_type){const e="track"==t.media_content_type?t.media_content_id:this.entity.attributes.videoId;return B` + this._startRadio(e)}> + ${kt} - `; - } - return A; - } - _renderThumbnail(element) { - if (element.thumbnail == "") { - return x `
+ `}return Y}_renderThumbnail(t){return""==t.thumbnail?B`
-
`; - } - return x ` `; - } - async _fireNavigateEvent(element) { - this.dispatchEvent(new CustomEvent("navigate", { - detail: { - action: element, - }, - })); - return; - } - async _startRadio(media_content_id) { - this.hass.callService("media_player", "shuffle_set", { - entity_id: this.entity["entity_id"], - shuffle: false, - }); - this.hass.callService("media_player", "play_media", { - entity_id: this.entity["entity_id"], - media_content_id: media_content_id, - media_content_type: "vid_channel", - }); - return; - } - async _play(element) { - if (element.media_content_type == "PLAYLIST_GOTO_TRACK") { - this.hass.callService("ytube_music_player", "call_method", { - entity_id: this.entity["entity_id"], - command: "goto_track", - parameters: element.media_content_id, - }); - return; - } - if (PlayableMediaList.includes(element.media_class)) { - this.hass.callService("media_player", "play_media", { - entity_id: this.entity["entity_id"], - media_content_id: element.media_content_id, - media_content_type: element.media_content_type, - }); - return; - } - } - static get styles() { - return [ - i$5 ` +
`:B` `}async _fireNavigateEvent(t){this.dispatchEvent(new CustomEvent("navigate",{detail:{action:t}}))}async _startRadio(t){this.hass.callService("media_player","shuffle_set",{entity_id:this.entity.entity_id,shuffle:!1}),this.hass.callService("media_player","play_media",{entity_id:this.entity.entity_id,media_content_id:t,media_content_type:"vid_channel"})}async _play(t){"PLAYLIST_GOTO_TRACK"!=t.media_content_type?xt.includes(t.media_class)&&this.hass.callService("media_player","play_media",{entity_id:this.entity.entity_id,media_content_id:t.media_content_id,media_content_type:t.media_content_type}):this.hass.callService("ytube_music_player","call_method",{entity_id:this.entity.entity_id,command:"goto_track",parameters:t.media_content_id})}static get styles(){return[s` .elements { } @@ -484,40 +223,7 @@ let PoLRYTubeList = class PoLRYTubeList extends s$1 { justify-items: center; height: 100px; } - `, - ]; - } -}; -__decorate([ - t$1() -], PoLRYTubeList.prototype, "entity", void 0); -__decorate([ - t$1() -], PoLRYTubeList.prototype, "hass", void 0); -__decorate([ - t$1() -], PoLRYTubeList.prototype, "elements", void 0); -__decorate([ - t$1() -], PoLRYTubeList.prototype, "state", void 0); -PoLRYTubeList = __decorate([ - e$5("polr-ytube-list") -], PoLRYTubeList); - -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -function*o$3(o,t){const f="function"==typeof t;if(void 0!==o){let i=-1;for(const n of o)i>-1&&(yield f?t(i):t),i++,yield n;}} - -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -function*o$2(o,f){if(void 0!==o){let i=0;for(const t of o)yield f(t,i++);}} - + `]}};n([pt()],Ft.prototype,"entity",void 0),n([pt()],Ft.prototype,"hass",void 0),n([pt()],Ft.prototype,"elements",void 0),n([pt()],Ft.prototype,"state",void 0),Ft=n([ct("polr-ytube-list")],Ft); /** * @license * Copyright 2020 Google Inc. @@ -540,104 +246,7 @@ function*o$2(o,f){if(void 0!==o){let i=0;for(const t of o)yield f(t,i++);}} * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -/** - * 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; -} - +var Nt={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"},Ht=new Set;Ht.add(Nt.BACKSPACE),Ht.add(Nt.ENTER),Ht.add(Nt.SPACEBAR),Ht.add(Nt.PAGE_UP),Ht.add(Nt.PAGE_DOWN),Ht.add(Nt.END),Ht.add(Nt.HOME),Ht.add(Nt.ARROW_LEFT),Ht.add(Nt.ARROW_UP),Ht.add(Nt.ARROW_RIGHT),Ht.add(Nt.ARROW_DOWN),Ht.add(Nt.DELETE),Ht.add(Nt.ESCAPE),Ht.add(Nt.TAB);var Dt=8,Bt=13,Ut=32,Yt=33,Wt=34,jt=35,Xt=36,qt=37,Kt=38,Gt=39,Zt=40,Qt=46,Jt=27,te=9,ee=new Map;ee.set(Dt,Nt.BACKSPACE),ee.set(Bt,Nt.ENTER),ee.set(Ut,Nt.SPACEBAR),ee.set(Yt,Nt.PAGE_UP),ee.set(Wt,Nt.PAGE_DOWN),ee.set(jt,Nt.END),ee.set(Xt,Nt.HOME),ee.set(qt,Nt.ARROW_LEFT),ee.set(Kt,Nt.ARROW_UP),ee.set(Gt,Nt.ARROW_RIGHT),ee.set(Zt,Nt.ARROW_DOWN),ee.set(Qt,Nt.DELETE),ee.set(Jt,Nt.ESCAPE),ee.set(te,Nt.TAB);var ie,ne,re=new Set;function ae(t){var e=t.key;if(Ht.has(e))return e;var i=ee.get(t.keyCode);return i||Nt.UNKNOWN} /** * @license * Copyright 2018 Google Inc. @@ -659,101 +268,7 @@ function normalizeKey(evt) { * 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 _a$1, _b$1; -var cssClasses$7 = { - 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$1 = {}, - _a$1["" + cssClasses$7.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-list-item--activated', - _a$1["" + cssClasses$7.LIST_ITEM_CLASS] = 'mdc-list-item', - _a$1["" + cssClasses$7.LIST_ITEM_DISABLED_CLASS] = 'mdc-list-item--disabled', - _a$1["" + cssClasses$7.LIST_ITEM_SELECTED_CLASS] = 'mdc-list-item--selected', - _a$1["" + cssClasses$7.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-list-item__primary-text', - _a$1["" + cssClasses$7.ROOT] = 'mdc-list', - _a$1); -var deprecatedClassNameMap = (_b$1 = {}, - _b$1["" + cssClasses$7.LIST_ITEM_ACTIVATED_CLASS] = 'mdc-deprecated-list-item--activated', - _b$1["" + cssClasses$7.LIST_ITEM_CLASS] = 'mdc-deprecated-list-item', - _b$1["" + cssClasses$7.LIST_ITEM_DISABLED_CLASS] = 'mdc-deprecated-list-item--disabled', - _b$1["" + cssClasses$7.LIST_ITEM_SELECTED_CLASS] = 'mdc-deprecated-list-item--selected', - _b$1["" + cssClasses$7.LIST_ITEM_TEXT_CLASS] = 'mdc-deprecated-list-item__text', - _b$1["" + cssClasses$7.LIST_ITEM_PRIMARY_TEXT_CLASS] = 'mdc-deprecated-list-item__primary-text', - _b$1["" + cssClasses$7.ROOT] = 'mdc-deprecated-list', - _b$1); -({ - ACTION_EVENT: 'MDCList:action', - SELECTION_CHANGE_EVENT: 'MDCList:selectionChange', - 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$7.LIST_ITEM_CLASS + " button:not(:disabled),\n ." + cssClasses$7.LIST_ITEM_CLASS + " a,\n ." + deprecatedClassNameMap[cssClasses$7.LIST_ITEM_CLASS] + " button:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$7.LIST_ITEM_CLASS] + " a\n ", - DEPRECATED_SELECTOR: '.mdc-deprecated-list', - FOCUSABLE_CHILD_ELEMENTS: "\n ." + cssClasses$7.LIST_ITEM_CLASS + " button:not(:disabled),\n ." + cssClasses$7.LIST_ITEM_CLASS + " a,\n ." + cssClasses$7.LIST_ITEM_CLASS + " input[type=\"radio\"]:not(:disabled),\n ." + cssClasses$7.LIST_ITEM_CLASS + " input[type=\"checkbox\"]:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$7.LIST_ITEM_CLASS] + " button:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$7.LIST_ITEM_CLASS] + " a,\n ." + deprecatedClassNameMap[cssClasses$7.LIST_ITEM_CLASS] + " input[type=\"radio\"]:not(:disabled),\n ." + deprecatedClassNameMap[cssClasses$7.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$3 = { - 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 = ['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.indexOf(tagName) === -1) { - evt.preventDefault(); - } -}; - + */re.add(Nt.PAGE_UP),re.add(Nt.PAGE_DOWN),re.add(Nt.END),re.add(Nt.HOME),re.add(Nt.ARROW_LEFT),re.add(Nt.ARROW_UP),re.add(Nt.ARROW_RIGHT),re.add(Nt.ARROW_DOWN);var le="mdc-list-item--activated",oe="mdc-list-item",de="mdc-list-item--disabled",ce="mdc-list-item--selected",se="mdc-list-item__text",me="mdc-list-item__primary-text",he="mdc-list";(ie={})[""+le]="mdc-list-item--activated",ie[""+oe]="mdc-list-item",ie[""+de]="mdc-list-item--disabled",ie[""+ce]="mdc-list-item--selected",ie[""+me]="mdc-list-item__primary-text",ie[""+he]="mdc-list";var pe=((ne={})[""+le]="mdc-deprecated-list-item--activated",ne[""+oe]="mdc-deprecated-list-item",ne[""+de]="mdc-deprecated-list-item--disabled",ne[""+ce]="mdc-deprecated-list-item--selected",ne[""+se]="mdc-deprecated-list-item__text",ne[""+me]="mdc-deprecated-list-item__primary-text",ne[""+he]="mdc-deprecated-list",ne);pe[oe],pe[oe],pe[oe],pe[oe],pe[oe],pe[oe];var ue={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},fe=["input","button","textarea","select"],ge=function(t){var e=t.target;if(e){var i=(""+e.tagName).toLowerCase();-1===fe.indexOf(i)&&t.preventDefault()}}; /** * @license * Copyright 2020 Google Inc. @@ -775,524 +290,24 @@ var preventDefaultEvent = function (evt) { * 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$3.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 elements in component internals -const USING_SHADY_DOM = (_b = (_a = window.ShadyDOM) === null || _a === void 0 ? void 0 : _a.inUse) !== null && _b !== void 0 ? _b : 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([ - n$3({ type: Boolean }) -], FormElement.prototype, "disabled", void 0); - + */var Ae,Ce;const Se=null!==(Ce=null===(Ae=window.ShadyDOM)||void 0===Ae?void 0:Ae.inUse)&&void 0!==Ce&&Ce;class ke extends Ee{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||Se)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.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",(t=>{this.dispatchEvent(new Event("change",t))}))}}ke.shadowRootOptions={mode:"open",delegatesFocus:!0},n([ht({type:Boolean})],ke.prototype,"disabled",void 0); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -/** - * 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 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 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; -}()); - +const Te=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)} /** * @license * Copyright 2016 Google Inc. @@ -1314,14 +329,7 @@ var MDCFoundation = /** @class */ (function () { * 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$6 = { - LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above', - LABEL_REQUIRED: 'mdc-floating-label--required', - LABEL_SHAKE: 'mdc-floating-label--shake', - ROOT: 'mdc-floating-label', -}; - + */;var Ie=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),Le={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Re=function(t){function n(e){var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Le},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(t){var e=n.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.float=function(t){var e=n.cssClasses,i=e.LABEL_FLOAT_ABOVE,r=e.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},n.prototype.setRequired=function(t){var e=n.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.handleShakeAnimationEnd=function(){var t=n.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},n}(Ie); /** * @license * Copyright 2016 Google Inc. @@ -1344,162 +352,17 @@ var cssClasses$6 = { * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -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$6; - }, - 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 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = class i{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)}}; - +const Oe=1,$e=3,ze=4,Pe=t=>(...e)=>({_$litDirective$:t,values:e});let Ve=class{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: 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); - + */const Me=Pe(class extends Ve{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case Oe:case $e:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,i)=>{t.addEventListener(e,i)},deregisterInteractionHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Re(i),this.foundation.init()}return this.render(e)}render(t){return this.foundation}}); /** * @license * Copyright 2018 Google Inc. @@ -1521,12 +384,7 @@ const floatingLabel = e$1(FloatingLabelDirective); * 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$5 = { - LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active', - LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating', -}; - + */var Fe={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},Ne=function(t){function n(e){var r=t.call(this,i(i({},n.defaultAdapter),e))||this;return r.transitionEndHandler=function(t){r.handleTransitionEnd(t)},r}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Fe},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(Fe.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(Fe.LINE_RIPPLE_ACTIVE)},n.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},n.prototype.deactivate=function(){this.adapter.addClass(Fe.LINE_RIPPLE_DEACTIVATING)},n.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(Fe.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(Fe.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(Fe.LINE_RIPPLE_DEACTIVATING))},n}(Ie); /** * @license * Copyright 2018 Google Inc. @@ -1548,128 +406,7 @@ var cssClasses$5 = { * 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 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$5; - }, - 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$5.LINE_RIPPLE_DEACTIVATING); - this.adapter.addClass(cssClasses$5.LINE_RIPPLE_ACTIVE); - }; - MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) { - this.adapter.setStyle('transform-origin', xCoordinate + "px center"); - }; - MDCLineRippleFoundation.prototype.deactivate = function () { - this.adapter.addClass(cssClasses$5.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$5.LINE_RIPPLE_DEACTIVATING); - if (evt.propertyName === 'opacity') { - if (isDeactivating) { - this.adapter.removeClass(cssClasses$5.LINE_RIPPLE_ACTIVE); - this.adapter.removeClass(cssClasses$5.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); - + */const He=Pe(class extends Ve{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case Oe:case $e:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,i)=>t.style.setProperty(e,i),registerEventHandler:(e,i)=>{t.addEventListener(e,i)},deregisterEventHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new Ne(i),this.foundation.init()}return this.render()}render(){return this.foundation}}); /** * @license * Copyright 2018 Google Inc. @@ -1691,36 +428,7 @@ const lineRipple = e$1(LineRippleDirective); * 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. - */ -/** - * 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 = {})); - + */var De,Be;!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(De||(De={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(Be||(Be={})); /** * @license * Copyright 2016 Google Inc. @@ -1743,606 +451,25 @@ var Corner; * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -var cssClasses$4 = { - 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', -}; -var strings$5 = { - 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', -}; -var numbers$2 = { - LABEL_SCALE: 0.75, - UNSET_INDEX: -1, - CLICK_DEBOUNCE_TIMEOUT_MS: 330, -}; - +var Ue={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"},Ye={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"},We={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},je=function(t){function n(e,r){void 0===r&&(r={});var a=t.call(this,i(i({},n.defaultAdapter),e))||this;return a.disabled=!1,a.isMenuOpen=!1,a.useDefaultValidation=!0,a.customValidity=!0,a.lastSelectedIndex=We.UNSET_INDEX,a.clickDebounceTimeout=0,a.recentlyClicked=!1,a.leadingIcon=r.leadingIcon,a.helperText=r.helperText,a}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return Ue},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return We},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Ye},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(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1),t>=this.adapter.getMenuItemCount()||(t===We.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),e&&this.adapter.closeMenu(),i||this.lastSelectedIndex===t||this.handleChange(),this.lastSelectedIndex=t)},n.prototype.setValue=function(t,e){void 0===e&&(e=!1);var i=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(i,!1,e)},n.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),e=this.adapter.getMenuItemValues();return t!==We.UNSET_INDEX?e[t]:""},n.prototype.getDisabled=function(){return this.disabled},n.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass(Ue.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(Ue.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(Ue.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,e=this.adapter.hasClass(Ue.FOCUSED),i=t||e,n=this.adapter.hasClass(Ue.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(n)}},n.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(t,!1,!0)},n.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var t=this.getSelectedIndex(),e=t>=0?t:0;this.adapter.focusMenuItemAtIndex(e)}},n.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},n.prototype.handleMenuClosed=function(){this.adapter.removeClass(Ue.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},n.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(Ue.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},n.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},n.prototype.handleFocus=function(){this.adapter.addClass(Ue.FOCUSED),this.layout(),this.adapter.activateBottomLine()},n.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},n.prototype.handleClick=function(t){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(t),this.openMenu()))},n.prototype.handleKeydown=function(t){if(!this.isMenuOpen&&this.adapter.hasClass(Ue.FOCUSED)){var e=ae(t)===Nt.ENTER,i=ae(t)===Nt.SPACEBAR,n=ae(t)===Nt.ARROW_UP,r=ae(t)===Nt.ARROW_DOWN;if(!(t.ctrlKey||t.metaKey)&&(!i&&t.key&&1===t.key.length||i&&this.adapter.isTypeaheadInProgress())){var a=i?" ":t.key,l=this.adapter.typeaheadMatchItem(a,this.getSelectedIndex());return l>=0&&this.setSelectedIndex(l),void t.preventDefault()}(e||i||n||r)&&(this.openMenu(),t.preventDefault())}},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()){var e=this.adapter.hasClass(Ue.FOCUSED);if(t){var i=We.LABEL_SCALE,n=this.adapter.getLabelWidth()*i;this.adapter.notchOutline(n)}else e||this.adapter.closeOutline()}},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},n.prototype.setUseDefaultValidation=function(t){this.useDefaultValidation=t},n.prototype.setValid=function(t){this.useDefaultValidation||(this.customValidity=t),this.adapter.setSelectAnchorAttr("aria-invalid",(!t).toString()),t?(this.adapter.removeClass(Ue.INVALID),this.adapter.removeMenuClass(Ue.MENU_INVALID)):(this.adapter.addClass(Ue.INVALID),this.adapter.addMenuClass(Ue.MENU_INVALID)),this.syncHelperTextValidity(t)},n.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(Ue.REQUIRED)&&!this.adapter.hasClass(Ue.DISABLED)?this.getSelectedIndex()!==We.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},n.prototype.setRequired=function(t){t?this.adapter.addClass(Ue.REQUIRED):this.adapter.removeClass(Ue.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",t.toString()),this.adapter.setLabelRequired(t)},n.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},n.prototype.init=function(){var t=this.adapter.getAnchorElement();t&&(this.adapter.setMenuAnchorElement(t),this.adapter.setMenuAnchorCorner(Be.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(Ue.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(Ue.INVALID)),this.layout(),this.layoutOptions()},n.prototype.blur=function(){this.adapter.removeClass(Ue.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(Ue.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},n.prototype.syncHelperTextValidity=function(t){if(this.helperText){this.helperText.setValidity(t);var e=this.helperText.isVisible(),i=this.helperText.getId();e&&i?this.adapter.setSelectAnchorAttr(Ye.ARIA_DESCRIBEDBY,i):this.adapter.removeSelectAnchorAttr(Ye.ARIA_DESCRIBEDBY)}},n.prototype.setClickDebounceTimeout=function(){var t=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){t.recentlyClicked=!1}),We.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},n}(Ie); /** * @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. + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause */ -var MDCSelectFoundation = /** @class */ (function (_super) { - __extends(MDCSelectFoundation, _super); - /* istanbul ignore next: optional argument is not a branch statement */ - /** - * @param adapter - * @param foundationMap Map from subcomponent names to their subfoundations. - */ - function MDCSelectFoundation(adapter, foundationMap) { - if (foundationMap === void 0) { foundationMap = {}; } - var _this = _super.call(this, __assign(__assign({}, MDCSelectFoundation.defaultAdapter), adapter)) || this; - // Disabled state - _this.disabled = false; - // isMenuOpen is used to track the state of the menu by listening to the - // MDCMenuSurface:closed event For reference, menu.open will return false if - // the menu is still closing, but isMenuOpen returns false only after the menu - // has closed - _this.isMenuOpen = false; - // By default, select is invalid if it is required but no value is selected. - _this.useDefaultValidation = true; - _this.customValidity = true; - _this.lastSelectedIndex = numbers$2.UNSET_INDEX; - _this.clickDebounceTimeout = 0; - _this.recentlyClicked = false; - _this.leadingIcon = foundationMap.leadingIcon; - _this.helperText = foundationMap.helperText; - return _this; - } - Object.defineProperty(MDCSelectFoundation, "cssClasses", { - get: function () { - return cssClasses$4; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(MDCSelectFoundation, "numbers", { - get: function () { - return numbers$2; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(MDCSelectFoundation, "strings", { - get: function () { - return strings$5; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(MDCSelectFoundation, "defaultAdapter", { - /** - * See {@link MDCSelectAdapter} 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; }, - activateBottomLine: function () { return undefined; }, - deactivateBottomLine: function () { return undefined; }, - getSelectedIndex: function () { return -1; }, - setSelectedIndex: function () { return undefined; }, - hasLabel: function () { return false; }, - floatLabel: function () { return undefined; }, - getLabelWidth: function () { return 0; }, - setLabelRequired: function () { return undefined; }, - hasOutline: function () { return false; }, - notchOutline: function () { return undefined; }, - closeOutline: function () { return undefined; }, - setRippleCenter: function () { return undefined; }, - notifyChange: function () { return undefined; }, - setSelectedText: function () { return undefined; }, - isSelectAnchorFocused: function () { return false; }, - getSelectAnchorAttr: function () { return ''; }, - setSelectAnchorAttr: function () { return undefined; }, - removeSelectAnchorAttr: function () { return undefined; }, - addMenuClass: function () { return undefined; }, - removeMenuClass: function () { return undefined; }, - openMenu: function () { return undefined; }, - closeMenu: function () { return undefined; }, - getAnchorElement: function () { return null; }, - setMenuAnchorElement: function () { return undefined; }, - setMenuAnchorCorner: function () { return undefined; }, - setMenuWrapFocus: function () { return undefined; }, - focusMenuItemAtIndex: function () { return undefined; }, - getMenuItemCount: function () { return 0; }, - getMenuItemValues: function () { return []; }, - getMenuItemTextAtIndex: function () { return ''; }, - isTypeaheadInProgress: function () { return false; }, - typeaheadMatchItem: function () { return -1; }, - }; - // tslint:enable:object-literal-sort-keys - }, - enumerable: false, - configurable: true - }); - /** Returns the index of the currently selected menu item, or -1 if none. */ - MDCSelectFoundation.prototype.getSelectedIndex = function () { - return this.adapter.getSelectedIndex(); - }; - MDCSelectFoundation.prototype.setSelectedIndex = function (index, closeMenu, skipNotify) { - if (closeMenu === void 0) { closeMenu = false; } - if (skipNotify === void 0) { skipNotify = false; } - if (index >= this.adapter.getMenuItemCount()) { - return; - } - if (index === numbers$2.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$2.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$4.DISABLED); - this.adapter.closeMenu(); - } - else { - this.adapter.removeClass(cssClasses$4.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$4.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$4.FOCUSED); - var shouldFloatAndNotch = optionHasValue || isFocused; - var isRequired = this.adapter.hasClass(cssClasses$4.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$4.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$4.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$4.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$4.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; - } - 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$4.FOCUSED); - if (openNotch) { - var labelScale = numbers$2.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$4.INVALID); - this.adapter.removeMenuClass(cssClasses$4.MENU_INVALID); - } - else { - this.adapter.addClass(cssClasses$4.INVALID); - this.adapter.addMenuClass(cssClasses$4.MENU_INVALID); - } - this.syncHelperTextValidity(isValid); - }; - MDCSelectFoundation.prototype.isValid = function () { - if (this.useDefaultValidation && - this.adapter.hasClass(cssClasses$4.REQUIRED) && - !this.adapter.hasClass(cssClasses$4.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$2.UNSET_INDEX && - (this.getSelectedIndex() !== 0 || Boolean(this.getValue())); - } - return this.customValidity; - }; - MDCSelectFoundation.prototype.setRequired = function (isRequired) { - if (isRequired) { - this.adapter.addClass(cssClasses$4.REQUIRED); - } - else { - this.adapter.removeClass(cssClasses$4.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$4.DISABLED)); - this.syncHelperTextValidity(!this.adapter.hasClass(cssClasses$4.INVALID)); - this.layout(); - this.layoutOptions(); - }; - /** - * Unfocuses the select component. - */ - MDCSelectFoundation.prototype.blur = function () { - this.adapter.removeClass(cssClasses$4.FOCUSED); - this.layout(); - this.adapter.deactivateBottomLine(); - var isRequired = this.adapter.hasClass(cssClasses$4.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$2.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; - +const Xe=Pe(class extends Ve{constructor(t){var e;if(super(t),t.type!==Oe||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,n;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(n=this.nt)||void 0===n?void 0:n.has(t))||(i?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return U}}),qe=t=>null!=t?t:Y /** * @license - * Copyright 2018 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const o$1=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.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t));}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)));}return T}}); - + * Copyright 2020 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */,Ke=(t={})=>{const e={};for(const i in t)e[i]=t[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},e)}; /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const l$1=l=>null!=l?l:A; - -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -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 labelledby = !!this.label ? 'label' : undefined; - const describedby = this.shouldRenderHelperText ? 'helper-text' : undefined; - return x ` + */class Ge extends ke{constructor(){super(...arguments),this.mdcFoundationClass=je,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=Ke()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const t=this.menuElement;return t?t.selected:null}get index(){const t=this.menuElement;return t?t.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const t={"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},e=this.label?"label":void 0,i=this.shouldRenderHelperText?"helper-text":void 0;return B`
+ class="mdc-select ${Xe(t)}"> ${this.renderRipple()} - ${this.outlined ? this.renderOutline() : this.renderLabel()} + ${this.outlined?this.renderOutline():this.renderLabel()} ${this.renderLeadingIcon()} ${this.selectedText} @@ -2393,17 +520,13 @@ class SelectBase extends FormElement {
${this.renderMenu()} - ${this.renderHelperText()}`; - } - renderMenu() { - const classes = this.getMenuClasses(); - return x ` + ${this.renderHelperText()}`}renderMenu(){const t=this.getMenuClasses();return B` ${this.renderMenuContent()} - `; - } - getMenuClasses() { - return { - 'mdc-select__menu': true, - 'mdc-menu': true, - 'mdc-menu-surface': true, - 'mdc-select__menu--invalid': !this.isUiValid, - }; - } - renderMenuContent() { - return x ``; - } - renderRipple() { - if (this.outlined) { - return A; - } - return x ` + `}getMenuClasses(){return{"mdc-select__menu":!0,"mdc-menu":!0,"mdc-menu-surface":!0,"mdc-select__menu--invalid":!this.isUiValid}}renderMenuContent(){return B``}renderRipple(){return this.outlined?Y:B` - `; - } - renderOutline() { - if (!this.outlined) { - return A; - } - return x ` + `}renderOutline(){return this.outlined?B` ${this.renderLabel()} - `; - } - renderLabel() { - if (!this.label) { - return A; - } - return x ` + `:Y}renderLabel(){return this.label?B` ${this.label} - `; - } - 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 ` + `:Y}renderLeadingIcon(){return this.icon?B`
${this.icon}
`:Y}renderLineRipple(){return this.outlined?Y:B` + + `}renderHelperText(){if(!this.shouldRenderHelperText)return Y;const t=this.validationMessage&&!this.isUiValid;return B`

${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([ - n$3({ type: Boolean, attribute: 'disabled', reflect: true }), - observer(function (value) { - if (this.mdcFoundation) { - this.mdcFoundation.setDisabled(value); - } - }) -], SelectBase.prototype, "disabled", void 0); -__decorate([ - n$3({ type: Boolean }), - observer(function (_newVal, oldVal) { - if (oldVal !== undefined && this.outlined !== oldVal) { - this.layout(false); - } - }) -], SelectBase.prototype, "outlined", void 0); -__decorate([ - n$3({ type: String }), - observer(function (_newVal, oldVal) { - if (oldVal !== undefined && this.label !== oldVal) { - this.layout(false); - } - }) -], SelectBase.prototype, "label", void 0); -__decorate([ - t$1() -], SelectBase.prototype, "outlineOpen", void 0); -__decorate([ - t$1() -], SelectBase.prototype, "outlineWidth", void 0); -__decorate([ - n$3({ 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([ - n$3() -], SelectBase.prototype, "name", void 0); -__decorate([ - t$1() -], SelectBase.prototype, "selectedText", void 0); -__decorate([ - n$3({ type: String }) -], SelectBase.prototype, "icon", void 0); -__decorate([ - t$1() -], SelectBase.prototype, "menuOpen", void 0); -__decorate([ - n$3({ type: String }) -], SelectBase.prototype, "helper", void 0); -__decorate([ - n$3({ type: Boolean }) -], SelectBase.prototype, "validateOnInitialRender", void 0); -__decorate([ - n$3({ type: String }) -], SelectBase.prototype, "validationMessage", void 0); -__decorate([ - n$3({ type: Boolean }) -], SelectBase.prototype, "required", void 0); -__decorate([ - n$3({ type: Boolean }) -], SelectBase.prototype, "naturalMenuWidth", void 0); -__decorate([ - t$1() -], SelectBase.prototype, "isUiValid", void 0); -__decorate([ - n$3({ type: Boolean }) -], SelectBase.prototype, "fixedMenuPosition", void 0); -__decorate([ - e$3({ capture: true }) -], SelectBase.prototype, "handleTypeahead", null); - + class="mdc-select-helper-text ${Xe({"mdc-select-helper-text--validation-msg":t})}" + id="helper-text">${t?this.validationMessage:this.helper}

`}createAdapter(){return Object.assign(Object.assign({},xe(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(t)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)},hasOutline:()=>this.outlined,notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:t=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}},notifyChange:async t=>{if(!this.valueSetDirectly&&t===this.value)return;this.valueSetDirectly=!1,this.value=t,await this.updateComplete;const e=new Event("change",{bubbles:!0});this.dispatchEvent(e)},setSelectedText:t=>this.selectedText=t,isSelectAnchorFocused:()=>{const t=this.anchorElement;if(!t)return!1;return t.getRootNode().activeElement===t},getSelectAnchorAttr:t=>{const e=this.anchorElement;return e?e.getAttribute(t):null},setSelectAnchorAttr:(t,e)=>{const i=this.anchorElement;i&&i.setAttribute(t,e)},removeSelectAnchorAttr:t=>{const e=this.anchorElement;e&&e.removeAttribute(t)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const t=this.menuElement;t&&(t.corner="BOTTOM_START")},setMenuWrapFocus:t=>{const e=this.menuElement;e&&(e.wrapFocus=t)},focusMenuItemAtIndex:t=>{const e=this.menuElement;if(!e)return;const i=e.items[t];i&&i.focus()},getMenuItemCount:()=>{const t=this.menuElement;return t?t.items.length:0},getMenuItemValues:()=>{const t=this.menuElement;if(!t)return[];return t.items.map((t=>t.value))},getMenuItemTextAtIndex:t=>{const e=this.menuElement;if(!e)return"";const i=e.items[t];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>_e(this.typeaheadState),typeaheadMatchItem:(t,e)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:t=>{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e||this.menuElement.getFocusedItemIndex(),nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:t=>this.items[t].disabled},n=ve(i,this.typeaheadState);return-1!==n&&this.select(n),n}})}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=Ke(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e)}return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const t=this.menuElement;if(t&&(this._menuUpdateComplete=t.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((t=>requestAnimationFrame(t))),await this.layout());const t=this.items.length&&""===this.items[0].value;if(!this.value&&t)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=be(this.items.length,(t=>this.items[t].text))}onItemsUpdated(){this.sortedIndexByFirstChar=be(this.items.length,(t=>this.items[t].text))}select(t){const e=this.menuElement;e&&e.select(t)}selectByValue(t){let e=-1;for(let i=0;i0,r=i&&this.index{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:t=>this.items[t].disabled},this.typeaheadState)}async onSelected(t){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(t.detail.index);const e=this.items[t.detail.index];e&&(this.value=e.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(t){this.name&&null!==this.selected&&t.append(this.name,this.value)}async layout(t=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const e=this.menuElement;e&&e.layout(t);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([gt(".mdc-select")],Ge.prototype,"mdcRoot",void 0),n([gt(".formElement")],Ge.prototype,"formElement",void 0),n([gt("slot")],Ge.prototype,"slotElement",void 0),n([gt("select")],Ge.prototype,"nativeSelectElement",void 0),n([gt("input")],Ge.prototype,"nativeInputElement",void 0),n([gt(".mdc-line-ripple")],Ge.prototype,"lineRippleElement",void 0),n([gt(".mdc-floating-label")],Ge.prototype,"labelElement",void 0),n([gt("mwc-notched-outline")],Ge.prototype,"outlineElement",void 0),n([gt(".mdc-menu")],Ge.prototype,"menuElement",void 0),n([gt(".mdc-select__anchor")],Ge.prototype,"anchorElement",void 0),n([ht({type:Boolean,attribute:"disabled",reflect:!0}),Te((function(t){this.mdcFoundation&&this.mdcFoundation.setDisabled(t)}))],Ge.prototype,"disabled",void 0),n([ht({type:Boolean}),Te((function(t,e){void 0!==e&&this.outlined!==e&&this.layout(!1)}))],Ge.prototype,"outlined",void 0),n([ht({type:String}),Te((function(t,e){void 0!==e&&this.label!==e&&this.layout(!1)}))],Ge.prototype,"label",void 0),n([pt()],Ge.prototype,"outlineOpen",void 0),n([pt()],Ge.prototype,"outlineWidth",void 0),n([ht({type:String}),Te((function(t){if(this.mdcFoundation){const e=null===this.selected&&!!t,i=this.selected&&this.selected.value!==t;(e||i)&&this.selectByValue(t),this.reportValidity()}}))],Ge.prototype,"value",void 0),n([ht()],Ge.prototype,"name",void 0),n([pt()],Ge.prototype,"selectedText",void 0),n([ht({type:String})],Ge.prototype,"icon",void 0),n([pt()],Ge.prototype,"menuOpen",void 0),n([ht({type:String})],Ge.prototype,"helper",void 0),n([ht({type:Boolean})],Ge.prototype,"validateOnInitialRender",void 0),n([ht({type:String})],Ge.prototype,"validationMessage",void 0),n([ht({type:Boolean})],Ge.prototype,"required",void 0),n([ht({type:Boolean})],Ge.prototype,"naturalMenuWidth",void 0),n([pt()],Ge.prototype,"isUiValid",void 0),n([ht({type:Boolean})],Ge.prototype,"fixedMenuPosition",void 0),n([ft({capture:!0})],Ge.prototype,"handleTypeahead",null); /** * @license * Copyright 2021 Google LLC * SPDX-LIcense-Identifier: Apache-2.0 */ -const styles$6 = 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}.mdc-line-ripple::before{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}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select__menu::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}}@media screen and (forced-colors: active)and (forced-colors: active),screen and (-ms-high-contrast: active)and (forced-colors: active){.mdc-select__menu::before{border-color:CanvasText}}.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))}`; - -let PoLRSelect = class PoLRSelect extends SelectBase { -}; -PoLRSelect.styles = [ - styles$6, - i$5 ` +const Ze=s`.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}.mdc-line-ripple::before{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}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select__menu::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}}@media screen and (forced-colors: active)and (forced-colors: active),screen and (-ms-high-contrast: active)and (forced-colors: active){.mdc-select__menu::before{border-color:CanvasText}}.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))}`;let Qe=class extends Ge{};Qe.styles=[Ze,s` .mdc-select__anchor { height: var(--select-height, 56px) !important; width: 100%; } - `, -]; -PoLRSelect = __decorate([ - e$5("polr-select") -], PoLRSelect); - -/** - * @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$4 = { - 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$3 = { - 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', -]; - + `],Qe=n([ct("polr-select")],Qe); /** * @license * Copyright 2016 Google Inc. @@ -3105,1198 +592,86 @@ var ALWAYS_FLOAT_TYPES = [ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -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$3; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(MDCTextFieldFoundation, "strings", { - get: function () { - return strings$4; - }, - 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$4.ARIA_DESCRIBEDBY, helperTextId); - } - else { - this.adapter.removeInputAttr(strings$4.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; - +var Je={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"},ti={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"},ei={LABEL_SCALE:.75},ii=["pattern","min","max","required","step","minlength","maxlength"],ni=["color","date","datetime-local","month","range","time","week"],ri=["mousedown","touchstart"],ai=["click","keydown"],li=function(t){function n(e,r){void 0===r&&(r={});var a=t.call(this,i(i({},n.defaultAdapter),e))||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(t){a.setTransformOrigin(t)},a.textFieldInteractionHandler=function(){a.handleTextFieldInteraction()},a.validationAttributeChangeHandler=function(t){a.handleValidationAttributeChange(t)},a}return e(n,t),Object.defineProperty(n,"cssClasses",{get:function(){return ti},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return Je},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return ei},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return ni.indexOf(t)>=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 t,e,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(ri),l=a.next();!l.done;l=a.next()){var o=l.value;this.adapter.registerInputInteractionHandler(o,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var d=r(ai),c=d.next();!c.done;c=d.next()){o=c.value;this.adapter.registerTextFieldInteractionHandler(o,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},n.prototype.destroy=function(){var t,e,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(ri),l=a.next();!l.done;l=a.next()){var o=l.value;this.adapter.deregisterInputInteractionHandler(o,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var d=r(ai),c=d.next();!c.done;c=d.next()){o=c.value;this.adapter.deregisterTextFieldInteractionHandler(o,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},n.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},n.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return ii.indexOf(t)>-1&&(e.styleValidity(!0),e.adapter.setLabelRequired(e.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},n.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*ei.LABEL_SCALE;this.adapter.notchOutline(e)}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(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,i=e?e[0]:t,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 t=this.isValid();this.styleValidity(t),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(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var e=this.isValid();this.styleValidity(e)}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(t){this.valid=t,this.styleValidity(t);var e=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},n.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},n.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},n.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},n.prototype.isDisabled=function(){return this.getNativeInput().disabled},n.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},n.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},n.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},n.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},n.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},n.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},n.prototype.setcharacterCounter=function(t){if(this.characterCounter){var e=this.getNativeInput().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,e)}},n.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},n.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},n.prototype.styleValidity=function(t){var e=n.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),r=this.helperText.getId();i&&r?this.adapter.setInputAttr(Je.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(Je.ARIA_DESCRIBEDBY)}},n.prototype.styleFocused=function(t){var e=n.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},n.prototype.styleDisabled=function(t){var e=n.cssClasses,i=e.DISABLED,r=e.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(r)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},n.prototype.styleFloating=function(t){var e=n.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},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}(Ie),oi=li; /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const e=o=>void 0===o.strings,f={},s=(o,l=f)=>o._$AH=l; - + */ +const di={},ci=Pe(class extends Ve{constructor(t){if(super(t),t.type!==$e&&t.type!==Oe&&t.type!==ze)throw Error("The `live` directive is not allowed on child or event bindings");if(!(t=>void 0===t.strings)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===U||e===Y)return e;const i=t.element,n=t.name;if(t.type===$e){if(e===i[n])return U}else if(t.type===ze){if(!!e===i.hasAttribute(n))return U}else if(t.type===Oe&&i.getAttribute(n)===e+"")return U;return((t,e=di)=>{t._$AH=e; /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */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 ` -