UNPKG

iobroker.lovelace

Version:

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

2 lines 24.5 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7016],{68928:function(t,e,r){"use strict";r.d(e,{WU:function(){return M}});var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[1-9]\\d?",i="\\d\\d",a="[^\\s]+",u=/\[([^]*?)\]/gm;function c(t,e){for(var r=[],n=0,o=t.length;n<o;n++)r.push(t[n].substr(0,e));return r}var s=function(t){return function(e,r){var n=r[t].map((function(t){return t.toLowerCase()})).indexOf(e.toLowerCase());return n>-1?n:null}};function l(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var n=0,o=e;n<o.length;n++){var i=o[n];for(var a in i)t[a]=i[a]}return t}var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],p=c(d,3),m={dayNamesShort:c(f,3),dayNames:f,monthNamesShort:p,monthNames:d,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},h=l({},m),y=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},v={D:function(t){return String(t.getDate())},DD:function(t){return y(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return y(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return y(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return y(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return y(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return y(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return y(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return y(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return y(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return y(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return y(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+y(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+y(Math.floor(Math.abs(e)/60),2)+":"+y(Math.abs(e)%60,2)}},b=function(t){return+t-1},g=[null,o],w=[null,a],D=["isPm",a,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],k=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var r=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?r:-r}return 0}],S=(s("monthNamesShort"),s("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"}),M=function(t,e,r){if(void 0===e&&(e=S.default),void 0===r&&(r={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var o=[];e=(e=S[e]||e).replace(u,(function(t,e){return o.push(e),"@@@"}));var i=l(l({},h),r);return(e=e.replace(n,(function(e){return v[e](t,i)}))).replace(/@@@/g,(function(){return o.shift()}))}},43274:function(t,e,r){"use strict";r.d(e,{Sb:function(){return n},BF:function(){return o},Op:function(){return i}});var n=function(){try{(new Date).toLocaleDateString("i")}catch(t){return"RangeError"===t.name}return!1}(),o=function(){try{(new Date).toLocaleTimeString("i")}catch(t){return"RangeError"===t.name}return!1}(),i=function(){try{(new Date).toLocaleString("i")}catch(t){return"RangeError"===t.name}return!1}()},12198:function(t,e,r){"use strict";r.d(e,{p:function(){return o}});var n=r(68928),o=r(43274).Sb?function(t,e){return t.toLocaleDateString(e,{year:"numeric",month:"long",day:"numeric"})}:function(t){return(0,n.WU)(t,"longDate")}},44583:function(t,e,r){"use strict";r.d(e,{o:function(){return i},E:function(){return a}});var n=r(68928),o=r(43274),i=o.Op?function(t,e){return t.toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}:function(t){return(0,n.WU)(t,"MMMM D, YYYY, HH:mm")},a=o.Op?function(t,e){return t.toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}:function(t){return(0,n.WU)(t,"MMMM D, YYYY, HH:mm:ss")}},49684:function(t,e,r){"use strict";r.d(e,{m:function(){return i},V:function(){return a}});var n=r(68928),o=r(43274),i=o.BF?function(t,e){return t.toLocaleTimeString(e,{hour:"numeric",minute:"2-digit"})}:function(t){return(0,n.WU)(t,"shortTime")},a=o.BF?function(t,e){return t.toLocaleTimeString(e,{hour:"numeric",minute:"2-digit",second:"2-digit"})}:function(t){return(0,n.WU)(t,"mediumTime")}},5435:function(t,e,r){"use strict";r.d(e,{Z:function(){return i}});var n=[60,60,24,7],o=["second","minute","hour","day"];function i(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.compareTime||new Date,a=(i.getTime()-t.getTime())/1e3,u=a>=0?"past":"future";a=Math.abs(a);var c=Math.round(a);if(0===c)return e("ui.components.relative_time.just_now");for(var s="week",l=0;l<n.length;l++){if(c<n[l]){s=o[l];break}a/=n[l],c=Math.round(a)}return e(!1===r.includeTense?"ui.components.relative_time.duration.".concat(s):"ui.components.relative_time.".concat(u,"_duration.").concat(s),"count",c)}},29171:function(t,e,r){"use strict";r.d(e,{D:function(){return c}});var n=r(56007),o=r(12198),i=r(44583),a=r(49684),u=r(22311),c=function(t,e,r,c){var s=void 0!==c?c:e.state;if(s===n.lz||s===n.nZ)return t("state.default.".concat(s));if(e.attributes.unit_of_measurement)return"".concat(s," ").concat(e.attributes.unit_of_measurement);var l=(0,u.N)(e);if("input_datetime"===l){var f;if(!e.attributes.has_time)return f=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day),(0,o.p)(f,r);if(!e.attributes.has_date){var d=new Date;return f=new Date(d.getFullYear(),d.getMonth(),d.getDay(),e.attributes.hour,e.attributes.minute),(0,a.m)(f,r)}return f=new Date(e.attributes.year,e.attributes.month-1,e.attributes.day,e.attributes.hour,e.attributes.minute),(0,i.o)(f,r)}return"humidifier"===l&&"on"===s&&e.attributes.humidity?"".concat(e.attributes.humidity,"%"):e.attributes.device_class&&t("component.".concat(l,".state.").concat(e.attributes.device_class,".").concat(s))||t("component.".concat(l,".state._.").concat(s))||s}},22311:function(t,e,r){"use strict";r.d(e,{N:function(){return o}});var n=r(58831),o=function(t){return(0,n.M)(t.entity_id)}},22098:function(t,e,r){"use strict";var n=r(15652);function o(t){return(o="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 i(){var t=s([""]);return i=function(){return t},t}function a(){var t=s(['<h1 class="card-header">',"</h1>"]);return a=function(){return t},t}function u(){var t=s(["\n ","\n <slot></slot>\n "]);return u=function(){return t},t}function c(){var t=s(["\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 "]);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 l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(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 o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?m(t):e}function m(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 o=e.placement;if(e.kind===n&&("static"===o||"prototype"===o)){var i="static"===o?t:r;this.defineClassElement(i,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=[],o={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,o)}),this),t.forEach((function(t){if(!g(t))return r.push(t);var e=this.decorateElement(t,o);r.push(e.element),r.push.apply(r,e.extras),n.push.apply(n,e.finishers)}),this),!e)return{elements:r,finishers:n};var i=this.decorateConstructor(r,e);return n.push.apply(n,i.finishers),i.finishers=n,i},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=[],o=t.decorators,i=o.length-1;i>=0;i--){var a=e[t.placement];a.splice(a.indexOf(t.key),1);var u=this.fromElementDescriptor(t),c=this.toElementFinisherExtras((0,o[i])(u)||u);t=c.element,this.addElementPlacement(t,e),c.finisher&&n.push(c.finisher);var s=c.extras;if(s){for(var l=0;l<s.length;l++)this.addElementPlacement(s[l],e);r.push.apply(r,s)}}return{element:t,finishers:n,extras:r}},decorateConstructor:function(t,e){for(var r=[],n=e.length-1;n>=0;n--){var o=this.fromClassDescriptor(t),i=this.toClassDescriptor((0,e[n])(o)||o);if(void 0!==i.finisher&&r.push(i.finisher),void 0!==i.elements){t=i.elements;for(var a=0;a<t.length-1;a++)for(var u=a+1;u<t.length;u++)if(t[a].key===t[u].key&&t[a].placement===t[u].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 S(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)?S(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 o=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var i={kind:e,key:r,placement:n,descriptor:Object.assign({},o)};return"field"!==e?this.disallowProperty(t,"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=t.initializer),i},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:D(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=D(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 v(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 b(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function g(t){return t.decorators&&t.decorators.length}function w(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function D(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"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}function S(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}!function(t,e,r,n){var o=y();if(n)for(var i=0;i<n.length;i++)o=n[i](o);var a=e((function(t){o.initializeInstanceElements(t,u.elements)}),r),u=o.decorateClass(function(t){for(var e=[],r=function(t){return"method"===t.kind&&t.key===i.key&&t.placement===i.placement},n=0;n<t.length;n++){var o,i=t[n];if("method"===i.kind&&(o=e.find(r)))if(w(i.descriptor)||w(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}b(i,o)}else e.push(i)}return e}(a.d.map(v)),t);o.initializeClassElements(a.F,u.elements),o.runClassFinishers(a.F,u.finishers)}([(0,n.Mo)("ha-card")],(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&&f(t,e)}(n,e);var r=d(n);function n(){var e;l(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r.call.apply(r,[this].concat(i)),t(m(e)),e}return n}(e),d:[{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"outlined",value:function(){return!1}},{kind:"get",static:!0,key:"styles",value:function(){return(0,n.iv)(c())}},{kind:"method",key:"render",value:function(){return(0,n.dy)(u(),this.header?(0,n.dy)(a(),this.header):(0,n.dy)(i()))}}]}}),n.oi)},32075:function(t,e,r){"use strict";var n=r(87156),o=r(28426),i=r(5435);function a(t){return(a="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 u(t,e,r){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}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=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){return!e||"object"!==a(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 m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!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)}(r,t);var e=f(r);function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=e.call(this)).updateRelative=t.updateRelative.bind(p(t)),t}return s(r,null,[{key:"properties",get:function(){return{hass:Object,datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:Object}}}]),s(r,[{key:"connectedCallback",value:function(){u(m(r.prototype),"connectedCallback",this).call(this),this.updateInterval=setInterval(this.updateRelative,6e4)}},{key:"disconnectedCallback",value:function(){u(m(r.prototype),"disconnectedCallback",this).call(this),clearInterval(this.updateInterval)}},{key:"datetimeChanged",value:function(t){this.parsedDateTime=t?new Date(t):null,this.updateRelative()}},{key:"datetimeObjChanged",value:function(t){this.parsedDateTime=t,this.updateRelative()}},{key:"updateRelative",value:function(){var t=(0,n.vz)(this);this.parsedDateTime?t.innerHTML=(0,i.Z)(this.parsedDateTime,this.localize):t.innerHTML=this.localize("ui.components.relative_time.never")}}]),r}((0,r(1265).Z)(o.H3));customElements.define("ha-relative-time",h)},56007:function(t,e,r){"use strict";r.d(e,{nZ:function(){return n},lz:function(){return o},V_:function(){return i},B8:function(){return a}});var n="unavailable",o="unknown",i=[n,o],a=["air_quality","alarm_control_panel","alert","automation","binary_sensor","calendar","camera","counter","cover","dominos","fan","geo_location","group","image_processing","input_boolean","input_datetime","input_number","input_select","input_text","light","lock","mailbox","media_player","person","plant","remember_the_milk","remote","scene","script","sensor","switch","timer","utility_meter","vacuum","weather","wink","zha","zwave"]},1265:function(t,e,r){"use strict";var n=r(76389);function o(t){return(o="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 i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(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=l(t);if(e){var o=l(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}e.Z=(0,n.o)((function(t){return function(t){!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&&u(t,e)}(s,t);var e,r,n,o=c(s);function s(){return i(this,s),o.apply(this,arguments)}return e=s,n=[{key:"properties",get:function(){return{hass:Object,localize:{type:Function,computed:"__computeLocalize(hass.localize)"}}}}],(r=[{key:"__computeLocalize",value:function(t){return t}}])&&a(e.prototype,r),n&&a(e,n),s}(t)}))}}]); //# sourceMappingURL=chunk.fc5471b77c7e52a06457.js.map