"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["36735"],{26218:function(t,e,i){i.d(e,{a:function(){return o}});i(16280);const a=(0,i(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function o(t){return(e,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const o=e.connectedCallback;e.connectedCallback=function(){o.call(this);const e=this[i];e&&this.updateComplete.then(()=>{const i=this.renderRoot.querySelector(t);i&&setTimeout(()=>{i.scrollTop=e},0)})};const r=Object.getOwnPropertyDescriptor(e,i);let n;if(void 0===r)n={get(){var t;return this[`__${String(i)}`]||(null===(t=history.state)||void 0===t?void 0:t.scrollPosition)},set(t){a(t),this[`__${String(i)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;n=Object.assign(Object.assign({},r),{},{set(e){a(e),this[`__${String(i)}`]=e,null==t||t.call(this,e)}})}Object.defineProperty(e,i,n)}}},68348:function(t,e,i){i.d(e,{u:function(){return a}});i(18111),i(13579);const a=t=>{var e;if(t.some(t=>"tagName"in t&&("HA-MENU"===t.tagName||"HA-CODE-EDITOR"===t.tagName)))return!1;const i=t[0];if("TEXTAREA"===i.tagName)return!1;if("HA-SELECT"===(null===(e=i.parentElement)||void 0===e?void 0:e.tagName))return!1;if("INPUT"!==i.tagName)return!0;switch(i.type){case"button":case"checkbox":case"hidden":case"radio":case"range":return!0;default:return!1}}},76830:function(t,e,i){i.d(e,{d:function(){return a}});i(18111),i(20116);const a=(t,e=!0)=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey)return;const i=t.composedPath().find(t=>"A"===t.tagName);if(!i||i.target||i.hasAttribute("download")||"external"===i.getAttribute("rel"))return;let a=i.href;if(!a||-1!==a.indexOf("mailto:"))return;const o=window.location,r=o.origin||o.protocol+"//"+o.host;return a.startsWith(r)&&(a=a.slice(r.length),"#"!==a)?(e&&t.preventDefault(),a):void 0}},77796:function(t,e,i){i.d(e,{n:function(){return a}});i(62953);const a=(t,e,i=!0,a=!0)=>{let o,r=0;const n=(...n)=>{const s=()=>{r=!1===i?0:Date.now(),o=void 0,t(...n)},l=Date.now();r||!1!==i||(r=l);const c=e-(l-r);c<=0||c>e?(o&&(clearTimeout(o),o=void 0),r=l,t(...n)):o||!1===a||(o=window.setTimeout(s,c))};return n.cancel=()=>{clearTimeout(o),o=void 0,r=0},n}},64481:function(t,e,i){i.d(e,{D:function(){return o},J:function(){return r}});i(3362);let a=!1;try{a="true"===window.localStorage.getItem("disableViewTransition")}catch{}const o=t=>{a=t},r=t=>{if(!document.startViewTransition||a)return t(!1),Promise.resolve();let e=!1;try{return document.startViewTransition(()=>{e=!0,t(!0)}).finished}catch(i){return console.warn("View transition failed, falling back to direct execution.",i),e?Promise.reject(i):(t(!1),Promise.resolve())}}},34296:function(t,e,i){i(62953);var a=i(40445),o=i(96229),r=i(26069),n=i(91735),s=i(42034),l=i(96196),c=i(77845);let d,h,p,u,g=t=>t;class f extends o.k{renderOutline(){return this.filled?(0,l.qy)(d||(d=g`<span class="filled"></span>`)):super.renderOutline()}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{active:this.active})}renderPrimaryContent(){return(0,l.qy)(h||(h=g` <span class="leading icon" aria-hidden="true"> ${0} </span> <span class="label">${0}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${0} </span> `),this.renderLeadingIcon(),this.label,this.renderTrailingIcon())}renderTrailingIcon(){return(0,l.qy)(p||(p=g`<slot name="trailing-icon"></slot>`))}constructor(...t){super(...t),this.filled=!1,this.active=!1}}f.styles=[n.R,s.R,r.R,(0,l.AH)(u||(u=g`:host{--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-surface:var(--primary-text-color);--md-assist-chip-container-shape:var(
          --ha-assist-chip-container-shape,
          16px
        );--md-assist-chip-outline-color:var(--outline-color);--md-assist-chip-label-text-weight:400}.filled{display:flex;pointer-events:none;border-radius:inherit;inset:0;position:absolute;background-color:var(--ha-assist-chip-filled-container-color)}::slotted([slot=icon]),::slotted([slot=trailing-icon]){display:flex;--mdc-icon-size:var(--md-input-chip-icon-size, 18px);font-size:var(--_label-text-size)!important}.trailing.icon ::slotted(*),.trailing.icon svg{margin-inline-end:unset;margin-inline-start:var(--_icon-label-space)}::before{background:var(--ha-assist-chip-container-color,transparent);opacity:var(--ha-assist-chip-container-opacity, 1)}:where(.active)::before{background:var(--ha-assist-chip-active-container-color);opacity:var(--ha-assist-chip-active-container-opacity)}.label{font-family:var(--ha-font-family-body)}`))],(0,a.Cg)([(0,c.MZ)({type:Boolean,reflect:!0})],f.prototype,"filled",void 0),(0,a.Cg)([(0,c.MZ)({type:Boolean})],f.prototype,"active",void 0),f=(0,a.Cg)([(0,c.EM)("ha-assist-chip")],f)},9503:function(t,e,i){var a=i(40445),o=i(69162),r=i(47191),n=i(96196),s=i(77845);let l;class c extends o.L{}c.styles=[r.R,(0,n.AH)(l||(l=(t=>t)`:host{--mdc-theme-secondary:var(--primary-color)}`))],c=(0,a.Cg)([(0,s.EM)("ha-checkbox")],c)},70947:function(t,e,i){i(62953);var a=i(40445),o=i(90075),r=(i(43776),i(96196)),n=i(77845);i(67094);let s,l,c=t=>t;class d extends o.A{renderCheckboxIcon(){return(0,r.qy)(s||(s=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[o.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(...t){super(...t),this.selected=!1}}(0,a.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],d.prototype,"selected",void 0),d=(0,a.Cg)([(0,n.EM)("ha-dropdown-item")],d)},29823:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);var a=i(40445),o=i(52254),r=i(96196),n=i(77845),s=t([o]);o=(s.then?(await s)():s)[0];let l,c=t=>t;class d extends o.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[o.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)}`))]}constructor(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,a.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"dropdownTag",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"dropdownItemTag",void 0),d=(0,a.Cg)([(0,n.EM)("ha-dropdown")],d),e()}catch(l){e(l)}})},27661:function(t,e,i){var a=i(40445),o=i(51978),r=i(94743),n=i(77845),s=i(96196),l=i(63091);let c,d,h,p=t=>t;class u extends o.n{firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}}u.styles=[r.R,(0,s.AH)(c||(c=p`:host{--mdc-typography-button-text-transform:none;--mdc-typography-button-font-size:var(--ha-font-size-l);--mdc-typography-button-font-family:var(--ha-font-family-body);--mdc-typography-button-font-weight:var(--ha-font-weight-medium)}:host .mdc-fab--extended{border-radius:var(--ha-button-border-radius,var(--ha-border-radius-pill))}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:var(--ha-button-border-radius,var(--ha-border-radius-pill))}:host .mdc-fab--extended .mdc-fab__icon{margin-inline-start:-8px;margin-inline-end:12px;direction:var(--direction)}:disabled{--mdc-theme-secondary:var(--disabled-text-color);cursor:not-allowed!important}`)),"rtl"===l.G.document.dir?(0,s.AH)(d||(d=p`:host .mdc-fab--extended .mdc-fab__icon{direction:rtl}`)):(0,s.AH)(h||(h=p``))],u=(0,a.Cg)([(0,n.EM)("ha-fab")],u)},90248:function(t,e,i){i.a(t,async function(t,a){try{i.r(e),i.d(e,{HaIconButtonArrowPrev:function(){return g}});i(62953);var o=i(40445),r=i(96196),n=i(77845),s=i(63091),l=i(26300),c=t([l]);l=(c.then?(await c)():c)[0];let d,h=t=>t;const p="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",u="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class g extends r.WF{render(){var t;return(0,r.qy)(d||(d=h` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(t=this.hass)||void 0===t?void 0:t.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?u:p}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],g.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)()],g.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)()],g.prototype,"href",void 0),(0,o.Cg)([(0,n.MZ)()],g.prototype,"target",void 0),(0,o.Cg)([(0,n.MZ)()],g.prototype,"rel",void 0),(0,o.Cg)([(0,n.MZ)()],g.prototype,"download",void 0),(0,o.Cg)([(0,n.wk)()],g.prototype,"_icon",void 0),g=(0,o.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],g),a()}catch(d){a(d)}})},26300:function(t,e,i){i.a(t,async function(t,a){try{i.r(e),i.d(e,{HaIconButton:function(){return f}});i(62953);var o=i(40445),r=i(96196),n=i(77845),s=i(32288),l=i(18350),c=(i(67094),t([l]));l=(c.then?(await c)():c)[0];let d,h,p,u,g=t=>t;class f extends r.WF{render(){return(0,r.qy)(d||(d=g` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,s.J)(this.label),(0,s.J)(this.hideTitle?void 0:this.label),(0,s.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,r.qy)(h||(h=g`<ha-svg-icon .path="${0}"></ha-svg-icon>`),this.path):(0,r.qy)(p||(p=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,r.AH)(u||(u=g`: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}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)({type:String})],f.prototype,"path",void 0),(0,o.Cg)([(0,n.MZ)({type:String})],f.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,o.Cg)([(0,n.MZ)()],f.prototype,"href",void 0),(0,o.Cg)([(0,n.MZ)()],f.prototype,"target",void 0),(0,o.Cg)([(0,n.MZ)()],f.prototype,"rel",void 0),(0,o.Cg)([(0,n.MZ)()],f.prototype,"download",void 0),f=(0,o.Cg)([(0,n.EM)("ha-icon-button")],f),a()}catch(d){a(d)}})},2054:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(62953);var a=i(40445),o=i(96196),r=i(77845),n=i(1087),s=i(44249),l=i(26300),c=t([l]);l=(c.then?(await c)():c)[0];let d,h,p,u=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends o.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return o.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,o.qy)(d||(d=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,o.qy)(h||(h=u`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,i=t.has("narrow")?t.get("narrow"):this.narrow,a=!1===(null==e?void 0:e.kioskMode)&&(i||"always_hidden"===(null==e?void 0:e.dockedSidebar)),o=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,s.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,o.AH)(p||(p=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,a.Cg)([(0,r.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,r.wk)()],f.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,r.wk)()],f.prototype,"_show",void 0),f=(0,a.Cg)([(0,r.EM)("ha-menu-button")],f),e()}catch(d){e(d)}})},54276:function(t,e,i){i(62953);var a=i(40445),o=i(76482),r=i(91382),n=i(96245),s=i(96196),l=i(77845);let c;class d extends r.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new o.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[n.R,(0,s.AH)(c||(c=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
          --ha-ripple-hover-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        );--md-ripple-pressed-color:var(
          --ha-ripple-pressed-color,
          var(--ha-ripple-color, var(--secondary-text-color))
        )}`))],d=(0,a.Cg)([(0,l.EM)("ha-ripple")],d)},67094:function(t,e,i){i.r(e),i.d(e,{HaSvgIcon:function(){return h}});var a=i(40445),o=i(96196),r=i(77845);let n,s,l,c,d=t=>t;class h extends o.WF{render(){return(0,o.JW)(n||(n=d` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,o.JW)(s||(s=d`<path class="primary-path" d="${0}"></path>`),this.path):o.s6,this.secondaryPath?(0,o.JW)(l||(l=d`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):o.s6)}}h.styles=(0,o.AH)(c||(c=d`: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,a.Cg)([(0,r.MZ)()],h.prototype,"path",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"viewBox",void 0),h=(0,a.Cg)([(0,r.EM)("ha-svg-icon")],h)},75709:function(t,e,i){i.d(e,{h:function(){return g}});i(62953);var a=i(40445),o=i(71714),r=i(92347),n=i(96196),s=i(77845),l=i(63091);let c,d,h,p,u=t=>t;class g extends o.J{updated(t){super.updated(t),(t.has("invalid")||t.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||t.has("invalid")&&void 0!==t.get("invalid"))&&this.reportValidity()),t.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),t.has("autocorrect")&&(!1===this.autocorrect?this.formElement.setAttribute("autocorrect","off"):this.formElement.removeAttribute("autocorrect")),t.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}renderIcon(t,e=!1){const i=e?"trailing":"leading";return(0,n.qy)(c||(c=u` <span class="mdc-text-field__icon mdc-text-field__icon--${0}" tabindex="${0}"> <slot name="${0}Icon"></slot> </span> `),i,e?1:-1,i)}constructor(...t){super(...t),this.icon=!1,this.iconTrailing=!1,this.autocorrect=!0}}g.styles=[r.R,(0,n.AH)(d||(d=u`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding-top:var(--text-field-padding-top,0px);padding-bottom:var(--text-field-padding-bottom,0px);padding-inline-start:var(--text-field-padding-start,16px);padding-inline-end:var(--text-field-padding-end,16px)}.mdc-text-field__affix--suffix{padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-trailing-icon{padding-inline-start:var(--text-field-suffix-padding-left,16px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:var(--direction)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){max-width:calc(100% - 16px)}.mdc-floating-label--float-above{max-width:calc((100% - 16px)/ .75);transition:none}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{padding-inline-end:16px;padding-inline-start:initial;inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start);box-sizing:border-box;text-overflow:ellipsis}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`)),"rtl"===l.G.document.dir?(0,n.AH)(h||(h=u`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`)):(0,n.AH)(p||(p=u``))],(0,a.Cg)([(0,s.MZ)({type:Boolean})],g.prototype,"invalid",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"error-message"})],g.prototype,"errorMessage",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],g.prototype,"icon",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],g.prototype,"iconTrailing",void 0),(0,a.Cg)([(0,s.MZ)()],g.prototype,"autocomplete",void 0),(0,a.Cg)([(0,s.MZ)({type:Boolean})],g.prototype,"autocorrect",void 0),(0,a.Cg)([(0,s.MZ)({attribute:"input-spellcheck"})],g.prototype,"inputSpellcheck",void 0),(0,a.Cg)([(0,s.P)("input")],g.prototype,"formElement",void 0),g=(0,a.Cg)([(0,s.EM)("ha-textfield")],g)},44249:function(t,e,i){i.d(e,{V:function(){return a}});i(62953);const a=(t,e)=>{const i=new o,a=t.subscribeMessage(t=>e(i.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{a.then(t=>null==t?void 0:t())}};class o{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications={...this.notifications,...t.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},84621:function(t,e,i){i.d(e,{$:function(){return _},A2:function(){return V},C2:function(){return a},Iu:function(){return z},Ky:function(){return d},Lj:function(){return c},Mo:function(){return E},On:function(){return s},P0:function(){return M},PA:function(){return l},Qo:function(){return C},RW:function(){return k},Uc:function(){return n},Ui:function(){return b},VC:function(){return $},VK:function(){return T},Yf:function(){return N},ZU:function(){return r},cm:function(){return f},f7:function(){return H},hi:function(){return x},i_:function(){return u},jm:function(){return Z},kH:function(){return h},ks:function(){return p},oM:function(){return g},p7:function(){return S},pl:function(){return v},rv:function(){return m},sb:function(){return L},tg:function(){return A},tv:function(){return w},xU:function(){return o},zt:function(){return y}});const a=(t,e,i)=>t.connection.subscribeMessage(t=>i(t),{type:"zha/devices/reconfigure",ieee:e}),o=t=>t.callWS({type:"zha/topology/update"}),r=(t,e,i,a,o)=>t.callWS({type:"zha/devices/clusters/attributes",ieee:e,endpoint_id:i,cluster_id:a,cluster_type:o}),n=t=>t.callWS({type:"zha/devices"}),s=(t,e)=>t.callWS({type:"zha/device",ieee:e}),l=(t,e)=>t.callWS({type:"zha/devices/bindable",ieee:e}),c=(t,e,i)=>t.callWS({type:"zha/devices/bind",source_ieee:e,target_ieee:i}),d=(t,e,i)=>t.callWS({type:"zha/devices/unbind",source_ieee:e,target_ieee:i}),h=(t,e,i,a)=>t.callWS({type:"zha/groups/bind",source_ieee:e,group_id:i,bindings:a}),p=(t,e,i,a)=>t.callWS({type:"zha/groups/unbind",source_ieee:e,group_id:i,bindings:a}),u=(t,e)=>t.callWS(Object.assign(Object.assign({},e),{},{type:"zha/devices/clusters/attributes/value"})),g=(t,e,i,a,o)=>t.callWS({type:"zha/devices/clusters/commands",ieee:e,endpoint_id:i,cluster_id:a,cluster_type:o}),f=(t,e)=>t.callWS({type:"zha/devices/clusters",ieee:e}),v=t=>t.callWS({type:"zha/groups"}),m=(t,e)=>t.callWS({type:"zha/group/remove",group_ids:e}),b=(t,e)=>t.callWS({type:"zha/group",group_id:e}),y=t=>t.callWS({type:"zha/devices/groupable"}),x=(t,e,i)=>t.callWS({type:"zha/group/members/add",group_id:e,members:i}),w=(t,e,i)=>t.callWS({type:"zha/group/members/remove",group_id:e,members:i}),_=(t,e,i,a)=>t.callWS({type:"zha/group/add",group_name:e,group_id:i,members:a}),C=t=>t.callWS({type:"zha/configuration"}),k=(t,e)=>t.callWS({type:"zha/configuration/update",data:e}),M=t=>t.callWS({type:"zha/network/settings"}),z=t=>t.callWS({type:"zha/network/backups/create"}),S=(t,e)=>t.callWS({type:"zha/network/change_channel",new_channel:e}),A="INITIALIZED",E="INTERVIEW_COMPLETE",H="CONFIGURED",T=["PAIRED",H,E],$=["device_joined","raw_device_initialized","device_fully_initialized"],Z="log_output",V="zha_channel_bind",L="zha_channel_configure_reporting",N="zha_channel_cfg_done"},59992:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{V:function(){return g}});i(62953);var o=i(40445),r=i(88696),n=i(96196),s=i(94333),l=i(77845),c=t([r]);r=(c.then?(await c)():c)[0];let d,h,p=t=>t;const u=t=>void 0===t?[]:Array.isArray(t)?t:[t],g=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,n.qy)(d||(d=p` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...u(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,n.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 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(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:i=0,clientHeight:a=0,scrollTop:o=0}=t;this._contentScrollable=i-a>o+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const i=t.currentTarget;this._contentScrolled=(null!==(e=i.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(i)},this._resize=new r.P(this,{target:null,callback:t=>{var e;const i=null===(e=t[0])||void 0===e?void 0:e.target;i&&this._updateScrollableState(i)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],e.prototype,"_contentScrollable",void 0),e};a()}catch(d){a(d)}})},31580:function(t,e,i){i.d(e,{J8:function(){return o},Rr:function(){return n},b9:function(){return a},iV:function(){return r}});i(94490);const a=t=>{let e=t;return"string"==typeof t&&(e=parseInt(t,16)),"0x"+e.toString(16).padStart(4,"0")},o=(t,e)=>{const i=t.user_given_name?t.user_given_name:t.name,a=e.user_given_name?e.user_given_name:e.name;return i.localeCompare(a)},r=(t,e)=>{const i=t.name,a=e.name;return i.localeCompare(a)},n=t=>`${t.name} (Endpoint id: ${t.endpoint_id}, Id: ${a(t.id)}, Type: ${t.type})`},32168:function(t,e,i){i.a(t,async function(t,a){try{i.r(e),i.d(e,{ZHAGroupsDashboard:function(){return _}});i(26910),i(18111),i(61701),i(3362),i(62953);var o=i(40445),r=i(96196),n=i(77845),s=i(22786),l=i(91926),c=(i(27661),i(26300)),d=i(84621),h=i(72553),p=i(14503),u=i(31580),g=t([c,h]);[c,h]=g.then?(await g)():g;let f,v,m,b,y=t=>t;const x="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",w=[{translationKey:"ui.panel.config.zha.groups.caption",path:"/config/zha/groups",iconPath:"M22,4A2,2 0 0,1 24,6V16A2,2 0 0,1 22,18H6A2,2 0 0,1 4,16V4A2,2 0 0,1 6,2H12L14,4H22M2,6V20H20V22H2A2,2 0 0,1 0,20V11H0V6H2M6,6V16H22V6H6Z"}];class _ extends r.WF{connectedCallback(){super.connectedCallback(),this.hass&&this._firstUpdatedCalled&&this._fetchGroups()}firstUpdated(t){super.firstUpdated(t),this.hass&&this._fetchGroups(),this._firstUpdatedCalled=!0}render(){return(0,r.qy)(f||(f=y` <hass-tabs-subpage-data-table .tabs="${0}" back-path="/config/zha/dashboard" .hass="${0}" .narrow="${0}" .route="${0}" .columns="${0}" .data="${0}" @row-click="${0}" clickable has-fab> <a href="/config/zha/group-add" slot="fab"> <ha-fab .label="${0}" extended> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-fab> </a> </hass-tabs-subpage-data-table> `),w,this.hass,this.narrow,this.route,this._columns(this.hass.localize),this._formattedGroups(this._groups),this._handleRowClicked,this.hass.localize("ui.panel.config.zha.groups.add_group"),x)}async _fetchGroups(){this._groups=(await(0,d.pl)(this.hass)).sort(u.iV)}_handleRowClicked(t){const e=t.detail.id;(0,l.o)(`/config/zha/group/${e}`)}static get styles(){return[p.RF,(0,r.AH)(v||(v=y`a{color:var(--primary-color)}`))]}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this._groups=[],this._firstUpdatedCalled=!1,this._formattedGroups=(0,s.A)(t=>{let e=t;return e=e.map(t=>Object.assign(Object.assign({},t),{},{id:String(t.group_id)})),e}),this._columns=(0,s.A)(t=>({name:{title:t("ui.panel.config.zha.groups.groups"),sortable:!0,filterable:!0,showNarrow:!0,main:!0,hideable:!1,moveable:!1,direction:"asc",flex:2},group_id:{title:t("ui.panel.config.zha.groups.group_id"),type:"numeric",template:t=>(0,r.qy)(m||(m=y` ${0} `),(0,u.b9)(t.group_id)),sortable:!0},members:{title:t("ui.panel.config.zha.groups.members"),type:"numeric",template:t=>(0,r.qy)(b||(b=y` ${0} `),t.members.length),sortable:!0}}))}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({attribute:!1})],_.prototype,"route",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],_.prototype,"narrow",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"is-wide",type:Boolean})],_.prototype,"isWide",void 0),(0,o.Cg)([(0,n.wk)()],_.prototype,"_groups",void 0),_=(0,o.Cg)([(0,n.EM)("zha-groups-dashboard")],_),a()}catch(f){a(f)}})},69235:function(t,e,i){i.a(t,async function(t,e){try{i(3362),i(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await i.e("71055").then(i.bind(i,52370))).default),e()}catch(a){e(a)}},1)},14503:function(t,e,i){i.d(e,{RF:function(){return p},dp:function(){return f},kO:function(){return g},nA:function(){return u},og:function(){return h}});var a=i(96196);let o,r,n,s,l,c,d=t=>t;const h=(0,a.AH)(o||(o=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),p=(0,a.AH)(r||(r=d`: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}@media (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)}${0} .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}`),h),u=(0,a.AH)(n||(n=d`
  ha-dialog,
  ha-adaptive-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-dialog .form,
  ha-adaptive-dialog .form {
    color: var(--primary-text-color);
  }

  a {
    color: var(--primary-color);
  }

  /* make dialog fullscreen on small screens */
  @media all and (max-width: 450px), all and (max-height: 500px) {
    ha-dialog,
    ha-adaptive-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-border-radius: var(--ha-border-radius-square);
    ha-dialog,
    ha-adaptive-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);
  }
`)),g=(0,a.AH)(s||(s=d`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
        )
    )}@media 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}}`)),f=(0,a.AH)(l||(l=d`.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}`));(0,a.AH)(c||(c=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},85614:function(t,e,i){i.d(e,{i:function(){return a}});i(3362),i(62953);const a=async()=>{await Promise.all([i.e("38085"),i.e("64391")]).then(i.bind(i,40772))}},22348:function(t,e,i){i.d(e,{V:function(){return o}});var a=i(37177);const o=t=>!!t.auth.external&&a.n},37177:function(t,e,i){i.d(e,{n:function(){return a}});i(27495);const a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}]);
//# sourceMappingURL=36735.e62cbd3392a2ba89.js.map