@ulb-darmstadt/shacl-form 1.1.9 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -10
- package/dist/bootstrap.js +2 -0
- package/dist/config.d.ts +5 -1
- package/dist/form-bootstrap.d.ts +4 -0
- package/dist/form-material.d.ts +4 -0
- package/dist/form-native.d.ts +4 -0
- package/dist/form.d.ts +4 -5
- package/dist/index.js +1 -1
- package/dist/loader.d.ts +0 -1
- package/dist/material.js +335 -0
- package/dist/material.js.LICENSE.txt +137 -0
- package/dist/plugin.d.ts +5 -2
- package/dist/plugins/fixed-list.d.ts +1 -1
- package/dist/plugins/fixed-list.js +1 -0
- package/dist/plugins/mapbox.d.ts +8 -15
- package/dist/plugins/mapbox.js +2 -0
- package/dist/plugins/mapbox.js.LICENSE.txt +1 -0
- package/dist/property.d.ts +1 -1
- package/dist/theme.d.ts +12 -16
- package/dist/themes/bootstrap.d.ts +10 -0
- package/dist/themes/material.d.ts +15 -0
- package/dist/themes/material.js +335 -0
- package/dist/themes/material.js.LICENSE.txt +65 -0
- package/dist/themes/native.d.ts +15 -0
- package/dist/util.d.ts +1 -0
- package/package.json +4 -6
- package/dist/editors.d.ts +0 -19
- package/dist/index-with-plugins.d.ts +0 -2
- package/dist/index-with-plugins.js +0 -3
- package/dist/index-with-plugins.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/plugins/index.d.ts +0 -3
- /package/dist/{index-with-plugins.js.LICENSE.txt → bootstrap.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/*! For license information please see material.js.LICENSE.txt */
|
|
2
|
+
var e={d:(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function o(e,t,o,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,o,a):r(t,o))||a);return n>3&&a&&Object.defineProperty(t,o,a),a}e.d(t,{F:()=>Jo}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;const i=e=>(t,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)},r=globalThis,n=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new WeakMap;class l{constructor(e,t,o){if(this._$cssResult$=!0,o!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(n&&void 0===e){const o=void 0!==t&&1===t.length;o&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&s.set(t,e))}return e}toString(){return this.cssText}}const d=(e,...t)=>{const o=1===e.length?e[0]:t.reduce(((t,o,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[i+1]),e[0]);return new l(o,e,a)},c=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return(e=>new l("string"==typeof e?e:e+"",void 0,a))(t)})(e):e,{is:u,defineProperty:h,getOwnPropertyDescriptor:p,getOwnPropertyNames:v,getOwnPropertySymbols:f,getPrototypeOf:m}=Object,b=globalThis,g=b.trustedTypes,y=g?g.emptyScript:"",x=b.reactiveElementPolyfillSupport,_=(e,t)=>e,w={toAttribute(e,t){switch(t){case Boolean:e=e?y:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=null!==e;break;case Number:o=null===e?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch(e){o=null}}return o}},$=(e,t)=>!u(e,t),C={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class E extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=C){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(e,o,t);void 0!==i&&h(this.prototype,e,i)}}static getPropertyDescriptor(e,t,o){const{get:i,set:r}=p(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return i?.call(this)},set(t){const n=i?.call(this);r.call(this,t),this.requestUpdate(e,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??C}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const e=m(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const e=this.properties,t=[...v(e),...f(e)];for(const o of t)this.createProperty(o,e[o])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,o]of t)this.elementProperties.set(e,o)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const o=this._$Eu(e,t);void 0!==o&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const e of o)t.unshift(c(e))}else void 0!==e&&t.push(c(e));return t}static _$Eu(e,t){const o=t.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$ES??=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$ES?.splice(this._$ES.indexOf(e)>>>0,1)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(n)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const o of t){const t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=o.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$ES?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$EO(e,t){const o=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,o);if(void 0!==i&&!0===o.reflect){const r=(void 0!==o.converter?.toAttribute?o.converter:w).toAttribute(t,o.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){const o=this.constructor,i=o._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=o.getPropertyOptions(i),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:w;this._$Em=i,this[i]=r.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,o,i=!1,r){if(void 0!==e){if(o??=this.constructor.getPropertyOptions(e),!(o.hasChanged??$)(i?r:this[e],t))return;this.C(e,t,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(e,t,o){this._$AL.has(e)||this._$AL.set(e,t),!0===o.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,o]of e)!0!==o.wrapped||this._$AL.has(t)||void 0===this[t]||this.C(t,this[t],o)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$ES?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$ET()}catch(t){throw e=!1,this._$ET(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$ES?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EO(e,this[e]))),this._$ET()}updated(e){}firstUpdated(e){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[_("elementProperties")]=new Map,E[_("finalized")]=new Map,x?.({ReactiveElement:E}),(b.reactiveElementVersions??=[]).push("2.0.0");const A={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:$},k=(e=A,t,o)=>{const{kind:i,metadata:r}=o;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(o.name,e),"accessor"===i){const{name:i}=o;return{set(o){const r=t.get.call(this);t.set.call(this,o),this.requestUpdate(i,r,e)},init(t){return void 0!==t&&this.C(i,void 0,e),t}}}if("setter"===i){const{name:i}=o;return function(o){const r=this[i];t.call(this,o),this.requestUpdate(i,r,e)}}throw Error("Unsupported decorator location: "+i)};function T(e){return(t,o)=>"object"==typeof o?k(e,t,o):((e,t,o)=>{const i=t.hasOwnProperty(o);return t.constructor.createProperty(o,i?{...e,wrapped:!0}:e),i?Object.getOwnPropertyDescriptor(t,o):void 0})(e,t,o)}function I(e){return T({...e,state:!0,attribute:!1})}const S=(e,t,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,o),o);function z(e,t){return(o,i,r)=>{const n=t=>t.renderRoot?.querySelector(e)??null;if(t){const{get:e,set:a}="object"==typeof i?o:r??(()=>{const e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return S(o,i,{get(){if(t){let t=e.call(this);return void 0===t&&(t=n(this),a.call(this,t)),t}return n(this)}})}return S(o,i,{get(){return n(this)}})}}let O;function R(e){return(t,o)=>{const{slot:i,selector:r}=e??{},n="slot"+(i?`[name=${i}]`:":not([name])");return S(t,o,{get(){const t=this.renderRoot?.querySelector(n),o=t?.assignedElements(e)??[];return void 0===r?o:o.filter((e=>e.matches(r)))}})}}const P=globalThis,L=P.trustedTypes,M=L?L.createPolicy("lit-html",{createHTML:e=>e}):void 0,N="$lit$",U=`lit$${(Math.random()+"").slice(9)}$`,B="?"+U,D=`<${B}>`,V=document,F=()=>V.createComment(""),q=e=>null===e||"object"!=typeof e&&"function"!=typeof e,H=Array.isArray,j=e=>H(e)||"function"==typeof e?.[Symbol.iterator],G="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,Y=/>/g,J=RegExp(`>|${G}(?:([^\\s"'>=/]+)(${G}*=${G}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,Z=/"/g,Q=/^(?:script|style|textarea|title)$/i,ee=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),te=ee(1),oe=ee(2),ie=Symbol.for("lit-noChange"),re=Symbol.for("lit-nothing"),ne=new WeakMap,ae=V.createTreeWalker(V,129);function se(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==M?M.createHTML(t):t}const le=(e,t)=>{const o=e.length-1,i=[];let r,n=2===t?"<svg>":"",a=K;for(let t=0;t<o;t++){const o=e[t];let s,l,d=-1,c=0;for(;c<o.length&&(a.lastIndex=c,l=a.exec(o),null!==l);)c=a.lastIndex,a===K?"!--"===l[1]?a=W:void 0!==l[1]?a=Y:void 0!==l[2]?(Q.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=J):void 0!==l[3]&&(a=J):a===J?">"===l[0]?(a=r??K,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?J:'"'===l[3]?Z:X):a===Z||a===X?a=J:a===W||a===Y?a=K:(a=J,r=void 0);const u=a===J&&e[t+1].startsWith("/>")?" ":"";n+=a===K?o+D:d>=0?(i.push(s),o.slice(0,d)+N+o.slice(d)+U+u):o+U+(-2===d?t:u)}return[se(e,n+(e[o]||"<?>")+(2===t?"</svg>":"")),i]};class de{constructor({strings:e,_$litType$:t},o){let i;this.parts=[];let r=0,n=0;const a=e.length-1,s=this.parts,[l,d]=le(e,t);if(this.el=de.createElement(l,o),ae.currentNode=this.el.content,2===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=ae.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(N)){const t=d[n++],o=i.getAttribute(e).split(U),a=/([.?@])?(.*)/.exec(t);s.push({type:1,index:r,name:a[2],strings:o,ctor:"."===a[1]?ve:"?"===a[1]?fe:"@"===a[1]?me:pe}),i.removeAttribute(e)}else e.startsWith(U)&&(s.push({type:6,index:r}),i.removeAttribute(e));if(Q.test(i.tagName)){const e=i.textContent.split(U),t=e.length-1;if(t>0){i.textContent=L?L.emptyScript:"";for(let o=0;o<t;o++)i.append(e[o],F()),ae.nextNode(),s.push({type:2,index:++r});i.append(e[t],F())}}}else if(8===i.nodeType)if(i.data===B)s.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf(U,e+1));)s.push({type:7,index:r}),e+=U.length-1}r++}}static createElement(e,t){const o=V.createElement("template");return o.innerHTML=e,o}}function ce(e,t,o=e,i){if(t===ie)return t;let r=void 0!==i?o._$Co?.[i]:o._$Cl;const n=q(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(e),r._$AT(e,o,i)),void 0!==i?(o._$Co??=[])[i]=r:o._$Cl=r),void 0!==r&&(t=ce(e,r._$AS(e,t.values),r,i)),t}class ue{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:o}=this._$AD,i=(e?.creationScope??V).importNode(t,!0);ae.currentNode=i;let r=ae.nextNode(),n=0,a=0,s=o[0];for(;void 0!==s;){if(n===s.index){let t;2===s.type?t=new he(r,r.nextSibling,this,e):1===s.type?t=new s.ctor(r,s.name,s.strings,this,e):6===s.type&&(t=new be(r,this,e)),this._$AV.push(t),s=o[++a]}n!==s?.index&&(r=ae.nextNode(),n++)}return ae.currentNode=V,i}p(e){let t=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}}class he{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,i){this.type=2,this._$AH=re,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ce(this,e,t),q(e)?e===re||null==e||""===e?(this._$AH!==re&&this._$AR(),this._$AH=re):e!==this._$AH&&e!==ie&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):j(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==re&&q(this._$AH)?this._$AA.nextSibling.data=e:this.$(V.createTextNode(e)),this._$AH=e}g(e){const{values:t,_$litType$:o}=e,i="number"==typeof o?this._$AC(e):(void 0===o.el&&(o.el=de.createElement(se(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(t);else{const e=new ue(i,this),o=e.u(this.options);e.p(t),this.$(o),this._$AH=e}}_$AC(e){let t=ne.get(e.strings);return void 0===t&&ne.set(e.strings,t=new de(e)),t}T(e){H(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let o,i=0;for(const r of e)i===t.length?t.push(o=new he(this.k(F()),this.k(F()),this,this.options)):o=t[i],o._$AI(r),i++;i<t.length&&(this._$AR(o&&o._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class pe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,i,r){this.type=1,this._$AH=re,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=re}_$AI(e,t=this,o,i){const r=this.strings;let n=!1;if(void 0===r)e=ce(this,e,t,0),n=!q(e)||e!==this._$AH&&e!==ie,n&&(this._$AH=e);else{const i=e;let a,s;for(e=r[0],a=0;a<r.length-1;a++)s=ce(this,i[o+a],t,a),s===ie&&(s=this._$AH[a]),n||=!q(s)||s!==this._$AH[a],s===re?e=re:e!==re&&(e+=(s??"")+r[a+1]),this._$AH[a]=s}n&&!i&&this.j(e)}j(e){e===re?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ve extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===re?void 0:e}}class fe extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==re)}}class me extends pe{constructor(e,t,o,i,r){super(e,t,o,i,r),this.type=5}_$AI(e,t=this){if((e=ce(this,e,t,0)??re)===ie)return;const o=this._$AH,i=e===re&&o!==re||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,r=e!==re&&(o===re||i);i&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class be{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){ce(this,e)}}const ge={S:N,A:U,P:B,C:1,M:le,L:ue,R:j,V:ce,D:he,I:pe,H:fe,N:me,U:ve,B:be},ye=P.litHtmlPolyfillSupport;ye?.(de,he),(P.litHtmlVersions??=[]).push("3.0.0");const xe=(e,t,o)=>{const i=o?.renderBefore??t;let r=i._$litPart$;if(void 0===r){const e=o?.renderBefore??null;i._$litPart$=r=new he(t.insertBefore(F(),e),e,void 0,o??{})}return r._$AI(e),r};class _e extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=xe(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ie}}_e._$litElement$=!0,_e.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:_e});const we=globalThis.litElementPolyfillSupport;we?.({LitElement:_e}),(globalThis.litElementVersions??=[]).push("4.0.0");const $e=e=>(...t)=>({_$litDirective$:e,values:t});class Ce{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Ee=$e(class extends Ce{constructor(e){if(super(e),1!==e.type||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.st?.has(e)&&this.it.add(e);return this.render(t)}const o=e.element.classList;for(const e of this.it)e in t||(o.remove(e),this.it.delete(e));for(const e in t){const i=!!t[e];i===this.it.has(e)||this.st?.has(e)||(i?(o.add(e),this.it.add(e)):(o.remove(e),this.it.delete(e)))}return ie}}),Ae="cubic-bezier(0.2, 0, 0, 1)",ke="cubic-bezier(.3,0,0,1)",Te="cubic-bezier(.3,0,.8,.15)";class Ie extends _e{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){return this.count<0||this.max<0?"":`${this.count} / ${this.max}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&void 0!==e.get("disabled")&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){const e=this.renderLabel(!0),t=this.renderLabel(!1),o=this.renderOutline?.(e),i={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return te`
|
|
3
|
+
<div class="field ${Ee(i)}">
|
|
4
|
+
<div class="container-overflow">
|
|
5
|
+
${this.renderBackground?.()}
|
|
6
|
+
${this.renderIndicator?.()}
|
|
7
|
+
${o}
|
|
8
|
+
<div class="container">
|
|
9
|
+
<div class="start">
|
|
10
|
+
<slot name="start"></slot>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="middle">
|
|
13
|
+
<div class="label-wrapper">
|
|
14
|
+
${t}
|
|
15
|
+
${o?re:e}
|
|
16
|
+
</div>
|
|
17
|
+
<div class="content">
|
|
18
|
+
<slot></slot>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="end">
|
|
22
|
+
<slot name="end"></slot>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
${this.renderSupportingText()}
|
|
27
|
+
</div>
|
|
28
|
+
`}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame((()=>{this.refreshErrorAlert=!1})),this.disableTransitions&&requestAnimationFrame((()=>{this.disableTransitions=!1}))}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return re;const o=te`<span>${e}</span>`,i=t?te`<span class="counter">${t}</span>`:re,r=this.error&&this.errorText&&!this.refreshErrorAlert;return te`
|
|
29
|
+
<div class="supporting-text" role=${r?"alert":re}>${o}${i}</div>
|
|
30
|
+
<slot name="aria-describedby" @slotchange=${this.updateSlottedAriaDescribedBy}></slot>
|
|
31
|
+
`}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)xe(te`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return re;let t;t=e?this.focused||this.populated||this.isAnimating:!this.focused&&!this.populated&&!this.isAnimating;const o={hidden:!t,floating:e,resting:!e},i=`${this.label}${this.required?"*":""}`;return te`
|
|
32
|
+
<span class="label ${Ee(o)}"
|
|
33
|
+
aria-hidden=${!t}
|
|
34
|
+
>${i}</span>
|
|
35
|
+
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){this.label&&(e??(e=this.focused),t??(t=this.populated),(e||t)!==(this.focused||this.populated)&&(this.isAnimating=!0,this.labelAnimation?.cancel(),this.labelAnimation=this.floatingLabelEl?.animate(this.getLabelKeyframes(),{duration:150,easing:Ae}),this.labelAnimation?.addEventListener("finish",(()=>{this.isAnimating=!1}))))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:o,y:i,height:r}=e.getBoundingClientRect(),{x:n,y:a,height:s}=t.getBoundingClientRect(),l=e.scrollWidth,d=t.scrollWidth,c=d/l,u=`translateX(${n-o}px) translateY(${a-i+Math.round((s-r*c)/2)}px) scale(${c})`,h="translateX(0) translateY(0) scale(1)",p=t.clientWidth,v=d>p?p/c+"px":"";return this.focused||this.populated?[{transform:u,width:v},{transform:h,width:v}]:[{transform:h,width:v},{transform:u,width:v}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}o([T({type:Boolean})],Ie.prototype,"disabled",void 0),o([T({type:Boolean})],Ie.prototype,"error",void 0),o([T({type:Boolean})],Ie.prototype,"focused",void 0),o([T()],Ie.prototype,"label",void 0),o([T({type:Boolean})],Ie.prototype,"populated",void 0),o([T({type:Boolean})],Ie.prototype,"required",void 0),o([T({type:Boolean})],Ie.prototype,"resizable",void 0),o([T({attribute:"supporting-text"})],Ie.prototype,"supportingText",void 0),o([T({attribute:"error-text"})],Ie.prototype,"errorText",void 0),o([T({type:Number})],Ie.prototype,"count",void 0),o([T({type:Number})],Ie.prototype,"max",void 0),o([T({type:Boolean,attribute:"has-start"})],Ie.prototype,"hasStart",void 0),o([T({type:Boolean,attribute:"has-end"})],Ie.prototype,"hasEnd",void 0),o([R({slot:"aria-describedby"})],Ie.prototype,"slottedAriaDescribedBy",void 0),o([I()],Ie.prototype,"isAnimating",void 0),o([I()],Ie.prototype,"refreshErrorAlert",void 0),o([I()],Ie.prototype,"disableTransitions",void 0),o([z(".label.floating")],Ie.prototype,"floatingLabelEl",void 0),o([z(".label.resting")],Ie.prototype,"restingLabelEl",void 0),o([z(".container")],Ie.prototype,"containerEl",void 0);class Se extends Ie{renderOutline(e){return te`
|
|
36
|
+
<div class="outline">
|
|
37
|
+
<div class="outline-start"></div>
|
|
38
|
+
<div class="outline-notch">
|
|
39
|
+
<div class="outline-panel-inactive"></div>
|
|
40
|
+
<div class="outline-panel-active"></div>
|
|
41
|
+
<div class="outline-label">${e}</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="outline-end"></div>
|
|
44
|
+
</div>
|
|
45
|
+
`}}const ze=d`:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_container-shape: var(--md-outlined-field-container-shape, 4px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_container-shape-start-start: var( --md-outlined-field-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-outlined-field-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-outlined-field-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-outlined-field-container-shape-end-start, var(--_container-shape) )}.outline{border-color:var(--_outline-color);border-radius:inherit;color:var(--_outline-color);display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}:host-context([dir=rtl]) .resizable .container,:host([dir=rtl]) .resizable .container{clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}/*# sourceMappingURL=outlined-styles.css.map */
|
|
46
|
+
`,Oe=d`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start,.with-end .end{min-width:48px}.with-start .start{margin-inline-end:4px}.with-end .end{margin-inline-start:4px}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;white-space:pre-wrap}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}/*# sourceMappingURL=shared-styles.css.map */
|
|
47
|
+
`;let Re=class extends Se{};Re.styles=[Oe,ze],Re=o([i("md-outlined-field")],Re);const Pe=Symbol.for(""),Le=e=>{if(e?.r===Pe)return e?._$litStatic$},Me=(e,...t)=>({_$litStatic$:t.reduce(((t,o,i)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+e[i+1]),e[0]),r:Pe}),Ne=new Map,Ue=e=>(t,...o)=>{const i=o.length;let r,n;const a=[],s=[];let l,d=0,c=!1;for(;d<i;){for(l=t[d];d<i&&void 0!==(n=o[d],r=Le(n));)l+=r+t[++d],c=!0;d!==i&&s.push(n),a.push(l),d++}if(d===i&&a.push(t[i]),c){const e=a.join("$$lit$$");void 0===(t=Ne.get(e))&&(a.raw=a,Ne.set(e,t=a)),o=s}return e(t,...o)},Be=Ue(te),De=(Ue(oe),d`@media(forced-colors: active){:host{--md-outlined-text-field-disabled-input-text-color: GrayText;--md-outlined-text-field-disabled-input-text-opacity: 1;--md-outlined-text-field-disabled-label-text-color: GrayText;--md-outlined-text-field-disabled-label-text-opacity: 1;--md-outlined-text-field-disabled-leading-icon-color: GrayText;--md-outlined-text-field-disabled-leading-icon-opacity: 1;--md-outlined-text-field-disabled-outline-color: GrayText;--md-outlined-text-field-disabled-outline-opacity: 1;--md-outlined-text-field-disabled-supporting-text-color: GrayText;--md-outlined-text-field-disabled-supporting-text-opacity: 1;--md-outlined-text-field-disabled-trailing-icon-color: GrayText;--md-outlined-text-field-disabled-trailing-icon-opacity: 1}}/*# sourceMappingURL=outlined-forced-colors-styles.css.map */
|
|
48
|
+
`),Ve=d`:host{--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-shape: var(--md-outlined-text-field-container-shape, 4px);--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var( --md-outlined-text-field-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-outlined-text-field-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-outlined-text-field-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-outlined-text-field-container-shape-end-start, var(--_container-shape) );--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}/*# sourceMappingURL=outlined-styles.css.map */
|
|
49
|
+
`,{D:Fe}=ge,qe={},He=$e(class extends Ce{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ie||t===re)return t;const o=e.element,i=e.name;if(3===e.type){if(t===o[i])return ie}else if(4===e.type){if(!!t===o.hasAttribute(i))return ie}else if(1===e.type&&o.getAttribute(i)===t+"")return ie;return((e,t=qe)=>{e._$AH=t})(e),t}}),je="important",Ge=" !"+je,Ke=$e(class extends Ce{constructor(e){if(super(e),1!==e.type||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,o)=>{const i=e[o];return null==i?t:t+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(e,[t]){const{style:o}=e.element;if(void 0===this.ut)return this.ut=new Set(Object.keys(t)),this.render(t);for(const e of this.ut)null==t[e]&&(this.ut.delete(e),e.includes("-")?o.removeProperty(e):o[e]=null);for(const e in t){const i=t[e];if(null!=i){this.ut.add(e);const t="string"==typeof i&&i.endsWith(Ge);e.includes("-")||t?o.setProperty(e,t?i.slice(0,-11):i,t?je:""):o[e]=i}}return ie}}),We=["ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"];function Ye(e){return e.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}function Je(e){for(const t of We)e.createProperty(t,{attribute:Ye(t),reflect:!0});e.addInitializer((e=>{const t={hostConnected(){e.setAttribute("role","presentation")}};e.addController(t)}))}function Xe(e,t){!t.bubbles||e.shadowRoot&&!t.composed||t.stopPropagation();const o=Reflect.construct(t.constructor,[t.type,t]),i=e.dispatchEvent(o);return i||t.preventDefault(),i}function Ze(e){const t=new MouseEvent("click",{bubbles:!0});return e.dispatchEvent(t),t}function Qe(e){return e.currentTarget===e.target&&e.composedPath()[0]===e.target&&!e.target.disabled&&!function(e){const t=et;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){et=!0,await null,et=!1}(),t}(e)}We.map(Ye);let et=!1;class tt extends _e{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.errorText="",this.label="",this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText="",this.hasCustomValidityError=!1,this.internals=this.attachInternals()}get form(){return this.internals.form}get labels(){return this.internals.labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get validationMessage(){return this.syncValidity(),this.internals.validationMessage}get validity(){return this.syncValidity(),this.internals.validity}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get willValidate(){return this.syncValidity(),this.internals.willValidate}get hasError(){return this.error||this.nativeError}checkValidity(){return this.syncValidity(),this.internals.checkValidity()}reportValidity(){let e;this.addEventListener("invalid",(t=>{e=t}),{once:!0});const t=this.checkValidity();if(e?.defaultPrevented)return t;const o=this.getErrorText();return this.nativeError=!t,this.nativeErrorText=this.validationMessage,o===this.getErrorText()&&this.field?.reannounceError(),t}select(){this.getInputOrTextarea().select()}setCustomValidity(e){this.hasCustomValidityError=!!e,this.internals.setValidity({customError:!!e},e,this.getInputOrTextarea())}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,o){this.getInputOrTextarea().setSelectionRange(e,t,o)}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,o){"value"===e&&this.dirty||super.attributeChangedCallback(e,t,o)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:"textarea"===this.type};return te`
|
|
50
|
+
<span class="text-field ${Ee(e)}">
|
|
51
|
+
${this.renderField()}
|
|
52
|
+
</span>
|
|
53
|
+
`}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t),this.internals.setFormValue(t),this.syncValidity()}renderField(){return Be`<${this.fieldTag}
|
|
54
|
+
class="field"
|
|
55
|
+
count=${this.value.length}
|
|
56
|
+
?disabled=${this.disabled}
|
|
57
|
+
?error=${this.hasError}
|
|
58
|
+
error-text=${this.getErrorText()}
|
|
59
|
+
?focused=${this.focused}
|
|
60
|
+
?has-end=${this.hasTrailingIcon}
|
|
61
|
+
?has-start=${this.hasLeadingIcon}
|
|
62
|
+
label=${this.label}
|
|
63
|
+
max=${this.maxLength}
|
|
64
|
+
?populated=${!!this.value}
|
|
65
|
+
?required=${this.required}
|
|
66
|
+
?resizable=${"textarea"===this.type}
|
|
67
|
+
supporting-text=${this.supportingText}
|
|
68
|
+
>
|
|
69
|
+
${this.renderLeadingIcon()}
|
|
70
|
+
${this.renderInputOrTextarea()}
|
|
71
|
+
${this.renderTrailingIcon()}
|
|
72
|
+
<div id="description" slot="aria-describedby"></div>
|
|
73
|
+
</${this.fieldTag}>`}renderLeadingIcon(){return te`
|
|
74
|
+
<span class="icon leading" slot="start">
|
|
75
|
+
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
76
|
+
</span>
|
|
77
|
+
`}renderTrailingIcon(){return te`
|
|
78
|
+
<span class="icon trailing" slot="end">
|
|
79
|
+
<slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
|
|
80
|
+
</span>
|
|
81
|
+
`}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||re,o=this.autocomplete;if("textarea"===this.type)return te`
|
|
82
|
+
<textarea
|
|
83
|
+
class="input"
|
|
84
|
+
style=${Ke(e)}
|
|
85
|
+
aria-describedby="description"
|
|
86
|
+
aria-invalid=${this.hasError}
|
|
87
|
+
aria-label=${t}
|
|
88
|
+
autocomplete=${o||re}
|
|
89
|
+
?disabled=${this.disabled}
|
|
90
|
+
maxlength=${this.maxLength>-1?this.maxLength:re}
|
|
91
|
+
minlength=${this.minLength>-1?this.minLength:re}
|
|
92
|
+
placeholder=${this.placeholder||re}
|
|
93
|
+
?readonly=${this.readOnly}
|
|
94
|
+
?required=${this.required}
|
|
95
|
+
rows=${this.rows}
|
|
96
|
+
.value=${He(this.value)}
|
|
97
|
+
@change=${this.handleChange}
|
|
98
|
+
@focusin=${this.handleFocusin}
|
|
99
|
+
@focusout=${this.handleFocusout}
|
|
100
|
+
@input=${this.handleInput}
|
|
101
|
+
@select=${this.redispatchEvent}
|
|
102
|
+
></textarea>
|
|
103
|
+
`;const i=this.renderPrefix(),r=this.renderSuffix(),n=this.inputMode;return te`
|
|
104
|
+
<div class="input-wrapper">
|
|
105
|
+
${i}
|
|
106
|
+
<input
|
|
107
|
+
class="input"
|
|
108
|
+
style=${Ke(e)}
|
|
109
|
+
aria-describedby="description"
|
|
110
|
+
aria-invalid=${this.hasError}
|
|
111
|
+
aria-label=${t}
|
|
112
|
+
autocomplete=${o||re}
|
|
113
|
+
?disabled=${this.disabled}
|
|
114
|
+
inputmode=${n||re}
|
|
115
|
+
max=${this.max||re}
|
|
116
|
+
maxlength=${this.maxLength>-1?this.maxLength:re}
|
|
117
|
+
min=${this.min||re}
|
|
118
|
+
minlength=${this.minLength>-1?this.minLength:re}
|
|
119
|
+
pattern=${this.pattern||re}
|
|
120
|
+
placeholder=${this.placeholder||re}
|
|
121
|
+
?readonly=${this.readOnly}
|
|
122
|
+
?required=${this.required}
|
|
123
|
+
?multiple=${this.multiple}
|
|
124
|
+
step=${this.step||re}
|
|
125
|
+
type=${this.type}
|
|
126
|
+
.value=${He(this.value)}
|
|
127
|
+
@change=${this.redispatchEvent}
|
|
128
|
+
@focusin=${this.handleFocusin}
|
|
129
|
+
@focusout=${this.handleFocusout}
|
|
130
|
+
@input=${this.handleInput}
|
|
131
|
+
@select=${this.redispatchEvent}
|
|
132
|
+
>
|
|
133
|
+
${r}
|
|
134
|
+
</div>
|
|
135
|
+
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?te`<span class="${Ee({suffix:t,prefix:!t})}">${e}</span>`:re}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusin(){this.focused=!0}handleFocusout(){this.focused=!1}handleInput(e){this.dirty=!0,this.value=e.target.value,this.syncValidity()}handleChange(e){this.syncValidity(),this.redispatchEvent(e)}redispatchEvent(e){Xe(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return"textarea"===this.type?null:this.getInputOrTextarea()}syncValidity(){const e=this.getInputOrTextarea();this.hasCustomValidityError?e.setCustomValidity(this.internals.validationMessage):e.setCustomValidity(""),this.internals.setValidity(e.validity,e.validationMessage,this.getInputOrTextarea())}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}}Je(tt),tt.shadowRootOptions={..._e.shadowRootOptions,delegatesFocus:!0},tt.formAssociated=!0,o([T({type:Boolean,reflect:!0})],tt.prototype,"disabled",void 0),o([T({type:Boolean,reflect:!0})],tt.prototype,"error",void 0),o([T({attribute:"error-text"})],tt.prototype,"errorText",void 0),o([T()],tt.prototype,"label",void 0),o([T({type:Boolean,reflect:!0})],tt.prototype,"required",void 0),o([T()],tt.prototype,"value",void 0),o([T({attribute:"prefix-text"})],tt.prototype,"prefixText",void 0),o([T({attribute:"suffix-text"})],tt.prototype,"suffixText",void 0),o([T({type:Boolean,attribute:"has-leading-icon"})],tt.prototype,"hasLeadingIcon",void 0),o([T({type:Boolean,attribute:"has-trailing-icon"})],tt.prototype,"hasTrailingIcon",void 0),o([T({attribute:"supporting-text"})],tt.prototype,"supportingText",void 0),o([T({attribute:"text-direction"})],tt.prototype,"textDirection",void 0),o([T({type:Number})],tt.prototype,"rows",void 0),o([T({reflect:!0})],tt.prototype,"inputMode",void 0),o([T()],tt.prototype,"max",void 0),o([T({type:Number})],tt.prototype,"maxLength",void 0),o([T()],tt.prototype,"min",void 0),o([T({type:Number})],tt.prototype,"minLength",void 0),o([T()],tt.prototype,"pattern",void 0),o([T({reflect:!0,converter:{fromAttribute:e=>e??"",toAttribute:e=>e||null}})],tt.prototype,"placeholder",void 0),o([T({type:Boolean,reflect:!0})],tt.prototype,"readOnly",void 0),o([T({type:Boolean,reflect:!0})],tt.prototype,"multiple",void 0),o([T()],tt.prototype,"step",void 0),o([T({reflect:!0})],tt.prototype,"type",void 0),o([T({reflect:!0})],tt.prototype,"autocomplete",void 0),o([I()],tt.prototype,"dirty",void 0),o([I()],tt.prototype,"focused",void 0),o([I()],tt.prototype,"nativeError",void 0),o([I()],tt.prototype,"nativeErrorText",void 0),o([z(".input")],tt.prototype,"inputOrTextarea",void 0),o([z(".field")],tt.prototype,"field",void 0),o([R({slot:"leading-icon"})],tt.prototype,"leadingIcons",void 0),o([R({slot:"trailing-icon"})],tt.prototype,"trailingIcons",void 0);class ot extends tt{constructor(){super(...arguments),this.fieldTag=Me`md-outlined-field`}}const it=d`:host{display:inline-flex;outline:none;resize:both;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}.icon{color:currentColor;display:flex;fill:currentColor}.icon ::slotted(*){display:flex}[hasstart] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[hasend] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background-color:Field}}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}/*# sourceMappingURL=shared-styles.css.map */
|
|
136
|
+
`;let rt=class extends ot{constructor(){super(...arguments),this.fieldTag=Me`md-outlined-field`}};rt.styles=[it,Ve,De],rt=o([i("md-outlined-text-field")],rt);class nt extends _e{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){return te`<span class="shadow"></span>`}}const at=d`:host{--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));display:flex;pointer-events:none}:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}/*# sourceMappingURL=elevation-styles.css.map */
|
|
137
|
+
`;let st=class extends nt{};st.styles=[at],st=o([i("md-elevation")],st);const lt=Symbol("attachableController");let dt;dt=new MutationObserver((e=>{for(const t of e)t.target[lt]?.hostConnected()}));class ct{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){null===e?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[lt]=this,dt?.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}const ut=["focusin","focusout","pointerdown"];class ht extends _e{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new ct(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(e){if(!e[pt]){switch(e.type){default:return;case"focusin":this.visible=this.control?.matches(":focus-visible")??!1;break;case"focusout":case"pointerdown":this.visible=!1}e[pt]=!0}}onControlChange(e,t){for(const o of ut)e?.removeEventListener(o,this),t?.addEventListener(o,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}o([T({type:Boolean,reflect:!0})],ht.prototype,"visible",void 0),o([T({type:Boolean,reflect:!0})],ht.prototype,"inward",void 0);const pt=Symbol("handledByFocusRing"),vt=d`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, 9999px)) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, 9999px)) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, 9999px)) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, 9999px)) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, 9999px)) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, 9999px)) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, 9999px)) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, 9999px)) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}/*# sourceMappingURL=focus-ring-styles.css.map */
|
|
138
|
+
`;let ft=class extends ht{};var mt;ft.styles=[vt],ft=o([i("md-focus-ring")],ft),function(e){e[e.INACTIVE=0]="INACTIVE",e[e.TOUCH_DELAY=1]="TOUCH_DELAY",e[e.HOLDING=2]="HOLDING",e[e.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(mt||(mt={}));const bt=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"];class gt extends _e{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=mt.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new ct(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return te`<div class="surface ${Ee(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==mt.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state!==mt.HOLDING)return this.state===mt.TOUCH_DELAY?(this.state=mt.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=mt.WAITING_FOR_CLICK}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e))return this.state=mt.WAITING_FOR_CLICK,void this.startPressAnimation(e);this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=mt.TOUCH_DELAY,await new Promise((e=>{setTimeout(e,150)})),this.state===mt.TOUCH_DELAY&&(this.state=mt.HOLDING,this.startPressAnimation(e)))}}handleClick(){this.disabled||(this.state!==mt.WAITING_FOR_CLICK?this.state===mt.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),o=Math.max(e,t),i=Math.max(.35*o,75),r=Math.floor(.2*o),n=Math.sqrt(t**2+e**2)+10;this.initialSize=r,this.rippleScale=""+(n+i)/r,this.rippleSize=`${r}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:o}=window,{left:i,top:r}=this.getBoundingClientRect(),n=t+i,a=o+r,{pageX:s,pageY:l}=e;return{x:s-n,y:l-a}}getTranslationCoordinates(e){const{height:t,width:o}=this.getBoundingClientRect(),i={x:(o-this.initialSize)/2,y:(t-this.initialSize)/2};let r;return r=e instanceof PointerEvent?this.getNormalizedPointerEventCoords(e):{x:o/2,y:t/2},r={x:r.x-this.initialSize/2,y:r.y-this.initialSize/2},{startPoint:r,endPoint:i}}startPressAnimation(e){if(!this.mdRoot)return;this.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:o}=this.getTranslationCoordinates(e),i=`${t.x}px, ${t.y}px`,r=`${o.x}px, ${o.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${i}) scale(1)`,`translate(${r}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:Ae,fill:"forwards"})}async endPressAnimation(){this.state=mt.INACTIVE;const e=this.growAnimation;let t=1/0;"number"==typeof e?.currentTime?t=e.currentTime:e?.currentTime&&(t=e.currentTime.to("ms").value),t>=225?this.pressed=!1:(await new Promise((e=>{setTimeout(e,225-t)})),this.growAnimation===e&&(this.pressed=!1))}shouldReactToEvent(e){if(this.disabled||!e.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if("pointerenter"===e.type||"pointerleave"===e.type)return!this.isTouch(e);const t=1===e.buttons;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:o,left:i,bottom:r,right:n}=this.getBoundingClientRect();return e>=i&&e<=n&&t>=o&&t<=r}isTouch({pointerType:e}){return"touch"===e}async handleEvent(e){switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e)}}onControlChange(e,t){for(const o of bt)e?.removeEventListener(o,this),t?.addEventListener(o,this)}}o([T({type:Boolean,reflect:!0})],gt.prototype,"disabled",void 0),o([I()],gt.prototype,"hovered",void 0),o([I()],gt.prototype,"pressed",void 0),o([z(".surface")],gt.prototype,"mdRoot",void 0);const yt=d`:host{--_hover-color: var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-opacity: var(--md-ripple-hover-opacity, 0.08);--_pressed-color: var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-opacity: var(--md-ripple-pressed-opacity, 0.12);display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--_hover-color);inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--_pressed-color) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--_hover-color);opacity:var(--_hover-opacity)}.pressed::after{opacity:var(--_pressed-opacity);transition-duration:105ms}/*# sourceMappingURL=ripple-styles.css.map */
|
|
139
|
+
`;let xt=class extends gt{};xt.styles=[yt],xt=o([i("md-ripple")],xt);const _t=Symbol("internals");var wt;class $t extends _e{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[_t].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this[wt]=this.attachInternals(),this.handleActivationClick=e=>{Qe(e)&&this.buttonElement&&(this.focus(),Ze(this.buttonElement))},this.addEventListener("click",this.handleActivationClick)}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}render(){const e=this.disabled&&!this.href,t=this.href?Me`a`:Me`button`,{ariaLabel:o,ariaHasPopup:i,ariaExpanded:r}=this;return Be`
|
|
140
|
+
<${t}
|
|
141
|
+
class="button ${Ee(this.getRenderClasses())}"
|
|
142
|
+
?disabled=${e}
|
|
143
|
+
aria-label="${o||re}"
|
|
144
|
+
aria-haspopup="${i||re}"
|
|
145
|
+
aria-expanded="${r||re}"
|
|
146
|
+
href=${this.href||re}
|
|
147
|
+
target=${this.target||re}
|
|
148
|
+
>${this.renderContent()}</${t}>`}getRenderClasses(){return{"button--icon-leading":!this.trailingIcon&&this.hasIcon,"button--icon-trailing":this.trailingIcon&&this.hasIcon}}renderContent(){const e=this.disabled&&!this.href,t=te`<slot name="icon" @slotchange="${this.handleSlotChange}"></slot>`;return te`
|
|
149
|
+
${this.renderElevation?.()}
|
|
150
|
+
${this.renderOutline?.()}
|
|
151
|
+
<md-focus-ring part="focus-ring"></md-focus-ring>
|
|
152
|
+
<md-ripple class="button__ripple" ?disabled="${e}"></md-ripple>
|
|
153
|
+
<span class="touch"></span>
|
|
154
|
+
${this.trailingIcon?re:t}
|
|
155
|
+
<span class="button__label"><slot></slot></span>
|
|
156
|
+
${this.trailingIcon?t:re}
|
|
157
|
+
`}handleSlotChange(){this.hasIcon=this.assignedIcons.length>0}}wt=_t,Je($t),$t.addInitializer((e=>{const t=e;t.addEventListener("click",(async e=>{const{type:o,[_t]:i}=t,{form:r}=i;r&&"button"!==o&&(await new Promise((e=>{e()})),e.defaultPrevented||("reset"!==o?(r.addEventListener("submit",(e=>{Object.defineProperty(e,"submitter",{configurable:!0,enumerable:!0,get:()=>t})}),{capture:!0,once:!0}),i.setFormValue(t.value),r.requestSubmit()):r.reset()))}))})),$t.formAssociated=!0,$t.shadowRootOptions={mode:"open",delegatesFocus:!0},o([T({type:Boolean,reflect:!0})],$t.prototype,"disabled",void 0),o([T()],$t.prototype,"href",void 0),o([T()],$t.prototype,"target",void 0),o([T({type:Boolean,attribute:"trailing-icon"})],$t.prototype,"trailingIcon",void 0),o([T({type:Boolean,attribute:"has-icon"})],$t.prototype,"hasIcon",void 0),o([T()],$t.prototype,"type",void 0),o([T()],$t.prototype,"value",void 0),o([z(".button")],$t.prototype,"buttonElement",void 0),o([R({slot:"icon",flatten:!0})],$t.prototype,"assignedIcons",void 0);class Ct extends $t{renderElevation(){return te`<md-elevation></md-elevation>`}}const Et=d`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-filled-button-container-shape, 9999px);--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px);--_container-shape-start-start: var( --md-filled-button-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-filled-button-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-filled-button-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-filled-button-container-shape-end-start, var(--_container-shape) )}/*# sourceMappingURL=filled-styles.css.map */
|
|
158
|
+
`,At=d`md-elevation{transition-duration:280ms}.button:disabled md-elevation{transition:none}.button{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}.button:focus{--md-elevation-level: var(--_focus-container-elevation)}.button:hover{--md-elevation-level: var(--_hover-container-elevation)}.button:active{--md-elevation-level: var(--_pressed-container-elevation)}.button:disabled{--md-elevation-level: var(--_disabled-container-elevation)}/*# sourceMappingURL=shared-elevation-styles.css.map */
|
|
159
|
+
`,kt=d`:host{display:inline-flex;height:var(--_container-height);outline:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host([disabled]){cursor:default;pointer-events:none}.button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-inline-size:64px;border:none;outline:none;user-select:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;inline-size:100%;position:relative;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);gap:8px}.button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute}.button::-moz-focus-inner{padding:0;border:0}.button:hover{color:var(--_hover-label-text-color);cursor:pointer}.button:focus{color:var(--_focus-label-text-color)}.button:active{color:var(--_pressed-label-text-color);outline:none}.button:disabled .button__label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.button:disabled::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.button::before{content:"";box-sizing:border-box;border:1px solid CanvasText;border-radius:inherit;inset:0;pointer-events:none;position:absolute}.button:disabled{--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-opacity: 1}}.button,.button__ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.button::after,.button::before,md-elevation,.button__ripple{z-index:-1}.button--icon-leading{padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}.button--icon-trailing{padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.link-button-wrapper{inline-size:100%}.button ::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}.button:hover ::slotted([slot=icon]){color:var(--_hover-icon-color)}.button:focus ::slotted([slot=icon]){color:var(--_focus-icon-color)}.button:active ::slotted([slot=icon]){color:var(--_pressed-icon-color)}.button:disabled ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=none]) .touch{display:none}/*# sourceMappingURL=shared-styles.css.map */
|
|
160
|
+
`;let Tt=class extends Ct{};Tt.styles=[kt,At,Et],Tt=o([i("md-filled-button")],Tt);class It extends $t{renderOutline(){return te`<span class="button__outline"></span>`}}const St=d`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_container-shape: var(--md-outlined-button-container-shape, 9999px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0;--_container-shape-start-start: var( --md-outlined-button-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-outlined-button-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-outlined-button-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-outlined-button-container-shape-end-start, var(--_container-shape) )}.button__outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.button:active .button__outline{border-color:var(--_pressed-outline-color)}.button:disabled .button__outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){.button:disabled .button__outline{opacity:1}}.button__outline,.button__ripple{border-width:var(--_outline-width)}.button__ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}/*# sourceMappingURL=outlined-styles.css.map */
|
|
161
|
+
`;let zt=class extends It{};zt.styles=[kt,St],zt=o([i("md-outlined-button")],zt);const Ot=d`@media(forced-colors: active){:host{--md-outlined-select-text-field-disabled-input-text-color: GrayText;--md-outlined-select-text-field-disabled-input-text-opacity: 1;--md-outlined-select-text-field-disabled-label-text-color: GrayText;--md-outlined-select-text-field-disabled-label-text-opacity: 1;--md-outlined-select-text-field-disabled-leading-icon-color: GrayText;--md-outlined-select-text-field-disabled-leading-icon-opacity: 1;--md-outlined-select-text-field-disabled-outline-color: GrayText;--md-outlined-select-text-field-disabled-outline-opacity: 1;--md-outlined-select-text-field-disabled-supporting-text-color: GrayText;--md-outlined-select-text-field-disabled-supporting-text-opacity: 1;--md-outlined-select-text-field-disabled-trailing-icon-color: GrayText;--md-outlined-select-text-field-disabled-trailing-icon-opacity: 1}}/*# sourceMappingURL=outlined-forced-colors-styles.css.map */
|
|
162
|
+
`;function Rt(e,t=Dt){const o=Mt(e,t);return o&&(o.tabIndex=0,o.focus()),o}function Pt(e,t=Dt){const o=Nt(e,t);return o&&(o.tabIndex=0,o.focus()),o}function Lt(e,t=Dt){for(let o=0;o<e.length;o++){const i=e[o];if(0===i.tabIndex&&t(i))return{item:i,index:o}}return null}function Mt(e,t=Dt){for(const o of e)if(t(o))return o;return null}function Nt(e,t=Dt){for(let o=e.length-1;o>=0;o--){const i=e[o];if(t(i))return i}return null}function Ut(e,t,o=Dt){if(t){const i=function(e,t,o=Dt){for(let i=1;i<e.length;i++){const r=e[(i+t)%e.length];if(o(r))return r}return e[t]?e[t]:null}(e,t.index,o);return i&&(i.tabIndex=0,i.focus()),i}return Rt(e,o)}function Bt(e,t,o=Dt){if(t){const i=function(e,t,o=Dt){for(let i=1;i<e.length;i++){const r=e[(t-i+e.length)%e.length];if(o(r))return r}return e[t]?e[t]:null}(e,t.index,o);return i&&(i.tabIndex=0,i.focus()),i}return Pt(e,o)}function Dt(e){return!e.disabled}const Vt="ArrowDown",Ft="ArrowLeft",qt="ArrowUp",Ht="ArrowRight",jt="Home";class Gt{constructor(e){this.handleKeydown=e=>{const t=e.key;if(e.defaultPrevented||!this.isNavigableKey(t))return;const o=this.items;if(!o.length)return;const i=Lt(o,this.isActivatable);i&&(i.item.tabIndex=-1),e.preventDefault();const r=this.isRtl();switch(t){case Vt:case r?Ft:Ht:Ut(o,i,this.isActivatable);break;case qt:case r?Ht:Ft:Bt(o,i,this.isActivatable);break;case jt:Rt(o,this.isActivatable);break;case"End":Pt(o,this.isActivatable)}},this.onDeactivateItems=()=>{const e=this.items;for(const t of e)this.deactivateItem(t)},this.onRequestActivation=e=>{this.onDeactivateItems();const t=e.target;this.activateItem(t),t.focus()},this.onSlotchange=()=>{const e=this.items;let t=!1;for(const o of e)!o.disabled&&o.tabIndex>-1&&!t?(t=!0,o.tabIndex=0):o.tabIndex=-1;if(t)return;const o=Mt(e,this.isActivatable);o&&(o.tabIndex=0)};const{isItem:t,getPossibleItems:o,isRtl:i,deactivateItem:r,activateItem:n,isNavigableKey:a,isActivatable:s}=e;this.isItem=t,this.getPossibleItems=o,this.isRtl=i,this.deactivateItem=r,this.activateItem=n,this.isNavigableKey=a,this.isActivatable=s}get items(){const e=this.getPossibleItems(),t=[];for(const o of e){if(this.isItem(o)){t.push(o);continue}const e=o.item;e&&this.isItem(e)&&t.push(e)}return t}activateNextItem(){const e=this.items,t=Lt(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ut(e,t,this.isActivatable)}activatePreviousItem(){const e=this.items,t=Lt(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Bt(e,t,this.isActivatable)}}const Kt=function(e,t){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})},Wt={SPACE:"Space",ENTER:"Enter"},Yt={ESCAPE:"Escape",SPACE:Wt.SPACE,ENTER:Wt.ENTER};function Jt(e){return Object.values(Yt).some((t=>t===e))}function Xt(e,t){const o=new Event("md-contains",{bubbles:!0,composed:!0});let i=[];const r=e=>{i=e.composedPath()};return t.addEventListener("md-contains",r),e.dispatchEvent(o),t.removeEventListener("md-contains",r),i.length>0}const Zt="first-item";class Qt{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:o,surfaceCorner:i,positioning:r,xOffset:n,yOffset:a,repositionStrategy:s}=this.getProperties(),l=o.toLowerCase().trim(),d=i.toLowerCase().trim();if(!e||!t)return;const c=window.innerWidth,u=window.innerHeight;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete;const h=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),p=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[v,f]=d.split("-"),[m,b]=l.split("-"),g="ltr"===getComputedStyle(e).direction;let{blockInset:y,blockOutOfBoundsCorrection:x,surfaceBlockProperty:_}=this.calculateBlock({surfaceRect:h,anchorRect:p,anchorBlock:m,surfaceBlock:v,yOffset:a,positioning:r,windowInnerHeight:u});if(x){const e="start"===v?"end":"start",t="start"===m?"end":"start",o=this.calculateBlock({surfaceRect:h,anchorRect:p,anchorBlock:t,surfaceBlock:e,yOffset:a,positioning:r,windowInnerHeight:u});x>o.blockOutOfBoundsCorrection&&(y=o.blockInset,x=o.blockOutOfBoundsCorrection,_=o.surfaceBlockProperty)}let{inlineInset:w,inlineOutOfBoundsCorrection:$,surfaceInlineProperty:C}=this.calculateInline({surfaceRect:h,anchorRect:p,anchorInline:b,surfaceInline:f,xOffset:n,positioning:r,isLTR:g,windowInnerWidth:c});if($){const e="start"===f?"end":"start",t="start"===b?"end":"start",o=this.calculateInline({surfaceRect:h,anchorRect:p,anchorInline:t,surfaceInline:e,xOffset:n,positioning:r,isLTR:g,windowInnerWidth:c});Math.abs($)>Math.abs(o.inlineOutOfBoundsCorrection)&&(w=o.inlineInset,$=o.inlineOutOfBoundsCorrection,C=o.surfaceInlineProperty)}"move"===s&&(y-=x,w-=$),this.surfaceStylesInternal={display:"block",opacity:"1",[_]:`${y}px`,[C]:`${w}px`},"resize"===s&&(x&&(this.surfaceStylesInternal.height=h.height-x+"px"),$&&(this.surfaceStylesInternal.width=h.width-$+"px")),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:o,anchorBlock:i,surfaceBlock:r,yOffset:n,positioning:a,windowInnerHeight:s}=e,l="fixed"===a?1:0,d="start"===r?1:0,c="end"===r?1:0,u=(i!==r?1:0)*o.height+n,h=d*o.top+c*(s-o.bottom);return{blockInset:l*h+u,blockOutOfBoundsCorrection:Math.abs(Math.min(0,s-h-u-t.height)),surfaceBlockProperty:"start"===r?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:o,anchorInline:i,anchorRect:r,surfaceRect:n,xOffset:a,positioning:s,windowInnerWidth:l}=e,d="fixed"===s?1:0,c=t?1:0,u=t?0:1,h="start"===o?1:0,p="end"===o?1:0,v=(i!==o?1:0)*r.width+a,f=c*(h*r.left+p*(l-r.right))+u*(h*(l-r.right)+p*r.left);return{inlineInset:d*f+v,inlineOutOfBoundsCorrection:Math.abs(Math.min(0,l-f-v-n.width)),surfaceInlineProperty:"start"===o?"inset-inline-start":"inset-inline-end"}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[o,i]of Object.entries(e))if(t=t||i!==this.lastValues[o],t)break;const o=this.lastValues.isOpen!==e.isOpen,i=!!e.anchorEl,r=!!e.surfaceEl;t&&i&&r&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):o&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate()}}class eo{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&("Space"===e.code||"Enter"===e.code||e.code.startsWith("Arrow")||"Escape"===e.code||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map(((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()])),this.lastActiveRecord=this.typeaheadRecords.find((e=>0===e[1].tabIndex))??null,this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),"Enter"===e.code||e.code.startsWith("Arrow")||"Escape"===e.code)return this.endTypeahead(),void(this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1));"Space"===e.code&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();const t=this.lastActiveRecord?this.lastActiveRecord[0]:-1,o=this.typeaheadRecords.length,i=e=>(e[0]+o-t)%o,r=this.typeaheadRecords.filter((e=>!e[1].disabled&&e[2].startsWith(this.typaheadBuffer))).sort(((e,t)=>i(e)-i(t)));if(0===r.length)return clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),void this.endTypeahead();const n=1===this.typaheadBuffer.length;let a;a=this.lastActiveRecord===r[0]&&n?r[1]??r[0]:r[0],this.lastActiveRecord&&(this.lastActiveRecord[1].tabIndex=-1),this.lastActiveRecord=a,a[1].tabIndex=0,a[1].focus()}}const to=new Set([Vt,qt,jt,"End"]),oo=new Set([Ft,Ht,...to]);class io extends _e{get openDirection(){return"start"===this.menuCorner.split("-")[0]?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=200,this.anchorCorner="end-start",this.menuCorner="start-start",this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Zt,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.openCloseAnimationSignal=function(){let e=null;return{start:()=>(e?.abort(),e=new AbortController,e.signal),finish(){e=null}}}(),this.listController=new Gt({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>"rtl"===getComputedStyle(this).direction,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===("rtl"===getComputedStyle(this).direction?Ft:Ht)||to.has(e):oo.has(e)}),this.lastFocusedElement=null,this.typeaheadController=new eo((()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive}))),this.currentAnchorElement=null,this.internals=function(e,t){if(function(e){return"role"in e}(t))return t;if(!("role"in e))throw new Error("Missing setupHostAria()");let o=[],i=!1;for(const r of We){let n=null;Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n,set(t){const a=()=>{n=t,i?e[r]=t:o.push({property:r,callback:a})};a()}})}let r=null;return Object.defineProperty(t,"role",{enumerable:!0,configurable:!0,get:()=>r,set(t){const n=()=>{r=t,i?null===t?e.removeAttribute("role"):e.setAttribute("role",t):o.push({property:"role",callback:n})};n()}}),e.addController({hostConnected(){if(i)return;i=!0;const t=new Set;for(const{property:i}of o)(null!==e.getAttribute(Ye(i))||void 0!==e[i])&&t.add(i);for(const{property:e,callback:i}of o)t.has(e)||i();o=[]}}),t}(this,this.attachInternals()),this.menuPositionController=new Qt(this,(()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow?"move":"resize"}))),this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(Xt(e.relatedTarget,this)||Xt(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const o=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=o},this.onOpened=async()=>{this.lastFocusedElement=function(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}();const e=this.items,t=Lt(e);t&&"none"!==this.defaultFocus&&(t.item.tabIndex=-1);let o=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):o=!!await this.animateOpen(),this.defaultFocus){case Zt:const t=Mt(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case"last-item":const o=Nt(e);o&&(o.tabIndex=0,o.focus(),await o.updateComplete);break;case"list-root":this.focus()}o||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();this.stayOpenOnOutsideClick||t.includes(this)||t.includes(this.anchorElement)||(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){e.has("open")&&(this.open?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"))}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}render(){return this.renderSurface()}renderSurface(){return te`
|
|
163
|
+
<div
|
|
164
|
+
class="menu ${Ee(this.getSurfaceClasses())}"
|
|
165
|
+
style=${Ke(this.menuPositionController.surfaceStyles)}>
|
|
166
|
+
${this.renderElevation()}
|
|
167
|
+
<div class="items">
|
|
168
|
+
<div class="item-padding">
|
|
169
|
+
${this.renderMenuItems()}
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
`}renderMenuItems(){return te`<slot
|
|
174
|
+
@close-menu=${this.onCloseMenu}
|
|
175
|
+
@deactivate-items=${this.onDeactivateItems}
|
|
176
|
+
@request-activation=${this.onRequestActivation}
|
|
177
|
+
@deactivate-typeahead=${this.handleDeactivateTypeahead}
|
|
178
|
+
@activate-typeahead=${this.handleActivateTypeahead}
|
|
179
|
+
@stay-open-on-focusout=${this.handleStayOpenOnFocusout}
|
|
180
|
+
@close-on-focusout=${this.handleCloseOnFocusout}
|
|
181
|
+
@slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return te`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:"fixed"===this.positioning,"has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Jt(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const o=this.openDirection;this.dispatchEvent(new Event("opening")),e.classList.toggle("animating",!0);const i=this.openCloseAnimationSignal.start(),r=e.offsetHeight,n="UP"===o,a=this.items,s=250/a.length,l=e.animate([{height:"0px"},{height:`${r}px`}],{duration:500,easing:ke}),d=t.animate([{transform:n?`translateY(-${r}px)`:""},{transform:""}],{duration:500,easing:ke}),c=e.animate([{opacity:0},{opacity:1}],50),u=[];for(let e=0;e<a.length;e++){const t=a[n?a.length-1-e:e],o=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle("md-menu-hidden",!0),o.addEventListener("finish",(()=>{t.classList.toggle("md-menu-hidden",!1)})),u.push([t,o])}let h=e=>{};const p=new Promise((e=>{h=e}));return i.addEventListener("abort",(()=>{l.cancel(),d.cancel(),c.cancel(),u.forEach((([e,t])=>{e.classList.toggle("md-menu-hidden",!1),t.cancel()})),h(!0)})),l.addEventListener("finish",(()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),h(!1)})),await p}animateClose(){let e,t;const o=new Promise(((o,i)=>{e=o,t=i})),i=this.surfaceEl,r=this.slotEl;if(!i||!r)return t(),o;const n="UP"===this.openDirection;this.dispatchEvent(new Event("closing")),i.classList.toggle("animating",!0);const a=this.openCloseAnimationSignal.start(),s=i.offsetHeight,l=this.items,d=50/l.length,c=i.animate([{height:`${s}px`},{height:.35*s+"px"}],{duration:150,easing:Te}),u=r.animate([{transform:""},{transform:n?`translateY(-${.65*s}px)`:""}],{duration:150,easing:Te}),h=i.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),p=[];for(let e=0;e<l.length;e++){const t=l[n?e:l.length-1-e],o=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+d*e});o.addEventListener("finish",(()=>{t.classList.toggle("md-menu-hidden",!0)})),p.push([t,o])}return a.addEventListener("abort",(()=>{c.cancel(),u.cancel(),h.cancel(),p.forEach((([e,t])=>{t.cancel(),e.classList.toggle("md-menu-hidden",!1)})),t()})),c.addEventListener("finish",(()=>{i.classList.toggle("animating",!1),p.forEach((([e])=>{e.classList.toggle("md-menu-hidden",!1)})),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event("closed")),e(!0)})),o}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener("click",this.onDocumentClick,{capture:!0}),window.addEventListener("pointerdown",this.onWindowPointerdown)}cleanUpGlobalEventListeners(){document.removeEventListener("click",this.onDocumentClick,{capture:!0}),window.removeEventListener("pointerdown",this.onWindowPointerdown)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach((e=>{e.close?.()}))}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}}!function(e,{focusable:t}={}){if(!1!==t&&e.addInitializer((e=>{e.addController({hostConnected(){e.hasAttribute("tabindex")||(e.tabIndex=0)}})})),!("role"in Element.prototype)){for(const t of We)e.createProperty(t,{attribute:Ye(t),reflect:!0});e.createProperty("role",{reflect:!0})}}(io,{focusable:!1}),o([z(".menu")],io.prototype,"surfaceEl",void 0),o([z("slot")],io.prototype,"slotEl",void 0),o([T()],io.prototype,"anchor",void 0),o([T()],io.prototype,"positioning",void 0),o([T({type:Boolean})],io.prototype,"quick",void 0),o([T({type:Boolean,attribute:"has-overflow"})],io.prototype,"hasOverflow",void 0),o([T({type:Boolean,reflect:!0})],io.prototype,"open",void 0),o([T({type:Number,attribute:"x-offset"})],io.prototype,"xOffset",void 0),o([T({type:Number,attribute:"y-offset"})],io.prototype,"yOffset",void 0),o([T({type:Number,attribute:"typeahead-delay"})],io.prototype,"typeaheadDelay",void 0),o([T({attribute:"anchor-corner"})],io.prototype,"anchorCorner",void 0),o([T({attribute:"menu-corner"})],io.prototype,"menuCorner",void 0),o([T({type:Boolean,attribute:"stay-open-on-outside-click"})],io.prototype,"stayOpenOnOutsideClick",void 0),o([T({type:Boolean,attribute:"stay-open-on-focusout"})],io.prototype,"stayOpenOnFocusout",void 0),o([T({type:Boolean,attribute:"skip-restore-focus"})],io.prototype,"skipRestoreFocus",void 0),o([T({attribute:"default-focus"})],io.prototype,"defaultFocus",void 0),o([R({flatten:!0})],io.prototype,"slotItems",void 0),o([I()],io.prototype,"typeaheadActive",void 0);const ro=d`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, 4px)}.menu{border-radius:var(--md-menu-container-shape, 4px);display:none;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit}.item-padding{padding-block:8px}.has-overflow .items{overflow:visible}.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}/*# sourceMappingURL=menu-styles.css.map */
|
|
182
|
+
`;let no=class extends io{};var ao;no.styles=[ro],no=o([i("md-menu")],no);const so=Symbol("value");class lo extends _e{constructor(){super(...arguments),this.quick=!1,this.required=!1,this.disabled=!1,this.errorText="",this.label="",this.supportingText="",this.error=!1,this.menuPositioning="absolute",this.typeaheadDelay=200,this.hasLeadingIcon=!1,this.displayText="",this[ao]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.customValidationMessage="",this.internals=this.attachInternals()}get value(){return this[so]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){return this.menu?.items??[]}get selectedIndex(){const[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map((([e])=>e))}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this.internals.form}get labels(){return this.internals.labels}get validity(){return this.syncValidity(),this.internals.validity}get validationMessage(){return this.syncValidity(),this.internals.validationMessage}get willValidate(){return this.syncValidity(),this.internals.willValidate}get hasError(){return this.error||this.nativeError}select(e){const t=this.options.find((t=>t.value===e));t&&this.selectItem(t)}selectIndex(e){const t=this.options[e];t&&this.selectItem(t)}reset(){for(const e of this.options)e.selected=e.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}checkValidity(){return this.syncValidity(),this.internals.checkValidity()}reportValidity(){let e;this.addEventListener("invalid",(t=>{e=t}),{once:!0});const t=this.checkValidity();if(e?.defaultPrevented)return t;const o=this.getErrorText();return this.nativeError=!t,this.nativeErrorText=this.validationMessage,o===this.getErrorText()&&this.field?.reannounceError(),t}setCustomValidity(e){this.customValidationMessage=e,this.syncValidity()}update(e){this.hasUpdated||this.initUserSelection(),super.update(e)}render(){return te`
|
|
183
|
+
<span
|
|
184
|
+
class="select ${Ee(this.getRenderClasses())}"
|
|
185
|
+
@focusout=${this.handleFocusout}>
|
|
186
|
+
${this.renderField()}
|
|
187
|
+
${this.renderMenu()}
|
|
188
|
+
</span>
|
|
189
|
+
`}updated(e){e.has("required")&&this.syncValidity()}async firstUpdated(e){await(this.menu?.updateComplete),this.lastSelectedOptionRecords.length||this.initUserSelection(),this.lastSelectedOptionRecords.length||this.options.length||setTimeout((()=>{this.updateValueAndDisplayText()})),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){return Be`
|
|
190
|
+
<${this.fieldTag}
|
|
191
|
+
aria-haspopup="listbox"
|
|
192
|
+
role="combobox"
|
|
193
|
+
part="field"
|
|
194
|
+
id="field"
|
|
195
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
196
|
+
aria-label=${this.ariaLabel||re}
|
|
197
|
+
aria-describedby="description"
|
|
198
|
+
aria-expanded=${this.open?"true":re}
|
|
199
|
+
aria-controls="listbox"
|
|
200
|
+
class="field"
|
|
201
|
+
label=${this.label}
|
|
202
|
+
.focused=${this.focused||this.open}
|
|
203
|
+
.populated=${!!this.displayText}
|
|
204
|
+
.disabled=${this.disabled}
|
|
205
|
+
.required=${this.required}
|
|
206
|
+
.error=${this.hasError}
|
|
207
|
+
?has-start=${this.hasLeadingIcon}
|
|
208
|
+
has-end
|
|
209
|
+
supporting-text=${this.supportingText}
|
|
210
|
+
error-text=${this.getErrorText()}
|
|
211
|
+
@keydown=${this.handleKeydown}
|
|
212
|
+
@click=${this.handleClick}
|
|
213
|
+
@focus=${this.handleFocus}
|
|
214
|
+
@blur=${this.handleBlur}>
|
|
215
|
+
${this.renderFieldContent()}
|
|
216
|
+
<div id="description" slot="aria-describedby"></div>
|
|
217
|
+
</${this.fieldTag}>`}renderFieldContent(){return[this.renderLeadingIcon(),this.renderLabel(),this.renderTrailingIcon()]}renderLeadingIcon(){return te`
|
|
218
|
+
<span class="icon leading" slot="start">
|
|
219
|
+
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
220
|
+
</span>
|
|
221
|
+
`}renderTrailingIcon(){return te`
|
|
222
|
+
<span class="icon trailing" slot="end">
|
|
223
|
+
<slot name="trailing-icon" @slotchange=${this.handleIconChange}>
|
|
224
|
+
<svg height="5" viewBox="7 10 10 5" focusable="false">
|
|
225
|
+
<polygon class="down" stroke="none" fill-rule="evenodd" points="7 10 12 15 17 10"></polygon>
|
|
226
|
+
<polygon class="up" stroke="none" fill-rule="evenodd" points="7 15 12 10 17 15"></polygon>
|
|
227
|
+
</svg>
|
|
228
|
+
</slot>
|
|
229
|
+
</span>
|
|
230
|
+
`}renderLabel(){return te`<div id="label">${this.displayText||te` `}</div>`}renderMenu(){const e=this.label||this.ariaLabel;return te`
|
|
231
|
+
<md-menu
|
|
232
|
+
id="listbox"
|
|
233
|
+
default-focus="none"
|
|
234
|
+
role="listbox"
|
|
235
|
+
tabindex="-1"
|
|
236
|
+
aria-label=${e||re}
|
|
237
|
+
stay-open-on-focusout
|
|
238
|
+
part="menu"
|
|
239
|
+
exportparts="focus-ring: menu-focus-ring"
|
|
240
|
+
anchor="field"
|
|
241
|
+
.open=${this.open}
|
|
242
|
+
.quick=${this.quick}
|
|
243
|
+
.positioning=${this.menuPositioning}
|
|
244
|
+
.typeaheadDelay=${this.typeaheadDelay}
|
|
245
|
+
@opening=${this.handleOpening}
|
|
246
|
+
@opened=${this.redispatchEvent}
|
|
247
|
+
@closing=${this.redispatchEvent}
|
|
248
|
+
@closed=${this.handleClosed}
|
|
249
|
+
@close-menu=${this.handleCloseMenu}
|
|
250
|
+
@request-selection=${this.handleRequestSelection}
|
|
251
|
+
@request-deselection=${this.handleRequestDeselection}>
|
|
252
|
+
${this.renderMenuContent()}
|
|
253
|
+
</md-menu>`}renderMenuContent(){return te`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,o="Space"===e.code||"ArrowDown"===e.code||"Enter"===e.code;if(!t.isTypingAhead&&o)return e.preventDefault(),void(this.open=!0);if(1===e.key.length){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:o}=t;if(!o)return;this.labelEl?.setAttribute?.("aria-live","polite"),this.selectItem(o[1])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!0}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&Xt(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=function(e){const t=[];for(let o=0;o<e.length;o++){const i=e[o];i.selected&&t.push([i,o])}return t}(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await(this.menu?.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[o]=e[0];t=this.lastSelectedOption!==o,this.lastSelectedOption=o,this[so]=o.value,this.displayText=o.displayText}else t=null!==this.lastSelectedOption,this.lastSelectedOption=null,this[so]="",this.displayText="";return this.internals.setFormValue(this.value),this.syncValidity(),t}async handleOpening(e){this.labelEl?.removeAttribute?.("aria-live"),this.redispatchEvent(e);const t=this.menu.items,o=Lt(t)?.item;let[i]=this.lastSelectedOptionRecords[0]??[null];o&&o!==i&&(o.tabIndex=-1),i=i??t[0],i&&(i.tabIndex=0,i.focus())}redispatchEvent(e){Xe(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,o=e.detail.itemPath[0];this.open=!1;let i=!1;var r;"click-selection"===t.kind||"keydown"===t.kind&&(r=t.key,Object.values(Wt).some((e=>e===r)))?i=this.selectItem(o):(o.tabIndex=-1,o.blur()),i&&this.dispatchInteractionEvents()}selectItem(e){return this.lastSelectedOptionRecords.forEach((([t])=>{e!==t&&(t.selected=!1)})),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some((([e])=>e===t))||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some((([e])=>e===t))&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):null===this.lastUserSetSelectedIndex||this.lastSelectedOptionRecords.length?this.updateValueAndDisplayText():this.selectIndex(this.lastUserSetSelectedIndex)}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}syncValidity(){const e=this.required&&!this.value,t=!!this.customValidationMessage,o=this.customValidationMessage||e&&this.getRequiredValidationMessage()||"";this.internals.setValidity({valueMissing:e,customError:t},o)}getRequiredValidationMessage(){const e=document.createElement("select");return e.required=!0,e.validationMessage}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}}ao=so,Je(lo),lo.formAssociated=!0,o([T({type:Boolean})],lo.prototype,"quick",void 0),o([T({type:Boolean})],lo.prototype,"required",void 0),o([T({type:Boolean,reflect:!0})],lo.prototype,"disabled",void 0),o([T({type:String,attribute:"error-text"})],lo.prototype,"errorText",void 0),o([T()],lo.prototype,"label",void 0),o([T({type:String,attribute:"supporting-text"})],lo.prototype,"supportingText",void 0),o([T({type:Boolean,reflect:!0})],lo.prototype,"error",void 0),o([T({attribute:"menu-positioning"})],lo.prototype,"menuPositioning",void 0),o([T({type:Number,attribute:"typeahead-delay"})],lo.prototype,"typeaheadDelay",void 0),o([T({type:Boolean,attribute:"has-leading-icon"})],lo.prototype,"hasLeadingIcon",void 0),o([T({attribute:"display-text"})],lo.prototype,"displayText",void 0),o([T()],lo.prototype,"value",null),o([T({type:Number,attribute:"selected-index"})],lo.prototype,"selectedIndex",null),o([I()],lo.prototype,"nativeError",void 0),o([I()],lo.prototype,"nativeErrorText",void 0),o([I()],lo.prototype,"focused",void 0),o([I()],lo.prototype,"open",void 0),o([z(".field")],lo.prototype,"field",void 0),o([z("md-menu")],lo.prototype,"menu",void 0),o([z("#label")],lo.prototype,"labelEl",void 0),o([R({slot:"leading-icon",flatten:!0})],lo.prototype,"leadingIcons",void 0);class co extends lo{constructor(){super(...arguments),this.fieldTag=Me`md-outlined-field`}}const uo=d`:host{--_text-field-container-shape: var(--md-outlined-select-text-field-container-shape, 4px);--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var( --md-outlined-select-text-field-container-shape-start-start, var(--_text-field-container-shape) );--_text-field-container-shape-start-end: var( --md-outlined-select-text-field-container-shape-start-end, var(--_text-field-container-shape) );--_text-field-container-shape-end-end: var( --md-outlined-select-text-field-container-shape-end-end, var(--_text-field-container-shape) );--_text-field-container-shape-end-start: var( --md-outlined-select-text-field-container-shape-end-start, var(--_text-field-container-shape) );--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}/*# sourceMappingURL=outlined-select-styles.css.map */
|
|
254
|
+
`,ho=d`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}/*# sourceMappingURL=shared-styles.css.map */
|
|
255
|
+
`;let po=class extends co{};po.styles=[ho,uo,Ot],po=o([i("md-outlined-select")],po);const vo=d`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}/*# sourceMappingURL=menu-item-styles.css.map */
|
|
256
|
+
`;class fo extends _e{constructor(){super(...arguments),this.multiline=!1}render(){return te`
|
|
257
|
+
<slot name="container"></slot>
|
|
258
|
+
<slot class="non-text" name="start"></slot>
|
|
259
|
+
<div class="text">
|
|
260
|
+
<slot name="overline"
|
|
261
|
+
@slotchange=${this.handleTextSlotChange}></slot>
|
|
262
|
+
<slot class="default-slot"
|
|
263
|
+
@slotchange=${this.handleTextSlotChange}></slot>
|
|
264
|
+
<slot name="headline"
|
|
265
|
+
@slotchange=${this.handleTextSlotChange}></slot>
|
|
266
|
+
<slot name="supporting-text"
|
|
267
|
+
@slotchange=${this.handleTextSlotChange}></slot>
|
|
268
|
+
</div>
|
|
269
|
+
<slot class="non-text" name="trailing-supporting-text"></slot>
|
|
270
|
+
<slot class="non-text" name="end"></slot>
|
|
271
|
+
`}handleTextSlotChange(){let e=!1,t=0;for(const o of this.textSlots)if(mo(o)&&(t+=1),t>1){e=!0;break}this.multiline=e}}function mo(e){for(const t of e.assignedNodes({flatten:!0})){const e=t.nodeType===Node.ELEMENT_NODE,o=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\S/);if(e||o)return!0}return!1}o([T({type:Boolean,reflect:!0})],fo.prototype,"multiline",void 0),o([(e,t)=>S(e,t,{get(){return(this.renderRoot??(O??=document.createDocumentFragment())).querySelectorAll(".text slot")}})],fo.prototype,"textSlots",void 0);const bo=d`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}/*# sourceMappingURL=item-styles.css.map */
|
|
272
|
+
`;let go=class extends fo{};go.styles=[bo],go=o([i("md-item")],go);class yo{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Kt(this.host,{kind:"click-selection"}))},this.onKeydown=e=>{if(this.host.href&&"Enter"===e.code){const e=this.getInteractiveElement();e instanceof HTMLAnchorElement&&e.click()}if(this.host.keepOpen||e.defaultPrevented)return;const t=e.code;!e.defaultPrevented&&Jt(t)&&(e.preventDefault(),this.host.dispatchEvent(Kt(this.host,{kind:"keydown",key:t})))};const{getHeadlineElements:o,getInteractiveElement:i}=t;this.getHeadlineElements=o,this.getInteractiveElement=i,this.host.addController(this)}get typeaheadText(){if(null!==this.internalTypeaheadText)return this.internalTypeaheadText;const e=this.getHeadlineElements(),t=[];return e.forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),t.join(" ")}get tagName(){switch(this.host.type){case"link":return"a";case"button":return"button";default:return"li"}}get role(){return"option"===this.host.type?"option":"menuitem"}hostConnected(){this.host.toggleAttribute("md-menu-item",!0)}hostUpdate(){this.host.href&&(this.host.type="link")}setTypeaheadText(e){this.internalTypeaheadText=e}}class xo{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){if(null!==this.internalDisplayText)return this.internalDisplayText;const e=this.getHeadlineElements(),t=[];return e.forEach((e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())})),t.join(" ")}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.lastSelected=this.host.selected,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=e=>{this.menuItemController.onKeydown(e)},this.menuItemController=new yo(e,t),this.getHeadlineElements=t.getHeadlineElements,e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?"true":"false")}hostUpdated(){this.lastSelected===this.host.selected||this.firstUpdate||(this.host.selected?this.host.dispatchEvent(new Event("request-selection",{bubbles:!0,composed:!0})):this.host.dispatchEvent(new Event("request-deselection",{bubbles:!0,composed:!0}))),this.lastSelected=this.host.selected,this.firstUpdate=!1}}class _o extends _e{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value="",this.type="option",this.selectOptionController=new xo(this,{getHeadlineElements:()=>this.headlineElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(te`
|
|
273
|
+
<md-item>
|
|
274
|
+
<div slot="container">
|
|
275
|
+
${this.renderRipple()}
|
|
276
|
+
${this.renderFocusRing()}
|
|
277
|
+
</div>
|
|
278
|
+
<slot name="start" slot="start"></slot>
|
|
279
|
+
<slot name="end" slot="end"></slot>
|
|
280
|
+
${this.renderBody()}
|
|
281
|
+
</md-item>
|
|
282
|
+
`)}renderListItem(e){return te`
|
|
283
|
+
<li
|
|
284
|
+
id="item"
|
|
285
|
+
tabindex=${this.disabled?-1:0}
|
|
286
|
+
role=${this.selectOptionController.role}
|
|
287
|
+
aria-label=${this.ariaLabel||re}
|
|
288
|
+
aria-selected=${this.ariaSelected||re}
|
|
289
|
+
aria-checked=${this.ariaChecked||re}
|
|
290
|
+
aria-expanded=${this.ariaExpanded||re}
|
|
291
|
+
aria-haspopup=${this.ariaHasPopup||re}
|
|
292
|
+
class="list-item ${Ee(this.getRenderClasses())}"
|
|
293
|
+
@click=${this.selectOptionController.onClick}
|
|
294
|
+
@keydown=${this.selectOptionController.onKeydown}
|
|
295
|
+
>${e}</li>
|
|
296
|
+
`}renderRipple(){return te`
|
|
297
|
+
<md-ripple
|
|
298
|
+
part="ripple"
|
|
299
|
+
for="item"
|
|
300
|
+
?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return te`
|
|
301
|
+
<md-focus-ring
|
|
302
|
+
part="focus-ring"
|
|
303
|
+
for="item"
|
|
304
|
+
inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return te`
|
|
305
|
+
<slot></slot>
|
|
306
|
+
<slot name="overline" slot="overline"></slot>
|
|
307
|
+
<slot name="headline" slot="headline"></slot>
|
|
308
|
+
<slot name="supporting-text" slot="supporting-text"></slot>
|
|
309
|
+
<slot name="trailing-supporting-text"
|
|
310
|
+
slot="trailing-supporting-text"></slot>
|
|
311
|
+
`}focus(){this.listItemRoot?.focus()}}Je(_o),_o.shadowRootOptions={..._e.shadowRootOptions,delegatesFocus:!0},o([T({type:Boolean,reflect:!0})],_o.prototype,"disabled",void 0),o([T({type:Boolean,attribute:"md-menu-item",reflect:!0})],_o.prototype,"isMenuItem",void 0),o([T({type:Boolean})],_o.prototype,"selected",void 0),o([T()],_o.prototype,"value",void 0),o([z(".list-item")],_o.prototype,"listItemRoot",void 0),o([R({slot:"headline"})],_o.prototype,"headlineElements",void 0),o([T({attribute:"typeahead-text"})],_o.prototype,"typeaheadText",null),o([T({attribute:"display-text"})],_o.prototype,"displayText",null);let wo=class extends _o{};wo.styles=[vo],wo=o([i("md-select-option")],wo);class $o extends _e{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this.internals.form}get labels(){return this.internals.labels}get validity(){return this.syncValidity(),this.internals.validity}get validationMessage(){return this.syncValidity(),this.internals.validationMessage}get willValidate(){return this.syncValidity(),this.internals.willValidate}constructor(){super(),this.checked=!1,this.disabled=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.hasCustomValidityError=!1,this.internals=this.attachInternals(),this.addEventListener("click",(e=>{Qe(e)&&(this.focus(),Ze(this.input))}))}checkValidity(){return this.syncValidity(),this.internals.checkValidity()}reportValidity(){return this.syncValidity(),this.internals.reportValidity()}setCustomValidity(e){this.hasCustomValidityError=!!e,this.internals.setValidity({customError:!!e},e,this.getInput())}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate);const t=this.checked&&!this.indeterminate,o=String(this.checked);this.internals.setFormValue(t?this.value:null,o),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,o=this.prevIndeterminate,i=this.checked&&!this.indeterminate,r=this.indeterminate,n=Ee({disabled:this.disabled,selected:i||r,unselected:!i&&!r,checked:i,indeterminate:r,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":o,"prev-disabled":this.prevDisabled}),{ariaLabel:a,ariaInvalid:s}=this;return te`
|
|
312
|
+
<div class="container ${n}">
|
|
313
|
+
<input type="checkbox"
|
|
314
|
+
id="input"
|
|
315
|
+
aria-checked=${r?"mixed":re}
|
|
316
|
+
aria-label=${a||re}
|
|
317
|
+
aria-invalid=${s||re}
|
|
318
|
+
?disabled=${this.disabled}
|
|
319
|
+
?required=${this.required}
|
|
320
|
+
.indeterminate=${this.indeterminate}
|
|
321
|
+
.checked=${this.checked}
|
|
322
|
+
@change=${this.handleChange}
|
|
323
|
+
>
|
|
324
|
+
|
|
325
|
+
<div class="outline"></div>
|
|
326
|
+
<div class="background"></div>
|
|
327
|
+
<md-focus-ring part="focus-ring" for="input"></md-focus-ring>
|
|
328
|
+
<md-ripple for="input" ?disabled=${this.disabled}></md-ripple>
|
|
329
|
+
<svg class="icon" viewBox="0 0 18 18" aria-hidden="true">
|
|
330
|
+
<rect class="mark short" />
|
|
331
|
+
<rect class="mark long" />
|
|
332
|
+
</svg>
|
|
333
|
+
</div>
|
|
334
|
+
`}updated(){this.syncValidity()}handleChange(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate,Xe(this,e)}syncValidity(){const e=this.getInput();this.hasCustomValidityError?e.setCustomValidity(this.internals.validationMessage):e.setCustomValidity(""),this.internals.setValidity(e.validity,e.validationMessage,this.getInput())}getInput(){return this.input||(this.connectedCallback(),this.performUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.input}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked="true"===e}}Je($o),$o.shadowRootOptions={..._e.shadowRootOptions,delegatesFocus:!0},$o.formAssociated=!0,o([T({type:Boolean})],$o.prototype,"checked",void 0),o([T({type:Boolean,reflect:!0})],$o.prototype,"disabled",void 0),o([T({type:Boolean})],$o.prototype,"indeterminate",void 0),o([T({type:Boolean})],$o.prototype,"required",void 0),o([T()],$o.prototype,"value",void 0),o([I()],$o.prototype,"prevChecked",void 0),o([I()],$o.prototype,"prevDisabled",void 0),o([I()],$o.prototype,"prevIndeterminate",void 0),o([z("input")],$o.prototype,"input",void 0);const Co=d`:host{--_container-shape: var(--md-checkbox-container-shape, 2px);--_container-size: var(--md-checkbox-container-size, 18px);--_icon-size: var(--md-checkbox-icon-size, 18px);--_selected-container-color: var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4));--_selected-disabled-container-color: var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_selected-disabled-container-opacity: var(--md-checkbox-selected-disabled-container-opacity, 0.38);--_selected-disabled-icon-color: var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff));--_selected-focus-container-color: var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4));--_selected-focus-icon-color: var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_selected-hover-container-color: var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_selected-hover-state-layer-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_selected-pressed-container-color: var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_selected-pressed-state-layer-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_selected-pressed-state-layer-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12);--_state-layer-shape: var(--md-checkbox-state-layer-shape, 9999px);--_state-layer-size: var(--md-checkbox-state-layer-size, 40px);--_disabled-container-opacity: var(--md-checkbox-disabled-container-opacity, 0.38);--_disabled-outline-color: var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-width: var(--md-checkbox-disabled-outline-width, 2px);--_focus-outline-color: var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-outline-width: var(--md-checkbox-focus-outline-width, 2px);--_hover-outline-color: var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-checkbox-hover-outline-width, 2px);--_hover-state-layer-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--_outline-color: var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-width: var(--md-checkbox-outline-width, 2px);--_pressed-outline-color: var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-outline-width: var(--md-checkbox-pressed-outline-width, 2px);--_pressed-state-layer-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: var( --md-checkbox-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-checkbox-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-checkbox-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-checkbox-container-shape-end-start, var(--_container-shape) );border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:inline-flex;height:var(--_container-size);position:relative;vertical-align:top;width:var(--_container-size);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-size))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--_outline-color);border-style:solid;border-width:var(--_outline-width);box-sizing:border-box}.background{background-color:var(--_selected-container-color)}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--_state-layer-shape);height:var(--_state-layer-size);inset:unset;width:var(--_state-layer-size);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.selected md-ripple{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}.icon{fill:var(--_selected-icon-color);height:var(--_icon-size);width:var(--_icon-size)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--_hover-outline-color);border-width:var(--_hover-outline-width)}:where(:hover) .background{background:var(--_selected-hover-container-color)}:where(:hover) .icon{fill:var(--_selected-hover-icon-color)}:where(:focus-within) .outline{border-color:var(--_focus-outline-color);border-width:var(--_focus-outline-width)}:where(:focus-within) .background{background:var(--_selected-focus-container-color)}:where(:focus-within) .icon{fill:var(--_selected-focus-icon-color)}:where(:active) .outline{border-color:var(--_pressed-outline-color);border-width:var(--_pressed-outline-width)}:where(:active) .background{background:var(--_selected-pressed-container-color)}:where(:active) .icon{fill:var(--_selected-pressed-icon-color)}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);border-width:var(--_disabled-outline-width);opacity:var(--_disabled-container-opacity)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--_selected-disabled-container-color);opacity:var(--_selected-disabled-container-opacity)}:where(.disabled) .icon{fill:var(--_selected-disabled-icon-color)}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}/*# sourceMappingURL=checkbox-styles.css.map */
|
|
335
|
+
`;let Eo=class extends $o{};Eo.styles=[Co],Eo=o([i("md-checkbox")],Eo);const Ao="http://www.w3.org/1999/02/22-rdf-syntax-ns#",ko="http://www.w3.org/2001/XMLSchema#",To="http://www.w3.org/2000/10/swap/",Io={xsd:{decimal:`${ko}decimal`,boolean:`${ko}boolean`,double:`${ko}double`,integer:`${ko}integer`,string:`${ko}string`},rdf:{type:`${Ao}type`,nil:`${Ao}nil`,first:`${Ao}first`,rest:`${Ao}rest`,langString:`${Ao}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${To}reify#forSome`,forAll:`${To}reify#forAll`},log:{implies:`${To}log#implies`}},{rdf:So,xsd:zo}=Io;let Oo,Ro=0;const Po={namedNode:function(e){return new Mo(e)},blankNode:function(e){return new Uo(e||"n3-"+Ro++)},variable:function(e){return new Bo(e)},literal:function(e,t){if("string"==typeof t)return new No(`"${e}"@${t.toLowerCase()}`);let o=t?t.value:"";return""===o&&("boolean"==typeof e?o=zo.boolean:"number"==typeof e&&(Number.isFinite(e)?o=Number.isInteger(e)?zo.integer:zo.double:(o=zo.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===o||o===zo.string?new No(`"${e}"`):new No(`"${e}"^^${o}`)},defaultGraph:function(){return Oo},quad:Vo,triple:Vo};class Lo{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof Lo?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class Mo extends Lo{get termType(){return"NamedNode"}}class No extends Lo{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return t<e.length&&"@"===e[t++]?e.substr(t).toLowerCase():""}get datatype(){return new Mo(this.datatypeString)}get datatypeString(){const e=this.id,t=e.lastIndexOf('"')+1,o=t<e.length?e[t]:"";return"^"===o?e.substr(t+2):"@"!==o?zo.string:So.langString}equals(e){return e instanceof No?this.id===e.id:!!e&&!!e.datatype&&this.termType===e.termType&&this.value===e.value&&this.language===e.language&&this.datatype.value===e.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class Uo extends Lo{constructor(e){super(`_:${e}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class Bo extends Lo{constructor(e){super(`?${e}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}Oo=new class extends Lo{constructor(){return super(""),Oo||this}get termType(){return"DefaultGraph"}equals(e){return this===e||!!e&&this.termType===e.termType}};class Do extends Lo{constructor(e,t,o,i){super(""),this._subject=e,this._predicate=t,this._object=o,this._graph=i||Oo}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(e){return!!e&&this._subject.equals(e.subject)&&this._predicate.equals(e.predicate)&&this._object.equals(e.object)&&this._graph.equals(e.graph)}}function Vo(e,t,o,i){return new Do(e,t,o,i)}const Fo="http://www.w3.org/ns/shacl#",qo="http://www.w3.org/2001/XMLSchema#",Ho="http://www.w3.org/2000/01/rdf-schema#",jo="http://www.w3.org/2004/02/skos/core#",Go="http://www.w3.org/2002/07/owl#",Ko=Po.namedNode("shapes");function Wo(e,t,o=Fo,i){let r="";const n=function(e,t,o=Fo,i){let r;const n=o+t;for(const t of e)if(t.predicate.value===n){if(!i)return t.object;if(t.object.id.endsWith(`@${i}`))return t.object;t.object.id.indexOf("@")<0?r=t.object:r||(r=t.object)}return r}(e,t,o,i);return n&&(r=n.value),r}Po.namedNode(Go+"imports"),Po.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),Po.namedNode(Ho+"subClassOf"),Po.namedNode(jo+"broader"),Po.namedNode(Go+"NamedIndividual"),Po.namedNode(Fo+"NodeShape"),Po.namedNode(Fo+"class"),Po.namedNode(Fo+"targetClass");class Yo{constructor(e){let t=":host { padding-left: 1em; box-sizing: border-box; display:block; --label-width: 8em; }\n:host *, :host ::after, :host ::before { box-sizing: inherit; }\nshacl-node, :host .shacl-group { display: flex; flex-direction: column; width: 100%; position: relative; }\nshacl-node .control-button { cursor: pointer; }\nshacl-node .control-button:not(:hover) { border-color: transparent; background: 0; }\nshacl-node .remove-button { margin-left: 4px; }\nshacl-node .add-button { font-size: 0.7rem; color: #555; margin-right: 24px; text-decoration:none; padding: 6px 0; }\nshacl-node .add-button:before { content: '+'; margin-right: 0.2em; }\nshacl-node .add-button:hover { color: inherit; }\nshacl-node h1 { font-size: 1.1rem; border-bottom: 1px solid; margin-top: 4px; color: #555; }\nshacl-property { display: flex; flex-direction: column; align-items: end; position: relative; }\nshacl-property:not(.may-add) > .add-button { display: none; }\nshacl-property:not(.may-remove) > .property-instance > .remove-button:not(.persistent) { visibility: hidden; }\nshacl-property:not(.may-remove) > .shacl-or-constraint > .remove-button:not(.persistent) { visibility: hidden; }\n:host .shacl-group { margin-bottom: 1em; padding-bottom: 1em; }\n:host .property-instance, :host .shacl-or-constraint { display: flex; align-items: flex-start; padding: 4px 0; width: 100%; position: relative; }\n:host .shacl-or-constraint label { display: inline-block; word-break: break-word; width: var(--label-width); line-height: 1em; padding-top: 0.15em; padding-right: 1em; flex-shrink: 0; position: relative; }\n:host .property-instance label[title] { cursor: help; text-decoration: underline dashed #AAA; }\n:host .mode-edit .property-instance label.required::before { color: red; content: '\\2736'; font-size: 0.6rem; position: absolute; left: -1.4em; top: 0.15rem; }\n:host .property-instance.valid::before { position: absolute; left: calc(var(--label-width) - 1em); top: 6px; color: green; content: '\\2713'; }\n:host .editor:not([type='checkbox']), :host .shacl-or-constraint select { flex-grow: 1; }\n:host .shacl-or-constraint select { border: 1px solid #DDD; padding: 2px 4px; }\n:host textarea.editor { resize: vertical; }\n:host .lang-chooser { position: absolute; top: 5px; right: 24px; border: 0; background-color: #e9e9ed; padding: 2px 4px; max-width: 40px; width: 40px; box-sizing: content-box; }\n:host .lang-chooser+.editor { padding-right: 55px; }\n:host .validation-error { position: absolute; left: calc(var(--label-width) - 1em); top: 6px; color: red; cursor: help; }\n:host .validation-error::before { content: '\\26a0' }\n:host .validation-error.node { left: -1em; }\n:host .invalid > .editor { border-color: red !important; }\n:host .ml-0 { margin-left: 0 !important; }\n:host .pr-0 { padding-right: 0 !important; }\n:host .mode-view .property-instance:not(:first-child) > label { visibility: hidden; }\n\n.lang { opacity: 0.65; font-size: 0.6em; }\na, a:visited { color: inherit; }\n\n.collapsible > .activator { cursor: pointer; width: 100%; padding: 8px 0; border: 0; }\n.collapsible > .activator:hover, .collapsible.open > .activator { background-color: #F5F5F5; }\n.collapsible > .activator::after { content: '\\25BC'; float: right; margin: 0 5px; font-size: 14px; }\n.collapsible.open > .activator::after { content: '\\25B2'; }\n/* .collapsible > *:not(.activator) { overflow: hidden; } */\n.collapsible:not(.open) > *:not(.activator) { display: none; }\n.collapsible shacl-node > h1 { display: none; }\n.collapsible.open > .property-instance:nth-child(odd) { background-color: #F5F5F5; }";e&&(t+="\n"+e),this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t)}apply(e){}createViewer(e,t,o){const i=document.createElement("div"),r=document.createElement("label");r.innerHTML=e,o.description&&r.setAttribute("title",o.description.value),i.appendChild(r);let n,a=t.value;if(t instanceof Mo){const e=o.config.shapesGraph.getQuads(a,null,null,Ko);if(e.length){const t=function(e,t){return Wo(e,"prefLabel",jo,t)||Wo(e,"label",Ho,t)}(e,o.config.attributes.language);t&&(a=t)}}else t instanceof No&&(t.language?a+='<span class="lang">@'+t.language+"</span>":t.datatype.value===`${qo}date`?a=new Date(Date.parse(t.value)).toDateString():t.datatype.value===`${qo}dateTime`&&(a=new Date(Date.parse(t.value)).toLocaleString()));return function(e){let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}(t.value)?(n=document.createElement("a"),n.setAttribute("href",t.value)):n=document.createElement("div"),n.innerHTML=a,i.appendChild(n),i}}class Jo extends Yo{constructor(){super(":host {\n /* Generated from Material Theme Builder Figma plugin\n or `material-color-utilities`. */\n --md-sys-color-primary: #006A6A;\n --md-sys-color-on-primary: #FFFFFF;\n --md-sys-color-primary-container: #6FF7F6;\n --md-sys-color-on-primary-container: #002020;\n /* ... */\n}\n:host form.mode-edit { --label-width: 0em; }\n:host .property-instance { margin-top:24px; }")}createDefaultTemplate(e,t,o,i,r){var n;i.classList.add("editor"),(null==r?void 0:r.datatype)&&(i["shacl-datatype"]=r.datatype),void 0!==(null==r?void 0:r.minCount)&&(i.dataset.minCount=String(r.minCount)),(null==r?void 0:r.class)&&(i.dataset.class=r.class.value),(null==r?void 0:r.nodeKind)&&(i.dataset.nodeKind=r.nodeKind.value),i.value=(null==t?void 0:t.value)||(null===(n=null==r?void 0:r.defaultValue)||void 0===n?void 0:n.value)||"";const a=(null==r?void 0:r.description)?r.description.value:(null==r?void 0:r.pattern)?r.pattern:null;a&&i.setAttribute("placeholder",a),o&&i.setAttribute("required","true");const s=document.createElement("div");return s.appendChild(i),s}createTextEditor(e,t,o,i){var r;const n=new rt;return n.label=e,n.supportingText=(null===(r=i.description)||void 0===r?void 0:r.value)||"",this.createDefaultTemplate(e,t,o,n,i)}createNumberEditor(e,t,o,i){var r;const n=new rt;return n.type="number",n.label=e,n.supportingText=(null===(r=i.description)||void 0===r?void 0:r.value)||"",this.createDefaultTemplate(e,t,o,n,i)}createListEditor(e,t,o,i,r){var n;const a=new po;a.supportingText=(null===(n=null==r?void 0:r.description)||void 0===n?void 0:n.value)||(null==r?void 0:r.label)||"";const s=this.createDefaultTemplate(e,null,o,a,r);let l=!0;for(const e of i){const o=new wo,i="string"==typeof e.value?e.value:e.value.value,r=e.label?e.label:i;if(o.value=i,t&&t.value===i&&(o.selected=!0),""===i&&(l=!1,o.ariaLabel="blank"),r){const e=document.createElement("div");e.innerText=r,e.slot="headline",o.appendChild(e)}a.appendChild(o)}if(l){const e=new wo;e.ariaLabel="blank",a.prepend(e)}return t&&(a.value=t.value),s}createBooleanEditor(e,t,o,i){const r=new Eo,n=this.createDefaultTemplate(e,t,o,r,i);return r.removeAttribute("required"),t instanceof No&&(r.checked="true"===t.value),n}createDateEditor(e,t,o,i){return this.createTextEditor(e,t,o,i)}createLangStringEditor(e,t,o,i){return this.createTextEditor(e,t,o,i)}createButton(e,t){let o;return t?(o=new Tt,o.classList.add("primary")):(o=new zt,o.classList.add("secondary")),o.innerHTML=e,o}}var Xo=t.F;export{Xo as MaterialTheme};
|