UNPKG

iobroker.lovelace

Version:

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

7 lines 10.7 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[47956],{57237:function(e,t,a){a.d(t,{d:function(){return c}});const c=e=>e.stopPropagation()},7553:function(e,t,a){a.d(t,{h:function(){return s}});a(16280),a(3362),a(62953);class c extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,c),this.name="TimeoutError",this.timeout=e,this.message=`Timed out in ${e} ms.`}}const s=(e,t)=>{const a=new Promise((t,a)=>{setTimeout(()=>{a(new c(e))},e)});return Promise.race([t,a])}},12587:function(e,t,a){a.d(t,{E:function(){return s},m:function(){return c}});a(3362);const c=e=>{requestAnimationFrame(()=>setTimeout(e,0))},s=()=>new Promise(e=>{c(e)})},47680:function(e,t,a){a.r(t),a.d(t,{HaIcon:function(){return I}});a(74423),a(3362),a(62953);var c=a(40445),s=a(5124),i=a(67576),o=a(1087),r=a(9899),n=a(700),d=(a(44114),a(18111),a(7588),a(96167),a(95192)),f=a(7553);const l=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 h;const b=()=>(h||(h=u().catch(e=>{throw h=void 0,e})),h),u=async()=>{const e=(0,d.y$)("hass-icon-db","mdi-icon-store"),t=await(0,d.Jt)("_version",e);return t?t!==l.version&&(await(0,d.IU)(e),(0,d.hZ)("_version",l.version,e)):(0,d.hZ)("_version",l.version,e),e},p=["mdi","hass","hassio","hademo"];let v=[];a(67094);let y,m,w,g=e=>e;const _={},C={},$=(0,r.s)(()=>(async e=>{const t=Object.keys(e),a=await Promise.allSettled(Object.values(e));(await b())("readwrite",c=>{a.forEach((a,s)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([e,t])=>{c.put(t,e)}),delete e[t[s]]})})})(C),2e3),k={},P={"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 I extends s.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?(0,s.qy)(y||(y=g` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,s.qy)(m||(m=g`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):s.s6}async _loadIcon(){if(!this.icon)return;const e=this.icon,[t,a]=this.icon.split(":",2);let c,s=a;if(!t||!s)return;if(!p.includes(t)){const a=n.y[t];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(s),e)):void(this._legacy=!0)}if(this._legacy=!1,s in _){const e=_[s];let a;e.newName?(a=`Icon ${t}:${s} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,s=e.newName):a=`Icon ${t}:${s} 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,o.r)(this,"write_log",{level:"warning",message:a})}if(s in k)return void(this._path=k[s]);if(s in P){const t=await P[s]();return this.icon===e&&(this._path=t),void(k[s]=t)}try{c=await(e=>new Promise((t,a)=>{if(v.push([e,t,a]),v.length>1)return;const c=b();(0,f.h)(1e3,(async()=>{(await c)("readonly",e=>{for(const[t,a,c]of v)(0,d.Yd)(e.get(t)).then(e=>a(e)).catch(e=>c(e));v=[]})})()).catch(e=>{for(const[,,t]of v)t(e);v=[]})}))(s)}catch(h){c=void 0}if(c)return this.icon===e&&(this._path=c),void(k[s]=c);const i=(e=>{let t;for(const a of l.parts){if(void 0!==a.start&&e<a.start)break;t=a}return t.file})(s);if(i in C)return void this._setPath(C[i],s,e);const r=fetch(`/static/mdi/${i}.json`).then(e=>e.json());C[i]=r,this._setPath(r,s,e),r.catch(()=>{delete C[i]}),$()}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 c=await e;this.icon===a&&(this._path=c[t]),k[t]=c[t]}catch(c){}}constructor(...e){super(...e),this._legacy=!1}}I.styles=(0,s.AH)(w||(w=g`:host{fill:currentcolor}`)),(0,c.Cg)([(0,i.MZ)()],I.prototype,"icon",void 0),(0,c.Cg)([(0,i.wk)()],I.prototype,"_path",void 0),(0,c.Cg)([(0,i.wk)()],I.prototype,"_secondaryPath",void 0),(0,c.Cg)([(0,i.wk)()],I.prototype,"_viewBox",void 0),(0,c.Cg)([(0,i.wk)()],I.prototype,"_legacy",void 0),I=(0,c.Cg)([(0,i.EM)("ha-icon")],I)},54276:function(e,t,a){a(62953);var c=a(40445),s=a(76482),i=a(91382),o=a(96245),r=a(5124),n=a(67576);let d;class f extends i.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){null==e||e.removeEventListener("touchend",this._handleTouchEnd),null==t||t.addEventListener("touchend",this._handleTouchEnd)}constructor(...e){super(...e),this.attachableTouchController=new s.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}f.styles=[o.R,(0,r.AH)(d||(d=(e=>e)`: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)) )}`))],f=(0,c.Cg)([(0,n.EM)("ha-ripple")],f)},38235:function(e,t,a){a.a(e,async function(e,c){try{a.r(t),a.d(t,{HaAreasDisplaySelector:function(){return l}});a(62953);var s=a(40445),i=a(5124),o=a(67576),r=a(14923),n=e([r]);r=(n.then?(await n)():n)[0];let d,f=e=>e;class l extends i.WF{render(){return(0,i.qy)(d||(d=f` <ha-areas-display-editor .hass="${0}" .value="${0}" .label="${0}" .helper="${0}" .disabled="${0}" .required="${0}"></ha-areas-display-editor> `),this.hass,this.value,this.label,this.helper,this.disabled,this.required)}constructor(...e){super(...e),this.disabled=!1,this.required=!0}}(0,s.Cg)([(0,o.MZ)({attribute:!1})],l.prototype,"hass",void 0),(0,s.Cg)([(0,o.MZ)({attribute:!1})],l.prototype,"selector",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"value",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"helper",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],l.prototype,"disabled",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean})],l.prototype,"required",void 0),l=(0,s.Cg)([(0,o.EM)("ha-selector-areas_display")],l),c()}catch(d){c(d)}})},700:function(e,t,a){a.d(t,{y:function(){return o}});const c=window;"customIconsets"in c||(c.customIconsets={});const s=c.customIconsets,i=window;"customIcons"in i||(i.customIcons={});const o=new Proxy(i.customIcons,{get:(e,t)=>{var a;return null!==(a=e[t])&&void 0!==a?a:s[t]?{getIcon:s[t]}:void 0}})},69235:function(e,t,a){a.a(e,async function(e,t){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e(71055).then(a.bind(a,52370))).default),t()}catch(c){t(c)}},1)}}]);