UNPKG

iobroker.lovelace

Version:

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

17 lines 17.3 kB
/*! For license information please see 64657.0b94ecd57d0ac0a6.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[64657],{65722:function(t,e,i){i.d(e,{A:function(){return s}});i(89463),i(66412),i(16280),i(3362),i(62953);function s(t){var e,i,s,r=2;for("undefined"!=typeof Symbol&&(i=Symbol.asyncIterator,s=Symbol.iterator);r--;){if(i&&null!=(e=t[i]))return e.call(t);if(s&&null!=(e=t[s]))return new n(e.call(t));i="@@asyncIterator",s="@@iterator"}throw new TypeError("Object is not async iterable")}function n(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(t){return{value:t,done:e}})}return n=function(t){this.s=t,this.n=t.next},n.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var i=this.s.return;return void 0===i?Promise.resolve({value:t,done:!0}):e(i.apply(this.s,arguments))},throw:function(t){var i=this.s.return;return void 0===i?Promise.reject(t):e(i.apply(this.s,arguments))}},new n(t)}},25423:function(t,e,i){i.d(e,{U:function(){return n},Z:function(){return r}});i(44114),i(62953);var s=i(27525);const n={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class r{get items(){const t=this.getPossibleItems(),e=[];for(const i of t){if(this.isItem(i)){e.push(i);continue}const t=i.item;t&&this.isItem(t)&&e.push(t)}return e}activateNextItem(){const t=this.items,e=(0,s.A6)(t,this.isActivatable);return e&&(e.item.tabIndex=-1),(0,s.wm)(t,e,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const t=this.items,e=(0,s.A6)(t,this.isActivatable);return e&&(e.item.tabIndex=-1),(0,s.u9)(t,e,this.isActivatable,this.wrapNavigation())}constructor(t){this.handleKeydown=t=>{const e=t.key;if(t.defaultPrevented||!this.isNavigableKey(e))return;const i=this.items;if(!i.length)return;const r=(0,s.A6)(i,this.isActivatable);t.preventDefault();const o=this.isRtl(),a=o?n.ArrowRight:n.ArrowLeft,l=o?n.ArrowLeft:n.ArrowRight;let c=null;switch(e){case n.ArrowDown:case l:c=(0,s.wm)(i,r,this.isActivatable,this.wrapNavigation());break;case n.ArrowUp:case a:c=(0,s.u9)(i,r,this.isActivatable,this.wrapNavigation());break;case n.Home:c=(0,s.zT)(i,this.isActivatable);break;case n.End:c=(0,s.RZ)(i,this.isActivatable)}c&&r&&r.item!==c&&(r.item.tabIndex=-1)},this.onDeactivateItems=()=>{const t=this.items;for(const e of t)this.deactivateItem(e)},this.onRequestActivation=t=>{this.onDeactivateItems();const e=t.target;this.activateItem(e),e.focus()},this.onSlotchange=()=>{const t=this.items;let e=!1;for(const s of t){!(!s.disabled&&s.tabIndex>-1)||e?s.tabIndex=-1:(e=!0,s.tabIndex=0)}if(e)return;const i=(0,s.c7)(t,this.isActivatable);i&&(i.tabIndex=0)};const{isItem:e,getPossibleItems:i,isRtl:r,deactivateItem:o,activateItem:a,isNavigableKey:l,isActivatable:c,wrapNavigation:d}=t;this.isItem=e,this.getPossibleItems=i,this.isRtl=r,this.deactivateItem=o,this.activateItem=a,this.isNavigableKey=l,this.isActivatable=c,this.wrapNavigation=null!=d?d:()=>!0}}},27525:function(t,e,i){i.d(e,{A6:function(){return o},Ex:function(){return l},RN:function(){return m},RZ:function(){return n},c7:function(){return a},cG:function(){return h},u9:function(){return d},ub:function(){return r},wm:function(){return c},zT:function(){return s}});i(62953);function s(t,e=u){const i=a(t,e);return i&&(i.tabIndex=0,i.focus()),i}function n(t,e=u){const i=l(t,e);return i&&(i.tabIndex=0,i.focus()),i}function r(t,e=u){const i=o(t,e);return i&&(i.item.tabIndex=-1),i}function o(t,e=u){for(let i=0;i<t.length;i++){const s=t[i];if(0===s.tabIndex&&e(s))return{item:s,index:i}}return null}function a(t,e=u){for(const i of t)if(e(i))return i;return null}function l(t,e=u){for(let i=t.length-1;i>=0;i--){const s=t[i];if(e(s))return s}return null}function c(t,e,i=u,n=!0){if(e){const s=function(t,e,i=u,s=!0){for(let n=1;n<t.length;n++){const r=(n+e)%t.length;if(r<e&&!s)return null;const o=t[r];if(i(o))return o}return t[e]?t[e]:null}(t,e.index,i,n);return s&&(s.tabIndex=0,s.focus()),s}return s(t,i)}function d(t,e,i=u,s=!0){if(e){const n=function(t,e,i=u,s=!0){for(let n=1;n<t.length;n++){const r=(e-n+t.length)%t.length;if(r>e&&!s)return null;const o=t[r];if(i(o))return o}return t[e]?t[e]:null}(t,e.index,i,s);return n&&(n.tabIndex=0,n.focus()),n}return n(t,i)}function m(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function h(){return new Event("request-activation",{bubbles:!0,composed:!0})}function u(t){return!t.disabled}},11245:function(t,e,i){i.d(e,{R:function(){return n}});let s;const n=(0,i(5124).AH)(s||(s=(t=>t)`:host{background:var(--md-list-container-color,var(--md-sys-color-surface,#fef7ff));color:unset;display:flex;flex-direction:column;outline:0;padding:8px 0;position:relative}`))},49838:function(t,e,i){i.d(e,{B:function(){return d}});i(93775),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var s=i(40445),n=i(5124),r=i(67576),o=i(25423);let a,l=t=>t;const c=new Set(Object.values(o.U));class d extends n.WF{get items(){return this.listController.items}render(){return(0,n.qy)(a||(a=l` <slot @deactivate-items="${0}" @request-activation="${0}" @slotchange="${0}"> </slot> `),this.listController.onDeactivateItems,this.listController.onRequestActivation,this.listController.onSlotchange)}activateNextItem(){return this.listController.activateNextItem()}activatePreviousItem(){return this.listController.activatePreviousItem()}constructor(){super(),this.listController=new o.Z({isItem:t=>t.hasAttribute("md-list-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>"rtl"===getComputedStyle(this).direction,deactivateItem:t=>{t.tabIndex=-1},activateItem:t=>{t.tabIndex=0},isNavigableKey:t=>c.has(t),isActivatable:t=>!t.disabled&&"text"!==t.type}),this.internals=this.attachInternals(),n.S$||(this.internals.role="list",this.addEventListener("keydown",this.listController.handleKeydown))}}(0,s.Cg)([(0,r.KN)({flatten:!0})],d.prototype,"slotItems",void 0)},82553:function(t,e,i){i.d(e,{R:function(){return n}});let s;const n=(0,i(5124).AH)(s||(s=(t=>t)`:host{display:flex;-webkit-tap-highlight-color:transparent;--md-ripple-hover-color:var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity:var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color:var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity:var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape:8px}a,button,li{background:0 0;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:0;-webkit-tap-highlight-color:transparent;width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, .3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color,var(--md-sys-color-on-surface,#1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight,var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400)));min-height:var(--md-list-item-one-line-container-height,56px);padding-top:var(--md-list-item-top-space,12px);padding-bottom:var(--md-list-item-bottom-space,12px);padding-inline-start:var(--md-list-item-leading-space,16px);padding-inline-end:var(--md-list-item-trailing-space,16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height,72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, .875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight,var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color,var(--md-sys-color-on-surface-variant,#49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, .6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight,var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color,var(--md-sys-color-on-surface-variant,#49454f))}@media(forced-colors:active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}`))},58168:function(t,e,i){i.d(e,{n:function(){return k}});i(62953);var s=i(40445),n=(i(75275),i(67576)),r=(i(27495),i(5124));let o,a=t=>t;class l extends r.WF{render(){return(0,r.qy)(o||(o=a` <slot name="container"></slot> <slot class="non-text" name="start"></slot> <div class="text"> <slot name="overline" @slotchange="${0}"></slot> <slot class="default-slot" @slotchange="${0}"></slot> <slot name="headline" @slotchange="${0}"></slot> <slot name="supporting-text" @slotchange="${0}"></slot> </div> <slot class="non-text" name="trailing-supporting-text"></slot> <slot class="non-text" name="end"></slot> `),this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange,this.handleTextSlotChange)}handleTextSlotChange(){let t=!1,e=0;for(const i of this.textSlots)if(c(i)&&(e+=1),e>1){t=!0;break}this.multiline=t}constructor(){super(...arguments),this.multiline=!1}}function c(t){for(const i of t.assignedNodes({flatten:!0})){var e;const t=i.nodeType===Node.ELEMENT_NODE,s=i.nodeType===Node.TEXT_NODE&&(null===(e=i.textContent)||void 0===e?void 0:e.match(/\S/));if(t||s)return!0}return!1}(0,s.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],l.prototype,"multiline",void 0),(0,s.Cg)([(0,n.YG)(".text slot")],l.prototype,"textSlots",void 0);let d;const m=(0,r.AH)(d||(d=(t=>t)`:host{color:var(--md-sys-color-on-surface,#1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, .875rem);font-weight:var(--md-sys-typescale-body-medium-weight,var(--md-ref-typeface-weight-regular,400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant,#49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, .6875rem);font-weight:var(--md-sys-typescale-label-small-weight,var(--md-ref-typeface-weight-medium,500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}`));let h=class extends l{};h.styles=[m],h=(0,s.Cg)([(0,n.EM)("md-item")],h);i(71970);var u=i(6412),p=i(7872),f=i(1024),v=i(27525);let g,y,b,x,w,I,C,$,A=t=>t;const R=(0,f.n)(r.WF);class k extends R{get isDisabled(){return this.disabled&&"link"!==this.type}willUpdate(t){this.href&&(this.type="link"),super.willUpdate(t)}render(){return this.renderListItem((0,r.qy)(g||(g=A` <md-item> <div slot="container"> ${0} ${0} </div> <slot name="start" slot="start"></slot> <slot name="end" slot="end"></slot> ${0} </md-item> `),this.renderRipple(),this.renderFocusRing(),this.renderBody()))}renderListItem(t){const e="link"===this.type;let i;switch(this.type){case"link":i=(0,p.eu)(y||(y=A`a`));break;case"button":i=(0,p.eu)(b||(b=A`button`));break;default:i=(0,p.eu)(x||(x=A`li`))}const s="text"!==this.type,n=e&&this.target?this.target:r.s6;return(0,p.qy)(w||(w=A` <${0} id="item" tabindex="${0}" ?disabled=${0} role="listitem" aria-selected=${0} aria-checked=${0} aria-expanded=${0} aria-haspopup=${0} class="list-item ${0}" href=${0} target=${0} @focus=${0} >${0}</${0}> `),i,this.isDisabled||!s?-1:0,this.isDisabled,this.ariaSelected||r.s6,this.ariaChecked||r.s6,this.ariaExpanded||r.s6,this.ariaHasPopup||r.s6,(0,u.H)(this.getRenderClasses()),this.href||r.s6,n,this.onFocus,t,i)}renderRipple(){return"text"===this.type?r.s6:(0,r.qy)(I||(I=A` <md-ripple part="ripple" for="item" ?disabled="${0}"></md-ripple>`),this.isDisabled)}renderFocusRing(){return"text"===this.type?r.s6:(0,r.qy)(C||(C=A` <md-focus-ring @visibility-changed="${0}" part="focus-ring" for="item" inward></md-focus-ring>`),this.onFocusRingVisibilityChanged)}onFocusRingVisibilityChanged(t){}getRenderClasses(){return{disabled:this.isDisabled}}renderBody(){return(0,r.qy)($||($=A` <slot></slot> <slot name="overline" slot="overline"></slot> <slot name="headline" slot="headline"></slot> <slot name="supporting-text" slot="supporting-text"></slot> <slot name="trailing-supporting-text" slot="trailing-supporting-text"></slot> `))}onFocus(){-1===this.tabIndex&&this.dispatchEvent((0,v.cG)())}focus(){var t;null===(t=this.listItemRoot)||void 0===t||t.focus()}click(){this.listItemRoot?this.listItemRoot.click():super.click()}constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}}k.shadowRootOptions=Object.assign(Object.assign({},r.WF.shadowRootOptions),{},{delegatesFocus:!0}),(0,s.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],k.prototype,"disabled",void 0),(0,s.Cg)([(0,n.MZ)({reflect:!0})],k.prototype,"type",void 0),(0,s.Cg)([(0,n.MZ)({type:Boolean,attribute:"md-list-item",reflect:!0})],k.prototype,"isListItem",void 0),(0,s.Cg)([(0,n.MZ)()],k.prototype,"href",void 0),(0,s.Cg)([(0,n.MZ)()],k.prototype,"target",void 0),(0,s.Cg)([(0,n.P)(".list-item")],k.prototype,"listItemRoot",void 0)},91450:function(t,e,i){i.d(e,{T:function(){return h}});i(18111),i(20116),i(3362),i(62953);var s=i(5055),n=i(63937),r=i(37540);i(65722);class o{disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}constructor(t){this.G=t}}class a{get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise(t=>this.Z=t))}resume(){var t;null!==(t=this.Z)&&void 0!==t&&t.call(this),this.Y=this.Z=void 0}constructor(){this.Y=void 0,this.Z=void 0}}var l=i(42017);const c=t=>!(0,n.sO)(t)&&"function"==typeof t.then,d=1073741823;class m extends r.Kq{render(...t){var e;return null!==(e=t.find(t=>!c(t)))&&void 0!==e?e:s.c0}update(t,e){const i=this._$Cbt;let n=i.length;this._$Cbt=e;const r=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let s=0;s<e.length&&!(s>this._$Cwt);s++){const t=e[s];if(!c(t))return this._$Cwt=s,t;s<n&&t===i[s]||(this._$Cwt=d,n=0,Promise.resolve(t).then(async e=>{for(;o.get();)await o.get();const i=r.deref();if(void 0!==i){const s=i._$Cbt.indexOf(t);s>-1&&s<i._$Cwt&&(i._$Cwt=s,i.setValue(e))}}))}return s.c0}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}constructor(){super(...arguments),this._$Cwt=d,this._$Cbt=[],this._$CK=new o(this),this._$CX=new a}}const h=(0,l.u$)(m)}}]);