UNPKG

iobroker.lovelace

Version:

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

31 lines 41.4 kB
export const __rspack_esm_id=3383;export const __rspack_esm_ids=[3383];export const __webpack_modules__={64481(e,t,a){a.d(t,{D:()=>i,J:()=>s});a(64979);let o=!1;try{o="true"===window.localStorage.getItem("disableViewTransition")}catch{}const i=e=>{o=e},r=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e},s=e=>{if(!document.startViewTransition||o)return e(!1),Promise.resolve();let t=!1;try{const a=document.startViewTransition(()=>{t=!0,e(!0)});return a.ready.catch(r),a.finished.catch(r)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),t?Promise.reject(a):(e(!1),Promise.resolve())}}},75064(e,t,a){var o=a(62826),i=a(5124),r=a(22441),s=a(2846);class l extends s.G{constructor(...e){super(...e),this.borderTop=!1}}l.styles=[...s.J,i.AH`:host{--md-list-item-one-line-container-height:48px;--md-list-item-two-line-container-height:64px}:host([border-top]) md-item{border-top:1px solid var(--divider-color)}[slot=start]{--state-icon-color:var(--secondary-text-color)}[slot=overline]{line-height:1.15rem;font-size:calc(var(--mdc-typography-subtitle1-font-size, 1rem) * .75);font-weight:var(--mdc-typography-subtitle1-font-weight,400);font-family:var( --mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family) );color:var(--mdc-select-label-ink-color,rgba(0,0,0,.6))}[slot=headline]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-m);white-space:nowrap}[slot=supporting-text]{line-height:var(--ha-line-height-normal);font-size:var(--ha-font-size-s);white-space:nowrap}::slotted(img),::slotted(state-badge){width:32px;height:32px}::slotted(.code){font-family:var(--ha-font-family-code);font-size:var(--ha-font-size-xs)}::slotted(.domain){font-size:var(--ha-font-size-s);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);align-self:flex-end;max-width:30%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}`],(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"border-top"})],l.prototype,"borderTop",void 0),l=(0,o.Cg)([(0,r.EM)("ha-combo-box-item")],l)},93444(e,t,a){var o=a(62826),i=a(5124),r=a(22441);class s extends i.WF{render(){return i.qy` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `}static get styles(){return[i.AH`footer{display:flex;gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`]}}s=(0,o.Cg)([(0,r.EM)("ha-dialog-footer")],s)},76538(e,t,a){var o=a(62826),i=a(5124),r=a(22441);class s extends i.WF{render(){const e=i.qy`<div class="header-title"> <slot name="title"></slot> </div>`,t=i.qy`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`;return i.qy` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${"above"===this.subtitlePosition?i.qy`${t}${e}`:i.qy`${e}${t}`} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `}static get styles(){return[i.AH`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,rgba(0,0,0,.12))}.header-bar{display:flex;flex-direction:row;align-items:center;padding:0 var(--ha-space-1);box-sizing:border-box}.header-content{flex:1;padding:10px var(--ha-space-1);display:flex;flex-direction:column;justify-content:center;min-height:var(--ha-space-12);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media all and (min-width:450px) and (min-height:500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}.header-action-items{flex:none;min-width:var(--ha-space-2);height:100%;display:flex;flex-direction:row}`]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,o.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],s.prototype,"subtitlePosition",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],s.prototype,"showBorder",void 0),s=(0,o.Cg)([(0,r.EM)("ha-dialog-header")],s)},72554(e,t,a){a.a(e,async function(e,t){try{var o=a(62826),i=a(93900),r=a(35211),s=a(5124),l=a(22441),d=a(63672),n=a(1087),c=a(64481),h=a(22792),p=a(59992),f=a(14503),g=a(22348),u=(a(76538),a(26300)),v=e([i,u]);[i,u]=v.then?(await v)():v;const b="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class m extends((0,p.V)(s.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){return s.qy` <wa-dialog .open="${this._open}" .lightDismiss="${!this.preventScrimClose}" without-header aria-labelledby="${(0,d.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0))}" aria-describedby="${(0,d.J)(this.ariaDescribedBy)}" @keydown="${this._handleKeyDown}" @wa-hide="${this._handleHide}" @wa-show="${this._handleShow}" @wa-after-show="${this._handleAfterShow}" @wa-after-hide="${this._handleAfterHide}"> ${this.withoutHeader?s.s6:s.qy`<slot name="header"> <ha-dialog-header .subtitlePosition="${this.headerSubtitlePosition}" .showBorder="${this._bodyScrolled}"> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label="${this._i18n?.localize?.("ui.common.close")??"Close"}" .path="${b}"></ha-icon-button> </slot> ${void 0!==this.headerTitle?s.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:s.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?s.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:s.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll="${this._handleBodyScroll}"> <slot></slot> </div> ${this.renderScrollableFades()} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,c.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this._escapePressed=!0,this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){const t=e.detail?.source===e.target.dialog;this.preventScrimClose&&this._escapePressed&&t&&e.preventDefault(),this._escapePressed=!1}static get styles(){return[...super.styles,f.dp,s.AH`wa-dialog{--full-width:var( --ha-dialog-width-full, min(95vw, var(--safe-width)) );--width:min(var(--ha-dialog-width-md, 580px), var(--full-width));--spacing:var(--dialog-content-padding, var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration, 200ms);--hide-duration:var(--ha-dialog-hide-duration, 200ms);--wa-color-surface-raised:var( --ha-dialog-surface-background, var(--card-background-color, var(--ha-color-surface-default)) );--wa-panel-border-radius:var( --ha-dialog-border-radius, var(--ha-border-radius-3xl) );max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0ms;--hide-duration:0ms}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm, 320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg, 1024px), var(--full-width))}:host([fullscreen]) wa-dialog,:host([width=full]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{overflow:hidden;padding:0}wa-dialog::part(dialog){-webkit-backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)),calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));display:flex;flex-direction:column;overflow:hidden}wa-dialog::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media all and (max-width:450px),all and (max-height:500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full, 100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);margin-top:0;margin-bottom:0;padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);transform:none}}.header-title-container{display:flex;align-items:center}.header-title{margin:0;margin-bottom:0;color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var( --ha-dialog-header-title-font-size, var(--ha-font-size-2xl) );line-height:var( --ha-dialog-header-title-line-height, var(--ha-line-height-condensed) );font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:var(--ha-space-3)}wa-dialog::part(body){padding:0;display:flex;flex-direction:column;max-width:100%;overflow:hidden}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));overflow:auto;flex-grow:1}:host([flexcontent]) .body{max-width:100%;flex:1;display:flex;flex-direction:column}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%}`]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._escapePressed=!1,this._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,n.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{if(this._hassConfig?.auth.external&&(0,g.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}this.querySelector("[autofocus]")?.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,n.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,n.r)(this,"closed"))}}}(0,o.Cg)([(0,l.MZ)({attribute:"aria-labelledby"})],m.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"aria-describedby"})],m.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0})],m.prototype,"open",void 0),(0,o.Cg)([(0,l.MZ)({reflect:!0})],m.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:String,reflect:!0,attribute:"width"})],m.prototype,"width",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],m.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"header-title"})],m.prototype,"headerTitle",void 0),(0,o.Cg)([(0,l.MZ)({attribute:"header-subtitle"})],m.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,l.MZ)({type:String,attribute:"header-subtitle-position"})],m.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],m.prototype,"flexContent",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,attribute:"without-header"})],m.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,l.wk)()],m.prototype,"_open",void 0),(0,o.Cg)([(0,l.P)(".body")],m.prototype,"bodyContainer",void 0),(0,o.Cg)([(0,l.wk)(),(0,r.Fg)({context:h.D5,subscribe:!0})],m.prototype,"_i18n",void 0),(0,o.Cg)([(0,l.wk)(),(0,r.Fg)({context:h.WF,subscribe:!0})],m.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,l.wk)()],m.prototype,"_bodyScrolled",void 0),(0,o.Cg)([(0,l.Ls)({passive:!0})],m.prototype,"_handleBodyScroll",null),m=(0,o.Cg)([(0,l.EM)("ha-dialog")],m),t()}catch(e){t(e)}})},70947(e,t,a){var o=a(62826),i=a(50759),r=(a(38625),a(5124)),s=a(22441);a(67094);class l extends i.A{renderCheckboxIcon(){return r.qy` <ha-svg-icon id="check" part="checkmark" .path="${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"}"></ha-svg-icon> `}static get styles(){return[i.A.styles,r.AH`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`]}constructor(...e){super(...e),this.selected=!1}}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],l.prototype,"selected",void 0),l=(0,o.Cg)([(0,s.EM)("ha-dropdown-item")],l)},29823(e,t,a){a.a(e,async function(e,t){try{var o=a(62826),i=a(52254),r=a(5124),s=a(22441),l=e([i]);i=(l.then?(await l)():l)[0];class d extends i.A{get anchorElement(){return this.popup?.anchor}set anchorElement(e){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=e)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!0)}async hideMenu(){const e=this.getTrigger();e&&"ha-icon-button"===e.localName&&(e.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,r.AH`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var( --card-background-color, var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)), )}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`]}constructor(...e){super(...e),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"dropdownTag",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"dropdownItemTag",void 0),d=(0,o.Cg)([(0,s.EM)("ha-dropdown")],d),t()}catch(e){t(e)}})},47680(e,t,a){a.r(t),a.d(t,{HaIcon:()=>x});a(74423);var o=a(62826),i=a(5124),r=a(22441),s=a(1087),l=a(9899),d=a(700),n=(a(44114),a(18111),a(7588),a(95192)),c=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let p;const f=()=>(p||(p=g().catch(e=>{throw p=void 0,e})),p),g=async()=>{const e=(0,n.y$)("hass-icon-db","mdi-icon-store"),t=await(0,n.Jt)("_version",e);return t?t!==h.version&&(await(0,n.IU)(e),(0,n.hZ)("_version",h.version,e)):(0,n.hZ)("_version",h.version,e),e},u=["mdi","hass","hassio","hademo"];let v=[];a(67094);const b={},m={},y=(0,l.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await f())("readwrite",o=>{a.forEach((a,i)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{o.put(t,e)}),delete e[t[i]]})})})(m),2e3),w={},_={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(e=>e.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(e=>e.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(e=>e.mdiEsphomeLogo)};class x extends i.WF{willUpdate(e){super.willUpdate(e),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?i.qy` <iron-icon .icon="${this.icon}"></iron-icon>`:i.qy`<ha-svg-icon .path="${this._path}" .secondaryPath="${this._secondaryPath}" .viewBox="${this._viewBox}"></ha-svg-icon>`:i.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let o,i=a;if(!t||!i)return;if(!u.includes(t)){const a=d.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(i),e)):void(this._legacy=!0)}if(this._legacy=!1,i in b){const e=b[i];let a;e.newName?(a=`Icon ${t}:${i} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,i=e.newName):a=`Icon ${t}:${i} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(a),(0,s.r)(this,"write_log",{level:"warning",message:a})}if(i in w)return void(this._path=w[i]);if(i in _){const t=await _[i]();return this.icon===e&&(this._path=t),void(w[i]=t)}try{o=await(e=>new Promise((t,a)=>{if(v.push([e,t,a]),v.length>1)return;const o=f();(0,c.h)(1e3,(async()=>{(await o)("readonly",e=>{for(const[t,a,o]of v)(0,n.Yd)(e.get(t)).then(e=>a(e)).catch(e=>o(e));v=[]})})()).catch(e=>{for(const[,,t]of v)t(e);v=[]})}))(i)}catch(e){o=void 0}if(o)return this.icon===e&&(this._path=o),void(w[i]=o);const r=(e=>{let t;for(const a of h.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(i);if(r in m)return void this._setPath(m[r],i,e);const l=fetch(`/static/mdi/${r}.json`).then(e=>e.json());m[r]=l,this._setPath(l,i,e),l.catch(()=>{delete m[r]}),y()}async _setCustomPath(e,t){const a=await e;this.icon===t&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(e,t,a){try{const o=await e;this.icon===a&&(this._path=o[t]),w[t]=o[t]}catch(e){}}constructor(...e){super(...e),this._legacy=!1}}x.styles=i.AH`:host{fill:currentcolor}`,(0,o.Cg)([(0,r.MZ)()],x.prototype,"icon",void 0),(0,o.Cg)([(0,r.wk)()],x.prototype,"_path",void 0),(0,o.Cg)([(0,r.wk)()],x.prototype,"_secondaryPath",void 0),(0,o.Cg)([(0,r.wk)()],x.prototype,"_viewBox",void 0),(0,o.Cg)([(0,r.wk)()],x.prototype,"_legacy",void 0),x=(0,o.Cg)([(0,r.EM)("ha-icon")],x)},3449(e,t,a){var o=a(62826),i=a(5124),r=a(22441);class s extends i.WF{render(){return i.qy`<slot></slot>`}constructor(...e){super(...e),this.disabled=!1}}s.styles=i.AH`:host{display:block;color:var(--mdc-text-field-label-ink-color,rgba(0,0,0,.6));font-size:var(--ha-font-size-s);padding-left:16px;padding-right:16px;padding-inline-start:16px;padding-inline-end:16px;letter-spacing:var( --mdc-typography-caption-letter-spacing, .0333333333em );line-height:normal}:host([disabled]){color:var(--mdc-text-field-disabled-ink-color,rgba(0,0,0,.6))}`,(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],s.prototype,"disabled",void 0),s=(0,o.Cg)([(0,r.EM)("ha-input-helper-text")],s)},2846(e,t,a){a.d(t,{G:()=>n,J:()=>d});var o=a(62826),i=a(58168),r=a(82553),s=a(5124),l=a(22441);a(54276);const d=[r.R,s.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 n extends i.n{renderRipple(){return"text"===this.type?s.s6:s.qy`<ha-ripple part="ripple" for="item" ?disabled="${this.disabled&&"link"!==this.type}"></ha-ripple>`}}n.styles=d,n=(0,o.Cg)([(0,l.EM)("ha-md-list-item")],n)},88285(e,t,a){a.a(e,async function(e,t){try{var o=a(62826),i=a(35211),r=a(5124),s=a(22441),l=a(63672),d=a(1087),n=a(22792),c=a(17894),h=(a(75064),a(47680),a(26300)),p=e([h]);h=(p.then?(await p)():p)[0];const f="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",g="M7,10L12,15L17,10H7Z";class u extends((0,c.c)(r.WF)){async focus(){await this.updateComplete,await(this.item?.focus())}render(){const e=!!this.value,t=!(!this.value||this.required||this.disabled||this.hideClearIcon),a=this.placeholder??this.label,o=this.label&&e?r.qy`<span slot="overline">${this.label}${this.required?" *":""}</span>`:r.s6,i=e?this.valueRenderer?this.valueRenderer(this.value??""):r.qy`<span slot="headline">${this.value}</span>`:a?r.qy`<span slot="headline" class="placeholder"> ${a}${this.required?" *":""} </span>`:r.s6;return r.qy` <ha-combo-box-item aria-label="${(0,l.J)(this.label||this.placeholder)}" .disabled="${this.disabled}" type="button" compact="compact"> ${this.image?r.qy`<img alt="${this.label??""}" slot="start" .src="${this.image}" crossorigin="anonymous" referrerpolicy="no-referrer">`:this.icon?r.qy`<ha-icon slot="start" .icon="${this.icon}"></ha-icon>`:r.qy`<slot name="start"></slot>`} ${o}${i} ${this.unknown?r.qy`<div slot="supporting-text" class="unknown"> ${this.unknownItemText||this._i18n?.localize("ui.components.combo-box.unknown_item")} </div>`:r.s6} ${t?r.qy` <ha-icon-button class="clear" slot="end" @click="${this._clear}" .path="${f}"></ha-icon-button> `:r.s6} <ha-svg-icon class="arrow" slot="end" .path="${g}"></ha-svg-icon> </ha-combo-box-item> `}_clear(e){e.stopPropagation(),(0,d.r)(this,"clear")}static get styles(){return[r.AH`ha-combo-box-item[disabled]{background-color:var(--ha-color-form-background-disabled);--md-list-item-disabled-opacity:0.5;opacity:.5;cursor:not-allowed}ha-combo-box-item{position:relative;background-color:var(--ha-color-form-background);border-radius:var(--ha-border-radius-sm);border-end-end-radius:0;border-end-start-radius:0;--md-list-item-one-line-container-height:56px;--md-list-item-two-line-container-height:56px;--md-list-item-top-space:0px;--md-list-item-bottom-space:0px;--md-list-item-leading-space:var(--ha-space-4);--md-list-item-trailing-space:var(--ha-space-2);--ha-md-list-item-gap:var(--ha-space-2);--md-focus-ring-width:0px;--md-focus-ring-duration:0s}ha-combo-box-item:after{display:block;content:"";position:absolute;pointer-events:none;bottom:0;left:0;right:0;height:1px;width:100%;background-color:var(--ha-color-border-neutral-loud);transform:height 180ms ease-in-out,background-color 180ms ease-in-out}ha-combo-box-item:focus:after{height:2px;background-color:var(--mdc-theme-primary)}:host([unknown]) ha-combo-box-item{background-color:var(--ha-color-fill-warning-quiet-resting)}:host([invalid]) ha-combo-box-item:after{height:2px;background-color:var(--mdc-theme-error,var(--error-color,#b00020))}.clear{margin:0 -8px;--ha-icon-button-size:32px;--ha-icon-button-padding-inline:var(--ha-space-1)}.arrow{--mdc-icon-size:20px;width:32px}.placeholder{color:var(--secondary-text-color)}:host([invalid]) .placeholder{color:var(--mdc-theme-error,var(--error-color,#b00020))}.unknown{color:var(--ha-color-on-warning-normal)}`]}constructor(...e){super(...e),this.invalid=!1}}(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],u.prototype,"invalid",void 0),(0,o.Cg)([(0,s.P)("ha-combo-box-item",!0)],u.prototype,"item",void 0),(0,o.Cg)([(0,s.wk)(),(0,i.Fg)({context:n.D5,subscribe:!0})],u.prototype,"_i18n",void 0),u=(0,o.Cg)([(0,s.EM)("ha-picker-field")],u),t()}catch(e){t(e)}})},54276(e,t,a){var o=a(62826),i=a(76482),r=a(91382),s=a(96245),l=a(5124),d=a(22441);class n extends r.n{attach(e){super.attach(e),this.attachableTouchController.attach(e)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(e,t){e?.removeEventListener("touchend",this._handleTouchEnd),t?.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}n.styles=[s.R,l.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)) )}`],n=(0,o.Cg)([(0,d.EM)("ha-ripple")],n)},606(e,t,a){a.a(e,async function(e,t){try{a(74423),a(18111),a(61701);var o=a(62826),i=a(5124),r=a(22441),s=a(63672),l=a(22786),d=a(1087),n=a(29823),c=(a(70947),a(3449),a(88285)),h=(a(67094),e([n,c]));[n,c]=h.then?(await h)():h;class p extends i.WF{render(){return this.disabled?i.qy`${this._renderField()}${this._renderHelper()}`:i.qy` <ha-dropdown placement="bottom" @wa-select="${this._handleSelect}" @wa-show="${this._handleShow}" @wa-hide="${this._handleHide}"> ${this._renderField()} ${this.options?this.options.map(e=>{const t=["string","number"].includes(typeof e);return i.qy` <ha-dropdown-item .value="${t?e:e.value}" .disabled="${!t&&(e.disabled??!1)}" .selected="${this.value===(t?e:e.value)}"> ${e.iconPath?i.qy`<ha-svg-icon slot="icon" .path="${e.iconPath}"></ha-svg-icon>`:i.s6} <div class="content"> ${t?e:e.label||e.value} ${e.secondary?i.qy`<div class="secondary">${e.secondary}</div>`:i.s6} </div> </ha-dropdown-item> `}):i.qy`<slot></slot>`} </ha-dropdown> ${this._renderHelper()} `}_renderField(){const e=this._getValueLabel(this.options,this.value);return i.qy` <ha-picker-field slot="trigger" type="button" class="${this._opened?"opened":""}" compact="compact" aria-label="${(0,s.J)(this.label)}" @clear="${this._clearValue}" .label="${this.label}" .value="${e}" .required="${this.required}" .disabled="${this.disabled}" .hideClearIcon="${!this.clearable||this.required||this.disabled||!String(this.value)}"> </ha-picker-field> `}_renderHelper(){return this.helper?i.qy`<ha-input-helper-text .disabled="${this.disabled}">${this.helper}</ha-input-helper-text>`:i.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,d.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,d.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,l.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const t of e){const e=["string","number"].includes(typeof t);if(e&&t===a||!e&&String(t.value)===a)return e?t:t.label||t.value}return a})}}p.styles=i.AH`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{display:flex;gap:var(--ha-space-1);flex-direction:column}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{display:block;margin:var(--ha-space-2) 0 0}`,(0,o.Cg)([(0,r.MZ)({type:Boolean})],p.prototype,"clearable",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"options",void 0),(0,o.Cg)([(0,r.MZ)()],p.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],p.prototype,"helper",void 0),(0,o.Cg)([(0,r.MZ)()],p.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,o.Cg)([(0,r.wk)()],p.prototype,"_opened",void 0),(0,o.Cg)([(0,r.P)("ha-picker-field")],p.prototype,"_triggerField",void 0),p=(0,o.Cg)([(0,r.EM)("ha-select")],p),t()}catch(e){t(e)}})},700(e,t,a){a.d(t,{y:()=>s});const o=window;"customIconsets"in o||(o.customIconsets={});const i=o.customIconsets,r=window;"customIcons"in r||(r.customIcons={});const s=new Proxy(r.customIcons,{get:(e,t)=>e[t]??(i[t]?{getIcon:i[t]}:void 0)})},17894(e,t,a){a.d(t,{c:()=>r});var o=a(62826),i=a(22441);const r=e=>{class t extends e{constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.unknown=!1,this.hideClearIcon=!1}}return(0,o.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"disabled",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean})],t.prototype,"required",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"icon",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"image",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"label",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"placeholder",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"helper",void 0),(0,o.Cg)([(0,i.MZ)()],t.prototype,"value",void 0),(0,o.Cg)([(0,i.MZ)({type:Boolean,reflect:!0})],t.prototype,"unknown",void 0),(0,o.Cg)([(0,i.MZ)({attribute:"unknown-item-text"})],t.prototype,"unknownItemText",void 0),(0,o.Cg)([(0,i.MZ)({attribute:"hide-clear-icon",type:Boolean})],t.prototype,"hideClearIcon",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],t.prototype,"valueRenderer",void 0),t}},59992(e,t,a){a.d(t,{V:()=>d});var o=a(62826),i=a(88696),r=a(5124),s=a(6412),l=a(22441);const d=e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){super.firstUpdated?.(e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){super.updated?.(e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return r.qy` <div class="${(0,s.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled})}"></div> <div class="${(0,s.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable})}"></div> `}static get styles(){const e=Object.getPrototypeOf(this);var t;return[...void 0===(t=e?.styles??[])?[]:Array.isArray(t)?t:[t],r.AH`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),this._resize.unobserve?.(this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:o=0,scrollTop:i=0}=e;this._contentScrollable=a-o>i+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{const t=e.currentTarget;this._contentScrolled=(t.scrollTop??0)>this.scrollFadeThreshold,this._updateScrollableState(t)},this._resize=new i.P(this,{target:null,callback:e=>{const t=e[0]?.target;t&&this._updateScrollableState(t)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t}},12810(e,t,a){a.a(e,async function(e,o){try{a.r(t);a(18111),a(61701);var i=a(62826),r=a(5124),s=a(22441),l=a(22786),d=a(1087),n=a(18350),c=a(72554),h=(a(93444),a(606)),p=a(65829),f=a(47351),g=a(15336),u=a(65063),v=a(14503),b=a(46187),m=e([n,c,h,p]);[n,c,h,p]=m.then?(await m)():m;const y=(0,l.A)(e=>{const t=1e3*e.disk_used/60/30,a=4*e.startup_time/60;return 10*Math.ceil((t+a)/10)});class w extends r.WF{async showDialog(e){this._hostInfo=e.hostInfo,this._open=!0;try{this._osInfo=await(0,g.PB)(this.hass);const e=await(0,g.xY)(this.hass);e.devices.length>0?this._disks=e.disks:(this.closeDialog(),await(0,u.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.storage.datadisk.no_devices_title"),text:this.hass.localize("ui.panel.config.storage.datadisk.no_devices_text")}))}catch(e){this.closeDialog(),await(0,u.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.hardware.system_hardware.failed_to_get"),text:(0,f.VR)(e)})}}closeDialog(){this._open=!1,this._hostInfo&&this._osInfo&&this._disks||this._dialogClosed()}_dialogClosed(){this._selectedDevice=void 0,this._disks=void 0,this._moving=!1,this._hostInfo=void 0,this._osInfo=void 0,(0,d.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._hostInfo&&this._osInfo&&this._disks?r.qy` <ha-dialog .open="${this._open}" header-title="${this._moving?this.hass.localize("ui.panel.config.storage.datadisk.moving"):this.hass.localize("ui.panel.config.storage.datadisk.title")}" @closed="${this._dialogClosed}"> ${this._moving?r.qy` <ha-spinner aria-label="Moving" size="large"></ha-spinner> <p class="progress-text"> ${this.hass.localize("ui.panel.config.storage.datadisk.moving_desc")} </p> `:r.qy` ${this.hass.localize("ui.panel.config.storage.datadisk.description",{current_path:this._osInfo.data_disk,time:y(this._hostInfo)})} <br><br> <ha-select autofocus .label="${this.hass.localize("ui.panel.config.storage.datadisk.select_device")}" @selected="${this._selectDevice}" .options="${this._disks.map(e=>({value:e.id,label:`${e.vendor} ${e.model}`,secondary:this.hass.localize("ui.panel.config.storage.datadisk.extra_information",{size:(0,b.A)(e.size),serial:e.serial})}))}"></ha-select> `} ${this._moving?r.s6:r.qy` <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${this.closeDialog}"> ${this.hass.localize("ui.panel.config.storage.datadisk.cancel")} </ha-button> <ha-button .disabled="${!this._selectedDevice}" slot="primaryAction" @click="${this._moveDatadisk}"> ${this.hass.localize("ui.panel.config.storage.datadisk.move")} </ha-button> </ha-dialog-footer> `} </ha-dialog> `:r.s6}_selectDevice(e){this._selectedDevice=e.detail.value}async _moveDatadisk(){this._moving=!0;try{await(0,g.v9)(this.hass,this._selectedDevice)}catch(e){this.hass.connection.connected&&!(0,f.Tv)(e)&&(0,u.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.storage.datadisk.failed_to_move"),text:(0,f.VR)(e)})}finally{this.closeDialog()}}static get styles(){return[v.RF,v.nA,r.AH`ha-select{width:100%}ha-spinner{display:block;margin:32px auto}.progress-text{text-align:center}`]}constructor(...e){super(...e),this._moving=!1,this._open=!1}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],w.prototype,"hass",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_hostInfo",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_selectedDevice",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_disks",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_osInfo",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_moving",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_open",void 0),w=(0,i.Cg)([(0,s.EM)("dialog-move-datadisk")],w),o()}catch(e){o(e)}})},46187(e,t,a){a.d(t,{A:()=>o});const o=(e=0,t=2)=>{if(0===e)return"0 Bytes";t=t<0?0:t;const a=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**a).toFixed(t))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][a]}`}},22348(e,t,a){a.d(t,{V:()=>i});var o=a(37177);const i=e=>!!e&&o.n},37177(e,t,a){a.d(t,{n:()=>o});const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}};