UNPKG

iobroker.lovelace

Version:

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

71 lines (67 loc) 27.1 kB
/*! For license information please see 48472.79c7ccddff8d354e.js.LICENSE.txt */ export const __rspack_esm_id=48472;export const __rspack_esm_ids=[48472];export const __webpack_modules__={63708(t,a,e){e.d(a,{fW:()=>r});e(18111),e(13579);var i=e(44537),o=e(36312);const r=(t,a)=>(l(a)||s(t,a))&&n(t,a),s=(t,a)=>!a.component||(0,i.e)(a.component).some(a=>(0,o.x)(t.config,a)),n=(t,a)=>!a.not_component||!(0,i.e)(a.not_component).some(a=>(0,o.x)(t.config,a)),l=t=>t.core},29006(t,a,e){e.d(a,{F:()=>o});e(18111),e(22489);var i=e(63708);const o=(t,a,e={})=>a.filter(a=>"#external-app-configuration"===a.path?t.auth.external?.config.hasSettingsScreen:!(a.adminOnly&&!t.user?.is_admin)&&("bluetooth"===a.component?e.hasBluetoothConfigEntries??!1:(0,i.fW)(t,a)))},67505(t,a,e){var i=e(62826),o=e(5124),r=e(22441),s=e(93421);e(67094);class n extends o.WF{render(){return this._localize?o.qy` <ha-svg-icon .path="${"M12,2A7,7 0 0,1 19,9C19,11.38 17.81,13.47 16,14.74V17A1,1 0 0,1 15,18H9A1,1 0 0,1 8,17V14.74C6.19,13.47 5,11.38 5,9A7,7 0 0,1 12,2M9,21V20H15V21A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21M12,4A5,5 0 0,0 7,9C7,11.05 8.23,12.81 10,13.58V16H14V13.58C15.77,12.81 17,11.05 17,9A5,5 0 0,0 12,4Z"}"></ha-svg-icon> <span class="prefix">${this._localize("ui.panel.config.tips.tip")}</span> <span class="text"><slot></slot></span> `:o.s6}}n.styles=o.AH`:host{display:block;text-align:center}.text{direction:var(--direction);margin-left:2px;margin-inline-start:2px;margin-inline-end:initial;color:var(--secondary-text-color)}.prefix{font-weight:var(--ha-font-weight-medium)}`,(0,i.Cg)([(0,r.wk)(),(0,s.IW)()],n.prototype,"_localize",void 0),n=(0,i.Cg)([(0,r.EM)("ha-tip")],n)},34127(t,a,e){e.a(t,async function(t,a){try{var i=e(62826),o=e(52630),r=e(5124),s=e(22441),n=t([o]);o=(n.then?(await n)():n)[0];class l extends o.A{static get styles(){return[o.A.styles,r.AH`:host{--wa-tooltip-background-color:var( --ha-tooltip-background-color, var(--ha-color-surface-default) );--wa-tooltip-content-color:var( --ha-tooltip-text-color, var(--primary-text-color) );--wa-tooltip-font-family:var( --ha-tooltip-font-family, var(--ha-font-family-body) );--wa-tooltip-font-size:var( --ha-tooltip-font-size, var(--ha-font-size-m) );--wa-tooltip-font-weight:var( --ha-tooltip-font-weight, var(--ha-font-weight-medium) );--wa-tooltip-line-height:var( --ha-tooltip-line-height, var(--ha-line-height-condensed) );--wa-tooltip-padding:var(--ha-tooltip-padding, var(--ha-space-2));--wa-tooltip-border-radius:var( --ha-tooltip-border-radius, var(--ha-border-radius-md) );--wa-tooltip-arrow-size:var(--ha-tooltip-arrow-size, 0px);--wa-tooltip-border-width:0px;--wa-z-index-tooltip:1000}.tooltip::part(popup){animation-duration:var(--ha-tooltip-animation-duration, 0)}.body{box-shadow:var(--ha-tooltip-box-shadow,var(--ha-box-shadow-m))}`]}constructor(...t){super(...t),this.showDelay=350,this.hideDelay=150}}(0,i.Cg)([(0,s.MZ)({attribute:"show-delay",type:Number})],l.prototype,"showDelay",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"hide-delay",type:Number})],l.prototype,"hideDelay",void 0),l=(0,i.Cg)([(0,s.EM)("ha-tooltip")],l),a()}catch(t){a(t)}})},27330(t,a,e){e.d(a,{L:()=>h,p:()=>l});var i=e(62826),o=e(5124),r=e(22441),s=e(6412);const n={passive:!0},l=o.AH`:host{display:block}.top-app-bar{box-sizing:border-box;color:var(--app-header-text-color,#fff);background-color:var(--app-header-background-color,var(--primary-color));position:fixed;top:0;inset-inline-end:0;width:var(--ha-top-app-bar-width,100%);z-index:4;padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);transition:box-shadow var(--ha-animation-duration-normal) ease,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}:host([narrow]) .top-app-bar{padding-left:var(--safe-area-inset-left)}.top-app-bar.scrolled:not(.pane-header){box-shadow:var(--ha-box-shadow-s)}.row{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--header-height);border-bottom:var(--app-header-border-bottom)}.section{display:flex;align-items:center;box-sizing:border-box;min-width:0;height:100%;padding:0 var(--ha-space-3)}#navigation{flex:1 1 auto}.section.center{flex:1 1 auto;justify-content:center;text-align:center}.section.end{flex:none;justify-content:flex-end}.title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--header-height);padding-inline-start:var(--ha-space-6)}:host([narrow]) .title{padding-inline-start:var(--ha-space-2)}.top-app-bar-fixed-adjust{padding-top:calc(var(--header-height,0px) + var(--safe-area-inset-top,0px));padding-bottom:var(--safe-area-inset-bottom);padding-right:var(--safe-area-inset-right)}:host([narrow]) .top-app-bar-fixed-adjust{padding-left:var(--safe-area-inset-left)}`;class h extends o.WF{get scrollTarget(){return this._scrollTarget||window}set scrollTarget(t){const a=this.scrollTarget;this._unregisterListeners(),this._scrollTarget=t,this._updateBarPosition(),this.requestUpdate("scrollTarget",a),this.isConnected&&(this._registerListeners(),this._syncScrollState())}_isPaneHeader(){return!1}render(){return o.qy`${this._renderHeader()}${this._renderContent()}`}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateBarPosition(),this._registerListeners(),this._syncScrollState())}_renderHeader(){const t=o.qy`<span class="title"> <slot name="title"></slot> </span>`,a=this._isPaneHeader();return o.qy` <header class="top-app-bar ${(0,s.H)({"pane-header":a})}"> <div class="row"> ${a?o.qy`<section class="section" id="title"> <slot name="navigationIcon"></slot> ${t} </section>`:o.s6} <section class="section" id="navigation"> ${a?o.s6:o.qy`<slot name="navigationIcon"></slot> ${this.centerTitle?o.s6:t}`} </section> ${!a&&this.centerTitle?o.qy`<section class="section center">${t}</section>`:o.s6} <section class="section end" id="actions" role="toolbar"> <slot name="actionItems"></slot> </section> </div> </header> `}_renderContent(){return o.qy`<div class="top-app-bar-fixed-adjust"> <slot></slot> </div>`}firstUpdated(t){super.firstUpdated(t),this._updateBarPosition(),this._registerListeners(),this._syncScrollState()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterListeners()}_updateBarPosition(){this._barElement&&(this._barElement.style.position=this.scrollTarget===window?"":"absolute")}_registerListeners(){this.scrollTarget.addEventListener("scroll",this._syncScrollState,n)}_unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this._syncScrollState)}constructor(...t){super(...t),this.narrow=!1,this.centerTitle=!1,this._syncScrollState=()=>{const t=this.scrollTarget instanceof Window?this.scrollTarget.pageYOffset:this.scrollTarget.scrollTop;this._barElement?.classList.toggle("scrolled",t>0)}}}h.styles=l,(0,i.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],h.prototype,"narrow",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"center-title",type:Boolean})],h.prototype,"centerTitle",void 0),(0,i.Cg)([(0,r.P)(".top-app-bar")],h.prototype,"_barElement",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],h.prototype,"scrollTarget",null),h=(0,i.Cg)([(0,r.EM)("ha-top-app-bar-fixed")],h)},47819(t,a,e){var i=e(62826),o=e(5124),r=e(22441),s=e(63672),n=e(50723);class l extends n.N{render(){return o.qy`<nav part="nav" aria-label="${(0,s.J)(this.ariaLabel??void 0)}"> <div part="base" class="base" role="list"> <slot></slot> </div> </nav>`}constructor(...t){super(...t),this.hostRole="",this.ariaLabel=null}}(0,i.Cg)([(0,r.MZ)({type:String,attribute:"aria-label",reflect:!1})],l.prototype,"ariaLabel",void 0),l=(0,i.Cg)([(0,r.EM)("ha-list-nav")],l)},34779(t,a,e){e.d(a,{XJ:()=>r,uq:()=>n,xP:()=>l});var i=e(1087),o=e(96126);const r=(t,a)=>a&&t?.is_admin||"command"!==a&&"device"!==a&&"area"!==a?a:void 0,s=()=>Promise.all([e.e(4801),e.e(39763),e.e(32450),e.e(46095),e.e(7305),e.e(92769),e.e(3283),e.e(14685),e.e(93506),e.e(26092),e.e(8851),e.e(94815)]).then(e.bind(e,89704)),n=(t,a)=>{(0,i.r)(t,"show-dialog",{dialogTag:"ha-quick-bar",dialogImport:s,dialogParams:a,addHistory:!1})},l=()=>{(0,o.zU)("ha-quick-bar")}},9835(t,a,e){e.d(a,{eb:()=>n,lD:()=>s});var i=e(1087);const o=()=>Promise.all([e.e(4801),e.e(32450),e.e(46095),e.e(79996),e.e(80617),e.e(99128)]).then(e.bind(e,15903)),r=()=>e.e(78590).then(e.bind(e,25069)),s=t=>{(0,i.r)(t,"show-dialog",{dialogTag:"dialog-restart",dialogImport:o,dialogParams:{}})},n=(t,a)=>{(0,i.r)(t,"show-dialog",{dialogTag:"dialog-restart-wait",dialogImport:r,dialogParams:a})}},41631(t,a,e){e.d(a,{H:()=>o});var i=e(1087);const o=t=>(0,i.r)(t,"show-dialog",{dialogTag:"dialog-shortcuts",dialogImport:()=>e.e(72432).then(e.bind(e,9555))})},22823(t,a,e){e(18111),e(61701);var i=e(62826),o=e(5124),r=e(22441);e(43661),e(67094),e(1671),e(47819);class s extends o.WF{render(){return o.qy` <ha-list-nav .ariaLabel="${this.label}"> ${this.pages.map(t=>{const a=t.path.endsWith("#external-app-configuration");return o.qy` <ha-list-item-button .href="${a?void 0:t.path}" @click="${a?this._handleExternalApp:void 0}"> <div slot="start" class="${t.iconColor?"icon-background":""}" .style="background-color: ${t.iconColor||"undefined"}"> <ha-svg-icon .path="${t.iconPath}" .secondaryPath="${t.iconSecondaryPath}" .viewBox="${t.iconViewBox}"></ha-svg-icon> </div> <span slot="headline">${t.name}</span> ${this.hasSecondary?o.qy`<span slot="supporting-text">${t.description}</span>`:""} ${this.narrow?"":o.qy`<ha-icon-next slot="end"></ha-icon-next>`} </ha-list-item-button> `})} </ha-list-nav> `}_handleExternalApp(){this.hass.auth.external.fireMessage({type:"config_screen/show"})}constructor(...t){super(...t),this.narrow=!1,this.hasSecondary=!1}}s.styles=o.AH`ha-icon-next,ha-svg-icon{color:var(--secondary-text-color);height:24px;width:24px;display:block}ha-svg-icon{padding:8px}.icon-background{border-radius:var(--ha-border-radius-circle)}.icon-background ha-svg-icon{color:#fff}`,(0,i.Cg)([(0,r.MZ)({attribute:!1})],s.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],s.prototype,"narrow",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],s.prototype,"pages",void 0),(0,i.Cg)([(0,r.MZ)({attribute:"has-secondary",type:Boolean})],s.prototype,"hasSecondary",void 0),(0,i.Cg)([(0,r.MZ)()],s.prototype,"label",void 0),s=(0,i.Cg)([(0,r.EM)("ha-config-navigation-list")],s)},19612(t,a,e){e.a(t,async function(t,i){try{e.r(a);e(44114),e(18111),e(22489),e(7588),e(61701),e(17642),e(58004),e(33853),e(45876),e(32475),e(15024),e(31698);var o=e(62826),r=e(5124),s=e(22441),n=e(22786),l=e(36312),h=(e(76776),e(29823)),c=(e(70947),e(26300)),d=(e(43661),e(2054)),p=(e(67094),e(67505),e(34127)),g=(e(27330),e(55782)),u=e(24247),f=e(34779),v=e(9835),m=e(41631),b=e(54706),y=e(14503),w=e(36918),x=e(41570),_=e(84187),C=(e(20820),e(25635)),$=e(98712),k=(e(73524),e(87842)),z=t([h,c,d,p,$,k,u]);[h,c,d,p,$,k,u]=z.then?(await z)():z;const M="M14.2 14.5V14.74C13.5 15.34 13 16.24 13 17.2V20H6.5C5 20 3.69 19.5 2.61 18.43C1.54 17.38 1 16.09 1 14.58C1 13.28 1.39 12.12 2.17 11.1S4 9.43 5.25 9.15C5.67 7.62 6.5 6.38 7.75 5.43S10.42 4 12 4C13.95 4 15.6 4.68 16.96 6.04C18.08 7.16 18.73 8.5 18.93 10C16.36 10.04 14.2 12.08 14.2 14.5M23 17.3V20.8C23 21.4 22.4 22 21.7 22H16.2C15.6 22 15 21.4 15 20.7V17.2C15 16.6 15.6 16 16.2 16V14.5C16.2 13.1 17.6 12 19 12S21.8 13.1 21.8 14.5V16C22.4 16 23 16.6 23 17.3M20.5 14.5C20.5 13.7 19.8 13.2 19 13.2S17.5 13.7 17.5 14.5V16H20.5V14.5Z",A="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",S="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z",q="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",H="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z",B=(t,a,e)=>{const i=[];let o=[{content:a.localize("ui.panel.config.tips.join",{forums:r.qy`<a href="https://community.home-assistant.io" target="_blank" rel="noreferrer">${a.localize("ui.panel.config.tips.join_forums")}</a>`,social_media:r.qy`<a href="${(0,w.o)(a,"/socials")}" target="_blank" rel="noreferrer">${a.localize("ui.panel.config.tips.social_media")}</a>`,discord:r.qy`<a href="${(0,w.o)(a,"/join-chat")}" target="_blank" rel="noreferrer">${a.localize("ui.panel.config.tips.join_chat")}</a>`,blog:r.qy`<a href="${(0,w.o)(a,"/blog")}" target="_blank" rel="noreferrer">${a.localize("ui.panel.config.tips.join_blog")}</a>`,newsletter:r.qy`<span class="keep-together"><a href="https://newsletter.openhomefoundation.org/" target="_blank" rel="noreferrer">${a.localize("ui.panel.config.tips.join_newsletter")}</a> </span>`}),weight:2,narrow:!0}];if(a?.enableShortcuts&&!_.M){const e={keyboard_shortcut:r.qy`<a href="#" @click="${t}">${a.localize("ui.tips.keyboard_shortcut")}</a>`};a.user?.is_admin&&o.push({content:a.localize("ui.tips.key_c_tip",e),weight:1,narrow:!1}),o.push({content:a.localize("ui.tips.key_m_tip",e),weight:1,narrow:!1},{content:a.localize("ui.tips.key_a_tip",e),weight:1,narrow:!1},{content:a.localize("ui.tips.key_shortcut_quick_search",{...e,modifier:x.c?"⌘":"Ctrl"}),weight:1,narrow:!1})}return e&&(o=o.filter(t=>t.narrow)),o.forEach(t=>{for(let a=0;a<t.weight;a++)i.push(t.content)}),i[Math.floor(Math.random()*i.length)]};class E extends((0,b.E)(r.WF)){hassSubscribe(){return[(0,g.TP)(this.hass.connection,t=>{const a=t.issues.filter(t=>!t.ignored);this._repairsIssues={issues:a.sort((t,a)=>g.Qk[t.severity]-g.Qk[a.severity]).slice(0,3===a.length?a.length:2),total:a.length};const e=new Set;for(const t of this._repairsIssues.issues)e.add(t.domain);this.hass.loadBackendTranslation("issues",[...e])})]}render(){const t=[this.hass.localize("ui.dialogs.quick-bar.title"),this.hass.enableShortcuts&&!_.M?x.c?"(⌘ + K)":"(Ctrl + K)":void 0].filter(Boolean).join(" "),{updates:a,total:e}=this._filterUpdateEntitiesParameterized(this.hass.states,this.hass.entities),{issues:i,total:o}=this._repairsIssues;return r.qy` <ha-top-app-bar-fixed .narrow=${this.narrow}> <ha-menu-button slot="navigationIcon" .hass=${this.hass} .narrow=${this.narrow} ></ha-menu-button> <div slot="title">${this.hass.localize("panel.config")}</div> <ha-icon-button slot="actionItems" id="button-quick-bar" .label=${t} .path=${S} hide-title @click=${this._showQuickBar} ></ha-icon-button> <ha-tooltip placement="bottom" for="button-quick-bar" >${t}</ha-tooltip > <ha-dropdown slot="actionItems" @wa-select=${this._handleMenuAction}> <ha-icon-button slot="trigger" .label=${this.hass.localize("ui.common.menu")} .path=${A} ></ha-icon-button> <ha-dropdown-item value="check-updates"> ${this.hass.localize("ui.panel.config.updates.check_updates")} <ha-svg-icon slot="icon" .path=${H}></ha-svg-icon> </ha-dropdown-item> <ha-dropdown-item value="restart"> ${this.hass.localize("ui.panel.config.system_dashboard.restart_homeassistant")} <ha-svg-icon slot="icon" .path=${q}></ha-svg-icon> </ha-dropdown-item> </ha-dropdown> <ha-config-section .narrow=${this.narrow} .isWide=${this.isWide} full-width > ${i.length||a.length?r.qy`<div class="dashboard-alerts"> ${i.length?r.qy` <ha-card outlined class="dashboard-alert-card"> <div class="dashboard-alert-title" role="heading" aria-level="2"> <a href="/config/repairs?historyBack=1"> ${this.hass.localize("ui.panel.config.repairs.title",{count:o})} <ha-icon-next></ha-icon-next> </a> </div> <ha-config-repairs .hass="${this.hass}" .narrow="${this.narrow}" .repairsIssues="${i}"></ha-config-repairs> </ha-card> `:""} ${a.length?r.qy` <ha-card outlined class="dashboard-alert-card"> <div class="dashboard-alert-title" role="heading" aria-level="2"> <a href="/config/updates?historyBack=1"> ${this.hass.localize("ui.panel.config.updates.title",{count:e})} <ha-icon-next></ha-icon-next> </a> </div> <ha-config-updates .hass="${this.hass}" .narrow="${this.narrow}" .updateEntities="${a}"></ha-config-updates> </ha-card> `:""} </div>`:""} ${this._pages(this.cloudStatus,(0,l.x)(this.hass.config,"cloud"),this.hass.auth.external?.config.hasSettingsScreen,this.hass.userData?.apps_info_dismissed,(0,l.x)(this.hass.config,"hassio")).map(t=>0===t.length?r.s6:r.qy` <ha-card outlined> <ha-config-navigation .hass="${this.hass}" .narrow="${this.narrow}" .pages="${t}"></ha-config-navigation> </ha-card> `)} <!-- IoB - remove tip. ha-tip>${this._tip}</ha-tip --> </ha-config-section> </ha-top-app-bar-fixed> `}updated(t){super.updated(t),!this._tip&&t.has("hass")&&(this._tip=B(this._openShortcutDialog,this.hass,this.narrow))}_openShortcutDialog(t){t.preventDefault(),(0,m.H)(this)}_showQuickBar(){(0,f.uq)(this,{showHint:this.hass.enableShortcuts})}async _handleMenuAction(t){switch(t.detail.item.value){case"check-updates":(0,u.nD)(this,this.hass);break;case"restart":(0,v.lD)(this)}}static get styles(){return[y.RF,r.AH`ha-config-section{margin:auto;margin-top:-32px;max-width:600px}ha-card{overflow:hidden;margin-bottom:0}ha-card a{text-decoration:none;color:var(--primary-text-color)}.dashboard-alerts{display:flex;flex-direction:column;gap:var(--ha-space-4)}.dashboard-alert-title{padding:var(--ha-space-4) var(--ha-space-4) var(--ha-space-2);font-size:var(--ha-font-size-l)}.dashboard-alert-title a{display:inline-flex;align-items:center;gap:var(--ha-space-2)}.dashboard-alert-title ha-icon-next{color:var(--secondary-text-color);width:20px;height:20px}@media all and (max-width:600px){ha-card{border-width:1px 0;border-radius:var(--ha-border-radius-square);box-shadow:unset}ha-config-section{margin-top:-42px}}ha-tip{margin-bottom:8px}.new{color:var(--primary-color)}.keep-together{display:inline-block}`]}constructor(...t){super(...t),this.narrow=!1,this.isWide=!1,this._repairsIssues={issues:[],total:0},this._pages=(0,n.A)((t,a,e,i,o)=>{const r=t=>i&&!o?t.filter(t=>"/config/apps"!==t.path):t,s=new Set(["/config/automation","/config/apps","/config/voice-assistants","/config/system","/config/person"]),n=t=>t.filter(t=>!s.has(t.path));return[n(r(a?[{component:"cloud",path:"/config/cloud",name:"ioBroker Cloud",info:t,iconPath:M,iconColor:"#3B808E",translationKey:"cloud"},...C.configSections.dashboard]:C.configSections.dashboard)),e?C.configSections.dashboard_external_settings:[],C.configSections.dashboard_2,n(C.configSections.dashboard_3)]}),this._filterUpdateEntitiesParameterized=(0,n.A)((t,a)=>{const e=(0,u.id)(t,!1,!1).filter(t=>!a[t.entity_id]?.hidden);return{updates:e.slice(0,3===e.length?e.length:2),total:e.length}})}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],E.prototype,"hass",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],E.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"is-wide",type:Boolean})],E.prototype,"isWide",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],E.prototype,"cloudStatus",void 0),(0,o.Cg)([(0,s.wk)()],E.prototype,"_tip",void 0),(0,o.Cg)([(0,s.wk)()],E.prototype,"_repairsIssues",void 0),E=(0,o.Cg)([(0,s.EM)("ha-config-dashboard")],E),i()}catch(t){i(t)}})},73524(t,a,e){e(18111),e(61701);var i=e(62826),o=e(5124),r=e(22441),s=e(29006),n=(e(76776),e(43661),e(77423));e(22823);class l extends o.WF{firstUpdated(t){super.firstUpdated(t),(0,n.VN)(this.hass,{domain:"bluetooth"}).then(t=>{this._hasBluetoothConfigEntries=t.length>0})}render(){const t=(0,s.F)(this.hass,this.pages,{hasBluetoothConfigEntries:this._hasBluetoothConfigEntries}).map(t=>({...t,name:t.name||this.hass.localize(`ui.panel.config.dashboard.${t.translationKey}.main`),description:"cloud"===t.component&&t.info?t.info.logged_in?`\n ${this.hass.localize("ui.panel.config.cloud.description_login")}\n `:`\n ${this.hass.localize("ui.panel.config.cloud.description_features")}\n `:`\n ${t.description||this.hass.localize(`ui.panel.config.dashboard.${t.translationKey}.secondary`)}\n `}));return o.qy` <div class="visually-hidden" role="heading" aria-level="2"> ${this.hass.localize("panel.config")} </div> <ha-config-navigation-list has-secondary .hass="${this.hass}" .narrow="${this.narrow}" .pages="${t}" .label="${this.hass.localize("panel.config")}"></ha-config-navigation-list> `}constructor(...t){super(...t),this.narrow=!1,this._hasBluetoothConfigEntries=!1}}l.styles=o.AH`.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0}`,(0,i.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],l.prototype,"narrow",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],l.prototype,"pages",void 0),(0,i.Cg)([(0,r.wk)()],l.prototype,"_hasBluetoothConfigEntries",void 0),l=(0,i.Cg)([(0,r.EM)("ha-config-navigation")],l)},20820(t,a,e){var i=e(62826),o=e(5124),r=e(22441),s=e(6412);class n extends o.WF{render(){return o.qy` <div class="content ${(0,s.H)({narrow:!this.isWide,"full-width":this.fullWidth})}"> <div class="header"><slot name="header"></slot></div> <div class="together layout ${(0,s.H)({narrow:!this.isWide,vertical:this.vertical||!this.isWide,horizontal:!this.vertical&&this.isWide})}"> <div class="intro"><slot name="introduction"></slot></div> <div class="panel flex-auto"><slot></slot></div> </div> </div> `}constructor(...t){super(...t),this.isWide=!1,this.vertical=!1,this.fullWidth=!1}}n.styles=o.AH`:host{display:block}.content{padding:28px 20px 0;max-width:1040px;margin:0 auto}.layout{display:flex}.horizontal{flex-direction:row}.vertical{flex-direction:column}.flex-auto{flex:1 1 auto}.header{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-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed);opacity:var(--dark-primary-opacity)}.together{margin-top:var(--config-section-content-together-margin-top,32px)}.intro{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-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal);width:100%;opacity:var(--dark-primary-opacity);font-size:var(--ha-font-size-m);padding-bottom:20px}.horizontal .intro{max-width:400px;margin-right:40px;margin-inline-end:40px;margin-inline-start:initial}.panel{margin-top:-24px}.panel ::slotted(*){margin-top:24px;display:block}.narrow.content{max-width:640px}.narrow .together{margin-top:var(--config-section-narrow-content-together-margin-top,var(--config-section-content-together-margin-top,20px))}.narrow .intro{padding-bottom:20px;margin-right:0;margin-inline-end:0;margin-inline-start:initial;max-width:500px}.full-width{padding:0}.full-width .layout{flex-direction:column}`,(0,i.Cg)([(0,r.MZ)({attribute:"is-wide",type:Boolean})],n.prototype,"isWide",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean})],n.prototype,"vertical",void 0),(0,i.Cg)([(0,r.MZ)({type:Boolean,attribute:"full-width"})],n.prototype,"fullWidth",void 0),n=(0,i.Cg)([(0,r.EM)("ha-config-section")],n)},41570(t,a,e){e.d(a,{c:()=>i});const i=/Mac/i.test(navigator.userAgent)},84187(t,a,e){e.d(a,{M:()=>i});const i=/(?:iphone|android|ipad)/i.test(navigator.userAgent)},65686(t,a,e){e.a(t,async function(t,i){try{e.d(a,{A:()=>u});var o=e(5124),r=e(22441),s=e(89784),n=e(717),l=e(17060),h=e(42320),c=t([l]);l=(c.then?(await c)():c)[0];var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=(t,a,e,i)=>{for(var o,r=i>1?void 0:i?p(a,e):a,s=t.length-1;s>=0;s--)(o=t[s])&&(r=(i?o(a,e,r):o(r))||r);return i&&r&&d(a,e,r),r};let u=class extends n.A{updated(t){if(super.updated(t),t.has("value")){const t=parseFloat(getComputedStyle(this.indicator).getPropertyValue("r")),a=2*Math.PI*t,e=a-this.value/100*a;this.indicatorOffset=`${e}px`}}render(){return o.qy` <div part="base" class="progress-ring" role="progressbar" aria-label="${this.label.length>0?this.label:this.localize.term("progress")}" aria-describedby="label" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${this.value}" style="${(0,s.W)({"--percentage":this.value/100})}"> <svg class="image"> <circle part="track" class="track"></circle> <circle part="indicator" class="indicator" style="${(0,s.W)({"stroke-dashoffset":this.indicatorOffset})}"></circle> </svg> <slot id="label" part="label" class="label"></slot> </div> `}constructor(){super(...arguments),this.localize=new l.c(this),this.value=0,this.label=""}};u.css=h.A,g([(0,r.P)(".indicator")],u.prototype,"indicator",2),g([(0,r.wk)()],u.prototype,"indicatorOffset",2),g([(0,r.MZ)({type:Number,reflect:!0})],u.prototype,"value",2),g([(0,r.MZ)()],u.prototype,"label",2),u=g([(0,r.EM)("wa-progress-ring")],u),u.disableWarning?.("change-in-update"),i()}catch(t){i(t)}})},42320(t,a,e){e.d(a,{A:()=>i});var i=e(5124).AH`:host{--size:8rem;--track-width:0.25em;--track-color:var(--wa-color-neutral-fill-normal);--indicator-width:var(--track-width);--indicator-color:var(--wa-color-brand-fill-loud);--indicator-transition-duration:0.35s;display:inline-flex}.progress-ring{display:inline-flex;align-items:center;justify-content:center;position:relative}.image{width:var(--size);height:var(--size);rotate:-90deg;transform-origin:50% 50%}.indicator,.track{--radius:calc(var(--size) / 2 - max(var(--track-width), var(--indicator-width)) * 0.5);--circumference:calc(var(--radius) * 2 * 3.141592654);fill:none;r:var(--radius);cx:calc(var(--size)/ 2);cy:calc(var(--size)/ 2)}.track{stroke:var(--track-color);stroke-width:var(--track-width)}.indicator{stroke:var(--indicator-color);stroke-width:var(--indicator-width);stroke-linecap:round;transition-property:stroke-dashoffset;transition-duration:var(--indicator-transition-duration);stroke-dasharray:var(--circumference) var(--circumference);stroke-dashoffset:calc(var(--circumference) - var(--percentage) * var(--circumference))}.label{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;user-select:none;-webkit-user-select:none}`}};