iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 6.19 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[67218],{38744:function(){Symbol.for("constructDateFrom")},88775:function(t,e,n){n.a(t,async function(t,o){try{n.d(e,{B:function(){return a}});n(62953);var i=n(5806),s=n(49232),r=t([s,i]);[s,i]=r.then?(await r)():r;class a extends s.q{static tz(t,...e){return e.length?new a(...e,t):new a(Date.now(),t)}toISOString(){const[t,e,n]=this.tzComponents(),o=`${t}${e}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,n,o]=this.internal.toUTCString().split(" ");return`${null==t?void 0:t.slice(0,-1)} ${n} ${e} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,n,o]=this.tzComponents();return`${t} GMT${e}${n}${o} (${(0,i.K)(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,Object.assign(Object.assign({},e),{},{timeZone:(null==e?void 0:e.timeZone)||this.timeZone}))}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,Object.assign(Object.assign({},e),{},{timeZone:(null==e?void 0:e.timeZone)||this.timeZone}))}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,Object.assign(Object.assign({},e),{},{timeZone:(null==e?void 0:e.timeZone)||this.timeZone}))}tzComponents(){const t=this.getTimezoneOffset();return[t>0?"-":"+",String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),String(Math.abs(t)%60).padStart(2,"0")]}withTimeZone(t){return new a(+this,t)}[Symbol.for("constructDateFrom")](t){return new a(+new Date(t),this.timeZone)}}o()}catch(a){o(a)}})},49232:function(t,e,n){n.a(t,async function(t,o){try{n.d(e,{q:function(){return a}});n(18111),n(7588),n(27495),n(25440),n(62953);var i=n(53834),s=t([i]);i=(s.then?(await s)():s)[0];class a extends Date{static tz(t,...e){return e.length?new a(...e,t):new a(Date.now(),t)}withTimeZone(t){return new a(+this,t)}getTimezoneOffset(){const t=-(0,i.Y)(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),l(this),+this}[Symbol.for("constructDateFrom")](t){return new a(+new Date(t),this.timeZone)}constructor(...t){super(),t.length>1&&"string"==typeof t[t.length-1]&&(this.timeZone=t.pop()),this.internal=new Date,isNaN((0,i.Y)(this.timeZone,this))?this.setTime(NaN):t.length?"number"==typeof t[0]&&(1===t.length||2===t.length&&"number"!=typeof t[1])?this.setTime(t[0]):"string"==typeof t[0]?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),h(this,t)):this.setTime(Date.now())}}const c=/^(get|set)(?!UTC)/;function l(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(60*-(0,i.Y)(t.timeZone,t)))}function u(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),h(t)}function h(t,e){const n=Array.isArray(e)?(o=e,Date.UTC(o[0],o.length>1?o[1]:0,o.length>2?o[2]:1,...o.slice(3))):+t.internal;var o;const s=(0,i.Y)(t.timeZone,t),r=s>0?Math.floor(s):Math.ceil(s),a=new Date(+t);a.setUTCHours(a.getUTCHours()-1);const c=-new Date(+t).getTimezoneOffset(),u=-new Date(+a).getTimezoneOffset();let h=c;if(c-u&&c!==r){if(Date.prototype.getHours.apply(t)!==(Array.isArray(e)?e[3]||0:t.internal.getUTCHours())){const e=new Date(+t),n=c-r;n&&e.setUTCMinutes(e.getUTCMinutes()+n);const o=(0,i.Y)(t.timeZone,e);(o>0?Math.floor(o):Math.ceil(o))===r&&(h=u)}}const m=h-r;m&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+m);const f=new Date(+t);f.setUTCSeconds(0);const g=c>0?f.getSeconds():(f.getSeconds()-60)%60,T=Math.round(-60*(0,i.Y)(t.timeZone,t))%60;(T||g)&&Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+T+g);const y=(0,i.Y)(t.timeZone,t),D=y>0?Math.floor(y):Math.ceil(y),S=D!==r,C=-new Date(+t).getTimezoneOffset()-D-m,w=D-r,d=n-60*D*1e3,U=w>0&&p(t)-n===60*w*1e3&&p(t,d)!==n;if(S&&C&&!U){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+C);const e=(0,i.Y)(t.timeZone,t),n=D-(e>0?Math.floor(e):Math.ceil(e));n&&C<0&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+n)}l(t);const M=(e?n:n+1e3*T)-+t.internal;M&&Math.abs(M)<18e5&&(Date.prototype.setTime.call(t,+t+M),l(t))}function p(t,e){const n=new Date(null!=e?e:+t);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(60*-(0,i.Y)(t.timeZone,n))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!c.test(t))return;const e=t.replace(c,"$1UTC");a.prototype[e]&&(t.startsWith("get")?a.prototype[t]=function(){return this.internal[e]()}:(a.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),u(this),+this},a.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),l(this),+this}))}),o()}catch(r){o(r)}})},78713:function(t,e,n){n.a(t,async function(t,e){try{var o=n(88775),i=t([o]);o=(i.then?(await i)():i)[0];e()}catch(s){e(s)}})},5806:function(t,e,n){n.a(t,async function(t,o){try{n.d(e,{K:function(){return a}});var i=n(74487),s=(n(27495),t([i]));function a(t,e,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:n}).format(e).split(/\s/g).slice(2).join(" ")}i=(s.then?(await s)():s)[0],o()}catch(r){o(r)}})},53834:function(t,e,n){n.a(t,async function(t,o){try{n.d(e,{Y:function(){return l}});n(27495);var i=n(74487),s=t([i]);i=(s.then?(await s)():s)[0];const a={},c={};function l(t,e){try{const n=(a[t]||(a[t]=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format))(e).split("GMT")[1];return n in c?c[n]:h(n,n.split(":"))}catch(n){if(t in c)return c[t];const e=null==t?void 0:t.match(u);return e?h(t,e.slice(1)):NaN}}const u=/([+-]\d\d):?(\d\d)?/;function h(t,e){const n=+(e[0]||0),o=+(e[1]||0),i=+(e[2]||0)/60;return c[t]=60*n+o>0?60*n+o+i:60*n-o-i}o()}catch(r){o(r)}})},35204:function(t,e,n){n.a(t,async function(t,e){try{n(44114);var o=n(53834),i=t([o]);o=(i.then?(await i)():i)[0],e()}catch(s){e(s)}})}}]);