iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 17.4 kB
JavaScript
/*! For license information please see 45246.95a73e38547a35e1.js.LICENSE.txt */
export const __rspack_esm_id=45246;export const __rspack_esm_ids=[45246];export const __webpack_modules__={35370(e,t,s){var i=s(26198);e.exports=function(e,t,s){for(var r=0,o=arguments.length>2?s:i(t),n=new e(o);o>r;)n[r]=t[r++];return n}},77957(e,t,s){var i=s(76080),r=s(79504),o=s(47055),n=s(48981),a=s(56969),l=s(26198),c=s(2360),d=s(35370),h=Array,u=r([].push);e.exports=function(e,t,s,r){for(var p,v,f,b=n(e),m=o(b),y=i(t,s),g=c(null),_=l(m),x=0;_>x;x++)f=m[x],(v=a(y(f,x,b)))in g?u(g[v],f):g[v]=[f];if(r&&(p=r(b))!==h)for(v in g)g[v]=d(p,g[v]);return g}},46058(e,t,s){var i=s(46518),r=s(77957),o=s(6469);i({target:"Array",proto:!0},{group:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o("group")},95010(e,t,s){s.d(t,{q:()=>i,N:()=>r});s(16573),s(78100),s(77936),s(37467),s(44732),s(79577),s(16632),s(34226),s(9486),s(20456);function i(e,t,s){const i=e=>Object.is(e,-0)?0:e;return i(e<t?t:e>s?s:e)}function r(e=""){return`${e}${((e=21)=>{let t="",s=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&s[e]];return t})()}`}},4444(e,t,s){s.d(t,{JG:()=>r,Rt:()=>n,I7:()=>o});s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);const i=new Set;function r(e){if(i.add(e),!document.documentElement.classList.contains("wa-scroll-lock")){const e=function(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}()+function(){const e=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(e)||!e?0:e}();let t=getComputedStyle(document.documentElement).scrollbarGutter;t&&"auto"!==t||(t="stable"),e<2&&(t=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",t),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${e}px`)}}function o(e){i.delete(e),0===i.size&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function n(e,t,s="vertical",i="smooth"){const r=function(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}(e,t),o=r.top+t.scrollTop,n=r.left+t.scrollLeft,a=t.scrollLeft,l=t.scrollLeft+t.offsetWidth,c=t.scrollTop,d=t.scrollTop+t.offsetHeight;"horizontal"!==s&&"both"!==s||(n<a?t.scrollTo({left:n,behavior:i}):n+e.clientWidth>l&&t.scrollTo({left:n-t.offsetWidth+e.clientWidth,behavior:i})),"vertical"!==s&&"both"!==s||(o<c?t.scrollTo({top:o,behavior:i}):o+e.clientHeight>d&&t.scrollTo({top:o-t.offsetHeight+e.clientHeight,behavior:i}))}},88696(e,t,s){s.d(t,{P:()=>o});s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);var i=s(37540),r=s(42017);class o{handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}target(e){return n(this,e)}constructor(e,{target:t,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,null!==t&&this.t.add(t??e),this.l=s,this.o=r??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver(e=>{this.handleChanges(e),this.h.requestUpdate()}),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}}const n=(0,r.u$)(class extends i.Kq{render(e,t){}update(e,[t,s]){this.controller=t,this.part=e,this.observe=s,!1===s?(t.unobserve(e.element),this.observing=!1):!1===this.observing&&(t.observe(e.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){!1!==this.observe&&!1===this.observing&&(this.controller?.observe(this.part.element),this.observing=!0)}constructor(){super(...arguments),this.observing=!1}})},99731(e,t,s){s.d(t,{Y:()=>c});var i=s(62826),r=s(22441),o=(s(18111),s(22489),s(20116),s(5124)),n=s(99591);class a extends o.WF{get chips(){return this.childElements.filter(e=>e instanceof n.v)}render(){return o.qy`<slot ="${this.updateTabIndices}"></slot>`}handleKeyDown(e){const t="ArrowLeft"===e.key,s="ArrowRight"===e.key,i="Home"===e.key,r="End"===e.key;if(!(t||s||i||r))return;const{chips:o}=this;if(o.length<2)return;if(e.preventDefault(),i||r){return o[i?0:o.length-1].focus({trailing:r}),void this.updateTabIndices()}const n="rtl"===getComputedStyle(this).direction?t:s,a=o.find(e=>e.matches(":focus-within"));if(!a){return(n?o[0]:o[o.length-1]).focus({trailing:!n}),void this.updateTabIndices()}const l=o.indexOf(a);let c=n?l+1:l-1;for(;c!==l;){c>=o.length?c=0:c<0&&(c=o.length-1);const e=o[c];if(!e.disabled||e.alwaysFocusable){e.focus({trailing:!n}),this.updateTabIndices();break}n?c++:c--}}updateTabIndices(){const{chips:e}=this;let t;for(const s of e){const e=s.alwaysFocusable||!s.disabled;s.matches(":focus-within")&&e?t=s:(e&&!t&&(t=s),s.tabIndex=-1)}t&&(t.tabIndex=0)}constructor(){super(),this.internals=this.attachInternals(),o.S$||(this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar")}}(0,i.Cg)([(0,r.KN)()],a.prototype,"childElements",void 0);const l=o.AH`:host{display:flex;flex-wrap:wrap;gap:8px}`;let c=class extends a{};c.styles=[l],c=(0,i.Cg)([(0,r.EM)("md-chip-set")],c)},96229(e,t,s){s.d(t,{k:()=>a});var i=s(62826),r=(s(73535),s(5124)),o=s(22441),n=s(99591);class a extends n.v{get primaryId(){return this.href?"link":"button"}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}getContainerClasses(){return{...super.getContainerClasses(),disabled:!this.href&&(this.disabled||this.softDisabled),elevated:this.elevated,link:!!this.href}}renderPrimaryAction(e){const{ariaLabel:t}=this;return this.href?r.qy` <a class="primary action" id="link" aria-label="${t||r.s6}" href="${this.href}" download="${this.download||r.s6}" target="${this.target||r.s6}">${e}</a> `:r.qy` <button class="primary action" id="button" aria-label="${t||r.s6}" aria-disabled="${this.softDisabled||r.s6}" ?disabled="${this.disabled&&!this.alwaysFocusable}" type="button">${e}</button> `}renderOutline(){return this.elevated?r.qy`<md-elevation part="elevation"></md-elevation>`:super.renderOutline()}constructor(){super(...arguments),this.elevated=!1,this.href="",this.download="",this.target=""}}(0,i.Cg)([(0,o.MZ)({type:Boolean})],a.prototype,"elevated",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"href",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"download",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"target",void 0)},26069(e,t,s){s.d(t,{R:()=>i});const i=s(5124).AH`:host{--_container-height:var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color:var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity:var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color:var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation:var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color:var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color:var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation:var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity:var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation:var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation:var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation:var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color:var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color:var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color:var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity:var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color:var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font:var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height:var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size:var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight:var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color:var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color:var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity:var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color:var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity:var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color:var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color:var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width:var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color:var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity:var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color:var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color:var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color:var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size:var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color:var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start:var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end:var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end:var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start:var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space:var(--md-assist-chip-leading-space, 16px);--_trailing-space:var(--md-assist-chip-trailing-space, 16px);--_icon-label-space:var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space:var(--md-assist-chip-with-leading-icon-leading-space, 8px)}{.link .outline{border-color:ActiveText}}`},27525(e,t,s){function i(e,t=p){const s=a(e,t);return s&&(s.tabIndex=0,s.focus()),s}function r(e,t=p){const s=l(e,t);return s&&(s.tabIndex=0,s.focus()),s}function o(e,t=p){const s=n(e,t);return s&&(s.item.tabIndex=-1),s}function n(e,t=p){for(let s=0;s<e.length;s++){const i=e[s];if(0===i.tabIndex&&t(i))return{item:i,index:s}}return null}function a(e,t=p){for(const s of e)if(t(s))return s;return null}function l(e,t=p){for(let s=e.length-1;s>=0;s--){const i=e[s];if(t(i))return i}return null}function c(e,t,s=p,r=!0){if(t){const i=function(e,t,s=p,i=!0){for(let r=1;r<e.length;r++){const o=(r+t)%e.length;if(o<t&&!i)return null;const n=e[o];if(s(n))return n}return e[t]?e[t]:null}(e,t.index,s,r);return i&&(i.tabIndex=0,i.focus()),i}return i(e,s)}function d(e,t,s=p,i=!0){if(t){const r=function(e,t,s=p,i=!0){for(let r=1;r<e.length;r++){const o=(t-r+e.length)%e.length;if(o>t&&!i)return null;const n=e[o];if(s(n))return n}return e[t]?e[t]:null}(e,t.index,s,i);return r&&(r.tabIndex=0,r.focus()),r}return r(e,s)}function h(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function u(){return new Event("request-activation",{bubbles:!0,composed:!0})}function p(e){return!e.disabled}s.d(t,{A6:()=>n,Ex:()=>l,RN:()=>h,RZ:()=>r,c7:()=>a,cG:()=>u,u9:()=>d,ub:()=>o,wm:()=>c,zT:()=>i})},95192(e,t,s){s.d(t,{IU:()=>c,Jt:()=>a,Yd:()=>i,hZ:()=>l,y$:()=>r});s(44114),s(18111),s(7588),s(61701);function i(e){return new Promise((t,s)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>s(e.error)})}function r(e,t){let s;return(r,o)=>(()=>{if(s)return s;const r=indexedDB.open(e);return r.onupgradeneeded=()=>r.result.createObjectStore(t),s=i(r),s.then(e=>{e.onclose=()=>s=void 0},()=>{}),s})().then(e=>o(e.transaction(t,r).objectStore(t)))}let o;function n(){return o||(o=r("keyval-store","keyval")),o}function a(e,t=n()){return t("readonly",t=>i(t.get(e)))}function l(e,t,s=n()){return s("readwrite",s=>(s.put(t,e),i(s.transaction)))}function c(e=n()){return e("readwrite",e=>(e.clear(),i(e.transaction)))}},37540(e,t,s){s.d(t,{Kq:()=>h});s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);var i=s(63937),r=s(42017);const o=(e,t)=>{const s=e._$AN;if(void 0===s)return!1;for(const e of s)e._$AO?.(t,!1),o(e,t);return!0},n=e=>{let t,s;do{if(void 0===(t=e._$AM))break;s=t._$AN,s.delete(e),e=t}while(0===s?.size)},a=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(void 0===s)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),d(t)}};function l(e){void 0!==this._$AN?(n(this),this._$AM=e,a(this)):this._$AM=e}function c(e,t=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)o(i[e],!1),n(i[e]);else null!=i&&(o(i,!1),n(i));else o(this,e)}const d=e=>{e.type==r.OA.CHILD&&(e._$AP??=c,e._$AQ??=l)};class h extends r.WL{_$AT(e,t,s){super._$AT(e,t,s),a(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(o(this,e),n(this))}setValue(e){if((0,i.Rt)(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}constructor(){super(...arguments),this._$AN=void 0}}},75751(e,t,s){s.d(t,{u:()=>a});s(45367),s(92731);var i=s(5055),r=s(42017),o=s(63937);const n=(e,t,s)=>{const i=new Map;for(let r=t;r<=s;r++)i.set(e[r],r);return i},a=(0,r.u$)(class extends r.WL{dt(e,t,s){let i;void 0===s?s=t:void 0!==t&&(i=t);const r=[],o=[];let n=0;for(const t of e)r[n]=i?i(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:r}}render(e,t,s){return this.dt(e,t,s).values}update(e,[t,s,r]){const a=(0,o.cN)(e),{values:l,keys:c}=this.dt(t,s,r);if(!Array.isArray(a))return this.ut=c,l;const d=this.ut??=[],h=[];let u,p,v=0,f=a.length-1,b=0,m=l.length-1;for(;v<=f&&b<=m;)if(null===a[v])v++;else if(null===a[f])f--;else if(d[v]===c[b])h[b]=(0,o.lx)(a[v],l[b]),v++,b++;else if(d[f]===c[m])h[m]=(0,o.lx)(a[f],l[m]),f--,m--;else if(d[v]===c[m])h[m]=(0,o.lx)(a[v],l[m]),(0,o.Dx)(e,h[m+1],a[v]),v++,m--;else if(d[f]===c[b])h[b]=(0,o.lx)(a[f],l[b]),(0,o.Dx)(e,a[v],a[f]),f--,b++;else if(void 0===u&&(u=n(c,b,m),p=n(d,v,f)),u.has(d[v]))if(u.has(d[f])){const t=p.get(c[b]),s=void 0!==t?a[t]:null;if(null===s){const t=(0,o.Dx)(e,a[v]);(0,o.lx)(t,l[b]),h[b]=t}else h[b]=(0,o.lx)(s,l[b]),(0,o.Dx)(e,a[v],s),a[t]=null;b++}else(0,o.KO)(a[f]),f--;else(0,o.KO)(a[v]),v++;for(;b<=m;){const t=(0,o.Dx)(e,h[m+1]);(0,o.lx)(t,l[b]),h[b++]=t}for(;v<=f;){const e=a[v++];null!==e&&(0,o.KO)(e)}return this.ut=c,(0,o.mY)(e,h),i.c0}constructor(e){if(super(e),e.type!==r.OA.CHILD)throw Error("repeat() can only be used in text expressions")}})},89784(e,t,s){s.d(t,{W:()=>a});s(74423),s(18111),s(18237),s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);var i=s(5055),r=s(42017);const o="important",n=" !"+o,a=(0,r.u$)(class extends r.WL{render(e){return Object.keys(e).reduce((t,s)=>{const i=e[s];return null==i?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(e,[t]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?s.removeProperty(e):s[e]=null);for(const e in t){const i=t[e];if(null!=i){this.ft.add(e);const t="string"==typeof i&&i.endsWith(n);e.includes("-")||t?s.setProperty(e,t?i.slice(0,-11):i,t?o:""):s[e]=i}}return i.c0}constructor(e){if(super(e),e.type!==r.OA.ATTRIBUTE||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}})}};