tasmota-esp-web-tools
Version:
Web tools for ESP devices
57 lines (56 loc) • 276 kB
JavaScript
import{e,i as t,_ as i,n as r,m as o,a as s,b as a,r as l,c as n,d,f as c,g as h,A as p,h as u,j as f,k as g,s as m,o as v,D as b,E as y,t as _,l as x,p as w,q as k,u as S,v as $,w as C,x as R,y as E,z as I}from"./styles-D4zXLz1s.js";import{C as T,a as F,b as L,c as O,d as A,e as z,f as P,g as B,h as D,i as U,j as M,k as W}from"./install-button.js";let H;const V=Symbol("createValidator"),N=Symbol("getValidityAnchor"),q=Symbol("privateValidator"),G=Symbol("privateSyncValidity"),j=Symbol("privateCustomValidationMessage");function K(e){var i;class r extends e{constructor(){super(...arguments),this[i]=""}get validity(){return this[G](),this[t].validity}get validationMessage(){return this[G](),this[t].validationMessage}get willValidate(){return this[G](),this[t].willValidate}checkValidity(){return this[G](),this[t].checkValidity()}reportValidity(){return this[G](),this[t].reportValidity()}setCustomValidity(e){this[j]=e,this[G]()}requestUpdate(e,t,i){super.requestUpdate(e,t,i),this[G]()}firstUpdated(e){super.firstUpdated(e),this[G]()}[(i=j,G)](){this[q]||(this[q]=this[V]());const{validity:e,validationMessage:i}=this[q].getValidity(),r=!!this[j],o=this[j]||i;this[t].setValidity({...e,customError:r},o,this[N]()??void 0)}[V](){throw new Error("Implement [createValidator]")}[N](){throw new Error("Implement [getValidityAnchor]")}}return r}const J=Symbol("getFormValue"),Z=Symbol("getFormState");function Y(e){class o extends e{get form(){return this[t].form}get labels(){return this[t].labels}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get disabled(){return this.hasAttribute("disabled")}set disabled(e){this.toggleAttribute("disabled",e)}attributeChangedCallback(e,t,i){if("name"===e||"disabled"===e){const i="disabled"===e?null!==t:t;return void this.requestUpdate(e,i)}super.attributeChangedCallback(e,t,i)}requestUpdate(e,i,r){super.requestUpdate(e,i,r),this[t].setFormValue(this[J](),this[Z]())}[J](){throw new Error("Implement [getFormValue]")}[Z](){return this[J]()}formDisabledCallback(e){this.disabled=e}}return o.formAssociated=!0,i([r({noAccessor:!0})],o.prototype,"name",null),i([r({type:Boolean,noAccessor:!0})],o.prototype,"disabled",null),o}class X{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:t,validationMessage:i}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:i,validity:{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing}},this.currentValidity}}class Q extends X{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}const ee=o(K(Y(s(a))));class te extends ee{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",e=>{d(e)&&this.input&&(this.focus(),c(this.input))})}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),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,i=this.prevIndeterminate,r=this.checked&&!this.indeterminate,o=this.indeterminate,s=h({disabled:this.disabled,selected:r||o,unselected:!r&&!o,checked:r,indeterminate:o,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":i,"prev-disabled":this.prevDisabled}),{ariaLabel:a,ariaInvalid:l}=this;return u`
<div class="container ${s}">
<input
type="checkbox"
id="input"
aria-checked=${o?"mixed":p}
aria-label=${a||p}
aria-invalid=${l||p}
?disabled=${this.disabled}
?required=${this.required}
.indeterminate=${this.indeterminate}
.checked=${this.checked}
@input=${this.handleInput}
@change=${this.handleChange} />
<div class="outline"></div>
<div class="background"></div>
<md-focus-ring part="focus-ring" for="input"></md-focus-ring>
<md-ripple for="input" ?disabled=${this.disabled}></md-ripple>
<svg class="icon" viewBox="0 0 18 18" aria-hidden="true">
<rect class="mark short" />
<rect class="mark long" />
</svg>
</div>
`}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){f(this,e)}[J](){return!this.checked||this.indeterminate?null:this.value}[Z](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked="true"===e}[V](){return new Q(()=>this)}[N](){return this.input}}te.shadowRootOptions={...a.shadowRootOptions,delegatesFocus:!0},i([r({type:Boolean})],te.prototype,"checked",void 0),i([r({type:Boolean})],te.prototype,"indeterminate",void 0),i([r({type:Boolean})],te.prototype,"required",void 0),i([r()],te.prototype,"value",void 0),i([l()],te.prototype,"prevChecked",void 0),i([l()],te.prototype,"prevDisabled",void 0),i([l()],te.prototype,"prevIndeterminate",void 0),i([n("input")],te.prototype,"input",void 0);const ie=g`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/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(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.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(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.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(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@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}}
`;class re extends te{}re.styles=[ie],customElements.define("ew-checkbox",re);const oe=(()=>{const e=[];e[0]="rgb(0,0,0)",e[1]="rgb(128,0,0)",e[2]="rgb(0,128,0)",e[3]="rgb(128,128,0)",e[4]="rgb(0,0,128)",e[5]="rgb(128,0,128)",e[6]="rgb(0,128,128)",e[7]="rgb(192,192,192)",e[8]="rgb(128,128,128)",e[9]="rgb(255,0,0)",e[10]="rgb(0,255,0)",e[11]="rgb(255,255,0)",e[12]="rgb(99,153,255)",e[13]="rgb(255,0,255)",e[14]="rgb(0,255,255)",e[15]="rgb(255,255,255)";for(let t=0;t<216;t++){const i=Math.floor(t/36),r=Math.floor(t%36/6),o=t%6;e[16+t]="rgb("+(i?40*i+55:0)+","+(r?40*r+55:0)+","+(o?40*o+55:0)+")"}for(let t=0;t<24;t++){const i=10*t+8;e[232+t]="rgb("+i+","+i+","+i+")"}return e})(),se=["black","red","green","yellow","blue","magenta","cyan","white"];class ae{constructor(e){this.targetElement=e,this.state={bold:!1,italic:!1,underline:!1,strikethrough:!1,foregroundColor:null,backgroundColor:null,fgRgb:null,bgRgb:null,dim:!1,reverse:!1,carriageReturn:!1,lines:[],secret:!1,blink:!1,rapidBlink:!1},this._destroyed=!1,this._rafId=0,this._timeoutId=0,this._atBottom=!0,this._sentinel=null,this._exportLines=[],this._redactedLines=[],this._visibilityHandler=null;const t=document.createElement("div");t.style.height="1px",this._sentinel=t,e.appendChild(t),this._intersectionObserver=new IntersectionObserver(e=>{this._atBottom=e[0].isIntersecting},{root:e,threshold:0}),this._intersectionObserver.observe(t),this._visibilityHandler=()=>{document.hidden&&this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=0,this._timeoutId||(this._timeoutId=window.setTimeout(()=>this.processLines(),50)))},document.addEventListener("visibilitychange",this._visibilityHandler)}logs(){return this._redactedLines.join("")}_redactLine(e){const t=/(?:\x1B|\\x1B)(?:\[(.*?)[@-~]|\].*?(?:\x07|\x1B\\))/g;let i=0,r=!1,o="";for(;;){const s=t.exec(e);if(null===s)break;const a=s.index,l=e.substring(i,a);if(l&&(o+=r?"[redacted]":l),i=a+s[0].length,void 0!==s[1])for(const e of s[1].split(";"))switch(parseInt(e)){case 0:case 28:r=!1;break;case 8:r=!0}}const s=e.substring(i);return s&&(o+=r?"[redacted]":s),o}destroy(){var e;this._destroyed=!0,this.state.carriageReturn=!1,this.state.lines=[],null===(e=this._intersectionObserver)||void 0===e||e.disconnect(),this._visibilityHandler&&(document.removeEventListener("visibilitychange",this._visibilityHandler),this._visibilityHandler=null),this._sentinel&&(this._sentinel.remove(),this._sentinel=null),this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=0),this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=0)}processLine(e){const t=/(?:\x1B|\\x1B)(?:\[(.*?)([@-~])|\].*?(?:\x07|\x1B\\))/g;let i=0;const r=document.createElement("span");r.classList.add("line");const o=e=>{if(""===e)return;if(this.state.secret){const e=document.createElement("span");return e.classList.add("log-secret-redacted"),e.appendChild(document.createTextNode("[redacted]")),void r.appendChild(e)}const t=document.createElement("span");this.state.bold&&t.classList.add("log-bold"),this.state.dim&&t.classList.add("log-dim"),this.state.italic&&t.classList.add("log-italic"),this.state.underline&&t.classList.add("log-underline"),this.state.strikethrough&&t.classList.add("log-strikethrough"),this.state.blink&&t.classList.add("log-blink"),this.state.rapidBlink&&t.classList.add("log-rapid-blink");let i=this.state.fgRgb,o=this.state.bgRgb,s=this.state.foregroundColor,a=this.state.backgroundColor;this.state.reverse&&(i=this.state.bgRgb,o=this.state.fgRgb,s=this.state.backgroundColor,a=this.state.foregroundColor,i||s||o||a?(i||s||(i="rgb(28,28,28)"),o||a||(o="rgb(221,221,221)")):t.classList.add("log-reverse")),i?t.style.color=i:null!==s&&t.classList.add(`log-fg-${s}`),o?t.style.backgroundColor=o:null!==a&&t.classList.add(`log-bg-${a}`),t.appendChild(document.createTextNode(e)),r.appendChild(t)};for(;;){const r=t.exec(e);if(null===r)break;const s=r.index;if(o(e.substring(i,s)),i=s+r[0].length,void 0===r[1]||"m"!==r[2])continue;const a=""===r[1]?[""]:r[1].split(";"),l=[];let n=!1;for(const e of a)if(""!==e){if(!/^\d+$/.test(e)){n=!0;break}l.push(Number(e))}else l.push(0);if(!n)for(let e=0;e<l.length;e++){switch(l[e]){case 0:this.state.bold=!1,this.state.dim=!1,this.state.italic=!1,this.state.underline=!1,this.state.strikethrough=!1,this.state.foregroundColor=null,this.state.backgroundColor=null,this.state.fgRgb=null,this.state.bgRgb=null,this.state.reverse=!1,this.state.secret=!1,this.state.blink=!1,this.state.rapidBlink=!1;break;case 1:this.state.bold=!0;break;case 2:this.state.dim=!0;break;case 3:this.state.italic=!0;break;case 4:this.state.underline=!0;break;case 5:this.state.blink=!0,this.state.rapidBlink=!1;break;case 6:this.state.rapidBlink=!0,this.state.blink=!1;break;case 7:this.state.reverse=!0;break;case 8:this.state.secret=!0;break;case 9:this.state.strikethrough=!0;break;case 22:this.state.bold=!1,this.state.dim=!1;break;case 23:this.state.italic=!1;break;case 24:this.state.underline=!1;break;case 25:this.state.blink=!1,this.state.rapidBlink=!1;break;case 27:this.state.reverse=!1;break;case 28:this.state.secret=!1;break;case 29:this.state.strikethrough=!1;break;case 30:this.state.foregroundColor="black",this.state.fgRgb=null;break;case 31:this.state.foregroundColor="red",this.state.fgRgb=null;break;case 32:this.state.foregroundColor="green",this.state.fgRgb=null;break;case 33:this.state.foregroundColor="yellow",this.state.fgRgb=null;break;case 34:this.state.foregroundColor="blue",this.state.fgRgb=null;break;case 35:this.state.foregroundColor="magenta",this.state.fgRgb=null;break;case 36:this.state.foregroundColor="cyan",this.state.fgRgb=null;break;case 37:this.state.foregroundColor="white",this.state.fgRgb=null;break;case 38:if(e+1<l.length)if(5===l[e+1])if(e+2<l.length){const t=l[e+2];t>=0&&t<=7&&se[t]?(this.state.foregroundColor=se[t],this.state.fgRgb=null):t>=0&&t<=255&&oe[t]&&(this.state.foregroundColor=null,this.state.fgRgb=oe[t]),e+=2}else e+=1;else if(2===l[e+1])if(e+4<l.length){this.state.foregroundColor=null;const t=Math.max(0,Math.min(255,l[e+2])),i=Math.max(0,Math.min(255,l[e+3])),r=Math.max(0,Math.min(255,l[e+4]));this.state.fgRgb="rgb("+t+","+i+","+r+")",e+=4}else e=l.length-1;break;case 39:this.state.foregroundColor=null,this.state.fgRgb=null;break;case 40:this.state.backgroundColor="black",this.state.bgRgb=null;break;case 41:this.state.backgroundColor="red",this.state.bgRgb=null;break;case 42:this.state.backgroundColor="green",this.state.bgRgb=null;break;case 43:this.state.backgroundColor="yellow",this.state.bgRgb=null;break;case 44:this.state.backgroundColor="blue",this.state.bgRgb=null;break;case 45:this.state.backgroundColor="magenta",this.state.bgRgb=null;break;case 46:this.state.backgroundColor="cyan",this.state.bgRgb=null;break;case 47:this.state.backgroundColor="white",this.state.bgRgb=null;break;case 48:if(e+1<l.length)if(5===l[e+1])if(e+2<l.length){const t=l[e+2];t>=0&&t<=7&&se[t]?(this.state.backgroundColor=se[t],this.state.bgRgb=null):t>=0&&t<=255&&oe[t]&&(this.state.backgroundColor=null,this.state.bgRgb=oe[t]),e+=2}else e+=1;else if(2===l[e+1])if(e+4<l.length){this.state.backgroundColor=null;const t=Math.max(0,Math.min(255,l[e+2])),i=Math.max(0,Math.min(255,l[e+3])),r=Math.max(0,Math.min(255,l[e+4]));this.state.bgRgb="rgb("+t+","+i+","+r+")",e+=4}else e=l.length-1;break;case 49:this.state.backgroundColor=null,this.state.bgRgb=null;break;case 90:this.state.foregroundColor=null,this.state.fgRgb=oe[8];break;case 91:this.state.foregroundColor=null,this.state.fgRgb=oe[9];break;case 92:this.state.foregroundColor=null,this.state.fgRgb=oe[10];break;case 93:this.state.foregroundColor=null,this.state.fgRgb=oe[11];break;case 94:this.state.foregroundColor=null,this.state.fgRgb=oe[12];break;case 95:this.state.foregroundColor=null,this.state.fgRgb=oe[13];break;case 96:this.state.foregroundColor=null,this.state.fgRgb=oe[14];break;case 97:this.state.foregroundColor=null,this.state.fgRgb=oe[15];break;case 100:this.state.backgroundColor=null,this.state.bgRgb=oe[8];break;case 101:this.state.backgroundColor=null,this.state.bgRgb=oe[9];break;case 102:this.state.backgroundColor=null,this.state.bgRgb=oe[10];break;case 103:this.state.backgroundColor=null,this.state.bgRgb=oe[11];break;case 104:this.state.backgroundColor=null,this.state.bgRgb=oe[12];break;case 105:this.state.backgroundColor=null,this.state.bgRgb=oe[13];break;case 106:this.state.backgroundColor=null,this.state.bgRgb=oe[14];break;case 107:this.state.backgroundColor=null,this.state.bgRgb=oe[15]}}}return o(e.substring(i)),r}processLines(){if(this._rafId=0,this._timeoutId=0,this._destroyed||0===this.state.lines.length)return;const e=this.state.carriageReturn,t=document.createDocumentFragment();for(const e of this.state.lines){this.state.carriageReturn&&"\n"!==e&&t.childElementCount&&t.removeChild(t.lastChild);const i=e.endsWith("\r");t.appendChild(this.processLine(e.replace(/\r/g,""))),this.state.carriageReturn=i}const i=this._sentinel;if(!i)return void(this.state.lines=[]);e&&"\n"!==this.state.lines[0]&&i.previousSibling?this.targetElement.replaceChild(t,i.previousSibling):this.targetElement.insertBefore(t,i),this.state.lines=[];const r=this.targetElement.children,o=r.length-1-2e3;if(o>0)if(this._atBottom)for(let e=0;e<o;e++)this.targetElement.removeChild(r[0]);else{let e=0;for(let t=0;t<o;t++)e+=r[t].getBoundingClientRect().height;for(let e=0;e<o;e++)this.targetElement.removeChild(r[0]);this.targetElement.scrollTop-=e}this._atBottom&&(this.targetElement.scrollTop=this.targetElement.scrollHeight)}addLine(e){this._destroyed||(this._exportLines.push(e),this._redactedLines.push(this._redactLine(e)),this.state.lines.push(e),this._rafId||this._timeoutId||(document.hidden?this._timeoutId=window.setTimeout(()=>this.processLines(),50):this._rafId=requestAnimationFrame(()=>this.processLines())))}}const le=e=>new Promise(t=>setTimeout(t,e));class ne{constructor(){this.chunks=""}transform(e,t){this.chunks+=e;const i=/\r\n|\r|\n/g;let r,o=0;for(;null!==(r=i.exec(this.chunks))&&("\r"!==r[0]||r.index!==this.chunks.length-1);){const e=this.chunks.substring(o,r.index),s="\r"===r[0]?"\r":"\n";t.enqueue(e+s),o=i.lastIndex}this.chunks=this.chunks.substring(o)}flush(e){e.enqueue(this.chunks)}}const de=/^\s*(?:\[\d{2}:\d{2}:\d{2}(?:\.\d+)?\]|(?:\d{2}:){2}\d{2}\.\d)/,ce=/^(\x1b\[(?:\d+;)*\d*m)+/;class he{constructor(){this.deviceHasTimestamps=!1}transform(e,t){if(""===e||"\n"===e||"\r"===e)return void t.enqueue(e);if(!this.deviceHasTimestamps&&de.test(e)&&(this.deviceHasTimestamps=!0),this.deviceHasTimestamps)return void t.enqueue(e);const i=e.match(ce),r=i?i[0]:"",o=r?e.slice(r.length):e,s=new Date,a=`[${s.getHours().toString().padStart(2,"0")}:${s.getMinutes().toString().padStart(2,"0")}:${s.getSeconds().toString().padStart(2,"0")}]`,l=o.split(/(\r?\n)/);let n="";for(const e of l)"\n"===e||"\r\n"===e?n+=e:""!==e&&(n+=r+a+" "+e);t.enqueue(n)}reset(){this.deviceHasTimestamps=!1}}class pe extends HTMLElement{constructor(){super(...arguments),this.allowInput=!0,this._commandHistory=[],this._historyIndex=-1,this._currentInput=""}logs(){var e;return(null===(e=this._console)||void 0===e?void 0:e.logs())||""}connectedCallback(){var e;if(this._console)return;if((null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow({mode:"open"})).innerHTML=`\n <style>\n :host, input {\n background-color: #1c1c1c;\n color: #ddd;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,\n monospace;\n line-height: 1.45;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n form {\n display: flex;\n align-items: center;\n padding: 0 8px 0 16px;\n flex-shrink: 0;\n }\n input {\n flex: 1;\n padding: 4px;\n margin: 0 8px;\n border: 0;\n outline: none;\n }\n \n .log {\n flex: 1;\n background-color: #1c1c1c;\n font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,\n monospace;\n font-size: 12px;\n padding: 16px;\n overflow: auto;\n line-height: 1.45;\n border-radius: 3px;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n color: #ddd;\n }\n\n .log-bold { font-weight: bold; }\n .log-dim { opacity: 0.5; }\n .log-italic { font-style: italic; }\n .log-underline { text-decoration: underline; }\n .log-strikethrough { text-decoration: line-through; }\n .log-underline.log-strikethrough { text-decoration: underline line-through; }\n .log-blink { animation: blink 1s step-end infinite; }\n .log-rapid-blink { animation: blink 0.4s step-end infinite; }\n @keyframes blink { 50% { opacity: 0; } }\n .log-secret {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .log-secret-redacted { opacity: 0; width: 1px; font-size: 1px; }\n .log-reverse { background: #ddd; color: #1c1c1c; }\n .log-fg-black { color: rgb(128, 128, 128); }\n .log-fg-red { color: rgb(255, 0, 0); }\n .log-fg-green { color: rgb(0, 255, 0); }\n .log-fg-yellow { color: rgb(255, 255, 0); }\n .log-fg-blue { color: rgb(0, 0, 255); }\n .log-fg-magenta { color: rgb(255, 0, 255); }\n .log-fg-cyan { color: rgb(0, 255, 255); }\n .log-fg-white { color: rgb(187, 187, 187); }\n .log-bg-black { background-color: rgb(0, 0, 0); }\n .log-bg-red { background-color: rgb(255, 0, 0); }\n .log-bg-green { background-color: rgb(0, 255, 0); }\n .log-bg-yellow { background-color: rgb(255, 255, 0); }\n .log-bg-blue { background-color: rgb(0, 0, 255); }\n .log-bg-magenta { background-color: rgb(255, 0, 255); }\n .log-bg-cyan { background-color: rgb(0, 255, 255); }\n .log-bg-white { background-color: rgb(255, 255, 255); }\n\n </style>\n <div class="log"></div>\n ${this.allowInput?'<form>\n <span aria-hidden="true">></span>\n <input aria-label="Serial command" autofocus>\n </form>\n ':""}\n `,this._console=new ae(this.shadowRoot.querySelector("div")),this.allowInput){const e=this.shadowRoot.querySelector("input");this._clickHandler=()=>{var t;""===(null===(t=getSelection())||void 0===t?void 0:t.toString())&&e.focus()},this.addEventListener("click",this._clickHandler),e.addEventListener("keydown",t=>{"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),this._sendCommand()):"ArrowUp"===t.key?(t.preventDefault(),this._navigateHistory(e,1)):"ArrowDown"===t.key?(t.preventDefault(),this._navigateHistory(e,-1)):this._historyIndex=-1})}const t=new AbortController,i=this._connect(t.signal);this._cancelConnection=()=>(t.abort(),i)}async _connect(e){this.logger.debug("Starting console read loop");const t=this._console;if(!this.port.readable)return null==t||t.addLine(""),null==t||t.addLine(""),null==t||t.addLine("Terminal disconnected: Port readable stream not available"),void this.logger.error("Port readable stream not available - port may need to be reopened at correct baudrate");try{await this.port.readable.pipeThrough(new TextDecoderStream,{signal:e}).pipeThrough(new TransformStream(new ne)).pipeThrough(new TransformStream(new he)).pipeTo(new WritableStream({write:e=>{null==t||t.addLine(e)}})),e.aborted||(null==t||t.addLine(""),null==t||t.addLine(""),null==t||t.addLine("Terminal disconnected"))}catch(i){e.aborted||(null==t||t.addLine(""),null==t||t.addLine(""),null==t||t.addLine(`Terminal disconnected: ${i}`))}finally{await le(100),this.logger.debug("Finished console read loop")}}_navigateHistory(e,t){if(0===this._commandHistory.length)return;-1===this._historyIndex&&(this._currentInput=e.value);const i=this._historyIndex+t;i<0?(this._historyIndex=-1,e.value=this._currentInput):i<this._commandHistory.length&&(this._historyIndex=i,e.value=this._commandHistory[this._historyIndex]);const r=e.value.length;e.setSelectionRange(r,r)}async _sendCommand(){var e,t;const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("input");if(!i||!this.port.writable)return;const r=i.value,o=this.port.writable.getWriter();try{await o.write((new TextEncoder).encode(`${r}\r\n`)),null===(t=this._console)||void 0===t||t.addLine(`> ${r}\r\n`),i.isConnected&&(r&&r!==this._commandHistory[0]&&(this._commandHistory.unshift(r),this._commandHistory.length>100&&this._commandHistory.pop()),this._historyIndex=-1,this._currentInput="",i.value="",i.focus())}finally{try{o.releaseLock()}catch(e){this.logger.error("Ignoring release lock error",e)}}}async disconnect(){var e;this._clickHandler&&(this.removeEventListener("click",this._clickHandler),this._clickHandler=void 0),this._cancelConnection&&(await this._cancelConnection(),this._cancelConnection=void 0),null===(e=this._console)||void 0===e||e.destroy(),this._console=void 0}disconnectedCallback(){var e;this._clickHandler&&(this.removeEventListener("click",this._clickHandler),this._clickHandler=void 0),this._cancelConnection&&(this._cancelConnection(),this._cancelConnection=void 0),null===(e=this._console)||void 0===e||e.destroy(),this._console=void 0}async reset(){if(this.logger.debug("Triggering reset."),this.onReset)try{await this.onReset()}catch(e){this.logger.error("Reset callback failed:",e)}await le(1e3)}}customElements.define("ew-console",pe);const ue=Symbol.for(""),fe=e=>{if(e?.r===ue)return e?._$litStatic$},ge=(e,...t)=>({_$litStatic$:t.reduce((t,i,r)=>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.`)})(i)+e[r+1],e[0]),r:ue}),me=new Map,ve=(e=>(t,...i)=>{const r=i.length;let o,s;const a=[],l=[];let n,d=0,c=!1;for(;d<r;){for(n=t[d];d<r&&void 0!==(s=i[d],o=fe(s));)n+=o+t[++d],c=!0;d!==r&&l.push(s),a.push(n),d++}if(d===r&&a.push(t[r]),c){const e=a.join("$$lit$$");void 0===(t=me.get(e))&&(a.raw=a,me.set(e,t=a)),i=l}return e(t,...i)})(u);function be(e,t=!0){return t&&"rtl"===getComputedStyle(e).getPropertyValue("direction").trim()}const ye=o(s(a));class _e extends ye{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[t].form}get labels(){return this[t].labels}constructor(){super(),this.disabled=!1,this.softDisabled=!1,this.flipIconInRtl=!1,this.href="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=be(this,this.flipIconInRtl),this.addEventListener("click",this.handleClick.bind(this))}willUpdate(){this.href&&(this.disabled=!1,this.softDisabled=!1)}render(){const e=this.href?ge`div`:ge`button`,{ariaLabel:t,ariaHasPopup:i,ariaExpanded:r}=this,o=t&&this.ariaLabelSelected,s=this.toggle?this.selected:p;let a=p;return this.href||(a=o&&this.selected?this.ariaLabelSelected:t),ve`<${e}
class="icon-button ${h(this.getRenderClasses())}"
id="button"
aria-label="${a||p}"
aria-haspopup="${!this.href&&i||p}"
aria-expanded="${!this.href&&r||p}"
aria-pressed="${s}"
aria-disabled=${!this.href&&this.softDisabled||p}
?disabled="${!this.href&&this.disabled}"
@click="${this.handleClickOnChild}">
${this.renderFocusRing()}
${this.renderRipple()}
${this.selected?p:this.renderIcon()}
${this.selected?this.renderSelectedIcon():p}
${this.renderTouchTarget()}
${this.href&&this.renderLink()}
</${e}>`}renderLink(){const{ariaLabel:e}=this;return u`
<a
class="link"
id="link"
href="${this.href}"
target="${this.target||p}"
aria-label="${e||p}"></a>
`}getRenderClasses(){return{"flip-icon":this.flipIcon,selected:this.toggle&&this.selected}}renderIcon(){return u`<span class="icon"><slot></slot></span>`}renderSelectedIcon(){return u`<span class="icon icon--selected"
><slot name="selected"><slot></slot></slot
></span>`}renderTouchTarget(){return u`<span class="touch"></span>`}renderFocusRing(){return u`<md-focus-ring
part="focus-ring"
for=${this.href?"link":"button"}></md-focus-ring>`}renderRipple(){const e=!this.href&&(this.disabled||this.softDisabled);return u`<md-ripple
for=${this.href?"link":p}
?disabled="${e}"></md-ripple>`}connectedCallback(){this.flipIcon=be(this,this.flipIconInRtl),super.connectedCallback()}handleClick(e){if(!this.href&&this.softDisabled)return e.stopImmediatePropagation(),void e.preventDefault()}async handleClickOnChild(e){await 0,!this.toggle||this.disabled||this.softDisabled||e.defaultPrevented||(this.selected=!this.selected,this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}}m(_e),_e.formAssociated=!0,_e.shadowRootOptions={mode:"open",delegatesFocus:!0},i([r({type:Boolean,reflect:!0})],_e.prototype,"disabled",void 0),i([r({type:Boolean,attribute:"soft-disabled",reflect:!0})],_e.prototype,"softDisabled",void 0),i([r({type:Boolean,attribute:"flip-icon-in-rtl"})],_e.prototype,"flipIconInRtl",void 0),i([r()],_e.prototype,"href",void 0),i([r()],_e.prototype,"target",void 0),i([r({attribute:"aria-label-selected"})],_e.prototype,"ariaLabelSelected",void 0),i([r({type:Boolean})],_e.prototype,"toggle",void 0),i([r({type:Boolean,reflect:!0})],_e.prototype,"selected",void 0),i([r()],_e.prototype,"type",void 0),i([r({reflect:!0})],_e.prototype,"value",void 0),i([l()],_e.prototype,"flipIcon",void 0);const xe=g`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}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(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;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)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;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)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{height:100%;outline:none;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}}
`,we=g`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--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)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected{--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)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}
`;class ke extends _e{}ke.styles=[xe,we],customElements.define("ew-icon-button",ke);const Se=g`:host{--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 3px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-filled-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-filled-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-filled-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-filled-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-filled-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-filled-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-e