UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

18 lines 44.3 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[30002],{63708:function(t,e,a){a.d(e,{fW:function(){return s}});a(18111),a(13579);var o=a(44537),i=a(36312);const s=(t,e)=>(n(e)||r(t,e))&&l(t,e),r=(t,e)=>!e.component||(0,o.e)(e.component).some(e=>(0,i.x)(t.config,e)),l=(t,e)=>!e.not_component||!(0,o.e)(e.not_component).some(e=>(0,i.x)(t.config,e)),n=t=>t.core},86368:function(t,e,a){a.d(e,{n:function(){return s}});a(3362),a(62953);var o=a(1087);const i=()=>Promise.all([a.e(80131),a.e(70183),a.e(76261)]).then(a.bind(a,43254)),s=(t,e)=>{(0,o.r)(t,"show-dialog",{dialogTag:"dialog-data-table-settings",dialogImport:i,dialogParams:e})}},93444:function(t,e,a){var o=a(40445),i=a(5124),s=a(67576);let r,l,n=t=>t;class h extends i.WF{render(){return(0,i.qy)(r||(r=n` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `))}static get styles(){return[(0,i.AH)(l||(l=n`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`))]}}h=(0,o.Cg)([(0,s.EM)("ha-dialog-footer")],h)},76538:function(t,e,a){a(62953);var o=a(40445),i=a(5124),s=a(67576);let r,l,n,h,d,c,p=t=>t;class g extends i.WF{render(){const t=(0,i.qy)(r||(r=p`<div class="header-title"> <slot name="title"></slot> </div>`)),e=(0,i.qy)(l||(l=p`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`));return(0,i.qy)(n||(n=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)(h||(h=p`${0}${0}`),e,t):(0,i.qy)(d||(d=p`${0}${0}`),t,e))}static get styles(){return[(0,i.AH)(c||(c=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(...t){super(...t),this.subtitlePosition="below",this.showBorder=!1}}(0,o.Cg)([(0,s.MZ)({type:String,attribute:"subtitle-position"})],g.prototype,"subtitlePosition",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],g.prototype,"showBorder",void 0),g=(0,o.Cg)([(0,s.EM)("ha-dialog-header")],g)},72554:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953),a(49255);var o=a(40445),i=a(93900),s=a(35211),r=a(5124),l=a(67576),n=a(63672),h=a(1087),d=a(64481),c=a(22792),p=a(59992),g=a(14503),v=a(22348),u=(a(76538),a(26300)),b=t([i,u,p]);[i,u,p]=b.then?(await b)():b;let m,f,w,y,x,_,C,$=t=>t;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 L extends((0,p.V)(r.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(t){super.updated(t),t.has("open")&&(this._open=this.open)}render(){var t,e,a;return(0,r.qy)(m||(m=$` <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,n.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0)),(0,n.J)(this.ariaDescribedBy),this._handleKeyDown,this._handleHide,this._handleShow,this._handleAfterShow,this._handleAfterHide,this.withoutHeader?r.s6:(0,r.qy)(f||(f=$`<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!==(t=null===(e=this._i18n)||void 0===e||null===(a=e.localize)||void 0===a?void 0:a.call(e,"ui.common.close"))&&void 0!==t?t:"Close",k,void 0!==this.headerTitle?(0,r.qy)(w||(w=$`<span slot="title" class="title" id="ha-dialog-title"> ${0} </span>`),this.headerTitle):(0,r.qy)(y||(y=$`<slot name="headerTitle" slot="title"></slot>`)),void 0!==this.headerSubtitle?(0,r.qy)(x||(x=$`<span slot="subtitle">${0}</span>`),this.headerSubtitle):(0,r.qy)(_||(_=$`<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(t){this._open?(0,d.J)(()=>{this._setFullscreen(t.detail)}):this._setFullscreen(t.detail)}_setFullscreen(t){this.toggleAttribute("fullscreen",t)}_handleBodyScroll(t){this._bodyScrolled=t.target.scrollTop>0}_handleKeyDown(t){"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)}_handleHide(t){var e;const a=(null===(e=t.detail)||void 0===e?void 0:e.source)===t.target.dialog;this.preventScrimClose&&this._escapePressed&&a&&t.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,g.dp,(0,r.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(...t){super(...t),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,h.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t,e;if(null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,v.V)(this._hassConfig.auth.external)){const t=this.querySelector("[autofocus]");return void(null!==t&&(t.id||(t.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:t.id}})))}null===(e=this.querySelector("[autofocus]"))||void 0===e||e.focus()}))},this._handleAfterShow=t=>{t.eventPhase===Event.AT_TARGET&&(0,h.r)(this,"after-show")},this._handleAfterHide=t=>{t.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,h.r)(this,"closed"))}}}(0,o.Cg)([(0,l.MZ)({attribute:"aria-labelledby"})],L.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"aria-describedby"})],L.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],L.prototype,"open",void 0),(0,o.Cg)([(0,l.MZ)({reflect:!0})],L.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:String,reflect:!0,attribute:"width"})],L.prototype,"width",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],L.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"header-title"})],L.prototype,"headerTitle",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"header-subtitle"})],L.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,l.MZ)({type:String,attribute:"header-subtitle-position"})],L.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],L.prototype,"flexContent",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-header"})],L.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,l.wk)()],L.prototype,"_open",void 0),(0,o.Cg)([(0,l.P)(".body")],L.prototype,"bodyContainer",void 0),(0,o.Cg)([(0,l.wk)(),(0,s.Fg)({context:c.D5,subscribe:!0})],L.prototype,"_i18n",void 0),(0,o.Cg)([(0,l.wk)(),(0,s.Fg)({context:c.WF,subscribe:!0})],L.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,l.wk)()],L.prototype,"_bodyScrolled",void 0),(0,o.Cg)([(0,l.Ls)({passive:!0})],L.prototype,"_handleBodyScroll",null),L=(0,o.Cg)([(0,l.EM)("ha-dialog")],L),e()}catch(m){e(m)}})},43831:function(t,e,a){a(62953);var o=a(40445),i=a(5124),s=a(67576),r=a(63672);a(54276);let l,n,h=t=>t;class d extends i.WF{render(){return(0,i.qy)(l||(l=h` <div tabindex="0" role="tab" aria-selected="${0}" aria-label="${0}" @keydown="${0}"> <slot name="icon"></slot> <span class="name">${0}</span> <ha-ripple></ha-ripple> </div> `),this.active,(0,r.J)(this.name),this._handleKeyDown,this.name)}_handleKeyDown(t){"Enter"===t.key&&t.target.click()}constructor(...t){super(...t),this.active=!1,this.narrow=!1}}d.styles=(0,i.AH)(n||(n=h`div{padding:0 32px;display:flex;flex-direction:column;text-align:center;box-sizing:border-box;align-items:center;justify-content:center;width:100%;height:var(--header-height);cursor:pointer;position:relative;outline:0}:host(:not([narrow])) div{flex-direction:row;gap:var(--ha-space-2)}.name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}:host([active]){color:var(--primary-color)}:host(:not([narrow])[active]) div{border-bottom:2px solid var(--primary-color)}:host([narrow]){min-width:0;display:flex;justify-content:center;overflow:hidden}:host([narrow]) div{padding:0 4px}::slotted([slot=icon]){margin-bottom:var(--ha-space-1)}:host(:not([narrow])) ::slotted([slot=icon]){margin-bottom:0}div:focus-visible:before{position:absolute;display:block;content:"";inset:0;background-color:var(--secondary-text-color);opacity:.08}`)),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"active",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],d.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)()],d.prototype,"name",void 0),d=(0,o.Cg)([(0,s.EM)("ha-tab")],d)},72553:function(t,e,a){a.a(t,async function(t,e){try{a(18111),a(22489),a(20116),a(61701),a(62953);var o=a(40445),i=(a(68825),a(88696)),s=a(5124),r=a(67576),l=a(6412),n=a(63708),h=a(1087),d=(a(34296),a(48091)),c=a(86368),p=a(18350),g=a(72554),v=(a(93444),a(29823)),u=(a(70947),a(26300)),b=(a(67094),a(36866)),m=a(79172),f=a(40511),w=t([d,p,g,v,u,b,f,i]);[d,p,g,v,u,b,f,i]=w.then?(await w)():w;let y,x,_,C,$,k,L,M,S,Z,F,q,H,T,P,z,A,B,V,D,E,G,W,K,j,O=t=>t;const I="M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",R="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",U="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",N="M6,13H18V11H6M3,6V8H21V6M10,18H14V16H10V18Z",J="M21 8H3V6H21V8M13.81 16H10V18H13.09C13.21 17.28 13.46 16.61 13.81 16M18 11H6V13H18V11M21.12 15.46L19 17.59L16.88 15.46L15.47 16.88L17.59 19L15.47 21.12L16.88 22.54L19 20.41L21.12 22.54L22.54 21.12L20.41 19L22.54 16.88L21.12 15.46Z",Q="M3,5H9V11H3V5M5,7V9H7V7H5M11,7H21V9H11V7M11,15H21V17H11V15M5,20L1.5,16.5L2.91,15.09L5,17.17L9.59,12.59L11,14L5,20Z",X="M7,10L12,15L17,10H7Z",Y="M3 3H17C18.11 3 19 3.9 19 5V12.08C17.45 11.82 15.92 12.18 14.68 13H11V17H12.08C11.97 17.68 11.97 18.35 12.08 19H3C1.9 19 1 18.11 1 17V5C1 3.9 1.9 3 3 3M3 7V11H9V7H3M11 7V11H17V7H11M3 13V17H9V13H3M22.78 19.32L21.71 18.5C21.73 18.33 21.75 18.17 21.75 18S21.74 17.67 21.71 17.5L22.77 16.68C22.86 16.6 22.89 16.47 22.83 16.36L21.83 14.63C21.77 14.5 21.64 14.5 21.5 14.5L20.28 15C20 14.82 19.74 14.65 19.43 14.53L19.24 13.21C19.23 13.09 19.12 13 19 13H17C16.88 13 16.77 13.09 16.75 13.21L16.56 14.53C16.26 14.66 15.97 14.82 15.71 15L14.47 14.5C14.36 14.5 14.23 14.5 14.16 14.63L13.16 16.36C13.1 16.47 13.12 16.6 13.22 16.68L14.28 17.5C14.26 17.67 14.25 17.83 14.25 18S14.26 18.33 14.28 18.5L13.22 19.32C13.13 19.4 13.1 19.53 13.16 19.64L14.16 21.37C14.22 21.5 14.35 21.5 14.47 21.5L15.71 21C15.97 21.18 16.25 21.35 16.56 21.47L16.75 22.79C16.77 22.91 16.87 23 17 23H19C19.12 23 19.23 22.91 19.25 22.79L19.44 21.47C19.74 21.34 20 21.18 20.28 21L21.5 21.5C21.64 21.5 21.77 21.5 21.84 21.37L22.84 19.64C22.9 19.53 22.87 19.4 22.78 19.32M18 19.5C17.17 19.5 16.5 18.83 16.5 18S17.18 16.5 18 16.5 19.5 17.17 19.5 18 18.84 19.5 18 19.5Z",tt="M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z",et="M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z";class at extends((0,m.b)(s.WF)){supportedShortcuts(){return{f:()=>this._searchInput.focus()}}clearSelection(){this._dataTable.clearSelection()}willUpdate(t){var e,a;(t.has("tabs")||t.has("hass")&&(null===(e=this.hass)||void 0===e?void 0:e.config.components)!==(null===(a=t.get("hass"))||void 0===a?void 0:a.config.components))&&(this.showTabs=this.tabs.filter(t=>(0,n.fW)(this.hass,t)).length>1),this.hasUpdated||(this.initialGroupColumn&&this.columns[this.initialGroupColumn]&&this._setGroupColumn(this.initialGroupColumn),this.initialSorting&&this.columns[this.initialSorting.column]&&(this._sortColumn=this.initialSorting.column,this._sortDirection=this.initialSorting.direction))}render(){var t;const e=this.localizeFunc||this.hass.localize,a=null!==(t=this._showPaneController.value)&&void 0!==t?t:!this.narrow,o=this.hasFilters?(0,s.qy)(y||(y=O`<div class="relative"> <ha-assist-chip .label="${0}" .active="${0}" @click="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-assist-chip> ${0} </div>`),e("ui.components.subpage-data-table.filters"),this.filters,this._toggleFilters,N,this.filters?(0,s.qy)(x||(x=O`<div class="badge">${0}</div>`),this.filters):s.s6):s.s6,i=this.selectable&&!this._selectMode?(0,s.qy)(_||(_=O`<ha-assist-chip class="has-dropdown select-mode-chip" .active="${0}" @click="${0}" .title="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-assist-chip>`),this._selectMode,this._enableSelectMode,e("ui.components.subpage-data-table.enter_selection_mode"),Q):s.s6,r=(0,s.qy)(C||(C=O`<ha-input-search appearance="outlined" .value="${0}" @input="${0}" .placeholder="${0}"> </ha-input-search>`),this.filter,this._handleSearchChange,this.searchLabel),n=Object.values(this.columns).find(t=>t.sortable)?(0,s.qy)($||($=O` <ha-dropdown @wa-select="${0}"> <ha-assist-chip slot="trigger" .label="${0}"> <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon> </ha-assist-chip> ${0} </ha-dropdown> `),this._handleSortBy,e("ui.components.subpage-data-table.sort_by",{sortColumn:this._sortColumn&&this.columns[this._sortColumn]?` ${this.columns[this._sortColumn].title||this.columns[this._sortColumn].label}`:""}),X,Object.entries(this.columns).map(([t,e])=>e.sortable?(0,s.qy)(k||(k=O` <ha-dropdown-item .value="${0}" class="${0}"> ${0} ${0} </ha-dropdown-item> `),t,(0,l.H)({selected:t===this._sortColumn}),this._sortColumn===t?(0,s.qy)(L||(L=O` <ha-svg-icon slot="end" .path="${0}"></ha-svg-icon> `),"desc"===this._sortDirection?I:R):s.s6,e.title||e.label):s.s6)):s.s6,h=Object.values(this.columns).find(t=>t.groupable)?(0,s.qy)(M||(M=O` <ha-dropdown @wa-select="${0}"> <ha-assist-chip .label="${0}" slot="trigger"> <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon></ha-assist-chip> ${0} <ha-dropdown-item value="reset" class="${0}"> ${0} </ha-dropdown-item> <wa-divider></wa-divider> <ha-dropdown-item value="collapse_all" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item value="expand_all" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </ha-dropdown> `),this._handleGroupBy,e("ui.components.subpage-data-table.group_by",{groupColumn:this._groupColumn&&this.columns[this._groupColumn]?` ${this.columns[this._groupColumn].title||this.columns[this._groupColumn].label}`:""}),X,Object.entries(this.columns).map(([t,e])=>e.groupable?(0,s.qy)(S||(S=O` <ha-dropdown-item .value="${0}" .selected="${0}" class="${0}"> ${0} </ha-dropdown-item> `),t,t===this._groupColumn,(0,l.H)({selected:t===this._groupColumn}),e.title||e.label):s.s6),(0,l.H)({selected:!this._groupColumn}),e("ui.components.subpage-data-table.dont_group_by"),!this._groupColumn,tt,e("ui.components.subpage-data-table.collapse_all_groups"),!this._groupColumn,et,e("ui.components.subpage-data-table.expand_all_groups")):s.s6,d=(0,s.qy)(Z||(Z=O`<ha-assist-chip class="has-dropdown select-mode-chip" @click="${0}" .title="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-assist-chip>`),this._openSettings,e("ui.components.subpage-data-table.settings"),Y);return(0,s.qy)(F||(F=O` <hass-tabs-subpage .hass="${0}" .localizeFunc="${0}" .narrow="${0}" .isWide="${0}" .backPath="${0}" .backCallback="${0}" .route="${0}" .tabs="${0}" .mainPage="${0}" .pane="${0}" @sorting-changed="${0}"> ${0} ${0} ${0} <div slot="fab"><slot name="fab"></slot></div> </hass-tabs-subpage> ${0} `),this.hass,this.localizeFunc,this.narrow,this.isWide,this.backPath,this.backCallback,this.route,this.tabs,this.mainPage,a&&this.showFilters,this._sortingChanged,this._selectMode?(0,s.qy)(q||(q=O`<div class="selection-bar" slot="toolbar"> <div class="selection-controls"> <ha-icon-button .path="${0}" @click="${0}" .label="${0}"></ha-icon-button> <ha-dropdown @wa-select="${0}"> <ha-assist-chip .label="${0}" slot="trigger"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> <ha-svg-icon slot="trailing-icon" .path="${0}"></ha-svg-icon></ha-assist-chip> <ha-dropdown-item value="all"> ${0} </ha-dropdown-item> <ha-dropdown-item value="none"> ${0} </ha-dropdown-item> <wa-divider></wa-divider> <ha-dropdown-item value="disable_select_mode"> ${0} </ha-dropdown-item> </ha-dropdown> ${0} </div> <div class="center-vertical"> <slot name="selection-bar"></slot> </div> </div>`),U,this._disableSelectMode,e("ui.components.subpage-data-table.exit_selection_mode"),this._handleSelect,e("ui.components.subpage-data-table.select"),Q,X,e("ui.components.subpage-data-table.select_all"),e("ui.components.subpage-data-table.select_none"),e("ui.components.subpage-data-table.exit_selection_mode"),void 0!==this.selected?(0,s.qy)(H||(H=O`<p> ${0} </p>`),e("ui.components.subpage-data-table.selected",{selected:this.selected||"0"})):s.s6):s.s6,this.showFilters&&a?(0,s.qy)(T||(T=O`<div class="pane" slot="pane"> <div class="table-header"> <ha-assist-chip .label="${0}" active @click="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> </ha-assist-chip> ${0} </div> <div class="pane-content"> <slot name="filter-pane"></slot> </div> </div>`),e("ui.components.subpage-data-table.filters"),this._toggleFilters,N,this.filters?(0,s.qy)(P||(P=O`<ha-icon-button .path="${0}" @click="${0}" .label="${0}"></ha-icon-button>`),J,this._clearFilters,e("ui.components.subpage-data-table.clear_filter")):s.s6):s.s6,this.empty?(0,s.qy)(z||(z=O`<div class="center"> <slot name="empty">${0}</slot> </div>`),this.noDataText):(0,s.qy)(A||(A=O`<div slot="toolbar-icon"> <slot name="toolbar-icon"></slot> </div> ${0} <ha-data-table .narrow="${0}" .columns="${0}" .data="${0}" .noDataText="${0}" .filter="${0}" .selectable="${0}" .id="${0}" .clickable="${0}" .appendRow="${0}" .sortColumn="${0}" .sortDirection="${0}" .groupColumn="${0}" .groupOrder="${0}" .initialCollapsedGroups="${0}" .columnOrder="${0}" .hiddenColumns="${0}"> ${0} </ha-data-table>`),this.narrow?(0,s.qy)(B||(B=O` <div slot="header"> <slot name="header"> <div class="search-toolbar">${0}</div> </slot> </div> `),r):"",this.narrow,this.columns,this.data,this.noDataText,this.filter,this._selectMode,this.id,this.clickable,this.appendRow,this._sortColumn,this._sortDirection,this._groupColumn,this.groupOrder,this.initialCollapsedGroups,this.columnOrder,this.hiddenColumns,this.narrow?(0,s.qy)(E||(E=O` <div slot="header"> <slot name="top-header"></slot> </div> <div slot="header-row" class="narrow-header-row"> ${0} ${0} <div class="flex"></div> ${0}${0}${0} </div> `),this.hasFilters&&!this.showFilters?(0,s.qy)(G||(G=O`${0}`),o):s.s6,i,h,n,d):(0,s.qy)(V||(V=O` <div slot="header"> <slot name="top-header"></slot> <slot name="header"> <div class="table-header"> ${0}${0}${0}${0}${0}${0} </div> </slot> </div> `),this.hasFilters&&!this.showFilters?(0,s.qy)(D||(D=O`${0}`),o):s.s6,i,r,h,n,d)),this.showFilters&&!a?(0,s.qy)(W||(W=O`<ha-dialog .open="${0}" width="full" header-title="${0}" @closed="${0}"> <ha-icon-button slot="headerNavigationIcon" .path="${0}" @click="${0}" .label="${0}"></ha-icon-button> ${0} <div class="filter-dialog-content"> <slot name="filter-pane"></slot> </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog>`),!0,e("ui.components.subpage-data-table.filters"),this._closeFilters,U,this._closeFilters,e("ui.components.subpage-data-table.close_filter"),this.filters?(0,s.qy)(K||(K=O`<ha-icon-button slot="headerActionItems" @click="${0}" .path="${0}" .label="${0}"></ha-icon-button>`),this._clearFilters,J,e("ui.components.subpage-data-table.clear_filter")):s.s6,this._closeFilters,e("ui.components.subpage-data-table.show_results",{number:this.data.length})):s.s6)}_clearFilters(){(0,h.r)(this,"clear-filter")}_toggleFilters(){this.showFilters=!this.showFilters}_sortingChanged(t){this._sortDirection=t.detail.direction,this._sortColumn=this._sortDirection?t.detail.column:void 0}_handleSortBy(t){t.preventDefault();const e=t.detail.item.value;this._sortDirection&&this._sortColumn===e&&"asc"===this._sortDirection?this._sortDirection="desc":this._sortDirection="asc",this._sortColumn=e,(0,h.r)(this,"sorting-changed",{column:e,direction:this._sortDirection})}_handleGroupBy(t){const e=t.detail.item.value;"reset"!==e?"collapse_all"!==e?"expand_all"!==e?this._setGroupColumn(e):this._expandAllGroups():this._collapseAllGroups():this._setGroupColumn("")}_setGroupColumn(t){this._groupColumn=t,(0,h.r)(this,"grouping-changed",{value:t})}_openSettings(){(0,c.n)(this,{columns:this.columns,hiddenColumns:this.hiddenColumns,columnOrder:this.columnOrder,onUpdate:(t,e)=>{this.columnOrder=t,this.hiddenColumns=e,(0,h.r)(this,"columns-changed",{columnOrder:t,hiddenColumns:e})},localizeFunc:this.localizeFunc})}_enableSelectMode(){this._selectMode=!0}_handleSelect(t){const e=t.detail.item.value;if(e)switch(e){case"all":this._selectAll();break;case"none":this._selectNone();break;case"disable_select_mode":this._disableSelectMode()}}_handleSearchChange(t){var e;const a=t.target;this.filter!==a.value&&(this.filter=null!==(e=a.value)&&void 0!==e?e:"",(0,h.r)(this,"search-changed",{value:this.filter}))}constructor(...t){super(...t),this.isWide=!1,this.narrow=!1,this.mainPage=!1,this.initialCollapsedGroups=[],this.columns={},this.data=[],this.selectable=!1,this.clickable=!1,this.hasFab=!1,this.showTabs=!1,this.id="id",this.filter="",this.empty=!1,this.tabs=[],this.hasFilters=!1,this.showFilters=!1,this._sortDirection=null,this._selectMode=!1,this._showPaneController=new i.P(this,{callback:t=>{var e;return(null===(e=t[0])||void 0===e?void 0:e.contentRect.width)>750}}),this._closeFilters=()=>{this.showFilters=!1},this._collapseAllGroups=()=>{this._dataTable.collapseAllGroups()},this._expandAllGroups=()=>{this._dataTable.expandAllGroups()},this._disableSelectMode=()=>{this._selectMode=!1,this._dataTable.clearSelection()},this._selectAll=()=>{this._dataTable.selectAll()},this._selectNone=()=>{this._dataTable.clearSelection()}}}at.styles=(0,s.AH)(j||(j=O`:host{display:block;height:100%}ha-data-table{width:100%;height:100%;--data-table-border-width:0;--data-table-empty-row-height:var(--safe-area-inset-bottom, 0px)}.pane,:host(:not([narrow])) ha-data-table{height:calc(100vh - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));display:block}:host([has-fab]) ha-data-table{--data-table-empty-row-height:calc( 48px + 16px * 2 + var(--safe-area-inset-bottom, 0px) )}:host([narrow][show-tabs]:not([has-fab])) ha-data-table{--data-table-empty-row-height:0px}:host([narrow][show-tabs][has-fab]) ha-data-table{--data-table-empty-row-height:calc(48px + 28px * 2)}.pane-content{height:calc(100vh - 1px - var(--header-height,0px) - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));display:flex;flex-direction:column}:host([narrow]) hass-tabs-subpage{--main-title-margin:0}:host([narrow]){--expansion-panel-summary-padding:0 16px}.table-header{display:flex;align-items:center;--mdc-shape-small:0;height:56px;width:100%;justify-content:space-between;padding:0 16px;gap:var(--ha-space-4);box-sizing:border-box;background:var(--primary-background-color);border-bottom:1px solid var(--divider-color)}ha-input-search{flex:1}.search-toolbar{display:flex;align-items:center;color:var(--secondary-text-color)}.filters{--mdc-text-field-fill-color:var(--input-fill-color);--mdc-text-field-idle-line-color:var(--input-idle-line-color);--mdc-shape-small:4px;--text-field-overflow:initial;display:flex;justify-content:flex-end;color:var(--primary-text-color)}.active-filters{color:var(--primary-text-color);position:relative;display:flex;align-items:center;padding:2px 2px 2px 8px;margin-left:4px;margin-inline-start:4px;margin-inline-end:initial;font-size:var(--ha-font-size-m);width:max-content;cursor:initial;direction:var(--direction)}.active-filters ha-svg-icon{color:var(--primary-color)}.active-filters::before{background-color:var(--primary-color);opacity:.12;border-radius:var(--ha-border-radius-sm);position:absolute;top:0;right:0;bottom:0;left:0;content:""}.center{display:flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;height:100%;width:100%;padding:16px}.badge{position:absolute;top:-4px;right:-4px;inset-inline-end:-4px;inset-inline-start:initial;min-width:16px;box-sizing:border-box;border-radius:var(--ha-border-radius-circle);font-size:var(--ha-font-size-xs);font-weight:var(--ha-font-weight-normal);background-color:var(--primary-color);line-height:var(--ha-line-height-normal);text-align:center;padding:0px 2px;color:var(--text-primary-color)}.narrow-header-row{display:flex;align-items:center;min-width:100%;gap:var(--ha-space-4);padding:0 16px;box-sizing:border-box;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none}.narrow-header-row .flex{flex:1;margin-left:-16px}.selection-bar{background:rgba(var(--rgb-primary-color),.1);width:100%;height:100%;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;box-sizing:border-box;font-size:var(--ha-font-size-m);--ha-assist-chip-container-color:var(--card-background-color)}.selection-controls{display:flex;align-items:center;gap:var(--ha-space-2)}.selection-controls p{margin-left:8px;margin-inline-start:8px;margin-inline-end:initial}.center-vertical{display:flex;align-items:center;gap:var(--ha-space-2)}.relative{position:relative}ha-assist-chip{--ha-assist-chip-container-shape:10px;--ha-assist-chip-container-color:var(--card-background-color)}.select-mode-chip{--md-assist-chip-icon-label-space:0;--md-assist-chip-trailing-space:8px}ha-dialog{--dialog-content-padding:0}.filter-dialog-content{height:calc(100vh - 70px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));display:flex;flex-direction:column}ha-dropdown ha-assist-chip{--md-assist-chip-trailing-space:8px}ha-dropdown-item.selected{border:1px solid var(--primary-color);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)}`)),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"localizeFunc",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"is-wide",type:Boolean})],at.prototype,"isWide",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],at.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"main-page"})],at.prototype,"mainPage",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"initialCollapsedGroups",void 0),(0,o.Cg)([(0,r.MZ)({type:Object})],at.prototype,"columns",void 0),(0,o.Cg)([(0,r.MZ)({type:Array})],at.prototype,"data",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],at.prototype,"selectable",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],at.prototype,"clickable",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"has-fab",type:Boolean,reflect:!0})],at.prototype,"hasFab",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"show-tabs",type:Boolean,reflect:!0})],at.prototype,"showTabs",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"appendRow",void 0),(0,o.Cg)([(0,r.MZ)({type:String})],at.prototype,"id",void 0),(0,o.Cg)([(0,r.MZ)({type:String})],at.prototype,"filter",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"searchLabel",void 0),(0,o.Cg)([(0,r.MZ)({type:Number})],at.prototype,"filters",void 0),(0,o.Cg)([(0,r.MZ)({type:Number})],at.prototype,"selected",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"back-path"})],at.prototype,"backPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"backCallback",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"noDataText",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],at.prototype,"empty",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"route",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"tabs",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"has-filters",type:Boolean})],at.prototype,"hasFilters",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"show-filters",type:Boolean})],at.prototype,"showFilters",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"initialSorting",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"initialGroupColumn",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"groupOrder",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"columnOrder",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],at.prototype,"hiddenColumns",void 0),(0,o.Cg)([(0,r.wk)()],at.prototype,"_sortColumn",void 0),(0,o.Cg)([(0,r.wk)()],at.prototype,"_sortDirection",void 0),(0,o.Cg)([(0,r.wk)()],at.prototype,"_groupColumn",void 0),(0,o.Cg)([(0,r.wk)()],at.prototype,"_selectMode",void 0),(0,o.Cg)([(0,r.P)("ha-data-table",!0)],at.prototype,"_dataTable",void 0),(0,o.Cg)([(0,r.P)("ha-input-search")],at.prototype,"_searchInput",void 0),at=(0,o.Cg)([(0,r.EM)("hass-tabs-subpage-data-table")],at),e()}catch(y){e(y)}})},40511:function(t,e,a){a.a(t,async function(t,e){try{a(18111),a(22489),a(20116),a(61701),a(3362),a(62953),a(3296),a(27208),a(48408),a(14603),a(47566),a(98721);var o=a(40445),i=a(5124),s=a(67576),r=a(6412),l=a(22786),n=a(63708),h=a(26218),d=a(76830),c=a(91926),p=a(90248),g=a(2054),v=(a(67094),a(43831),a(14503)),u=t([p,g]);[p,g]=u.then?(await u)():u;let b,m,f,w,y,x,_,C,$,k,L,M,S=t=>t;const Z=t=>t.endsWith("/")&&t.length>1?t.slice(0,-1):t;class F extends i.WF{willUpdate(t){if(t.has("route")){const t=`${this.route.prefix}${this.route.path}`;this._activeTab=this.tabs.find(e=>this._isActiveTabPath(e.path,t))}super.willUpdate(t)}render(){var t;const e=this._getTabs(this.tabs,this._activeTab,this.hass.config.components,this.hass.language,this.hass.userData,this.narrow,this.localizeFunc||this.hass.localize);return(0,i.qy)(b||(b=S` <div class="toolbar ${0}"> <slot name="toolbar"> <div class="toolbar-content"> ${0} ${0} ${0} <div id="toolbar-icon"> <slot name="toolbar-icon"></slot> </div> </div> </slot> ${0} </div> <div class="container"> ${0} <div class="content ha-scrollbar" @scroll="${0}"> <slot></slot> ${0} </div> </div> <div id="fab"> <slot name="fab"></slot> </div> `),(0,r.H)({narrow:this.narrow}),this.mainPage||!this.backPath&&null!==(t=history.state)&&void 0!==t&&t.root?(0,i.qy)(m||(m=S` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):this.backPath?(0,i.qy)(f||(f=S` <ha-icon-button-arrow-prev .href="${0}" .hass="${0}"></ha-icon-button-arrow-prev> `),this.backPath,this.hass):(0,i.qy)(w||(w=S` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.narrow||!this.showTabs?(0,i.qy)(y||(y=S`<div class="main-title"> <slot name="header">${0}</slot> </div>`),this.showTabs?"":e[0]):"",this.showTabs&&!this.narrow?(0,i.qy)(x||(x=S`<div id="tabbar">${0}</div>`),e):"",this.showTabs&&this.narrow?(0,i.qy)(_||(_=S`<div id="tabbar" class="bottom-bar">${0}</div>`),e):"",this.pane?(0,i.qy)(C||(C=S`<div class="pane"> <div class="shadow-container"></div> <div class="ha-scrollbar"> <slot name="pane"></slot> </div> </div>`)):i.s6,this._saveScrollPos,this.hasFab?(0,i.qy)($||($=S`<div class="fab-bottom-space"></div>`)):i.s6)}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}focusContentScroller(){this._content&&(this._content.style.outline="none",this._content.focus({preventScroll:!0}))}_backTapped(){this.backCallback?this.backCallback():(0,c.OE)()}_isActiveTabPath(t,e){try{const a=new URL(t,window.location.origin),o=new URL(e,window.location.origin),i=Z(a.pathname),s=Z(o.pathname);return!(s!==i&&!s.startsWith(`${i}/`))}catch(a){return e===t||e.startsWith(`${t}/`)}}async _tabClicked(t){const e=(0,d.d)(t);e&&await(0,c.oo)(e,{replace:!0})}static get styles(){return[v.dp,(0,i.AH)(k||(k=S`:host{display:block;height:100%;background-color:var(--primary-background-color)}:host([narrow]){width:100%;position:fixed}.container{display:flex;height:calc(100% - var(--header-height,0px) - var(--safe-area-inset-top,0px))}ha-menu-button{margin-right:24px;margin-inline-end:24px;margin-inline-start:initial}.toolbar{font-size:var(--ha-font-size-xl);height:calc(var(--header-height,0px) + var(--safe-area-inset-top,0px));padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);background-color:var(--sidebar-background-color);font-weight:var(--ha-font-weight-normal);border-bottom:1px solid var(--divider-color);box-sizing:border-box}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{padding:8px 12px;display:flex;align-items:center;height:100%;box-sizing:border-box}:host([narrow]) .toolbar-content{padding:4px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}.bottom-bar a{width:25%}#tabbar{display:flex;font-size:var(--ha-font-size-m);overflow:hidden}#tabbar>a{overflow:hidden;max-width:45%}#tabbar.bottom-bar{position:absolute;bottom:0;left:0;padding:0 16px;box-sizing:border-box;background-color:var(--sidebar-background-color);border-top:1px solid var(--divider-color);justify-content:space-around;z-index:2;font-size:var(--ha-font-size-s);width:100%;padding-bottom:var(--safe-area-inset-bottom)}#tabbar:not(.bottom-bar){flex:1;justify-content:center}:host(:not([narrow])) #toolbar-icon{min-width:40px}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;flex-shrink:0;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{min-width:0;flex:1;max-height:var(--header-height);line-height:var(--ha-line-height-normal);color:var(--sidebar-text-color);margin-inline-start:var(--main-title-margin,var(--ha-space-6))}.narrow .main-title{margin-inline-start:var(--main-title-margin,var(--ha-space-2))}.content{position:relative;width:100%;margin-right:var(--safe-area-inset-right);margin-inline-end:var(--safe-area-inset-right);overflow:auto;-webkit-overflow-scrolling:touch}:host([narrow]) .content{margin-left:var(--safe-area-inset-left);margin-inline-start:var(--safe-area-inset-left)}:host([narrow][show-tabs]) .content{margin-bottom:calc(var(--header-height,0px) + var(--safe-area-inset-bottom,0px))}.content .fab-bottom-space{height:calc(64px + var(--safe-area-inset-bottom,0px))}:host([narrow][show-tabs]) .content .fab-bottom-space{height:calc(80px + var(--safe-area-inset-bottom,0px))}#fab{position:fixed;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right));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);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow][show-tabs]) #fab{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}.pane{border-right:1px solid var(--divider-color);border-inline-end:1px solid var(--divider-color);border-inline-start:initial;box-sizing:border-box;display:flex;flex:0 0 var(--sidepane-width,250px);width:var(--sidepane-width,250px);flex-direction:column;position:relative}.pane .ha-scrollbar{flex:1}`))]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.isWide=!1,this.pane=!1,this.hasFab=!1,this.showTabs=!1,this._getTabs=(0,l.A)((t,e,a,o,s,r,l)=>{const h=t.filter(t=>(0,n.fW)(this.hass,t));if(h.length<2){if(this.showTabs=!1,1===h.length){const t=h[0];return[t.translationKey?l(t.translationKey):t.name]}return[""]}return this.showTabs=!0,h.map(t=>(0,i.qy)(L||(L=S` <a href="${0}" @click="${0}"> <ha-tab .active="${0}" .narrow="${0}" .name="${0}"> ${0} </ha-tab> </a> `),t.path,this._tabClicked,t.path===(null==e?void 0:e.path),this.narrow,t.translationKey?l(t.translationKey):t.name,t.iconPath?(0,i.qy)(M||(M=S`<ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon>`),t.iconPath):""))})}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],F.prototype,"hass",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],F.prototype,"localizeFunc",void 0),(0,o.Cg)([(0,s.MZ)({type:String,attribute:"back-path"})],F.prototype,"backPath",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],F.prototype,"backCallback",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"main-page"})],F.prototype,"mainPage",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],F.prototype,"route",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],F.prototype,"tabs",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],F.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"is-wide"})],F.prototype,"isWide",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],F.prototype,"pane",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"has-fab"})],F.prototype,"hasFab",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"show-tabs",reflect:!0})],F.prototype,"showTabs",void 0),(0,o.Cg)([(0,s.wk)()],F.prototype,"_activeTab",void 0),(0,o.Cg)([(0,s.P)(".content")],F.prototype,"_content",void 0),(0,o.Cg)([(0,h.a)(".content")],F.prototype,"_savedScrollPos",void 0),(0,o.Cg)([(0,s.Ls)({passive:!0})],F.prototype,"_saveScrollPos",null),F=(0,o.Cg)([(0,s.EM)("hass-tabs-subpage")],F),e()}catch(b){e(b)}})},79172:function(t,e,a){a.d(e,{b:function(){return i}});a(62953);var o=a(68348);const i=t=>class extends t{connectedCallback(){super.connectedCallback(),this.addKeyboardShortcuts()}disconnectedCallback(){this.removeKeyboardShortcuts(),super.disconnectedCallback()}addKeyboardShortcuts(){this._listenersAdded||(this._listenersAdded=!0,window.addEventListener("keydown",this._keydownEvent))}removeKeyboardShortcuts(){this._listenersAdded=!1,window.removeEventListener("keydown",this._keydownEvent)}supportedShortcuts(){return{}}supportedSingleKeyShortcuts(){return{}}constructor(...t){super(...t),this._keydownEvent=t=>{const e=this.supportedShortcuts(),a=t.shiftKey?t.key.toUpperCase():t.key;if((t.ctrlKey||t.metaKey)&&!t.altKey&&a in e){var i;if(!(0,o.u)(t.composedPath()))return;if(null!==(i=window.getSelection())&&void 0!==i&&i.toString())return;return t.preventDefault(),void e[a]()}const s=this.supportedSingleKeyShortcuts();a in s&&(t.preventDefault(),s[a]())},this._listenersAdded=!1}}}}]);