iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
28 lines • 50.7 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[78477],{93421:function(e,t,a){a.d(t,{IW:function(){return d},dH:function(){return c},fI:function(){return l}});a(44114),a(62953);var o=a(35211),i=a(22792),r=a(32172);const s=(e,t)=>{let a=e;for(const o of t){if(null==a)return;a=a[o]}return a},n=(e,t,a)=>{const i=(0,r.p)({transformer:function(e){return a.call(this,e)},watch:t?[t]:[]}),s=(0,o.Fg)({context:e,subscribe:!0});return(e,t)=>{i(e,t),s(e,t)}},l=e=>n(i.iN,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?null==t?void 0:t[a]:void 0}),c=e=>n(i.X1,e.entityIdPath[0],function(t){const a=s(this,e.entityIdPath);return"string"==typeof a?null==t?void 0:t[a]:void 0}),d=()=>n(i.D5,void 0,({localize:e})=>e)},32172:function(e,t,a){a.d(t,{p:function(){return o}});a(16280),a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);function o(e){return(t,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const o=String(a),i=t;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const e=i._transformers;i._transformers=new Map,e.forEach((e,t)=>i._transformers.set(t,e))}}else{i._transformers=new Map,i._watching=new Map;const e=i.willUpdate;i.willUpdate=function(t){e.call(this,t);const a=new Set;t.forEach((e,t)=>{const o=this._watching.get(t);void 0!==o&&o.forEach(e=>a.add(e))}),a.forEach(e=>{this[e]=this[`__original_${String(e)}`]})}}i._transformers.set(a,e.transformer),e.watch&&e.watch.forEach(e=>{let t=i._watching.get(e);t||(t=new Set,i._watching.set(e,t)),t.add(a)});const r=Object.getOwnPropertyDescriptor(t,a);let s;if(void 0===r)s={get(){return this[`__transform_${o}`]},set(e){const t=this[`__transform_${o}`],a=this._transformers.get(o);this[`__transform_${o}`]=a?a.call(this,e):e,this[`__original_${o}`]=e,this.requestUpdate(o,t)},configurable:!0,enumerable:!0};else{const e=r.set;s=Object.assign(Object.assign({},r),{},{set(t){const a=this[`__transform_${o}`],i=this._transformers.get(o);this[`__transform_${o}`]=i?i.call(this,t):t,this[`__original_${o}`]=t,this.requestUpdate(o,a),null==e||e.call(this,t)}})}Object.defineProperty(t,a,s)}}},64481:function(e,t,a){a.d(t,{D:function(){return i},J:function(){return s}});a(16280),a(3362),a(55815),a(64979),a(79739);let o=!1;try{o="true"===window.localStorage.getItem("disableViewTransition")}catch(n){}const i=e=>{o=e},r=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e},s=e=>{if(!document.startViewTransition||o)return e(!1),Promise.resolve();let t=!1;try{const a=document.startViewTransition(()=>{t=!0,e(!0)});return a.ready.catch(r),a.finished.catch(r)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),t?Promise.reject(a):(e(!1),Promise.resolve())}}},89300:function(e,t,a){a.a(e,async function(e,t){try{a(62953);var o=a(40445),i=a(5124),r=a(67576),s=a(6412),n=a(18350),l=a(65829),c=(a(67094),e([n,l]));[n,l]=c.then?(await c)():c;let d,h,p,u,f,g,v=e=>e;const b="M2.2,16.06L3.88,12L2.2,7.94L6.26,6.26L7.94,2.2L12,3.88L16.06,2.2L17.74,6.26L21.8,7.94L20.12,12L21.8,16.06L17.74,17.74L16.06,21.8L12,20.12L7.94,21.8L6.26,17.74L2.2,16.06M13,17V15H11V17H13M13,13V7H11V13H13Z",m="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z";class y extends i.WF{render(){const e=this.progress||this._result?"accent":this.appearance;return(0,i.qy)(d||(d=v` <ha-button .appearance="${0}" .disabled="${0}" .loading="${0}" .variant="${0}" class="${0}"> ${0} <slot>${0}</slot> </ha-button> ${0} `),e,this.disabled,this.progress,"success"===this._result?"success":"error"===this._result?"danger":this.variant,(0,s.H)({result:!!this._result,success:"success"===this._result,error:"error"===this._result}),this.iconPath?(0,i.qy)(h||(h=v`<ha-svg-icon .path="${0}" slot="start"></ha-svg-icon>`),this.iconPath):i.s6,this.label,this._result?(0,i.qy)(p||(p=v` <div class="progress"> ${0} </div> `),"success"===this._result?(0,i.qy)(u||(u=v`<ha-svg-icon .path="${0}"></ha-svg-icon>`),m):"error"===this._result?(0,i.qy)(f||(f=v`<ha-svg-icon .path="${0}"></ha-svg-icon>`),b):i.s6):i.s6)}actionSuccess(){this._setResult("success")}actionError(){this._setResult("error")}_setResult(e){this._result=e,setTimeout(()=>{this._result=void 0},2e3)}constructor(...e){super(...e),this.disabled=!1,this.progress=!1,this.appearance="accent",this.variant="brand"}}y.styles=(0,i.AH)(g||(g=v`:host{outline:0;display:inline-block;position:relative}:host([progress]){pointer-events:none}.progress{bottom:0;display:flex;justify-content:center;align-items:center;position:absolute;top:0;width:100%}ha-button{width:100%}ha-button.result::part(caret),ha-button.result::part(end),ha-button.result::part(label),ha-button.result::part(spinner),ha-button.result::part(start){visibility:hidden}:host([appearance=brand]) ha-svg-icon{color:var(--white-color)}`)),(0,o.Cg)([(0,r.MZ)()],y.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],y.prototype,"progress",void 0),(0,o.Cg)([(0,r.MZ)()],y.prototype,"appearance",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],y.prototype,"iconPath",void 0),(0,o.Cg)([(0,r.MZ)()],y.prototype,"variant",void 0),(0,o.Cg)([(0,r.wk)()],y.prototype,"_result",void 0),y=(0,o.Cg)([(0,r.EM)("ha-progress-button")],y),t()}catch(d){t(d)}})},38962:function(e,t,a){a.a(e,async function(e,o){try{a.r(t);a(62953);var i=a(40445),r=a(5124),s=a(67576),n=a(6412),l=a(93421),c=a(1087),d=a(26300),h=(a(67094),e([d]));d=(h.then?(await h)():h)[0];let p,u,f,g,v=e=>e;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",m={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};class y extends r.WF{render(){var e;return(0,r.qy)(p||(p=v` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,n.H)({[this.alertType]:!0}),this.title?"":"no-title",m[this.alertType],(0,n.H)({content:!0,narrow:this.narrow}),this.title?(0,r.qy)(u||(u=v`<div class="title">${0}</div>`),this.title):r.s6,this.dismissable?(0,r.qy)(f||(f=v`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(e=this._localize)||void 0===e?void 0:e.call(this,"ui.common.dismiss_alert"),b):r.s6)}_dismissClicked(){(0,c.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}y.styles=(0,r.AH)(g||(g=v`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`)),(0,i.Cg)([(0,s.MZ)()],y.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"alert-type"})],y.prototype,"alertType",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],y.prototype,"dismissable",void 0),(0,i.Cg)([(0,s.wk)(),(0,l.IW)()],y.prototype,"_localize",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],y.prototype,"narrow",void 0),y=(0,i.Cg)([(0,s.EM)("ha-alert")],y),o()}catch(p){o(p)}})},75064:function(e,t,a){a(62953);var o=a(40445),i=a(5124),r=a(67576),s=a(2846);let n;class l extends s.G{constructor(...e){super(...e),this.borderTop=!1}}l.styles=[...s.J,(0,i.AH)(n||(n=(e=>e)`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var(
--mdc-typography-subtitle1-font-family,
var(--mdc-typography-font-family)
);color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`))],(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],l.prototype,"borderTop",void 0),l=(0,o.Cg)([(0,r.EM)("ha-combo-box-item")],l)},93444:function(e,t,a){var o=a(40445),i=a(5124),r=a(67576);let s,n,l=e=>e;class c extends i.WF{render(){return(0,i.qy)(s||(s=l` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,i.AH)(n||(n=l`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}c=(0,o.Cg)([(0,r.EM)("ha-dialog-footer")],c)},76538:function(e,t,a){a(62953);var o=a(40445),i=a(5124),r=a(67576);let s,n,l,c,d,h,p=e=>e;class u extends i.WF{render(){const e=(0,i.qy)(s||(s=p`<div class="header-title"> <slot name="title"></slot> </div>`)),t=(0,i.qy)(n||(n=p`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,i.qy)(l||(l=p` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${0} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `),"above"===this.subtitlePosition?(0,i.qy)(c||(c=p`${0}${0}`),t,e):(0,i.qy)(d||(d=p`${0}${0}`),e,t))}static get styles(){return[(0,i.AH)(h||(h=p`: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))}@media 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(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,o.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],u.prototype,"subtitlePosition",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],u.prototype,"showBorder",void 0),u=(0,o.Cg)([(0,r.EM)("ha-dialog-header")],u)},72554:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953),a(49255);var o=a(40445),i=a(93900),r=a(35211),s=a(5124),n=a(67576),l=a(63672),c=a(1087),d=a(64481),h=a(22792),p=a(59992),u=a(14503),f=a(22348),g=(a(76538),a(26300)),v=e([i,g,p]);[i,g,p]=v.then?(await v)():v;let b,m,y,w,_,x,C,$=e=>e;const k="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 M extends((0,p.V)(s.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){var e,t,a;return(0,s.qy)(b||(b=$` <wa-dialog .open="${0}" .lightDismiss="${0}" without-header aria-labelledby="${0}" aria-describedby="${0}" @keydown="${0}" @wa-hide="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-after-hide="${0}"> ${0} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${0}"> <slot></slot> </div> ${0} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `),this._open,!this.preventScrimClose,(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,l.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?s.s6:(0,s.qy)(m||(m=$`<slot name="header"> <ha-dialog-header .subtitlePosition="${0}" .showBorder="${0}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${0}" .path="${0}"></ha-icon-button> </slot> ${0} ${0} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`),this.headerSubtitlePosition,this._bodyScrolled,null!==(e=null===(t=this._i18n)||void 0===t||null===(a=t.localize)||void 0===a?void 0:a.call(t,"ui.common.close"))&&void 0!==e?e:"Close",k,void 0!==this.headerTitle?(0,s.qy)(y||(y=$`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,s.qy)(w||(w=$`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,s.qy)(_||(_=$`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,s.qy)(x||(x=$`<slot name="headerSubtitle" slot="subtitle"></slot>`))),this._handleBodyScroll,this.renderScrollableFades())}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,d.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){var t;const a=(null===(t=e.detail)||void 0===t?void 0:t.source)===e.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,u.dp,(0,s.AH)(C||(C=$`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))}@media (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)}@media 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(...e){super(...e),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 e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,c.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var e,t;if(null!==(e=this._hassConfig)&&void 0!==e&&e.auth.external&&(0,f.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}null===(t=this.querySelector("[autofocus]"))||void 0===t||t.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,c.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,c.r)(this,"closed"))}}}(0,o.Cg)([(0,n.MZ)({attribute:"aria-labelledby"})],M.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"aria-describedby"})],M.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],M.prototype,"open",void 0),(0,o.Cg)([(0,n.MZ)({reflect:!0})],M.prototype,"type",void 0),(0,o.Cg)([(0,n.MZ)({type:String,reflect:!0,attribute:"width"})],M.prototype,"width",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],M.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-title"})],M.prototype,"headerTitle",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"header-subtitle"})],M.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"header-subtitle-position"})],M.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],M.prototype,"flexContent",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,attribute:"without-header"})],M.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,n.wk)()],M.prototype,"_open",void 0),(0,o.Cg)([(0,n.P)(".body")],M.prototype,"bodyContainer",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:h.D5,subscribe:!0})],M.prototype,"_i18n",void 0),(0,o.Cg)([(0,n.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],M.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,n.wk)()],M.prototype,"_bodyScrolled",void 0),(0,o.Cg)([(0,n.Ls)({passive:!0})],M.prototype,"_handleBodyScroll",null),M=(0,o.Cg)([(0,n.EM)("ha-dialog")],M),t()}catch(b){t(b)}})},70947:function(e,t,a){a(62953);var o=a(40445),i=a(50759),r=(a(38625),a(5124)),s=a(67576);a(67094);let n,l,c=e=>e;class d extends i.A{renderCheckboxIcon(){return(0,r.qy)(n||(n=c` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[i.A.styles,(0,r.AH)(l||(l=c`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...e){super(...e),this.selected=!1}}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),d=(0,o.Cg)([(0,s.EM)("ha-dropdown-item")],d)},29823:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),i=a(52254),r=a(5124),s=a(67576),n=e([i]);i=(n.then?(await n)():n)[0];let l,c=e=>e;class d extends i.A{get anchorElement(){var e;return null===(e=this.popup)||void 0===e?void 0:e.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,(0,r.AH)(l||(l=c`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var(
--card-background-color,
var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)),
)}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"dropdownTag",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"dropdownItemTag",void 0),d=(0,o.Cg)([(0,s.EM)("ha-dropdown")],d),t()}catch(l){t(l)}})},47680:function(e,t,a){a.r(t),a.d(t,{HaIcon:function(){return M}});a(74423),a(3362),a(62953);var o=a(40445),i=a(5124),r=a(67576),s=a(1087),n=a(9899),l=a(700),c=(a(44114),a(18111),a(7588),a(96167),a(95192)),d=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let p;const u=()=>(p||(p=f().catch(e=>{throw p=void 0,e})),p),f=async()=>{const e=(0,c.y$)("hass-icon-db","mdi-icon-store"),t=await(0,c.Jt)("_version",e);return t?t!==h.version&&(await(0,c.IU)(e),(0,c.hZ)("_version",h.version,e)):(0,c.hZ)("_version",h.version,e),e},g=["mdi","hass","hassio","hademo"];let v=[];a(67094);let b,m,y,w=e=>e;const _={},x={},C=(0,n.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await u())("readwrite",o=>{a.forEach((a,i)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{o.put(t,e)}),delete e[t[i]]})})})(x),2e3),$={},k={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(e=>e.mdiEsphomeLogo)};class M extends i.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,i.qy)(b||(b=w` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,i.qy)(m||(m=w`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):i.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let o,i=a;if(!t||!i)return;if(!g.includes(t)){const a=l.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(i),e)):void(this._legacy=!0)}if(this._legacy=!1,i in _){const e=_[i];let a;e.newName?(a=`Icon ${t}:${i} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,i=e.newName):a=`Icon ${t}:${i} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(a),(0,s.r)(this,"write_log",{level:"warning",message:a})}if(i in $)return void(this._path=$[i]);if(i in k){const t=await k[i]();return this.icon===e&&(this._path=t),void($[i]=t)}try{o=await(e=>new Promise((t,a)=>{if(v.push([e,t,a]),v.length>1)return;const o=u();(0,d.h)(1e3,(async()=>{(await o)("readonly",e=>{for(const[t,a,o]of v)(0,c.Yd)(e.get(t)).then(e=>a(e)).catch(e=>o(e));v=[]})})()).catch(e=>{for(const[,,t]of v)t(e);v=[]})}))(i)}catch(p){o=void 0}if(o)return this.icon===e&&(this._path=o),void($[i]=o);const r=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(i);if(r in x)return void this._setPath(x[r],i,e);const n=fetch(`/static/mdi/${r}.json`).then(e=>e.json());x[r]=n,this._setPath(n,i,e),n.catch(()=>{delete x[r]}),C()}async _setCustomPath(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(e,t,a){try{const o=await e;this.icon===a&&(this._path=o[t]),$[t]=o[t]}catch(o){}}constructor(...e){super(...e),this._legacy=!1}}M.styles=(0,i.AH)(y||(y=w`:host{fill:currentcolor}`)),(0,o.Cg)([(0,r.MZ)()],M.prototype,"icon",void 0),(0,o.Cg)([(0,r.wk)()],M.prototype,"_path",void 0),(0,o.Cg)([(0,r.wk)()],M.prototype,"_secondaryPath",void 0),(0,o.Cg)([(0,r.wk)()],M.prototype,"_viewBox",void 0),(0,o.Cg)([(0,r.wk)()],M.prototype,"_legacy",void 0),M=(0,o.Cg)([(0,r.EM)("ha-icon")],M)},3449:function(e,t,a){a(62953);var o=a(40445),i=a(5124),r=a(67576);let s,n,l=e=>e;class c extends i.WF{render(){return(0,i.qy)(s||(s=l`<slot></slot>`))}constructor(...e){super(...e),this.disabled=!1}}c.styles=(0,i.AH)(n||(n=l`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var(
--mdc-typography-caption-letter-spacing,
.0333333333em
);line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`)),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),c=(0,o.Cg)([(0,r.EM)("ha-input-helper-text")],c)},88285:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);var o=a(40445),i=a(35211),r=a(5124),s=a(67576),n=a(63672),l=a(1087),c=a(22792),d=a(17894),h=(a(75064),a(47680),a(26300)),p=e([h]);h=(p.then?(await p)():p)[0];let u,f,g,v,b,m,y,w,_,x,C=e=>e;const $="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",k="M7,10L12,15L17,10H7Z";class M extends((0,d.c)(r.WF)){async focus(){var e;await this.updateComplete,await(null===(e=this.item)||void 0===e?void 0:e.focus())}render(){var e,t,a,o;const i=!!this.value,s=!(!this.value||this.required||this.disabled||this.hideClearIcon),l=null!==(e=this.placeholder)&&void 0!==e?e:this.label,c=this.label&&i?(0,r.qy)(u||(u=C`<span slot="overline">${0}${0}</span>`),this.label,this.required?" *":""):r.s6,d=i?this.valueRenderer?this.valueRenderer(null!==(t=this.value)&&void 0!==t?t:""):(0,r.qy)(f||(f=C`<span slot="headline">${0}</span>`),this.value):l?(0,r.qy)(g||(g=C`<span slot="headline" class="placeholder"> ${0}${0} </span>`),l,this.required?" *":""):r.s6;return(0,r.qy)(v||(v=C` <ha-combo-box-item aria-label="${0}" .disabled="${0}" type="button" compact="compact"> ${0} ${0}${0} ${0} ${0} <ha-svg-icon class="arrow" slot="end" .path="${0}"></ha-svg-icon> </ha-combo-box-item> `),(0,n.J)(this.label||this.placeholder),this.disabled,this.image?(0,r.qy)(b||(b=C`<img alt="${0}" slot="start" .src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer">`),null!==(a=this.label)&&void 0!==a?a:"",this.image):this.icon?(0,r.qy)(m||(m=C`<ha-icon slot="start" .icon="${0}"></ha-icon>`),this.icon):(0,r.qy)(y||(y=C`<slot name="start"></slot>`)),c,d,this.unknown?(0,r.qy)(w||(w=C`<div slot="supporting-text" class="unknown"> ${0} </div>`),this.unknownItemText||(null===(o=this._i18n)||void 0===o?void 0:o.localize("ui.components.combo-box.unknown_item"))):r.s6,s?(0,r.qy)(_||(_=C` <ha-icon-button class="clear" slot="end" @click="${0}" .path="${0}"></ha-icon-button> `),this._clear,$):r.s6,k)}_clear(e){e.stopPropagation(),(0,l.r)(this,"clear")}static get styles(){return[(0,r.AH)(x||(x=C`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`))]}constructor(...e){super(...e),this.invalid=!1}}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],M.prototype,"invalid",void 0),(0,o.Cg)([(0,s.P)("ha-combo-box-item",!0)],M.prototype,"item",void 0),(0,o.Cg)([(0,s.wk)(),(0,i.Fg)({context:c.D5,subscribe:!0})],M.prototype,"_i18n",void 0),M=(0,o.Cg)([(0,s.EM)("ha-picker-field")],M),t()}catch(u){t(u)}})},606:function(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(61701),a(62953);var o=a(40445),i=a(5124),r=a(67576),s=a(63672),n=a(22786),l=a(1087),c=a(29823),d=(a(70947),a(3449),a(88285)),h=(a(67094),e([c,d]));[c,d]=h.then?(await h)():h;let p,u,f,g,v,b,m,y,w,_=e=>e;class x extends i.WF{render(){return this.disabled?(0,i.qy)(p||(p=_`${0}${0}`),this._renderField(),this._renderHelper()):(0,i.qy)(u||(u=_` <ha-dropdown placement="bottom" @wa-select="${0}" @wa-show="${0}" @wa-hide="${0}"> ${0} ${0} </ha-dropdown> ${0} `),this._handleSelect,this._handleShow,this._handleHide,this._renderField(),this.options?this.options.map(e=>{var t;const a=["string","number"].includes(typeof e);return(0,i.qy)(f||(f=_` <ha-dropdown-item .value="${0}" .disabled="${0}" .selected="${0}"> ${0} <div class="content"> ${0} ${0} </div> </ha-dropdown-item> `),a?e:e.value,!a&&(null!==(t=e.disabled)&&void 0!==t&&t),this.value===(a?e:e.value),e.iconPath?(0,i.qy)(g||(g=_`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),e.iconPath):i.s6,a?e:e.label||e.value,e.secondary?(0,i.qy)(v||(v=_`<div class="secondary">${0}</div>`),e.secondary):i.s6)}):(0,i.qy)(b||(b=_`<slot></slot>`)),this._renderHelper())}_renderField(){const e=this._getValueLabel(this.options,this.value);return(0,i.qy)(m||(m=_` <ha-picker-field slot="trigger" type="button" class="${0}" compact="compact" aria-label="${0}" @clear="${0}" .label="${0}" .value="${0}" .required="${0}" .disabled="${0}" .hideClearIcon="${0}"> </ha-picker-field> `),this._opened?"opened":"",(0,s.J)(this.label),this._clearValue,this.label,e,this.required,this.disabled,!this.clearable||this.required||this.disabled||!String(this.value))}_renderHelper(){return this.helper?(0,i.qy)(y||(y=_`<ha-input-helper-text .disabled="${0}">${0}</ha-input-helper-text>`),this.disabled,this.helper):i.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,l.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,l.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,n.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const o of e){const e=["string","number"].includes(typeof o);if(e&&o===a||!e&&String(o.value)===a)return e?o:o.label||o.value}return a})}}x.styles=(0,i.AH)(w||(w=_`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`)),(0,o.Cg)([(0,r.MZ)({type:Boolean})],x.prototype,"clearable",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],x.prototype,"options",void 0),(0,o.Cg)([(0,r.MZ)()],x.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],x.prototype,"helper",void 0),(0,o.Cg)([(0,r.MZ)()],x.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],x.prototype,"required",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],x.prototype,"disabled",void 0),(0,o.Cg)([(0,r.wk)()],x.prototype,"_opened",void 0),(0,o.Cg)([(0,r.P)("ha-picker-field")],x.prototype,"_triggerField",void 0),x=(0,o.Cg)([(0,r.EM)("ha-select")],x),t()}catch(p){t(p)}})},65829:function(e,t,a){a.a(e,async function(e,o){try{a.r(t),a.d(t,{HaSpinner:function(){return h}});var i=a(40445),r=a(55262),s=a(5124),n=a(67576),l=e([r]);r=(l.then?(await l)():l)[0];let c,d=e=>e;class h extends r.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[r.A.styles,(0,s.AH)(c||(c=d`:host{--indicator-color:var(
--ha-spinner-indicator-color,
var(--primary-color)
);--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,i.Cg)([(0,n.MZ)()],h.prototype,"size",void 0),h=(0,i.Cg)([(0,n.EM)("ha-spinner")],h),o()}catch(c){o(c)}})},700:function(e,t,a){a.d(t,{y:function(){return s}});const o=window;"customIconsets"in o||(o.customIconsets={});const i=o.customIconsets,r=window;"customIcons"in r||(r.customIcons={});const s=new Proxy(r.customIcons,{get:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:i[t]?{getIcon:i[t]}:void 0}})},17894:function(e,t,a){a.d(t,{c:function(){return r}});a(62953);var o=a(40445),i=a(67576);const r=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,o.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"icon",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"image",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"label",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"placeholder",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"helper",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"value",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,o.Cg)([(0,i.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,o.Cg)([(0,i.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},59992:function(e,t,a){a.a(e,async function(e,o){try{a.d(t,{V:function(){return f}});a(62953);var i=a(40445),r=a(88696),s=a(5124),n=a(6412),l=a(67576),c=e([r]);r=(c.then?(await c)():c)[0];let d,h,p=e=>e;const u=e=>void 0===e?[]:Array.isArray(e)?e:[e],f=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){var t;null===(t=super.firstUpdated)||void 0===t||t.call(this,e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){var t;null===(t=super.updated)||void 0===t||t.call(this,e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return(0,s.qy)(d||(d=p` <div class="${0}"></div> <div class="${0}"></div> `),(0,n.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled}),(0,n.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable}))}static get styles(){var e;const t=Object.getPrototypeOf(this);return[...u(null!==(e=null==t?void 0:t.styles)&&void 0!==e?e:[]),(0,s.AH)(h||(h=p`.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 e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){var e,t;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(e=(t=this._resize).unobserve)||void 0===e||e.call(t,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:o=0,scrollTop:i=0}=e;this._contentScrollable=a-o>i+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{var t;const a=e.currentTarget;this._contentScrolled=(null!==(t=a.scrollTop)&&void 0!==t?t:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new r.P(this,{target:null,callback:e=>{var t;const a=null===(t=e[0])||void 0===t?void 0:t.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,i.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,i.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t};o()}catch(d){o(d)}})},27388:function(e,t,a){a.a(e,async function(e,o){try{a.r(t);a(3362),a(62953);var i=a(40445),r=a(5124),s=a(67576),n=a(1087),l=a(89300),c=a(38962),d=a(18350),h=(a(93444),a(72554)),p=a(606),u=a(84621),f=a(65063),g=e([l,c,d,h,p]);[l,c,d,h,p]=g.then?(await g)():g;let v,b=e=>e;const m=["auto",11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26];class y extends r.WF{showDialog(e){this._params=e,this._newChannel="auto",this._open=!0}closeDialog(){return!this._migrationInProgress&&(this._open=!1,!0)}_dialogClosed(){this._params=void 0,this._newChannel=void 0,this._migrationInProgress=!1,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._params?(0,r.qy)(v||(v=b` <ha-dialog .open="${0}" header-title="${0}" prevent-scrim-close @closed="${0}"> <ha-alert alert-type="warning" .title="${0}"> ${0} </ha-alert> <p> ${0} </p> <p> ${0} </p> <ha-select .label="${0}" autofocus @selected="${0}" .value="${0}" .options="${0}"> </ha-select> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${0}" .disabled="${0}"> ${0} </ha-button> <ha-progress-button slot="primaryAction" .progress="${0}" .disabled="${0}" @click="${0}"> ${0} </ha-progress-button> </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.panel.config.zha.change_channel_dialog.title"),this._dialogClosed,this.hass.localize("ui.panel.config.zha.change_channel_dialog.migration_warning_title"),this.hass.localize("ui.panel.config.zha.change_channel_dialog.migration_warning"),this.hass.localize("ui.panel.config.zha.change_channel_dialog.description"),this.hass.localize("ui.panel.config.zha.change_channel_dialog.smart_explanation"),this.hass.localize("ui.panel.config.zha.change_channel_dialog.new_channel"),this._newChannelChosen,String(this._newChannel),m.map(e=>({value:String(e),label:"auto"===e?this.hass.localize("ui.panel.config.zha.change_channel_dialog.channel_auto"):String(e)})),this.closeDialog,this._migrationInProgress,this.hass.localize("ui.common.cancel"),this._migrationInProgress,this._migrationInProgress,this._changeNetworkChannel,this.hass.localize("ui.panel.config.zha.change_channel_dialog.change_channel")):r.s6}_newChannelChosen(e){const t=e.detail.value;this._newChannel="auto"===t?"auto":parseInt(t,10)}async _changeNetworkChannel(){try{this._migrationInProgress=!0,await(0,u.p7)(this.hass,this._newChannel)}finally{this._migrationInProgress=!1}await(0,f.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.zha.change_channel_dialog.channel_has_been_changed"),text:this.hass.localize("ui.panel.config.zha.change_channel_dialog.devices_will_rejoin")}),this.closeDialog()}constructor(...e){super(...e),this._migrationInProgress=!1,this._open=!1}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],y.prototype,"_migrationInProgress",void 0),(0,i.Cg)([(0,s.wk)()],y.prototype,"_params",void 0),(0,i.Cg)([(0,s.wk)()],y.prototype,"_newChannel",void 0),(0,i.Cg)([(0,s.wk)()],y.prototype,"_open",void 0),y=(0,i.Cg)([(0,s.EM)("dialog-zha-change-channel")],y),o()}catch(v){o(v)}})},69235:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e(71055).then(a.bind(a,52370))).default),t()}catch(o){t(o)}},1)},22348:function(e,t,a){a.d(t,{V:function(){return i}});var o=a(37177);const i=e=>!!e&&o.n},37177:function(e,t,a){a.d(t,{n:function(){return o}});a(27495);const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);