UNPKG

iobroker.lovelace

Version:

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

9 lines 46.4 kB
export const __webpack_ids__=["46725"];export const __webpack_modules__={72344:function(e,t,i){i.d(t,{p:()=>a});const a=(e,t)=>e&&e.config.components.includes(t)},17803:function(e,t,i){i.d(t,{I:()=>a,_:()=>o});const a=(e,t,i,a)=>{const[o,r,n]=e.split(".",3);return Number(o)>t||Number(o)===t&&(void 0===a?Number(r)>=i:Number(r)>i)||void 0!==a&&Number(o)===t&&Number(r)===i&&Number(n)>=a},o=e=>e.includes("dev")},73358:function(e,t,i){i.d(t,{AF:()=>n,Kk:()=>d,PS:()=>a,a5:()=>r,gD:()=>h,iY:()=>u,lC:()=>c,ot:()=>f,tj:()=>s,uo:()=>l,zF:()=>o});i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);const a=66977!=i.j?["alert","button","climate","cover","configurator","event","input_button","input_select","input_number","input_text","humidifier","lawn_mower","lock","media_player","number","scene","script","select","timer","text","update","vacuum","water_heater"]:null,o=99387==i.j?["sensor","binary_sensor","calendar","camera","device_tracker","image","weather"]:null,r=99387==i.j?["assist_satellite","conversation","stt","tts"]:null,n=["automation","button","cover","date","datetime","fan","group","humidifier","input_boolean","input_button","input_datetime","input_number","input_select","input_text","light","lock","media_player","number","scene","script","select","switch","text","time","vacuum","valve"],s=["closed","locked","off"],l="on",c="off",d=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"]),u=new Set(["camera","image","media_player"]),f="°C",h="°F"},68958:function(e,t,i){i.d(t,{t:()=>r});i(92745),i(9359),i(31526),i(88972);class a{constructor(e=window.localStorage){this.storage=void 0,this._storage={},this._listeners={},this.storage=e,e===window.localStorage&&window.addEventListener("storage",(e=>{e.key&&this.hasKey(e.key)&&(this._storage[e.key]=e.newValue?JSON.parse(e.newValue):e.newValue,this._listeners[e.key]&&this._listeners[e.key].forEach((t=>t(e.oldValue?JSON.parse(e.oldValue):e.oldValue,this._storage[e.key]))))}))}addFromStorage(e){if(!this._storage[e]){const t=this.storage.getItem(e);t&&(this._storage[e]=JSON.parse(t))}}subscribeChanges(e,t){return this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t],()=>{this.unsubscribeChanges(e,t)}}unsubscribeChanges(e,t){if(!(e in this._listeners))return;const i=this._listeners[e].indexOf(t);-1!==i&&this._listeners[e].splice(i,1)}hasKey(e){return e in this._storage}getValue(e){return this._storage[e]}setValue(e,t){const i=this._storage[e];this._storage[e]=t;try{void 0===t?this.storage.removeItem(e):this.storage.setItem(e,JSON.stringify(t))}catch(e){}finally{this._listeners[e]&&this._listeners[e].forEach((e=>e(i,t)))}}}const o={},r=e=>t=>{const i=e.storage||"localStorage";let r;i&&i in o?r=o[i]:(r=new a(window[i]),o[i]=r);const n=String(t.key),s=e.key||String(t.key),l=t.initializer?t.initializer():void 0;r.addFromStorage(s);const c=!1!==e.subscribe?e=>r.subscribeChanges(s,((i,a)=>{e.requestUpdate(t.key,i)})):void 0,d=()=>r.hasKey(s)?e.deserializer?e.deserializer(r.getValue(s)):r.getValue(s):l;return{kind:"method",placement:"prototype",key:t.key,descriptor:{set(i){((i,a)=>{let o;e.state&&(o=d()),r.setValue(s,e.serializer?e.serializer(a):a),e.state&&i.requestUpdate(t.key,o)})(this,i)},get:()=>d(),enumerable:!0,configurable:!0},finisher(i){if(e.state&&e.subscribe){const e=i.prototype.connectedCallback,t=i.prototype.disconnectedCallback;i.prototype.connectedCallback=function(){e.call(this),this[`__unbsubLocalStorage${n}`]=c?.(this)},i.prototype.disconnectedCallback=function(){t.call(this),this[`__unbsubLocalStorage${n}`]?.(),this[`__unbsubLocalStorage${n}`]=void 0}}e.state&&i.createProperty(t.key,{noAccessor:!0,...e.stateOptions})}}}},84200:function(e,t,i){i.d(t,{r:()=>o});i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);const a=(e,t,i=true)=>{if(!e||e===document.body)return null;if((e=e.assignedSlot??e).parentElement)e=e.parentElement;else{const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:null}return(i?Object.prototype.hasOwnProperty.call(e,t):e&&t in e)?e:a(e,t,i)},o=(e,t,i=true)=>{const o=new Set;for(;e;)o.add(e),e=a(e,t,i);return o}},81165:function(e,t,i){i.d(t,{j:()=>a});const a=(e=document)=>e.activeElement?.shadowRoot?.activeElement?a(e.activeElement.shadowRoot):e.activeElement},62201:function(e,t,i){i.d(t,{K:()=>a});const a=(e,t)=>{const i=matchMedia(e),a=e=>t(e.matches);return i.addListener(a),t(i.matches),()=>i.removeListener(a)}},88128:function(e,t,i){i.d(t,{P:()=>a});const a=e=>e.preventDefault()},86431:function(e,t,i){i.d(t,{jL:()=>o,wZ:()=>r});var a=i(47194);const o=e=>(e.name_by_user||e.name)?.trim(),r=(e,t,i)=>o(e)||i&&n(t,i)||t.localize("ui.panel.config.devices.unnamed_device",{type:t.localize(`ui.panel.config.devices.type.${e.entry_type||"device"}`)}),n=(e,t)=>{for(const i of t||[]){const t="string"==typeof i?i:i.entity_id,o=e.states[t];if(o)return(0,a.C)(o)}}},97969:function(e,t,i){i.d(t,{p:()=>a});const a=e=>e.substr(e.indexOf(".")+1)},47194:function(e,t,i){i.d(t,{C:()=>r,a:()=>o});var a=i(97969);const o=(e,t)=>void 0===t.friendly_name?(0,a.p)(e).replace(/_/g," "):(t.friendly_name??"").toString(),r=e=>o(e.entity_id,e.attributes)},83523:function(e,t,i){i.d(t,{c:()=>n});var a=i(76525),o=i(36522),r=i(5111);const n=async(e,t,i=Date.now())=>{const{history:s}=r.E;if(s.state?.dialog&&Date.now()-i<500){return await(0,a.ts)()?new Promise((a=>{setTimeout((()=>{n(e,t,i).then(a)}))})):(console.warn("Navigation blocked, because dialog refused to close"),!1)}const l=t?.replace||!1;return l?s.replaceState(s.state?.root?{root:!0}:t?.data??null,"",e):s.pushState(t?.data??null,"",e),(0,o.B)(r.E,"location-changed",{replace:l}),!0}},22381:function(e,t,i){i.d(t,{D:()=>a});const a=(e,t,i=!1)=>{let a;const o=(...o)=>{const r=i&&!a;clearTimeout(a),a=window.setTimeout((()=>{a=void 0,e(...o)}),t),r&&e(...o)};return o.cancel=()=>{clearTimeout(a)},o}},48045:function(e,t,i){i.d(t,{v:()=>a});i(32517),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);const a=(e,t)=>{if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let i,o;if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!a(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!a(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e);if(o=r.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=o;0!=i--;){const o=r[i];if(!a(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}},37394:function(e,t,i){i.d(t,{n:()=>o});class a extends Error{constructor(e,...t){super(...t),this.timeout=void 0,Error.captureStackTrace&&Error.captureStackTrace(this,a),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const o=(e,t)=>{const i=new Promise(((t,i)=>{setTimeout((()=>{i(new a(e))}),e)}));return Promise.race([t,i])}},76320:function(e,t,i){i.d(t,{T:()=>a,y:()=>o});const a=e=>{requestAnimationFrame((()=>setTimeout(e,0)))},o=()=>new Promise((e=>{a(e)}))},34273:function(e,t,i){var a=i(44249),o=i(72621),r=(i(9359),i(31526),i(22997),i(57243)),n=i(15093),s=i(5111),l=i(76525);(0,a.Z)([(0,n.Mo)("ha-button-menu")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:l.gA,value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"corner",value:()=>"BOTTOM_START"},{kind:"field",decorators:[(0,n.Cb)({attribute:"menu-corner"})],key:"menuCorner",value:()=>"START"},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"x",value:()=>null},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"y",value:()=>null},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"multi",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"activatable",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"fixed",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"no-anchor"})],key:"noAnchor",value:()=>!1},{kind:"field",decorators:[(0,n.IO)("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){return this._menu?.items}},{kind:"get",key:"selected",value:function(){return this._menu?.selected}},{kind:"method",key:"focus",value:function(){this._menu?.open?this._menu.focusItemAtIndex(0):this._triggerButton?.focus()}},{kind:"method",key:"render",value:function(){return r.dy` <div @click="${this._handleClick}"> <slot name="trigger" @slotchange="${this._setTriggerAria}"></slot> </div> <mwc-menu .corner="${this.corner}" .menuCorner="${this.menuCorner}" .fixed="${this.fixed}" .multi="${this.multi}" .activatable="${this.activatable}" .y="${this.y}" .x="${this.x}"> <slot></slot> </mwc-menu> `}},{kind:"method",key:"firstUpdated",value:function(e){(0,o.Z)(i,"firstUpdated",this,3)([e]),"rtl"===s.E.document.dir&&this.updateComplete.then((()=>{this.querySelectorAll("mwc-list-item").forEach((e=>{const t=document.createElement("style");t.innerHTML="span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}",e.shadowRoot.appendChild(t)}))}))}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchor=this.noAnchor?null:this,this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"]')}},{kind:"method",key:"_setTriggerAria",value:function(){this._triggerButton&&(this._triggerButton.ariaHasPopup="menu")}},{kind:"field",static:!0,key:"styles",value:()=>r.iv`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`}]}}),r.oi)},29073:function(e,t,i){i.d(t,{u:()=>u});var a=i(44249),o=i(72621),r=(i(9359),i(31526),i(70104),i(57243)),n=i(15093),s=i(29567),l=i(36522);i(99426),i(66671);const c={boolean:()=>Promise.all([i.e("29570"),i.e("79350")]).then(i.bind(i,8353)),constant:()=>i.e("69654").then(i.bind(i,5606)),float:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("62022")]).then(i.bind(i,53203)),grid:()=>i.e("45036").then(i.bind(i,20018)),expandable:()=>i.e("42653").then(i.bind(i,91624)),integer:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("92139"),i.e("94320"),i.e("42849")]).then(i.bind(i,96116)),multi_select:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("56898"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("5080"),i.e("50408"),i.e("13204"),i.e("99562")]).then(i.bind(i,84545)),positive_time_period_dict:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("41258"),i.e("56898"),i.e("35671"),i.e("71139"),i.e("31352")]).then(i.bind(i,15063)),select:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("91552"),i.e("78456"),i.e("24199"),i.e("41258"),i.e("56898"),i.e("27506"),i.e("35671"),i.e("42950"),i.e("29570"),i.e("65505"),i.e("7010"),i.e("62524"),i.e("5409"),i.e("47818"),i.e("69638")]).then(i.bind(i,62706)),string:()=>Promise.all([i.e("46379"),i.e("66031"),i.e("36620")]).then(i.bind(i,8327)),optional_actions:()=>i.e("85230").then(i.bind(i,26709))},d=(e,t)=>e?!t.name||t.flatten?e:e[t.name]:null;let u=(0,a.Z)([(0,n.Mo)("ha-form")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"data",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"schema",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"error",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"warning",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"computeError",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"computeWarning",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"computeLabel",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"computeHelper",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"localizeValue",value:void 0},{kind:"method",key:"getFormProperties",value:function(){return{}}},{kind:"method",key:"focus",value:async function(){await this.updateComplete;const e=this.renderRoot.querySelector(".root");if(e)for(const t of e.children)if("HA-ALERT"!==t.tagName){t instanceof r.fl&&await t.updateComplete,t.focus();break}}},{kind:"method",key:"willUpdate",value:function(e){e.has("schema")&&this.schema&&this.schema.forEach((e=>{"selector"in e||c[e.type]?.()}))}},{kind:"method",key:"render",value:function(){return r.dy` <div class="root" part="root"> ${this.error&&this.error.base?r.dy` <ha-alert alert-type="error"> ${this._computeError(this.error.base,this.schema)} </ha-alert> `:""} ${this.schema.map((e=>{const t=((e,t)=>e&&t.name?e[t.name]:null)(this.error,e),i=((e,t)=>e&&t.name?e[t.name]:null)(this.warning,e);return r.dy` ${t?r.dy` <ha-alert own-margin alert-type="error"> ${this._computeError(t,e)} </ha-alert> `:i?r.dy` <ha-alert own-margin alert-type="warning"> ${this._computeWarning(i,e)} </ha-alert> `:""} ${"selector"in e?r.dy`<ha-selector .schema="${e}" .hass="${this.hass}" .name="${e.name}" .selector="${e.selector}" .value="${d(this.data,e)}" .label="${this._computeLabel(e,this.data)}" .disabled="${e.disabled||this.disabled||!1}" .placeholder="${e.required?"":e.default}" .helper="${this._computeHelper(e)}" .localizeValue="${this.localizeValue}" .required="${e.required||!1}" .context="${this._generateContext(e)}"></ha-selector>`:(0,s.h)(this.fieldElementName(e.type),{schema:e,data:d(this.data,e),label:this._computeLabel(e,this.data),helper:this._computeHelper(e),disabled:this.disabled||e.disabled||!1,hass:this.hass,localize:this.hass?.localize,computeLabel:this.computeLabel,computeHelper:this.computeHelper,localizeValue:this.localizeValue,context:this._generateContext(e),...this.getFormProperties()})} `}))} </div> `}},{kind:"method",key:"fieldElementName",value:function(e){return`ha-form-${e}`}},{kind:"method",key:"_generateContext",value:function(e){if(!e.context)return;const t={};for(const[i,a]of Object.entries(e.context))t[i]=this.data[a];return t}},{kind:"method",key:"createRenderRoot",value:function(){const e=(0,o.Z)(i,"createRenderRoot",this,3)([]);return this.addValueChangedListener(e),e}},{kind:"method",key:"addValueChangedListener",value:function(e){e.addEventListener("value-changed",(e=>{e.stopPropagation();const t=e.target.schema;if(e.target===this)return;const i=!t.name||"flatten"in t&&t.flatten?e.detail.value:{[t.name]:e.detail.value};this.data={...this.data,...i},(0,l.B)(this,"value-changed",{value:this.data})}))}},{kind:"method",key:"_computeLabel",value:function(e,t){return this.computeLabel?this.computeLabel(e,t):e?e.name:""}},{kind:"method",key:"_computeHelper",value:function(e){return this.computeHelper?this.computeHelper(e):""}},{kind:"method",key:"_computeError",value:function(e,t){return Array.isArray(e)?r.dy`<ul> ${e.map((e=>r.dy`<li> ${this.computeError?this.computeError(e,t):e} </li>`))} </ul>`:this.computeError?this.computeError(e,t):e}},{kind:"method",key:"_computeWarning",value:function(e,t){return this.computeWarning?this.computeWarning(e,t):e}},{kind:"field",static:!0,key:"styles",value:()=>r.iv`.root>*{display:block}.root>:not([own-margin]):not(:last-child){margin-bottom:24px}ha-alert[own-margin]{margin-bottom:4px}`}]}}),r.oi)},65981:function(e,t,i){i.r(t),i.d(t,{HaIcon:()=>k});var a=i(44249),o=i(72621),r=i(57243),n=i(15093),s=i(36522),l=i(22381),c=i(80654),d=(i(92745),i(9359),i(31526),i(27608)),u=i(27486),f=i(37394);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"}]}'),m=(0,u.Z)((async()=>{const e=(0,d.MT)("hass-icon-db","mdi-icon-store");{const t=await(0,d.U2)("_version",e);t?t!==h.version&&(await(0,d.ZH)(e),(0,d.t8)("_version",h.version,e)):(0,d.t8)("_version",h.version,e)}return e})),p=["mdi","hass","hassio","hademo"];let g=[];i(37583);const b={},y={},v=(0,l.D)((()=>(async e=>{const t=Object.keys(e),i=await Promise.all(Object.values(e));(await m())("readwrite",(a=>{i.forEach(((i,o)=>{Object.entries(i).forEach((([e,t])=>{a.put(t,e)})),delete e[t[o]]}))}))})(y)),2e3),_={};let k=(0,a.Z)([(0,n.Mo)("ha-icon")],(function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,n.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_path",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_secondaryPath",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_viewBox",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_legacy",value:()=>!1},{kind:"method",key:"willUpdate",value:function(e){(0,o.Z)(a,"willUpdate",this,3)([e]),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}},{kind:"method",key:"render",value:function(){return this.icon?this._legacy?r.dy` <iron-icon .icon="${this.icon}"></iron-icon>`:r.dy`<ha-svg-icon .path="${this._path}" .secondaryPath="${this._secondaryPath}" .viewBox="${this._viewBox}"></ha-svg-icon>`:r.Ld}},{kind:"method",key:"_loadIcon",value:async function(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let o,r=a;if(!t||!r)return;if(!p.includes(t)){const i=c.g[t];return i?void(i&&"function"==typeof i.getIcon&&this._setCustomPath(i.getIcon(r),e)):void(this._legacy=!0)}if(this._legacy=!1,r in b){const e=b[r];let i;e.newName?(i=`Icon ${t}:${r} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,r=e.newName):i=`Icon ${t}:${r} 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(i),(0,s.B)(this,"write_log",{level:"warning",message:i})}if(r in _)return void(this._path=_[r]);if("home-assistant"===r){const t=(await i.e("48348").then(i.bind(i,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=t),void(_[r]=t)}try{o=await(e=>new Promise(((t,i)=>{if(g.push([e,t,i]),g.length>1)return;const a=m();(0,f.n)(1e3,(async()=>{(await a)("readonly",(e=>{for(const[t,i,a]of g)(0,d.RV)(e.get(t)).then((e=>i(e))).catch((e=>a(e)));g=[]}))})()).catch((e=>{for(const[,,t]of g)t(e);g=[]}))})))(r)}catch(e){o=void 0}if(o)return this.icon===e&&(this._path=o),void(_[r]=o);const n=(e=>{let t;for(const i of h.parts){if(void 0!==i.start&&e<i.start)break;t=i}return t.file})(r);if(n in y)return void this._setPath(y[n],r,e);const l=fetch(`/static/mdi/${n}.json`).then((e=>e.json()));y[n]=l,this._setPath(l,r,e),v()}},{kind:"method",key:"_setCustomPath",value:async function(e,t){const i=await e;this.icon===t&&(this._path=i.path,this._secondaryPath=i.secondaryPath,this._viewBox=i.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,t,i){const a=await e;this.icon===i&&(this._path=a[t]),_[t]=a[t]}},{kind:"field",static:!0,key:"styles",value:()=>r.iv`:host{fill:currentcolor}`}]}}),r.oi)},64780:function(e,t,i){var a=i(44249),o=i(57243),r=i(15093),n=i(76525),s=i(36522);i(96090);(0,a.Z)([(0,r.Mo)("ha-md-button-menu")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",key:n.gA,value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)()],key:"positioning",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"has-overflow"})],key:"hasOverflow",value:()=>!1},{kind:"field",decorators:[(0,r.IO)("ha-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){return this._menu.items}},{kind:"method",key:"focus",value:function(){this._menu.open?this._menu.focus():this._triggerButton?.focus()}},{kind:"method",key:"render",value:function(){return o.dy` <div @click="${this._handleClick}"> <slot name="trigger" @slotchange="${this._setTriggerAria}"></slot> </div> <ha-menu .positioning="${this.positioning}" .hasOverflow="${this.hasOverflow}" @opening="${this._handleOpening}" @closing="${this._handleClosing}"> <slot></slot> </ha-menu> `}},{kind:"method",key:"_handleOpening",value:function(){(0,s.B)(this,"opening",void 0,{composed:!1})}},{kind:"method",key:"_handleClosing",value:function(){(0,s.B)(this,"closing",void 0,{composed:!1})}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchorElement=this,this._menu.open?this._menu.close():this._menu.show())}},{kind:"get",key:"_triggerButton",value:function(){return this.querySelector('ha-icon-button[slot="trigger"], mwc-button[slot="trigger"], ha-assist-chip[slot="trigger"]')}},{kind:"method",key:"_setTriggerAria",value:function(){this._triggerButton&&(this._triggerButton.ariaHasPopup="menu")}},{kind:"field",static:!0,key:"styles",value:()=>o.iv`:host{display:inline-block;position:relative}::slotted([disabled]){color:var(--disabled-text-color)}`}]}}),o.oi)},51868:function(e,t,i){var a=i(44249),o=i(72621),r=i(1231),n=i(57243),s=i(15093);(0,a.Z)([(0,s.Mo)("ha-md-divider")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(i,"styles",this),n.iv`:host{--md-divider-color:var(--divider-color)}`]}}]}}),r.B)},7843:function(e,t,i){var a=i(44249),o=i(72621),r=i(28674),n=i(57243),s=i(15093);(0,a.Z)([(0,s.Mo)("ha-md-menu-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"clickAction",value:void 0},{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(i,"styles",this),n.iv`:host{--ha-icon-display:block;--md-sys-color-primary:var(--primary-text-color);--md-sys-color-on-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-sys-color-secondary-container:rgba( var(--rgb-primary-color), 0.15 );--md-sys-color-on-secondary-container:var(--text-primary-color);--mdc-icon-size:16px;--md-sys-color-on-primary-container:var(--primary-text-color);--md-sys-color-on-secondary-container:var(--primary-text-color);--md-menu-item-label-text-font:Roboto,sans-serif}:host(.warning){--md-menu-item-label-text-color:var(--error-color);--md-menu-item-leading-icon-color:var(--error-color)}::slotted([slot=headline]){text-wrap:nowrap}`]}}]}}),r.i)},96090:function(e,t,i){var a=i(44249),o=i(72621),r=i(53336),n=i(7162),s=i(57243),l=i(15093);(0,a.Z)([(0,l.Mo)("ha-menu")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"connectedCallback",value:function(){(0,o.Z)(i,"connectedCallback",this,3)([]),this.addEventListener("close-menu",this._handleCloseMenu)}},{kind:"method",key:"_handleCloseMenu",value:function(e){e.detail.reason.kind===n.GB.KEYDOWN&&e.detail.reason.key===n.KC.ESCAPE||e.detail.initiator.clickAction?.(e.detail.initiator)}},{kind:"field",static:!0,key:"styles",value(){return[...(0,o.Z)(i,"styles",this),s.iv`:host{--md-sys-color-surface-container:var(--card-background-color)}`]}}]}}),r.xX)},45127:function(e,t,i){i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaTriggerSelector:()=>u});var o=i(44249),r=i(57243),n=i(15093),s=i(27486),l=i(14473),c=i(79805),d=e([c]);c=(d.then?(await d)():d)[0];let u=(0,o.Z)([(0,n.Mo)("ha-selector-trigger")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"value",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",key:"_triggers",value:()=>(0,s.Z)((e=>e?(0,l.W9)(e):[]))},{kind:"method",key:"render",value:function(){return r.dy` ${this.label?r.dy`<label>${this.label}</label>`:r.Ld} <ha-automation-trigger .disabled="${this.disabled}" .triggers="${this._triggers(this.value)}" .hass="${this.hass}"></ha-automation-trigger> `}},{kind:"field",static:!0,key:"styles",value:()=>r.iv`ha-automation-trigger{display:block;margin-bottom:16px}label{display:block;margin-bottom:4px;font-weight:500}`}]}}),r.oi);a()}catch(e){a(e)}}))},45801:function(e,t,i){var a=i(44249),o=i(72621),r=i(57243),n=i(15093),s=i(35359),l=i(69634),c=i(59847),d=i(4242);(0,a.Z)([(0,n.Mo)("ha-user-badge")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"user",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_personPicture",value:void 0},{kind:"field",key:"_personEntityId",value:void 0},{kind:"method",key:"willUpdate",value:function(e){if((0,o.Z)(i,"willUpdate",this,3)([e]),e.has("user"))return void this._getPersonPicture();const t=e.get("hass");if(this._personEntityId&&t&&this.hass.states[this._personEntityId]!==t.states[this._personEntityId]){const e=this.hass.states[this._personEntityId];e?this._personPicture=e.attributes.entity_picture:this._getPersonPicture()}else!this._personEntityId&&t&&this._getPersonPicture()}},{kind:"method",key:"render",value:function(){if(!this.hass||!this.user)return r.Ld;const e=this._personPicture;if(e)return r.dy`<div style="${(0,l.V)({backgroundImage:`url(${this.hass.hassUrl(e)})`})}" class="picture"></div>`;const t=(0,d.fm)(this.user.name);return r.dy`<div class="initials ${(0,s.$)({long:t.length>2})}"> ${t} </div>`}},{kind:"method",key:"_getPersonPicture",value:function(){if(this._personEntityId=void 0,this._personPicture=void 0,this.hass&&this.user)for(const e of Object.values(this.hass.states))if(e.attributes.user_id===this.user.id&&"person"===(0,c.N)(e)){this._personEntityId=e.entity_id,this._personPicture=e.attributes.entity_picture;break}}},{kind:"field",static:!0,key:"styles",value:()=>r.iv`:host{display:contents}.picture{width:40px;height:40px;background-size:cover;border-radius:50%}.initials{display:inline-block;box-sizing:border-box;width:40px;line-height:40px;border-radius:50%;text-align:center;background-color:var(--light-primary-color);text-decoration:none;color:var(--text-light-primary-color,var(--primary-text-color));overflow:hidden}.initials.long{font-size:80%}`}]}}),r.oi)},43546:function(e,t,i){i.d(t,{Cp:()=>f,GX:()=>c,PC:()=>s,TZ:()=>h,W2:()=>u,WD:()=>n,YY:()=>p,et:()=>l,iI:()=>r,j2:()=>m,lU:()=>d,oT:()=>o,uw:()=>a});i(9359),i(70104);const a=28639==i.j?`${location.protocol}//${location.host}`:null,o=e=>e.map((e=>{if("string"!==e.type)return e;switch(e.name){case"username":return{...e,autocomplete:"username",autofocus:!0};case"password":return{...e,autocomplete:"current-password"};case"code":return{...e,autocomplete:"one-time-code",autofocus:!0};default:return e}})),r=(e,t)=>e.callWS({type:"auth/sign_path",path:t}),n=()=>fetch("/auth/providers",{credentials:"same-origin"}),s=(e,t,i)=>fetch("/auth/login_flow",{method:"POST",credentials:"same-origin",body:JSON.stringify({client_id:e,handler:i,redirect_uri:t})}),l=(e,t)=>fetch(`/auth/login_flow/${e}`,{method:"POST",credentials:"same-origin",body:JSON.stringify(t)}),c=e=>fetch(`/auth/login_flow/${e}`,{method:"DELETE",credentials:"same-origin"}),d=(e,t,i,a)=>{e.includes("?")?e.endsWith("&")||(e+="&"):e+="?",e+=`code=${encodeURIComponent(t)}`,i&&(e+=`&state=${encodeURIComponent(i)}`),a&&(e+="&storeToken=true"),document.location.assign(e)},u=async(e,t,i,a)=>e.callWS({type:"config/auth_provider/homeassistant/create",user_id:t,username:i,password:a}),f=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/change_password",current_password:t,new_password:i}),h=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_password",user_id:t,password:i}),m=(e,t,i)=>e.callWS({type:"config/auth_provider/homeassistant/admin_change_username",user_id:t,username:i}),p=(e,t,i)=>e.callWS({type:"auth/delete_all_refresh_tokens",token_type:t,delete_current_token:i})},30635:function(e,t,i){i.d(t,{$_:()=>g,A1:()=>n,A4:()=>d,Cy:()=>r,Gn:()=>c,LW:()=>f,TD:()=>v,WC:()=>y,bI:()=>o,cR:()=>l,kd:()=>u,l3:()=>p,pw:()=>h,qF:()=>s,we:()=>b,x_:()=>m});var a=i(60738);const o=(0,a.kr)("connection"),r=(0,a.kr)("states"),n=(0,a.kr)("entities"),s=(0,a.kr)("devices"),l=(0,a.kr)("areas"),c=(0,a.kr)("localize"),d=(0,a.kr)("locale"),u=(0,a.kr)("config"),f=(0,a.kr)("themes"),h=(0,a.kr)("selectedTheme"),m=(0,a.kr)("user"),p=(0,a.kr)("userData"),g=(0,a.kr)("panels"),b=(0,a.kr)("extendedEntities"),y=(0,a.kr)("floors"),v=(0,a.kr)("labels")},80654:function(e,t,i){i.d(t,{g:()=>n});const a=window;"customIconsets"in a||(a.customIconsets={});const o=a.customIconsets,r=window;"customIcons"in r||(r.customIcons={});const n=new Proxy(r.customIcons,{get:(e,t)=>e[t]??(o[t]?{getIcon:o[t]}:void 0)})},63318:function(e,t,i){i.d(t,{Iq:()=>m,L3:()=>h,LM:()=>_,Mw:()=>x,Nv:()=>p,_V:()=>k,eD:()=>d,tf:()=>y,vA:()=>f,w1:()=>w,wX:()=>u,z3:()=>g});i(9359),i(56475),i(1331);if(66977!=i.j)var a=i(62212);var o=i(27486),r=i(47194),n=i(1416);if(66977!=i.j)var s=i(22381);if(66977!=i.j)var l=i(73850);const c=66977!=i.j?["sensor","binary_sensor"]:null,d=(e,t)=>{const i=t.filter((t=>e.states[t.entity_id]&&"battery"===e.states[t.entity_id].attributes.device_class&&c.includes((0,l.M)(t.entity_id)))).sort(((e,t)=>c.indexOf((0,l.M)(e.entity_id))-c.indexOf((0,l.M)(t.entity_id))));if(i.length>0)return i[0]},u=(e,t)=>t.find((t=>e.states[t.entity_id]&&"battery_charging"===e.states[t.entity_id].attributes.device_class)),f=(e,t)=>{if(t.name)return t.name;const i=e.states[t.entity_id];return i?(0,r.C)(i):t.original_name?t.original_name:t.entity_id},h=(e,t)=>e.callWS({type:"config/entity_registry/get",entity_id:t}),m=(e,t)=>e.callWS({type:"config/entity_registry/get_entries",entity_ids:t}),p=(e,t,i)=>e.callWS({type:"config/entity_registry/update",entity_id:t,...i}),g=(e,t)=>e.callWS({type:"config/entity_registry/remove",entity_id:t}),b=e=>e.sendMessagePromise({type:"config/entity_registry/list"}),y=e=>e.sendMessagePromise({type:"config/entity_registry/list_for_display"}),v=(e,t)=>e.subscribeEvents((0,s.D)((()=>b(e).then((e=>t.setState(e,!0)))),500,!0),"entity_registry_updated"),_=(e,t)=>(0,a.B)("_entityRegistry",b,v,e,t),k=(e,t)=>e.sort(((e,i)=>(0,n.fe)(e.name||"",i.name||"",t))),w=(0,o.Z)((e=>{const t={};for(const i of e)t[i.entity_id]=i;return t})),x=(0,o.Z)((e=>{const t={};for(const i of e)t[i.id]=i;return t}))},57816:function(e,t,i){if(i.d(t,{F3:()=>c,H0:()=>s,Lh:()=>l,Mt:()=>u,O:()=>p,RO:()=>h,WH:()=>n,ez:()=>r,t4:()=>d}),99387==i.j)var a=i(62212);if(99387==i.j)var o=i(22381);const r=99387==i.j?{bluetooth:"config/bluetooth",matter:"config/matter",mqtt:"config/mqtt",thread:"config/thread",zha:"config/zha/dashboard",zwave_js:"config/zwave_js/dashboard"}:null;let n=99387==i.j?function(e){return e[e.CRITICAL=50]="CRITICAL",e[e.ERROR=40]="ERROR",e[e.WARNING=30]="WARNING",e[e.INFO=20]="INFO",e[e.DEBUG=10]="DEBUG",e[e.NOTSET=0]="NOTSET",e}({}):null;const s=(e,t)=>t.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${e}%22`,l=(e,t,i)=>e(`component.${t}.title`)||i?.name||t,c=(e,t)=>{const i={type:"manifest/list"};return t&&(i.integrations=t),e.callWS(i)},d=(e,t)=>e.callWS({type:"manifest/get",integration:t}),u=e=>e.callWS({type:"integration/setup_info"}),f=e=>e.sendMessagePromise({type:"logger/log_info"}),h=(e,t,i,a)=>e.callWS({type:"logger/integration_log_level",integration:t,level:i,persistence:a}),m=(e,t)=>e.subscribeEvents((0,o.D)((()=>f(e).then((e=>t.setState(e,!0)))),200,!0),"logging_changed"),p=(e,t)=>(0,a.B)("_integration_log_info",f,m,e,t)},69919:function(e,t,i){i.a(e,(async function(e,a){try{i.d(t,{EX:()=>h,Fj:()=>w,M$:()=>x,SO:()=>m,Sk:()=>g,TN:()=>C,UJ:()=>b,Ym:()=>S,hF:()=>p});i(9359),i(56475),i(70104);var o=i(73358);if(99387==i.j)var r=i(73850);if(99387==i.j)var n=i(59847);var s=i(75278),l=i(50602),c=i(1416);if(99387==i.j)var d=i(76131);if(99387==i.j)var u=i(72473);var f=e([l]);l=(f.then?(await f)():f)[0];let h=function(e){return e[e.INSTALL=1]="INSTALL",e[e.SPECIFIC_VERSION=2]="SPECIFIC_VERSION",e[e.PROGRESS=4]="PROGRESS",e[e.BACKUP=8]="BACKUP",e[e.RELEASE_NOTES=16]="RELEASE_NOTES",e}({});const m=e=>(0,s.e)(e,h.PROGRESS)&&null!==e.attributes.update_percentage,p=(e,t=!1)=>(e.state===o.uo||t&&Boolean(e.attributes.skipped_version))&&(0,s.e)(e,h.INSTALL),g=e=>!!e.attributes.in_progress,b=(e,t)=>e.callWS({type:"update/release_notes",entity_id:t}),y="ioBroker Core",v="ioBroker Supervisor",_="ioBroker Operating System",k=(e,t)=>Object.values(e).filter((e=>"update"===(0,n.N)(e))).sort(((e,i)=>e.attributes.title===y?-3:i.attributes.title===y?3:e.attributes.title===_?-2:i.attributes.title===_?2:e.attributes.title===v?-1:i.attributes.title===v?1:(0,c.fe)(e.attributes.title||e.attributes.friendly_name||"",i.attributes.title||i.attributes.friendly_name||"",t))),w=(e,t=!1)=>k(e).filter((e=>p(e,t))),x=async(e,t)=>{const i=k(t.states,t.locale.language).map((e=>e.entity_id));if(!i.length)return void(0,d.showAlertDialog)(e,{title:t.localize("ui.panel.config.updates.no_update_entities.title"),text:t.localize("ui.panel.config.updates.no_update_entities.description"),warning:!0});(0,u.C)(e,{message:t.localize("ui.panel.config.updates.checking_updates")});let a=0;const o=await t.connection.subscribeEvents((i=>{"update"===(0,r.M)(i.data.entity_id)&&(a++,(0,u.C)(e,{message:t.localize("ui.panel.config.updates.updates_refreshed",{count:a})}))}),"state_changed");await t.callService("homeassistant","update_entity",{entity_id:i}),await new Promise((e=>{setTimeout(e,15e3)})),o(),0===a&&(0,u.C)(e,{message:t.localize("ui.panel.config.updates.no_new_updates")})},S=(e,t)=>{const i=e.state,a=e.attributes;if("off"===i){return a.latest_version&&a.skipped_version===a.latest_version?a.latest_version:t.formatEntityState(e)}if("on"===i&&g(e)){return(0,s.e)(e,h.PROGRESS)&&null!==a.update_percentage?t.localize("ui.card.update.installing_with_progress",{progress:(0,l.uf)(a.update_percentage,t.locale,{maximumFractionDigits:a.display_precision,minimumFractionDigits:a.display_precision})}):t.localize("ui.card.update.installing")}return t.formatEntityState(e)},C=(e,t)=>{const i=e.entity_id,a=t[i]?.domain;if("hassio"!==a)return"generic";const o=e.attributes.title||"";return o===y?"home_assistant":[y,v,_].includes(o)?"generic":"addon"};a()}catch(e){a(e)}}))},76131:function(e,t,i){i.r(t),i.d(t,{loadGenericDialog:()=>o,showAlertDialog:()=>n,showConfirmationDialog:()=>s,showPromptDialog:()=>l});var a=i(36522);const o=()=>Promise.all([i.e("46379"),i.e("66031"),i.e("25618"),i.e("7442"),i.e("73201"),i.e("19145")]).then(i.bind(i,79740)),r=(e,t,i)=>new Promise((r=>{const n=t.cancel,s=t.confirm;(0,a.B)(e,"show-dialog",{dialogTag:"dialog-box",dialogImport:o,dialogParams:{...t,...i,cancel:()=>{r(!!i?.prompt&&null),n&&n()},confirm:e=>{r(!i?.prompt||e),s&&s(e)}}})})),n=(e,t)=>r(e,t),s=(e,t)=>r(e,t,{confirmation:!0}),l=(e,t)=>r(e,t,{prompt:!0})},76525:function(e,t,i){i.d(t,{L$:()=>f,gA:()=>c,lD:()=>p,ts:()=>h,vC:()=>d});i(92745);var a=i(5111),o=i(84200);if(66977!=i.j)var r=i(81165);if(66977!=i.j)var n=i(76320);const s={},l=[],c=Symbol.for("HA focus target"),d=async(e,t,i,n,u,f=!0)=>{if(!(i in s)){if(!u)return!1;s[i]={element:u().then((()=>{const t=document.createElement(i);return e.provideHass(t),t.addEventListener("dialog-closed",m),t.addEventListener("dialog-closed",g),t}))}}if(f){const{history:o}=a.E;if(o.state?.dialog&&!l.length)return await new Promise((e=>{setTimeout(e)})),d(e,t,i,n,u,f);const r=l.findIndex((e=>e.dialogTag===i));-1!==r&&l.splice(r,1),l.push({element:e,root:t,dialogTag:i,dialogParams:n,dialogImport:u,addHistory:f});const s={dialog:i};o.state?.dialog?o.replaceState(s,""):(o.replaceState({...o.state,opensDialog:!0},""),o.pushState(s,""))}s[i].closedFocusTargets=(0,o.r)((0,r.j)(),c);const h=await s[i].element;return t.appendChild(h),h.showDialog(n),!0},u=async e=>{if(!(e in s))return!0;const t=await s[e].element;return!t.closeDialog||!1!==t.closeDialog()},f=async()=>{if(l.length){const e=l.pop(),t=await u(e.dialogTag);return t||l.push(e),l.length&&a.E.history.state?.opensDialog&&a.E.history.pushState({dialog:l[l.length-1].dialogTag},""),t}return!0},h=async()=>{for(let e=l.length-1;e>=0;e--){if(!(!l[e]||await u(l[e].dialogTag)))return!1}return!0},m=e=>{const t=l.findIndex((t=>t.dialogTag===e.detail.dialog));-1!==t&&l.splice(t,1),a.E.history.state?.dialog===e.detail.dialog&&(l.length?a.E.history.replaceState({dialog:l[l.length-1].dialogTag},""):-1!==t&&a.E.history.back())},p=(e,t)=>{e.addEventListener("show-dialog",(i=>{const{dialogTag:a,dialogImport:o,dialogParams:r,addHistory:n}=i.detail;d(e,t,a,r,o,n)}))},g=async e=>{if(!s[e.detail.dialog])return;const t=s[e.detail.dialog].closedFocusTargets;if(delete s[e.detail.dialog].closedFocusTargets,!t)return;let i=(0,r.j)();i instanceof HTMLElement&&i.blur(),await(0,n.y)();for(const e of t)if(e instanceof HTMLElement&&(e.focus(),i=(0,r.j)(),i&&i!==document.body))return}},30511:function(e,t,i){i.r(t),i.d(t,{mdiHomeAssistant:()=>a});const a="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"},28008:function(e,t,i){i.d(t,{$c:()=>s,Qx:()=>r,k1:()=>o,yu:()=>n});var a=i(57243);const o=a.iv`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`,r=a.iv`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}${o} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`,n=a.iv`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-dialog{--mdc-dialog-min-width:calc( 100vw - env(safe-area-inset-right) - env(safe-area-inset-left) );--mdc-dialog-max-width:calc( 100vw - env(safe-area-inset-right) - env(safe-area-inset-left) );--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`,s=a.iv`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`;a.iv`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`}}; //# sourceMappingURL=46725.f7c9a88ebbbba4c6.js.map