export const __rspack_esm_id="94559";export const __rspack_esm_ids=["94559"];export const __webpack_modules__={26218(t,a,e){e.d(a,{a:()=>i});const o=(0,e(77796).n)(t=>{history.replaceState({scrollPosition:t},"")},300);function i(t){return(a,e)=>{if("object"==typeof e)throw new Error("This decorator does not support this compilation type.");const i=a.connectedCallback;a.connectedCallback=function(){i.call(this);const a=this[e];a&&this.updateComplete.then(()=>{const e=this.renderRoot.querySelector(t);e&&setTimeout(()=>{e.scrollTop=a},0)})};const r=Object.getOwnPropertyDescriptor(a,e);let n;if(void 0===r)n={get(){return this[`__${String(e)}`]||history.state?.scrollPosition},set(t){o(t),this[`__${String(e)}`]=t},configurable:!0,enumerable:!0};else{const t=r.set;n={...r,set(a){o(a),this[`__${String(e)}`]=a,t?.call(this,a)}}}Object.defineProperty(a,e,n)}}},77796(t,a,e){e.d(a,{n:()=>o});const o=(t,a,e=!0,o=!0)=>{let i,r=0;const n=(...n)=>{const s=()=>{r=!1===e?0:Date.now(),i=void 0,t(...n)},l=Date.now();r||!1!==e||(r=l);const d=a-(l-r);d<=0||d>a?(i&&(clearTimeout(i),i=void 0),r=l,t(...n)):i||!1===o||(i=window.setTimeout(s,d))};return n.cancel=()=>{clearTimeout(i),i=void 0,r=0},n}},76776(t,a,e){var o=e(62826),i=e(96196),r=e(97735);class n extends i.WF{render(){return i.qy` ${this.header?i.qy`<h1 class="card-header">${this.header}</h1>`:i.s6} <slot></slot> `}constructor(...t){super(...t),this.raised=!1}}n.styles=i.AH`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
    :host
      ::slotted(
        .card-content:not(:nth-child(1 of .card-content, .card-header))
      ),
    slot:not(:first-child)::slotted(.card-content) {
      padding-top: 0;
      margin-top: calc(var(--ha-space-2) * -1);
    }
    :host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`,(0,o.Cg)([(0,r.MZ)()],n.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],n.prototype,"raised",void 0),n=(0,o.Cg)([(0,r.EM)("ha-card")],n)},27661(t,a,e){var o=e(62826),i=e(51978),r=e(94743),n=e(97735),s=e(96196),l=e(63091);class d extends i.n{firstUpdated(t){super.firstUpdated(t),this.style.setProperty("--mdc-theme-secondary","var(--primary-color)")}}d.styles=[r.R,s.AH`: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?s.AH`:host .mdc-fab--extended .mdc-fab__icon{direction:rtl}`:s.AH``],d=(0,o.Cg)([(0,n.EM)("ha-fab")],d)},90248(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{HaIconButtonArrowPrev:()=>p});var i=e(62826),r=e(96196),n=e(97735),s=e(63091),l=e(26300),d=t([l]);l=(d.then?(await d)():d)[0];const c="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",h="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class p extends r.WF{render(){return r.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===s.G.document.dir?h:c}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"download",void 0),(0,i.Cg)([(0,n.wk)()],p.prototype,"_icon",void 0),p=(0,i.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],p),o()}catch(t){o(t)}})},26300(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{HaIconButton:()=>c});var i=e(62826),r=e(96196),n=e(97735),s=e(32288),l=e(18350),d=(e(67094),t([l]));l=(d.then?(await d)():d)[0];class c extends r.WF{render(){return r.qy` <ha-button appearance="plain" variant="neutral" aria-label="${(0,s.J)(this.label)}" title="${(0,s.J)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,s.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 .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}}c.shadowRootOptions={mode:"open",delegatesFocus:!0},c.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}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`,(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],c.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({type:String})],c.prototype,"label",void 0),(0,i.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],c.prototype,"ariaHasPopup",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],c.prototype,"hideTitle",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],c.prototype,"selected",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"href",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"target",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"rel",void 0),(0,i.Cg)([(0,n.MZ)()],c.prototype,"download",void 0),c=(0,i.Cg)([(0,n.EM)("ha-icon-button")],c),o()}catch(t){o(t)}})},43661(t,a,e){e.r(a),e.d(a,{HaIconNext:()=>s});var o=e(62826),i=e(97735),r=e(63091),n=e(67094);class s extends n.HaSvgIcon{constructor(...t){super(...t),this.path="rtl"===r.G.document.dir?"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z":"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}}(0,o.Cg)([(0,i.MZ)()],s.prototype,"path",void 0),s=(0,o.Cg)([(0,i.EM)("ha-icon-next")],s)},2846(t,a,e){e.d(a,{G:()=>d,J:()=>l});var o=e(62826),i=e(12415),r=e(82553),n=e(96196),s=e(97735);e(54276);const l=[r.R,n.AH`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-secondary:var(--secondary-text-color);--md-sys-color-surface:var(--card-background-color);--md-sys-color-on-surface:var(--primary-text-color);--md-sys-color-on-surface-variant:var(--secondary-text-color)}md-item{overflow:var(--md-item-overflow,hidden);align-items:var(--md-item-align-items,center);gap:var(--ha-md-list-item-gap,16px)}`];class d extends i.n{renderRipple(){return"text"===this.type?n.s6:n.qy`<ha-ripple part="ripple" for="item" ?disabled="${this.disabled&&"link"!==this.type}"></ha-ripple>`}}d.styles=l,d=(0,o.Cg)([(0,s.EM)("ha-md-list-item")],d)},17308(t,a,e){var o=e(62826),i=e(49838),r=e(11245),n=e(96196),s=e(97735);class l extends i.B{}l.styles=[r.R,n.AH`:host{--md-sys-color-surface:var(--card-background-color)}`],l=(0,o.Cg)([(0,s.EM)("ha-md-list")],l)},2054(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(96196),r=e(97735),n=e(1087),s=e(44249),l=e(26300),d=t([l]);l=(d.then?(await d)():d)[0];const c="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class h extends i.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 i.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return i.qy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${c}" @click="${this._toggleMenu}"></ha-icon-button> ${t?i.qy`<div class="dot"></div>`:""} `}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const a=t.has("hass")?t.get("hass"):this.hass,e=t.has("narrow")?t.get("narrow"):this.narrow,o=!1===a?.kioskMode&&(e||"always_hidden"===a?.dockedSidebar),i=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&o===i||(this._show=i||this._alwaysVisible,i?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}}h.styles=i.AH`: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,o.Cg)([(0,r.MZ)({type:Boolean})],h.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,o.Cg)([(0,r.wk)()],h.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,r.wk)()],h.prototype,"_show",void 0),h=(0,o.Cg)([(0,r.EM)("ha-menu-button")],h),a()}catch(t){a(t)}})},54276(t,a,e){var o=e(62826),i=e(76482),r=e(91382),n=e(96245),s=e(96196),l=e(97735);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,a){t?.removeEventListener("touchend",this._handleTouchEnd),a?.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[n.R,s.AH`: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,o.Cg)([(0,l.EM)("ha-ripple")],d)},67094(t,a,e){e.r(a),e.d(a,{HaSvgIcon:()=>n});var o=e(62826),i=e(96196),r=e(97735);class n 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>`}}n.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)()],n.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"secondaryPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"viewBox",void 0),n=(0,o.Cg)([(0,r.EM)("ha-svg-icon")],n)},77423(t,a,e){e.d(a,{A:()=>i,Cm:()=>r,JW:()=>m,Pd:()=>l,TC:()=>d,VN:()=>c,Vx:()=>h,XQ:()=>f,eM:()=>g,iH:()=>p,k3:()=>u,m4:()=>n,qf:()=>s,t0:()=>o,yv:()=>v});e(44114),e(18111),e(22489),e(20116),e(7588),e(61701);const o=(t,a)=>t.callWS({type:"config_entries/subentries/list",entry_id:a}),i=(t,a,e,o)=>t.callWS({type:"config_entries/subentries/update",entry_id:a,subentry_id:e,...o}),r=(t,a,e)=>t.callWS({type:"config_entries/subentries/delete",entry_id:a,subentry_id:e}),n=["migration_error","setup_error","setup_retry"],s=["not_loaded","loaded","setup_error","setup_retry"],l=(t,a,e)=>{const o=new b;return d(t,t=>{a(o.processMessage(t))},e)},d=(t,a,e)=>{const o={type:"config_entries/subscribe"};return e&&e.type&&(o.type_filter=e.type),t.connection.subscribeMessage(t=>{a(t)},o)},c=(t,a)=>{const e={};return a&&(a.type&&(e.type_filter=a.type),a.domain&&(e.domain=a.domain)),t.callWS({type:"config_entries/get",...e})},h=(t,a)=>t.callWS({type:"config_entries/get_single",entry_id:a}),p=(t,a,e)=>t.callWS({type:"config_entries/update",entry_id:a,...e}),g=(t,a)=>t.callApi("DELETE",`config/config_entries/entry/${a}`),v=(t,a)=>t.callApi("POST",`config/config_entries/entry/${a}/reload`),f=(t,a)=>t.callWS({type:"config_entries/disable",entry_id:a,disabled_by:"user"}),u=(t,a)=>t.callWS({type:"config_entries/disable",entry_id:a,disabled_by:null}),m=(t,a)=>{if(!a)return t;const e=t.find(t=>t.entry_id===a);if(!e)return t;return[e,...t.filter(t=>t.entry_id!==a)]};class b{processMessage(t){return t.forEach(t=>{if(null!==t.type&&"added"!==t.type)if("removed"!==t.type){if("updated"===t.type){const a=t.entry;this._entries=this._entries.map(t=>t.entry_id===a.entry_id?a:t)}}else this._entries=this._entries.filter(a=>a.entry_id!==t.entry.entry_id);else this._entries.push(t.entry)}),this._entries}constructor(){this._entries=[]}}},44249(t,a,e){e.d(a,{V:()=>o});const o=(t,a)=>{const e=new i,o=t.subscribeMessage(t=>a(e.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{o.then(t=>t?.())}};class i{processMessage(t){if("removed"===t.type)for(const a of Object.keys(t.notifications))delete this.notifications[a];else this.notifications={...this.notifications,...t.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},81310(t,a,e){e.a(t,async function(t,a){try{var o=e(62826),i=e(96196),r=e(97735),n=e(94333),s=e(26218),l=e(91926),d=e(90248),c=e(2054),h=e(14503),p=t([d,c]);[d,c]=p.then?(await p)():p;class g extends i.WF{render(){return i.qy` <div class="toolbar ${(0,n.H)({narrow:this.narrow})}"> <div class="toolbar-content"> ${this.mainPage||history.state?.root?i.qy` <ha-menu-button .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:this.backPath?i.qy` <ha-icon-button-arrow-prev href="${this.backPath}" .hass="${this.hass}"></ha-icon-button-arrow-prev> `:i.qy` <ha-icon-button-arrow-prev .hass="${this.hass}" @click="${this._backTapped}"></ha-icon-button-arrow-prev> `} <div class="main-title"> <slot name="header">${this.header}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="content ha-scrollbar" @scroll="${this._saveScrollPos}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.O)()}static get styles(){return[h.dp,i.AH`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"main-page"})],g.prototype,"mainPage",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"back-path"})],g.prototype,"backPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"backCallback",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],g.prototype,"narrow",void 0),(0,o.Cg)([(0,s.a)(".content")],g.prototype,"_savedScrollPos",void 0),(0,o.Cg)([(0,r.Ls)({passive:!0})],g.prototype,"_saveScrollPos",null),g=(0,o.Cg)([(0,r.EM)("hass-subpage")],g),a()}catch(t){a(t)}})},5762(t,a,e){e.a(t,async function(t,o){try{e.r(a),e.d(a,{MatterConfigDashboard:()=>w});e(18111),e(22489),e(20116),e(61701),e(17642),e(58004),e(33853),e(45876),e(32475),e(15024),e(31698);var i=e(62826),r=e(96196),n=e(97735),s=e(22786),l=e(36312),d=e(18350),c=(e(76776),e(27661),e(43661),e(17308),e(2846),e(67094),e(77423)),h=e(81310),p=e(14503),g=t([d,h]);[d,h]=g.then?(await g)():g;const v="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",f="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",u="M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",m="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",b="M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z",y="M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z",x="m 17.126982,8.0730792 c 0,-0.7297242 -0.593746,-1.32357 -1.323637,-1.32357 -0.729454,0 -1.323199,0.5938458 -1.323199,1.32357 v 1.3234242 l 1.323199,1.458e-4 c 0.729891,0 1.323637,-0.5937006 1.323637,-1.32357 z M 11.999709,0 C 5.3829818,0 0,5.3838955 0,12.001455 0,18.574352 5.3105455,23.927406 11.865164,24 V 12.012075 l -3.9275642,-2.91e-4 c -1.1669814,0 -2.1169453,0.949979 -2.1169453,2.118323 0,1.16718 0.9499639,2.116868 2.1169453,2.116868 v 2.615717 c -2.6093089,0 -4.732218,-2.12327 -4.732218,-4.732585 0,-2.61048 2.1229091,-4.7343308 4.732218,-4.7343308 l 3.9275642,5.82e-4 v -1.323279 c 0,-2.172296 1.766691,-3.9395777 3.938181,-3.9395777 2.171928,0 3.9392,1.7672817 3.9392,3.9395777 0,2.1721498 -1.767272,3.9395768 -3.9392,3.9395768 l -1.323199,-1.45e-4 V 23.744102 C 19.911127,22.597726 24,17.768833 24,12.001455 24,5.3838955 18.616727,0 11.999709,0 Z";class w extends r.WF{firstUpdated(t){super.firstUpdated(t),this.hass&&this._fetchConfigEntry()}render(){if(!this._configEntry)return r.s6;const t="loaded"===this._configEntry.state,a=this._matterDeviceIds(this.hass.devices,this._configEntry.entry_id),e=this._entityCount(this.hass.entities,a);return r.qy` <hass-subpage .narrow="${this.narrow}" .hass="${this.hass}" header="Matter" back-path="/config" has-fab> <div class="container"> ${this._renderNetworkStatus(t,a.size)} ${this._renderMyNetworkCard(a.size,e)} ${this._renderNavigationCard()} </div> <a href="/config/matter/add" slot="fab"> <ha-fab .label="${this.hass.localize("ui.panel.config.matter.panel.add_device")}" extended> <ha-svg-icon slot="icon" .path="${m}"></ha-svg-icon> </ha-fab> </a> </hass-subpage> `}_renderNetworkStatus(t,a){return r.qy` <ha-card class="content network-status"> <div class="card-content"> <div class="heading"> <div class="icon ${t?"success":"error"}"> <ha-svg-icon .path="${t?f:v}"></ha-svg-icon> </div> <div class="details"> ${this.hass.localize("ui.panel.config.matter.panel.status_"+(t?"online":"offline"))}<br> <small> ${this.hass.localize("ui.panel.config.matter.panel.devices",{count:a})} </small> </div> </div> </div> </ha-card> `}_renderMyNetworkCard(t,a){return r.qy` <ha-card class="nav-card"> <div class="card-header"> ${this.hass.localize("ui.panel.config.matter.panel.my_network_title")} </div> <div class="card-content"> <ha-md-list> <ha-md-list-item type="link" href="${`/config/devices/dashboard?historyBack=1&config_entry=${this._configEntry?.entry_id}`}"> <ha-svg-icon slot="start" .path="${u}"></ha-svg-icon> <div slot="headline"> ${this.hass.localize("ui.panel.config.matter.panel.device_count",{count:t})} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> <ha-md-list-item type="link" href="${`/config/entities/dashboard?historyBack=1&config_entry=${this._configEntry?.entry_id}`}"> <ha-svg-icon slot="start" .path="${b}"></ha-svg-icon> <div slot="headline"> ${this.hass.localize("ui.panel.config.matter.panel.entity_count",{count:a})} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> </ha-md-list> </div> </ha-card> `}_renderNavigationCard(){return r.qy` <ha-card class="nav-card"> <div class="card-content"> <ha-md-list> <ha-md-list-item type="link" href="/config/matter/options"> <ha-svg-icon slot="start" .path="${y}"></ha-svg-icon> <div slot="headline"> ${this.hass.localize("ui.panel.config.matter.panel.options_title")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.panel.config.matter.panel.options_description")} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item> ${(0,l.x)(this.hass,"thread")?r.qy`<ha-md-list-item type="link" href="/config/thread"> <ha-svg-icon slot="start" .path="${x}"></ha-svg-icon> <div slot="headline"> ${this.hass.localize("ui.panel.config.matter.panel.thread_panel")} </div> <div slot="supporting-text"> ${this.hass.localize("ui.panel.config.matter.panel.thread_panel_description")} </div> <ha-icon-next slot="end"></ha-icon-next> </ha-md-list-item>`:r.s6} </ha-md-list> </div> </ha-card> `}async _fetchConfigEntry(){const t=await(0,c.VN)(this.hass,{domain:"matter"});this._configEntry=t.find(t=>null===t.disabled_by&&"ignore"!==t.source)}static get styles(){return[p.RF,r.AH`ha-card{margin:0 auto var(--ha-space-4);max-width:600px}.nav-card{overflow:hidden}.nav-card .card-content{padding:0}.nav-card .card-header{padding-bottom:var(--ha-space-2)}.content{margin-top:var(--ha-space-6)}ha-md-list{background:0 0;padding:0}ha-md-list-item{--md-item-overflow:visible}.network-status div.heading{display:flex;align-items:center;column-gap:var(--ha-space-4)}.network-status div.heading .icon{position:relative;border-radius:var(--ha-border-radius-2xl);width:40px;height:40px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;--icon-color:var(--primary-color)}.network-status div.heading .icon.success{--icon-color:var(--success-color)}.network-status div.heading .icon.error{--icon-color:var(--error-color)}.network-status div.heading .icon::before{display:block;content:"";position:absolute;inset:0;background-color:var(--icon-color);opacity:.2}.network-status div.heading .icon ha-svg-icon{color:var(--icon-color);width:24px;height:24px}.network-status div.heading .details{font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);color:var(--primary-text-color)}.network-status small{font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);letter-spacing:.25px;color:var(--secondary-text-color)}.container{padding:var(--ha-space-2) var(--ha-space-4) calc(var(--ha-space-16) + var(--safe-area-inset-bottom,0px))}a[slot=fab]{text-decoration:none}`]}constructor(...t){super(...t),this.narrow=!1,this._matterDeviceIds=(0,s.A)((t,a)=>a?new Set(Object.values(t).filter(t=>t.config_entries.includes(a)).map(t=>t.id)):new Set),this._entityCount=(0,s.A)((t,a)=>Object.values(t).filter(t=>t.device_id&&a.has(t.device_id)).length)}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean})],w.prototype,"narrow",void 0),(0,i.Cg)([(0,n.wk)()],w.prototype,"_configEntry",void 0),w=(0,i.Cg)([(0,n.EM)("matter-config-dashboard")],w),o()}catch(t){o(t)}})},14503(t,a,e){e.d(a,{RF:()=>r,dp:()=>l,kO:()=>s,nA:()=>n,og:()=>i});var o=e(96196);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}@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)}${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}`,n=o.AH`
  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);
  }
`,s=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
        )
    )}@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}}`,l=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}`}};
//# sourceMappingURL=94559.020af580a9957ba9.js.map