iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
60 lines • 49.4 kB
JavaScript
export const __rspack_esm_id=32188;export const __rspack_esm_ids=[32188];export const __webpack_modules__={57237(t,a,e){e.d(a,{d:()=>o});const o=t=>t.stopPropagation()},64481(t,a,e){e.d(a,{D:()=>i,J:()=>s});e(64979);let o=!1;try{o="true"===window.localStorage.getItem("disableViewTransition")}catch{}const i=t=>{o=t},r=t=>{if(!(t=>(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name)(t))throw t},s=t=>{if(!document.startViewTransition||o)return t(!1),Promise.resolve();let a=!1;try{const e=document.startViewTransition(()=>{a=!0,t(!0)});return e.ready.catch(r),e.finished.catch(r)}catch(e){return console.warn("View transition failed, falling back to direct execution.",e),a?Promise.reject(e):(t(!1),Promise.resolve())}}},93444(t,a,e){var o=e(62826),i=e(5124),r=e(22441);class s extends i.WF{render(){return i.qy` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `}static get styles(){return[i.AH`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`]}}s=(0,o.Cg)([(0,r.EM)("ha-dialog-footer")],s)},76538(t,a,e){var o=e(62826),i=e(5124),r=e(22441);class s extends i.WF{render(){const t=i.qy`<div class="header-title"> <slot name="title"></slot> </div>`,a=i.qy`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`;return i.qy` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${"above"===this.subtitlePosition?i.qy`${a}${t}`:i.qy`${t}${a}`} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `}static get styles(){return[i.AH`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))} all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`]}constructor(...t){super(...t),this.subtitlePosition="below",this.showBorder=!1}}(0,o.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],s.prototype,"subtitlePosition",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],s.prototype,"showBorder",void 0),s=(0,o.Cg)([(0,r.EM)("ha-dialog-header")],s)},72554(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(93900),r=e(35211),s=e(5124),l=e(22441),n=e(63672),h=e(1087),d=e(64481),p=e(22792),c=e(59992),u=e(14503),g=e(22348),v=(e(76538),e(26300)),m=t([i,v]);[i,v]=m.then?(await m)():m;const b="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class f extends((0,c.V)(s.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(t){super.updated(t),t.has("open")&&(this._open=this.open)}render(){return s.qy` <wa-dialog .open="${this._open}" .lightDismiss="${!this.preventScrimClose}" without-header aria-labelledby="${(0,n.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0))}" aria-describedby="${(0,n.J)(this.ariaDescribedBy)}" ="${this._handleKeyDown}" -hide="${this._handleHide}" -show="${this._handleShow}" -after-show="${this._handleAfterShow}" -after-hide="${this._handleAfterHide}"> ${this.withoutHeader?s.s6:s.qy`<slot name="header"> <ha-dialog-header .subtitlePosition="${this.headerSubtitlePosition}" .showBorder="${this._bodyScrolled}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${this._i18n?.localize?.("ui.common.close")??"Close"}" .path="${b}"></ha-icon-button> </slot> ${void 0!==this.headerTitle?s.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:s.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?s.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:s.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`} <div class="content-wrapper"> <div class="body ha-scrollbar" ="${this._handleBodyScroll}"> <slot></slot> </div> ${this.renderScrollableFades()} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(t){this._open?(0,d.J)(()=>{this._setFullscreen(t.detail)}):this._setFullscreen(t.detail)}_setFullscreen(t){this.toggleAttribute("fullscreen",t)}_handleBodyScroll(t){this._bodyScrolled=t.target.scrollTop>0}_handleKeyDown(t){"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)}_handleHide(t){const a=t.detail?.source===t.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&t.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,u.dp,s.AH`wa-dialog{--full-width:var(
--ha-dialog-width-full,
min(95vw, var(--safe-width))
);--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var(
--ha-dialog-surface-background,
var(--card-background-color, var(--ha-color-surface-default))
);--wa-panel-border-radius:var(
--ha-dialog-border-radius,
var(--ha-border-radius-3xl)
);max-width:var(--ha-dialog-max-width,var(--safe-width))} (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)} all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(
--ha-dialog-header-title-font-size,
var(--ha-font-size-2xl)
);line-height:var(
--ha-dialog-header-title-line-height,
var(--ha-line-height-condensed)
);font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`]}constructor(...t){super(...t),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,h.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{if(this._hassConfig?.auth.external&&(0,g.V)(this._hassConfig.auth.external)){const t=this.querySelector("[autofocus]");return void(null!==t&&(t.id||(t.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})))}this.querySelector("[autofocus]")?.focus()}))},this._handleAfterShow=t=>{t.eventPhase===Event.AT_TARGET&&(0,h.r)(this,"after-show")},this._handleAfterHide=t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,h.r)(this,"closed"))}}}(0,o.Cg)([(0,l.MZ)({attribute:"aria-labelledby"})],f.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"aria-describedby"})],f.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],f.prototype,"open",void 0),(0,o.Cg)([(0,l.MZ)({reflect:!0})],f.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:String,reflect:!0,attribute:"width"})],f.prototype,"width",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],f.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"header-title"})],f.prototype,"headerTitle",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"header-subtitle"})],f.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,l.MZ)({type:String,attribute:"header-subtitle-position"})],f.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],f.prototype,"flexContent",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-header"})],f.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,l.wk)()],f.prototype,"_open",void 0),(0,o.Cg)([(0,l.P)(".body")],f.prototype,"bodyContainer",void 0),(0,o.Cg)([(0,l.wk)(),(0,r.Fg)({context:p.D5,subscribe:!0})],f.prototype,"_i18n",void 0),(0,o.Cg)([(0,l.wk)(),(0,r.Fg)({context:p.WF,subscribe:!0})],f.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,l.wk)()],f.prototype,"_bodyScrolled",void 0),(0,o.Cg)([(0,l.Ls)({passive:!0})],f.prototype,"_handleBodyScroll",null),f=(0,o.Cg)([(0,l.EM)("ha-dialog")],f),a()}catch(t){a(t)}})},26300(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{HaIconButton:()=>d});var i=e(62826),r=e(5124),s=e(22441),l=e(63672),n=e(18350),h=(e(67094),t([n]));n=(h.then?(await h)():h)[0];class d extends r.WF{render(){return r.qy` <ha-button appearance="plain" variant="neutral" aria-label="${(0,l.J)(this.label)}" title="${(0,l.J)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,l.J)(this.ariaHasPopup)}" .disabled="${this.disabled}" .iconTag="${this.path?"ha-svg-icon":"span"}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"> ${this.path?r.qy`<ha-svg-icon aria-hidden="true" .path="${this.path}"></ha-svg-icon>`:r.qy`<span><slot></slot></span>`} </ha-button> `}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}d.shadowRootOptions={mode:"open",delegatesFocus:!0},d.styles=r.AH`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var(
--ha-icon-button-padding-inline,
--ha-space-2
);--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1} (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`,(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"disabled",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],d.prototype,"path",void 0),(0,i.Cg)([(0,s.MZ)({type:String})],d.prototype,"label",void 0),(0,i.Cg)([(0,s.MZ)({type:String,attribute:"aria-haspopup"})],d.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"hide-title",type:Boolean})],d.prototype,"hideTitle",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"href",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"target",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"rel",void 0),(0,i.Cg)([(0,s.MZ)()],d.prototype,"download",void 0),d=(0,i.Cg)([(0,s.EM)("ha-icon-button")],d),o()}catch(t){o(t)}})},67094(t,a,e){e.r(a),e.d(a,{HaSvgIcon:()=>s});var o=e(62826),i=e(5124),r=e(22441);class s extends i.WF{render(){return i.JW` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?i.JW`<path class="primary-path" d="${this.path}"></path>`:i.s6} ${this.secondaryPath?i.JW`<path class="secondary-path" d="${this.secondaryPath}"></path>`:i.s6} </g> </svg>`}}s.styles=i.AH`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`,(0,o.Cg)([(0,r.MZ)()],s.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],s.prototype,"secondaryPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],s.prototype,"viewBox",void 0),s=(0,o.Cg)([(0,r.EM)("ha-svg-icon")],s)},56304(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(99324),r=e(92070),s=e(5124),l=e(22441),n=e(6412),h=e(63672),d=e(57237),p=e(53305),c=t([i]);i=(c.then?(await c)():c)[0];class u extends((0,p.w)(s.WF)){get _formControl(){return this._textarea}setFocused(t){t?this.toggleAttribute("focused",!0):this.removeAttribute("focused")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",d.d)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",d.d)}async firstUpdated(t){super.firstUpdated(t),this.autofocus&&(await(this._textarea?.updateComplete),this._textarea?.focus())}focus(t){this._textarea?.focus(t)}render(){const t=!this.label&&this._hasSlotController.test("label"),a=!this.hint&&this._hasSlotController.test("hint");return s.qy` <wa-textarea .value="${this.value??null}" .placeholder="${this.placeholder}" .readonly="${this.readonly}" .required="${this.required}" .rows="${this.rows??4}" .resize="${this.resize}" .disabled="${this.disabled}" name="${(0,h.J)(this.name)}" autocapitalize="${(0,h.J)(this.autocapitalize||void 0)}" autocomplete="${(0,h.J)(this.autocomplete)}" .autofocus="${this.autofocus}" .spellcheck="${this.spellcheck}" inputmode="${(0,h.J)(this.inputmode||void 0)}" enterkeyhint="${(0,h.J)(this.enterkeyhint||void 0)}" minlength="${(0,h.J)(this.minlength)}" maxlength="${(0,h.J)(this.maxlength)}" class="${(0,n.H)({input:!0,invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder,"no-label":!this.label,"hint-hidden":!(this.hint||a||this.required||this._invalid||this.invalid)})}" ="${this._handleInput}" ="${this._handleChange}" ="${this._handleBlur}" -invalid="${this._handleInvalid}" exportparts="base:wa-base, hint:wa-hint, textarea:wa-textarea"> ${this.label||t?s.qy`<slot name="label" slot="label">${this.label?this._renderLabel(this.label,this.required):s.s6}</slot>`:s.s6} <div slot="hint" class="${(0,n.H)({error:this.invalid||this._invalid})}" role="${(0,h.J)(this.invalid||this._invalid?"alert":void 0)}" aria-live="polite"> ${this._invalid||this.invalid?this.validationMessage||this._textarea?.validationMessage:this.hint||(a?s.qy`<slot name="hint"></slot>`:s.s6)} </div> </wa-textarea> `}constructor(...t){super(...t),this.resize="none",this._hasSlotController=new r.X(this,"label","hint"),this._requiredMarkerCSSVar="--ha-textarea-required-marker"}}u.styles=[p.N,s.AH`:host{display:flex;align-items:flex-start;padding-bottom:var(--ha-textarea-padding-bottom)}wa-textarea::part(label){width:calc(100% - var(--ha-space-2));background-color:var(--ha-color-form-background);transition:all var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out;padding-inline-start:var(--ha-space-3);padding-inline-end:var(--ha-space-3);margin:var(--ha-space-1) var(--ha-space-1) 0;padding-top:var(--ha-space-4);white-space:nowrap;overflow:hidden}:host(:focus-within) wa-textarea::part(label),:host([focused]) wa-textarea::part(label){color:var(--primary-color)}:host(:focus-within) wa-textarea::part(label),:host([focused]) wa-textarea::part(label),wa-textarea.label-raised::part(label){padding-top:var(--ha-space-2);font-size:var(--ha-font-size-xs)}wa-textarea.no-label::part(label){height:0;padding:0}wa-textarea::part(base){min-height:56px;padding-top:var(--ha-space-6);padding-bottom:var(--ha-space-2)}wa-textarea.no-label::part(base){padding-top:var(--ha-space-3)}wa-textarea::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host(:focus-within) wa-textarea::part(base)::after,:host([focused]) wa-textarea::part(base)::after{height:2px;background-color:var(--primary-color)}:host(:focus-within) wa-textarea.invalid::part(base)::after,wa-textarea.invalid:not([disabled])::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-textarea::part(textarea){padding:0 var(--ha-space-4);font-family:var(--ha-font-family-body);font-size:var(--ha-font-size-m)}:host([resize=auto]) wa-textarea::part(textarea){max-height:var(--ha-textarea-max-height,200px);overflow-y:auto}wa-textarea:hover::part(base),wa-textarea:hover::part(label){background-color:var(--ha-color-form-background-hover)}wa-textarea[disabled]::part(textarea){cursor:not-allowed}wa-textarea[disabled]::part(base),wa-textarea[disabled]::part(label){background-color:var(--ha-color-form-background-disabled)}`],(0,o.Cg)([(0,l.MZ)({type:Number})],u.prototype,"rows",void 0),(0,o.Cg)([(0,l.MZ)()],u.prototype,"resize",void 0),(0,o.Cg)([(0,l.P)("wa-textarea")],u.prototype,"_textarea",void 0),u=(0,o.Cg)([(0,l.EM)("ha-textarea")],u),a()}catch(t){a(t)}})},34127(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(52630),r=e(5124),s=e(22441),l=t([i]);i=(l.then?(await l)():l)[0];class n extends i.A{static get styles(){return[i.A.styles,r.AH`:host{--wa-tooltip-background-color:var(
--ha-tooltip-background-color,
var(--ha-color-surface-default)
);--wa-tooltip-content-color:var(
--ha-tooltip-text-color,
var(--primary-text-color)
);--wa-tooltip-font-family:var(
--ha-tooltip-font-family,
var(--ha-font-family-body)
);--wa-tooltip-font-size:var(
--ha-tooltip-font-size,
var(--ha-font-size-m)
);--wa-tooltip-font-weight:var(
--ha-tooltip-font-weight,
var(--ha-font-weight-medium)
);--wa-tooltip-line-height:var(
--ha-tooltip-line-height,
var(--ha-line-height-condensed)
);--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var(
--ha-tooltip-border-radius,
var(--ha-border-radius-md)
);--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`]}constructor(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,o.Cg)([(0,s.MZ)({attribute:"show-delay",type:Number})],n.prototype,"showDelay",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"hide-delay",type:Number})],n.prototype,"hideDelay",void 0),n=(0,o.Cg)([(0,s.EM)("ha-tooltip")],n),a()}catch(t){a(t)}})},91485(t,a,e){e.a(t,async function(t,o){try{e.d(a,{U:()=>x});var i=e(62826),r=(e(86137),e(30006)),s=e(92070),l=e(35211),n=e(5124),h=e(22441),d=e(6412),p=e(63672),c=e(57237),u=e(22792),g=e(26300),v=(e(67094),e(34127)),m=e(53305),b=t([r,g,v]);[r,g,v]=b.then?(await b)():b;const f="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",y="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",w="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class x extends((0,m.w)(n.WF)){get _formControl(){return this._input}showPicker(){this._input?.showPicker()}stepUp(){this._input?.stepUp()}stepDown(){this._input?.stepDown()}async firstUpdated(t){super.firstUpdated(t),this.insetLabel||(await(this._input?.updateComplete),this._syncStartSlotWidth())}render(){const t=!this.label&&this._hasSlotController.test("label"),a=!this.hint&&this._hasSlotController.test("hint"),e=this._hasSlotController.test("start");return n.qy` <wa-input .type="${this.type}" .value="${this.value??null}" .withClear="${this.withClear}" .placeholder="${this.placeholder}" .readonly="${this.readonly}" .passwordToggle="${this.passwordToggle}" .passwordVisible="${this.passwordVisible}" .withoutSpinButtons="${this.withoutSpinButtons}" .required="${this.required}" .pattern="${this.pattern}" .minlength="${this.minlength}" .maxlength="${this.maxlength}" .min="${this.min}" .max="${this.max}" .step="${this.step}" .autocapitalize="${this.autocapitalize||void 0}" .autocorrect="${this.autocorrect?"on":"off"}" .autocomplete="${this.autocomplete}" .autofocus="${this.autofocus}" .enterkeyhint="${this.enterkeyhint||void 0}" .spellcheck="${this.spellcheck}" .inputmode="${this.inputmode||void 0}" .name="${this.name}" .disabled="${this.disabled}" class="${(0,d.H)({input:!0,invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder||e&&this.insetLabel,"no-label":!this.label,"hint-hidden":!(this.hint||a||this.required||this._invalid||this.invalid)})}" ="${this._handleInput}" ="${this._handleChange}" ="${this._handleBlur}" -invalid="${this._handleInvalid}" exportparts="base:wa-base, hint:wa-hint, input:wa-input"> ${this.label||t?n.qy`<slot name="label" slot="label">${this.label?this._renderLabel(this.label,this.required):n.s6}</slot>`:n.s6} <slot name="start" slot="start" ="${this._syncStartSlotWidth}"> ${this.renderStartDefault()} </slot> <slot name="end" slot="end"> ${this.renderEndDefault()} </slot> <slot name="clear-button" slot="clear-button"> <ha-icon-button ="${this._handleClearClick}" .label="${this.i18n?.localize?.("ui.components.input.clear")||"Clear"}" .path="${f}"></ha-icon-button> </slot> <slot name="password-toggle-button" slot="password-toggle-button"> <ha-icon-button ="${c.d}" ="${this._handlePasswordToggle}" .label="${this.i18n?.localize?.("ui.components.input."+(this.passwordVisible?"hide_password":"show_password"))||(this.passwordVisible?"Hide password":"Show password")}" .path="${this.passwordVisible?w:y}"></ha-icon-button> </slot> <div slot="hint" class="${(0,d.H)({error:this.invalid||this._invalid})}" role="${(0,p.J)(this.invalid||this._invalid?"alert":void 0)}" aria-live="polite"> ${this._invalid||this.invalid?this.validationMessage||this._input?.validationMessage:this.hint||(a?n.qy`<slot name="hint"></slot>`:n.s6)} </div> </wa-input> `}renderStartDefault(){return n.s6}renderEndDefault(){return n.s6}_handleClearClick(){this._input?.clear()}_handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}constructor(...t){super(...t),this.appearance="material",this.type="text",this.withClear=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.withoutSpinButtons=!1,this.autocorrect=!1,this.insetLabel=!1,this._hasSlotController=new s.X(this,"label","hint","input","start"),this._syncStartSlotWidth=()=>{const t=this._input?.shadowRoot?.querySelector('[part~="start"]'),a=t?.offsetWidth??0;a>0&&!this.insetLabel?(this.style.setProperty("--start-slot-width",`calc(${a}px + var(--ha-space-1))`),this.style.setProperty("--input-padding-inline-start","var(--ha-space-1)")):(this.style.removeProperty("--start-slot-width"),this.style.removeProperty("--input-padding-inline-start"))}}}x.styles=[m.N,n.AH`:host{display:flex;align-items:flex-start;padding-top:var(--ha-input-padding-top);padding-bottom:var(--ha-input-padding-bottom,var(--ha-space-2));text-align:var(--ha-input-text-align,start)}:host([appearance=outlined]){padding-bottom:var(--ha-input-padding-bottom)}wa-input::part(label){padding-inline-start:calc(var(--start-slot-width,0px) + var(--ha-space-4));padding-inline-end:var(--ha-space-4);padding-top:var(--ha-space-5)}:host([appearance=material]:focus-within) wa-input::part(label){color:var(--primary-color)}:host(:focus-within) wa-input::part(label),:host([type=date]) wa-input::part(label),wa-input.label-raised::part(label){padding-top:var(--ha-space-3);font-size:var(--ha-font-size-xs)}wa-input::part(base){height:56px;padding:0 var(--ha-space-4)}:host([appearance=outlined]) wa-input.no-label::part(base){height:32px;padding:0 var(--ha-space-2)}:host([appearance=outlined]) wa-input::part(base){border:1px solid var(--ha-color-border-neutral-quiet);background-color:var(--card-background-color);border-radius:var(--ha-border-radius-md);transition:border-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]) ::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]:focus-within) wa-input::part(base)::after{height:2px;background-color:var(--primary-color)}:host([appearance=material]) wa-input.invalid:not([disabled])::part(base)::after,:host([appearance=material]:focus-within) wa-input.invalid::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-input::part(input){padding-top:var(--ha-space-3);padding-inline-start:var(--input-padding-inline-start,0)}wa-input.no-label::part(input){padding-top:0}:host([type=color]) wa-input::part(input){padding-top:var(--ha-space-6);padding-bottom:2px;cursor:pointer}:host([type=color]) wa-input.no-label::part(input){padding:var(--ha-space-2)}:host([type=color]) wa-input.no-label::part(base){padding:0}wa-input::part(input)::placeholder{color:var(--ha-color-neutral-60)}wa-input::part(base):hover{background-color:var(--ha-color-form-background-hover)}:host([appearance=outlined]) wa-input::part(base):hover{border-color:var(--ha-color-border-neutral-normal)}:host([appearance=outlined]:focus-within) wa-input::part(base){border-color:var(--primary-color)}wa-input:disabled::part(base){background-color:var(--ha-color-form-background-disabled)}wa-input:disabled::part(label){opacity:.5}wa-input::part(end){color:var(--ha-color-text-secondary)}ha-icon-button{display:flex;align-items:center;color:var(--ha-color-text-secondary)}:host([appearance=outlined]) wa-input.no-label{--ha-icon-button-size:24px;--mdc-icon-size:18px}`],(0,i.Cg)([(0,h.MZ)({reflect:!0})],x.prototype,"appearance",void 0),(0,i.Cg)([(0,h.MZ)({reflect:!0})],x.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"with-clear"})],x.prototype,"withClear",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"password-toggle"})],x.prototype,"passwordToggle",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"password-visible"})],x.prototype,"passwordVisible",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"without-spin-buttons"})],x.prototype,"withoutSpinButtons",void 0),(0,i.Cg)([(0,h.MZ)()],x.prototype,"pattern",void 0),(0,i.Cg)([(0,h.MZ)()],x.prototype,"min",void 0),(0,i.Cg)([(0,h.MZ)()],x.prototype,"max",void 0),(0,i.Cg)([(0,h.MZ)()],x.prototype,"step",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],x.prototype,"autocorrect",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"inset-label"})],x.prototype,"insetLabel",void 0),(0,i.Cg)([(0,h.P)("wa-input")],x.prototype,"_input",void 0),(0,i.Cg)([(0,h.wk)(),(0,l.Fg)({context:u.D5,subscribe:!0})],x.prototype,"i18n",void 0),x=(0,i.Cg)([(0,h.EM)("ha-input")],x),o()}catch(t){o(t)}})},53305(t,a,e){e.d(a,{w:()=>n,N:()=>h});var o=e(62826),i=e(5124),r=e(22441),s=e(22786);e(74423);const l=Boolean(globalThis.ElementInternals)&&globalThis.HTMLElement?.prototype.attachInternals?.toString().includes("[native code]"),n=t=>{class a extends t{get _formControl(){throw new Error("_formControl getter must be implemented by subclass")}select(){this._formControl?.select()}setSelectionRange(t,a,e){this._formControl?.setSelectionRange(t,a,e)}setRangeText(t,a,e,o){this._formControl?.setRangeText(t,a,e,o)}checkValidity(){return!l||(this._formControl?.checkValidity()??!0)}reportValidity(){const t=this.checkValidity();return this._invalid=!t,t}_handleInput(){this.value=this._formControl?.value??void 0,this._invalid&&this._formControl?.checkValidity()&&(this._invalid=!1)}_handleChange(){this.value=this._formControl?.value??void 0}_handleBlur(){this.autoValidate&&(this._invalid=!this._formControl?.checkValidity())}_handleInvalid(){this._invalid=!0}constructor(...t){super(...t),this.label="",this.hint="",this.placeholder="",this.readonly=!1,this.required=!1,this.autocapitalize="",this.autofocus=!1,this.spellcheck=!0,this.inputmode="",this.enterkeyhint="",this.disabled=!1,this.validationMessage="",this.autoValidate=!1,this.invalid=!1,this._invalid=!1,this._requiredMarkerCSSVar="--ha-input-required-marker",this._renderLabel=(0,s.A)((t,a)=>{if(!a)return t;let e=getComputedStyle(this).getPropertyValue(this._requiredMarkerCSSVar);return e||(e="*"),e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1)),e?`${t}${e}`:t})}}return a.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,o.Cg)([(0,r.MZ)()],a.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"hint",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"placeholder",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],a.prototype,"readonly",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],a.prototype,"required",void 0),(0,o.Cg)([(0,r.MZ)({type:Number})],a.prototype,"minlength",void 0),(0,o.Cg)([(0,r.MZ)({type:Number})],a.prototype,"maxlength",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"autocapitalize",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"autocomplete",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],a.prototype,"autofocus",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],a.prototype,"spellcheck",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"inputmode",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"enterkeyhint",void 0),(0,o.Cg)([(0,r.MZ)()],a.prototype,"name",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],a.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"validation-message"})],a.prototype,"validationMessage",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"auto-validate"})],a.prototype,"autoValidate",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],a.prototype,"invalid",void 0),(0,o.Cg)([(0,r.wk)()],a.prototype,"_invalid",void 0),a},h=i.AH`.input{flex:1;min-width:0;--wa-transition-fast:var(--wa-transition-normal);position:relative}.input::part(label){position:absolute;top:0;font-weight:var(--ha-font-weight-normal);font-family:var(--ha-font-family-body);transition:all var(--wa-transition-normal) ease-in-out;color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed);z-index:1;pointer-events:none;font-size:var(--ha-font-size-m)}.input.invalid:not([disabled])::part(label),:host(:focus-within) .input.invalid::part(label){color:var(--ha-color-fill-danger-loud-resting)}.input::part(base){background-color:var(--ha-color-form-background);border-top-left-radius:var(--ha-border-radius-sm);border-top-right-radius:var(--ha-border-radius-sm);border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square);border:none;position:relative;transition:background-color var(--wa-transition-normal) ease-in-out}:host(:focus-within) .input::part(base){outline:0}.input::part(hint){min-height:var(--ha-space-5);margin-block-start:0;margin-inline-start:var(--ha-space-3);font-size:var(--ha-font-size-s);display:flex;align-items:center;color:var(--ha-color-text-secondary)}.input.hint-hidden::part(hint){height:0;min-height:0}.error{color:var(--ha-color-on-danger-quiet)}`},26683(t,a,e){e.a(t,async function(t,o){try{e.r(a);var i=e(62826),r=e(5124),s=e(22441),l=e(6412),n=e(63672),h=e(1087),d=e(18350),p=e(72554),c=(e(93444),e(76538),e(67094),e(56304)),u=e(91485),g=t([d,p,c,u]);[d,p,c,u]=g.then?(await g)():g;const v="M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",m="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class b extends r.WF{async showDialog(t){this._closePromise&&await this._closePromise,this._params=t,this._validInput=!0,this._open=!0,await this.updateComplete,this._validateInput()}closeDialog(){return!this._open||!this._params?.confirmation&&!this._params?.prompt&&(!this._params||(this._dismiss(),!0))}render(){if(!this._params)return r.s6;const t=this._params.confirmation||!!this._params.prompt,a=this._params.title||this._params.confirmation&&this.hass.localize("ui.dialogs.generic.default_confirmation_title");return r.qy` <ha-dialog .open="${this._open}" type="${t?"alert":"standard"}" ?prevent-scrim-close="${t}" ="${this._dialogClosed}" aria-labelledby="dialog-box-title" aria-describedby="dialog-box-description"> <ha-dialog-header slot="header"> ${t?r.s6:r.qy`<slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${this.hass?.localize("ui.common.close")??"Close"}" .path="${m}"></ha-icon-button></slot>`} <h1 class="${(0,l.H)({title:!0,alert:t})}" slot="title" id="dialog-box-title"> ${this._params.warning?r.qy`<ha-svg-icon .path="${v}" style="color:var(--warning-color)"></ha-svg-icon> `:r.s6} ${a} </h1> ${this._params.subtitle?r.qy`<span slot="subtitle">${this._params.subtitle}</span>`:r.s6} </ha-dialog-header> <div id="dialog-box-description"> ${this._params.text?r.qy` <p>${this._params.text}</p> `:""} ${this._params.prompt&&!this._params.multiline?r.qy` <ha-input autofocus value="${(0,n.J)(this._params.defaultValue)}" .placeholder="${this._params.placeholder}" .label="${this._params.inputLabel?this._params.inputLabel:""}" .type="${this._params.inputType?this._params.inputType:"text"}" .min="${this._params.inputMin}" .max="${this._params.inputMax}" .disabled="${this._loading}" ="${this._validateInput}"> ${this._params.inputSuffix?r.qy`<span slot="end">${this._params.inputSuffix}</span>`:r.s6} </ha-input> `:this._params.prompt&&this._params.multiline?r.qy` <ha-textarea resize="auto" autofocus .value="${this._params.defaultValue}" .placeholder="${this._params.placeholder}" .label="${this._params.inputLabel}" .disabled="${this._loading}" ="${this._validateInput}"></ha-textarea> `:r.s6} </div> <ha-dialog-footer slot="footer"> ${t?r.qy` <ha-button slot="secondaryAction" ="${this._dismiss}" ?autofocus="${!this._params.prompt&&this._params.destructive}" ?disabled="${this._loading}" appearance="plain"> ${this._params.dismissText?this._params.dismissText:this.hass.localize("ui.common.cancel")} </ha-button> `:r.s6} <ha-button slot="primaryAction" ="${this._confirm}" ?autofocus="${!this._params.prompt&&!this._params.destructive}" ?disabled="${this._loading||!!this._params.prompt&&!this._validInput}" .loading="${this._loading}" variant="${this._params.destructive?"danger":"brand"}"> ${this._params.confirmText?this._params.confirmText:this.hass.localize("ui.common.ok")} </ha-button> </ha-dialog-footer> </ha-dialog> `}_cancel(){this._params?.cancel&&this._params.cancel()}_dismiss(){this._closeState="canceled",this._cancel(),this._closeDialog()}async _confirm(){if(!this._params?.prompt||this._textField?.reportValidity()){if(this._params.action){this._loading=!0;try{await this._params.action(this._textField?.value)}catch(t){return void(this._loading=!1)}this._loading=!1}this._closeState="confirmed",this._params.confirm&&this._params.confirm(this._textField?.value),this._closeDialog()}}_validateInput(){this._validInput=!this._params?.prompt||(this._textField?.checkValidity()??!0)}_closeDialog(){this._open=!1,this._closePromise=new Promise(t=>{this._closeResolve=t})}_dialogClosed(){(0,h.r)(this,"dialog-closed",{dialog:this.localName}),this._closeState||this._cancel(),this._closeState=void 0,this._params=void 0,this._open=!1,this._loading=!1,this._closeResolve?.(),this._closeResolve=void 0}constructor(...t){super(...t),this._open=!1,this._loading=!1,this._validInput=!0}}b.styles=r.AH`:host([inert]){pointer-events:initial!important;cursor:initial!important}a{color:var(--primary-color)}p{margin:0;color:var(--primary-text-color)}.no-bottom-padding{padding-bottom:0}.secondary{color:var(--secondary-text-color)}ha-input{width:100%}.title{font-weight:inherit;font-size:inherit;margin:inherit}.title.alert{padding:0 var(--ha-space-2)} all and (min-width:450px) and (min-height:500px){.title.alert{padding:0 var(--ha-space-1)}}`,(0,i.Cg)([(0,s.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],b.prototype,"_params",void 0),(0,i.Cg)([(0,s.wk)()],b.prototype,"_open",void 0),(0,i.Cg)([(0,s.wk)()],b.prototype,"_closeState",void 0),(0,i.Cg)([(0,s.wk)()],b.prototype,"_loading",void 0),(0,i.Cg)([(0,s.wk)()],b.prototype,"_validInput",void 0),(0,i.Cg)([(0,s.P)("ha-input, ha-textarea")],b.prototype,"_textField",void 0),b=(0,i.Cg)([(0,s.EM)("dialog-box")],b),o()}catch(t){o(t)}})},59992(t,a,e){e.d(a,{V:()=>n});var o=e(62826),i=e(88696),r=e(5124),s=e(6412),l=e(22441);const n=t=>{class a extends t{get scrollableElement(){return a.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){super.firstUpdated?.(t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){super.updated?.(t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return r.qy` <div class="${(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled})}"></div> <div class="${(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable})}"></div> `}static get styles(){const t=Object.getPrototypeOf(this);var a;return[...void 0===(a=t?.styles??[])?[]:Array.isArray(a)?a:[a],r.AH`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),this._resize.unobserve?.(this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const a=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:e=0,clientHeight:o=0,scrollTop:i=0}=t;this._contentScrollable=e-o>i+a+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{const a=t.currentTarget;this._contentScrolled=(a.scrollTop??0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new i.P(this,{target:null,callback:t=>{const a=t[0]?.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return a.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],a.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],a.prototype,"_contentScrollable",void 0),a}},14503(t,a,e){e.d(a,{RF:()=>r,dp:()=>n,kO:()=>l,nA:()=>s,og:()=>i});var o=e(5124);const i=o.AH`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,r=o.AH`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease} (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${i} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`,s=o.AH`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)} all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`,l=o.AH`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--mdc-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
)} all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`,n=o.AH`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`;o.AH`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`},22348(t,a,e){e.d(a,{V:()=>i});var o=e(37177);const i=t=>!!t&&o.n},37177(t,a,e){e.d(a,{n:()=>o});const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},89429(t){t.exports=function(){}}};