UNPKG

iobroker.lovelace

Version:

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

2 lines 16.8 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[38],{15838:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(s){i=!0,o=s}finally{try{n||null==c.return||c.return()}finally{if(i)throw o}}return r}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{wK:function(){return s},CO:function(){return u},Rw:function(){return b},p3:function(){return w},uO:function(){return g}});var a=function(t){var e,r="",n=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return c=t.done,t},e:function(t){s=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(s)throw a}}}}(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r+=o+o}}catch(a){n.e(a)}finally{n.f()}return r},c=function(t){var e=Math.round(Math.min(Math.max(t,0),255)).toString(16);return 1===e.length?"0".concat(e):e},s=function(t){return 3!==(t=t.replace("#","")).length&&4!==t.length||(t=a(t)),[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]},u=function(t){return"#".concat(c(t[0])).concat(c(t[1])).concat(c(t[2]))},l=.95047,f=1.08883,d=.137931034,p=.12841855,h=function(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},y=function(t){return t>.008856452?Math.pow(t,1/3):t/p+d},m=function(t){return 255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055)},v=function(t){return t>.206896552?t*t*t:p*(t-d)},b=function(t){var e=function(t){var e=n(t,3),r=e[0],i=e[1],o=e[2];return r=h(r),i=h(i),o=h(o),[y((.4124564*r+.3575761*i+.1804375*o)/l),y((.2126729*r+.7151522*i+.072175*o)/1),y((.0193339*r+.119192*i+.9503041*o)/f)]}(t),r=n(e,3),i=r[0],o=r[1],a=116*o-16;return[a<0?0:a,500*(i-o),200*(o-r[2])]},w=function(t){var e=n(t,3),r=e[0],i=e[1],o=e[2],a=(r+16)/116,c=isNaN(i)?a:a+i/500,s=isNaN(o)?a:a-o/200;return a=1*v(a),c=l*v(c),s=f*v(s),[m(3.2404542*c-1.5371385*a-.4985314*s),m(-.969266*c+1.8760108*a+.041556*s),m(.0556434*c-.2040259*a+1.0572252*s)]},g=function(t){var e=w(t);return u(e)}},89525:function(t,e,r){"use strict";r.d(e,{W:function(){return n},C:function(){return i}});var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return[t[0]-18*e,t[1],t[2]]},i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return n(t,-e)}},74790:function(t,e,r){"use strict";r.d(e,{f:function(){return i}});var n=function(t){for(var e=[0,0,0],r=0;r<t.length;r++){var n=t[r]/255;e[r]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},i=function(t,e){var r=n(t),i=n(e);return r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)}},62877:function(t,e,r){"use strict";r.d(e,{R:function(){return s},p:function(){return l}});var n=r(11654),i=r(15838),o=r(89525),a=r(74790),c={},s=function(t,e,r,s){var l=r,f={};if("default"===r&&s){if(s.dark&&(l="".concat(l,"__dark"),f=n._l),s.primaryColor){l="".concat(l,"__primary_").concat(s.primaryColor);var d=(0,i.wK)(s.primaryColor),p=(0,i.Rw)(d);f["primary-color"]=s.primaryColor;var h=(0,i.p3)((0,o.C)(p));f["light-primary-color"]=(0,i.CO)(h),f["dark-primary-color"]=(0,i.uO)((0,o.W)(p)),f["text-primary-color"]=(0,a.f)(d,[33,33,33])<6?"#fff":"#212121",f["text-light-primary-color"]=(0,a.f)(h,[33,33,33])<6?"#fff":"#212121",f["state-icon-color"]=f["dark-primary-color"]}if(s.accentColor){l="".concat(l,"__accent_").concat(s.accentColor),f["accent-color"]=s.accentColor;var y=(0,i.wK)(s.accentColor);f["text-accent-color"]=(0,a.f)(y,[33,33,33])<6?"#fff":"#212121"}}if(r&&e.themes[r]&&(f=e.themes[r]),t._themes||Object.keys(f).length){var m=f&&l?c[l]||u(l,f):void 0,v=Object.assign({},t._themes,null==m?void 0:m.styles);t._themes=null==m?void 0:m.keys,t.updateStyles?t.updateStyles(v):window.ShadyCSS&&window.ShadyCSS.styleSubtree(t,v)}},u=function(t,e){if(e&&Object.keys(e).length){for(var r=Object.assign({},n.q0,e),o={},a={},s=0,u=Object.keys(r);s<u.length;s++){var l=u[s],f="--".concat(l),d=String(r[l]);if(o[f]=d,a[f]="",d.startsWith("#")){var p="rgb-".concat(l);if(void 0===r[p])try{var h=(0,i.wK)(d).join(","),y="--".concat(p);o[y]=h,a[y]=""}catch(m){continue}}}return c[t]={styles:o,keys:a},{styles:o,keys:a}}},l=function(){c={}}},58831:function(t,e,r){"use strict";r.d(e,{M:function(){return n}});var n=function(t){return t.substr(0,t.indexOf("."))}},38346:function(t,e,r){"use strict";r.d(e,{D:function(){return n}});var n=function(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var c=this,s=function(){r=null,n||t.apply(c,o)},u=n&&!r;clearTimeout(r),r=setTimeout(s,e),u&&t.apply(c,o)}}},52039:function(t,e,r){"use strict";r.d(e,{C:function(){return S}});var n=r(15652);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){var t=s(["\n :host {\n display: var(--ha-icon-display, inline-flex);\n align-items: center;\n justify-content: center;\n position: relative;\n vertical-align: middle;\n fill: currentcolor;\n width: var(--mdc-icon-size, 24px);\n height: var(--mdc-icon-size, 24px);\n }\n svg {\n width: 100%;\n height: 100%;\n pointer-events: none;\n display: block;\n }\n "]);return o=function(){return t},t}function a(){var t=s(["<path d=","></path>"]);return a=function(){return t},t}function c(){var t=s(["\n <svg \n viewBox=",'\n preserveAspectRatio="xMidYMid meet"\n focusable="false">\n <g>\n ',"\n </g>\n </svg>"]);return c=function(){return t},t}function s(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var i=h(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(){y=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(r){e.forEach((function(e){e.kind===r&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var r=t.prototype;["method","field"].forEach((function(n){e.forEach((function(e){var i=e.placement;if(e.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?t:r;this.defineClassElement(o,e)}}),this)}),this)},defineClassElement:function(t,e){var r=e.descriptor;if("field"===e.kind){var n=e.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(t)}}Object.defineProperty(t,e.key,r)},decorateClass:function(t,e){var r=[],n=[],i={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,i)}),this),t.forEach((function(t){if(!b(t))return r.push(t);var e=this.decorateElement(t,i);r.push(e.element),r.push.apply(r,e.extras),n.push.apply(n,e.finishers)}),this),!e)return{elements:r,finishers:n};var o=this.decorateConstructor(r,e);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(t,e,r){var n=e[t.placement];if(!r&&-1!==n.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");n.push(t.key)},decorateElement:function(t,e){for(var r=[],n=[],i=t.decorators,o=i.length-1;o>=0;o--){var a=e[t.placement];a.splice(a.indexOf(t.key),1);var c=this.fromElementDescriptor(t),s=this.toElementFinisherExtras((0,i[o])(c)||c);t=s.element,this.addElementPlacement(t,e),s.finisher&&n.push(s.finisher);var u=s.extras;if(u){for(var l=0;l<u.length;l++)this.addElementPlacement(u[l],e);r.push.apply(r,u)}}return{element:t,finishers:n,extras:r}},decorateConstructor:function(t,e){for(var r=[],n=e.length-1;n>=0;n--){var i=this.fromClassDescriptor(t),o=this.toClassDescriptor((0,e[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){t=o.elements;for(var a=0;a<t.length-1;a++)for(var c=a+1;c<t.length;c++)if(t[a].key===t[c].key&&t[a].placement===t[c].placement)throw new TypeError("Duplicated element ("+t[a].key+")")}}return{elements:t,finishers:r}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var r=k(t.key),n=String(t.placement);if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var o={kind:e,key:r,placement:n,descriptor:Object.assign({},i)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=t.initializer),o},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:g(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var r=g(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:r}},runClassFinishers:function(t,e){for(var r=0;r<e.length;r++){var n=(0,e[r])(t);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");t=n}}return t},disallowProperty:function(t,e,r){if(void 0!==t[e])throw new TypeError(r+" can't have a ."+e+" property.")}};return t}function m(t){var e,r=k(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===t.kind?"field":"method",key:r,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(n.decorators=t.decorators),"field"===t.kind&&(n.initializer=t.value),n}function v(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function b(t){return t.decorators&&t.decorators.length}function w(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function g(t,e){var r=t[e];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+e+"' to be a function");return r}function k(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var S=function(t,e,r,n){var i=y();if(n)for(var o=0;o<n.length;o++)i=n[o](i);var a=e((function(t){i.initializeInstanceElements(t,c.elements)}),r),c=i.decorateClass(function(t){for(var e=[],r=function(t){return"method"===t.kind&&t.key===o.key&&t.placement===o.placement},n=0;n<t.length;n++){var i,o=t[n];if("method"===o.kind&&(i=e.find(r)))if(w(o.descriptor)||w(i.descriptor)){if(b(o)||b(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(b(o)){if(b(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}v(o,i)}else e.push(o)}return e}(a.d.map(m)),t);return i.initializeClassElements(a.F,c.elements),i.runClassFinishers(a.F,c.finishers)}([(0,n.Mo)("ha-svg-icon")],(function(t,e){return{F:function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(n,e);var r=f(n);function n(){var e;u(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return e=r.call.apply(r,[this].concat(o)),t(p(e)),e}return n}(e),d:[{kind:"field",decorators:[(0,n.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,n.YP)(c(),this.viewBox||"0 0 24 24",this.path?(0,n.YP)(a(),this.path):"")}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(o())}}]}}),n.oi)},62359:function(t,e,r){"use strict";r.d(e,{j:function(){return i}});var n=r(47181),i=function(t){(0,n.B)(window,"haptic",t)}},81796:function(t,e,r){"use strict";r.d(e,{C:function(){return i}});var n=r(47181),i=function(t,e){return(0,n.B)(t,"hass-notification",e)}}}]); //# sourceMappingURL=chunk.58d453fdbd52c34ea857.js.map