UNPKG

iobroker.lovelace

Version:

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

2 lines 36.7 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[5830],{95830:function(e,r,t){"use strict";t.r(r);t(53918);var n=t(50424),o=t(55358);function i(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var n,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return a(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,r)}(e,r)||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 a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var s=t(11654);function l(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return c(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 i,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw i}}}}function c(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var u=function(e){if(6===(e=e.replace("#","")).length)return e;var r,t="",n=l(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;t+=o+o}}catch(i){n.e(i)}finally{n.f()}return t};function f(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var n,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return d(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,r)}(e,r)||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 d(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var p=function(e){var r=Math.round(Math.min(Math.max(e,0),255)).toString(16);return 1===r.length?"0".concat(r):r},h=function(e){return e=u(e),[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]},y=function(e){return"#".concat(p(e[0])).concat(p(e[1])).concat(p(e[2]))},m=.95047,v=1.08883,b=.137931034,g=.12841855,w=function(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},k=function(e){return e>.008856452?Math.pow(e,1/3):e/g+b},E=function(e){return 255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)},x=function(e){return e>.206896552?e*e*e:g*(e-b)},S=function(e){var r=function(e){var r=f(e,3),t=r[0],n=r[1],o=r[2];return t=w(t),n=w(n),o=w(o),[k((.4124564*t+.3575761*n+.1804375*o)/m),k((.2126729*t+.7151522*n+.072175*o)/1),k((.0193339*t+.119192*n+.9503041*o)/v)]}(e),t=f(r,3),n=t[0],o=t[1],i=116*o-16;return[i<0?0:i,500*(n-o),200*(o-t[2])]},O=function(e){var r=f(e,3),t=r[0],n=r[1],o=r[2],i=(t+16)/116,a=isNaN(n)?i:i+n/500,s=isNaN(o)?i:i-o/200;return i=1*x(i),a=m*x(a),s=v*x(s),[E(3.2404542*a-1.5371385*i-.4985314*s),E(-.969266*a+1.8760108*i+.041556*s),E(.0556434*a-.2040259*i+1.0572252*s)]},j=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return[e[0]-18*r,e[1],e[2]]},A=function(e){for(var r=[0,0,0],t=0;t<e.length;t++){var n=e[t]/255;r[t]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*r[0]+.7152*r[1]+.0722*r[2]},P=function(e,r){var t=A(e),n=A(r);return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)};function C(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var T,_,D,z,I={},F=function(e,r,t,n){var o,i,a,l,c=t,f={};if(n&&(n.dark&&(c="".concat(c,"__dark"),f=Object.assign({},s._l)),"default"===t)){var d,p=n.primaryColor,m=n.accentColor;if(n.dark&&p&&(f["app-header-background-color"]=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,n="";e=u(e),r=u(r);for(var o=0;o<=5;o+=2){for(var i=parseInt(e.substr(o,2),16),a=parseInt(r.substr(o,2),16),s=Math.floor(a+t/100*(i-a)).toString(16);s.length<2;)s="0"+s;n+=s}return"#".concat(n)}(p,"#121212",8)),p){c="".concat(c,"__primary_").concat(p);var v=h(p),b=S(v);f["primary-color"]=p;var g=O(function(e){return j(e,-(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1))}(b));f["light-primary-color"]=y(g),f["dark-primary-color"]=(a=j(b),l=O(a),y(l)),f["text-primary-color"]=P(v,[33,33,33])<6?"#fff":"#212121",f["text-light-primary-color"]=P(g,[33,33,33])<6?"#fff":"#212121",f["state-icon-color"]=f["dark-primary-color"]}if(m){c="".concat(c,"__accent_").concat(m),f["accent-color"]=m;var w=h(m);f["text-accent-color"]=P(w,[33,33,33])<6?"#fff":"#212121"}if((null===(d=e._themes)||void 0===d?void 0:d.cacheKey)===c)return}if(t&&"default"!==t&&r.themes[t]){var k=r.themes[t],E=k.modes,x=C(k,["modes"]);f=Object.assign({},f,x),E&&(f=null!=n&&n.dark?Object.assign({},f,E.dark):Object.assign({},f,E.light))}if(null!==(o=e._themes)&&void 0!==o&&o.keys||Object.keys(f).length){var A=f&&c?I[c]||M(c,f):void 0,T=Object.assign({},null===(i=e._themes)||void 0===i?void 0:i.keys,null==A?void 0:A.styles);e._themes={cacheKey:c,keys:null==A?void 0:A.keys},e.updateStyles?e.updateStyles(T):window.ShadyCSS&&window.ShadyCSS.styleSubtree(e,T)}},M=function(e,r){if(r&&Object.keys(r).length){for(var t=Object.assign({},s.q0,r),n={},o={},i=0,a=Object.keys(t);i<a.length;i++){var l=a[i],c="--".concat(l),u=String(t[l]);if(n[c]=u,o[c]="",u.startsWith("#")){var f="rgb-".concat(l);if(void 0===t[f])try{var d=h(u).join(","),p="--".concat(f);n[p]=d,o[p]=""}catch(y){continue}}}return I[e]={styles:n,keys:o},{styles:n,keys:o}}};function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}function U(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function $(e,r){return($=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function B(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=K(e);if(r){var o=K(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return q(this,t)}}function q(e,r){return!r||"object"!==R(r)&&"function"!=typeof r?H(e):r}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(){W=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach((function(t){r.forEach((function(r){r.kind===t&&"own"===r.placement&&this.defineClassElement(e,r)}),this)}),this)},initializeClassElements:function(e,r){var t=e.prototype;["method","field"].forEach((function(n){r.forEach((function(r){var o=r.placement;if(r.kind===n&&("static"===o||"prototype"===o)){var i="static"===o?e:t;this.defineClassElement(i,r)}}),this)}),this)},defineClassElement:function(e,r){var t=r.descriptor;if("field"===r.kind){var n=r.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,r.key,t)},decorateClass:function(e,r){var t=[],n=[],o={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,o)}),this),e.forEach((function(e){if(!G(e))return t.push(e);var r=this.decorateElement(e,o);t.push(r.element),t.push.apply(t,r.extras),n.push.apply(n,r.finishers)}),this),!r)return{elements:t,finishers:n};var i=this.decorateConstructor(t,r);return n.push.apply(n,i.finishers),i.finishers=n,i},addElementPlacement:function(e,r,t){var n=r[e.placement];if(!t&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,r){for(var t=[],n=[],o=e.decorators,i=o.length-1;i>=0;i--){var a=r[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,o[i])(s)||s);e=l.element,this.addElementPlacement(e,r),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u<c.length;u++)this.addElementPlacement(c[u],r);t.push.apply(t,c)}}return{element:e,finishers:n,extras:t}},decorateConstructor:function(e,r){for(var t=[],n=r.length-1;n>=0;n--){var o=this.fromClassDescriptor(e),i=this.toClassDescriptor((0,r[n])(o)||o);if(void 0!==i.finisher&&t.push(i.finisher),void 0!==i.elements){e=i.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:t}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){var r;if(void 0!==e)return(r=e,function(e){if(Array.isArray(e))return e}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,r){if(e){if("string"==typeof e)return Y(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(e,r):void 0}}(r)||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(e){var r=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),r}),this)},toElementDescriptor:function(e){var r=String(e.kind);if("method"!==r&&"field"!==r)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+r+'"');var t=X(e.key),n=String(e.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 o=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var i={kind:r,key:t,placement:n,descriptor:Object.assign({},o)};return"field"!==r?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),i.initializer=e.initializer),i},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:V(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toClassDescriptor:function(e){var r=String(e.kind);if("class"!==r)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var t=V(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,r){for(var t=0;t<r.length;t++){var n=(0,r[t])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,r,t){if(void 0!==e[r])throw new TypeError(t+" can't have a ."+r+" property.")}};return e}function L(e){var r,t=X(e.key);"method"===e.kind?r={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?r={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?r={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(r={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:r};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function Q(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.descriptor.get:r.descriptor.set=e.descriptor.set}function G(e){return e.decorators&&e.decorators.length}function J(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function V(e,r){var t=e[r];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+r+"' to be a function");return t}function X(e){var r=function(e,r){if("object"!==R(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===R(r)?r:String(r)}function Y(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}(function(e,r,t,n){var o=W();if(n)for(var i=0;i<n.length;i++)o=n[i](o);var a=r((function(e){o.initializeInstanceElements(e,s.elements)}),t),s=o.decorateClass(function(e){for(var r=[],t=function(e){return"method"===e.kind&&e.key===i.key&&e.placement===i.placement},n=0;n<e.length;n++){var o,i=e[n];if("method"===i.kind&&(o=r.find(t)))if(J(i.descriptor)||J(o.descriptor)){if(G(i)||G(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(G(i)){if(G(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}Q(i,o)}else r.push(i)}return r}(a.d.map(L)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)})([(0,o.Mo)("ha-card")],(function(e,r){return{F:function(r){!function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&$(e,r)}(n,r);var t=B(n);function n(){var r;U(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),e(H(r)),r}return n}(r),d:[{kind:"field",decorators:[(0,o.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,o.Cb)({type:Boolean,reflect:!0})],key:"outlined",value:function(){return!1}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(T||(T=N(["\n :host {\n background: var(\n --ha-card-background,\n var(--card-background-color, white)\n );\n border-radius: var(--ha-card-border-radius, 4px);\n box-shadow: var(\n --ha-card-box-shadow,\n 0px 2px 1px -1px rgba(0, 0, 0, 0.2),\n 0px 1px 1px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 3px 0px rgba(0, 0, 0, 0.12)\n );\n color: var(--primary-text-color);\n display: block;\n transition: all 0.3s ease-out;\n position: relative;\n }\n\n :host([outlined]) {\n box-shadow: none;\n border-width: var(--ha-card-border-width, 1px);\n border-style: solid;\n border-color: var(\n --ha-card-border-color,\n var(--divider-color, #e0e0e0)\n );\n }\n\n .card-header,\n :host ::slotted(.card-header) {\n color: var(--ha-card-header-color, --primary-text-color);\n font-family: var(--ha-card-header-font-family, inherit);\n font-size: var(--ha-card-header-font-size, 24px);\n letter-spacing: -0.012em;\n line-height: 48px;\n padding: 12px 16px 16px;\n display: block;\n margin-block-start: 0px;\n margin-block-end: 0px;\n font-weight: normal;\n }\n\n :host ::slotted(.card-content:not(:first-child)),\n slot:not(:first-child)::slotted(.card-content) {\n padding-top: 0px;\n margin-top: -8px;\n }\n\n :host ::slotted(.card-content) {\n padding: 16px;\n }\n\n :host ::slotted(.card-actions) {\n border-top: 1px solid var(--divider-color, #e8e8e8);\n padding: 5px 16px;\n }\n "])))}},{kind:"method",key:"render",value:function(){return(0,n.dy)(_||(_=N(["\n ","\n <slot></slot>\n "])),this.header?(0,n.dy)(D||(D=N(['<h1 class="card-header">',"</h1>"])),this.header):(0,n.dy)(z||(z=N([""]))))}}]}}),n.oi),t(43835),t(5618);function Z(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==t)return;var n,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return ee(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ee(e,r)}(e,r)||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 ee(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var re=document.createElement("template");re.setAttribute("style","display: none;"),re.innerHTML="<custom-style>\n <style>\n /*\n ioBroker default styles.\n\n In Polymer 2.0, default styles should to be set on the html selector.\n (Setting all default styles only on body breaks shadyCSS polyfill.)\n See: https://github.com/home-assistant/home-assistant-polymer/pull/901\n */\n html {\n font-size: 14px;\n height: 100vh;\n\n /* text */\n --primary-text-color: #212121;\n --secondary-text-color: #727272;\n --text-primary-color: #ffffff;\n --text-light-primary-color: #212121;\n --disabled-text-color: #bdbdbd;\n\n /* main interface colors */\n --primary-color: #03a9f4;\n --dark-primary-color: #0288d1;\n --light-primary-color: #b3e5fC;\n --accent-color: #ff9800;\n --divider-color: rgba(0, 0, 0, .12);\n\n --scrollbar-thumb-color: rgb(194, 194, 194);\n\n --error-color: #db4437;\n --warning-color: #FF9800;\n --success-color: #0f9d58;\n --info-color: #4285f4;\n\n /* states and badges */\n --state-icon-color: #44739e;\n --state-icon-active-color: #FDD835;\n\n /* background and sidebar */\n --card-background-color: #ffffff;\n --primary-background-color: #fafafa;\n --secondary-background-color: #e5e5e5; /* behind the cards on state */\n\n /* for header */\n --header-height: 56px;\n\n /* for label-badge */\n --label-badge-red: #DF4C1E;\n --label-badge-blue: #039be5;\n --label-badge-green: #0DA035;\n --label-badge-yellow: #f4b400;\n\n /*\n Paper-styles color.html dependency is stripped on build.\n When a default paper-style color is used, it needs to be copied\n from paper-styles/color.html to here.\n */\n\n --paper-grey-50: #fafafa; /* default for: --mwc-switch-unchecked-button-color */\n --paper-grey-200: #eeeeee; /* for ha-date-picker-style */\n --paper-grey-500: #9e9e9e; /* --label-badge-grey */\n\n /* for paper-slider */\n --paper-green-400: #66bb6a;\n --paper-blue-400: #42a5f5;\n --paper-orange-400: #ffa726;\n\n /* opacity for dark text on a light background */\n --dark-divider-opacity: 0.12;\n --dark-disabled-opacity: 0.38; /* or hint text or icon */\n --dark-secondary-opacity: 0.54;\n --dark-primary-opacity: 0.87;\n\n /* opacity for light text on a dark background */\n --light-divider-opacity: 0.12;\n --light-disabled-opacity: 0.3; /* or hint text or icon */\n --light-secondary-opacity: 0.7;\n --light-primary-opacity: 1.0;\n\n /* set our slider style */\n --ha-slider-pin-font-size: 15px;\n\n /* rgb */\n --rgb-primary-color: 3, 169, 244;\n --rgb-accent-color: 255, 152, 0;\n --rgb-primary-text-color: 33, 33, 33;\n --rgb-secondary-text-color: 114, 114, 114;\n --rgb-text-primary-color: 255, 255, 255;\n --rgb-card-background-color: 255, 255, 255;\n\n ".concat(Object.entries(s.q0).map((function(e){var r=Z(e,2),t=r[0],n=r[1];return"--".concat(t,": ").concat(n,";")})).join(""),"\n }\n\n /*\n prevent clipping of positioned elements in a small scrollable\n force smooth scrolling if can scroll\n use non-shady selectors so this only targets iOS 9\n conditional mixin set in ha-style-dialog does not work with shadyCSS\n */\n paper-dialog-scrollable:not(.can-scroll) > .scrollable {\n -webkit-overflow-scrolling: auto !important;\n }\n\n paper-dialog-scrollable.can-scroll > .scrollable {\n -webkit-overflow-scrolling: touch !important;\n }\n\n /* for paper-dialog */\n iron-overlay-backdrop {\n backdrop-filter: var(--dialog-backdrop-filter, none);\n }\n </style>\n</custom-style>"),document.head.appendChild(re.content);var te,ne;t(60010);function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}function ae(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function se(e,r){return(se=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e})(e,r)}function le(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=we(e);if(r){var o=we(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return ce(this,t)}}function ce(e,r){return!r||"object"!==oe(r)&&"function"!=typeof r?ue(e):r}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fe(){fe=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach((function(t){r.forEach((function(r){r.kind===t&&"own"===r.placement&&this.defineClassElement(e,r)}),this)}),this)},initializeClassElements:function(e,r){var t=e.prototype;["method","field"].forEach((function(n){r.forEach((function(r){var o=r.placement;if(r.kind===n&&("static"===o||"prototype"===o)){var i="static"===o?e:t;this.defineClassElement(i,r)}}),this)}),this)},defineClassElement:function(e,r){var t=r.descriptor;if("field"===r.kind){var n=r.initializer;t={enumerable:t.enumerable,writable:t.writable,configurable:t.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,r.key,t)},decorateClass:function(e,r){var t=[],n=[],o={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,o)}),this),e.forEach((function(e){if(!he(e))return t.push(e);var r=this.decorateElement(e,o);t.push(r.element),t.push.apply(t,r.extras),n.push.apply(n,r.finishers)}),this),!r)return{elements:t,finishers:n};var i=this.decorateConstructor(t,r);return n.push.apply(n,i.finishers),i.finishers=n,i},addElementPlacement:function(e,r,t){var n=r[e.placement];if(!t&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,r){for(var t=[],n=[],o=e.decorators,i=o.length-1;i>=0;i--){var a=r[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,o[i])(s)||s);e=l.element,this.addElementPlacement(e,r),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var u=0;u<c.length;u++)this.addElementPlacement(c[u],r);t.push.apply(t,c)}}return{element:e,finishers:n,extras:t}},decorateConstructor:function(e,r){for(var t=[],n=r.length-1;n>=0;n--){var o=this.fromClassDescriptor(e),i=this.toClassDescriptor((0,r[n])(o)||o);if(void 0!==i.finisher&&t.push(i.finisher),void 0!==i.elements){e=i.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:t}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){var r;if(void 0!==e)return(r=e,function(e){if(Array.isArray(e))return e}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,r){if(e){if("string"==typeof e)return be(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?be(e,r):void 0}}(r)||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(e){var r=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),r}),this)},toElementDescriptor:function(e){var r=String(e.kind);if("method"!==r&&"field"!==r)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+r+'"');var t=ve(e.key),n=String(e.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 o=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var i={kind:r,key:t,placement:n,descriptor:Object.assign({},o)};return"field"!==r?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),i.initializer=e.initializer),i},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:me(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toClassDescriptor:function(e){var r=String(e.kind);if("class"!==r)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var t=me(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:t}},runClassFinishers:function(e,r){for(var t=0;t<r.length;t++){var n=(0,r[t])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,r,t){if(void 0!==e[r])throw new TypeError(t+" can't have a ."+r+" property.")}};return e}function de(e){var r,t=ve(e.key);"method"===e.kind?r={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?r={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?r={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(r={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:t,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:r};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function pe(e,r){void 0!==e.descriptor.get?r.descriptor.get=e.descriptor.get:r.descriptor.set=e.descriptor.set}function he(e){return e.decorators&&e.decorators.length}function ye(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function me(e,r){var t=e[r];if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected '"+r+"' to be a function");return t}function ve(e){var r=function(e,r){if("object"!==oe(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!==oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===oe(r)?r:String(r)}function be(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function ge(e,r,t){return(ge="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,r,t){var n=function(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&null!==(e=we(e)););return e}(e,r);if(n){var o=Object.getOwnPropertyDescriptor(n,r);return o.get?o.get.call(t):o.value}})(e,r,t||e)}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,r,t,n){var o=fe();if(n)for(var i=0;i<n.length;i++)o=n[i](o);var a=r((function(e){o.initializeInstanceElements(e,s.elements)}),t),s=o.decorateClass(function(e){for(var r=[],t=function(e){return"method"===e.kind&&e.key===i.key&&e.placement===i.placement},n=0;n<e.length;n++){var o,i=e[n];if("method"===i.kind&&(o=r.find(t)))if(ye(i.descriptor)||ye(o.descriptor)){if(he(i)||he(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(he(i)){if(he(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}pe(i,o)}else r.push(i)}return r}(a.d.map(de)),e);o.initializeClassElements(a.F,s.elements),o.runClassFinishers(a.F,s.finishers)}([(0,o.Mo)("supervisor-error-screen")],(function(e,r){var t=function(r){!function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&se(e,r)}(n,r);var t=le(n);function n(){var r;ae(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),e(ue(r)),r}return n}(r);return{F:t,d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){ge(we(t.prototype),"firstUpdated",this).call(this,e),this._applyTheme()}},{kind:"method",key:"updated",value:function(e){ge(we(t.prototype),"updated",this).call(this,e);var r=e.get("hass");r&&r.themes!==this.hass.themes&&this._applyTheme()}},{kind:"method",key:"render",value:function(){return(0,n.dy)(te||(te=ie(["\n <hass-subpage\n .hass=","\n .header=",'\n >\n <ha-card header="Troubleshooting">\n <div class="card-content">\n <ol>\n <li>','</li>\n <li>\n <a\n class="supervisor_error-link"\n href="http://homeassistant.local:4357"\n target="_blank"\n rel="noreferrer"\n >\n ',"\n </a>\n </li>\n <li>",'</li>\n <li>\n <a href="/config/info" target="_parent">\n ','\n </a>\n </li>\n <li>\n <a\n href="https://embed.windy.com/embed2.html?lat=32.487&lon=-84.023&zoom=5&level=surface&overlay=rain&menu=&message=&marker=&calendar=&pressure=&type=map&location=coordinates&detail=&detailLat=32.487&detailLon=--84.023&metricWind=default&metricTemp=default&radarRange=-1/help/"\n target="_blank"\n rel="noreferrer"\n >\n ',"\n </a>\n </li>\n </ol>\n </div>\n </ha-card>\n </hass-subpage>\n "])),this.hass,this.hass.localize("ui.errors.supervisor.title"),this.hass.localize("ui.errors.supervisor.wait"),this.hass.localize("ui.errors.supervisor.observer"),this.hass.localize("ui.errors.supervisor.reboot"),this.hass.localize("ui.errors.supervisor.system_health"),this.hass.localize("ui.errors.supervisor.ask"))}},{kind:"method",key:"_applyTheme",value:function(){var e,r,t,n,o,a,s,l,c,u,f,d;(o=this.hass.config.version,a=0,s=114,c=i(o.split(".",3),3),u=c[0],f=c[1],d=c[2],Number(u)>a||Number(u)===a&&(void 0===l?Number(f)>=s:Number(f)>s)||void 0!==l&&Number(u)===a&&Number(f)===s&&Number(d)>=l)?(e=(null===(t=this.hass.selectedTheme)||void 0===t?void 0:t.theme)||(this.hass.themes.darkMode&&this.hass.themes.default_dark_theme?this.hass.themes.default_dark_theme:this.hass.themes.default_theme),r=this.hass.selectedTheme,"default"===e&&void 0===(null===(n=r)||void 0===n?void 0:n.dark)&&(r=Object.assign({},this.hass.selectedTheme,{dark:this.hass.themes.darkMode}))):e=this.hass.selectedTheme||this.hass.themes.default_theme;F(this.parentElement,this.hass.themes,e,r)}},{kind:"get",static:!0,key:"styles",value:function(){return[s.Qx,(0,n.iv)(ne||(ne=ie(["\n a {\n color: var(--mdc-theme-primary);\n }\n\n ha-card {\n width: 600px;\n margin: auto;\n padding: 8px;\n }\n @media all and (max-width: 500px) {\n ha-card {\n width: calc(100vw - 32px);\n }\n }\n "])))]}}]}}),n.oi)}}]); //# sourceMappingURL=chunk.974aa619e6dc8b92ff9b.js.map