iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 12.3 kB
JavaScript
/*! For license information please see 93077.459f80c3a7195cd0.js.LICENSE.txt */
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[93077],{12451:function(e,t,s){s.d(t,{O:function(){return r},i:function(){return a.is}});var o=s(5124),a=s(12130);class r extends o.WF{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}},12130:function(e,t,s){s.d(t,{SE:function(){return l},U9:function(){return c},hP:function(){return o},is:function(){return a}});s(44114);const o=e=>e.nodeType===Node.ELEMENT_NODE;function a(e){return{addClass:t=>{e.classList.add(t)},removeClass:t=>{e.classList.remove(t)},hasClass:t=>e.classList.contains(t)}}let r=!1;const i=()=>{},n={get passive(){return r=!0,!1}};document.addEventListener("x",i,n),document.removeEventListener("x",i);const c=(e=window.document)=>{let t=e.activeElement;const s=[];if(!t)return s;for(;t&&(s.push(t),t.shadowRoot);)t=t.shadowRoot.activeElement;return s},l=e=>{const t=c();if(!t.length)return!1;const s=t[t.length-1],o=new Event("check-if-focused",{bubbles:!0,composed:!0});let a=[];const r=e=>{a=e.composedPath()};return document.body.addEventListener("check-if-focused",r),s.dispatchEvent(o),document.body.removeEventListener("check-if-focused",r),-1!==a.indexOf(e)}},27734:function(e,t,s){s.d(t,{S:function(){return r}});s(27495);var o=s(1375),a=s(62009);function r(e){return function(e,t,s){if(e){var o,a=e.toLowerCase().split(/[-_]/),r=a[0],i=r;if(a[1]&&4===a[1].length?(i+="_"+a[1],o=a[2]):o=a[1],o||(o=t[i]||t[r]),o)return function(e,t){var s=t["string"==typeof e?e.toUpperCase():e];return"number"==typeof s?s:1}(o.match(/^\d+$/)?Number(o):o,s)}return 1}(e,o.A,a.A)}},77957:function(e,t,s){var o=s(76080),a=s(79504),r=s(47055),i=s(48981),n=s(56969),c=s(26198),l=s(2360),d=s(35370),u=Array,h=a([].push);e.exports=function(e,t,s,a){for(var p,v,m,f=i(e),b=r(f),y=o(t,s),g=l(null),_=c(b),w=0;_>w;w++)m=b[w],(v=n(y(m,w,f)))in g?h(g[v],m):g[v]=[m];if(a&&(p=a(f))!==u)for(v in g)g[v]=d(p,g[v]);return g}},46058:function(e,t,s){var o=s(46518),a=s(77957),r=s(6469);o({target:"Array",proto:!0},{group:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),r("group")},13611:function(e,t,s){var o=s(46518),a=s(44576),r=s(62106),i=s(43724),n=TypeError,c=Object.defineProperty,l=a.self!==a;try{if(i){var d=Object.getOwnPropertyDescriptor(a,"self");!l&&d&&d.get&&d.enumerable||r(a,"self",{get:function(){return a},set:function(e){if(this!==a)throw new n("Illegal invocation");c(a,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else o({global:!0,simple:!0,forced:l},{self:a})}catch(u){}},31886:function(e,t,s){s.a(e,async function(e,o){try{s.d(t,{BB:function(){return a.B}});s(38744);var a=s(88775),r=s(49232),i=s(78713),n=s(53834),c=s(35204),l=s(5806),d=e([a,r,i,n,c,l]);[a,r,i,n,c,l]=d.then?(await d)():d,o()}catch(u){o(u)}})},31247:function(e,t,s){s.d(t,{v:function(){return o}});s(18111),s(22489),s(61701),s(42762);function o(e){return e.split(" ").map(e=>e.trim()).filter(e=>""!==e)}},4444:function(e,t,s){s.d(t,{JG:function(){return a},Rt:function(){return i},I7:function(){return r}});s(27495),s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698),s(25440),s(62953);const o=new Set;function a(e){if(o.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 r(e){o.delete(e),0===o.size&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function i(e,t,s="vertical",o="smooth"){const a=function(e,t){return{top:Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top),left:Math.round(e.getBoundingClientRect().left-t.getBoundingClientRect().left)}}(e,t),r=a.top+t.scrollTop,i=a.left+t.scrollLeft,n=t.scrollLeft,c=t.scrollLeft+t.offsetWidth,l=t.scrollTop,d=t.scrollTop+t.offsetHeight;"horizontal"!==s&&"both"!==s||(i<n?t.scrollTo({left:i,behavior:o}):i+e.clientWidth>c&&t.scrollTo({left:i-t.offsetWidth+e.clientWidth,behavior:o})),"vertical"!==s&&"both"!==s||(r<l?t.scrollTo({top:r,behavior:o}):r+e.clientHeight>d&&t.scrollTo({top:r-t.offsetHeight+e.clientHeight,behavior:o}))}},96229:function(e,t,s){s.d(t,{k:function(){return u}});s(62953);var o=s(40445),a=(s(73535),s(5124)),r=s(67576),i=s(99591);let n,c,l,d=e=>e;class u extends i.v{get primaryId(){return this.href?"link":"button"}get rippleDisabled(){return!this.href&&(this.disabled||this.softDisabled)}getContainerClasses(){return Object.assign(Object.assign({},super.getContainerClasses()),{},{disabled:!this.href&&(this.disabled||this.softDisabled),elevated:this.elevated,link:!!this.href})}renderPrimaryAction(e){const{ariaLabel:t}=this;return this.href?(0,a.qy)(n||(n=d` <a class="primary action" id="link" aria-label="${0}" href="${0}" download="${0}" target="${0}">${0}</a> `),t||a.s6,this.href,this.download||a.s6,this.target||a.s6,e):(0,a.qy)(c||(c=d` <button class="primary action" id="button" aria-label="${0}" aria-disabled="${0}" ?disabled="${0}" type="button">${0}</button> `),t||a.s6,this.softDisabled||a.s6,this.disabled&&!this.alwaysFocusable,e)}renderOutline(){return this.elevated?(0,a.qy)(l||(l=d`<md-elevation part="elevation"></md-elevation>`)):super.renderOutline()}constructor(){super(...arguments),this.elevated=!1,this.href="",this.download="",this.target=""}}(0,o.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"elevated",void 0),(0,o.Cg)([(0,r.MZ)()],u.prototype,"href",void 0),(0,o.Cg)([(0,r.MZ)()],u.prototype,"download",void 0),(0,o.Cg)([(0,r.MZ)()],u.prototype,"target",void 0)},26069:function(e,t,s){s.d(t,{R:function(){return a}});let o;const a=(0,s(5124).AH)(o||(o=(e=>e)`: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)}@media(forced-colors:active){.link .outline{border-color:ActiveText}}`))},89784:function(e,t,s){s.d(t,{W:function(){return n}});s(16280),s(74423),s(72712),s(18111),s(18237),s(27495),s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698),s(25440),s(62953);var o=s(5055),a=s(42017);const r="important",i=" !"+r,n=(0,a.u$)(class extends a.WL{render(e){return Object.keys(e).reduce((t,s)=>{const o=e[s];return null==o?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}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 o of this.ft)null==t[o]&&(this.ft.delete(o),o.includes("-")?s.removeProperty(o):s[o]=null);for(const o in t){const e=t[o];if(null!=e){this.ft.add(o);const t="string"==typeof e&&e.endsWith(i);o.includes("-")||t?s.setProperty(o,t?e.slice(0,-11):e,t?r:""):s[o]=e}}return o.c0}constructor(e){var t;if(super(e),e.type!==a.OA.ATTRIBUTE||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}})}}]);