UNPKG

iobroker.lovelace

Version:

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

9 lines 16.9 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["7951"],{54202:function(e,t,i){i.r(t),i.d(t,{HaIconButtonArrowPrev:()=>d});var o=i(61701),a=(i(71695),i(47021),i(57243)),n=i(50778),r=i(5111);i(23334);let s,l=e=>e;let d=(0,o.Z)([(0,n.Mo)("ha-icon-button-arrow-prev")],(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)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_icon",value(){return"rtl"===r.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(s||(s=l` <ha-icon-button .disabled="${0}" .label="${0}" .path="${0}"></ha-icon-button> `),this.disabled,this.label||(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon)}}]}}),a.oi)},23334:function(e,t,i){i.r(t),i.d(t,{HaIconButton:()=>u});var o=i(61701),a=(i(71695),i(47021),i(74269),i(57243)),n=i(50778),r=i(20552);i(37583);let s,l,d,c,h=e=>e,u=(0,o.Z)([(0,n.Mo)("ha-icon-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value(){return!1}},{kind:"field",decorators:[(0,n.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){var e;null===(e=this._button)||void 0===e||e.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value(){return{mode:"open",delegatesFocus:!0}}},{kind:"method",key:"render",value:function(){return(0,a.dy)(s||(s=h` <mwc-icon-button aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}"> ${0} </mwc-icon-button> `),(0,r.o)(this.label),(0,r.o)(this.hideTitle?void 0:this.label),(0,r.o)(this.ariaHasPopup),this.disabled,this.path?(0,a.dy)(l||(l=h`<ha-svg-icon .path="${0}"></ha-svg-icon>`),this.path):(0,a.dy)(d||(d=h`<slot></slot>`)))}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(c||(c=h`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`))}}]}}),a.oi)},43344:function(e,t,i){var o=i(61701),a=i(72621),n=(i(52247),i(71695),i(47021),i(57243)),r=i(50778),s=i(36522),l=i(83716);i(23334);let d,c,h,u=e=>e;(0,o.Z)([(0,r.Mo)("ha-menu-button")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"hassio",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_hasNotifications",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_show",value(){return!1}},{kind:"field",key:"_alwaysVisible",value(){return!1}},{kind:"field",key:"_attachNotifOnConnect",value(){return!1}},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(i,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(i,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return n.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,n.dy)(d||(d=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,e?(0,n.dy)(c||(c=u`<div class="dot"></div>`)):"")}},{kind:"method",key:"firstUpdated",value:function(e){(0,a.Z)(i,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,a.Z)(i,"willUpdate",this,3)([e]),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,o=(e.has("narrow")?e.get("narrow"):this.narrow)||"always_hidden"===(null==t?void 0:t.dockedSidebar),n=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&o===n||(this._show=n||this._alwaysVisible,n?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,l.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,s.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:50%;border:2px solid var(--app-header-background-color)}`))}}]}}),n.oi)},17170:function(e,t,i){i.a(e,(async function(e,o){try{i.r(t),i.d(t,{HaSpinner:()=>p});var a=i(61701),n=i(72621),r=(i(71695),i(47021),i(97677)),s=i(43580),l=i(57243),d=i(50778),c=e([r]);r=(c.then?(await c)():c)[0];let h,u=e=>e,p=(0,a.Z)([(0,d.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,n.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value(){return[s.Z,(0,l.iv)(h||(h=u`:host{--indicator-color:var( --ha-spinner-indicator-color, var(--primary-color) );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}]}}),r.Z);o()}catch(h){o(h)}}))},37583:function(e,t,i){i.r(t),i.d(t,{HaSvgIcon:()=>h});var o=i(61701),a=(i(71695),i(47021),i(57243)),n=i(50778);let r,s,l,d,c=e=>e,h=(0,o.Z)([(0,n.Mo)("ha-svg-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,a.YP)(r||(r=c` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,a.YP)(s||(s=c`<path class="primary-path" d="${0}"></path>`),this.path):a.Ld,this.secondaryPath?(0,a.YP)(l||(l=c`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):a.Ld)}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(d||(d=c`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`))}}]}}),a.oi)},83716:function(e,t,i){i.d(t,{r:()=>o});i(71695),i(19423),i(47021);const o=(e,t)=>{const i=new a,o=e.subscribeMessage((e=>t(i.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{o.then((e=>null==e?void 0:e()))}};class a{constructor(){this.notifications=void 0,this.notifications={}}processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}}},75375:function(e,t,i){i.a(e,(async function(e,o){try{i.r(t);var a=i(61701),n=(i(71695),i(47021),i(57243)),r=i(50778),s=i(17170),l=(i(54202),i(43344),i(28008)),d=e([s]);s=(d.then?(await d)():d)[0];let c,h,u,p,f,v,b=e=>e;(0,a.Z)([(0,r.Mo)("hass-loading-screen")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-toolbar"})],key:"noToolbar",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"rootnav",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)()],key:"message",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,n.dy)(c||(c=b` ${0} <div class="content"> <ha-spinner></ha-spinner> ${0} </div> `),this.noToolbar?"":(0,n.dy)(h||(h=b`<div class="toolbar"> ${0} </div>`),this.rootnav||null!==(e=history.state)&&void 0!==e&&e.root?(0,n.dy)(u||(u=b` <ha-menu-button .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.hass,this.narrow):(0,n.dy)(p||(p=b` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._handleBack)),this.message?(0,n.dy)(f||(f=b`<div id="loading-text">${0}</div>`),this.message):n.Ld)}},{kind:"method",key:"_handleBack",value:function(){history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,(0,n.iv)(v||(v=b`:host{display:block;height:100%;background-color:var(--primary-background-color)}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;pointer-events:none;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto}.content{height:calc(100% - var(--header-height));display:flex;flex-direction:column;align-items:center;justify-content:center}#loading-text{max-width:350px;margin-top:16px}`))]}}]}}),n.oi);o()}catch(c){o(c)}}))},16485:function(e,t,i){i.a(e,(async function(e,t){try{i(71695),i(92745),i(40251),i(47021);var o=i(61449),a=i(40574),n=i(30532),r=i(41674),s=i(49722),l=i(76632),d=i(7884),c=i(35185),h=i(65401),u=i(44180),p=i(49447);const e=async()=>{const e=(0,u.sS)(),t=[];(0,n.shouldPolyfill)()&&await Promise.all([i.e("80210"),i.e("74055")]).then(i.bind(i,98133)),(0,s.shouldPolyfill)()&&await Promise.all([i.e("2142"),i.e("75297"),i.e("80210"),i.e("60251")]).then(i.bind(i,59095)),(0,o.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("68250")]).then(i.bind(i,80561)).then((()=>(0,p.H)()))),(0,h.shouldPolyfill)()&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("65578")]).then(i.bind(i,97995))),(0,a.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("59826")]).then(i.bind(i,31514))),(0,r.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("23649")]).then(i.bind(i,93840))),(0,l.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("42831")]).then(i.bind(i,29559))),(0,d.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("57377")]).then(i.bind(i,39030)).then((()=>i.e("61236").then(i.t.bind(i,4121,23))))),(0,c.shouldPolyfill)(e)&&t.push(Promise.all([i.e("2142"),i.e("75297"),i.e("13870")]).then(i.bind(i,74546))),0!==t.length&&await Promise.all(t).then((()=>(0,p.n)(e)))};await e(),t()}catch(f){t(f)}}),1)},28008:function(e,t,i){i.d(t,{$c:()=>p,Qx:()=>h,k1:()=>c,yu:()=>u});var o=i(57243);let a,n,r,s,l,d=e=>e;const c=(0,o.iv)(a||(a=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),h=(0,o.iv)(n||(n=d`: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)}${0} .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}`),c),u=(0,o.iv)(r||(r=d`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)}`)),p=(0,o.iv)(s||(s=d`.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}`));(0,o.iv)(l||(l=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]); //# sourceMappingURL=7951.dbc0df20d2c9e94d.js.map