UNPKG

iobroker.lovelace

Version:

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

3 lines 11.5 kB
/*! For license information please see 6900.3f21837681bb99a3.js.LICENSE.txt */ export const __webpack_ids__=["6900"];export const __webpack_modules__={12582:function(e,t,a){a.d(t,{Z:()=>s});a(9359),a(31526),a(70104);function s(e){if(!e||"object"!=typeof e)return e;if("[object Date]"==Object.prototype.toString.call(e))return new Date(e.getTime());if(Array.isArray(e))return e.map(s);var t={};return Object.keys(e).forEach((function(a){t[a]=s(e[a])})),t}},18672:function(e,t,a){a.d(t,{Z:()=>r});a(92519),a(42179),a(89256),a(24931),a(88463),a(57449),a(19814);var s=a(11133);class r{constructor(e,{target:t,config:a,callback:r,skipInitial:i}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,null!==t&&this.t.add(t??e),this.l=a,this.o=i??this.o,this.callback=r,s.s||(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."))}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()}}},10445:function(e,t,a){a.d(t,{X:()=>h});var s=a(9065),r=a(15093),i=(a(54835),a(57243)),o=a(4077);class n extends o.A{constructor(){super(...arguments),this.elevated=!1,this.href="",this.target=""}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?i.dy` <a class="primary action" id="link" aria-label="${t||i.Ld}" href="${this.href}" target="${this.target||i.Ld}">${e}</a> `:i.dy` <button class="primary action" id="button" aria-label="${t||i.Ld}" aria-disabled="${this.softDisabled||i.Ld}" ?disabled="${this.disabled&&!this.alwaysFocusable}" type="button">${e}</button> `}renderOutline(){return this.elevated?i.dy`<md-elevation part="elevation"></md-elevation>`:super.renderOutline()}}(0,s.__decorate)([(0,r.Cb)({type:Boolean})],n.prototype,"elevated",void 0),(0,s.__decorate)([(0,r.Cb)()],n.prototype,"href",void 0),(0,s.__decorate)([(0,r.Cb)()],n.prototype,"target",void 0);const c=i.iv`: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}}`;var l=a(29126),d=a(21016);let h=class extends n{};h.styles=[d.W,l.W,c],h=(0,s.__decorate)([(0,r.Mo)("md-assist-chip")],h)},75351:function(e,t,a){a.d(t,{Ud:()=>p});a(9359),a(70104),a(48136);const s=Symbol("Comlink.proxy"),r=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),o=Symbol("Comlink.finalizer"),n=Symbol("Comlink.thrown"),c=e=>"object"==typeof e&&null!==e||"function"==typeof e,l=new Map([["proxy",{canHandle:e=>c(e)&&e[s],serialize(e){const{port1:t,port2:a}=new MessageChannel;return d(e,t),[a,[a]]},deserialize:e=>(e.start(),p(e))}],["throw",{canHandle:e=>c(e)&&n in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function d(e,t=globalThis,a=["*"]){t.addEventListener("message",(function r(i){if(!i||!i.data)return;if(!function(e,t){for(const a of e){if(t===a||"*"===a)return!0;if(a instanceof RegExp&&a.test(t))return!0}return!1}(a,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:c,type:l,path:p}=Object.assign({path:[]},i.data),v=(i.data.argumentList||[]).map(w);let u;try{const t=p.slice(0,-1).reduce(((e,t)=>e[t]),e),a=p.reduce(((e,t)=>e[t]),e);switch(l){case"GET":u=a;break;case"SET":t[p.slice(-1)[0]]=w(i.data.value),u=!0;break;case"APPLY":u=a.apply(t,v);break;case"CONSTRUCT":u=function(e){return Object.assign(e,{[s]:!0})}(new a(...v));break;case"ENDPOINT":{const{port1:t,port2:a}=new MessageChannel;d(e,a),u=function(e,t){return g.set(e,t),e}(t,[t])}break;case"RELEASE":u=void 0;break;default:return}}catch(e){u={value:e,[n]:0}}Promise.resolve(u).catch((e=>({value:e,[n]:0}))).then((a=>{const[s,i]=_(a);t.postMessage(Object.assign(Object.assign({},s),{id:c}),i),"RELEASE"===l&&(t.removeEventListener("message",r),h(t),o in e&&"function"==typeof e[o]&&e[o]())})).catch((e=>{const[a,s]=_({value:new TypeError("Unserializable return value"),[n]:0});t.postMessage(Object.assign(Object.assign({},a),{id:c}),s)}))})),t.start&&t.start()}function h(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function p(e,t){const a=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const s=a.get(t.id);if(s)try{s(t)}finally{a.delete(t.id)}})),y(e,a,[],t)}function v(e){if(e)throw new Error("Proxy has been released and is not useable")}function u(e){return x(e,new Map,{type:"RELEASE"}).then((()=>{h(e)}))}const m=new WeakMap,b="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(m.get(e)||0)-1;m.set(e,t),0===t&&u(e)}));function y(e,t,a=[],s=function(){}){let o=!1;const n=new Proxy(s,{get(s,r){if(v(o),r===i)return()=>{!function(e){b&&b.unregister(e)}(n),u(e),t.clear(),o=!0};if("then"===r){if(0===a.length)return{then:()=>n};const s=x(e,t,{type:"GET",path:a.map((e=>e.toString()))}).then(w);return s.then.bind(s)}return y(e,t,[...a,r])},set(s,r,i){v(o);const[n,c]=_(i);return x(e,t,{type:"SET",path:[...a,r].map((e=>e.toString())),value:n},c).then(w)},apply(s,i,n){v(o);const c=a[a.length-1];if(c===r)return x(e,t,{type:"ENDPOINT"}).then(w);if("bind"===c)return y(e,t,a.slice(0,-1));const[l,d]=f(n);return x(e,t,{type:"APPLY",path:a.map((e=>e.toString())),argumentList:l},d).then(w)},construct(s,r){v(o);const[i,n]=f(r);return x(e,t,{type:"CONSTRUCT",path:a.map((e=>e.toString())),argumentList:i},n).then(w)}});return function(e,t){const a=(m.get(t)||0)+1;m.set(t,a),b&&b.register(e,t,e)}(n,e),n}function f(e){const t=e.map(_);return[t.map((e=>e[0])),(a=t.map((e=>e[1])),Array.prototype.concat.apply([],a))];var a}const g=new WeakMap;function _(e){for(const[t,a]of l)if(a.canHandle(e)){const[s,r]=a.serialize(e);return[{type:"HANDLER",name:t,value:s},r]}return[{type:"RAW",value:e},g.get(e)||[]]}function w(e){switch(e.type){case"HANDLER":return l.get(e.name).deserialize(e.value);case"RAW":return e.value}}function x(e,t,a,s){return new Promise((r=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(i,r),e.start&&e.start(),e.postMessage(Object.assign({id:i},a),s)}))}}}; //# sourceMappingURL=6900.3f21837681bb99a3.js.map