From e629bb0d68137a39f4a68fbdea515f0977e79732 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sun, 2 Jul 2023 13:43:45 +0200 Subject: [PATCH] Configurable buffer size and patch of GUI dependencies --- .../include/AmsConfiguration.h | 3 +- lib/AmsConfiguration/src/AmsConfiguration.cpp | 3 + lib/SvelteUi/app/dist/index.js | 18 +- lib/SvelteUi/app/package-lock.json | 1328 +++++++++-------- .../app/src/lib/ConfigurationPanel.svelte | 20 +- lib/SvelteUi/app/vite.config.js | 24 +- lib/SvelteUi/json/conf_meter.json | 1 + lib/SvelteUi/src/AmsWebServer.cpp | 1 + src/AmsToMqttBridge.cpp | 34 +- src/AmsToMqttBridge.h | 1 - 10 files changed, 812 insertions(+), 621 deletions(-) diff --git a/lib/AmsConfiguration/include/AmsConfiguration.h b/lib/AmsConfiguration/include/AmsConfiguration.h index c022507d..00f1f469 100644 --- a/lib/AmsConfiguration/include/AmsConfiguration.h +++ b/lib/AmsConfiguration/include/AmsConfiguration.h @@ -84,7 +84,8 @@ struct MeterConfig { uint32_t accumulatedMultiplier; uint8_t source; uint8_t parser; -}; // 61 + uint8_t bufferSize; +}; // 62 struct MeterConfig100 { uint32_t baud; diff --git a/lib/AmsConfiguration/src/AmsConfiguration.cpp b/lib/AmsConfiguration/src/AmsConfiguration.cpp index b07347a5..9752b009 100644 --- a/lib/AmsConfiguration/src/AmsConfiguration.cpp +++ b/lib/AmsConfiguration/src/AmsConfiguration.cpp @@ -213,6 +213,7 @@ bool AmsConfiguration::getMeterConfig(MeterConfig& config) { EEPROM.begin(EEPROM_SIZE); EEPROM.get(CONFIG_METER_START, config); EEPROM.end(); + if(config.bufferSize < 1 || config.bufferSize > 64) config.bufferSize = 4; return true; } else { clearMeter(config); @@ -231,6 +232,7 @@ bool AmsConfiguration::setMeterConfig(MeterConfig& config) { meterChanged |= config.productionCapacity != existing.productionCapacity; meterChanged |= strcmp((char*) config.encryptionKey, (char*) existing.encryptionKey); meterChanged |= strcmp((char*) config.authenticationKey, (char*) existing.authenticationKey); + meterChanged |= config.bufferSize != existing.bufferSize; } else { meterChanged = true; } @@ -256,6 +258,7 @@ void AmsConfiguration::clearMeter(MeterConfig& config) { config.accumulatedMultiplier = 0; config.source = 1; // Serial config.parser = 0; // Auto + config.bufferSize = 1; // 64 bytes } bool AmsConfiguration::isMeterChanged() { diff --git a/lib/SvelteUi/app/dist/index.js b/lib/SvelteUi/app/dist/index.js index 2e77306f..f7a6deaa 100644 --- a/lib/SvelteUi/app/dist/index.js +++ b/lib/SvelteUi/app/dist/index.js @@ -1,14 +1,14 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=l(i);fetch(i.href,o)}})();function ne(){}function Xt(t,e){for(const l in e)t[l]=e[l];return t}function qf(t){return t()}function $r(){return Object.create(null)}function Ve(t){t.forEach(qf)}function to(t){return typeof t=="function"}function ke(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let us;function Rc(t,e){return us||(us=document.createElement("a")),us.href=e,t===us.href}function Lc(t){return Object.keys(t).length===0}function lo(t,...e){if(t==null)return ne;const l=t.subscribe(...e);return l.unsubscribe?()=>l.unsubscribe():l}function si(t){let e;return lo(t,l=>e=l)(),e}function il(t,e,l){t.$$.on_destroy.push(lo(e,l))}function no(t,e,l,n){if(t){const i=Hf(t,e,l,n);return t[0](i)}}function Hf(t,e,l,n){return t[1]&&n?Xt(l.ctx.slice(),t[1](n(e))):l.ctx}function io(t,e,l,n){if(t[2]&&n){const i=t[2](n(l));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],r=Math.max(e.dirty.length,i.length);for(let a=0;a32){const e=[],l=t.ctx.length/32;for(let n=0;nt.removeEventListener(e,l,n)}function bs(t){return function(e){return e.preventDefault(),t.call(this,e)}}function u(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}function oi(t,e){const l=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:l[n]&&l[n].set?t[n]=e[n]:u(t,n,e[n])}function ae(t){return t===""?null:+t}function Uc(t){return Array.from(t.childNodes)}function B(t,e){e=""+e,t.data!==e&&(t.data=e)}function qc(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Hc(t,e,l){~Oc.indexOf(l)?qc(t,e):B(t,e)}function V(t,e){t.value=e??""}function jf(t,e,l,n){l===null?t.style.removeProperty(e):t.style.setProperty(e,l,n?"important":"")}function Re(t,e,l){for(let n=0;n{r.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{o=K(n.contentWindow,"resize",e),e()}),s(t,n),()=>{(i||o&&n.contentWindow)&&o(),w(n)}}function Gc(t,e,{bubbles:l=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,l,n,e),i}function Cr(t,e){return new t(e)}let yi;function ki(t){yi=t}function $i(){if(!yi)throw new Error("Function called outside component initialization");return yi}function Bc(t){$i().$$.on_mount.push(t)}function Yc(t){$i().$$.on_destroy.push(t)}function zc(){const t=$i();return(e,l,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){const o=Gc(e,l,{cancelable:n});return i.slice().forEach(r=>{r.call(t,o)}),!o.defaultPrevented}return!0}}function wi(t,e){return $i().$$.context.set(t,e),e}function Il(t){return $i().$$.context.get(t)}const ti=[],_s=[];let li=[];const Tr=[],Wf=Promise.resolve();let Gs=!1;function Gf(){Gs||(Gs=!0,Wf.then(Bf))}function Vc(){return Gf(),Wf}function tt(t){li.push(t)}const Os=new Set;let xn=0;function Bf(){if(xn!==0)return;const t=yi;do{try{for(;xnt.indexOf(n)===-1?e.push(n):l.push(n)),l.forEach(n=>n()),li=e}const cs=new Set;let en;function Te(){en={r:0,c:[],p:en}}function Se(){en.r||Ve(en.c),en=en.p}function N(t,e){t&&t.i&&(cs.delete(t),t.i(e))}function D(t,e,l,n){if(t&&t.o){if(cs.has(t))return;cs.add(t),en.c.push(()=>{cs.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}else n&&n()}function Yf(t,e){const l={},n={},i={$$scope:1};let o=t.length;for(;o--;){const r=t[o],a=e[o];if(a){for(const f in r)f in a||(n[f]=1);for(const f in a)i[f]||(l[f]=a[f],i[f]=1);t[o]=a}else for(const f in r)i[f]=1}for(const r in n)r in l||(l[r]=void 0);return l}function Sr(t){return typeof t=="object"&&t!==null?t:{}}function J(t){t&&t.c()}function X(t,e,l,n){const{fragment:i,after_update:o}=t.$$;i&&i.m(e,l),n||tt(()=>{const r=t.$$.on_mount.map(qf).filter(to);t.$$.on_destroy?t.$$.on_destroy.push(...r):Ve(r),t.$$.on_mount=[]}),o.forEach(tt)}function Z(t,e){const l=t.$$;l.fragment!==null&&(Qc(l.after_update),Ve(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function Xc(t,e){t.$$.dirty[0]===-1&&(ti.push(t),Gf(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const v=d.length?d[0]:b;return c.ctx&&i(c.ctx[_],c.ctx[_]=v)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](v),p&&Xc(t,_)),b}):[],c.update(),p=!0,Ve(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const _=Uc(e.target);c.fragment&&c.fragment.l(_),_.forEach(w)}else c.fragment&&c.fragment.c();e.intro&&N(t.$$.fragment),X(t,e.target,e.anchor,e.customElement),Bf()}ki(f)}class $e{$destroy(){Z(this,1),this.$destroy=ne}$on(e,l){if(!to(l))return ne;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Lc(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Pr=t=>typeof t>"u",zf=t=>typeof t=="function",Vf=t=>typeof t=="number";function Zc(t){return!t.defaultPrevented&&t.button===0&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Kf(){let t=0;return()=>t++}function Jc(){return Math.random().toString(36).substring(2)}const Fl=typeof window>"u";function Qf(t,e,l){return t.addEventListener(e,l),()=>t.removeEventListener(e,l)}const Xf=(t,e)=>t?{}:{style:e},Bs=t=>({"aria-hidden":"true",...Xf(t,"display:none;")}),ei=[];function Zf(t,e){return{subscribe:ut(t,e).subscribe}}function ut(t,e=ne){let l;const n=new Set;function i(a){if(ke(t,a)&&(t=a,l)){const f=!ei.length;for(const c of n)c[1](),ei.push(c,t);if(f){for(let c=0;c{n.delete(c),n.size===0&&l&&(l(),l=null)}}return{set:i,update:o,subscribe:r}}function xc(t,e,l){const n=!Array.isArray(t),i=n?[t]:t,o=e.length<2;return Zf(l,r=>{let a=!1;const f=[];let c=0,p=ne;const _=()=>{if(c)return;p();const d=e(n?f[0]:f,r);o?r(d):p=to(d)?d:ne},b=i.map((d,v)=>lo(d,g=>{f[v]=g,c&=~(1<{c|=1<`@@svnav-ctx__${t}`,Ys=Ci("LOCATION"),ui=Ci("ROUTER"),Jf=Ci("ROUTE"),e1=Ci("ROUTE_PARAMS"),t1=Ci("FOCUS_ELEM"),xf=/^:(.+)/,gi=(t,e,l)=>t.substr(e,l),zs=(t,e)=>gi(t,0,e.length)===e,l1=t=>t==="",n1=t=>xf.test(t),ec=t=>t[0]==="*",i1=t=>t.replace(/\*.*$/,""),tc=t=>t.replace(/(^\/+|\/+$)/g,"");function rl(t,e=!1){const l=tc(t).split("/");return e?l.filter(Boolean):l}const Us=(t,e)=>t+(e?`?${e}`:""),uo=t=>`/${tc(t)}`;function Ti(...t){const e=n=>rl(n,!0).join("/"),l=t.map(e).join("/");return uo(l)}const ro=1,gs=2,sn=3,s1=4,lc=5,o1=6,nc=7,u1=8,r1=9,ic=10,sc=11,a1={[ro]:"Link",[gs]:"Route",[sn]:"Router",[s1]:"useFocus",[lc]:"useLocation",[o1]:"useMatch",[nc]:"useNavigate",[u1]:"useParams",[r1]:"useResolvable",[ic]:"useResolve",[sc]:"navigate"},ao=t=>a1[t];function f1(t,e){let l;return t===gs?l=e.path?`path="${e.path}"`:"default":t===ro?l=`to="${e.to}"`:t===sn&&(l=`basepath="${e.basepath||""}"`),`<${ao(t)} ${l||""} />`}function c1(t,e,l,n){const i=l&&f1(n||t,l),o=i?` +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=l(i);fetch(i.href,o)}})();function ne(){}function Jt(t,e){for(const l in e)t[l]=e[l];return t}function Yf(t){return t()}function Ar(){return Object.create(null)}function Ke(t){t.forEach(Yf)}function oo(t){return typeof t=="function"}function ke(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let cs;function Gc(t,e){return cs||(cs=document.createElement("a")),cs.href=e,t===cs.href}function Bc(t){return Object.keys(t).length===0}function uo(t,...e){if(t==null)return ne;const l=t.subscribe(...e);return l.unsubscribe?()=>l.unsubscribe():l}function si(t){let e;return uo(t,l=>e=l)(),e}function ul(t,e,l){t.$$.on_destroy.push(uo(e,l))}function ro(t,e,l,n){if(t){const i=Vf(t,e,l,n);return t[0](i)}}function Vf(t,e,l,n){return t[1]&&n?Jt(l.ctx.slice(),t[1](n(e))):l.ctx}function ao(t,e,l,n){if(t[2]&&n){const i=t[2](n(l));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],r=Math.max(e.dirty.length,i.length);for(let a=0;a32){const e=[],l=t.ctx.length/32;for(let n=0;nt.removeEventListener(e,l,n)}function ys(t){return function(e){return e.preventDefault(),t.call(this,e)}}function u(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}const Yc=["width","height"];function oi(t,e){const l=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in e)e[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=e[n]:n==="__value"?t.value=t[n]=e[n]:l[n]&&l[n].set&&Yc.indexOf(n)===-1?t[n]=e[n]:u(t,n,e[n])}function ae(t){return t===""?null:+t}function Vc(t){return Array.from(t.childNodes)}function B(t,e){e=""+e,t.data!==e&&(t.data=e)}function Kc(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Qc(t,e,l){~zc.indexOf(l)?Kc(t,e):B(t,e)}function V(t,e){t.value=e==null?"":e}function Kf(t,e,l,n){l==null?t.style.removeProperty(e):t.style.setProperty(e,l,n?"important":"")}function De(t,e,l){for(let n=0;n{r.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{o=K(n.contentWindow,"resize",e),e()}),s(t,n),()=>{(i||o&&n.contentWindow)&&o(),w(n)}}function Jc(t,e,{bubbles:l=!1,cancelable:n=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,l,n,e),i}function Dr(t,e){return new t(e)}let $i;function wi(t){$i=t}function Ci(){if(!$i)throw new Error("Function called outside component initialization");return $i}function xc(t){Ci().$$.on_mount.push(t)}function e1(t){Ci().$$.on_destroy.push(t)}function t1(){const t=Ci();return(e,l,{cancelable:n=!1}={})=>{const i=t.$$.callbacks[e];if(i){const o=Jc(e,l,{cancelable:n});return i.slice().forEach(r=>{r.call(t,o)}),!o.defaultPrevented}return!0}}function yi(t,e){return Ci().$$.context.set(t,e),e}function Rl(t){return Ci().$$.context.get(t)}const ti=[],bs=[];let li=[];const Er=[],Qf=Promise.resolve();let Ks=!1;function Xf(){Ks||(Ks=!0,Qf.then(Zf))}function l1(){return Xf(),Qf}function Qe(t){li.push(t)}const Ws=new Set;let xn=0;function Zf(){if(xn!==0)return;const t=$i;do{try{for(;xnt.indexOf(n)===-1?e.push(n):l.push(n)),l.forEach(n=>n()),li=e}const ds=new Set;let tn;function Se(){tn={r:0,c:[],p:tn}}function Pe(){tn.r||Ke(tn.c),tn=tn.p}function M(t,e){t&&t.i&&(ds.delete(t),t.i(e))}function D(t,e,l,n){if(t&&t.o){if(ds.has(t))return;ds.add(t),tn.c.push(()=>{ds.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}else n&&n()}function Jf(t,e){const l={},n={},i={$$scope:1};let o=t.length;for(;o--;){const r=t[o],a=e[o];if(a){for(const f in r)f in a||(n[f]=1);for(const f in a)i[f]||(l[f]=a[f],i[f]=1);t[o]=a}else for(const f in r)i[f]=1}for(const r in n)r in l||(l[r]=void 0);return l}function Ir(t){return typeof t=="object"&&t!==null?t:{}}function J(t){t&&t.c()}function X(t,e,l,n){const{fragment:i,after_update:o}=t.$$;i&&i.m(e,l),n||Qe(()=>{const r=t.$$.on_mount.map(Yf).filter(oo);t.$$.on_destroy?t.$$.on_destroy.push(...r):Ke(r),t.$$.on_mount=[]}),o.forEach(Qe)}function Z(t,e){const l=t.$$;l.fragment!==null&&(i1(l.after_update),Ke(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function s1(t,e){t.$$.dirty[0]===-1&&(ti.push(t),Xf(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const v=d.length?d[0]:b;return c.ctx&&i(c.ctx[_],c.ctx[_]=v)&&(!c.skip_bound&&c.bound[_]&&c.bound[_](v),p&&s1(t,_)),b}):[],c.update(),p=!0,Ke(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const _=Vc(e.target);c.fragment&&c.fragment.l(_),_.forEach(w)}else c.fragment&&c.fragment.c();e.intro&&M(t.$$.fragment),X(t,e.target,e.anchor,e.customElement),Zf()}wi(f)}class $e{$destroy(){Z(this,1),this.$destroy=ne}$on(e,l){if(!oo(l))return ne;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Bc(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Fr=t=>typeof t>"u",xf=t=>typeof t=="function",ec=t=>typeof t=="number";function o1(t){return!t.defaultPrevented&&t.button===0&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function tc(){let t=0;return()=>t++}function u1(){return Math.random().toString(36).substring(2)}const Ll=typeof window>"u";function lc(t,e,l){return t.addEventListener(e,l),()=>t.removeEventListener(e,l)}const nc=(t,e)=>t?{}:{style:e},Qs=t=>({"aria-hidden":"true",...nc(t,"display:none;")}),ei=[];function ic(t,e){return{subscribe:rt(t,e).subscribe}}function rt(t,e=ne){let l;const n=new Set;function i(a){if(ke(t,a)&&(t=a,l)){const f=!ei.length;for(const c of n)c[1](),ei.push(c,t);if(f){for(let c=0;c{n.delete(c),n.size===0&&l&&(l(),l=null)}}return{set:i,update:o,subscribe:r}}function r1(t,e,l){const n=!Array.isArray(t),i=n?[t]:t,o=e.length<2;return ic(l,r=>{let a=!1;const f=[];let c=0,p=ne;const _=()=>{if(c)return;p();const d=e(n?f[0]:f,r);o?r(d):p=oo(d)?d:ne},b=i.map((d,v)=>uo(d,g=>{f[v]=g,c&=~(1<{c|=1<`@@svnav-ctx__${t}`,Xs=Ti("LOCATION"),ui=Ti("ROUTER"),sc=Ti("ROUTE"),a1=Ti("ROUTE_PARAMS"),f1=Ti("FOCUS_ELEM"),oc=/^:(.+)/,ki=(t,e,l)=>t.substr(e,l),Zs=(t,e)=>ki(t,0,e.length)===e,c1=t=>t==="",m1=t=>oc.test(t),uc=t=>t[0]==="*",p1=t=>t.replace(/\*.*$/,""),rc=t=>t.replace(/(^\/+|\/+$)/g,"");function fl(t,e=!1){const l=rc(t).split("/");return e?l.filter(Boolean):l}const Gs=(t,e)=>t+(e?`?${e}`:""),mo=t=>`/${rc(t)}`;function Si(...t){const e=n=>fl(n,!0).join("/"),l=t.map(e).join("/");return mo(l)}const po=1,$s=2,on=3,_1=4,ac=5,d1=6,fc=7,v1=8,h1=9,cc=10,mc=11,b1={[po]:"Link",[$s]:"Route",[on]:"Router",[_1]:"useFocus",[ac]:"useLocation",[d1]:"useMatch",[fc]:"useNavigate",[v1]:"useParams",[h1]:"useResolvable",[cc]:"useResolve",[mc]:"navigate"},_o=t=>b1[t];function g1(t,e){let l;return t===$s?l=e.path?`path="${e.path}"`:"default":t===po?l=`to="${e.to}"`:t===on&&(l=`basepath="${e.basepath||""}"`),`<${_o(t)} ${l||""} />`}function k1(t,e,l,n){const i=l&&g1(n||t,l),o=i?` -Occurred in: ${i}`:"",r=ao(t),a=zf(e)?e(r):e;return`<${r}> ${a}${o}`}const oc=t=>(...e)=>t(c1(...e)),uc=oc(t=>{throw new Error(t)}),ds=oc(console.warn),Nr=4,m1=3,p1=2,_1=1,d1=1;function v1(t,e){const l=t.default?0:rl(t.fullPath).reduce((n,i)=>{let o=n;return o+=Nr,l1(i)?o+=d1:n1(i)?o+=p1:ec(i)?o-=Nr+_1:o+=m1,o},0);return{route:t,score:l,index:e}}function h1(t){return t.map(v1).sort((e,l)=>e.scorel.score?-1:e.index-l.index)}function rc(t,e){let l,n;const[i]=e.split("?"),o=rl(i),r=o[0]==="",a=h1(t);for(let f=0,c=a.length;f({...p,params:b,uri:C});if(p.default){n=d(e);continue}const v=rl(p.fullPath),g=Math.max(o.length,v.length);let k=0;for(;k{c===".."?f.pop():c!=="."&&f.push(c)}),Us(`/${f.join("/")}`,n)}function Mr(t,e){const{pathname:l,hash:n="",search:i="",state:o}=t,r=rl(e,!0),a=rl(l,!0);for(;r.length;)r[0]!==a[0]&&uc(sn,`Invalid state: All locations must begin with the basepath "${e}", found "${l}"`),r.shift(),a.shift();return{pathname:Ti(...a),hash:n,search:i,state:o}}const Ar=t=>t.length===1?"":t,fo=t=>{const e=t.indexOf("?"),l=t.indexOf("#"),n=e!==-1,i=l!==-1,o=i?Ar(gi(t,l)):"",r=i?gi(t,0,l):t,a=n?Ar(gi(r,e)):"";return{pathname:(n?gi(r,0,e):r)||"/",search:a,hash:o}},g1=t=>{const{pathname:e,search:l,hash:n}=t;return e+l+n};function k1(t,e,l){return Ti(l,b1(t,e))}function w1(t,e){const l=uo(i1(t)),n=rl(l,!0),i=rl(e,!0).slice(0,n.length),o=ac({fullPath:l},Ti(...i));return o&&o.uri}const qs="POP",y1="PUSH",$1="REPLACE";function Hs(t){return{...t.location,pathname:encodeURI(decodeURI(t.location.pathname)),state:t.history.state,_key:t.history.state&&t.history.state._key||"initial"}}function C1(t){let e=[],l=Hs(t),n=qs;const i=(o=e)=>o.forEach(r=>r({location:l,action:n}));return{get location(){return l},listen(o){e.push(o);const r=()=>{l=Hs(t),n=qs,i([o])};i([o]);const a=Qf(t,"popstate",r);return()=>{a(),e=e.filter(f=>f!==o)}},navigate(o,r){const{state:a={},replace:f=!1}=r||{};if(n=f?$1:y1,Vf(o))r&&ds(sc,"Navigation options (state or replace) are not supported, when passing a number as the first argument to navigate. They are ignored."),n=qs,t.history.go(o);else{const c={...a,_key:Jc()};try{t.history[f?"replaceState":"pushState"](c,"",o)}catch{t.location[f?"replace":"assign"](o)}}l=Hs(t),i()}}}function js(t,e){return{...fo(e),state:t}}function T1(t="/"){let e=0,l=[js(null,t)];return{get entries(){return l},get location(){return l[e]},addEventListener(){},removeEventListener(){},history:{get state(){return l[e].state},pushState(n,i,o){e++,l=l.slice(0,e),l.push(js(n,o))},replaceState(n,i,o){l[e]=js(n,o)},go(n){const i=e+n;i<0||i>l.length-1||(e=i)}}}}const S1=!!(!Fl&&window.document&&window.document.createElement),P1=!Fl&&window.location.origin==="null",fc=C1(S1&&!P1?window:T1()),{navigate:ni}=fc;let yl=null,cc=!0;function N1(t,e){const l=document.querySelectorAll("[data-svnav-router]");for(let n=0;nyl.level||t.level===yl.level&&N1(t.routerId,yl.routerId))&&(yl=t)}function A1(){yl=null}function D1(){cc=!1}function Dr(t){if(!t)return!1;const e="tabindex";try{if(!t.hasAttribute(e)){t.setAttribute(e,"-1");let l;l=Qf(t,"blur",()=>{t.removeAttribute(e),l()})}return t.focus(),document.activeElement===t}catch{return!1}}function E1(t,e){return Number(t.dataset.svnavRouteEnd)===e}function I1(t){return/^H[1-6]$/i.test(t.tagName)}function Er(t,e=document){return e.querySelector(t)}function F1(t){let l=Er(`[data-svnav-route-start="${t}"]`).nextElementSibling;for(;!E1(l,t);){if(I1(l))return l;const n=Er("h1,h2,h3,h4,h5,h6",l);if(n)return n;l=l.nextElementSibling}return null}function R1(t){Promise.resolve(si(t.focusElement)).then(e=>{const l=e||F1(t.id);l||ds(sn,`Could not find an element to focus. You should always render a header for accessibility reasons, or set a custom focus element via the "useFocus" hook. If you don't want this Route or Router to manage focus, pass "primary={false}" to it.`,t,gs),!Dr(l)&&Dr(document.documentElement)})}const L1=(t,e,l)=>(n,i)=>Vc().then(()=>{if(!yl||cc){D1();return}if(n&&R1(yl.route),t.announcements&&i){const{path:o,fullPath:r,meta:a,params:f,uri:c}=yl.route,p=t.createAnnouncement({path:o,fullPath:r,meta:a,params:f,uri:c},si(l));Promise.resolve(p).then(_=>{e.set(_)})}A1()}),O1="position:fixed;top:-1px;left:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;";function U1(t){let e,l,n=[{role:"status"},{"aria-atomic":"true"},{"aria-live":"polite"},{"data-svnav-announcer":""},Xf(t[6],O1)],i={};for(let o=0;o`Navigated to ${le.uri}`,announcements:!0,...v},C=p,T=uo(p),P=Il(Ys),E=Il(ui),S=!P,M=H1(),I=d&&!(E&&!E.manageFocus),F=ut("");il(t,F,le=>l(0,a=le));const z=E?E.disableInlineStyles:g,O=ut([]);il(t,O,le=>l(20,r=le));const R=ut(null);il(t,R,le=>l(18,i=le));let q=!1;const Y=S?0:E.level+1,H=S?ut((()=>Mr(Fl?fo(_):b.location,T))()):P;il(t,H,le=>l(17,n=le));const G=ut(n);il(t,G,le=>l(19,o=le));const L=L1(k,F,H),W=le=>de=>de.filter(ie=>ie.id!==le);function j(le){if(Fl){if(q)return;const de=ac(le,n.pathname);if(de)return q=!0,de}else O.update(de=>{const ie=W(le.id)(de);return ie.push(le),ie})}function ee(le){O.update(W(le))}return!S&&p!==Ir&&ds(sn,'Only top-level Routers can have a "basepath" prop. It is ignored.',{basepath:p}),S&&(Bc(()=>b.listen(de=>{const ie=Mr(de.location,T);G.set(n),H.set(ie)})),wi(Ys,H)),wi(ui,{activeRoute:R,registerRoute:j,unregisterRoute:ee,manageFocus:I,level:Y,id:M,history:S?b:E.history,basepath:S?T:E.basepath,disableInlineStyles:z}),t.$$set=le=>{"basepath"in le&&l(11,p=le.basepath),"url"in le&&l(12,_=le.url),"history"in le&&l(13,b=le.history),"primary"in le&&l(14,d=le.primary),"a11y"in le&&l(15,v=le.a11y),"disableInlineStyles"in le&&l(16,g=le.disableInlineStyles),"$$scope"in le&&l(21,c=le.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&2048&&p!==C&&ds(sn,'You cannot change the "basepath" prop. It is ignored.'),t.$$.dirty[0]&1179648){const le=rc(r,n.pathname);R.set(le)}if(t.$$.dirty[0]&655360&&S){const le=!!n.hash,de=!le&&I,ie=!le||n.pathname!==o.pathname;L(de,ie)}t.$$.dirty[0]&262144&&I&&i&&i.primary&&M1({level:Y,routerId:M,route:i})},[a,k,S,M,I,F,z,O,R,H,G,p,_,b,d,v,g,n,i,o,r,c,f]}class W1 extends $e{constructor(e){super(),ye(this,e,j1,q1,ke,{basepath:11,url:12,history:13,primary:14,a11y:15,disableInlineStyles:16},null,[-1,-1])}}const mc=W1;function Si(t,e,l=ui,n=sn){Il(l)||uc(t,o=>`You cannot use ${o} outside of a ${ao(n)}.`,e)}const G1=t=>{const{subscribe:e}=Il(t);return{subscribe:e}};function pc(){return Si(lc),G1(Ys)}function _c(){const{history:t}=Il(ui);return t}function dc(){const t=Il(Jf);return t?xc(t,e=>e.base):ut("/")}function vc(){Si(ic);const t=dc(),{basepath:e}=Il(ui);return n=>k1(n,si(t),e)}function B1(){Si(nc);const t=vc(),{navigate:e}=_c();return(n,i)=>{const o=Vf(n)?n:t(n);return e(o,i)}}const Y1=t=>({params:t&16,location:t&8}),Fr=t=>({params:Fl?si(t[10]):t[4],location:t[3],navigate:t[11]});function Rr(t){let e,l;return e=new mc({props:{primary:t[1],$$slots:{default:[K1]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&2&&(o.primary=n[1]),i&528409&&(o.$$scope={dirty:i,ctx:n}),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function z1(t){let e;const l=t[18].default,n=no(l,t,t[19],Fr);return{c(){n&&n.c()},m(i,o){n&&n.m(i,o),e=!0},p(i,o){n&&n.p&&(!e||o&524312)&&so(n,l,i,i[19],e?io(l,i[19],o,Y1):oo(i[19]),Fr)},i(i){e||(N(n,i),e=!0)},o(i){D(n,i),e=!1},d(i){n&&n.d(i)}}}function V1(t){let e,l,n;const i=[{location:t[3]},{navigate:t[11]},Fl?si(t[10]):t[4],t[12]];var o=t[0];function r(a){let f={};for(let c=0;c{Z(p,1)}),Se()}o?(e=Cr(o,r()),J(e.$$.fragment),N(e.$$.fragment,1),X(e,l.parentNode,l)):e=null}else o&&e.$set(c)},i(a){n||(e&&N(e.$$.fragment,a),n=!0)},o(a){e&&D(e.$$.fragment,a),n=!1},d(a){a&&w(l),e&&Z(e,a)}}}function K1(t){let e,l,n,i;const o=[V1,z1],r=[];function a(f,c){return f[0]!==null?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=Ge()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e===p?r[e].p(f,c):(Te(),D(r[p],1,1,()=>{r[p]=null}),Se(),l=r[e],l?l.p(f,c):(l=r[e]=o[e](f),l.c()),N(l,1),l.m(n.parentNode,n))},i(f){i||(N(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function Q1(t){let e,l,n,i,o,r=[Bs(t[7]),{"data-svnav-route-start":t[5]}],a={};for(let _=0;_{f=null}),Se())},i(_){o||(N(f),o=!0)},o(_){D(f),o=!1},d(_){_&&w(e),_&&w(l),f&&f.d(_),_&&w(n),_&&w(i)}}}const X1=Kf();function Z1(t,e,l){let n;const i=["path","component","meta","primary"];let o=ps(e,i),r,a,f,c,{$$slots:p={},$$scope:_}=e,{path:b=""}=e,{component:d=null}=e,{meta:v={}}=e,{primary:g=!0}=e;Si(gs,e);const k=X1(),{registerRoute:C,unregisterRoute:T,activeRoute:P,disableInlineStyles:E}=Il(ui);il(t,P,q=>l(16,r=q));const S=dc();il(t,S,q=>l(17,f=q));const M=pc();il(t,M,q=>l(3,a=q));const I=ut(null);let F;const z=ut(),O=ut({});il(t,O,q=>l(4,c=q)),wi(Jf,z),wi(e1,O),wi(t1,I);const R=B1();return Fl||Yc(()=>T(k)),t.$$set=q=>{l(24,e=Xt(Xt({},e),ms(q))),l(12,o=ps(e,i)),"path"in q&&l(13,b=q.path),"component"in q&&l(0,d=q.component),"meta"in q&&l(14,v=q.meta),"primary"in q&&l(1,g=q.primary),"$$scope"in q&&l(19,_=q.$$scope)},t.$$.update=()=>{if(t.$$.dirty&155658){const q=b==="",Y=Ti(f,b),U={id:k,path:b,meta:v,default:q,fullPath:q?"":Y,base:q?f:w1(Y,a.pathname),primary:g,focusElement:I};z.set(U),l(15,F=C(U))}if(t.$$.dirty&98304&&l(2,n=!!(F||r&&r.id===k)),t.$$.dirty&98308&&n){const{params:q}=F||r;O.set(q)}},e=ms(e),[d,g,n,a,c,k,P,E,S,M,O,R,o,b,v,F,r,f,p,_]}class J1 extends $e{constructor(e){super(),ye(this,e,Z1,Q1,ke,{path:13,component:0,meta:14,primary:1})}}const wl=J1;function x1(t){let e,l,n,i;const o=t[13].default,r=no(o,t,t[12],null);let a=[{href:t[0]},t[2],t[1]],f={};for(let c=0;cl(11,_=I));const P=zc(),E=vc(),{navigate:S}=_c();function M(I){P("click",I),Zc(I)&&(I.preventDefault(),S(n,{state:k,replace:r||g}))}return t.$$set=I=>{l(19,e=Xt(Xt({},e),ms(I))),l(18,p=ps(e,c)),"to"in I&&l(5,v=I.to),"replace"in I&&l(6,g=I.replace),"state"in I&&l(7,k=I.state),"getProps"in I&&l(8,C=I.getProps),"$$scope"in I&&l(12,d=I.$$scope)},t.$$.update=()=>{t.$$.dirty&2080&&l(0,n=E(v,_)),t.$$.dirty&2049&&l(10,i=zs(_.pathname,n)),t.$$.dirty&2049&&l(9,o=n===_.pathname),t.$$.dirty&2049&&(r=fo(n)===g1(_)),t.$$.dirty&512&&l(2,a=o?{"aria-current":"page"}:{}),l(1,f=(()=>{if(zf(C)){const I=C({location:_,href:n,isPartiallyCurrent:i,isCurrent:o});return{...p,...I}}return p})())},e=ms(e),[n,f,a,T,M,v,g,k,C,o,i,_,d,b]}class tm extends $e{constructor(e){super(),ye(this,e,em,x1,ke,{to:5,replace:6,state:7,getProps:8})}}const El=tm;let Vs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Dl(t){return t===1?"green":t===2?"yellow":t===3?"red":"gray"}function lm(t){return t>218&&t<242?"#32d900":t>212&&t<248?"#b1d900":t>208&&t<252?"#ffb800":"#d90000"}function hc(t){return t>90?"#d90000":t>85?"#e32100":t>80?"#ffb800":t>75?"#dcd800":"#32d900"}function nm(t){return t>75?"#32d900":t>50?"#77d900":t>25?"#94d900":"#dcd800"}function vs(t){switch(t){case 1:return"Aidon";case 2:return"Kaifa";case 3:return"Kamstrup";case 8:return"Iskra";case 9:return"Landis+Gyr";case 10:return"Sagemcom";default:return""}}function De(t){for(t=t.toString();t.length<2;)t="0"+t;return t}function fe(t,e){switch(e){case 5:switch(t){case"esp8266":return"Pow-K (GPIO12)";case"esp32s2":return"Pow-K+"}case 7:switch(t){case"esp8266":return"Pow-U (GPIO12)";case"esp32s2":return"Pow-U+"}case 6:return"Pow-P1";case 51:return"Wemos S2 mini";case 50:return"Generic ESP32-S2";case 201:return"Wemos LOLIN D32";case 202:return"Adafruit HUZZAH32";case 203:return"DevKitC";case 200:return"Generic ESP32";case 2:return"HAN Reader 2.0 by Max Spencer";case 0:return"Custom hardware by Roar Fredriksen";case 1:return"Kamstrup module by Egil Opsahl";case 8:return"µHAN mosquito by dbeinder";case 3:return"Pow-K (UART0)";case 4:return"Pow-U (UART0)";case 101:return"Wemos D1 mini";case 100:return"Generic ESP8266";case 70:return"Generic ESP32-C3";case 71:return"ESP32-C3-DevKitM-1"}}function Lr(t){switch(t){case-1:return"Parse error";case-2:return"Incomplete data received";case-3:return"Payload boundry flag missing";case-4:return"Header checksum error";case-5:return"Footer checksum error";case-9:return"Unknown data received, check meter config";case-41:return"Frame length not equal";case-51:return"Authentication failed";case-52:return"Decryption failed";case-53:return"Encryption key invalid";case 90:return"No HAN data received for at least 30s";case 91:return"Serial break";case 92:return"Serial buffer full";case 93:return"Serial FIFO overflow";case 94:return"Serial frame error";case 95:return"Serial parity error";case 96:return"RX error";case 98:return"Exception in code, debugging necessary";case 99:return"Autodetection failed"}return t<0?"Unspecified error "+t:""}function Or(t){switch(t){case-3:return"Connection failed";case-4:return"Network timeout";case-10:return"Connection denied";case-11:return"Failed to subscribe";case-13:return"Connection lost"}return t<0?"Unspecified error "+t:""}function Ur(t){switch(t){case 401:case 403:return"Unauthorized, check API key";case 404:return"Price unavailable, not found";case 425:return"Server says its too early";case 429:return"Exceeded API rate limit";case 500:return"Internal server error";case-2:return"Incomplete data received";case-3:return"Invalid data, tag missing";case-51:return"Authentication failed";case-52:return"Decryption failed";case-53:return"Encryption key invalid"}return t<0?"Unspecified error "+t:""}function ii(t){switch(t){case 2:case 4:case 7:return!0}return!1}function Ye(t,e){return t==1||t==2&&e}function Ft(t){return"https://github.com/UtilitechAS/amsreader-firmware/wiki/"+t}function ce(t,e){return isNaN(t)?"-":(isNaN(e)&&(e=t<10?1:0),t.toFixed(e))}function sl(t,e){return t.setTime(t.getTime()+e*36e5),t}function qr(t){if(t.chip=="esp8266")switch(t.boot_reason){case 0:return"Normal";case 1:return"WDT reset";case 2:return"Exception reset";case 3:return"Soft WDT reset";case 4:return"Software restart";case 5:return"Deep sleep";case 6:return"External reset";default:return"Unknown (8266)"}else switch(t.boot_reason){case 1:return"Vbat power on reset";case 3:return"Software reset";case 4:return"WDT reset";case 5:return"Deep sleep";case 6:return"SLC reset";case 7:return"Timer Group0 WDT reset";case 8:return"Timer Group1 WDT reset";case 9:return"RTC WDT reset";case 10:return"Instrusion test reset CPU";case 11:return"Time Group reset CPU";case 12:return"Software reset CPU";case 13:return"RTC WTD reset CPU";case 14:return"PRO CPU";case 15:return"Brownout";case 16:return"RTC reset";default:return"Unknown"}}async function Rl(t,e={}){const{timeout:l=8e3}=e,n=new AbortController,i=setTimeout(()=>n.abort(),l),o=await fetch(t,{...e,signal:n.signal});return clearTimeout(i),o}let nl={version:"",chip:"",mac:null,apmac:null,vndcfg:null,usrcfg:null,fwconsent:null,booting:!1,upgrading:!1,ui:{},security:0,boot_reason:0,upgrade:{x:-1,e:0,f:null,t:null},trying:null};const Rt=ut(nl);async function co(){nl=await(await Rl("/sysinfo.json?t="+Math.floor(Date.now()/1e3))).json(),Rt.set(nl)}let as=0,Hr=-127,jr=null,im={};const sm=Zf(im,t=>{let e;async function l(){Rl("/data.json").then(n=>n.json()).then(n=>{t(n),Hr!=n.t&&(Hr=n.t,setTimeout(wc,2e3)),jr!=n.p&&n.pe&&(jr=n.p,setTimeout(om,1e3)),nl.upgrading?window.location.reload():(!nl||!nl.chip||nl.booting||as>1&&!ii(nl.board))&&(co(),tn&&clearTimeout(tn),tn=setTimeout(mo,2e3),ln&&clearTimeout(ln),ln=setTimeout(po,3e3));let i=5e3;if(ii(nl.board)&&n.v>2.5){let o=3.3-Math.min(3.3,n.v);o>0&&(i=Math.max(o,.1)*10*5e3)}i>5e3&&console.log("Scheduling next data fetch in "+i+"ms"),e&&clearTimeout(e),e=setTimeout(l,i),as=0}).catch(n=>{as++,as>3?(t({em:3,hm:0,wm:0,mm:0}),e=setTimeout(l,15e3)):e=setTimeout(l,ii(nl.board)?1e4:5e3)})}return l(),function(){clearTimeout(e)}});let Ks={};const bc=ut(Ks);async function om(){Ks=await(await Rl("/energyprice.json")).json(),bc.set(Ks)}let Qs={},tn;async function mo(){tn&&(clearTimeout(tn),tn=0),Qs=await(await Rl("/dayplot.json")).json(),gc.set(Qs),tn=setTimeout(mo,(60-new Date().getMinutes())*6e4+20)}const gc=ut(Qs,t=>(mo(),function(){}));let Xs={},ln;async function po(){ln&&(clearTimeout(ln),ln=0),Xs=await(await Rl("/monthplot.json")).json(),kc.set(Xs),ln=setTimeout(po,(24-new Date().getHours())*36e5+40)}const kc=ut(Xs,t=>(po(),function(){}));let Zs={};async function wc(){Zs=await(await Rl("/temperature.json")).json(),yc.set(Zs)}const yc=ut(Zs,t=>(wc(),function(){}));let Js={},fs;async function $c(){fs&&(clearTimeout(fs),fs=0),Js=await(await Rl("/tariff.json")).json(),Cc.set(Js),fs=setTimeout($c,(60-new Date().getMinutes())*6e4+30)}const Cc=ut(Js,t=>function(){});let xs=[];const _o=ut(xs);async function um(){xs=await(await Rl("https://api.github.com/repos/UtilitechAS/amsreader-firmware/releases")).json(),_o.set(xs)}function hs(t){return"WARNING: "+t+" must be connected to an external power supply during firmware upgrade. Failure to do so may cause power-down during upload resulting in non-functioning unit."}async function Tc(t){await(await fetch("/upgrade?expected_version="+t,{method:"POST"})).json()}function Sc(t,e){if(/^v\d{1,2}\.\d{1,2}\.\d{1,2}$/.test(t)){let l=t.substring(1).split("."),n=parseInt(l[0]),i=parseInt(l[1]),o=parseInt(l[2]),r=[...e];r.reverse();let a,f,c;for(let p=0;po&&(a=_):g==i+1&&(f=_);else if(v==n+1)if(c){let C=c.tag_name.substring(1).split(".");parseInt(C[0]);let T=parseInt(C[1]);parseInt(C[2]),g==T&&(c=_)}else c=_}return f||c||a||!1}else return e[0]}const rm="/github.svg";function Wr(t){let e,l;function n(r,a){return r[1]>1?dm:r[1]>0?_m:r[2]>1?pm:r[2]>0?mm:r[3]>1?cm:r[3]>0?fm:am}let i=n(t),o=i(t);return{c(){e=$(`Up - `),o.c(),l=Ge()},m(r,a){y(r,e,a),o.m(r,a),y(r,l,a)},p(r,a){i===(i=n(r))&&o?o.p(r,a):(o.d(1),o=i(r),o&&(o.c(),o.m(l.parentNode,l)))},d(r){r&&w(e),o.d(r),r&&w(l)}}}function am(t){let e,l;return{c(){e=$(t[0]),l=$(" seconds")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&1&&B(e,n[0])},d(n){n&&w(e),n&&w(l)}}}function fm(t){let e,l;return{c(){e=$(t[3]),l=$(" minute")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&8&&B(e,n[3])},d(n){n&&w(e),n&&w(l)}}}function cm(t){let e,l;return{c(){e=$(t[3]),l=$(" minutes")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&8&&B(e,n[3])},d(n){n&&w(e),n&&w(l)}}}function mm(t){let e,l;return{c(){e=$(t[2]),l=$(" hour")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&4&&B(e,n[2])},d(n){n&&w(e),n&&w(l)}}}function pm(t){let e,l;return{c(){e=$(t[2]),l=$(" hours")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&4&&B(e,n[2])},d(n){n&&w(e),n&&w(l)}}}function _m(t){let e,l;return{c(){e=$(t[1]),l=$(" day")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&2&&B(e,n[1])},d(n){n&&w(e),n&&w(l)}}}function dm(t){let e,l;return{c(){e=$(t[1]),l=$(" days")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&2&&B(e,n[1])},d(n){n&&w(e),n&&w(l)}}}function vm(t){let e,l=t[0]&&Wr(t);return{c(){l&&l.c(),e=Ge()},m(n,i){l&&l.m(n,i),y(n,e,i)},p(n,[i]){n[0]?l?l.p(n,i):(l=Wr(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:ne,o:ne,d(n){l&&l.d(n),n&&w(e)}}}function hm(t,e,l){let{epoch:n}=e,i=0,o=0,r=0;return t.$$set=a=>{"epoch"in a&&l(0,n=a.epoch)},t.$$.update=()=>{t.$$.dirty&1&&(l(1,i=Math.floor(n/86400)),l(2,o=Math.floor(n/3600)),l(3,r=Math.floor(n/60)))},[n,i,o,r]}class bm extends $e{constructor(e){super(),ye(this,e,hm,vm,ke,{epoch:0})}}function gm(t){let e,l,n;return{c(){e=m("span"),l=$(t[2]),u(e,"title",t[1]),u(e,"class",n="bd-"+t[0])},m(i,o){y(i,e,o),s(e,l)},p(i,[o]){o&4&&B(l,i[2]),o&2&&u(e,"title",i[1]),o&1&&n!==(n="bd-"+i[0])&&u(e,"class",n)},i:ne,o:ne,d(i){i&&w(e)}}}function km(t,e,l){let{color:n}=e,{title:i}=e,{text:o}=e;return t.$$set=r=>{"color"in r&&l(0,n=r.color),"title"in r&&l(1,i=r.title),"text"in r&&l(2,o=r.text)},[n,i,o]}class ol extends $e{constructor(e){super(),ye(this,e,km,gm,ke,{color:0,title:1,text:2})}}function wm(t){let e,l=`${De(t[0].getDate())}.${De(t[0].getMonth()+1)}.${t[0].getFullYear()} ${De(t[0].getHours())}:${De(t[0].getMinutes())}`,n;return{c(){e=m("span"),n=$(l),u(e,"class",t[1])},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l=`${De(i[0].getDate())}.${De(i[0].getMonth()+1)}.${i[0].getFullYear()} ${De(i[0].getHours())}:${De(i[0].getMinutes())}`)&&B(n,l),o&2&&u(e,"class",i[1])},d(i){i&&w(e)}}}function ym(t){let e=`${De(t[0].getDate())}. ${Vs[t[0].getMonth()]} ${De(t[0].getHours())}:${De(t[0].getMinutes())}`,l;return{c(){l=$(e)},m(n,i){y(n,l,i)},p(n,i){i&1&&e!==(e=`${De(n[0].getDate())}. ${Vs[n[0].getMonth()]} ${De(n[0].getHours())}:${De(n[0].getMinutes())}`)&&B(l,e)},d(n){n&&w(l)}}}function $m(t){let e;function l(o,r){return o[2]?ym:wm}let n=l(t),i=n(t);return{c(){i.c(),e=Ge()},m(o,r){i.m(o,r),y(o,e,r)},p(o,[r]){n===(n=l(o))&&i?i.p(o,r):(i.d(1),i=n(o),i&&(i.c(),i.m(e.parentNode,e)))},i:ne,o:ne,d(o){i.d(o),o&&w(e)}}}function Cm(t,e,l){let{timestamp:n}=e,{fullTimeColor:i}=e,{offset:o}=e,r;return t.$$set=a=>{"timestamp"in a&&l(0,n=a.timestamp),"fullTimeColor"in a&&l(1,i=a.fullTimeColor),"offset"in a&&l(3,o=a.offset)},t.$$.update=()=>{t.$$.dirty&9&&(l(2,r=Math.abs(new Date().getTime()-n.getTime())<3e5),isNaN(o)||sl(n,o-(n.getHours()-n.getUTCHours())))},[n,i,r,o]}class Pc extends $e{constructor(e){super(),ye(this,e,Cm,$m,ke,{timestamp:0,fullTimeColor:1,offset:3})}}function Tm(t){let e,l,n;return{c(){e=qe("svg"),l=qe("path"),n=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z"),u(n,"stroke-linecap","round"),u(n,"stroke-linejoin","round"),u(n,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(i,o){y(i,e,o),s(e,l),s(e,n)},p:ne,i:ne,o:ne,d(i){i&&w(e)}}}class Sm extends $e{constructor(e){super(),ye(this,e,null,Tm,ke,{})}}function Pm(t){let e,l;return{c(){e=qe("svg"),l=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(n,i){y(n,e,i),s(e,l)},p:ne,i:ne,o:ne,d(n){n&&w(e)}}}class Nm extends $e{constructor(e){super(),ye(this,e,null,Pm,ke,{})}}function Mm(t){let e,l;return{c(){e=qe("svg"),l=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(n,i){y(n,e,i),s(e,l)},p:ne,i:ne,o:ne,d(n){n&&w(e)}}}class It extends $e{constructor(e){super(),ye(this,e,null,Mm,ke,{})}}function Am(t){let e,l;return{c(){e=qe("svg"),l=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M9 8.25H7.5a2.25 2.25 0 00-2.25 2.25v9a2.25 2.25 0 002.25 2.25h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25H15M9 12l3 3m0 0l3-3m-3 3V2.25"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(n,i){y(n,e,i),s(e,l)},p:ne,i:ne,o:ne,d(n){n&&w(e)}}}class Nc extends $e{constructor(e){super(),ye(this,e,null,Am,ke,{})}}function Dm(t){let e,l,n=t[1].version+"",i;return{c(){e=$("AMS reader "),l=m("span"),i=$(n)},m(o,r){y(o,e,r),y(o,l,r),s(l,i)},p(o,r){r&2&&n!==(n=o[1].version+"")&&B(i,n)},d(o){o&&w(e),o&&w(l)}}}function Gr(t){let e,l=(t[0].t>-50?t[0].t.toFixed(1):"-")+"",n,i;return{c(){e=m("div"),n=$(l),i=$("°C"),u(e,"class","flex-none my-auto")},m(o,r){y(o,e,r),s(e,n),s(e,i)},p(o,r){r&1&&l!==(l=(o[0].t>-50?o[0].t.toFixed(1):"-")+"")&&B(n,l)},d(o){o&&w(e)}}}function Br(t){let e,l="HAN: "+Lr(t[0].he),n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l="HAN: "+Lr(i[0].he))&&B(n,l)},d(i){i&&w(e)}}}function Yr(t){let e,l="MQTT: "+Or(t[0].me),n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l="MQTT: "+Or(i[0].me))&&B(n,l)},d(i){i&&w(e)}}}function zr(t){let e,l="PriceAPI: "+Ur(t[0].ee),n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l="PriceAPI: "+Ur(i[0].ee))&&B(n,l)},d(i){i&&w(e)}}}function Vr(t){let e,l,n,i,o,r;return l=new El({props:{to:"/configuration",$$slots:{default:[Em]},$$scope:{ctx:t}}}),o=new El({props:{to:"/status",$$slots:{default:[Im]},$$scope:{ctx:t}}}),{c(){e=m("div"),J(l.$$.fragment),n=h(),i=m("div"),J(o.$$.fragment),u(e,"class","flex-none px-1 mt-1"),u(e,"title","Configuration"),u(i,"class","flex-none px-1 mt-1"),u(i,"title","Device information")},m(a,f){y(a,e,f),X(l,e,null),y(a,n,f),y(a,i,f),X(o,i,null),r=!0},i(a){r||(N(l.$$.fragment,a),N(o.$$.fragment,a),r=!0)},o(a){D(l.$$.fragment,a),D(o.$$.fragment,a),r=!1},d(a){a&&w(e),Z(l),a&&w(n),a&&w(i),Z(o)}}}function Em(t){let e,l;return e=new Sm({}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Im(t){let e,l;return e=new Nm({}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Kr(t){let e,l,n,i,o;const r=[Rm,Fm],a=[];function f(c,p){return c[1].security==0||c[0].a?0:1}return l=f(t),n=a[l]=r[l](t),{c(){e=m("div"),n.c(),u(e,"class","flex-none mr-3 text-yellow-500"),u(e,"title",i="New version: "+t[2].tag_name)},m(c,p){y(c,e,p),a[l].m(e,null),o=!0},p(c,p){let _=l;l=f(c),l===_?a[l].p(c,p):(Te(),D(a[_],1,1,()=>{a[_]=null}),Se(),n=a[l],n?n.p(c,p):(n=a[l]=r[l](c),n.c()),N(n,1),n.m(e,null)),(!o||p&4&&i!==(i="New version: "+c[2].tag_name))&&u(e,"title",i)},i(c){o||(N(n),o=!0)},o(c){D(n),o=!1},d(c){c&&w(e),a[l].d()}}}function Fm(t){let e,l,n=t[2].tag_name+"",i;return{c(){e=m("span"),l=$("New version: "),i=$(n)},m(o,r){y(o,e,r),s(e,l),s(e,i)},p(o,r){r&4&&n!==(n=o[2].tag_name+"")&&B(i,n)},i:ne,o:ne,d(o){o&&w(e)}}}function Rm(t){let e,l,n,i=t[2].tag_name+"",o,r,a,f,c,p;return a=new Nc({}),{c(){e=m("button"),l=m("span"),n=$("New version: "),o=$(i),r=h(),J(a.$$.fragment),u(l,"class","mt-1"),u(e,"class","flex")},m(_,b){y(_,e,b),s(e,l),s(l,n),s(l,o),s(e,r),X(a,e,null),f=!0,c||(p=K(e,"click",t[3]),c=!0)},p(_,b){(!f||b&4)&&i!==(i=_[2].tag_name+"")&&B(o,i)},i(_){f||(N(a.$$.fragment,_),f=!0)},o(_){D(a.$$.fragment,_),f=!1},d(_){_&&w(e),Z(a),c=!1,p()}}}function Lm(t){let e,l,n,i,o,r,a,f,c,p,_,b,d=(t[0].m?(t[0].m/1e3).toFixed(1):"-")+"",v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U,H,G,L,W,j,ee,le,de,ie,we,Ee,Ce,Ie;i=new El({props:{to:"/",$$slots:{default:[Dm]},$$scope:{ctx:t}}}),f=new bm({props:{epoch:t[0].u}});let ve=t[0].t>-50&&Gr(t);T=new ol({props:{title:"ESP",text:t[1].booting?"Booting":t[0].v>2?t[0].v.toFixed(2)+"V":"ESP",color:Dl(t[1].booting?2:t[0].em)}}),E=new ol({props:{title:"HAN",text:"HAN",color:Dl(t[1].booting?9:t[0].hm)}}),M=new ol({props:{title:"WiFi",text:t[0].r?t[0].r.toFixed(0)+"dBm":"WiFi",color:Dl(t[1].booting?9:t[0].wm)}}),F=new ol({props:{title:"MQTT",text:"MQTT",color:Dl(t[1].booting?9:t[0].mm)}});let Pe=(t[0].he<0||t[0].he>0)&&Br(t),Ae=t[0].me<0&&Yr(t),me=(t[0].ee>0||t[0].ee<0)&&zr(t);ee=new Pc({props:{timestamp:t[0].c?new Date(t[0].c*1e3):new Date(0),offset:t[1].clock_offset,fullTimeColor:"text-red-500"}});let se=t[1].vndcfg&&t[1].usrcfg&&Vr(t);Ee=new It({});let pe=t[1].fwconsent===1&&t[2]&&Kr(t);return{c(){e=m("nav"),l=m("div"),n=m("div"),J(i.$$.fragment),o=h(),r=m("div"),a=m("div"),J(f.$$.fragment),c=h(),ve&&ve.c(),p=h(),_=m("div"),b=$("Free mem: "),v=$(d),g=$("kb"),k=h(),C=m("div"),J(T.$$.fragment),P=h(),J(E.$$.fragment),S=h(),J(M.$$.fragment),I=h(),J(F.$$.fragment),z=h(),Pe&&Pe.c(),O=h(),Ae&&Ae.c(),R=h(),me&&me.c(),q=h(),Y=m("div"),U=m("div"),H=m("a"),G=m("img"),W=h(),j=m("div"),J(ee.$$.fragment),le=h(),se&&se.c(),de=h(),ie=m("div"),we=m("a"),J(Ee.$$.fragment),Ce=h(),pe&&pe.c(),u(n,"class","flex text-lg text-gray-100 p-2"),u(a,"class","flex-none my-auto"),u(_,"class","flex-none my-auto"),u(r,"class","flex-none my-auto p-2 flex space-x-4"),u(C,"class","flex-auto flex-wrap my-auto justify-center p-2"),u(G,"class","gh-logo"),Rc(G.src,L=rm)||u(G,"src",L),u(G,"alt","GitHub repo"),u(H,"class","float-right"),u(H,"href","https://github.com/UtilitechAS/amsreader-firmware"),u(H,"target","_blank"),u(H,"rel","noreferrer"),u(H,"aria-label","GitHub"),u(U,"class","flex-none"),u(j,"class","flex-none my-auto px-2"),u(we,"href",Ft("")),u(we,"target","_blank"),u(we,"rel","noreferrer"),u(ie,"class","flex-none px-1 mt-1"),u(ie,"title","Documentation"),u(Y,"class","flex-auto p-2 flex flex-row-reverse flex-wrap"),u(l,"class","flex flex-wrap space-x-4 text-sm text-gray-300"),u(e,"class","bg-violet-600 p-1 rounded-md mx-2")},m(Q,oe){y(Q,e,oe),s(e,l),s(l,n),X(i,n,null),s(l,o),s(l,r),s(r,a),X(f,a,null),s(r,c),ve&&ve.m(r,null),s(r,p),s(r,_),s(_,b),s(_,v),s(_,g),s(l,k),s(l,C),X(T,C,null),s(C,P),X(E,C,null),s(C,S),X(M,C,null),s(C,I),X(F,C,null),s(l,z),Pe&&Pe.m(l,null),s(l,O),Ae&&Ae.m(l,null),s(l,R),me&&me.m(l,null),s(l,q),s(l,Y),s(Y,U),s(U,H),s(H,G),s(Y,W),s(Y,j),X(ee,j,null),s(Y,le),se&&se.m(Y,null),s(Y,de),s(Y,ie),s(ie,we),X(Ee,we,null),s(Y,Ce),pe&&pe.m(Y,null),Ie=!0},p(Q,[oe]){const Ne={};oe&18&&(Ne.$$scope={dirty:oe,ctx:Q}),i.$set(Ne);const Me={};oe&1&&(Me.epoch=Q[0].u),f.$set(Me),Q[0].t>-50?ve?ve.p(Q,oe):(ve=Gr(Q),ve.c(),ve.m(r,p)):ve&&(ve.d(1),ve=null),(!Ie||oe&1)&&d!==(d=(Q[0].m?(Q[0].m/1e3).toFixed(1):"-")+"")&&B(v,d);const he={};oe&3&&(he.text=Q[1].booting?"Booting":Q[0].v>2?Q[0].v.toFixed(2)+"V":"ESP"),oe&3&&(he.color=Dl(Q[1].booting?2:Q[0].em)),T.$set(he);const x={};oe&3&&(x.color=Dl(Q[1].booting?9:Q[0].hm)),E.$set(x);const _e={};oe&1&&(_e.text=Q[0].r?Q[0].r.toFixed(0)+"dBm":"WiFi"),oe&3&&(_e.color=Dl(Q[1].booting?9:Q[0].wm)),M.$set(_e);const Le={};oe&3&&(Le.color=Dl(Q[1].booting?9:Q[0].mm)),F.$set(Le),Q[0].he<0||Q[0].he>0?Pe?Pe.p(Q,oe):(Pe=Br(Q),Pe.c(),Pe.m(l,O)):Pe&&(Pe.d(1),Pe=null),Q[0].me<0?Ae?Ae.p(Q,oe):(Ae=Yr(Q),Ae.c(),Ae.m(l,R)):Ae&&(Ae.d(1),Ae=null),Q[0].ee>0||Q[0].ee<0?me?me.p(Q,oe):(me=zr(Q),me.c(),me.m(l,q)):me&&(me.d(1),me=null);const We={};oe&1&&(We.timestamp=Q[0].c?new Date(Q[0].c*1e3):new Date(0)),oe&2&&(We.offset=Q[1].clock_offset),ee.$set(We),Q[1].vndcfg&&Q[1].usrcfg?se?oe&2&&N(se,1):(se=Vr(Q),se.c(),N(se,1),se.m(Y,de)):se&&(Te(),D(se,1,1,()=>{se=null}),Se()),Q[1].fwconsent===1&&Q[2]?pe?(pe.p(Q,oe),oe&6&&N(pe,1)):(pe=Kr(Q),pe.c(),N(pe,1),pe.m(Y,null)):pe&&(Te(),D(pe,1,1,()=>{pe=null}),Se())},i(Q){Ie||(N(i.$$.fragment,Q),N(f.$$.fragment,Q),N(T.$$.fragment,Q),N(E.$$.fragment,Q),N(M.$$.fragment,Q),N(F.$$.fragment,Q),N(ee.$$.fragment,Q),N(se),N(Ee.$$.fragment,Q),N(pe),Ie=!0)},o(Q){D(i.$$.fragment,Q),D(f.$$.fragment,Q),D(T.$$.fragment,Q),D(E.$$.fragment,Q),D(M.$$.fragment,Q),D(F.$$.fragment,Q),D(ee.$$.fragment,Q),D(se),D(Ee.$$.fragment,Q),D(pe),Ie=!1},d(Q){Q&&w(e),Z(i),Z(f),ve&&ve.d(),Z(T),Z(E),Z(M),Z(F),Pe&&Pe.d(),Ae&&Ae.d(),me&&me.d(),Z(ee),se&&se.d(),Z(Ee),pe&&pe.d()}}}function Om(t,e,l){let{data:n={}}=e,i={},o={};function r(){confirm("Do you want to upgrade this device to "+o.tag_name+"?")&&(!ii(i.board)||confirm(hs(fe(i.chip,i.board))))&&(Rt.update(a=>(a.upgrading=!0,a)),Tc(o.tag_name))}return Rt.subscribe(a=>{l(1,i=a),a.fwconsent===1&&um()}),_o.subscribe(a=>{l(2,o=Sc(i.version,a))}),t.$$set=a=>{"data"in a&&l(0,n=a.data)},[n,i,o,r]}class Um extends $e{constructor(e){super(),ye(this,e,Om,Lm,ke,{data:0})}}function qm(t){let e,l,n,i;return{c(){e=qe("svg"),l=qe("path"),n=qe("path"),u(l,"d",Ws(150,150,115,210,510)),u(l,"stroke","#eee"),u(l,"fill","none"),u(l,"stroke-width","55"),u(n,"d",i=Ws(150,150,115,210,210+300*t[0]/100)),u(n,"stroke",t[1]),u(n,"fill","none"),u(n,"stroke-width","55"),u(e,"viewBox","0 0 300 300"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"height","100%")},m(o,r){y(o,e,r),s(e,l),s(e,n)},p(o,[r]){r&1&&i!==(i=Ws(150,150,115,210,210+300*o[0]/100))&&u(n,"d",i),r&2&&u(n,"stroke",o[1])},i:ne,o:ne,d(o){o&&w(e)}}}function Qr(t,e,l,n){var i=(n-90)*Math.PI/180;return{x:t+l*Math.cos(i),y:e+l*Math.sin(i)}}function Ws(t,e,l,n,i){var o=Qr(t,e,l,i),r=Qr(t,e,l,n),a=i-n<=180?"0":"1",f=["M",o.x,o.y,"A",l,l,0,a,0,r.x,r.y].join(" ");return f}function Hm(t,e,l){let{pct:n=0}=e,{color:i="red"}=e;return t.$$set=o=>{"pct"in o&&l(0,n=o.pct),"color"in o&&l(1,i=o.color)},[n,i]}class jm extends $e{constructor(e){super(),ye(this,e,Hm,qm,ke,{pct:0,color:1})}}function Xr(t){let e,l,n,i,o,r,a,f;return{c(){e=m("br"),l=h(),n=m("span"),i=$(t[3]),o=h(),r=m("span"),a=$(t[4]),f=$("/kWh"),u(n,"class","pl-sub"),u(r,"class","pl-snt")},m(c,p){y(c,e,p),y(c,l,p),y(c,n,p),s(n,i),y(c,o,p),y(c,r,p),s(r,a),s(r,f)},p(c,p){p&8&&B(i,c[3]),p&16&&B(a,c[4])},d(c){c&&w(e),c&&w(l),c&&w(n),c&&w(o),c&&w(r)}}}function Wm(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k;l=new jm({props:{pct:t[6],color:t[5](t[6])}});let C=t[3]&&Xr(t);return{c(){e=m("div"),J(l.$$.fragment),n=h(),i=m("span"),o=m("span"),r=$(t[2]),a=h(),f=m("br"),c=h(),p=m("span"),_=$(t[0]),b=h(),d=m("span"),v=$(t[1]),g=h(),C&&C.c(),u(o,"class","pl-lab"),u(p,"class","pl-val"),u(d,"class","pl-unt"),u(i,"class","pl-ov"),u(e,"class","pl-root")},m(T,P){y(T,e,P),X(l,e,null),s(e,n),s(e,i),s(i,o),s(o,r),s(i,a),s(i,f),s(i,c),s(i,p),s(p,_),s(i,b),s(i,d),s(d,v),s(i,g),C&&C.m(i,null),k=!0},p(T,[P]){const E={};P&64&&(E.pct=T[6]),P&96&&(E.color=T[5](T[6])),l.$set(E),(!k||P&4)&&B(r,T[2]),(!k||P&1)&&B(_,T[0]),(!k||P&2)&&B(v,T[1]),T[3]?C?C.p(T,P):(C=Xr(T),C.c(),C.m(i,null)):C&&(C.d(1),C=null)},i(T){k||(N(l.$$.fragment,T),k=!0)},o(T){D(l.$$.fragment,T),k=!1},d(T){T&&w(e),Z(l),C&&C.d()}}}function Gm(t,e,l){let{val:n}=e,{max:i}=e,{unit:o}=e,{label:r}=e,{sub:a=""}=e,{subunit:f=""}=e,{colorFn:c}=e,p=0;return t.$$set=_=>{"val"in _&&l(0,n=_.val),"max"in _&&l(7,i=_.max),"unit"in _&&l(1,o=_.unit),"label"in _&&l(2,r=_.label),"sub"in _&&l(3,a=_.sub),"subunit"in _&&l(4,f=_.subunit),"colorFn"in _&&l(5,c=_.colorFn)},t.$$.update=()=>{t.$$.dirty&129&&l(6,p=Math.min(n,i)/i*100)},[n,o,r,a,f,c,p,i]}class Mc extends $e{constructor(e){super(),ye(this,e,Gm,Wm,ke,{val:0,max:7,unit:1,label:2,sub:3,subunit:4,colorFn:5})}}function Zr(t,e,l){const n=t.slice();return n[9]=e[l],n[11]=l,n}function Jr(t,e,l){const n=t.slice();return n[9]=e[l],n[11]=l,n}function xr(t,e,l){const n=t.slice();return n[13]=e[l],n}function ea(t){let e,l,n,i,o,r=t[0].title&&ta(t),a=t[0].y.ticks,f=[];for(let d=0;d20||t[11]%2==0)&&sa(t);return{c(){e=qe("g"),n&&n.c(),u(e,"class","tick"),u(e,"transform",l="translate("+t[5](t[11])+","+t[4]+")")},m(i,o){y(i,e,o),n&&n.m(e,null)},p(i,o){i[3]>20||i[11]%2==0?n?n.p(i,o):(n=sa(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null),o&48&&l!==(l="translate("+i[5](i[11])+","+i[4]+")")&&u(e,"transform",l)},d(i){i&&w(e),n&&n.d()}}}function sa(t){let e,l=t[9].label+"",n,i;return{c(){e=qe("text"),n=$(l),u(e,"x",i=t[3]/2),u(e,"y","-4")},m(o,r){y(o,e,r),s(e,n)},p(o,r){r&1&&l!==(l=o[9].label+"")&&B(n,l),r&8&&i!==(i=o[3]/2)&&u(e,"x",i)},d(o){o&&w(e)}}}function oa(t){let e=!isNaN(t[5](t[11])),l,n=e&&ia(t);return{c(){n&&n.c(),l=Ge()},m(i,o){n&&n.m(i,o),y(i,l,o)},p(i,o){o&32&&(e=!isNaN(i[5](i[11]))),e?n?n.p(i,o):(n=ia(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null)},d(i){n&&n.d(i),i&&w(l)}}}function ua(t){let e,l,n=t[9].value!==void 0&&ra(t),i=t[9].value2>1e-4&&ca(t);return{c(){e=qe("g"),n&&n.c(),l=qe("g"),i&&i.c()},m(o,r){y(o,e,r),n&&n.m(e,null),y(o,l,r),i&&i.m(l,null)},p(o,r){o[9].value!==void 0?n?n.p(o,r):(n=ra(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null),o[9].value2>1e-4?i?i.p(o,r):(i=ca(o),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(o){o&&w(e),n&&n.d(),o&&w(l),i&&i.d()}}}function ra(t){let e,l,n,i,o,r,a,f=t[3]>15&&aa(t);return{c(){e=qe("rect"),f&&f.c(),a=Ge(),u(e,"x",l=t[5](t[11])+2),u(e,"y",n=t[6](t[9].value)),u(e,"width",i=t[3]-4),u(e,"height",o=t[6](t[0].y.min)-t[6](Math.min(t[0].y.min,0)+t[9].value)),u(e,"fill",r=t[9].color)},m(c,p){y(c,e,p),f&&f.m(c,p),y(c,a,p)},p(c,p){p&32&&l!==(l=c[5](c[11])+2)&&u(e,"x",l),p&65&&n!==(n=c[6](c[9].value))&&u(e,"y",n),p&8&&i!==(i=c[3]-4)&&u(e,"width",i),p&65&&o!==(o=c[6](c[0].y.min)-c[6](Math.min(c[0].y.min,0)+c[9].value))&&u(e,"height",o),p&1&&r!==(r=c[9].color)&&u(e,"fill",r),c[3]>15?f?f.p(c,p):(f=aa(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&w(e),f&&f.d(c),c&&w(a)}}}function aa(t){let e,l=t[9].label+"",n,i,o,r,a,f,c=t[9].title&&fa(t);return{c(){e=qe("text"),n=$(l),c&&c.c(),f=Ge(),u(e,"width",i=t[3]-4),u(e,"dominant-baseline","middle"),u(e,"text-anchor",o=t[3]t[6](0)-t[7]?t[9].color:"white"),u(e,"transform",a="translate("+(t[5](t[11])+t[3]/2)+" "+(t[6](t[9].value)>t[6](0)-t[7]?t[6](t[9].value)-t[7]:t[6](t[9].value)+10)+") rotate("+(t[3]p[6](0)-p[7]?p[9].color:"white")&&u(e,"fill",r),_&233&&a!==(a="translate("+(p[5](p[11])+p[3]/2)+" "+(p[6](p[9].value)>p[6](0)-p[7]?p[6](p[9].value)-p[7]:p[6](p[9].value)+10)+") rotate("+(p[3]15&&ma(t);return{c(){e=qe("rect"),f&&f.c(),a=Ge(),u(e,"x",l=t[5](t[11])+2),u(e,"y",n=t[6](0)),u(e,"width",i=t[3]-4),u(e,"height",o=t[6](t[0].y.min)-t[6](t[0].y.min+t[9].value2)),u(e,"fill",r=t[9].color)},m(c,p){y(c,e,p),f&&f.m(c,p),y(c,a,p)},p(c,p){p&32&&l!==(l=c[5](c[11])+2)&&u(e,"x",l),p&64&&n!==(n=c[6](0))&&u(e,"y",n),p&8&&i!==(i=c[3]-4)&&u(e,"width",i),p&65&&o!==(o=c[6](c[0].y.min)-c[6](c[0].y.min+c[9].value2))&&u(e,"height",o),p&1&&r!==(r=c[9].color)&&u(e,"fill",r),c[3]>15?f?f.p(c,p):(f=ma(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&w(e),f&&f.d(c),c&&w(a)}}}function ma(t){let e,l=t[9].label2+"",n,i,o,r,a,f=t[9].title2&&pa(t);return{c(){e=qe("text"),n=$(l),f&&f.c(),a=Ge(),u(e,"width",i=t[3]-4),u(e,"dominant-baseline","middle"),u(e,"text-anchor","middle"),u(e,"fill",o=t[6](-t[9].value2)t[8].call(e))},m(i,o){y(i,e,o),n&&n.m(e,null),l=Wc(e,t[8].bind(e))},p(i,[o]){i[0].x.ticks&&i[0].points&&i[4]?n?n.p(i,o):(n=ea(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:ne,o:ne,d(i){i&&w(e),n&&n.d(),l()}}}let nn=30;function Ym(t,e,l){let{config:n}=e,i,o,r,a,f,c,p;function _(){i=this.clientWidth,o=this.clientHeight,l(1,i),l(2,o)}return t.$$set=b=>{"config"in b&&l(0,n=b.config)},t.$$.update=()=>{if(t.$$.dirty&31){l(4,c=o-(n.title?20:0));let b=i-(n.padding.left+n.padding.right);l(3,r=b/n.points.length),l(7,p=rn.y.max?g=n.padding.bottom:vc||g<0?0:g})}},[n,i,o,r,c,a,f,p,_]}class on extends $e{constructor(e){super(),ye(this,e,Ym,Bm,ke,{config:0})}}function zm(t){let e,l;return e=new on({props:{config:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,[i]){const o={};i&1&&(o.config=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Vm(t,e,l){let{u1:n}=e,{u2:i}=e,{u3:o}=e,{ds:r}=e,a={};function f(c){return{label:ce(c)+"V",title:c.toFixed(1)+" V",value:isNaN(c)?0:c,color:lm(c||0)}}return t.$$set=c=>{"u1"in c&&l(1,n=c.u1),"u2"in c&&l(2,i=c.u2),"u3"in c&&l(3,o=c.u3),"ds"in c&&l(4,r=c.ds)},t.$$.update=()=>{if(t.$$.dirty&30){let c=[],p=[];n>0&&(c.push({label:r===1?"L1-L2":"L1"}),p.push(f(n))),i>0&&(c.push({label:r===1?"L1-L3":"L2"}),p.push(f(i))),o>0&&(c.push({label:r===1?"L2-L3":"L3"}),p.push(f(o))),l(0,a={padding:{top:20,right:15,bottom:20,left:35},y:{min:200,max:260,ticks:[{value:207,label:"-10%"},{value:230,label:"230v"},{value:253,label:"+10%"}]},x:{ticks:c},points:p})}},[a,n,i,o,r]}class Km extends $e{constructor(e){super(),ye(this,e,Vm,zm,ke,{u1:1,u2:2,u3:3,ds:4})}}function Qm(t){let e,l;return e=new on({props:{config:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,[i]){const o={};i&1&&(o.config=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Xm(t,e,l){let{u1:n}=e,{u2:i}=e,{u3:o}=e,{i1:r}=e,{i2:a}=e,{i3:f}=e,{max:c}=e,p={};function _(b){return{label:ce(b)+"A",title:b.toFixed(1)+" A",value:isNaN(b)?0:b,color:hc(b?b/c*100:0)}}return t.$$set=b=>{"u1"in b&&l(1,n=b.u1),"u2"in b&&l(2,i=b.u2),"u3"in b&&l(3,o=b.u3),"i1"in b&&l(4,r=b.i1),"i2"in b&&l(5,a=b.i2),"i3"in b&&l(6,f=b.i3),"max"in b&&l(7,c=b.max)},t.$$.update=()=>{if(t.$$.dirty&254){let b=[],d=[];n>0&&(b.push({label:"L1"}),d.push(_(r))),i>0&&(b.push({label:"L2"}),d.push(_(a))),o>0&&(b.push({label:"L3"}),d.push(_(f))),l(0,p={padding:{top:20,right:15,bottom:20,left:35},y:{min:0,max:c,ticks:[{value:0,label:"0%"},{value:c/4,label:"25%"},{value:c/2,label:"50%"},{value:c/4*3,label:"75%"},{value:c,label:"100%"}]},x:{ticks:b},points:d})}},[p,n,i,o,r,a,f,c]}class Zm extends $e{constructor(e){super(),ye(this,e,Xm,Qm,ke,{u1:1,u2:2,u3:3,i1:4,i2:5,i3:6,max:7})}}function Jm(t){let e,l,n,i,o,r,a,f=(typeof t[0]<"u"?t[0].toFixed(0):"-")+"",c,p,_,b,d,v,g=(typeof t[1]<"u"?t[1].toFixed(0):"-")+"",k,C,T,P,E,S,M,I=(typeof t[2]<"u"?t[2].toFixed(1):"-")+"",F,z,O,R,q,Y,U=(typeof t[3]<"u"?t[3].toFixed(1):"-")+"",H,G;return{c(){e=m("div"),l=m("strong"),l.textContent="Reactive",n=h(),i=m("div"),o=m("div"),o.textContent="Instant in",r=h(),a=m("div"),c=$(f),p=$(" VAr"),_=h(),b=m("div"),b.textContent="Instant out",d=h(),v=m("div"),k=$(g),C=$(" VAr"),T=h(),P=m("div"),E=m("div"),E.textContent="Total in",S=h(),M=m("div"),F=$(I),z=$(" kVArh"),O=h(),R=m("div"),R.textContent="Total out",q=h(),Y=m("div"),H=$(U),G=$(" kVArh"),u(a,"class","text-right"),u(v,"class","text-right"),u(i,"class","grid grid-cols-2 mt-4"),u(M,"class","text-right"),u(Y,"class","text-right"),u(P,"class","grid grid-cols-2 mt-4"),u(e,"class","mx-2 text-sm")},m(L,W){y(L,e,W),s(e,l),s(e,n),s(e,i),s(i,o),s(i,r),s(i,a),s(a,c),s(a,p),s(i,_),s(i,b),s(i,d),s(i,v),s(v,k),s(v,C),s(e,T),s(e,P),s(P,E),s(P,S),s(P,M),s(M,F),s(M,z),s(P,O),s(P,R),s(P,q),s(P,Y),s(Y,H),s(Y,G)},p(L,[W]){W&1&&f!==(f=(typeof L[0]<"u"?L[0].toFixed(0):"-")+"")&&B(c,f),W&2&&g!==(g=(typeof L[1]<"u"?L[1].toFixed(0):"-")+"")&&B(k,g),W&4&&I!==(I=(typeof L[2]<"u"?L[2].toFixed(1):"-")+"")&&B(F,I),W&8&&U!==(U=(typeof L[3]<"u"?L[3].toFixed(1):"-")+"")&&B(H,U)},i:ne,o:ne,d(L){L&&w(e)}}}function xm(t,e,l){let{importInstant:n}=e,{exportInstant:i}=e,{importTotal:o}=e,{exportTotal:r}=e;return t.$$set=a=>{"importInstant"in a&&l(0,n=a.importInstant),"exportInstant"in a&&l(1,i=a.exportInstant),"importTotal"in a&&l(2,o=a.importTotal),"exportTotal"in a&&l(3,r=a.exportTotal)},[n,i,o,r]}class ep extends $e{constructor(e){super(),ye(this,e,xm,Jm,ke,{importInstant:0,exportInstant:1,importTotal:2,exportTotal:3})}}function da(t){let e;function l(o,r){return o[3]?lp:tp}let n=l(t),i=n(t);return{c(){i.c(),e=Ge()},m(o,r){i.m(o,r),y(o,e,r)},p(o,r){n===(n=l(o))&&i?i.p(o,r):(i.d(1),i=n(o),i&&(i.c(),i.m(e.parentNode,e)))},d(o){i.d(o),o&&w(e)}}}function tp(t){let e,l,n,i,o,r,a=ce(t[1].h.u,2)+"",f,c,p,_,b,d,v=ce(t[1].d.u,1)+"",g,k,C,T,P,E,S=ce(t[1].m.u)+"",M,I,F,z,O,R,q=ce(t[0].last_month.u)+"",Y,U,H,G,L=t[4]&&va(t);return{c(){e=m("strong"),e.textContent="Consumption",l=h(),n=m("div"),i=m("div"),i.textContent="Hour",o=h(),r=m("div"),f=$(a),c=$(" kWh"),p=h(),_=m("div"),_.textContent="Day",b=h(),d=m("div"),g=$(v),k=$(" kWh"),C=h(),T=m("div"),T.textContent="Month",P=h(),E=m("div"),M=$(S),I=$(" kWh"),F=h(),z=m("div"),z.textContent="Last month",O=h(),R=m("div"),Y=$(q),U=$(" kWh"),H=h(),L&&L.c(),G=Ge(),u(r,"class","text-right"),u(d,"class","text-right"),u(E,"class","text-right"),u(R,"class","text-right"),u(n,"class","grid grid-cols-2 mb-3")},m(W,j){y(W,e,j),y(W,l,j),y(W,n,j),s(n,i),s(n,o),s(n,r),s(r,f),s(r,c),s(n,p),s(n,_),s(n,b),s(n,d),s(d,g),s(d,k),s(n,C),s(n,T),s(n,P),s(n,E),s(E,M),s(E,I),s(n,F),s(n,z),s(n,O),s(n,R),s(R,Y),s(R,U),y(W,H,j),L&&L.m(W,j),y(W,G,j)},p(W,j){j&2&&a!==(a=ce(W[1].h.u,2)+"")&&B(f,a),j&2&&v!==(v=ce(W[1].d.u,1)+"")&&B(g,v),j&2&&S!==(S=ce(W[1].m.u)+"")&&B(M,S),j&1&&q!==(q=ce(W[0].last_month.u)+"")&&B(Y,q),W[4]?L?L.p(W,j):(L=va(W),L.c(),L.m(G.parentNode,G)):L&&(L.d(1),L=null)},d(W){W&&w(e),W&&w(l),W&&w(n),W&&w(H),L&&L.d(W),W&&w(G)}}}function lp(t){let e,l,n,i,o,r,a=ce(t[1].h.u,2)+"",f,c,p,_,b,d,v,g=ce(t[1].d.u,1)+"",k,C,T,P,E,S,M,I=ce(t[1].m.u)+"",F,z,O,R,q,Y,U,H=ce(t[0].last_month.u)+"",G,L,W,j,ee,le,de,ie,we,Ee,Ce,Ie=ce(t[1].h.p,2)+"",ve,Pe,Ae,me,se,pe,Q,oe=ce(t[1].d.p,1)+"",Ne,Me,he,x,_e,Le,We,Ke=ce(t[1].m.p)+"",Fe,je,re,ge,Lt,Ll,Zt,ft=ce(t[0].last_month.p)+"",$l,al,Ot,dt,Qe=t[4]&&ha(t),Xe=t[4]&&ba(t),Ze=t[4]&&ga(t),Oe=t[4]&&ka(t),Je=t[4]&&wa(t),Be=t[4]&&ya(t),xe=t[4]&&$a(t),et=t[4]&&Ca(t);return{c(){e=m("strong"),e.textContent="Import",l=h(),n=m("div"),i=m("div"),i.textContent="Hour",o=h(),r=m("div"),f=$(a),c=$(" kWh"),p=h(),Qe&&Qe.c(),_=h(),b=m("div"),b.textContent="Day",d=h(),v=m("div"),k=$(g),C=$(" kWh"),T=h(),Xe&&Xe.c(),P=h(),E=m("div"),E.textContent="Month",S=h(),M=m("div"),F=$(I),z=$(" kWh"),O=h(),Ze&&Ze.c(),R=h(),q=m("div"),q.textContent="Last mo.",Y=h(),U=m("div"),G=$(H),L=$(" kWh"),W=h(),Oe&&Oe.c(),ee=h(),le=m("strong"),le.textContent="Export",de=h(),ie=m("div"),we=m("div"),we.textContent="Hour",Ee=h(),Ce=m("div"),ve=$(Ie),Pe=$(" kWh"),Ae=h(),Je&&Je.c(),me=h(),se=m("div"),se.textContent="Day",pe=h(),Q=m("div"),Ne=$(oe),Me=$(" kWh"),he=h(),Be&&Be.c(),x=h(),_e=m("div"),_e.textContent="Month",Le=h(),We=m("div"),Fe=$(Ke),je=$(" kWh"),re=h(),xe&&xe.c(),ge=h(),Lt=m("div"),Lt.textContent="Last mo.",Ll=h(),Zt=m("div"),$l=$(ft),al=$(" kWh"),Ot=h(),et&&et.c(),u(r,"class","text-right"),u(v,"class","text-right"),u(M,"class","text-right"),u(U,"class","text-right"),u(n,"class",j="grid grid-cols-"+t[5]+" mb-3"),u(Ce,"class","text-right"),u(Q,"class","text-right"),u(We,"class","text-right"),u(Zt,"class","text-right"),u(ie,"class",dt="grid grid-cols-"+t[5])},m(ue,be){y(ue,e,be),y(ue,l,be),y(ue,n,be),s(n,i),s(n,o),s(n,r),s(r,f),s(r,c),s(n,p),Qe&&Qe.m(n,null),s(n,_),s(n,b),s(n,d),s(n,v),s(v,k),s(v,C),s(n,T),Xe&&Xe.m(n,null),s(n,P),s(n,E),s(n,S),s(n,M),s(M,F),s(M,z),s(n,O),Ze&&Ze.m(n,null),s(n,R),s(n,q),s(n,Y),s(n,U),s(U,G),s(U,L),s(n,W),Oe&&Oe.m(n,null),y(ue,ee,be),y(ue,le,be),y(ue,de,be),y(ue,ie,be),s(ie,we),s(ie,Ee),s(ie,Ce),s(Ce,ve),s(Ce,Pe),s(ie,Ae),Je&&Je.m(ie,null),s(ie,me),s(ie,se),s(ie,pe),s(ie,Q),s(Q,Ne),s(Q,Me),s(ie,he),Be&&Be.m(ie,null),s(ie,x),s(ie,_e),s(ie,Le),s(ie,We),s(We,Fe),s(We,je),s(ie,re),xe&&xe.m(ie,null),s(ie,ge),s(ie,Lt),s(ie,Ll),s(ie,Zt),s(Zt,$l),s(Zt,al),s(ie,Ot),et&&et.m(ie,null)},p(ue,be){be&2&&a!==(a=ce(ue[1].h.u,2)+"")&&B(f,a),ue[4]?Qe?Qe.p(ue,be):(Qe=ha(ue),Qe.c(),Qe.m(n,_)):Qe&&(Qe.d(1),Qe=null),be&2&&g!==(g=ce(ue[1].d.u,1)+"")&&B(k,g),ue[4]?Xe?Xe.p(ue,be):(Xe=ba(ue),Xe.c(),Xe.m(n,P)):Xe&&(Xe.d(1),Xe=null),be&2&&I!==(I=ce(ue[1].m.u)+"")&&B(F,I),ue[4]?Ze?Ze.p(ue,be):(Ze=ga(ue),Ze.c(),Ze.m(n,R)):Ze&&(Ze.d(1),Ze=null),be&1&&H!==(H=ce(ue[0].last_month.u)+"")&&B(G,H),ue[4]?Oe?Oe.p(ue,be):(Oe=ka(ue),Oe.c(),Oe.m(n,null)):Oe&&(Oe.d(1),Oe=null),be&32&&j!==(j="grid grid-cols-"+ue[5]+" mb-3")&&u(n,"class",j),be&2&&Ie!==(Ie=ce(ue[1].h.p,2)+"")&&B(ve,Ie),ue[4]?Je?Je.p(ue,be):(Je=wa(ue),Je.c(),Je.m(ie,me)):Je&&(Je.d(1),Je=null),be&2&&oe!==(oe=ce(ue[1].d.p,1)+"")&&B(Ne,oe),ue[4]?Be?Be.p(ue,be):(Be=ya(ue),Be.c(),Be.m(ie,x)):Be&&(Be.d(1),Be=null),be&2&&Ke!==(Ke=ce(ue[1].m.p)+"")&&B(Fe,Ke),ue[4]?xe?xe.p(ue,be):(xe=$a(ue),xe.c(),xe.m(ie,ge)):xe&&(xe.d(1),xe=null),be&1&&ft!==(ft=ce(ue[0].last_month.p)+"")&&B($l,ft),ue[4]?et?et.p(ue,be):(et=Ca(ue),et.c(),et.m(ie,null)):et&&(et.d(1),et=null),be&32&&dt!==(dt="grid grid-cols-"+ue[5])&&u(ie,"class",dt)},d(ue){ue&&w(e),ue&&w(l),ue&&w(n),Qe&&Qe.d(),Xe&&Xe.d(),Ze&&Ze.d(),Oe&&Oe.d(),ue&&w(ee),ue&&w(le),ue&&w(de),ue&&w(ie),Je&&Je.d(),Be&&Be.d(),xe&&xe.d(),et&&et.d()}}}function va(t){let e,l,n,i,o,r,a=ce(t[1].h.c,2)+"",f,c,p,_,b,d,v,g=ce(t[1].d.c,1)+"",k,C,T,P,E,S,M,I=ce(t[1].m.c)+"",F,z,O,R,q,Y,U,H=ce(t[0].last_month.c)+"",G,L,W;return{c(){e=m("strong"),e.textContent="Cost",l=h(),n=m("div"),i=m("div"),i.textContent="Hour",o=h(),r=m("div"),f=$(a),c=h(),p=$(t[2]),_=h(),b=m("div"),b.textContent="Day",d=h(),v=m("div"),k=$(g),C=h(),T=$(t[2]),P=h(),E=m("div"),E.textContent="Month",S=h(),M=m("div"),F=$(I),z=h(),O=$(t[2]),R=h(),q=m("div"),q.textContent="Last month",Y=h(),U=m("div"),G=$(H),L=h(),W=$(t[2]),u(r,"class","text-right"),u(v,"class","text-right"),u(M,"class","text-right"),u(U,"class","text-right"),u(n,"class","grid grid-cols-2")},m(j,ee){y(j,e,ee),y(j,l,ee),y(j,n,ee),s(n,i),s(n,o),s(n,r),s(r,f),s(r,c),s(r,p),s(n,_),s(n,b),s(n,d),s(n,v),s(v,k),s(v,C),s(v,T),s(n,P),s(n,E),s(n,S),s(n,M),s(M,F),s(M,z),s(M,O),s(n,R),s(n,q),s(n,Y),s(n,U),s(U,G),s(U,L),s(U,W)},p(j,ee){ee&2&&a!==(a=ce(j[1].h.c,2)+"")&&B(f,a),ee&4&&B(p,j[2]),ee&2&&g!==(g=ce(j[1].d.c,1)+"")&&B(k,g),ee&4&&B(T,j[2]),ee&2&&I!==(I=ce(j[1].m.c)+"")&&B(F,I),ee&4&&B(O,j[2]),ee&1&&H!==(H=ce(j[0].last_month.c)+"")&&B(G,H),ee&4&&B(W,j[2])},d(j){j&&w(e),j&&w(l),j&&w(n)}}}function ha(t){let e,l=ce(t[1].h.c,2)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].h.c,2)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function ba(t){let e,l=ce(t[1].d.c,1)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].d.c,1)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function ga(t){let e,l=ce(t[1].m.c)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].m.c)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function ka(t){let e,l=ce(t[0].last_month.c)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&1&&l!==(l=ce(r[0].last_month.c)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function wa(t){let e,l=ce(t[1].h.i,2)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].h.i,2)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function ya(t){let e,l=ce(t[1].d.i,1)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].d.i,1)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function $a(t){let e,l=ce(t[1].m.i)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].m.i)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Ca(t){let e,l=ce(t[0].last_month.i)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&1&&l!==(l=ce(r[0].last_month.i)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function np(t){let e,l,n,i,o,r,a=t[1]&&da(t);return{c(){e=m("div"),l=m("strong"),l.textContent="Real time calculation",n=h(),i=m("br"),o=m("br"),r=h(),a&&a.c(),u(e,"class","mx-2 text-sm")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),s(e,r),a&&a.m(e,null)},p(f,[c]){f[1]?a?a.p(f,c):(a=da(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:ne,o:ne,d(f){f&&w(e),a&&a.d()}}}function ip(t,e,l){let{sysinfo:n}=e,{data:i}=e,{currency:o}=e,{hasExport:r}=e,a=!1,f=3;return t.$$set=c=>{"sysinfo"in c&&l(0,n=c.sysinfo),"data"in c&&l(1,i=c.data),"currency"in c&&l(2,o=c.currency),"hasExport"in c&&l(3,r=c.hasExport)},t.$$.update=()=>{t.$$.dirty&18&&(l(4,a=i&&i.h&&(i.h.c>.01||i.d.c>.01||i.m.c>.01||i.h.i>.01||i.d.i>.01||i.m.i>.01)),l(5,f=a?3:2))},[n,i,o,r,a,f]}class sp extends $e{constructor(e){super(),ye(this,e,ip,np,ke,{sysinfo:0,data:1,currency:2,hasExport:3})}}function op(t){let e,l,n,i;return n=new on({props:{config:t[0]}}),{c(){e=m("a"),e.textContent="Provided by ENTSO-E",l=h(),J(n.$$.fragment),u(e,"href","https://transparency.entsoe.eu/"),u(e,"target","_blank"),u(e,"class","text-xs float-right z-40")},m(o,r){y(o,e,r),y(o,l,r),X(n,o,r),i=!0},p(o,[r]){const a={};r&1&&(a.config=o[0]),n.$set(a)},i(o){i||(N(n.$$.fragment,o),i=!0)},o(o){D(n.$$.fragment,o),i=!1},d(o){o&&w(e),o&&w(l),Z(n,o)}}}function up(t,e,l){let{json:n}=e,{sysinfo:i}=e,o={},r=0,a=0;return t.$$set=f=>{"json"in f&&l(1,n=f.json),"sysinfo"in f&&l(2,i=f.sysinfo)},t.$$.update=()=>{if(t.$$.dirty&30){let f=n.currency,c=new Date().getUTCHours(),p=0,_=0,b=0,d=[],v=[],g=[],k=new Date;for(sl(k,i.clock_offset),p=c;p<24&&(_=n[De(b++)],_!=null);p++)v.push({label:De(k.getUTCHours())}),g.push(_*100),l(4,a=Math.min(a,_*100)),l(3,r=Math.max(r,_*100)),sl(k,1);for(p=0;p<24&&(_=n[De(b++)],_!=null);p++)v.push({label:De(k.getUTCHours())}),g.push(_*100),l(4,a=Math.min(a,_*100)),l(3,r=Math.max(r,_*100)),sl(k,1);if(a>-100&&r<100){switch(f){case"NOK":case"SEK":case"DKK":f="øre";break;case"EUR":f="cent";break;default:f=f+"/100"}for(l(4,a*=100),l(3,r*=100),p=0;p=0?S.toFixed(M):"",title:S>=0?S.toFixed(2)+" "+f:"",value:_>=0?Math.abs(_):0,label2:S<0?S.toFixed(M):"",title2:S<0?S.toFixed(2)+" "+f:"",value2:_<0?Math.abs(_):0,color:"#7c3aed"})}let T=Math.max(r,Math.abs(a));if(a<0){l(4,a=Math.min(T/4*-1,a));let S=Math.ceil(Math.abs(a)/T*4),M=a/S;for(p=1;p{"json"in f&&l(1,n=f.json),"sysinfo"in f&&l(2,i=f.sysinfo)},t.$$.update=()=>{if(t.$$.dirty&30){let f=0,c=[],p=[],_=[],b=sl(new Date,-24),d=new Date().getUTCHours();for(sl(b,i.clock_offset),f=d;f<24;f++){let k=n["i"+De(f)],C=n["e"+De(f)];k===void 0&&(k=0),C===void 0&&(C=0),p.push({label:De(b.getUTCHours())}),_.push({label:k.toFixed(1),title:k.toFixed(2)+" kWh",value:k*10,label2:C.toFixed(1),title2:C.toFixed(2)+" kWh",value2:C*10,color:"#7c3aed"}),l(4,a=Math.max(a,C*10)),l(3,r=Math.max(r,k*10)),sl(b,1)}for(f=0;f{"json"in f&&l(1,n=f.json),"sysinfo"in f&&l(2,i=f.sysinfo)},t.$$.update=()=>{if(t.$$.dirty&30){let f=0,c=[],p=[],_=[],b=new Date,d=new Date;for(sl(b,i.clock_offset),sl(d,i.clock_offset),d.setDate(0),f=b.getDate();f<=d.getDate();f++){let k=n["i"+De(f)],C=n["e"+De(f)];k===void 0&&(k=0),C===void 0&&(C=0),p.push({label:De(f)}),_.push({label:k.toFixed(k<10?1:0),title:k.toFixed(2)+" kWh",value:k,label2:C.toFixed(C<10?1:0),title2:C.toFixed(2)+" kWh",value2:C,color:"#7c3aed"}),l(4,a=Math.max(a,C)),l(3,r=Math.max(r,k))}for(f=1;f{"json"in a&&l(1,n=a.json)},t.$$.update=()=>{if(t.$$.dirty&14){let a=0,f=0,c=[],p=[],_=[];n.s&&n.s.forEach((v,g)=>{var k=v.n?v.n:v.a;f=v.v,f==-127&&(f=0),p.push({label:k.slice(-4)}),_.push({label:f.toFixed(1),value:f,color:"#7c3aed"}),l(3,r=Math.min(r,f)),l(2,o=Math.max(o,f))}),l(2,o=Math.ceil(o)),l(3,r=Math.floor(r));let b=o;r<0&&(b+=Math.abs(r));let d=b/4;for(a=0;a<5;a++)f=r+d*a,c.push({value:f,label:f.toFixed(1)});l(0,i={title:"Temperature sensors (°C)",height:226,width:1520,padding:{top:20,right:15,bottom:20,left:35},y:{min:r,max:o,ticks:c},x:{ticks:p},points:_})}},[i,n,o,r]}class hp extends $e{constructor(e){super(),ye(this,e,vp,dp,ke,{json:1})}}function bp(t){let e,l;return e=new on({props:{config:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,[i]){const o={};i&1&&(o.config=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}let gp=0;function kp(t,e,l){let n={},i=0,o;return Cc.subscribe(r=>{l(2,o=r)}),$c(),t.$$.update=()=>{if(t.$$.dirty&6){let r=0,a=[],f=[],c=[];if(a.push({value:0,label:0}),o&&o.p)for(r=0;r0?De(p.d)+"."+Vs[new Date().getMonth()]:"-"}),l(1,i=Math.max(i,p.v))}if(o&&o.t){for(r=0;r=i)break;a.push({value:p,label:p})}a.push({label:o.m.toFixed(1),align:"right",color:"green",value:o.m})}o&&o.c&&(a.push({label:o.c.toFixed(0),color:"orange",value:o.c}),l(1,i=Math.max(i,o.c))),l(1,i=Math.ceil(i)),l(0,n={title:"Tariff peaks",padding:{top:20,right:35,bottom:20,left:35},y:{min:gp,max:i,ticks:a},x:{ticks:f},points:c})}},[n,i,o]}class wp extends $e{constructor(e){super(),ye(this,e,kp,bp,ke,{})}}function Ta(t){let e,l,n,i,o,r,a=(t[0].mt?vs(t[0].mt):"-")+"",f,c,p,_=(t[0].ic?t[0].ic.toFixed(1):"-")+"",b,d,v;return i=new Mc({props:{val:t[0].i?t[0].i:0,max:t[0].im?t[0].im:15e3,unit:"W",label:"Import",sub:t[0].p,subunit:t[0].pc,colorFn:hc}}),{c(){e=m("div"),l=m("div"),n=m("div"),J(i.$$.fragment),o=h(),r=m("div"),f=$(a),c=h(),p=m("div"),b=$(_),d=$(" kWh"),u(n,"class","col-span-2"),u(p,"class","text-right"),u(l,"class","grid grid-cols-2"),u(e,"class","cnt")},m(g,k){y(g,e,k),s(e,l),s(l,n),X(i,n,null),s(l,o),s(l,r),s(r,f),s(l,c),s(l,p),s(p,b),s(p,d),v=!0},p(g,k){const C={};k&1&&(C.val=g[0].i?g[0].i:0),k&1&&(C.max=g[0].im?g[0].im:15e3),k&1&&(C.sub=g[0].p),k&1&&(C.subunit=g[0].pc),i.$set(C),(!v||k&1)&&a!==(a=(g[0].mt?vs(g[0].mt):"-")+"")&&B(f,a),(!v||k&1)&&_!==(_=(g[0].ic?g[0].ic.toFixed(1):"-")+"")&&B(b,_)},i(g){v||(N(i.$$.fragment,g),v=!0)},o(g){D(i.$$.fragment,g),v=!1},d(g){g&&w(e),Z(i)}}}function Sa(t){let e,l,n,i,o,r,a,f,c=(t[0].ec?t[0].ec.toFixed(1):"-")+"",p,_,b;return i=new Mc({props:{val:t[0].e?t[0].e:0,max:t[0].om?t[0].om*1e3:1e4,unit:"W",label:"Export",colorFn:nm}}),{c(){e=m("div"),l=m("div"),n=m("div"),J(i.$$.fragment),o=h(),r=m("div"),a=h(),f=m("div"),p=$(c),_=$(" kWh"),u(n,"class","col-span-2"),u(f,"class","text-right"),u(l,"class","grid grid-cols-2"),u(e,"class","cnt")},m(d,v){y(d,e,v),s(e,l),s(l,n),X(i,n,null),s(l,o),s(l,r),s(l,a),s(l,f),s(f,p),s(f,_),b=!0},p(d,v){const g={};v&1&&(g.val=d[0].e?d[0].e:0),v&1&&(g.max=d[0].om?d[0].om*1e3:1e4),i.$set(g),(!b||v&1)&&c!==(c=(d[0].ec?d[0].ec.toFixed(1):"-")+"")&&B(p,c)},i(d){b||(N(i.$$.fragment,d),b=!0)},o(d){D(i.$$.fragment,d),b=!1},d(d){d&&w(e),Z(i)}}}function Pa(t){let e,l,n;return l=new Km({props:{u1:t[0].u1,u2:t[0].u2,u3:t[0].u3,ds:t[0].ds}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&1&&(r.u1=i[0].u1),o&1&&(r.u2=i[0].u2),o&1&&(r.u3=i[0].u3),o&1&&(r.ds=i[0].ds),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Na(t){let e,l,n;return l=new Zm({props:{u1:t[0].u1,u2:t[0].u2,u3:t[0].u3,i1:t[0].i1,i2:t[0].i2,i3:t[0].i3,max:t[0].mf?t[0].mf:32}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&1&&(r.u1=i[0].u1),o&1&&(r.u2=i[0].u2),o&1&&(r.u3=i[0].u3),o&1&&(r.i1=i[0].i1),o&1&&(r.i2=i[0].i2),o&1&&(r.i3=i[0].i3),o&1&&(r.max=i[0].mf?i[0].mf:32),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ma(t){let e,l,n;return l=new ep({props:{importInstant:t[0].ri,exportInstant:t[0].re,importTotal:t[0].ric,exportTotal:t[0].rec}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&1&&(r.importInstant=i[0].ri),o&1&&(r.exportInstant=i[0].re),o&1&&(r.importTotal=i[0].ric),o&1&&(r.exportTotal=i[0].rec),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Aa(t){let e,l,n;return l=new sp({props:{sysinfo:t[1],data:t[0].ea,currency:t[0].pc,hasExport:t[0].om>0||t[0].e>0}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&2&&(r.sysinfo=i[1]),o&1&&(r.data=i[0].ea),o&1&&(r.currency=i[0].pc),o&1&&(r.hasExport=i[0].om>0||i[0].e>0),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Da(t){let e,l,n;return l=new wp({}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt h-64")},m(i,o){y(i,e,o),X(l,e,null),n=!0},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ea(t){let e,l,n;return l=new rp({props:{json:t[2],sysinfo:t[1]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&4&&(r.json=i[2]),o&2&&(r.sysinfo=i[1]),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ia(t){let e,l,n;return l=new cp({props:{json:t[3],sysinfo:t[1]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&8&&(r.json=i[3]),o&2&&(r.sysinfo=i[1]),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Fa(t){let e,l,n;return l=new _p({props:{json:t[4],sysinfo:t[1]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&16&&(r.json=i[4]),o&2&&(r.sysinfo=i[1]),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ra(t){let e,l,n;return l=new hp({props:{json:t[5]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&32&&(r.json=i[5]),l.$set(r)},i(i){n||(N(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function yp(t){let e,l=Ye(t[1].ui.i,t[0].i),n,i=Ye(t[1].ui.e,t[0].om||t[0].e>0),o,r=Ye(t[1].ui.v,t[0].u1>100||t[0].u2>100||t[0].u3>100),a,f=Ye(t[1].ui.a,t[0].i1>.01||t[0].i2>.01||t[0].i3>.01),c,p=Ye(t[1].ui.r,t[0].ri>0||t[0].re>0||t[0].ric>0||t[0].rec>0),_,b=Ye(t[1].ui.c,t[0].ea),d,v=Ye(t[1].ui.t,t[0].pr&&(t[0].pr.startsWith("10YNO")||t[0].pr=="10Y1001A1001A48H")),g,k=Ye(t[1].ui.p,t[0].pe&&!Number.isNaN(t[0].p)),C,T=Ye(t[1].ui.d,t[3]),P,E=Ye(t[1].ui.m,t[4]),S,M=Ye(t[1].ui.s,t[0].t&&t[0].t!=-127&&t[5].c>1),I,F=l&&Ta(t),z=i&&Sa(t),O=r&&Pa(t),R=f&&Na(t),q=p&&Ma(t),Y=b&&Aa(t),U=v&&Da(),H=k&&Ea(t),G=T&&Ia(t),L=E&&Fa(t),W=M&&Ra(t);return{c(){e=m("div"),F&&F.c(),n=h(),z&&z.c(),o=h(),O&&O.c(),a=h(),R&&R.c(),c=h(),q&&q.c(),_=h(),Y&&Y.c(),d=h(),U&&U.c(),g=h(),H&&H.c(),C=h(),G&&G.c(),P=h(),L&&L.c(),S=h(),W&&W.c(),u(e,"class","grid 2xl:grid-cols-6 xl:grid-cols-5 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2")},m(j,ee){y(j,e,ee),F&&F.m(e,null),s(e,n),z&&z.m(e,null),s(e,o),O&&O.m(e,null),s(e,a),R&&R.m(e,null),s(e,c),q&&q.m(e,null),s(e,_),Y&&Y.m(e,null),s(e,d),U&&U.m(e,null),s(e,g),H&&H.m(e,null),s(e,C),G&&G.m(e,null),s(e,P),L&&L.m(e,null),s(e,S),W&&W.m(e,null),I=!0},p(j,[ee]){ee&3&&(l=Ye(j[1].ui.i,j[0].i)),l?F?(F.p(j,ee),ee&3&&N(F,1)):(F=Ta(j),F.c(),N(F,1),F.m(e,n)):F&&(Te(),D(F,1,1,()=>{F=null}),Se()),ee&3&&(i=Ye(j[1].ui.e,j[0].om||j[0].e>0)),i?z?(z.p(j,ee),ee&3&&N(z,1)):(z=Sa(j),z.c(),N(z,1),z.m(e,o)):z&&(Te(),D(z,1,1,()=>{z=null}),Se()),ee&3&&(r=Ye(j[1].ui.v,j[0].u1>100||j[0].u2>100||j[0].u3>100)),r?O?(O.p(j,ee),ee&3&&N(O,1)):(O=Pa(j),O.c(),N(O,1),O.m(e,a)):O&&(Te(),D(O,1,1,()=>{O=null}),Se()),ee&3&&(f=Ye(j[1].ui.a,j[0].i1>.01||j[0].i2>.01||j[0].i3>.01)),f?R?(R.p(j,ee),ee&3&&N(R,1)):(R=Na(j),R.c(),N(R,1),R.m(e,c)):R&&(Te(),D(R,1,1,()=>{R=null}),Se()),ee&3&&(p=Ye(j[1].ui.r,j[0].ri>0||j[0].re>0||j[0].ric>0||j[0].rec>0)),p?q?(q.p(j,ee),ee&3&&N(q,1)):(q=Ma(j),q.c(),N(q,1),q.m(e,_)):q&&(Te(),D(q,1,1,()=>{q=null}),Se()),ee&3&&(b=Ye(j[1].ui.c,j[0].ea)),b?Y?(Y.p(j,ee),ee&3&&N(Y,1)):(Y=Aa(j),Y.c(),N(Y,1),Y.m(e,d)):Y&&(Te(),D(Y,1,1,()=>{Y=null}),Se()),ee&3&&(v=Ye(j[1].ui.t,j[0].pr&&(j[0].pr.startsWith("10YNO")||j[0].pr=="10Y1001A1001A48H"))),v?U?ee&3&&N(U,1):(U=Da(),U.c(),N(U,1),U.m(e,g)):U&&(Te(),D(U,1,1,()=>{U=null}),Se()),ee&3&&(k=Ye(j[1].ui.p,j[0].pe&&!Number.isNaN(j[0].p))),k?H?(H.p(j,ee),ee&3&&N(H,1)):(H=Ea(j),H.c(),N(H,1),H.m(e,C)):H&&(Te(),D(H,1,1,()=>{H=null}),Se()),ee&10&&(T=Ye(j[1].ui.d,j[3])),T?G?(G.p(j,ee),ee&10&&N(G,1)):(G=Ia(j),G.c(),N(G,1),G.m(e,P)):G&&(Te(),D(G,1,1,()=>{G=null}),Se()),ee&18&&(E=Ye(j[1].ui.m,j[4])),E?L?(L.p(j,ee),ee&18&&N(L,1)):(L=Fa(j),L.c(),N(L,1),L.m(e,S)):L&&(Te(),D(L,1,1,()=>{L=null}),Se()),ee&35&&(M=Ye(j[1].ui.s,j[0].t&&j[0].t!=-127&&j[5].c>1)),M?W?(W.p(j,ee),ee&35&&N(W,1)):(W=Ra(j),W.c(),N(W,1),W.m(e,null)):W&&(Te(),D(W,1,1,()=>{W=null}),Se())},i(j){I||(N(F),N(z),N(O),N(R),N(q),N(Y),N(U),N(H),N(G),N(L),N(W),I=!0)},o(j){D(F),D(z),D(O),D(R),D(q),D(Y),D(U),D(H),D(G),D(L),D(W),I=!1},d(j){j&&w(e),F&&F.d(),z&&z.d(),O&&O.d(),R&&R.d(),q&&q.d(),Y&&Y.d(),U&&U.d(),H&&H.d(),G&&G.d(),L&&L.d(),W&&W.d()}}}function $p(t,e,l){let{data:n={}}=e,{sysinfo:i={}}=e,o={},r={},a={},f={};return bc.subscribe(c=>{l(2,o=c)}),gc.subscribe(c=>{l(3,r=c)}),kc.subscribe(c=>{l(4,a=c)}),yc.subscribe(c=>{l(5,f=c)}),t.$$set=c=>{"data"in c&&l(0,n=c.data),"sysinfo"in c&&l(1,i=c.sysinfo)},[n,i,o,r,a,f]}class Cp extends $e{constructor(e){super(),ye(this,e,$p,yp,ke,{data:0,sysinfo:1})}}let eo={};const Ac=ut(eo);async function Tp(){eo=await(await fetch("/configuration.json")).json(),Ac.set(eo)}function La(t,e,l){const n=t.slice();return n[2]=e[l],n[4]=l,n}function Sp(t){let e;return{c(){e=m("option"),e.textContent="UART0",e.__value=3,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Pp(t){let e;return{c(){e=m("option"),e.textContent="UART0",e.__value=20,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Oa(t){let e;return{c(){e=m("option"),e.textContent="UART2",e.__value=113,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Ua(t){let e,l,n;return{c(){e=m("option"),e.textContent="UART1",l=h(),n=m("option"),n.textContent="UART2",e.__value=9,e.value=e.__value,n.__value=16,n.value=n.__value},m(i,o){y(i,e,o),y(i,l,o),y(i,n,o)},d(i){i&&w(e),i&&w(l),i&&w(n)}}}function qa(t){let e;return{c(){e=m("option"),e.textContent="UART1",e.__value=18,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Ha(t){let e,l,n;return{c(){e=m("option"),l=$("GPIO"),n=$(t[4]),e.__value=t[4],e.value=e.__value},m(i,o){y(i,e,o),s(e,l),s(e,n)},d(i){i&&w(e)}}}function ja(t){let e,l=t[4]>3&&!(t[0]=="esp32"&&(t[4]==9||t[4]==16))&&!(t[0]=="esp32s2"&&t[4]==18)&&!(t[0]=="esp8266"&&(t[4]==3||t[4]==113))&&Ha(t);return{c(){l&&l.c(),e=Ge()},m(n,i){l&&l.m(n,i),y(n,e,i)},p(n,i){n[4]>3&&!(n[0]=="esp32"&&(n[4]==9||n[4]==16))&&!(n[0]=="esp32s2"&&n[4]==18)&&!(n[0]=="esp8266"&&(n[4]==3||n[4]==113))?l||(l=Ha(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(n){l&&l.d(n),n&&w(e)}}}function Np(t){let e,l,n,i,o;function r(v,g){return v[0]=="esp32c3"?Pp:Sp}let a=r(t),f=a(t),c=t[0]=="esp8266"&&Oa(),p=(t[0]=="esp32"||t[0]=="esp32solo")&&Ua(),_=t[0]=="esp32s2"&&qa(),b={length:t[1]+1},d=[];for(let v=0;v{"chip"in o&&l(0,n=o.chip)},t.$$.update=()=>{if(t.$$.dirty&1)switch(n){case"esp8266":l(1,i=16);break;case"esp32s2":l(1,i=44);break;case"esp32c3":l(1,i=19);break}},[n,i]}class Dc extends $e{constructor(e){super(),ye(this,e,Mp,Np,ke,{chip:0})}}function Wa(t){let e,l,n=t[1]&&Ga(t);return{c(){e=m("div"),l=m("div"),n&&n.c(),u(l,"class","fixed inset-0 bg-gray-500 bg-opacity-50 flex items-center justify-center"),u(e,"class","z-50"),u(e,"aria-modal","true")},m(i,o){y(i,e,o),s(e,l),n&&n.m(l,null)},p(i,o){i[1]?n?n.p(i,o):(n=Ga(i),n.c(),n.m(l,null)):n&&(n.d(1),n=null)},d(i){i&&w(e),n&&n.d()}}}function Ga(t){let e,l;return{c(){e=m("div"),l=$(t[1]),u(e,"class","bg-white m-2 p-3 rounded-md shadow-lg pb-4 text-gray-700 w-96")},m(n,i){y(n,e,i),s(e,l)},p(n,i){i&2&&B(l,n[1])},d(n){n&&w(e)}}}function Ap(t){let e,l=t[0]&&Wa(t);return{c(){l&&l.c(),e=Ge()},m(n,i){l&&l.m(n,i),y(n,e,i)},p(n,[i]){n[0]?l?l.p(n,i):(l=Wa(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:ne,o:ne,d(n){l&&l.d(n),n&&w(e)}}}function Dp(t,e,l){let{active:n}=e,{message:i}=e;return t.$$set=o=>{"active"in o&&l(0,n=o.active),"message"in o&&l(1,i=o.message)},[n,i]}class Mt extends $e{constructor(e){super(),ye(this,e,Dp,Ap,ke,{active:0,message:1})}}function Ba(t,e,l){const n=t.slice();return n[1]=e[l],n}function Ya(t){let e,l,n=t[1]+"",i;return{c(){e=m("option"),l=$("Europe/"),i=$(n),e.__value="Europe/"+t[1],e.value=e.__value},m(o,r){y(o,e,r),s(e,l),s(e,i)},p:ne,d(o){o&&w(e)}}}function Ep(t){let e,l,n,i=t[0],o=[];for(let r=0;r{r[p]=null}),Se(),l=r[e],l||(l=r[e]=o[e](f),l.c()),N(l,1),l.m(n.parentNode,n))},i(f){i||(N(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function Gp(t){let e,l;return e=new ol({props:{color:"blue",text:"Upload cert",title:"Click here to upload certificate"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Bp(t){let e,l;return e=new ol({props:{color:"green",text:"Cert OK",title:"Click here to replace certificate"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Yp(t){let e,l,n,i;const o=[Bp,Gp],r=[];function a(f,c){return f[3].q.s.r?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=Ge()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e!==p&&(Te(),D(r[p],1,1,()=>{r[p]=null}),Se(),l=r[e],l||(l=r[e]=o[e](f),l.c()),N(l,1),l.m(n.parentNode,n))},i(f){i||(N(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function zp(t){let e,l;return e=new ol({props:{color:"blue",text:"Upload key",title:"Click here to upload key"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Vp(t){let e,l;return e=new ol({props:{color:"green",text:"Key OK",title:"Click here to replace key"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Kp(t){let e,l,n,i;const o=[Vp,zp],r=[];function a(f,c){return f[3].q.s.k?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=Ge()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e!==p&&(Te(),D(r[p],1,1,()=>{r[p]=null}),Se(),l=r[e],l||(l=r[e]=o[e](f),l.c()),N(l,1),l.m(n.parentNode,n))},i(f){i||(N(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function lf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U,H,G;return o=new It({}),{c(){e=m("div"),l=m("strong"),l.textContent="Domoticz",n=h(),i=m("a"),J(o.$$.fragment),r=h(),a=m("input"),f=h(),c=m("div"),p=m("div"),_=$("Electricity IDX"),b=m("br"),d=h(),v=m("input"),g=h(),k=m("div"),C=$("Current IDX"),T=m("br"),P=h(),E=m("input"),S=h(),M=m("div"),I=$(`Voltage IDX: L1, L2 & L3 - `),F=m("div"),z=m("input"),O=h(),R=m("input"),q=h(),Y=m("input"),u(l,"class","text-sm"),u(i,"href",Ft("MQTT-configuration#domoticz")),u(i,"target","_blank"),u(i,"class","float-right"),u(a,"type","hidden"),u(a,"name","o"),a.value="true",u(v,"name","oe"),u(v,"type","text"),u(v,"class","in-f tr w-full"),u(p,"class","w-1/2"),u(E,"name","oc"),u(E,"type","text"),u(E,"class","in-l tr w-full"),u(k,"class","w-1/2"),u(c,"class","my-1 flex"),u(z,"name","ou1"),u(z,"type","text"),u(z,"class","in-f tr w-1/3"),u(R,"name","ou2"),u(R,"type","text"),u(R,"class","in-m tr w-1/3"),u(Y,"name","ou3"),u(Y,"type","text"),u(Y,"class","in-l tr w-1/3"),u(F,"class","flex"),u(M,"class","my-1"),u(e,"class","cnt")},m(L,W){y(L,e,W),s(e,l),s(e,n),s(e,i),X(o,i,null),s(e,r),s(e,a),s(e,f),s(e,c),s(c,p),s(p,_),s(p,b),s(p,d),s(p,v),V(v,t[3].o.e),s(c,g),s(c,k),s(k,C),s(k,T),s(k,P),s(k,E),V(E,t[3].o.c),s(e,S),s(e,M),s(M,I),s(M,F),s(F,z),V(z,t[3].o.u1),s(F,O),s(F,R),V(R,t[3].o.u2),s(F,q),s(F,Y),V(Y,t[3].o.u3),U=!0,H||(G=[K(v,"input",t[59]),K(E,"input",t[60]),K(z,"input",t[61]),K(R,"input",t[62]),K(Y,"input",t[63])],H=!0)},p(L,W){W[0]&8&&v.value!==L[3].o.e&&V(v,L[3].o.e),W[0]&8&&E.value!==L[3].o.c&&V(E,L[3].o.c),W[0]&8&&z.value!==L[3].o.u1&&V(z,L[3].o.u1),W[0]&8&&R.value!==L[3].o.u2&&V(R,L[3].o.u2),W[0]&8&&Y.value!==L[3].o.u3&&V(Y,L[3].o.u3)},i(L){U||(N(o.$$.fragment,L),U=!0)},o(L){D(o.$$.fragment,L),U=!1},d(L){L&&w(e),Z(o),H=!1,Ve(G)}}}function nf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y;return o=new It({}),{c(){e=m("div"),l=m("strong"),l.textContent="Home-Assistant",n=h(),i=m("a"),J(o.$$.fragment),r=h(),a=m("input"),f=h(),c=m("div"),p=$("Discovery topic prefix"),_=m("br"),b=h(),d=m("input"),v=h(),g=m("div"),k=$("Hostname for URL"),C=m("br"),T=h(),P=m("input"),S=h(),M=m("div"),I=$("Name tag"),F=m("br"),z=h(),O=m("input"),u(l,"class","text-sm"),u(i,"href",Ft("MQTT-configuration#home-assistant")),u(i,"target","_blank"),u(i,"class","float-right"),u(a,"type","hidden"),u(a,"name","h"),a.value="true",u(d,"name","ht"),u(d,"type","text"),u(d,"class","in-s"),u(d,"placeholder","homeassistant"),u(c,"class","my-1"),u(P,"name","hh"),u(P,"type","text"),u(P,"class","in-s"),u(P,"placeholder",E=t[3].g.h+".local"),u(g,"class","my-1"),u(O,"name","hn"),u(O,"type","text"),u(O,"class","in-s"),u(M,"class","my-1"),u(e,"class","cnt")},m(U,H){y(U,e,H),s(e,l),s(e,n),s(e,i),X(o,i,null),s(e,r),s(e,a),s(e,f),s(e,c),s(c,p),s(c,_),s(c,b),s(c,d),V(d,t[3].h.t),s(e,v),s(e,g),s(g,k),s(g,C),s(g,T),s(g,P),V(P,t[3].h.h),s(e,S),s(e,M),s(M,I),s(M,F),s(M,z),s(M,O),V(O,t[3].h.n),R=!0,q||(Y=[K(d,"input",t[64]),K(P,"input",t[65]),K(O,"input",t[66])],q=!0)},p(U,H){H[0]&8&&d.value!==U[3].h.t&&V(d,U[3].h.t),(!R||H[0]&8&&E!==(E=U[3].g.h+".local"))&&u(P,"placeholder",E),H[0]&8&&P.value!==U[3].h.h&&V(P,U[3].h.h),H[0]&8&&O.value!==U[3].h.n&&V(O,U[3].h.n)},i(U){R||(N(o.$$.fragment,U),R=!0)},o(U){D(o.$$.fragment,U),R=!1},d(U){U&&w(e),Z(o),q=!1,Ve(Y)}}}function sf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P;o=new It({});let E={length:9},S=[];for(let M=0;M20&&af(t),p=t[0].chip=="esp8266"&&mf(t);return{c(){e=m("div"),l=m("strong"),l.textContent="Hardware",n=h(),i=m("a"),J(o.$$.fragment),r=h(),c&&c.c(),a=h(),p&&p.c(),u(l,"class","text-sm"),u(i,"href",Ft("GPIO-configuration")),u(i,"target","_blank"),u(i,"class","float-right"),u(e,"class","cnt")},m(_,b){y(_,e,b),s(e,l),s(e,n),s(e,i),X(o,i,null),s(e,r),c&&c.m(e,null),s(e,a),p&&p.m(e,null),f=!0},p(_,b){_[0].board>20?c?(c.p(_,b),b[0]&1&&N(c,1)):(c=af(_),c.c(),N(c,1),c.m(e,a)):c&&(Te(),D(c,1,1,()=>{c=null}),Se()),_[0].chip=="esp8266"?p?p.p(_,b):(p=mf(_),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i(_){f||(N(o.$$.fragment,_),N(c),f=!0)},o(_){D(o.$$.fragment,_),D(c),f=!1},d(_){_&&w(e),Z(o),c&&c.d(),p&&p.d()}}}function af(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U,H,G,L,W,j,ee,le,de,ie,we,Ee,Ce,Ie,ve,Pe,Ae,me,se,pe,Q,oe,Ne,Me,he,x,_e,Le,We,Ke;b=new Dc({props:{chip:t[0].chip}});let Fe=t[0].chip!="esp8266"&&ff(t),je=t[3].i.v.p>0&&cf(t);return{c(){e=m("input"),l=h(),n=m("div"),i=m("div"),o=$("HAN"),r=m("label"),a=m("input"),f=$(" pullup"),c=m("br"),p=h(),_=m("select"),J(b.$$.fragment),d=h(),v=m("div"),g=$("AP button"),k=m("br"),C=h(),T=m("input"),P=h(),E=m("div"),S=$("LED"),M=m("label"),I=m("input"),F=$(" inv"),z=m("br"),O=h(),R=m("div"),q=m("input"),Y=h(),U=m("div"),H=$("RGB"),G=m("label"),L=m("input"),W=$(" inverted"),j=m("br"),ee=h(),le=m("div"),de=m("input"),ie=h(),we=m("input"),Ee=h(),Ce=m("input"),Ie=h(),ve=m("div"),Pe=$("Temperature"),Ae=m("br"),me=h(),se=m("input"),pe=h(),Q=m("div"),oe=$("Analog temp"),Ne=m("br"),Me=h(),he=m("input"),x=h(),Fe&&Fe.c(),_e=h(),je&&je.c(),u(e,"type","hidden"),u(e,"name","i"),e.value="true",u(a,"name","ihu"),a.__value="true",a.value=a.__value,u(a,"type","checkbox"),u(a,"class","rounded mb-1"),u(r,"class","ml-2"),u(_,"name","ihp"),u(_,"class","in-f w-full"),t[3].i.h.p===void 0&&tt(()=>t[71].call(_)),u(i,"class","w-1/3"),u(T,"name","ia"),u(T,"type","number"),u(T,"min","0"),u(T,"max",t[6]),u(T,"class","in-m tr w-full"),u(v,"class","w-1/3"),u(I,"name","ili"),I.__value="true",I.value=I.__value,u(I,"type","checkbox"),u(I,"class","rounded mb-1"),u(M,"class","ml-4"),u(q,"name","ilp"),u(q,"type","number"),u(q,"min","0"),u(q,"max",t[6]),u(q,"class","in-l tr w-full"),u(R,"class","flex"),u(E,"class","w-1/3"),u(L,"name","iri"),L.__value="true",L.value=L.__value,u(L,"type","checkbox"),u(L,"class","rounded mb-1"),u(G,"class","ml-4"),u(de,"name","irr"),u(de,"type","number"),u(de,"min","0"),u(de,"max",t[6]),u(de,"class","in-f tr w-1/3"),u(we,"name","irg"),u(we,"type","number"),u(we,"min","0"),u(we,"max",t[6]),u(we,"class","in-m tr w-1/3"),u(Ce,"name","irb"),u(Ce,"type","number"),u(Ce,"min","0"),u(Ce,"max",t[6]),u(Ce,"class","in-l tr w-1/3"),u(le,"class","flex"),u(U,"class","w-full"),u(se,"name","itd"),u(se,"type","number"),u(se,"min","0"),u(se,"max",t[6]),u(se,"class","in-f tr w-full"),u(ve,"class","my-1 w-1/3"),u(he,"name","ita"),u(he,"type","number"),u(he,"min","0"),u(he,"max",t[6]),u(he,"class","in-l tr w-full"),u(Q,"class","my-1 pr-1 w-1/3"),u(n,"class","flex flex-wrap")},m(re,ge){y(re,e,ge),y(re,l,ge),y(re,n,ge),s(n,i),s(i,o),s(i,r),s(r,a),a.checked=t[3].i.h.u,s(r,f),s(i,c),s(i,p),s(i,_),X(b,_,null),Re(_,t[3].i.h.p,!0),s(n,d),s(n,v),s(v,g),s(v,k),s(v,C),s(v,T),V(T,t[3].i.a),s(n,P),s(n,E),s(E,S),s(E,M),s(M,I),I.checked=t[3].i.l.i,s(M,F),s(E,z),s(E,O),s(E,R),s(R,q),V(q,t[3].i.l.p),s(n,Y),s(n,U),s(U,H),s(U,G),s(G,L),L.checked=t[3].i.r.i,s(G,W),s(U,j),s(U,ee),s(U,le),s(le,de),V(de,t[3].i.r.r),s(le,ie),s(le,we),V(we,t[3].i.r.g),s(le,Ee),s(le,Ce),V(Ce,t[3].i.r.b),s(n,Ie),s(n,ve),s(ve,Pe),s(ve,Ae),s(ve,me),s(ve,se),V(se,t[3].i.t.d),s(n,pe),s(n,Q),s(Q,oe),s(Q,Ne),s(Q,Me),s(Q,he),V(he,t[3].i.t.a),s(n,x),Fe&&Fe.m(n,null),s(n,_e),je&&je.m(n,null),Le=!0,We||(Ke=[K(a,"change",t[70]),K(_,"change",t[71]),K(T,"input",t[72]),K(I,"change",t[73]),K(q,"input",t[74]),K(L,"change",t[75]),K(de,"input",t[76]),K(we,"input",t[77]),K(Ce,"input",t[78]),K(se,"input",t[79]),K(he,"input",t[80])],We=!0)},p(re,ge){ge[0]&8&&(a.checked=re[3].i.h.u);const Lt={};ge[0]&1&&(Lt.chip=re[0].chip),b.$set(Lt),ge[0]&8&&Re(_,re[3].i.h.p),(!Le||ge[0]&64)&&u(T,"max",re[6]),ge[0]&8&&ae(T.value)!==re[3].i.a&&V(T,re[3].i.a),ge[0]&8&&(I.checked=re[3].i.l.i),(!Le||ge[0]&64)&&u(q,"max",re[6]),ge[0]&8&&ae(q.value)!==re[3].i.l.p&&V(q,re[3].i.l.p),ge[0]&8&&(L.checked=re[3].i.r.i),(!Le||ge[0]&64)&&u(de,"max",re[6]),ge[0]&8&&ae(de.value)!==re[3].i.r.r&&V(de,re[3].i.r.r),(!Le||ge[0]&64)&&u(we,"max",re[6]),ge[0]&8&&ae(we.value)!==re[3].i.r.g&&V(we,re[3].i.r.g),(!Le||ge[0]&64)&&u(Ce,"max",re[6]),ge[0]&8&&ae(Ce.value)!==re[3].i.r.b&&V(Ce,re[3].i.r.b),(!Le||ge[0]&64)&&u(se,"max",re[6]),ge[0]&8&&ae(se.value)!==re[3].i.t.d&&V(se,re[3].i.t.d),(!Le||ge[0]&64)&&u(he,"max",re[6]),ge[0]&8&&ae(he.value)!==re[3].i.t.a&&V(he,re[3].i.t.a),re[0].chip!="esp8266"?Fe?Fe.p(re,ge):(Fe=ff(re),Fe.c(),Fe.m(n,_e)):Fe&&(Fe.d(1),Fe=null),re[3].i.v.p>0?je?je.p(re,ge):(je=cf(re),je.c(),je.m(n,null)):je&&(je.d(1),je=null)},i(re){Le||(N(b.$$.fragment,re),Le=!0)},o(re){D(b.$$.fragment,re),Le=!1},d(re){re&&w(e),re&&w(l),re&&w(n),Z(b),Fe&&Fe.d(),je&&je.d(),We=!1,Ve(Ke)}}}function ff(t){let e,l,n,i,o,r,a;return{c(){e=m("div"),l=$("Vcc"),n=m("br"),i=h(),o=m("input"),u(o,"name","ivp"),u(o,"type","number"),u(o,"min","0"),u(o,"max",t[6]),u(o,"class","in-s tr w-full"),u(e,"class","my-1 pl-1 w-1/3")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),V(o,t[3].i.v.p),r||(a=K(o,"input",t[81]),r=!0)},p(f,c){c[0]&64&&u(o,"max",f[6]),c[0]&8&&ae(o.value)!==f[3].i.v.p&&V(o,f[3].i.v.p)},d(f){f&&w(e),r=!1,a()}}}function cf(t){let e,l,n,i,o,r,a,f,c,p;return{c(){e=m("div"),l=$("Voltage divider"),n=m("br"),i=h(),o=m("div"),r=m("input"),a=h(),f=m("input"),u(r,"name","ivdv"),u(r,"type","number"),u(r,"min","0"),u(r,"max","65535"),u(r,"class","in-f tr w-full"),u(r,"placeholder","VCC"),u(f,"name","ivdg"),u(f,"type","number"),u(f,"min","0"),u(f,"max","65535"),u(f,"class","in-l tr w-full"),u(f,"placeholder","GND"),u(o,"class","flex"),u(e,"class","my-1")},m(_,b){y(_,e,b),s(e,l),s(e,n),s(e,i),s(e,o),s(o,r),V(r,t[3].i.v.d.v),s(o,a),s(o,f),V(f,t[3].i.v.d.g),c||(p=[K(r,"input",t[82]),K(f,"input",t[83])],c=!0)},p(_,b){b[0]&8&&ae(r.value)!==_[3].i.v.d.v&&V(r,_[3].i.v.d.v),b[0]&8&&ae(f.value)!==_[3].i.v.d.g&&V(f,_[3].i.v.d.g)},d(_){_&&w(e),c=!1,Ve(p)}}}function mf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T=(t[0].board==2||t[0].board==100)&&pf(t);return{c(){e=m("input"),l=h(),n=m("div"),i=m("div"),o=$("Vcc offset"),r=m("br"),a=h(),f=m("input"),c=h(),p=m("div"),_=$("Multiplier"),b=m("br"),d=h(),v=m("input"),g=h(),T&&T.c(),u(e,"type","hidden"),u(e,"name","iv"),e.value="true",u(f,"name","ivo"),u(f,"type","number"),u(f,"min","0.0"),u(f,"max","3.5"),u(f,"step","0.01"),u(f,"class","in-f tr w-full"),u(i,"class","w-1/3"),u(v,"name","ivm"),u(v,"type","number"),u(v,"min","0.1"),u(v,"max","10"),u(v,"step","0.01"),u(v,"class","in-l tr w-full"),u(p,"class","w-1/3 pr-1"),u(n,"class","my-1 flex flex-wrap")},m(P,E){y(P,e,E),y(P,l,E),y(P,n,E),s(n,i),s(i,o),s(i,r),s(i,a),s(i,f),V(f,t[3].i.v.o),s(n,c),s(n,p),s(p,_),s(p,b),s(p,d),s(p,v),V(v,t[3].i.v.m),s(n,g),T&&T.m(n,null),k||(C=[K(f,"input",t[84]),K(v,"input",t[85])],k=!0)},p(P,E){E[0]&8&&ae(f.value)!==P[3].i.v.o&&V(f,P[3].i.v.o),E[0]&8&&ae(v.value)!==P[3].i.v.m&&V(v,P[3].i.v.m),P[0].board==2||P[0].board==100?T?T.p(P,E):(T=pf(P),T.c(),T.m(n,null)):T&&(T.d(1),T=null)},d(P){P&&w(e),P&&w(l),P&&w(n),T&&T.d(),k=!1,Ve(C)}}}function pf(t){let e,l,n,i,o,r,a;return{c(){e=m("div"),l=$("Boot limit"),n=m("br"),i=h(),o=m("input"),u(o,"name","ivb"),u(o,"type","number"),u(o,"min","2.5"),u(o,"max","3.5"),u(o,"step","0.1"),u(o,"class","in-s tr w-full"),u(e,"class","w-1/3 pl-1")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),V(o,t[3].i.v.b),r||(a=K(o,"input",t[86]),r=!0)},p(f,c){c[0]&8&&ae(o.value)!==f[3].i.v.b&&V(o,f[3].i.v.b)},d(f){f&&w(e),r=!1,a()}}}function _f(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C=t[3].d.t&&df();return{c(){e=m("div"),e.textContent="Debug can cause sudden reboots. Do not leave on!",l=h(),n=m("div"),i=m("label"),o=m("input"),r=$(" Enable telnet"),a=h(),C&&C.c(),f=h(),c=m("div"),p=m("select"),_=m("option"),_.textContent="Verbose",b=m("option"),b.textContent="Debug",d=m("option"),d.textContent="Info",v=m("option"),v.textContent="Warning",u(e,"class","bd-red"),u(o,"type","checkbox"),u(o,"name","dt"),o.__value="true",o.value=o.__value,u(o,"class","rounded mb-1"),u(n,"class","my-1"),_.__value=1,_.value=_.__value,b.__value=2,b.value=b.__value,d.__value=3,d.value=d.__value,v.__value=4,v.value=v.__value,u(p,"name","dl"),u(p,"class","in-s"),t[3].d.l===void 0&&tt(()=>t[89].call(p)),u(c,"class","my-1")},m(T,P){y(T,e,P),y(T,l,P),y(T,n,P),s(n,i),s(i,o),o.checked=t[3].d.t,s(i,r),y(T,a,P),C&&C.m(T,P),y(T,f,P),y(T,c,P),s(c,p),s(p,_),s(p,b),s(p,d),s(p,v),Re(p,t[3].d.l,!0),g||(k=[K(o,"change",t[88]),K(p,"change",t[89])],g=!0)},p(T,P){P[0]&8&&(o.checked=T[3].d.t),T[3].d.t?C||(C=df(),C.c(),C.m(f.parentNode,f)):C&&(C.d(1),C=null),P[0]&8&&Re(p,T[3].d.l)},d(T){T&&w(e),T&&w(l),T&&w(n),T&&w(a),C&&C.d(T),T&&w(f),T&&w(c),g=!1,Ve(k)}}}function df(t){let e;return{c(){e=m("div"),e.textContent="Telnet is unsafe and should be off when not in use",u(e,"class","bd-red")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Qp(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U,H,G,L,W,j,ee,le,de,ie,we,Ee,Ce,Ie,ve,Pe,Ae,me,se,pe,Q,oe,Ne,Me,he,x,_e,Le,We,Ke,Fe,je,re,ge,Lt,Ll,Zt,ft,$l,al,Ot,dt,Qe,Xe,Ze,Oe,Je,Be,xe,et,ue,be,Pi,fl,un,Tt,Ni,Mi,Ai,cl,Di,Ei,Ii,Ue,ml,Ut,Ol,Fi,Cl,He,rn,ho,an,fn,bo,ri,go,cn,ks,ko,Tl,Jt,Sl,wo,Ri,yo,mt,Pl,$o,Li,mn,pn,_n,dn,Oi,Co,ai,qt,To,So,Ul,Po,No,Mo,xt,vn,hn,Ao,bn,ql,Do,Eo,Io,gn,Ht,Fo,Ui,Ro,Hl,Lo,Oo,Uo,kn,jt,qo,qi,Ho,ws,jo,jl,Hi,Wt,Wo,Go,Bo,ys,ji,Gt,Yo,zo,Vo,ct,Wi,Ko,wn,yn,Qo,fi,Xo,Wl,Zo,Jo,xo,pl,eu,Gl,tu,lu,nu,_l,iu,$n,Bl,su,ou,uu,At,Cn,Tn,Sn,Pn,ru,Yl,au,fu,cu,Nn,Dt,mu,Gi,pu,Bi,Yi,Bt,_u,du,rt,zi,vu,Mn,An,hu,zl,bu,gu,ku,Nl,el,Dn,En,wu,St,Vi,Ki,yu,Pt,In,Qi,Xi,$u,$s,Zi,Ji,Yt,Cu,Tu,ci,Su,Ml,Pu,mi,zt,Nu,Mu,Au,xi,dl,Du,ze,es,Eu,Fn,Rn,Iu,pi,Fu,tl,Ru,Cs,Lu,Ou,Ln,vl,Uu,Vt,qu,Ts,Vl,Hu,ju,Wu,hl,Gu,Kl,Bu,Yu,zu,bl,Vu,On,Un,Ku,Qu,Xu,gl,Zu,qn,Ju,xu,er,vt,Hn,jn,Wn,Gn,Bn,Yn,tr,Ql,lr,nr,ir,kl,sr,Ss,Ps,Ns=t[3].p.r.startsWith("10YNO")||t[3].p.r=="10Y1001A1001A48H",Ms,ll,ts,or,zn,Vn,ur,_i,rr,di,ar,As,Nt,ls,fr,Kn,Qn,cr,vi,mr,ns,is,Kt,pr,_r,dr,Al,Ds,Xn,vr,ss,Zn,hr,os,Es,Xl,Is,Zl,Fs,Jl,Rs,xl,Qt,Ls,br;a=new It({}),F=new Fp({});let Ic=["NOK","SEK","DKK","EUR"],hi=[];for(let A=0;A<4;A+=1)hi[A]=Up(Op(t,Ic,A));let ht=t[3].p.e&&t[0].chip!="esp8266"&&Ka(t),bt=t[3].g.s>0&&Qa(t);fn=new It({});let Fc=[24,48,96,192,384,576,1152],bi=[];for(let A=0;A<7;A+=1)bi[A]=qp(Lp(t,Fc,A));let gt=t[3].m.e.e&&Xa(t),kt=t[3].m.e.e&&Za(t),wt=t[3].m.m.e&&Ja(t);yn=new It({}),An=new It({}),In=new Ec({});let yt=t[3].n.m=="static"&&xa(t);Rn=new It({});let $t=t[0].chip!="esp8266"&&ef(t),lt=t[3].q.s.e&&tf(t),nt=t[3].q.m==3&&lf(t),it=t[3].q.m==4&&nf(t),st=Ns&&sf(t);Vn=new It({});let Jn=t[7],pt=[];for(let A=0;A20||t[0].chip=="esp8266")&&rf(t);Qn=new It({});let Ct=t[3].d.s&&_f(t);return Xl=new Mt({props:{active:t[1],message:"Loading configuration"}}),Zl=new Mt({props:{active:t[2],message:"Saving configuration"}}),Jl=new Mt({props:{active:t[4],message:"Performing factory reset"}}),xl=new Mt({props:{active:t[5],message:"Device have been factory reset and switched to AP mode"}}),{c(){e=m("form"),l=m("div"),n=m("div"),i=m("strong"),i.textContent="General",o=h(),r=m("a"),J(a.$$.fragment),f=h(),c=m("input"),p=h(),_=m("div"),b=m("div"),d=m("div"),v=$("Hostname"),g=m("br"),k=h(),C=m("input"),T=h(),P=m("div"),E=$("Time zone"),S=m("br"),M=h(),I=m("select"),J(F.$$.fragment),z=h(),O=m("input"),R=h(),q=m("div"),Y=m("div"),U=m("div"),H=$("Price region"),G=m("br"),L=h(),W=m("select"),j=m("optgroup"),ee=m("option"),ee.textContent="NO1",le=m("option"),le.textContent="NO2",de=m("option"),de.textContent="NO3",ie=m("option"),ie.textContent="NO4",we=m("option"),we.textContent="NO5",Ee=m("optgroup"),Ce=m("option"),Ce.textContent="SE1",Ie=m("option"),Ie.textContent="SE2",ve=m("option"),ve.textContent="SE3",Pe=m("option"),Pe.textContent="SE4",Ae=m("optgroup"),me=m("option"),me.textContent="DK1",se=m("option"),se.textContent="DK2",pe=m("option"),pe.textContent="Austria",Q=m("option"),Q.textContent="Belgium",oe=m("option"),oe.textContent="Czech Republic",Ne=m("option"),Ne.textContent="Estonia",Me=m("option"),Me.textContent="Finland",he=m("option"),he.textContent="France",x=m("option"),x.textContent="Germany",_e=m("option"),_e.textContent="Great Britain",Le=m("option"),Le.textContent="Latvia",We=m("option"),We.textContent="Lithuania",Ke=m("option"),Ke.textContent="Netherland",Fe=m("option"),Fe.textContent="Poland",je=m("option"),je.textContent="Switzerland",re=h(),ge=m("div"),Lt=$("Currency"),Ll=m("br"),Zt=h(),ft=m("select");for(let A=0;A<4;A+=1)hi[A].c();$l=h(),al=m("div"),Ot=m("div"),dt=m("div"),Qe=$("Fixed price"),Xe=m("br"),Ze=h(),Oe=m("input"),Je=h(),Be=m("div"),xe=$("Multiplier"),et=m("br"),ue=h(),be=m("input"),Pi=h(),fl=m("div"),un=m("label"),Tt=m("input"),Ni=$(" Enable price fetch from remote server"),Mi=h(),ht&&ht.c(),Ai=h(),cl=m("div"),Di=$("Security"),Ei=m("br"),Ii=h(),Ue=m("select"),ml=m("option"),ml.textContent="None",Ut=m("option"),Ut.textContent="Only configuration",Ol=m("option"),Ol.textContent="Everything",Fi=h(),bt&&bt.c(),Cl=h(),He=m("div"),rn=m("strong"),rn.textContent="Meter",ho=h(),an=m("a"),J(fn.$$.fragment),bo=h(),ri=m("input"),go=h(),cn=m("div"),ks=m("span"),ks.textContent="Serial configuration",ko=h(),Tl=m("div"),Jt=m("select"),Sl=m("option"),wo=$("Autodetect");for(let A=0;A<7;A+=1)bi[A].c();yo=h(),mt=m("select"),Pl=m("option"),$o=$("-"),mn=m("option"),mn.textContent="7N1",pn=m("option"),pn.textContent="8N1",_n=m("option"),_n.textContent="7E1",dn=m("option"),dn.textContent="8E1",Co=h(),ai=m("label"),qt=m("input"),To=$(" inverted"),So=h(),Ul=m("div"),Po=$("Voltage"),No=m("br"),Mo=h(),xt=m("select"),vn=m("option"),vn.textContent="400V (TN)",hn=m("option"),hn.textContent="230V (IT/TT)",Ao=h(),bn=m("div"),ql=m("div"),Do=$("Main fuse"),Eo=m("br"),Io=h(),gn=m("label"),Ht=m("input"),Fo=h(),Ui=m("span"),Ui.textContent="A",Ro=h(),Hl=m("div"),Lo=$("Production"),Oo=m("br"),Uo=h(),kn=m("label"),jt=m("input"),qo=h(),qi=m("span"),qi.textContent="kWp",Ho=h(),ws=m("div"),jo=h(),jl=m("div"),Hi=m("label"),Wt=m("input"),Wo=$(" Meter is encrypted"),Go=h(),gt&>.c(),Bo=h(),kt&&kt.c(),ys=h(),ji=m("label"),Gt=m("input"),Yo=$(" Multipliers"),zo=h(),wt&&wt.c(),Vo=h(),ct=m("div"),Wi=m("strong"),Wi.textContent="WiFi",Ko=h(),wn=m("a"),J(yn.$$.fragment),Qo=h(),fi=m("input"),Xo=h(),Wl=m("div"),Zo=$("SSID"),Jo=m("br"),xo=h(),pl=m("input"),eu=h(),Gl=m("div"),tu=$("Password"),lu=m("br"),nu=h(),_l=m("input"),iu=h(),$n=m("div"),Bl=m("div"),su=$("Power saving"),ou=m("br"),uu=h(),At=m("select"),Cn=m("option"),Cn.textContent="Default",Tn=m("option"),Tn.textContent="Off",Sn=m("option"),Sn.textContent="Minimum",Pn=m("option"),Pn.textContent="Maximum",ru=h(),Yl=m("div"),au=$("Power"),fu=m("br"),cu=h(),Nn=m("div"),Dt=m("input"),mu=h(),Gi=m("span"),Gi.textContent="dBm",pu=h(),Bi=m("div"),Yi=m("label"),Bt=m("input"),_u=$(" Auto reboot on connection problem"),du=h(),rt=m("div"),zi=m("strong"),zi.textContent="Network",vu=h(),Mn=m("a"),J(An.$$.fragment),hu=h(),zl=m("div"),bu=$("IP"),gu=m("br"),ku=h(),Nl=m("div"),el=m("select"),Dn=m("option"),Dn.textContent="DHCP",En=m("option"),En.textContent="Static",wu=h(),St=m("input"),yu=h(),Pt=m("select"),J(In.$$.fragment),$u=h(),yt&&yt.c(),$s=h(),Zi=m("div"),Ji=m("label"),Yt=m("input"),Cu=$(" enable mDNS"),Tu=h(),ci=m("input"),Su=h(),Ml=m("div"),Pu=$("NTP "),mi=m("label"),zt=m("input"),Nu=$(" obtain from DHCP"),Mu=m("br"),Au=h(),xi=m("div"),dl=m("input"),Du=h(),ze=m("div"),es=m("strong"),es.textContent="MQTT",Eu=h(),Fn=m("a"),J(Rn.$$.fragment),Iu=h(),pi=m("input"),Fu=h(),tl=m("div"),Ru=$(`Server - `),$t&&$t.c(),Cs=h(),Lu=m("br"),Ou=h(),Ln=m("div"),vl=m("input"),Uu=h(),Vt=m("input"),qu=h(),lt&<.c(),Ts=h(),Vl=m("div"),Hu=$("Username"),ju=m("br"),Wu=h(),hl=m("input"),Gu=h(),Kl=m("div"),Bu=$("Password"),Yu=m("br"),zu=h(),bl=m("input"),Vu=h(),On=m("div"),Un=m("div"),Ku=$("Client ID"),Qu=m("br"),Xu=h(),gl=m("input"),Zu=h(),qn=m("div"),Ju=$("Payload"),xu=m("br"),er=h(),vt=m("select"),Hn=m("option"),Hn.textContent="JSON",jn=m("option"),jn.textContent="Raw (minimal)",Wn=m("option"),Wn.textContent="Raw (full)",Gn=m("option"),Gn.textContent="Domoticz",Bn=m("option"),Bn.textContent="HomeAssistant",Yn=m("option"),Yn.textContent="HEX dump",tr=h(),Ql=m("div"),lr=$("Publish topic"),nr=m("br"),ir=h(),kl=m("input"),sr=h(),nt&&nt.c(),Ss=h(),it&&it.c(),Ps=h(),st&&st.c(),Ms=h(),ll=m("div"),ts=m("strong"),ts.textContent="User interface",or=h(),zn=m("a"),J(Vn.$$.fragment),ur=h(),_i=m("input"),rr=h(),di=m("div");for(let A=0;ASave',Es=h(),J(Xl.$$.fragment),Is=h(),J(Zl.$$.fragment),Fs=h(),J(Jl.$$.fragment),Rs=h(),J(xl.$$.fragment),u(i,"class","text-sm"),u(r,"href",Ft("General-configuration")),u(r,"target","_blank"),u(r,"class","float-right"),u(c,"type","hidden"),u(c,"name","g"),c.value="true",u(C,"name","gh"),u(C,"type","text"),u(C,"class","in-f w-full"),u(C,"pattern","[A-Za-z0-9-]+"),u(I,"name","gt"),u(I,"class","in-l w-full"),t[3].g.t===void 0&&tt(()=>t[13].call(I)),u(b,"class","flex"),u(_,"class","my-1"),u(O,"type","hidden"),u(O,"name","p"),O.value="true",ee.__value="10YNO-1--------2",ee.value=ee.__value,le.__value="10YNO-2--------T",le.value=le.__value,de.__value="10YNO-3--------J",de.value=de.__value,ie.__value="10YNO-4--------9",ie.value=ie.__value,we.__value="10Y1001A1001A48H",we.value=we.__value,u(j,"label","Norway"),Ce.__value="10Y1001A1001A44P",Ce.value=Ce.__value,Ie.__value="10Y1001A1001A45N",Ie.value=Ie.__value,ve.__value="10Y1001A1001A46L",ve.value=ve.__value,Pe.__value="10Y1001A1001A47J",Pe.value=Pe.__value,u(Ee,"label","Sweden"),me.__value="10YDK-1--------W",me.value=me.__value,se.__value="10YDK-2--------M",se.value=se.__value,u(Ae,"label","Denmark"),pe.__value="10YAT-APG------L",pe.value=pe.__value,Q.__value="10YBE----------2",Q.value=Q.__value,oe.__value="10YCZ-CEPS-----N",oe.value=oe.__value,Ne.__value="10Y1001A1001A39I",Ne.value=Ne.__value,Me.__value="10YFI-1--------U",Me.value=Me.__value,he.__value="10YFR-RTE------C",he.value=he.__value,x.__value="10Y1001A1001A83F",x.value=x.__value,_e.__value="10YGB----------A",_e.value=_e.__value,Le.__value="10YLV-1001A00074",Le.value=Le.__value,We.__value="10YLT-1001A0008Q",We.value=We.__value,Ke.__value="10YNL----------L",Ke.value=Ke.__value,Fe.__value="10YPL-AREA-----S",Fe.value=Fe.__value,je.__value="10YCH-SWISSGRIDZ",je.value=je.__value,u(W,"name","pr"),u(W,"class","in-f w-full"),t[3].p.r===void 0&&tt(()=>t[14].call(W)),u(U,"class","w-full"),u(ft,"name","pc"),u(ft,"class","in-l"),t[3].p.c===void 0&&tt(()=>t[15].call(ft)),u(Y,"class","flex"),u(q,"class","my-1"),u(Oe,"name","pf"),u(Oe,"type","number"),u(Oe,"min","0.001"),u(Oe,"max","65"),u(Oe,"step","0.001"),u(Oe,"class","in-f tr w-full"),u(dt,"class","w-1/2"),u(be,"name","pm"),u(be,"type","number"),u(be,"min","0.001"),u(be,"max","1000"),u(be,"step","0.001"),u(be,"class","in-l tr w-full"),u(Be,"class","w-1/2"),u(Ot,"class","flex"),u(al,"class","my-1"),u(Tt,"type","checkbox"),u(Tt,"name","pe"),Tt.__value="true",Tt.value=Tt.__value,u(Tt,"class","rounded mb-1"),u(fl,"class","my-1"),ml.__value=0,ml.value=ml.__value,Ut.__value=1,Ut.value=Ut.__value,Ol.__value=2,Ol.value=Ol.__value,u(Ue,"name","gs"),u(Ue,"class","in-s"),t[3].g.s===void 0&&tt(()=>t[20].call(Ue)),u(cl,"class","my-1"),u(n,"class","cnt"),u(rn,"class","text-sm"),u(an,"href",Ft("Meter-configuration")),u(an,"target","_blank"),u(an,"class","float-right"),u(ri,"type","hidden"),u(ri,"name","m"),ri.value="true",Sl.__value=0,Sl.value=Sl.__value,Sl.disabled=Ri=t[3].m.b!=0,u(Jt,"name","mb"),u(Jt,"class","in-f"),t[3].m.b===void 0&&tt(()=>t[23].call(Jt)),Pl.__value=0,Pl.value=Pl.__value,Pl.disabled=Li=t[3].m.b!=0,mn.__value=2,mn.value=mn.__value,pn.__value=3,pn.value=pn.__value,_n.__value=10,_n.value=_n.__value,dn.__value=11,dn.value=dn.__value,u(mt,"name","mp"),u(mt,"class","in-l"),mt.disabled=Oi=t[3].m.b==0,t[3].m.p===void 0&&tt(()=>t[24].call(mt)),u(qt,"name","mi"),qt.__value="true",qt.value=qt.__value,u(qt,"type","checkbox"),u(qt,"class","rounded mb-1"),u(ai,"class","mt-2 ml-3 whitespace-nowrap"),u(Tl,"class","flex"),u(cn,"class","my-1"),vn.__value=2,vn.value=vn.__value,hn.__value=1,hn.value=hn.__value,u(xt,"name","md"),u(xt,"class","in-s"),t[3].m.d===void 0&&tt(()=>t[26].call(xt)),u(Ul,"class","my-1"),u(Ht,"name","mf"),u(Ht,"type","number"),u(Ht,"min","5"),u(Ht,"max","65535"),u(Ht,"class","in-f tr w-full"),u(Ui,"class","in-post"),u(gn,"class","flex"),u(ql,"class","mx-1"),u(jt,"name","mr"),u(jt,"type","number"),u(jt,"min","0"),u(jt,"max","65535"),u(jt,"class","in-f tr w-full"),u(qi,"class","in-post"),u(kn,"class","flex"),u(Hl,"class","mx-1"),u(bn,"class","my-1 flex"),u(ws,"class","my-1"),u(Wt,"type","checkbox"),u(Wt,"name","me"),Wt.__value="true",Wt.value=Wt.__value,u(Wt,"class","rounded mb-1"),u(jl,"class","my-1"),u(Gt,"type","checkbox"),u(Gt,"name","mm"),Gt.__value="true",Gt.value=Gt.__value,u(Gt,"class","rounded mb-1"),u(He,"class","cnt"),u(Wi,"class","text-sm"),u(wn,"href",Ft("WiFi-configuration")),u(wn,"target","_blank"),u(wn,"class","float-right"),u(fi,"type","hidden"),u(fi,"name","w"),fi.value="true",u(pl,"name","ws"),u(pl,"type","text"),u(pl,"class","in-s"),u(Wl,"class","my-1"),u(_l,"name","wp"),u(_l,"type","password"),u(_l,"class","in-s"),u(Gl,"class","my-1"),Cn.__value=255,Cn.value=Cn.__value,Tn.__value=0,Tn.value=Tn.__value,Sn.__value=1,Sn.value=Sn.__value,Pn.__value=2,Pn.value=Pn.__value,u(At,"name","wz"),u(At,"class","in-s"),t[3].w.z===void 0&&tt(()=>t[39].call(At)),u(Bl,"class","w-1/2"),u(Dt,"name","ww"),u(Dt,"type","number"),u(Dt,"min","0"),u(Dt,"max","20.5"),u(Dt,"step","0.5"),u(Dt,"class","in-f tr w-full"),u(Gi,"class","in-post"),u(Nn,"class","flex"),u(Yl,"class","ml-2 w-1/2"),u($n,"class","my-1 flex"),u(Bt,"type","checkbox"),u(Bt,"name","wa"),Bt.__value="true",Bt.value=Bt.__value,u(Bt,"class","rounded mb-1"),u(Bi,"class","my-3"),u(ct,"class","cnt"),u(zi,"class","text-sm"),u(Mn,"href",Ft("Network-configuration")),u(Mn,"target","_blank"),u(Mn,"class","float-right"),Dn.__value="dhcp",Dn.value=Dn.__value,En.__value="static",En.value=En.__value,u(el,"name","nm"),u(el,"class","in-f"),t[3].n.m===void 0&&tt(()=>t[42].call(el)),u(St,"name","ni"),u(St,"type","text"),u(St,"class","in-m w-full"),St.disabled=Vi=t[3].n.m=="dhcp",St.required=Ki=t[3].n.m=="static",u(Pt,"name","ns"),u(Pt,"class","in-l"),Pt.disabled=Qi=t[3].n.m=="dhcp",Pt.required=Xi=t[3].n.m=="static",t[3].n.s===void 0&&tt(()=>t[44].call(Pt)),u(Nl,"class","flex"),u(zl,"class","my-1"),u(Yt,"name","nd"),Yt.__value="true",Yt.value=Yt.__value,u(Yt,"type","checkbox"),u(Yt,"class","rounded mb-1"),u(Zi,"class","my-1"),u(ci,"type","hidden"),u(ci,"name","ntp"),ci.value="true",u(zt,"name","ntpd"),zt.__value="true",zt.value=zt.__value,u(zt,"type","checkbox"),u(zt,"class","rounded mb-1"),u(mi,"class","ml-4"),u(dl,"name","ntph"),u(dl,"type","text"),u(dl,"class","in-s"),u(xi,"class","flex"),u(Ml,"class","my-1"),u(rt,"class","cnt"),u(es,"class","text-sm"),u(Fn,"href",Ft("MQTT-configuration")),u(Fn,"target","_blank"),u(Fn,"class","float-right"),u(pi,"type","hidden"),u(pi,"name","q"),pi.value="true",u(vl,"name","qh"),u(vl,"type","text"),u(vl,"class","in-f w-3/4"),u(Vt,"name","qp"),u(Vt,"type","number"),u(Vt,"min","1024"),u(Vt,"max","65535"),u(Vt,"class","in-l tr w-1/4"),u(Ln,"class","flex"),u(tl,"class","my-1"),u(hl,"name","qu"),u(hl,"type","text"),u(hl,"class","in-s"),u(Vl,"class","my-1"),u(bl,"name","qa"),u(bl,"type","password"),u(bl,"class","in-s"),u(Kl,"class","my-1"),u(gl,"name","qc"),u(gl,"type","text"),u(gl,"class","in-f w-full"),Hn.__value=0,Hn.value=Hn.__value,jn.__value=1,jn.value=jn.__value,Wn.__value=2,Wn.value=Wn.__value,Gn.__value=3,Gn.value=Gn.__value,Bn.__value=4,Bn.value=Bn.__value,Yn.__value=255,Yn.value=Yn.__value,u(vt,"name","qm"),u(vt,"class","in-l"),t[3].q.m===void 0&&tt(()=>t[57].call(vt)),u(On,"class","my-1 flex"),u(kl,"name","qb"),u(kl,"type","text"),u(kl,"class","in-s"),u(Ql,"class","my-1"),u(ze,"class","cnt"),u(ts,"class","text-sm"),u(zn,"href",Ft("User-interface")),u(zn,"target","_blank"),u(zn,"class","float-right"),u(_i,"type","hidden"),u(_i,"name","u"),_i.value="true",u(di,"class","flex flex-wrap"),u(ll,"class","cnt"),u(ls,"class","text-sm"),u(Kn,"href","https://amsleser.no/blog/post/24-telnet-debug"),u(Kn,"target","_blank"),u(Kn,"class","float-right"),u(vi,"type","hidden"),u(vi,"name","d"),vi.value="true",u(Kt,"type","checkbox"),u(Kt,"name","ds"),Kt.__value="true",Kt.value=Kt.__value,u(Kt,"class","rounded mb-1"),u(ns,"class","mt-3"),u(Nt,"class","cnt"),u(l,"class","grid xl:grid-cols-4 lg:grid-cols-2 md:grid-cols-2"),u(Xn,"type","button"),u(Xn,"class","py-2 px-4 rounded bg-red-500 text-white ml-2"),u(Zn,"type","button"),u(Zn,"class","py-2 px-4 rounded bg-yellow-500 text-white"),u(ss,"class","text-center"),u(os,"class","text-right"),u(Al,"class","grid grid-cols-3"),u(e,"autocomplete","off")},m(A,te){y(A,e,te),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),X(a,r,null),s(n,f),s(n,c),s(n,p),s(n,_),s(_,b),s(b,d),s(d,v),s(d,g),s(d,k),s(d,C),V(C,t[3].g.h),s(b,T),s(b,P),s(P,E),s(P,S),s(P,M),s(P,I),X(F,I,null),Re(I,t[3].g.t,!0),s(n,z),s(n,O),s(n,R),s(n,q),s(q,Y),s(Y,U),s(U,H),s(U,G),s(U,L),s(U,W),s(W,j),s(j,ee),s(j,le),s(j,de),s(j,ie),s(j,we),s(W,Ee),s(Ee,Ce),s(Ee,Ie),s(Ee,ve),s(Ee,Pe),s(W,Ae),s(Ae,me),s(Ae,se),s(W,pe),s(W,Q),s(W,oe),s(W,Ne),s(W,Me),s(W,he),s(W,x),s(W,_e),s(W,Le),s(W,We),s(W,Ke),s(W,Fe),s(W,je),Re(W,t[3].p.r,!0),s(Y,re),s(Y,ge),s(ge,Lt),s(ge,Ll),s(ge,Zt),s(ge,ft);for(let at=0;at<4;at+=1)hi[at]&&hi[at].m(ft,null);Re(ft,t[3].p.c,!0),s(n,$l),s(n,al),s(al,Ot),s(Ot,dt),s(dt,Qe),s(dt,Xe),s(dt,Ze),s(dt,Oe),V(Oe,t[3].p.f),s(Ot,Je),s(Ot,Be),s(Be,xe),s(Be,et),s(Be,ue),s(Be,be),V(be,t[3].p.m),s(n,Pi),s(n,fl),s(fl,un),s(un,Tt),Tt.checked=t[3].p.e,s(un,Ni),s(fl,Mi),ht&&ht.m(fl,null),s(n,Ai),s(n,cl),s(cl,Di),s(cl,Ei),s(cl,Ii),s(cl,Ue),s(Ue,ml),s(Ue,Ut),s(Ue,Ol),Re(Ue,t[3].g.s,!0),s(n,Fi),bt&&bt.m(n,null),s(l,Cl),s(l,He),s(He,rn),s(He,ho),s(He,an),X(fn,an,null),s(He,bo),s(He,ri),s(He,go),s(He,cn),s(cn,ks),s(cn,ko),s(cn,Tl),s(Tl,Jt),s(Jt,Sl),s(Sl,wo);for(let at=0;at<7;at+=1)bi[at]&&bi[at].m(Jt,null);Re(Jt,t[3].m.b,!0),s(Tl,yo),s(Tl,mt),s(mt,Pl),s(Pl,$o),s(mt,mn),s(mt,pn),s(mt,_n),s(mt,dn),Re(mt,t[3].m.p,!0),s(Tl,Co),s(Tl,ai),s(ai,qt),qt.checked=t[3].m.i,s(ai,To),s(He,So),s(He,Ul),s(Ul,Po),s(Ul,No),s(Ul,Mo),s(Ul,xt),s(xt,vn),s(xt,hn),Re(xt,t[3].m.d,!0),s(He,Ao),s(He,bn),s(bn,ql),s(ql,Do),s(ql,Eo),s(ql,Io),s(ql,gn),s(gn,Ht),V(Ht,t[3].m.f),s(gn,Fo),s(gn,Ui),s(bn,Ro),s(bn,Hl),s(Hl,Lo),s(Hl,Oo),s(Hl,Uo),s(Hl,kn),s(kn,jt),V(jt,t[3].m.r),s(kn,qo),s(kn,qi),s(He,Ho),s(He,ws),s(He,jo),s(He,jl),s(jl,Hi),s(Hi,Wt),Wt.checked=t[3].m.e.e,s(Hi,Wo),s(jl,Go),gt&>.m(jl,null),s(He,Bo),kt&&kt.m(He,null),s(He,ys),s(He,ji),s(ji,Gt),Gt.checked=t[3].m.m.e,s(ji,Yo),s(He,zo),wt&&wt.m(He,null),s(l,Vo),s(l,ct),s(ct,Wi),s(ct,Ko),s(ct,wn),X(yn,wn,null),s(ct,Qo),s(ct,fi),s(ct,Xo),s(ct,Wl),s(Wl,Zo),s(Wl,Jo),s(Wl,xo),s(Wl,pl),V(pl,t[3].w.s),s(ct,eu),s(ct,Gl),s(Gl,tu),s(Gl,lu),s(Gl,nu),s(Gl,_l),V(_l,t[3].w.p),s(ct,iu),s(ct,$n),s($n,Bl),s(Bl,su),s(Bl,ou),s(Bl,uu),s(Bl,At),s(At,Cn),s(At,Tn),s(At,Sn),s(At,Pn),Re(At,t[3].w.z,!0),s($n,ru),s($n,Yl),s(Yl,au),s(Yl,fu),s(Yl,cu),s(Yl,Nn),s(Nn,Dt),V(Dt,t[3].w.w),s(Nn,mu),s(Nn,Gi),s(ct,pu),s(ct,Bi),s(Bi,Yi),s(Yi,Bt),Bt.checked=t[3].w.a,s(Yi,_u),s(l,du),s(l,rt),s(rt,zi),s(rt,vu),s(rt,Mn),X(An,Mn,null),s(rt,hu),s(rt,zl),s(zl,bu),s(zl,gu),s(zl,ku),s(zl,Nl),s(Nl,el),s(el,Dn),s(el,En),Re(el,t[3].n.m,!0),s(Nl,wu),s(Nl,St),V(St,t[3].n.i),s(Nl,yu),s(Nl,Pt),X(In,Pt,null),Re(Pt,t[3].n.s,!0),s(rt,$u),yt&&yt.m(rt,null),s(rt,$s),s(rt,Zi),s(Zi,Ji),s(Ji,Yt),Yt.checked=t[3].n.d,s(Ji,Cu),s(rt,Tu),s(rt,ci),s(rt,Su),s(rt,Ml),s(Ml,Pu),s(Ml,mi),s(mi,zt),zt.checked=t[3].n.h,s(mi,Nu),s(Ml,Mu),s(Ml,Au),s(Ml,xi),s(xi,dl),V(dl,t[3].n.n1),s(l,Du),s(l,ze),s(ze,es),s(ze,Eu),s(ze,Fn),X(Rn,Fn,null),s(ze,Iu),s(ze,pi),s(ze,Fu),s(ze,tl),s(tl,Ru),$t&&$t.m(tl,null),s(tl,Cs),s(tl,Lu),s(tl,Ou),s(tl,Ln),s(Ln,vl),V(vl,t[3].q.h),s(Ln,Uu),s(Ln,Vt),V(Vt,t[3].q.p),s(ze,qu),lt&<.m(ze,null),s(ze,Ts),s(ze,Vl),s(Vl,Hu),s(Vl,ju),s(Vl,Wu),s(Vl,hl),V(hl,t[3].q.u),s(ze,Gu),s(ze,Kl),s(Kl,Bu),s(Kl,Yu),s(Kl,zu),s(Kl,bl),V(bl,t[3].q.a),s(ze,Vu),s(ze,On),s(On,Un),s(Un,Ku),s(Un,Qu),s(Un,Xu),s(Un,gl),V(gl,t[3].q.c),s(On,Zu),s(On,qn),s(qn,Ju),s(qn,xu),s(qn,er),s(qn,vt),s(vt,Hn),s(vt,jn),s(vt,Wn),s(vt,Gn),s(vt,Bn),s(vt,Yn),Re(vt,t[3].q.m,!0),s(ze,tr),s(ze,Ql),s(Ql,lr),s(Ql,nr),s(Ql,ir),s(Ql,kl),V(kl,t[3].q.b),s(l,sr),nt&&nt.m(l,null),s(l,Ss),it&&it.m(l,null),s(l,Ps),st&&st.m(l,null),s(l,Ms),s(l,ll),s(ll,ts),s(ll,or),s(ll,zn),X(Vn,zn,null),s(ll,ur),s(ll,_i),s(ll,rr),s(ll,di);for(let at=0;at0?bt?bt.p(A,te):(bt=Qa(A),bt.c(),bt.m(n,null)):bt&&(bt.d(1),bt=null),(!Qt||te[0]&8&&Ri!==(Ri=A[3].m.b!=0))&&(Sl.disabled=Ri),te[0]&8&&Re(Jt,A[3].m.b),(!Qt||te[0]&8&&Li!==(Li=A[3].m.b!=0))&&(Pl.disabled=Li),(!Qt||te[0]&8&&Oi!==(Oi=A[3].m.b==0))&&(mt.disabled=Oi),te[0]&8&&Re(mt,A[3].m.p),te[0]&8&&(qt.checked=A[3].m.i),te[0]&8&&Re(xt,A[3].m.d),te[0]&8&&ae(Ht.value)!==A[3].m.f&&V(Ht,A[3].m.f),te[0]&8&&ae(jt.value)!==A[3].m.r&&V(jt,A[3].m.r),te[0]&8&&(Wt.checked=A[3].m.e.e),A[3].m.e.e?gt?gt.p(A,te):(gt=Xa(A),gt.c(),gt.m(jl,null)):gt&&(gt.d(1),gt=null),A[3].m.e.e?kt?kt.p(A,te):(kt=Za(A),kt.c(),kt.m(He,ys)):kt&&(kt.d(1),kt=null),te[0]&8&&(Gt.checked=A[3].m.m.e),A[3].m.m.e?wt?wt.p(A,te):(wt=Ja(A),wt.c(),wt.m(He,null)):wt&&(wt.d(1),wt=null),te[0]&8&&pl.value!==A[3].w.s&&V(pl,A[3].w.s),te[0]&8&&_l.value!==A[3].w.p&&V(_l,A[3].w.p),te[0]&8&&Re(At,A[3].w.z),te[0]&8&&ae(Dt.value)!==A[3].w.w&&V(Dt,A[3].w.w),te[0]&8&&(Bt.checked=A[3].w.a),te[0]&8&&Re(el,A[3].n.m),(!Qt||te[0]&8&&Vi!==(Vi=A[3].n.m=="dhcp"))&&(St.disabled=Vi),(!Qt||te[0]&8&&Ki!==(Ki=A[3].n.m=="static"))&&(St.required=Ki),te[0]&8&&St.value!==A[3].n.i&&V(St,A[3].n.i),(!Qt||te[0]&8&&Qi!==(Qi=A[3].n.m=="dhcp"))&&(Pt.disabled=Qi),(!Qt||te[0]&8&&Xi!==(Xi=A[3].n.m=="static"))&&(Pt.required=Xi),te[0]&8&&Re(Pt,A[3].n.s),A[3].n.m=="static"?yt?yt.p(A,te):(yt=xa(A),yt.c(),yt.m(rt,$s)):yt&&(yt.d(1),yt=null),te[0]&8&&(Yt.checked=A[3].n.d),te[0]&8&&(zt.checked=A[3].n.h),te[0]&8&&dl.value!==A[3].n.n1&&V(dl,A[3].n.n1),A[0].chip!="esp8266"?$t?$t.p(A,te):($t=ef(A),$t.c(),$t.m(tl,Cs)):$t&&($t.d(1),$t=null),te[0]&8&&vl.value!==A[3].q.h&&V(vl,A[3].q.h),te[0]&8&&ae(Vt.value)!==A[3].q.p&&V(Vt,A[3].q.p),A[3].q.s.e?lt?(lt.p(A,te),te[0]&8&&N(lt,1)):(lt=tf(A),lt.c(),N(lt,1),lt.m(ze,Ts)):lt&&(Te(),D(lt,1,1,()=>{lt=null}),Se()),te[0]&8&&hl.value!==A[3].q.u&&V(hl,A[3].q.u),te[0]&8&&bl.value!==A[3].q.a&&V(bl,A[3].q.a),te[0]&8&&gl.value!==A[3].q.c&&V(gl,A[3].q.c),te[0]&8&&Re(vt,A[3].q.m),te[0]&8&&kl.value!==A[3].q.b&&V(kl,A[3].q.b),A[3].q.m==3?nt?(nt.p(A,te),te[0]&8&&N(nt,1)):(nt=lf(A),nt.c(),N(nt,1),nt.m(l,Ss)):nt&&(Te(),D(nt,1,1,()=>{nt=null}),Se()),A[3].q.m==4?it?(it.p(A,te),te[0]&8&&N(it,1)):(it=nf(A),it.c(),N(it,1),it.m(l,Ps)):it&&(Te(),D(it,1,1,()=>{it=null}),Se()),te[0]&8&&(Ns=A[3].p.r.startsWith("10YNO")||A[3].p.r=="10Y1001A1001A48H"),Ns?st?(st.p(A,te),te[0]&8&&N(st,1)):(st=sf(A),st.c(),N(st,1),st.m(l,Ms)):st&&(Te(),D(st,1,1,()=>{st=null}),Se()),te[0]&136){Jn=A[7];let Et;for(Et=0;Et20||A[0].chip=="esp8266"?ot?(ot.p(A,te),te[0]&1&&N(ot,1)):(ot=rf(A),ot.c(),N(ot,1),ot.m(l,As)):ot&&(Te(),D(ot,1,1,()=>{ot=null}),Se()),te[0]&8&&(Kt.checked=A[3].d.s),A[3].d.s?Ct?Ct.p(A,te):(Ct=_f(A),Ct.c(),Ct.m(Nt,null)):Ct&&(Ct.d(1),Ct=null);const at={};te[0]&2&&(at.active=A[1]),Xl.$set(at);const gr={};te[0]&4&&(gr.active=A[2]),Zl.$set(gr);const kr={};te[0]&16&&(kr.active=A[4]),Jl.$set(kr);const wr={};te[0]&32&&(wr.active=A[5]),xl.$set(wr)},i(A){Qt||(N(a.$$.fragment,A),N(F.$$.fragment,A),N(fn.$$.fragment,A),N(yn.$$.fragment,A),N(An.$$.fragment,A),N(In.$$.fragment,A),N(Rn.$$.fragment,A),N(lt),N(nt),N(it),N(st),N(Vn.$$.fragment,A),N(ot),N(Qn.$$.fragment,A),N(Xl.$$.fragment,A),N(Zl.$$.fragment,A),N(Jl.$$.fragment,A),N(xl.$$.fragment,A),Qt=!0)},o(A){D(a.$$.fragment,A),D(F.$$.fragment,A),D(fn.$$.fragment,A),D(yn.$$.fragment,A),D(An.$$.fragment,A),D(In.$$.fragment,A),D(Rn.$$.fragment,A),D(lt),D(nt),D(it),D(st),D(Vn.$$.fragment,A),D(ot),D(Qn.$$.fragment,A),D(Xl.$$.fragment,A),D(Zl.$$.fragment,A),D(Jl.$$.fragment,A),D(xl.$$.fragment,A),Qt=!1},d(A){A&&w(e),Z(a),Z(F),ul(hi,A),ht&&ht.d(),bt&&bt.d(),Z(fn),ul(bi,A),gt&>.d(),kt&&kt.d(),wt&&wt.d(),Z(yn),Z(An),Z(In),yt&&yt.d(),Z(Rn),$t&&$t.d(),lt&<.d(),nt&&nt.d(),it&&it.d(),st&&st.d(),Z(Vn),ul(pt,A),ot&&ot.d(),Z(Qn),Ct&&Ct.d(),A&&w(Es),Z(Xl,A),A&&w(Is),Z(Zl,A),A&&w(Fs),Z(Jl,A),A&&w(Rs),Z(xl,A),Ls=!1,Ve(br)}}}async function Xp(){await(await fetch("/reboot",{method:"POST"})).json()}function Zp(t,e,l){let{sysinfo:n={}}=e,i=[{name:"Import gauge",key:"i"},{name:"Export gauge",key:"e"},{name:"Voltage",key:"v"},{name:"Amperage",key:"a"},{name:"Reactive",key:"r"},{name:"Realtime",key:"c"},{name:"Peaks",key:"t"},{name:"Price",key:"p"},{name:"Day plot",key:"d"},{name:"Month plot",key:"m"},{name:"Temperature plot",key:"s"}],o=!0,r=!1,a={g:{t:"",h:"",s:0,u:"",p:""},m:{b:2400,p:11,i:!1,d:0,f:0,r:0,e:{e:!1,k:"",a:""},m:{e:!1,w:!1,v:!1,a:!1,c:!1}},w:{s:"",p:"",w:0,z:255,a:!0},n:{m:"",i:"",s:"",g:"",d1:"",d2:"",d:!1,n1:"",n2:"",h:!1},q:{h:"",p:1883,u:"",a:"",b:"",s:{e:!1,c:!1,r:!0,k:!1}},o:{e:"",c:"",u1:"",u2:"",u3:""},t:{t:[0,0,0,0,0,0,0,0,0,0],h:1},p:{e:!1,t:"",r:"",c:"",m:1,f:null},d:{s:!1,t:!1,l:5},u:{i:0,e:0,v:0,a:0,r:0,c:0,t:0,p:0,d:0,m:0,s:0},i:{h:{p:null,u:!0},a:null,l:{p:null,i:!1},r:{r:null,g:null,b:null,i:!1},t:{d:null,a:null},v:{p:null,d:{v:null,g:null},o:null,m:null,b:null}},h:{t:"",h:"",n:""}};Ac.subscribe(Ue=>{Ue.version&&(l(3,a=Ue),l(1,o=!1))}),Tp();let f=!1,c=!1;async function p(){if(confirm("Are you sure you want to factory reset the device?")){l(4,f=!0);const Ue=new URLSearchParams;Ue.append("perform","true");let Ut=await(await fetch("/reset",{method:"POST",body:Ue})).json();l(4,f=!1),l(5,c=Ut.success)}}async function _(Ue){l(2,r=!0);const ml=new FormData(Ue.target),Ut=new URLSearchParams;for(let Cl of ml){const[He,rn]=Cl;Ut.append(He,rn)}let Fi=await(await fetch("/save",{method:"POST",body:Ut})).json();Rt.update(Cl=>(Cl.booting=Fi.reboot,Cl.ui=a.u,Cl)),l(2,r=!1),ni("/")}const b=function(){confirm("Are you sure you want to reboot the device?")&&(Rt.update(Ue=>(Ue.booting=!0,Ue)),Xp())},d=function(){a.q.s.e?a.q.p==1883&&l(3,a.q.p=8883,a):a.q.p==8883&&l(3,a.q.p=1883,a)};let v=44;function g(){a.g.h=this.value,l(3,a)}function k(){a.g.t=_t(this),l(3,a)}function C(){a.p.r=_t(this),l(3,a)}function T(){a.p.c=_t(this),l(3,a)}function P(){a.p.f=ae(this.value),l(3,a)}function E(){a.p.m=ae(this.value),l(3,a)}function S(){a.p.e=this.checked,l(3,a)}function M(){a.p.t=this.value,l(3,a)}function I(){a.g.s=_t(this),l(3,a)}function F(){a.g.u=this.value,l(3,a)}function z(){a.g.p=this.value,l(3,a)}function O(){a.m.b=_t(this),l(3,a)}function R(){a.m.p=_t(this),l(3,a)}function q(){a.m.i=this.checked,l(3,a)}function Y(){a.m.d=_t(this),l(3,a)}function U(){a.m.f=ae(this.value),l(3,a)}function H(){a.m.r=ae(this.value),l(3,a)}function G(){a.m.e.e=this.checked,l(3,a)}function L(){a.m.e.k=this.value,l(3,a)}function W(){a.m.e.a=this.value,l(3,a)}function j(){a.m.m.e=this.checked,l(3,a)}function ee(){a.m.m.w=ae(this.value),l(3,a)}function le(){a.m.m.v=ae(this.value),l(3,a)}function de(){a.m.m.a=ae(this.value),l(3,a)}function ie(){a.m.m.c=ae(this.value),l(3,a)}function we(){a.w.s=this.value,l(3,a)}function Ee(){a.w.p=this.value,l(3,a)}function Ce(){a.w.z=_t(this),l(3,a)}function Ie(){a.w.w=ae(this.value),l(3,a)}function ve(){a.w.a=this.checked,l(3,a)}function Pe(){a.n.m=_t(this),l(3,a)}function Ae(){a.n.i=this.value,l(3,a)}function me(){a.n.s=_t(this),l(3,a)}function se(){a.n.g=this.value,l(3,a)}function pe(){a.n.d1=this.value,l(3,a)}function Q(){a.n.d2=this.value,l(3,a)}function oe(){a.n.d=this.checked,l(3,a)}function Ne(){a.n.h=this.checked,l(3,a)}function Me(){a.n.n1=this.value,l(3,a)}function he(){a.q.s.e=this.checked,l(3,a)}function x(){a.q.h=this.value,l(3,a)}function _e(){a.q.p=ae(this.value),l(3,a)}function Le(){a.q.u=this.value,l(3,a)}function We(){a.q.a=this.value,l(3,a)}function Ke(){a.q.c=this.value,l(3,a)}function Fe(){a.q.m=_t(this),l(3,a)}function je(){a.q.b=this.value,l(3,a)}function re(){a.o.e=this.value,l(3,a)}function ge(){a.o.c=this.value,l(3,a)}function Lt(){a.o.u1=this.value,l(3,a)}function Ll(){a.o.u2=this.value,l(3,a)}function Zt(){a.o.u3=this.value,l(3,a)}function ft(){a.h.t=this.value,l(3,a)}function $l(){a.h.h=this.value,l(3,a)}function al(){a.h.n=this.value,l(3,a)}function Ot(Ue){a.t.t[Ue]=ae(this.value),l(3,a)}function dt(){a.t.h=ae(this.value),l(3,a)}function Qe(Ue){a.u[Ue.key]=_t(this),l(3,a)}function Xe(){a.i.h.u=this.checked,l(3,a)}function Ze(){a.i.h.p=_t(this),l(3,a)}function Oe(){a.i.a=ae(this.value),l(3,a)}function Je(){a.i.l.i=this.checked,l(3,a)}function Be(){a.i.l.p=ae(this.value),l(3,a)}function xe(){a.i.r.i=this.checked,l(3,a)}function et(){a.i.r.r=ae(this.value),l(3,a)}function ue(){a.i.r.g=ae(this.value),l(3,a)}function be(){a.i.r.b=ae(this.value),l(3,a)}function Pi(){a.i.t.d=ae(this.value),l(3,a)}function fl(){a.i.t.a=ae(this.value),l(3,a)}function un(){a.i.v.p=ae(this.value),l(3,a)}function Tt(){a.i.v.d.v=ae(this.value),l(3,a)}function Ni(){a.i.v.d.g=ae(this.value),l(3,a)}function Mi(){a.i.v.o=ae(this.value),l(3,a)}function Ai(){a.i.v.m=ae(this.value),l(3,a)}function cl(){a.i.v.b=ae(this.value),l(3,a)}function Di(){a.d.s=this.checked,l(3,a)}function Ei(){a.d.t=this.checked,l(3,a)}function Ii(){a.d.l=_t(this),l(3,a)}return t.$$set=Ue=>{"sysinfo"in Ue&&l(0,n=Ue.sysinfo)},t.$$.update=()=>{t.$$.dirty[0]&1&&l(6,v=n.chip=="esp8266"?16:n.chip=="esp32s2"?44:39)},[n,o,r,a,f,c,v,i,p,_,b,d,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U,H,G,L,W,j,ee,le,de,ie,we,Ee,Ce,Ie,ve,Pe,Ae,me,se,pe,Q,oe,Ne,Me,he,x,_e,Le,We,Ke,Fe,je,re,ge,Lt,Ll,Zt,ft,$l,al,Ot,dt,Qe,Xe,Ze,Oe,Je,Be,xe,et,ue,be,Pi,fl,un,Tt,Ni,Mi,Ai,cl,Di,Ei,Ii]}class Jp extends $e{constructor(e){super(),ye(this,e,Zp,Qp,ke,{sysinfo:0},null,[-1,-1,-1,-1])}}function vf(t,e,l){const n=t.slice();return n[20]=e[l],n}function xp(t){let e=fe(t[1].chip,t[1].board)+"",l;return{c(){l=$(e)},m(n,i){y(n,l,i)},p(n,i){i&2&&e!==(e=fe(n[1].chip,n[1].board)+"")&&B(l,e)},d(n){n&&w(l)}}}function hf(t){let e,l,n=t[1].apmac+"",i,o,r,a,f,c,p,_,b,d=qr(t[1])+"",v,g,k=t[1].boot_reason+"",C,T,P=t[1].ex_cause+"",E,S,M;const I=[t0,e0],F=[];function z(O,R){return O[0].u>0?0:1}return f=z(t),c=F[f]=I[f](t),{c(){e=m("div"),l=$("AP MAC: "),i=$(n),o=h(),r=m("div"),a=$(`Last boot: - `),c.c(),p=h(),_=m("div"),b=$("Reason: "),v=$(d),g=$(" ("),C=$(k),T=$("/"),E=$(P),S=$(")"),u(e,"class","my-2"),u(r,"class","my-2"),u(_,"class","my-2")},m(O,R){y(O,e,R),s(e,l),s(e,i),y(O,o,R),y(O,r,R),s(r,a),F[f].m(r,null),y(O,p,R),y(O,_,R),s(_,b),s(_,v),s(_,g),s(_,C),s(_,T),s(_,E),s(_,S),M=!0},p(O,R){(!M||R&2)&&n!==(n=O[1].apmac+"")&&B(i,n);let q=f;f=z(O),f===q?F[f].p(O,R):(Te(),D(F[q],1,1,()=>{F[q]=null}),Se(),c=F[f],c?c.p(O,R):(c=F[f]=I[f](O),c.c()),N(c,1),c.m(r,null)),(!M||R&2)&&d!==(d=qr(O[1])+"")&&B(v,d),(!M||R&2)&&k!==(k=O[1].boot_reason+"")&&B(C,k),(!M||R&2)&&P!==(P=O[1].ex_cause+"")&&B(E,P)},i(O){M||(N(c),M=!0)},o(O){D(c),M=!1},d(O){O&&w(e),O&&w(o),O&&w(r),F[f].d(),O&&w(p),O&&w(_)}}}function e0(t){let e;return{c(){e=$("-")},m(l,n){y(l,e,n)},p:ne,i:ne,o:ne,d(l){l&&w(e)}}}function t0(t){let e,l;return e=new Pc({props:{timestamp:new Date(new Date().getTime()-t[0].u*1e3),fullTimeColor:""}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.timestamp=new Date(new Date().getTime()-n[0].u*1e3)),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function l0(t){let e;return{c(){e=m("span"),e.textContent="Update consents",u(e,"class","btn-pri-sm")},m(l,n){y(l,e,n)},p:ne,d(l){l&&w(e)}}}function bf(t){let e,l,n,i,o,r=vs(t[1].meter.mfg)+"",a,f,c,p,_=t[1].meter.model+"",b,d,v,g,k=t[1].meter.id+"",C;return{c(){e=m("div"),l=m("strong"),l.textContent="Meter",n=h(),i=m("div"),o=$("Manufacturer: "),a=$(r),f=h(),c=m("div"),p=$("Model: "),b=$(_),d=h(),v=m("div"),g=$("ID: "),C=$(k),u(l,"class","text-sm"),u(i,"class","my-2"),u(c,"class","my-2"),u(v,"class","my-2"),u(e,"class","cnt")},m(T,P){y(T,e,P),s(e,l),s(e,n),s(e,i),s(i,o),s(i,a),s(e,f),s(e,c),s(c,p),s(c,b),s(e,d),s(e,v),s(v,g),s(v,C)},p(T,P){P&2&&r!==(r=vs(T[1].meter.mfg)+"")&&B(a,r),P&2&&_!==(_=T[1].meter.model+"")&&B(b,_),P&2&&k!==(k=T[1].meter.id+"")&&B(C,k)},d(T){T&&w(e)}}}function gf(t){let e,l,n,i,o,r=t[1].net.ip+"",a,f,c,p,_=t[1].net.mask+"",b,d,v,g,k=t[1].net.gw+"",C,T,P,E,S=t[1].net.dns1+"",M,I,F=t[1].net.dns2&&kf(t);return{c(){e=m("div"),l=m("strong"),l.textContent="Network",n=h(),i=m("div"),o=$("IP: "),a=$(r),f=h(),c=m("div"),p=$("Mask: "),b=$(_),d=h(),v=m("div"),g=$("Gateway: "),C=$(k),T=h(),P=m("div"),E=$("DNS: "),M=$(S),I=h(),F&&F.c(),u(l,"class","text-sm"),u(i,"class","my-2"),u(c,"class","my-2"),u(v,"class","my-2"),u(P,"class","my-2"),u(e,"class","cnt")},m(z,O){y(z,e,O),s(e,l),s(e,n),s(e,i),s(i,o),s(i,a),s(e,f),s(e,c),s(c,p),s(c,b),s(e,d),s(e,v),s(v,g),s(v,C),s(e,T),s(e,P),s(P,E),s(P,M),s(P,I),F&&F.m(P,null)},p(z,O){O&2&&r!==(r=z[1].net.ip+"")&&B(a,r),O&2&&_!==(_=z[1].net.mask+"")&&B(b,_),O&2&&k!==(k=z[1].net.gw+"")&&B(C,k),O&2&&S!==(S=z[1].net.dns1+"")&&B(M,S),z[1].net.dns2?F?F.p(z,O):(F=kf(z),F.c(),F.m(P,null)):F&&(F.d(1),F=null)},d(z){z&&w(e),F&&F.d()}}}function kf(t){let e,l=t[1].net.dns2+"",n;return{c(){e=$("/ "),n=$(l)},m(i,o){y(i,e,o),y(i,n,o)},p(i,o){o&2&&l!==(l=i[1].net.dns2+"")&&B(n,l)},d(i){i&&w(e),i&&w(n)}}}function wf(t){let e,l,n,i=t[1].upgrade.t+"",o,r,a=t[1].version+"",f,c,p=t[1].upgrade.x+"",_,b,d=t[1].upgrade.e+"",v,g;return{c(){e=m("div"),l=m("div"),n=$("Previous upgrade attempt ("),o=$(i),r=$(") does not match current version ("),f=$(a),c=$(") ["),_=$(p),b=$("/"),v=$(d),g=$("]"),u(l,"class","bd-yellow"),u(e,"class","my-2")},m(k,C){y(k,e,C),s(e,l),s(l,n),s(l,o),s(l,r),s(l,f),s(l,c),s(l,_),s(l,b),s(l,v),s(l,g)},p(k,C){C&2&&i!==(i=k[1].upgrade.t+"")&&B(o,i),C&2&&a!==(a=k[1].version+"")&&B(f,a),C&2&&p!==(p=k[1].upgrade.x+"")&&B(_,p),C&2&&d!==(d=k[1].upgrade.e+"")&&B(v,d)},d(k){k&&w(e)}}}function yf(t){let e,l,n,i=t[2].tag_name+"",o,r,a,f,c,p,_=(t[1].security==0||t[0].a)&&t[1].fwconsent===1&&t[2]&&t[2].tag_name!=t[1].version&&$f(t),b=t[1].fwconsent===2&&Cf();return{c(){e=m("div"),l=$(`Latest version: - `),n=m("a"),o=$(i),a=h(),_&&_.c(),f=h(),b&&b.c(),c=Ge(),u(n,"href",r=t[2].html_url),u(n,"class","ml-2 text-blue-600 hover:text-blue-800"),u(n,"target","_blank"),u(n,"rel","noreferrer"),u(e,"class","my-2 flex")},m(d,v){y(d,e,v),s(e,l),s(e,n),s(n,o),s(e,a),_&&_.m(e,null),y(d,f,v),b&&b.m(d,v),y(d,c,v),p=!0},p(d,v){(!p||v&4)&&i!==(i=d[2].tag_name+"")&&B(o,i),(!p||v&4&&r!==(r=d[2].html_url))&&u(n,"href",r),(d[1].security==0||d[0].a)&&d[1].fwconsent===1&&d[2]&&d[2].tag_name!=d[1].version?_?(_.p(d,v),v&7&&N(_,1)):(_=$f(d),_.c(),N(_,1),_.m(e,null)):_&&(Te(),D(_,1,1,()=>{_=null}),Se()),d[1].fwconsent===2?b||(b=Cf(),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null)},i(d){p||(N(_),p=!0)},o(d){D(_),p=!1},d(d){d&&w(e),_&&_.d(),d&&w(f),b&&b.d(d),d&&w(c)}}}function $f(t){let e,l,n,i,o,r;return n=new Nc({}),{c(){e=m("div"),l=m("button"),J(n.$$.fragment),u(e,"class","flex-none ml-2 text-green-500"),u(e,"title","Install this version")},m(a,f){y(a,e,f),s(e,l),X(n,l,null),i=!0,o||(r=K(l,"click",t[10]),o=!0)},p:ne,i(a){i||(N(n.$$.fragment,a),i=!0)},o(a){D(n.$$.fragment,a),i=!1},d(a){a&&w(e),Z(n),o=!1,r()}}}function Cf(t){let e;return{c(){e=m("div"),e.innerHTML='
You have disabled one-click firmware upgrade, link to self-upgrade is disabled
',u(e,"class","my-2")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Tf(t){let e,l=hs(fe(t[1].chip,t[1].board))+"",n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&2&&l!==(l=hs(fe(i[1].chip,i[1].board))+"")&&B(n,l)},d(i){i&&w(e)}}}function Sf(t){let e,l,n,i,o,r;function a(p,_){return p[4].length==0?i0:n0}let f=a(t),c=f(t);return{c(){e=m("div"),l=m("form"),n=m("input"),i=h(),c.c(),jf(n,"display","none"),u(n,"name","file"),u(n,"type","file"),u(n,"accept",".bin"),u(l,"action","/firmware"),u(l,"enctype","multipart/form-data"),u(l,"method","post"),u(l,"autocomplete","off"),u(e,"class","my-2 flex")},m(p,_){y(p,e,_),s(e,l),s(l,n),t[12](n),s(l,i),c.m(l,null),o||(r=[K(n,"change",t[13]),K(l,"submit",t[15])],o=!0)},p(p,_){f===(f=a(p))&&c?c.p(p,_):(c.d(1),c=f(p),c&&(c.c(),c.m(l,null)))},d(p){p&&w(e),t[12](null),c.d(),o=!1,Ve(r)}}}function n0(t){let e=t[4][0].name+"",l,n,i;return{c(){l=$(e),n=h(),i=m("button"),i.textContent="Upload",u(i,"type","submit"),u(i,"class","btn-pri-sm float-right")},m(o,r){y(o,l,r),y(o,n,r),y(o,i,r)},p(o,r){r&16&&e!==(e=o[4][0].name+"")&&B(l,e)},d(o){o&&w(l),o&&w(n),o&&w(i)}}}function i0(t){let e,l,n;return{c(){e=m("button"),e.textContent="Select firmware file for upgrade",u(e,"type","button"),u(e,"class","btn-pri-sm float-right")},m(i,o){y(i,e,o),l||(n=K(e,"click",t[14]),l=!0)},p:ne,d(i){i&&w(e),l=!1,n()}}}function Pf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g=t[9],k=[];for(let S=0;S Include Secrets
(SSID, PSK, passwords and tokens)',f=h(),C&&C.c(),c=h(),p=m("form"),_=m("input"),b=h(),E.c(),u(l,"class","text-sm"),u(a,"class","my-1 mx-3 col-span-2"),u(o,"class","grid grid-cols-2"),u(i,"method","get"),u(i,"action","/configfile.cfg"),u(i,"autocomplete","off"),jf(_,"display","none"),u(_,"name","file"),u(_,"type","file"),u(_,"accept",".cfg"),u(p,"action","/configfile"),u(p,"enctype","multipart/form-data"),u(p,"method","post"),u(p,"autocomplete","off"),u(e,"class","cnt")},m(S,M){y(S,e,M),s(e,l),s(e,n),s(e,i),s(i,o);for(let I=0;I{me=null}),Se());const We={};_e&8388608&&(We.$$scope={dirty:_e,ctx:x}),S.$set(We),x[1].meter?se?se.p(x,_e):(se=bf(x),se.c(),se.m(e,z)):se&&(se.d(1),se=null),x[1].net?pe?pe.p(x,_e):(pe=gf(x),pe.c(),pe.m(e,O)):pe&&(pe.d(1),pe=null),(!ve||_e&2)&&G!==(G=x[1].version+"")&&B(L,G),x[1].upgrade.t&&x[1].upgrade.t!=x[1].version?Q?Q.p(x,_e):(Q=wf(x),Q.c(),Q.m(R,j)):Q&&(Q.d(1),Q=null),x[2]?oe?(oe.p(x,_e),_e&4&&N(oe,1)):(oe=yf(x),oe.c(),N(oe,1),oe.m(R,ee)):oe&&(Te(),D(oe,1,1,()=>{oe=null}),Se()),_e&3&&(le=(x[1].security==0||x[0].a)&&ii(x[1].board)),le?Ne?Ne.p(x,_e):(Ne=Tf(x),Ne.c(),Ne.m(R,de)):Ne&&(Ne.d(1),Ne=null),x[1].security==0||x[0].a?Me?Me.p(x,_e):(Me=Sf(x),Me.c(),Me.m(R,null)):Me&&(Me.d(1),Me=null),x[1].security==0||x[0].a?he?he.p(x,_e):(he=Pf(x),he.c(),he.m(e,null)):he&&(he.d(1),he=null);const Ke={};_e&32&&(Ke.active=x[5]),Ee.$set(Ke);const Fe={};_e&256&&(Fe.active=x[8]),Ie.$set(Fe)},i(x){ve||(N(b.$$.fragment,x),N(me),N(S.$$.fragment,x),N(oe),N(Ee.$$.fragment,x),N(Ie.$$.fragment,x),ve=!0)},o(x){D(b.$$.fragment,x),D(me),D(S.$$.fragment,x),D(oe),D(Ee.$$.fragment,x),D(Ie.$$.fragment,x),ve=!1},d(x){x&&w(e),Z(b),me&&me.d(),Z(S),se&&se.d(),pe&&pe.d(),Q&&Q.d(),oe&&oe.d(),Ne&&Ne.d(),Me&&Me.d(),he&&he.d(),x&&w(we),Z(Ee,x),x&&w(Ce),Z(Ie,x),Pe=!1,Ae()}}}async function r0(){await(await fetch("/reboot",{method:"POST"})).json()}function a0(t,e,l){let{data:n}=e,{sysinfo:i}=e,o=[{name:"WiFi",key:"iw"},{name:"MQTT",key:"im"},{name:"Web",key:"ie"},{name:"Meter",key:"it"},{name:"Thresholds",key:"ih"},{name:"GPIO",key:"ig"},{name:"NTP",key:"in"},{name:"Price API",key:"is"}],r={};_o.subscribe(I=>{l(2,r=Sc(i.version,I)),r||l(2,r=I[0])});function a(){confirm("Do you want to upgrade this device to "+r.tag_name+"?")&&(i.board!=2&&i.board!=4&&i.board!=7||confirm(hs(fe(i.chip,i.board))))&&(Rt.update(I=>(I.upgrading=!0,I)),Tc(r.tag_name))}const f=function(){confirm("Are you sure you want to reboot the device?")&&(Rt.update(I=>(I.booting=!0,I)),r0())};let c,p=[],_=!1,b,d=[],v=!1;co();function g(I){_s[I?"unshift":"push"](()=>{c=I,l(3,c)})}function k(){p=this.files,l(4,p)}const C=()=>{c.click()},T=()=>l(5,_=!0);function P(I){_s[I?"unshift":"push"](()=>{b=I,l(6,b)})}function E(){d=this.files,l(7,d)}const S=()=>{b.click()},M=()=>l(8,v=!0);return t.$$set=I=>{"data"in I&&l(0,n=I.data),"sysinfo"in I&&l(1,i=I.sysinfo)},[n,i,r,c,p,_,b,d,v,o,a,f,g,k,C,T,P,E,S,M]}class f0 extends $e{constructor(e){super(),ye(this,e,a0,u0,ke,{data:0,sysinfo:1})}}function Af(t){let e,l,n=fe(t[0],7)+"",i,o,r=fe(t[0],5)+"",a,f,c=fe(t[0],4)+"",p,_,b=fe(t[0],3)+"",d,v,g,k,C=fe(t[0],2)+"",T,P,E=fe(t[0],1)+"",S,M,I=fe(t[0],0)+"",F,z,O,R,q=fe(t[0],101)+"",Y,U,H=fe(t[0],100)+"",G;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=m("option"),a=$(r),f=m("option"),p=$(c),_=m("option"),d=$(b),v=h(),g=m("optgroup"),k=m("option"),T=$(C),P=m("option"),S=$(E),M=m("option"),F=$(I),z=h(),O=m("optgroup"),R=m("option"),Y=$(q),U=m("option"),G=$(H),l.__value=7,l.value=l.__value,o.__value=5,o.value=o.__value,f.__value=4,f.value=f.__value,_.__value=3,_.value=_.__value,u(e,"label","amsleser.no"),k.__value=2,k.value=k.__value,P.__value=1,P.value=P.__value,M.__value=0,M.value=M.__value,u(g,"label","Custom hardware"),R.__value=101,R.value=R.__value,U.__value=100,U.value=U.__value,u(O,"label","Generic hardware")},m(L,W){y(L,e,W),s(e,l),s(l,i),s(e,o),s(o,a),s(e,f),s(f,p),s(e,_),s(_,d),y(L,v,W),y(L,g,W),s(g,k),s(k,T),s(g,P),s(P,S),s(g,M),s(M,F),y(L,z,W),y(L,O,W),s(O,R),s(R,Y),s(O,U),s(U,G)},p(L,W){W&1&&n!==(n=fe(L[0],7)+"")&&B(i,n),W&1&&r!==(r=fe(L[0],5)+"")&&B(a,r),W&1&&c!==(c=fe(L[0],4)+"")&&B(p,c),W&1&&b!==(b=fe(L[0],3)+"")&&B(d,b),W&1&&C!==(C=fe(L[0],2)+"")&&B(T,C),W&1&&E!==(E=fe(L[0],1)+"")&&B(S,E),W&1&&I!==(I=fe(L[0],0)+"")&&B(F,I),W&1&&q!==(q=fe(L[0],101)+"")&&B(Y,q),W&1&&H!==(H=fe(L[0],100)+"")&&B(G,H)},d(L){L&&w(e),L&&w(v),L&&w(g),L&&w(z),L&&w(O)}}}function Df(t){let e,l,n=fe(t[0],201)+"",i,o,r=fe(t[0],202)+"",a,f,c=fe(t[0],203)+"",p,_,b=fe(t[0],200)+"",d;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=m("option"),a=$(r),f=m("option"),p=$(c),_=m("option"),d=$(b),l.__value=201,l.value=l.__value,o.__value=202,o.value=o.__value,f.__value=203,f.value=f.__value,_.__value=200,_.value=_.__value,u(e,"label","Generic hardware")},m(v,g){y(v,e,g),s(e,l),s(l,i),s(e,o),s(o,a),s(e,f),s(f,p),s(e,_),s(_,d)},p(v,g){g&1&&n!==(n=fe(v[0],201)+"")&&B(i,n),g&1&&r!==(r=fe(v[0],202)+"")&&B(a,r),g&1&&c!==(c=fe(v[0],203)+"")&&B(p,c),g&1&&b!==(b=fe(v[0],200)+"")&&B(d,b)},d(v){v&&w(e)}}}function Ef(t){let e,l,n=fe(t[0],7)+"",i,o,r=fe(t[0],6)+"",a,f,c=fe(t[0],5)+"",p,_,b,d,v=fe(t[0],51)+"",g,k,C=fe(t[0],50)+"",T;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=m("option"),a=$(r),f=m("option"),p=$(c),_=h(),b=m("optgroup"),d=m("option"),g=$(v),k=m("option"),T=$(C),l.__value=7,l.value=l.__value,o.__value=6,o.value=o.__value,f.__value=5,f.value=f.__value,u(e,"label","amsleser.no"),d.__value=51,d.value=d.__value,k.__value=50,k.value=k.__value,u(b,"label","Generic hardware")},m(P,E){y(P,e,E),s(e,l),s(l,i),s(e,o),s(o,a),s(e,f),s(f,p),y(P,_,E),y(P,b,E),s(b,d),s(d,g),s(b,k),s(k,T)},p(P,E){E&1&&n!==(n=fe(P[0],7)+"")&&B(i,n),E&1&&r!==(r=fe(P[0],6)+"")&&B(a,r),E&1&&c!==(c=fe(P[0],5)+"")&&B(p,c),E&1&&v!==(v=fe(P[0],51)+"")&&B(g,v),E&1&&C!==(C=fe(P[0],50)+"")&&B(T,C)},d(P){P&&w(e),P&&w(_),P&&w(b)}}}function If(t){let e,l,n=fe(t[0],8)+"",i,o,r,a,f=fe(t[0],71)+"",c,p,_=fe(t[0],70)+"",b;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=h(),r=m("optgroup"),a=m("option"),c=$(f),p=m("option"),b=$(_),l.__value=8,l.value=l.__value,u(e,"label","Custom hardware"),a.__value=71,a.value=a.__value,p.__value=70,p.value=p.__value,u(r,"label","Generic hardware")},m(d,v){y(d,e,v),s(e,l),s(l,i),y(d,o,v),y(d,r,v),s(r,a),s(a,c),s(r,p),s(p,b)},p(d,v){v&1&&n!==(n=fe(d[0],8)+"")&&B(i,n),v&1&&f!==(f=fe(d[0],71)+"")&&B(c,f),v&1&&_!==(_=fe(d[0],70)+"")&&B(b,_)},d(d){d&&w(e),d&&w(o),d&&w(r)}}}function Ff(t){let e,l,n=fe(t[0],200)+"",i;return{c(){e=m("optgroup"),l=m("option"),i=$(n),l.__value=200,l.value=l.__value,u(e,"label","Generic hardware")},m(o,r){y(o,e,r),s(e,l),s(l,i)},p(o,r){r&1&&n!==(n=fe(o[0],200)+"")&&B(i,n)},d(o){o&&w(e)}}}function c0(t){let e,l,n,i,o,r,a,f=t[0]=="esp8266"&&Af(t),c=t[0]=="esp32"&&Df(t),p=t[0]=="esp32s2"&&Ef(t),_=t[0]=="esp32c3"&&If(t),b=t[0]=="esp32solo"&&Ff(t);return{c(){e=m("option"),l=h(),f&&f.c(),n=h(),c&&c.c(),i=h(),p&&p.c(),o=h(),_&&_.c(),r=h(),b&&b.c(),a=Ge(),e.__value=-1,e.value=e.__value},m(d,v){y(d,e,v),y(d,l,v),f&&f.m(d,v),y(d,n,v),c&&c.m(d,v),y(d,i,v),p&&p.m(d,v),y(d,o,v),_&&_.m(d,v),y(d,r,v),b&&b.m(d,v),y(d,a,v)},p(d,[v]){d[0]=="esp8266"?f?f.p(d,v):(f=Af(d),f.c(),f.m(n.parentNode,n)):f&&(f.d(1),f=null),d[0]=="esp32"?c?c.p(d,v):(c=Df(d),c.c(),c.m(i.parentNode,i)):c&&(c.d(1),c=null),d[0]=="esp32s2"?p?p.p(d,v):(p=Ef(d),p.c(),p.m(o.parentNode,o)):p&&(p.d(1),p=null),d[0]=="esp32c3"?_?_.p(d,v):(_=If(d),_.c(),_.m(r.parentNode,r)):_&&(_.d(1),_=null),d[0]=="esp32solo"?b?b.p(d,v):(b=Ff(d),b.c(),b.m(a.parentNode,a)):b&&(b.d(1),b=null)},i:ne,o:ne,d(d){d&&w(e),d&&w(l),f&&f.d(d),d&&w(n),c&&c.d(d),d&&w(i),p&&p.d(d),d&&w(o),_&&_.d(d),d&&w(r),b&&b.d(d),d&&w(a)}}}function m0(t,e,l){let{chip:n}=e;return t.$$set=i=>{"chip"in i&&l(0,n=i.chip)},[n]}class p0 extends $e{constructor(e){super(),ye(this,e,m0,c0,ke,{chip:0})}}function Rf(t){let e;return{c(){e=m("div"),e.textContent="WARNING: Changing this configuration will affect basic configuration of your device. Only make changes here if instructed by vendor",u(e,"class","bd-red")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Lf(t){let e,l,n,i,o,r,a;return r=new Dc({props:{chip:t[0].chip}}),{c(){e=m("div"),l=$("HAN GPIO"),n=m("br"),i=h(),o=m("select"),J(r.$$.fragment),u(o,"name","vh"),u(o,"class","in-s"),u(e,"class","my-3")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),X(r,o,null),a=!0},p(f,c){const p={};c&1&&(p.chip=f[0].chip),r.$set(p)},i(f){a||(N(r.$$.fragment,f),a=!0)},o(f){D(r.$$.fragment,f),a=!1},d(f){f&&w(e),Z(r)}}}function _0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U=t[0].usrcfg&&Rf();v=new p0({props:{chip:t[0].chip}});let H=t[0].board&&t[0].board>20&&Lf(t);return O=new Mt({props:{active:t[1],message:"Saving device configuration"}}),{c(){e=m("div"),l=m("div"),n=m("form"),i=m("input"),o=h(),r=m("strong"),r.textContent="Initial configuration",a=h(),U&&U.c(),f=h(),c=m("div"),p=$("Board type"),_=m("br"),b=h(),d=m("select"),J(v.$$.fragment),g=h(),H&&H.c(),k=h(),C=m("div"),T=m("label"),P=m("input"),E=$(" Clear all other configuration"),S=h(),M=m("div"),M.innerHTML='',I=h(),F=m("span"),F.textContent=" ",z=h(),J(O.$$.fragment),u(i,"type","hidden"),u(i,"name","v"),i.value="true",u(r,"class","text-sm"),u(d,"name","vb"),u(d,"class","in-s"),t[0].board===void 0&&tt(()=>t[4].call(d)),u(c,"class","my-3"),u(P,"type","checkbox"),u(P,"name","vr"),P.__value="true",P.value=P.__value,u(P,"class","rounded mb-1"),u(C,"class","my-3"),u(M,"class","my-3"),u(F,"class","clear-both"),u(n,"autocomplete","off"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2")},m(G,L){y(G,e,L),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),s(n,a),U&&U.m(n,null),s(n,f),s(n,c),s(c,p),s(c,_),s(c,b),s(c,d),X(v,d,null),Re(d,t[0].board,!0),s(n,g),H&&H.m(n,null),s(n,k),s(n,C),s(C,T),s(T,P),P.checked=t[2],s(T,E),s(n,S),s(n,M),s(n,I),s(n,F),y(G,z,L),X(O,G,L),R=!0,q||(Y=[K(d,"change",t[4]),K(P,"change",t[5]),K(n,"submit",bs(t[3]))],q=!0)},p(G,[L]){G[0].usrcfg?U||(U=Rf(),U.c(),U.m(n,f)):U&&(U.d(1),U=null);const W={};L&1&&(W.chip=G[0].chip),v.$set(W),L&1&&Re(d,G[0].board),G[0].board&&G[0].board>20?H?(H.p(G,L),L&1&&N(H,1)):(H=Lf(G),H.c(),N(H,1),H.m(n,k)):H&&(Te(),D(H,1,1,()=>{H=null}),Se()),L&4&&(P.checked=G[2]);const j={};L&2&&(j.active=G[1]),O.$set(j)},i(G){R||(N(v.$$.fragment,G),N(H),N(O.$$.fragment,G),R=!0)},o(G){D(v.$$.fragment,G),D(H),D(O.$$.fragment,G),R=!1},d(G){G&&w(e),U&&U.d(),Z(v),H&&H.d(),G&&w(z),Z(O,G),q=!1,Ve(Y)}}}function d0(t,e,l){let{sysinfo:n={}}=e,i=!1;async function o(c){l(1,i=!0);const p=new FormData(c.target),_=new URLSearchParams;for(let v of p){const[g,k]=v;_.append(g,k)}let d=await(await fetch("/save",{method:"POST",body:_})).json();l(1,i=!1),Rt.update(v=>(v.vndcfg=d.success,v.booting=d.reboot,v)),ni(n.usrcfg?"/":"/setup")}let r=!1;function a(){n.board=_t(this),l(0,n)}function f(){r=this.checked,l(2,r),l(0,n)}return t.$$set=c=>{"sysinfo"in c&&l(0,n=c.sysinfo)},t.$$.update=()=>{t.$$.dirty&1&&l(2,r=!n.usrcfg)},[n,i,r,o,a,f]}class v0 extends $e{constructor(e){super(),ye(this,e,d0,_0,ke,{sysinfo:0})}}function Of(t){let e,l,n,i,o,r,a,f;return a=new Ec({}),{c(){e=m("br"),l=h(),n=m("div"),i=m("input"),o=h(),r=m("select"),J(a.$$.fragment),u(i,"name","si"),u(i,"type","text"),u(i,"class","in-f w-full"),i.required=t[1],u(r,"name","su"),u(r,"class","in-l"),r.required=t[1],u(n,"class","flex")},m(c,p){y(c,e,p),y(c,l,p),y(c,n,p),s(n,i),s(n,o),s(n,r),X(a,r,null),f=!0},p(c,p){(!f||p&2)&&(i.required=c[1]),(!f||p&2)&&(r.required=c[1])},i(c){f||(N(a.$$.fragment,c),f=!0)},o(c){D(a.$$.fragment,c),f=!1},d(c){c&&w(e),c&&w(l),c&&w(n),Z(a)}}}function Uf(t){let e;return{c(){e=m("div"),e.innerHTML=`
Gateway
+Occurred in: ${i}`:"",r=_o(t),a=xf(e)?e(r):e;return`<${r}> ${a}${o}`}const pc=t=>(...e)=>t(k1(...e)),_c=pc(t=>{throw new Error(t)}),gs=pc(console.warn),Rr=4,w1=3,y1=2,$1=1,C1=1;function T1(t,e){const l=t.default?0:fl(t.fullPath).reduce((n,i)=>{let o=n;return o+=Rr,c1(i)?o+=C1:m1(i)?o+=y1:uc(i)?o-=Rr+$1:o+=w1,o},0);return{route:t,score:l,index:e}}function S1(t){return t.map(T1).sort((e,l)=>e.scorel.score?-1:e.index-l.index)}function dc(t,e){let l,n;const[i]=e.split("?"),o=fl(i),r=o[0]==="",a=S1(t);for(let f=0,c=a.length;f({...p,params:b,uri:C});if(p.default){n=d(e);continue}const v=fl(p.fullPath),g=Math.max(o.length,v.length);let k=0;for(;k{c===".."?f.pop():c!=="."&&f.push(c)}),Gs(`/${f.join("/")}`,n)}function Lr(t,e){const{pathname:l,hash:n="",search:i="",state:o}=t,r=fl(e,!0),a=fl(l,!0);for(;r.length;)r[0]!==a[0]&&_c(on,`Invalid state: All locations must begin with the basepath "${e}", found "${l}"`),r.shift(),a.shift();return{pathname:Si(...a),hash:n,search:i,state:o}}const Ur=t=>t.length===1?"":t,vo=t=>{const e=t.indexOf("?"),l=t.indexOf("#"),n=e!==-1,i=l!==-1,o=i?Ur(ki(t,l)):"",r=i?ki(t,0,l):t,a=n?Ur(ki(r,e)):"";return{pathname:(n?ki(r,0,e):r)||"/",search:a,hash:o}},N1=t=>{const{pathname:e,search:l,hash:n}=t;return e+l+n};function M1(t,e,l){return Si(l,P1(t,e))}function A1(t,e){const l=mo(p1(t)),n=fl(l,!0),i=fl(e,!0).slice(0,n.length),o=vc({fullPath:l},Si(...i));return o&&o.uri}const Bs="POP",D1="PUSH",E1="REPLACE";function zs(t){return{...t.location,pathname:encodeURI(decodeURI(t.location.pathname)),state:t.history.state,_key:t.history.state&&t.history.state._key||"initial"}}function I1(t){let e=[],l=zs(t),n=Bs;const i=(o=e)=>o.forEach(r=>r({location:l,action:n}));return{get location(){return l},listen(o){e.push(o);const r=()=>{l=zs(t),n=Bs,i([o])};i([o]);const a=lc(t,"popstate",r);return()=>{a(),e=e.filter(f=>f!==o)}},navigate(o,r){const{state:a={},replace:f=!1}=r||{};if(n=f?E1:D1,ec(o))r&&gs(mc,"Navigation options (state or replace) are not supported, when passing a number as the first argument to navigate. They are ignored."),n=Bs,t.history.go(o);else{const c={...a,_key:u1()};try{t.history[f?"replaceState":"pushState"](c,"",o)}catch{t.location[f?"replace":"assign"](o)}}l=zs(t),i()}}}function Ys(t,e){return{...vo(e),state:t}}function F1(t="/"){let e=0,l=[Ys(null,t)];return{get entries(){return l},get location(){return l[e]},addEventListener(){},removeEventListener(){},history:{get state(){return l[e].state},pushState(n,i,o){e++,l=l.slice(0,e),l.push(Ys(n,o))},replaceState(n,i,o){l[e]=Ys(n,o)},go(n){const i=e+n;i<0||i>l.length-1||(e=i)}}}}const R1=!!(!Ll&&window.document&&window.document.createElement),L1=!Ll&&window.location.origin==="null",hc=I1(R1&&!L1?window:F1()),{navigate:ni}=hc;let Tl=null,bc=!0;function U1(t,e){const l=document.querySelectorAll("[data-svnav-router]");for(let n=0;nTl.level||t.level===Tl.level&&U1(t.routerId,Tl.routerId))&&(Tl=t)}function q1(){Tl=null}function H1(){bc=!1}function Or(t){if(!t)return!1;const e="tabindex";try{if(!t.hasAttribute(e)){t.setAttribute(e,"-1");let l;l=lc(t,"blur",()=>{t.removeAttribute(e),l()})}return t.focus(),document.activeElement===t}catch{return!1}}function j1(t,e){return Number(t.dataset.svnavRouteEnd)===e}function W1(t){return/^H[1-6]$/i.test(t.tagName)}function qr(t,e=document){return e.querySelector(t)}function G1(t){let l=qr(`[data-svnav-route-start="${t}"]`).nextElementSibling;for(;!j1(l,t);){if(W1(l))return l;const n=qr("h1,h2,h3,h4,h5,h6",l);if(n)return n;l=l.nextElementSibling}return null}function B1(t){Promise.resolve(si(t.focusElement)).then(e=>{const l=e||G1(t.id);l||gs(on,`Could not find an element to focus. You should always render a header for accessibility reasons, or set a custom focus element via the "useFocus" hook. If you don't want this Route or Router to manage focus, pass "primary={false}" to it.`,t,$s),!Or(l)&&Or(document.documentElement)})}const z1=(t,e,l)=>(n,i)=>l1().then(()=>{if(!Tl||bc){H1();return}if(n&&B1(Tl.route),t.announcements&&i){const{path:o,fullPath:r,meta:a,params:f,uri:c}=Tl.route,p=t.createAnnouncement({path:o,fullPath:r,meta:a,params:f,uri:c},si(l));Promise.resolve(p).then(_=>{e.set(_)})}q1()}),Y1="position:fixed;top:-1px;left:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;";function V1(t){let e,l,n=[{role:"status"},{"aria-atomic":"true"},{"aria-live":"polite"},{"data-svnav-announcer":""},nc(t[6],Y1)],i={};for(let o=0;o`Navigated to ${le.uri}`,announcements:!0,...v},C=p,T=mo(p),P=Rl(Xs),E=Rl(ui),S=!P,A=Q1(),I=d&&!(E&&!E.manageFocus),F=rt("");ul(t,F,le=>l(0,a=le));const Y=E?E.disableInlineStyles:g,U=rt([]);ul(t,U,le=>l(20,r=le));const R=rt(null);ul(t,R,le=>l(18,i=le));let q=!1;const z=S?0:E.level+1,H=S?rt((()=>Lr(Ll?vo(_):b.location,T))()):P;ul(t,H,le=>l(17,n=le));const G=rt(n);ul(t,G,le=>l(19,o=le));const L=z1(k,F,H),W=le=>de=>de.filter(ie=>ie.id!==le);function j(le){if(Ll){if(q)return;const de=vc(le,n.pathname);if(de)return q=!0,de}else U.update(de=>{const ie=W(le.id)(de);return ie.push(le),ie})}function te(le){U.update(W(le))}return!S&&p!==Hr&&gs(on,'Only top-level Routers can have a "basepath" prop. It is ignored.',{basepath:p}),S&&(xc(()=>b.listen(de=>{const ie=Lr(de.location,T);G.set(n),H.set(ie)})),yi(Xs,H)),yi(ui,{activeRoute:R,registerRoute:j,unregisterRoute:te,manageFocus:I,level:z,id:A,history:S?b:E.history,basepath:S?T:E.basepath,disableInlineStyles:Y}),t.$$set=le=>{"basepath"in le&&l(11,p=le.basepath),"url"in le&&l(12,_=le.url),"history"in le&&l(13,b=le.history),"primary"in le&&l(14,d=le.primary),"a11y"in le&&l(15,v=le.a11y),"disableInlineStyles"in le&&l(16,g=le.disableInlineStyles),"$$scope"in le&&l(21,c=le.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&2048&&p!==C&&gs(on,'You cannot change the "basepath" prop. It is ignored.'),t.$$.dirty[0]&1179648){const le=dc(r,n.pathname);R.set(le)}if(t.$$.dirty[0]&655360&&S){const le=!!n.hash,de=!le&&I,ie=!le||n.pathname!==o.pathname;L(de,ie)}t.$$.dirty[0]&262144&&I&&i&&i.primary&&O1({level:z,routerId:A,route:i})},[a,k,S,A,I,F,Y,U,R,H,G,p,_,b,d,v,g,n,i,o,r,c,f]}class Z1 extends $e{constructor(e){super(),ye(this,e,X1,K1,ke,{basepath:11,url:12,history:13,primary:14,a11y:15,disableInlineStyles:16},null,[-1,-1])}}const gc=Z1;function Pi(t,e,l=ui,n=on){Rl(l)||_c(t,o=>`You cannot use ${o} outside of a ${_o(n)}.`,e)}const J1=t=>{const{subscribe:e}=Rl(t);return{subscribe:e}};function kc(){return Pi(ac),J1(Xs)}function wc(){const{history:t}=Rl(ui);return t}function yc(){const t=Rl(sc);return t?r1(t,e=>e.base):rt("/")}function $c(){Pi(cc);const t=yc(),{basepath:e}=Rl(ui);return n=>M1(n,si(t),e)}function x1(){Pi(fc);const t=$c(),{navigate:e}=wc();return(n,i)=>{const o=ec(n)?n:t(n);return e(o,i)}}const em=t=>({params:t&16,location:t&8}),jr=t=>({params:Ll?si(t[10]):t[4],location:t[3],navigate:t[11]});function Wr(t){let e,l;return e=new gc({props:{primary:t[1],$$slots:{default:[nm]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&2&&(o.primary=n[1]),i&528409&&(o.$$scope={dirty:i,ctx:n}),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function tm(t){let e;const l=t[18].default,n=ro(l,t,t[19],jr);return{c(){n&&n.c()},m(i,o){n&&n.m(i,o),e=!0},p(i,o){n&&n.p&&(!e||o&524312)&&fo(n,l,i,i[19],e?ao(l,i[19],o,em):co(i[19]),jr)},i(i){e||(M(n,i),e=!0)},o(i){D(n,i),e=!1},d(i){n&&n.d(i)}}}function lm(t){let e,l,n;const i=[{location:t[3]},{navigate:t[11]},Ll?si(t[10]):t[4],t[12]];var o=t[0];function r(a){let f={};for(let c=0;c{Z(p,1)}),Pe()}o?(e=Dr(o,r()),J(e.$$.fragment),M(e.$$.fragment,1),X(e,l.parentNode,l)):e=null}else o&&e.$set(c)},i(a){n||(e&&M(e.$$.fragment,a),n=!0)},o(a){e&&D(e.$$.fragment,a),n=!1},d(a){a&&w(l),e&&Z(e,a)}}}function nm(t){let e,l,n,i;const o=[lm,tm],r=[];function a(f,c){return f[0]!==null?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=We()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e===p?r[e].p(f,c):(Se(),D(r[p],1,1,()=>{r[p]=null}),Pe(),l=r[e],l?l.p(f,c):(l=r[e]=o[e](f),l.c()),M(l,1),l.m(n.parentNode,n))},i(f){i||(M(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function im(t){let e,l,n,i,o,r=[Qs(t[7]),{"data-svnav-route-start":t[5]}],a={};for(let _=0;_{f=null}),Pe())},i(_){o||(M(f),o=!0)},o(_){D(f),o=!1},d(_){_&&w(e),_&&w(l),f&&f.d(_),_&&w(n),_&&w(i)}}}const sm=tc();function om(t,e,l){let n;const i=["path","component","meta","primary"];let o=hs(e,i),r,a,f,c,{$$slots:p={},$$scope:_}=e,{path:b=""}=e,{component:d=null}=e,{meta:v={}}=e,{primary:g=!0}=e;Pi($s,e);const k=sm(),{registerRoute:C,unregisterRoute:T,activeRoute:P,disableInlineStyles:E}=Rl(ui);ul(t,P,q=>l(16,r=q));const S=yc();ul(t,S,q=>l(17,f=q));const A=kc();ul(t,A,q=>l(3,a=q));const I=rt(null);let F;const Y=rt(),U=rt({});ul(t,U,q=>l(4,c=q)),yi(sc,Y),yi(a1,U),yi(f1,I);const R=x1();return Ll||e1(()=>T(k)),t.$$set=q=>{l(24,e=Jt(Jt({},e),vs(q))),l(12,o=hs(e,i)),"path"in q&&l(13,b=q.path),"component"in q&&l(0,d=q.component),"meta"in q&&l(14,v=q.meta),"primary"in q&&l(1,g=q.primary),"$$scope"in q&&l(19,_=q.$$scope)},t.$$.update=()=>{if(t.$$.dirty&155658){const q=b==="",z=Si(f,b),O={id:k,path:b,meta:v,default:q,fullPath:q?"":z,base:q?f:A1(z,a.pathname),primary:g,focusElement:I};Y.set(O),l(15,F=C(O))}if(t.$$.dirty&98304&&l(2,n=!!(F||r&&r.id===k)),t.$$.dirty&98308&&n){const{params:q}=F||r;U.set(q)}},e=vs(e),[d,g,n,a,c,k,P,E,S,A,U,R,o,b,v,F,r,f,p,_]}class um extends $e{constructor(e){super(),ye(this,e,om,im,ke,{path:13,component:0,meta:14,primary:1})}}const Cl=um;function rm(t){let e,l,n,i;const o=t[13].default,r=ro(o,t,t[12],null);let a=[{href:t[0]},t[2],t[1]],f={};for(let c=0;cl(11,_=I));const P=t1(),E=$c(),{navigate:S}=wc();function A(I){P("click",I),o1(I)&&(I.preventDefault(),S(n,{state:k,replace:r||g}))}return t.$$set=I=>{l(19,e=Jt(Jt({},e),vs(I))),l(18,p=hs(e,c)),"to"in I&&l(5,v=I.to),"replace"in I&&l(6,g=I.replace),"state"in I&&l(7,k=I.state),"getProps"in I&&l(8,C=I.getProps),"$$scope"in I&&l(12,d=I.$$scope)},t.$$.update=()=>{t.$$.dirty&2080&&l(0,n=E(v,_)),t.$$.dirty&2049&&l(10,i=Zs(_.pathname,n)),t.$$.dirty&2049&&l(9,o=n===_.pathname),t.$$.dirty&2049&&(r=vo(n)===N1(_)),t.$$.dirty&512&&l(2,a=o?{"aria-current":"page"}:{}),l(1,f=(()=>{if(xf(C)){const I=C({location:_,href:n,isPartiallyCurrent:i,isCurrent:o});return{...p,...I}}return p})())},e=vs(e),[n,f,a,T,A,v,g,k,C,o,i,_,d,b]}class fm extends $e{constructor(e){super(),ye(this,e,am,rm,ke,{to:5,replace:6,state:7,getProps:8})}}const Fl=fm;let Js=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Il(t){return t===1?"green":t===2?"yellow":t===3?"red":"gray"}function cm(t){return t>218&&t<242?"#32d900":t>212&&t<248?"#b1d900":t>208&&t<252?"#ffb800":"#d90000"}function Cc(t){return t>90?"#d90000":t>85?"#e32100":t>80?"#ffb800":t>75?"#dcd800":"#32d900"}function mm(t){return t>75?"#32d900":t>50?"#77d900":t>25?"#94d900":"#dcd800"}function ks(t){switch(t){case 1:return"Aidon";case 2:return"Kaifa";case 3:return"Kamstrup";case 8:return"Iskra";case 9:return"Landis+Gyr";case 10:return"Sagemcom";default:return""}}function Ie(t){for(t=t.toString();t.length<2;)t="0"+t;return t}function fe(t,e){switch(e){case 5:switch(t){case"esp8266":return"Pow-K (GPIO12)";case"esp32s2":return"Pow-K+"}case 7:switch(t){case"esp8266":return"Pow-U (GPIO12)";case"esp32s2":return"Pow-U+"}case 6:return"Pow-P1";case 51:return"Wemos S2 mini";case 50:return"Generic ESP32-S2";case 201:return"Wemos LOLIN D32";case 202:return"Adafruit HUZZAH32";case 203:return"DevKitC";case 200:return"Generic ESP32";case 2:return"HAN Reader 2.0 by Max Spencer";case 0:return"Custom hardware by Roar Fredriksen";case 1:return"Kamstrup module by Egil Opsahl";case 8:return"\xB5HAN mosquito by dbeinder";case 3:return"Pow-K (UART0)";case 4:return"Pow-U (UART0)";case 101:return"Wemos D1 mini";case 100:return"Generic ESP8266";case 70:return"Generic ESP32-C3";case 71:return"ESP32-C3-DevKitM-1"}}function Gr(t){switch(t){case-1:return"Parse error";case-2:return"Incomplete data received";case-3:return"Payload boundry flag missing";case-4:return"Header checksum error";case-5:return"Footer checksum error";case-9:return"Unknown data received, check meter config";case-41:return"Frame length not equal";case-51:return"Authentication failed";case-52:return"Decryption failed";case-53:return"Encryption key invalid";case 90:return"No HAN data received for at least 30s";case 91:return"Serial break";case 92:return"Serial buffer full";case 93:return"Serial FIFO overflow";case 94:return"Serial frame error";case 95:return"Serial parity error";case 96:return"RX error";case 98:return"Exception in code, debugging necessary";case 99:return"Autodetection failed"}return t<0?"Unspecified error "+t:""}function Br(t){switch(t){case-3:return"Connection failed";case-4:return"Network timeout";case-10:return"Connection denied";case-11:return"Failed to subscribe";case-13:return"Connection lost"}return t<0?"Unspecified error "+t:""}function zr(t){switch(t){case 401:case 403:return"Unauthorized, check API key";case 404:return"Price unavailable, not found";case 425:return"Server says its too early";case 429:return"Exceeded API rate limit";case 500:return"Internal server error";case-2:return"Incomplete data received";case-3:return"Invalid data, tag missing";case-51:return"Authentication failed";case-52:return"Decryption failed";case-53:return"Encryption key invalid"}return t<0?"Unspecified error "+t:""}function ii(t){switch(t){case 2:case 4:case 7:return!0}return!1}function Ye(t,e){return t==1||t==2&&e}function Rt(t){return"https://github.com/UtilitechAS/amsreader-firmware/wiki/"+t}function ce(t,e){return isNaN(t)?"-":(isNaN(e)&&(e=t<10?1:0),t.toFixed(e))}function rl(t,e){return t.setTime(t.getTime()+e*36e5),t}function Yr(t){if(t.chip=="esp8266")switch(t.boot_reason){case 0:return"Normal";case 1:return"WDT reset";case 2:return"Exception reset";case 3:return"Soft WDT reset";case 4:return"Software restart";case 5:return"Deep sleep";case 6:return"External reset";default:return"Unknown (8266)"}else switch(t.boot_reason){case 1:return"Vbat power on reset";case 3:return"Software reset";case 4:return"WDT reset";case 5:return"Deep sleep";case 6:return"SLC reset";case 7:return"Timer Group0 WDT reset";case 8:return"Timer Group1 WDT reset";case 9:return"RTC WDT reset";case 10:return"Instrusion test reset CPU";case 11:return"Time Group reset CPU";case 12:return"Software reset CPU";case 13:return"RTC WTD reset CPU";case 14:return"PRO CPU";case 15:return"Brownout";case 16:return"RTC reset";default:return"Unknown"}}async function Ul(t,e={}){const{timeout:l=8e3}=e,n=new AbortController,i=setTimeout(()=>n.abort(),l),o=await fetch(t,{...e,signal:n.signal});return clearTimeout(i),o}let ol={version:"",chip:"",mac:null,apmac:null,vndcfg:null,usrcfg:null,fwconsent:null,booting:!1,upgrading:!1,ui:{},security:0,boot_reason:0,upgrade:{x:-1,e:0,f:null,t:null},trying:null};const Lt=rt(ol);async function ho(){ol=await(await Ul("/sysinfo.json?t="+Math.floor(Date.now()/1e3))).json(),Lt.set(ol)}let ps=0,Vr=-127,Kr=null,pm={};const _m=ic(pm,t=>{let e;async function l(){Ul("/data.json").then(n=>n.json()).then(n=>{t(n),Vr!=n.t&&(Vr=n.t,setTimeout(Nc,2e3)),Kr!=n.p&&n.pe&&(Kr=n.p,setTimeout(dm,1e3)),ol.upgrading?window.location.reload():(!ol||!ol.chip||ol.booting||ps>1&&!ii(ol.board))&&(ho(),ln&&clearTimeout(ln),ln=setTimeout(bo,2e3),nn&&clearTimeout(nn),nn=setTimeout(go,3e3));let i=5e3;if(ii(ol.board)&&n.v>2.5){let o=3.3-Math.min(3.3,n.v);o>0&&(i=Math.max(o,.1)*10*5e3)}i>5e3&&console.log("Scheduling next data fetch in "+i+"ms"),e&&clearTimeout(e),e=setTimeout(l,i),ps=0}).catch(n=>{ps++,ps>3?(t({em:3,hm:0,wm:0,mm:0}),e=setTimeout(l,15e3)):e=setTimeout(l,ii(ol.board)?1e4:5e3)})}return l(),function(){clearTimeout(e)}});let xs={};const Tc=rt(xs);async function dm(){xs=await(await Ul("/energyprice.json")).json(),Tc.set(xs)}let eo={},ln;async function bo(){ln&&(clearTimeout(ln),ln=0),eo=await(await Ul("/dayplot.json")).json(),Sc.set(eo);let e=new Date;ln=setTimeout(bo,(60-e.getMinutes())*6e4+20)}const Sc=rt(eo,t=>(bo(),function(){}));let to={},nn;async function go(){nn&&(clearTimeout(nn),nn=0),to=await(await Ul("/monthplot.json")).json(),Pc.set(to);let e=new Date;nn=setTimeout(go,(24-e.getHours())*36e5+40)}const Pc=rt(to,t=>(go(),function(){}));let lo={};async function Nc(){lo=await(await Ul("/temperature.json")).json(),Mc.set(lo)}const Mc=rt(lo,t=>(Nc(),function(){}));let no={},_s;async function Ac(){_s&&(clearTimeout(_s),_s=0),no=await(await Ul("/tariff.json")).json(),Dc.set(no);let e=new Date;_s=setTimeout(Ac,(60-e.getMinutes())*6e4+30)}const Dc=rt(no,t=>function(){});let io=[];const ko=rt(io);async function vm(){io=await(await Ul("https://api.github.com/repos/UtilitechAS/amsreader-firmware/releases")).json(),ko.set(io)}function ws(t){return"WARNING: "+t+" must be connected to an external power supply during firmware upgrade. Failure to do so may cause power-down during upload resulting in non-functioning unit."}async function Ec(t){await(await fetch("/upgrade?expected_version="+t,{method:"POST"})).json()}function Ic(t,e){if(/^v\d{1,2}\.\d{1,2}\.\d{1,2}$/.test(t)){let l=t.substring(1).split("."),n=parseInt(l[0]),i=parseInt(l[1]),o=parseInt(l[2]),r=[...e];r.reverse();let a,f,c;for(let p=0;po&&(a=_):g==i+1&&(f=_);else if(v==n+1)if(c){let C=c.tag_name.substring(1).split(".");parseInt(C[0]);let T=parseInt(C[1]);parseInt(C[2]),g==T&&(c=_)}else c=_}return f||c||a||!1}else return e[0]}const hm="/github.svg";function Qr(t){let e,l;function n(r,a){return r[1]>1?Cm:r[1]>0?$m:r[2]>1?ym:r[2]>0?wm:r[3]>1?km:r[3]>0?gm:bm}let i=n(t),o=i(t);return{c(){e=$(`Up + `),o.c(),l=We()},m(r,a){y(r,e,a),o.m(r,a),y(r,l,a)},p(r,a){i===(i=n(r))&&o?o.p(r,a):(o.d(1),o=i(r),o&&(o.c(),o.m(l.parentNode,l)))},d(r){r&&w(e),o.d(r),r&&w(l)}}}function bm(t){let e,l;return{c(){e=$(t[0]),l=$(" seconds")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&1&&B(e,n[0])},d(n){n&&w(e),n&&w(l)}}}function gm(t){let e,l;return{c(){e=$(t[3]),l=$(" minute")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&8&&B(e,n[3])},d(n){n&&w(e),n&&w(l)}}}function km(t){let e,l;return{c(){e=$(t[3]),l=$(" minutes")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&8&&B(e,n[3])},d(n){n&&w(e),n&&w(l)}}}function wm(t){let e,l;return{c(){e=$(t[2]),l=$(" hour")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&4&&B(e,n[2])},d(n){n&&w(e),n&&w(l)}}}function ym(t){let e,l;return{c(){e=$(t[2]),l=$(" hours")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&4&&B(e,n[2])},d(n){n&&w(e),n&&w(l)}}}function $m(t){let e,l;return{c(){e=$(t[1]),l=$(" day")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&2&&B(e,n[1])},d(n){n&&w(e),n&&w(l)}}}function Cm(t){let e,l;return{c(){e=$(t[1]),l=$(" days")},m(n,i){y(n,e,i),y(n,l,i)},p(n,i){i&2&&B(e,n[1])},d(n){n&&w(e),n&&w(l)}}}function Tm(t){let e,l=t[0]&&Qr(t);return{c(){l&&l.c(),e=We()},m(n,i){l&&l.m(n,i),y(n,e,i)},p(n,[i]){n[0]?l?l.p(n,i):(l=Qr(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:ne,o:ne,d(n){l&&l.d(n),n&&w(e)}}}function Sm(t,e,l){let{epoch:n}=e,i=0,o=0,r=0;return t.$$set=a=>{"epoch"in a&&l(0,n=a.epoch)},t.$$.update=()=>{t.$$.dirty&1&&(l(1,i=Math.floor(n/86400)),l(2,o=Math.floor(n/3600)),l(3,r=Math.floor(n/60)))},[n,i,o,r]}class Pm extends $e{constructor(e){super(),ye(this,e,Sm,Tm,ke,{epoch:0})}}function Nm(t){let e,l,n;return{c(){e=m("span"),l=$(t[2]),u(e,"title",t[1]),u(e,"class",n="bd-"+t[0])},m(i,o){y(i,e,o),s(e,l)},p(i,[o]){o&4&&B(l,i[2]),o&2&&u(e,"title",i[1]),o&1&&n!==(n="bd-"+i[0])&&u(e,"class",n)},i:ne,o:ne,d(i){i&&w(e)}}}function Mm(t,e,l){let{color:n}=e,{title:i}=e,{text:o}=e;return t.$$set=r=>{"color"in r&&l(0,n=r.color),"title"in r&&l(1,i=r.title),"text"in r&&l(2,o=r.text)},[n,i,o]}class al extends $e{constructor(e){super(),ye(this,e,Mm,Nm,ke,{color:0,title:1,text:2})}}function Am(t){let e,l=`${Ie(t[0].getDate())}.${Ie(t[0].getMonth()+1)}.${t[0].getFullYear()} ${Ie(t[0].getHours())}:${Ie(t[0].getMinutes())}`,n;return{c(){e=m("span"),n=$(l),u(e,"class",t[1])},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l=`${Ie(i[0].getDate())}.${Ie(i[0].getMonth()+1)}.${i[0].getFullYear()} ${Ie(i[0].getHours())}:${Ie(i[0].getMinutes())}`)&&B(n,l),o&2&&u(e,"class",i[1])},d(i){i&&w(e)}}}function Dm(t){let e=`${Ie(t[0].getDate())}. ${Js[t[0].getMonth()]} ${Ie(t[0].getHours())}:${Ie(t[0].getMinutes())}`,l;return{c(){l=$(e)},m(n,i){y(n,l,i)},p(n,i){i&1&&e!==(e=`${Ie(n[0].getDate())}. ${Js[n[0].getMonth()]} ${Ie(n[0].getHours())}:${Ie(n[0].getMinutes())}`)&&B(l,e)},d(n){n&&w(l)}}}function Em(t){let e;function l(o,r){return o[2]?Dm:Am}let n=l(t),i=n(t);return{c(){i.c(),e=We()},m(o,r){i.m(o,r),y(o,e,r)},p(o,[r]){n===(n=l(o))&&i?i.p(o,r):(i.d(1),i=n(o),i&&(i.c(),i.m(e.parentNode,e)))},i:ne,o:ne,d(o){i.d(o),o&&w(e)}}}function Im(t,e,l){let{timestamp:n}=e,{fullTimeColor:i}=e,{offset:o}=e,r;return t.$$set=a=>{"timestamp"in a&&l(0,n=a.timestamp),"fullTimeColor"in a&&l(1,i=a.fullTimeColor),"offset"in a&&l(3,o=a.offset)},t.$$.update=()=>{t.$$.dirty&9&&(l(2,r=Math.abs(new Date().getTime()-n.getTime())<3e5),isNaN(o)||rl(n,o-(n.getHours()-n.getUTCHours())))},[n,i,r,o]}class Fc extends $e{constructor(e){super(),ye(this,e,Im,Em,ke,{timestamp:0,fullTimeColor:1,offset:3})}}function Fm(t){let e,l,n;return{c(){e=qe("svg"),l=qe("path"),n=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z"),u(n,"stroke-linecap","round"),u(n,"stroke-linejoin","round"),u(n,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(i,o){y(i,e,o),s(e,l),s(e,n)},p:ne,i:ne,o:ne,d(i){i&&w(e)}}}class Rm extends $e{constructor(e){super(),ye(this,e,null,Fm,ke,{})}}function Lm(t){let e,l;return{c(){e=qe("svg"),l=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(n,i){y(n,e,i),s(e,l)},p:ne,i:ne,o:ne,d(n){n&&w(e)}}}class Um extends $e{constructor(e){super(),ye(this,e,null,Lm,ke,{})}}function Om(t){let e,l;return{c(){e=qe("svg"),l=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(n,i){y(n,e,i),s(e,l)},p:ne,i:ne,o:ne,d(n){n&&w(e)}}}class Ft extends $e{constructor(e){super(),ye(this,e,null,Om,ke,{})}}function qm(t){let e,l;return{c(){e=qe("svg"),l=qe("path"),u(l,"stroke-linecap","round"),u(l,"stroke-linejoin","round"),u(l,"d","M9 8.25H7.5a2.25 2.25 0 00-2.25 2.25v9a2.25 2.25 0 002.25 2.25h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25H15M9 12l3 3m0 0l3-3m-3 3V2.25"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"fill","none"),u(e,"viewBox","0 0 24 24"),u(e,"stroke-width","1.5"),u(e,"stroke","currentColor"),u(e,"class","w-6 h-6")},m(n,i){y(n,e,i),s(e,l)},p:ne,i:ne,o:ne,d(n){n&&w(e)}}}class Rc extends $e{constructor(e){super(),ye(this,e,null,qm,ke,{})}}function Hm(t){let e,l,n=t[1].version+"",i;return{c(){e=$("AMS reader "),l=m("span"),i=$(n)},m(o,r){y(o,e,r),y(o,l,r),s(l,i)},p(o,r){r&2&&n!==(n=o[1].version+"")&&B(i,n)},d(o){o&&w(e),o&&w(l)}}}function Xr(t){let e,l=(t[0].t>-50?t[0].t.toFixed(1):"-")+"",n,i;return{c(){e=m("div"),n=$(l),i=$("\xB0C"),u(e,"class","flex-none my-auto")},m(o,r){y(o,e,r),s(e,n),s(e,i)},p(o,r){r&1&&l!==(l=(o[0].t>-50?o[0].t.toFixed(1):"-")+"")&&B(n,l)},d(o){o&&w(e)}}}function Zr(t){let e,l="HAN: "+Gr(t[0].he),n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l="HAN: "+Gr(i[0].he))&&B(n,l)},d(i){i&&w(e)}}}function Jr(t){let e,l="MQTT: "+Br(t[0].me),n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l="MQTT: "+Br(i[0].me))&&B(n,l)},d(i){i&&w(e)}}}function xr(t){let e,l="PriceAPI: "+zr(t[0].ee),n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&1&&l!==(l="PriceAPI: "+zr(i[0].ee))&&B(n,l)},d(i){i&&w(e)}}}function ea(t){let e,l,n,i,o,r;return l=new Fl({props:{to:"/configuration",$$slots:{default:[jm]},$$scope:{ctx:t}}}),o=new Fl({props:{to:"/status",$$slots:{default:[Wm]},$$scope:{ctx:t}}}),{c(){e=m("div"),J(l.$$.fragment),n=h(),i=m("div"),J(o.$$.fragment),u(e,"class","flex-none px-1 mt-1"),u(e,"title","Configuration"),u(i,"class","flex-none px-1 mt-1"),u(i,"title","Device information")},m(a,f){y(a,e,f),X(l,e,null),y(a,n,f),y(a,i,f),X(o,i,null),r=!0},i(a){r||(M(l.$$.fragment,a),M(o.$$.fragment,a),r=!0)},o(a){D(l.$$.fragment,a),D(o.$$.fragment,a),r=!1},d(a){a&&w(e),Z(l),a&&w(n),a&&w(i),Z(o)}}}function jm(t){let e,l;return e=new Rm({}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Wm(t){let e,l;return e=new Um({}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function ta(t){let e,l,n,i,o;const r=[Bm,Gm],a=[];function f(c,p){return c[1].security==0||c[0].a?0:1}return l=f(t),n=a[l]=r[l](t),{c(){e=m("div"),n.c(),u(e,"class","flex-none mr-3 text-yellow-500"),u(e,"title",i="New version: "+t[2].tag_name)},m(c,p){y(c,e,p),a[l].m(e,null),o=!0},p(c,p){let _=l;l=f(c),l===_?a[l].p(c,p):(Se(),D(a[_],1,1,()=>{a[_]=null}),Pe(),n=a[l],n?n.p(c,p):(n=a[l]=r[l](c),n.c()),M(n,1),n.m(e,null)),(!o||p&4&&i!==(i="New version: "+c[2].tag_name))&&u(e,"title",i)},i(c){o||(M(n),o=!0)},o(c){D(n),o=!1},d(c){c&&w(e),a[l].d()}}}function Gm(t){let e,l,n=t[2].tag_name+"",i;return{c(){e=m("span"),l=$("New version: "),i=$(n)},m(o,r){y(o,e,r),s(e,l),s(e,i)},p(o,r){r&4&&n!==(n=o[2].tag_name+"")&&B(i,n)},i:ne,o:ne,d(o){o&&w(e)}}}function Bm(t){let e,l,n,i=t[2].tag_name+"",o,r,a,f,c,p;return a=new Rc({}),{c(){e=m("button"),l=m("span"),n=$("New version: "),o=$(i),r=h(),J(a.$$.fragment),u(l,"class","mt-1"),u(e,"class","flex")},m(_,b){y(_,e,b),s(e,l),s(l,n),s(l,o),s(e,r),X(a,e,null),f=!0,c||(p=K(e,"click",t[3]),c=!0)},p(_,b){(!f||b&4)&&i!==(i=_[2].tag_name+"")&&B(o,i)},i(_){f||(M(a.$$.fragment,_),f=!0)},o(_){D(a.$$.fragment,_),f=!1},d(_){_&&w(e),Z(a),c=!1,p()}}}function zm(t){let e,l,n,i,o,r,a,f,c,p,_,b,d=(t[0].m?(t[0].m/1e3).toFixed(1):"-")+"",v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O,H,G,L,W,j,te,le,de,ie,we,Fe,Ce,Re;i=new Fl({props:{to:"/",$$slots:{default:[Hm]},$$scope:{ctx:t}}}),f=new Pm({props:{epoch:t[0].u}});let ve=t[0].t>-50&&Xr(t);T=new al({props:{title:"ESP",text:t[1].booting?"Booting":t[0].v>2?t[0].v.toFixed(2)+"V":"ESP",color:Il(t[1].booting?2:t[0].em)}}),E=new al({props:{title:"HAN",text:"HAN",color:Il(t[1].booting?9:t[0].hm)}}),A=new al({props:{title:"WiFi",text:t[0].r?t[0].r.toFixed(0)+"dBm":"WiFi",color:Il(t[1].booting?9:t[0].wm)}}),F=new al({props:{title:"MQTT",text:"MQTT",color:Il(t[1].booting?9:t[0].mm)}});let Ne=(t[0].he<0||t[0].he>0)&&Zr(t),Ee=t[0].me<0&&Jr(t),me=(t[0].ee>0||t[0].ee<0)&&xr(t);te=new Fc({props:{timestamp:t[0].c?new Date(t[0].c*1e3):new Date(0),offset:t[1].clock_offset,fullTimeColor:"text-red-500"}});let se=t[1].vndcfg&&t[1].usrcfg&&ea(t);Fe=new Ft({});let pe=t[1].fwconsent===1&&t[2]&&ta(t);return{c(){e=m("nav"),l=m("div"),n=m("div"),J(i.$$.fragment),o=h(),r=m("div"),a=m("div"),J(f.$$.fragment),c=h(),ve&&ve.c(),p=h(),_=m("div"),b=$("Free mem: "),v=$(d),g=$("kb"),k=h(),C=m("div"),J(T.$$.fragment),P=h(),J(E.$$.fragment),S=h(),J(A.$$.fragment),I=h(),J(F.$$.fragment),Y=h(),Ne&&Ne.c(),U=h(),Ee&&Ee.c(),R=h(),me&&me.c(),q=h(),z=m("div"),O=m("div"),H=m("a"),G=m("img"),W=h(),j=m("div"),J(te.$$.fragment),le=h(),se&&se.c(),de=h(),ie=m("div"),we=m("a"),J(Fe.$$.fragment),Ce=h(),pe&&pe.c(),u(n,"class","flex text-lg text-gray-100 p-2"),u(a,"class","flex-none my-auto"),u(_,"class","flex-none my-auto"),u(r,"class","flex-none my-auto p-2 flex space-x-4"),u(C,"class","flex-auto flex-wrap my-auto justify-center p-2"),u(G,"class","gh-logo"),Gc(G.src,L=hm)||u(G,"src",L),u(G,"alt","GitHub repo"),u(H,"class","float-right"),u(H,"href","https://github.com/UtilitechAS/amsreader-firmware"),u(H,"target","_blank"),u(H,"rel","noreferrer"),u(H,"aria-label","GitHub"),u(O,"class","flex-none"),u(j,"class","flex-none my-auto px-2"),u(we,"href",Rt("")),u(we,"target","_blank"),u(we,"rel","noreferrer"),u(ie,"class","flex-none px-1 mt-1"),u(ie,"title","Documentation"),u(z,"class","flex-auto p-2 flex flex-row-reverse flex-wrap"),u(l,"class","flex flex-wrap space-x-4 text-sm text-gray-300"),u(e,"class","bg-violet-600 p-1 rounded-md mx-2")},m(Q,oe){y(Q,e,oe),s(e,l),s(l,n),X(i,n,null),s(l,o),s(l,r),s(r,a),X(f,a,null),s(r,c),ve&&ve.m(r,null),s(r,p),s(r,_),s(_,b),s(_,v),s(_,g),s(l,k),s(l,C),X(T,C,null),s(C,P),X(E,C,null),s(C,S),X(A,C,null),s(C,I),X(F,C,null),s(l,Y),Ne&&Ne.m(l,null),s(l,U),Ee&&Ee.m(l,null),s(l,R),me&&me.m(l,null),s(l,q),s(l,z),s(z,O),s(O,H),s(H,G),s(z,W),s(z,j),X(te,j,null),s(z,le),se&&se.m(z,null),s(z,de),s(z,ie),s(ie,we),X(Fe,we,null),s(z,Ce),pe&&pe.m(z,null),Re=!0},p(Q,[oe]){const Me={};oe&18&&(Me.$$scope={dirty:oe,ctx:Q}),i.$set(Me);const Ae={};oe&1&&(Ae.epoch=Q[0].u),f.$set(Ae),Q[0].t>-50?ve?ve.p(Q,oe):(ve=Xr(Q),ve.c(),ve.m(r,p)):ve&&(ve.d(1),ve=null),(!Re||oe&1)&&d!==(d=(Q[0].m?(Q[0].m/1e3).toFixed(1):"-")+"")&&B(v,d);const he={};oe&3&&(he.text=Q[1].booting?"Booting":Q[0].v>2?Q[0].v.toFixed(2)+"V":"ESP"),oe&3&&(he.color=Il(Q[1].booting?2:Q[0].em)),T.$set(he);const x={};oe&3&&(x.color=Il(Q[1].booting?9:Q[0].hm)),E.$set(x);const _e={};oe&1&&(_e.text=Q[0].r?Q[0].r.toFixed(0)+"dBm":"WiFi"),oe&3&&(_e.color=Il(Q[1].booting?9:Q[0].wm)),A.$set(_e);const Ue={};oe&3&&(Ue.color=Il(Q[1].booting?9:Q[0].mm)),F.$set(Ue),Q[0].he<0||Q[0].he>0?Ne?Ne.p(Q,oe):(Ne=Zr(Q),Ne.c(),Ne.m(l,U)):Ne&&(Ne.d(1),Ne=null),Q[0].me<0?Ee?Ee.p(Q,oe):(Ee=Jr(Q),Ee.c(),Ee.m(l,R)):Ee&&(Ee.d(1),Ee=null),Q[0].ee>0||Q[0].ee<0?me?me.p(Q,oe):(me=xr(Q),me.c(),me.m(l,q)):me&&(me.d(1),me=null);const je={};oe&1&&(je.timestamp=Q[0].c?new Date(Q[0].c*1e3):new Date(0)),oe&2&&(je.offset=Q[1].clock_offset),te.$set(je),Q[1].vndcfg&&Q[1].usrcfg?se?oe&2&&M(se,1):(se=ea(Q),se.c(),M(se,1),se.m(z,de)):se&&(Se(),D(se,1,1,()=>{se=null}),Pe()),Q[1].fwconsent===1&&Q[2]?pe?(pe.p(Q,oe),oe&6&&M(pe,1)):(pe=ta(Q),pe.c(),M(pe,1),pe.m(z,null)):pe&&(Se(),D(pe,1,1,()=>{pe=null}),Pe())},i(Q){Re||(M(i.$$.fragment,Q),M(f.$$.fragment,Q),M(T.$$.fragment,Q),M(E.$$.fragment,Q),M(A.$$.fragment,Q),M(F.$$.fragment,Q),M(te.$$.fragment,Q),M(se),M(Fe.$$.fragment,Q),M(pe),Re=!0)},o(Q){D(i.$$.fragment,Q),D(f.$$.fragment,Q),D(T.$$.fragment,Q),D(E.$$.fragment,Q),D(A.$$.fragment,Q),D(F.$$.fragment,Q),D(te.$$.fragment,Q),D(se),D(Fe.$$.fragment,Q),D(pe),Re=!1},d(Q){Q&&w(e),Z(i),Z(f),ve&&ve.d(),Z(T),Z(E),Z(A),Z(F),Ne&&Ne.d(),Ee&&Ee.d(),me&&me.d(),Z(te),se&&se.d(),Z(Fe),pe&&pe.d()}}}function Ym(t,e,l){let{data:n={}}=e,i={},o={};function r(){confirm("Do you want to upgrade this device to "+o.tag_name+"?")&&(!ii(i.board)||confirm(ws(fe(i.chip,i.board))))&&(Lt.update(a=>(a.upgrading=!0,a)),Ec(o.tag_name))}return Lt.subscribe(a=>{l(1,i=a),a.fwconsent===1&&vm()}),ko.subscribe(a=>{l(2,o=Ic(i.version,a))}),t.$$set=a=>{"data"in a&&l(0,n=a.data)},[n,i,o,r]}class Vm extends $e{constructor(e){super(),ye(this,e,Ym,zm,ke,{data:0})}}function Km(t){let e,l,n,i;return{c(){e=qe("svg"),l=qe("path"),n=qe("path"),u(l,"d",Vs(150,150,115,210,510)),u(l,"stroke","#eee"),u(l,"fill","none"),u(l,"stroke-width","55"),u(n,"d",i=Vs(150,150,115,210,210+300*t[0]/100)),u(n,"stroke",t[1]),u(n,"fill","none"),u(n,"stroke-width","55"),u(e,"viewBox","0 0 300 300"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"height","100%")},m(o,r){y(o,e,r),s(e,l),s(e,n)},p(o,[r]){r&1&&i!==(i=Vs(150,150,115,210,210+300*o[0]/100))&&u(n,"d",i),r&2&&u(n,"stroke",o[1])},i:ne,o:ne,d(o){o&&w(e)}}}function la(t,e,l,n){var i=(n-90)*Math.PI/180;return{x:t+l*Math.cos(i),y:e+l*Math.sin(i)}}function Vs(t,e,l,n,i){var o=la(t,e,l,i),r=la(t,e,l,n),a=i-n<=180?"0":"1",f=["M",o.x,o.y,"A",l,l,0,a,0,r.x,r.y].join(" ");return f}function Qm(t,e,l){let{pct:n=0}=e,{color:i="red"}=e;return t.$$set=o=>{"pct"in o&&l(0,n=o.pct),"color"in o&&l(1,i=o.color)},[n,i]}class Xm extends $e{constructor(e){super(),ye(this,e,Qm,Km,ke,{pct:0,color:1})}}function na(t){let e,l,n,i,o,r,a,f;return{c(){e=m("br"),l=h(),n=m("span"),i=$(t[3]),o=h(),r=m("span"),a=$(t[4]),f=$("/kWh"),u(n,"class","pl-sub"),u(r,"class","pl-snt")},m(c,p){y(c,e,p),y(c,l,p),y(c,n,p),s(n,i),y(c,o,p),y(c,r,p),s(r,a),s(r,f)},p(c,p){p&8&&B(i,c[3]),p&16&&B(a,c[4])},d(c){c&&w(e),c&&w(l),c&&w(n),c&&w(o),c&&w(r)}}}function Zm(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k;l=new Xm({props:{pct:t[6],color:t[5](t[6])}});let C=t[3]&&na(t);return{c(){e=m("div"),J(l.$$.fragment),n=h(),i=m("span"),o=m("span"),r=$(t[2]),a=h(),f=m("br"),c=h(),p=m("span"),_=$(t[0]),b=h(),d=m("span"),v=$(t[1]),g=h(),C&&C.c(),u(o,"class","pl-lab"),u(p,"class","pl-val"),u(d,"class","pl-unt"),u(i,"class","pl-ov"),u(e,"class","pl-root")},m(T,P){y(T,e,P),X(l,e,null),s(e,n),s(e,i),s(i,o),s(o,r),s(i,a),s(i,f),s(i,c),s(i,p),s(p,_),s(i,b),s(i,d),s(d,v),s(i,g),C&&C.m(i,null),k=!0},p(T,[P]){const E={};P&64&&(E.pct=T[6]),P&96&&(E.color=T[5](T[6])),l.$set(E),(!k||P&4)&&B(r,T[2]),(!k||P&1)&&B(_,T[0]),(!k||P&2)&&B(v,T[1]),T[3]?C?C.p(T,P):(C=na(T),C.c(),C.m(i,null)):C&&(C.d(1),C=null)},i(T){k||(M(l.$$.fragment,T),k=!0)},o(T){D(l.$$.fragment,T),k=!1},d(T){T&&w(e),Z(l),C&&C.d()}}}function Jm(t,e,l){let{val:n}=e,{max:i}=e,{unit:o}=e,{label:r}=e,{sub:a=""}=e,{subunit:f=""}=e,{colorFn:c}=e,p=0;return t.$$set=_=>{"val"in _&&l(0,n=_.val),"max"in _&&l(7,i=_.max),"unit"in _&&l(1,o=_.unit),"label"in _&&l(2,r=_.label),"sub"in _&&l(3,a=_.sub),"subunit"in _&&l(4,f=_.subunit),"colorFn"in _&&l(5,c=_.colorFn)},t.$$.update=()=>{t.$$.dirty&129&&l(6,p=Math.min(n,i)/i*100)},[n,o,r,a,f,c,p,i]}class Lc extends $e{constructor(e){super(),ye(this,e,Jm,Zm,ke,{val:0,max:7,unit:1,label:2,sub:3,subunit:4,colorFn:5})}}function ia(t,e,l){const n=t.slice();return n[9]=e[l],n[11]=l,n}function sa(t,e,l){const n=t.slice();return n[9]=e[l],n[11]=l,n}function oa(t,e,l){const n=t.slice();return n[13]=e[l],n}function ua(t){let e,l,n,i,o,r=t[0].title&&ra(t),a=t[0].y.ticks,f=[];for(let d=0;d20||t[11]%2==0)&&ma(t);return{c(){e=qe("g"),n&&n.c(),u(e,"class","tick"),u(e,"transform",l="translate("+t[5](t[11])+","+t[4]+")")},m(i,o){y(i,e,o),n&&n.m(e,null)},p(i,o){i[3]>20||i[11]%2==0?n?n.p(i,o):(n=ma(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null),o&48&&l!==(l="translate("+i[5](i[11])+","+i[4]+")")&&u(e,"transform",l)},d(i){i&&w(e),n&&n.d()}}}function ma(t){let e,l=t[9].label+"",n,i;return{c(){e=qe("text"),n=$(l),u(e,"x",i=t[3]/2),u(e,"y","-4")},m(o,r){y(o,e,r),s(e,n)},p(o,r){r&1&&l!==(l=o[9].label+"")&&B(n,l),r&8&&i!==(i=o[3]/2)&&u(e,"x",i)},d(o){o&&w(e)}}}function pa(t){let e=!isNaN(t[5](t[11])),l,n=e&&ca(t);return{c(){n&&n.c(),l=We()},m(i,o){n&&n.m(i,o),y(i,l,o)},p(i,o){o&32&&(e=!isNaN(i[5](i[11]))),e?n?n.p(i,o):(n=ca(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null)},d(i){n&&n.d(i),i&&w(l)}}}function _a(t){let e,l,n=t[9].value!==void 0&&da(t),i=t[9].value2>1e-4&&ba(t);return{c(){e=qe("g"),n&&n.c(),l=qe("g"),i&&i.c()},m(o,r){y(o,e,r),n&&n.m(e,null),y(o,l,r),i&&i.m(l,null)},p(o,r){o[9].value!==void 0?n?n.p(o,r):(n=da(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null),o[9].value2>1e-4?i?i.p(o,r):(i=ba(o),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(o){o&&w(e),n&&n.d(),o&&w(l),i&&i.d()}}}function da(t){let e,l,n,i,o,r,a,f=t[3]>15&&va(t);return{c(){e=qe("rect"),f&&f.c(),a=We(),u(e,"x",l=t[5](t[11])+2),u(e,"y",n=t[6](t[9].value)),u(e,"width",i=t[3]-4),u(e,"height",o=t[6](t[0].y.min)-t[6](Math.min(t[0].y.min,0)+t[9].value)),u(e,"fill",r=t[9].color)},m(c,p){y(c,e,p),f&&f.m(c,p),y(c,a,p)},p(c,p){p&32&&l!==(l=c[5](c[11])+2)&&u(e,"x",l),p&65&&n!==(n=c[6](c[9].value))&&u(e,"y",n),p&8&&i!==(i=c[3]-4)&&u(e,"width",i),p&65&&o!==(o=c[6](c[0].y.min)-c[6](Math.min(c[0].y.min,0)+c[9].value))&&u(e,"height",o),p&1&&r!==(r=c[9].color)&&u(e,"fill",r),c[3]>15?f?f.p(c,p):(f=va(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&w(e),f&&f.d(c),c&&w(a)}}}function va(t){let e,l=t[9].label+"",n,i,o,r,a,f,c=t[9].title&&ha(t);return{c(){e=qe("text"),n=$(l),c&&c.c(),f=We(),u(e,"width",i=t[3]-4),u(e,"dominant-baseline","middle"),u(e,"text-anchor",o=t[3]t[6](0)-t[7]?t[9].color:"white"),u(e,"transform",a="translate("+(t[5](t[11])+t[3]/2)+" "+(t[6](t[9].value)>t[6](0)-t[7]?t[6](t[9].value)-t[7]:t[6](t[9].value)+10)+") rotate("+(t[3]p[6](0)-p[7]?p[9].color:"white")&&u(e,"fill",r),_&233&&a!==(a="translate("+(p[5](p[11])+p[3]/2)+" "+(p[6](p[9].value)>p[6](0)-p[7]?p[6](p[9].value)-p[7]:p[6](p[9].value)+10)+") rotate("+(p[3]15&&ga(t);return{c(){e=qe("rect"),f&&f.c(),a=We(),u(e,"x",l=t[5](t[11])+2),u(e,"y",n=t[6](0)),u(e,"width",i=t[3]-4),u(e,"height",o=t[6](t[0].y.min)-t[6](t[0].y.min+t[9].value2)),u(e,"fill",r=t[9].color)},m(c,p){y(c,e,p),f&&f.m(c,p),y(c,a,p)},p(c,p){p&32&&l!==(l=c[5](c[11])+2)&&u(e,"x",l),p&64&&n!==(n=c[6](0))&&u(e,"y",n),p&8&&i!==(i=c[3]-4)&&u(e,"width",i),p&65&&o!==(o=c[6](c[0].y.min)-c[6](c[0].y.min+c[9].value2))&&u(e,"height",o),p&1&&r!==(r=c[9].color)&&u(e,"fill",r),c[3]>15?f?f.p(c,p):(f=ga(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&w(e),f&&f.d(c),c&&w(a)}}}function ga(t){let e,l=t[9].label2+"",n,i,o,r,a,f=t[9].title2&&ka(t);return{c(){e=qe("text"),n=$(l),f&&f.c(),a=We(),u(e,"width",i=t[3]-4),u(e,"dominant-baseline","middle"),u(e,"text-anchor","middle"),u(e,"fill",o=t[6](-t[9].value2)t[8].call(e))},m(i,o){y(i,e,o),n&&n.m(e,null),l=Zc(e,t[8].bind(e))},p(i,[o]){i[0].x.ticks&&i[0].points&&i[4]?n?n.p(i,o):(n=ua(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:ne,o:ne,d(i){i&&w(e),n&&n.d(),l()}}}let sn=30;function ep(t,e,l){let{config:n}=e,i,o,r,a,f,c,p;function _(){i=this.clientWidth,o=this.clientHeight,l(1,i),l(2,o)}return t.$$set=b=>{"config"in b&&l(0,n=b.config)},t.$$.update=()=>{if(t.$$.dirty&31){l(4,c=o-(n.title?20:0));let b=i-(n.padding.left+n.padding.right);l(3,r=b/n.points.length),l(7,p=rn.y.max?g=n.padding.bottom:vc||g<0?0:g})}},[n,i,o,r,c,a,f,p,_]}class un extends $e{constructor(e){super(),ye(this,e,ep,xm,ke,{config:0})}}function tp(t){let e,l;return e=new un({props:{config:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,[i]){const o={};i&1&&(o.config=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function lp(t,e,l){let{u1:n}=e,{u2:i}=e,{u3:o}=e,{ds:r}=e,a={};function f(c){return{label:ce(c)+"V",title:c.toFixed(1)+" V",value:isNaN(c)?0:c,color:cm(c||0)}}return t.$$set=c=>{"u1"in c&&l(1,n=c.u1),"u2"in c&&l(2,i=c.u2),"u3"in c&&l(3,o=c.u3),"ds"in c&&l(4,r=c.ds)},t.$$.update=()=>{if(t.$$.dirty&30){let c=[],p=[];n>0&&(c.push({label:r===1?"L1-L2":"L1"}),p.push(f(n))),i>0&&(c.push({label:r===1?"L1-L3":"L2"}),p.push(f(i))),o>0&&(c.push({label:r===1?"L2-L3":"L3"}),p.push(f(o))),l(0,a={padding:{top:20,right:15,bottom:20,left:35},y:{min:200,max:260,ticks:[{value:207,label:"-10%"},{value:230,label:"230v"},{value:253,label:"+10%"}]},x:{ticks:c},points:p})}},[a,n,i,o,r]}class np extends $e{constructor(e){super(),ye(this,e,lp,tp,ke,{u1:1,u2:2,u3:3,ds:4})}}function ip(t){let e,l;return e=new un({props:{config:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,[i]){const o={};i&1&&(o.config=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function sp(t,e,l){let{u1:n}=e,{u2:i}=e,{u3:o}=e,{i1:r}=e,{i2:a}=e,{i3:f}=e,{max:c}=e,p={};function _(b){return{label:ce(b)+"A",title:b.toFixed(1)+" A",value:isNaN(b)?0:b,color:Cc(b?b/c*100:0)}}return t.$$set=b=>{"u1"in b&&l(1,n=b.u1),"u2"in b&&l(2,i=b.u2),"u3"in b&&l(3,o=b.u3),"i1"in b&&l(4,r=b.i1),"i2"in b&&l(5,a=b.i2),"i3"in b&&l(6,f=b.i3),"max"in b&&l(7,c=b.max)},t.$$.update=()=>{if(t.$$.dirty&254){let b=[],d=[];n>0&&(b.push({label:"L1"}),d.push(_(r))),i>0&&(b.push({label:"L2"}),d.push(_(a))),o>0&&(b.push({label:"L3"}),d.push(_(f))),l(0,p={padding:{top:20,right:15,bottom:20,left:35},y:{min:0,max:c,ticks:[{value:0,label:"0%"},{value:c/4,label:"25%"},{value:c/2,label:"50%"},{value:c/4*3,label:"75%"},{value:c,label:"100%"}]},x:{ticks:b},points:d})}},[p,n,i,o,r,a,f,c]}class op extends $e{constructor(e){super(),ye(this,e,sp,ip,ke,{u1:1,u2:2,u3:3,i1:4,i2:5,i3:6,max:7})}}function up(t){let e,l,n,i,o,r,a,f=(typeof t[0]<"u"?t[0].toFixed(0):"-")+"",c,p,_,b,d,v,g=(typeof t[1]<"u"?t[1].toFixed(0):"-")+"",k,C,T,P,E,S,A,I=(typeof t[2]<"u"?t[2].toFixed(1):"-")+"",F,Y,U,R,q,z,O=(typeof t[3]<"u"?t[3].toFixed(1):"-")+"",H,G;return{c(){e=m("div"),l=m("strong"),l.textContent="Reactive",n=h(),i=m("div"),o=m("div"),o.textContent="Instant in",r=h(),a=m("div"),c=$(f),p=$(" VAr"),_=h(),b=m("div"),b.textContent="Instant out",d=h(),v=m("div"),k=$(g),C=$(" VAr"),T=h(),P=m("div"),E=m("div"),E.textContent="Total in",S=h(),A=m("div"),F=$(I),Y=$(" kVArh"),U=h(),R=m("div"),R.textContent="Total out",q=h(),z=m("div"),H=$(O),G=$(" kVArh"),u(a,"class","text-right"),u(v,"class","text-right"),u(i,"class","grid grid-cols-2 mt-4"),u(A,"class","text-right"),u(z,"class","text-right"),u(P,"class","grid grid-cols-2 mt-4"),u(e,"class","mx-2 text-sm")},m(L,W){y(L,e,W),s(e,l),s(e,n),s(e,i),s(i,o),s(i,r),s(i,a),s(a,c),s(a,p),s(i,_),s(i,b),s(i,d),s(i,v),s(v,k),s(v,C),s(e,T),s(e,P),s(P,E),s(P,S),s(P,A),s(A,F),s(A,Y),s(P,U),s(P,R),s(P,q),s(P,z),s(z,H),s(z,G)},p(L,[W]){W&1&&f!==(f=(typeof L[0]<"u"?L[0].toFixed(0):"-")+"")&&B(c,f),W&2&&g!==(g=(typeof L[1]<"u"?L[1].toFixed(0):"-")+"")&&B(k,g),W&4&&I!==(I=(typeof L[2]<"u"?L[2].toFixed(1):"-")+"")&&B(F,I),W&8&&O!==(O=(typeof L[3]<"u"?L[3].toFixed(1):"-")+"")&&B(H,O)},i:ne,o:ne,d(L){L&&w(e)}}}function rp(t,e,l){let{importInstant:n}=e,{exportInstant:i}=e,{importTotal:o}=e,{exportTotal:r}=e;return t.$$set=a=>{"importInstant"in a&&l(0,n=a.importInstant),"exportInstant"in a&&l(1,i=a.exportInstant),"importTotal"in a&&l(2,o=a.importTotal),"exportTotal"in a&&l(3,r=a.exportTotal)},[n,i,o,r]}class ap extends $e{constructor(e){super(),ye(this,e,rp,up,ke,{importInstant:0,exportInstant:1,importTotal:2,exportTotal:3})}}function ya(t){let e;function l(o,r){return o[3]?cp:fp}let n=l(t),i=n(t);return{c(){i.c(),e=We()},m(o,r){i.m(o,r),y(o,e,r)},p(o,r){n===(n=l(o))&&i?i.p(o,r):(i.d(1),i=n(o),i&&(i.c(),i.m(e.parentNode,e)))},d(o){i.d(o),o&&w(e)}}}function fp(t){let e,l,n,i,o,r,a=ce(t[1].h.u,2)+"",f,c,p,_,b,d,v=ce(t[1].d.u,1)+"",g,k,C,T,P,E,S=ce(t[1].m.u)+"",A,I,F,Y,U,R,q=ce(t[0].last_month.u)+"",z,O,H,G,L=t[4]&&$a(t);return{c(){e=m("strong"),e.textContent="Consumption",l=h(),n=m("div"),i=m("div"),i.textContent="Hour",o=h(),r=m("div"),f=$(a),c=$(" kWh"),p=h(),_=m("div"),_.textContent="Day",b=h(),d=m("div"),g=$(v),k=$(" kWh"),C=h(),T=m("div"),T.textContent="Month",P=h(),E=m("div"),A=$(S),I=$(" kWh"),F=h(),Y=m("div"),Y.textContent="Last month",U=h(),R=m("div"),z=$(q),O=$(" kWh"),H=h(),L&&L.c(),G=We(),u(r,"class","text-right"),u(d,"class","text-right"),u(E,"class","text-right"),u(R,"class","text-right"),u(n,"class","grid grid-cols-2 mb-3")},m(W,j){y(W,e,j),y(W,l,j),y(W,n,j),s(n,i),s(n,o),s(n,r),s(r,f),s(r,c),s(n,p),s(n,_),s(n,b),s(n,d),s(d,g),s(d,k),s(n,C),s(n,T),s(n,P),s(n,E),s(E,A),s(E,I),s(n,F),s(n,Y),s(n,U),s(n,R),s(R,z),s(R,O),y(W,H,j),L&&L.m(W,j),y(W,G,j)},p(W,j){j&2&&a!==(a=ce(W[1].h.u,2)+"")&&B(f,a),j&2&&v!==(v=ce(W[1].d.u,1)+"")&&B(g,v),j&2&&S!==(S=ce(W[1].m.u)+"")&&B(A,S),j&1&&q!==(q=ce(W[0].last_month.u)+"")&&B(z,q),W[4]?L?L.p(W,j):(L=$a(W),L.c(),L.m(G.parentNode,G)):L&&(L.d(1),L=null)},d(W){W&&w(e),W&&w(l),W&&w(n),W&&w(H),L&&L.d(W),W&&w(G)}}}function cp(t){let e,l,n,i,o,r,a=ce(t[1].h.u,2)+"",f,c,p,_,b,d,v,g=ce(t[1].d.u,1)+"",k,C,T,P,E,S,A,I=ce(t[1].m.u)+"",F,Y,U,R,q,z,O,H=ce(t[0].last_month.u)+"",G,L,W,j,te,le,de,ie,we,Fe,Ce,Re=ce(t[1].h.p,2)+"",ve,Ne,Ee,me,se,pe,Q,oe=ce(t[1].d.p,1)+"",Me,Ae,he,x,_e,Ue,je,Xe=ce(t[1].m.p)+"",Le,He,re,ge,Ut,Ol,xt,ft=ce(t[0].last_month.p)+"",Sl,cl,Ot,dt,Ze=t[4]&&Ca(t),Je=t[4]&&Ta(t),xe=t[4]&&Sa(t),Oe=t[4]&&Pa(t),et=t[4]&&Na(t),Ge=t[4]&&Ma(t),tt=t[4]&&Aa(t),lt=t[4]&&Da(t);return{c(){e=m("strong"),e.textContent="Import",l=h(),n=m("div"),i=m("div"),i.textContent="Hour",o=h(),r=m("div"),f=$(a),c=$(" kWh"),p=h(),Ze&&Ze.c(),_=h(),b=m("div"),b.textContent="Day",d=h(),v=m("div"),k=$(g),C=$(" kWh"),T=h(),Je&&Je.c(),P=h(),E=m("div"),E.textContent="Month",S=h(),A=m("div"),F=$(I),Y=$(" kWh"),U=h(),xe&&xe.c(),R=h(),q=m("div"),q.textContent="Last mo.",z=h(),O=m("div"),G=$(H),L=$(" kWh"),W=h(),Oe&&Oe.c(),te=h(),le=m("strong"),le.textContent="Export",de=h(),ie=m("div"),we=m("div"),we.textContent="Hour",Fe=h(),Ce=m("div"),ve=$(Re),Ne=$(" kWh"),Ee=h(),et&&et.c(),me=h(),se=m("div"),se.textContent="Day",pe=h(),Q=m("div"),Me=$(oe),Ae=$(" kWh"),he=h(),Ge&&Ge.c(),x=h(),_e=m("div"),_e.textContent="Month",Ue=h(),je=m("div"),Le=$(Xe),He=$(" kWh"),re=h(),tt&&tt.c(),ge=h(),Ut=m("div"),Ut.textContent="Last mo.",Ol=h(),xt=m("div"),Sl=$(ft),cl=$(" kWh"),Ot=h(),lt&<.c(),u(r,"class","text-right"),u(v,"class","text-right"),u(A,"class","text-right"),u(O,"class","text-right"),u(n,"class",j="grid grid-cols-"+t[5]+" mb-3"),u(Ce,"class","text-right"),u(Q,"class","text-right"),u(je,"class","text-right"),u(xt,"class","text-right"),u(ie,"class",dt="grid grid-cols-"+t[5])},m(ue,be){y(ue,e,be),y(ue,l,be),y(ue,n,be),s(n,i),s(n,o),s(n,r),s(r,f),s(r,c),s(n,p),Ze&&Ze.m(n,null),s(n,_),s(n,b),s(n,d),s(n,v),s(v,k),s(v,C),s(n,T),Je&&Je.m(n,null),s(n,P),s(n,E),s(n,S),s(n,A),s(A,F),s(A,Y),s(n,U),xe&&xe.m(n,null),s(n,R),s(n,q),s(n,z),s(n,O),s(O,G),s(O,L),s(n,W),Oe&&Oe.m(n,null),y(ue,te,be),y(ue,le,be),y(ue,de,be),y(ue,ie,be),s(ie,we),s(ie,Fe),s(ie,Ce),s(Ce,ve),s(Ce,Ne),s(ie,Ee),et&&et.m(ie,null),s(ie,me),s(ie,se),s(ie,pe),s(ie,Q),s(Q,Me),s(Q,Ae),s(ie,he),Ge&&Ge.m(ie,null),s(ie,x),s(ie,_e),s(ie,Ue),s(ie,je),s(je,Le),s(je,He),s(ie,re),tt&&tt.m(ie,null),s(ie,ge),s(ie,Ut),s(ie,Ol),s(ie,xt),s(xt,Sl),s(xt,cl),s(ie,Ot),lt&<.m(ie,null)},p(ue,be){be&2&&a!==(a=ce(ue[1].h.u,2)+"")&&B(f,a),ue[4]?Ze?Ze.p(ue,be):(Ze=Ca(ue),Ze.c(),Ze.m(n,_)):Ze&&(Ze.d(1),Ze=null),be&2&&g!==(g=ce(ue[1].d.u,1)+"")&&B(k,g),ue[4]?Je?Je.p(ue,be):(Je=Ta(ue),Je.c(),Je.m(n,P)):Je&&(Je.d(1),Je=null),be&2&&I!==(I=ce(ue[1].m.u)+"")&&B(F,I),ue[4]?xe?xe.p(ue,be):(xe=Sa(ue),xe.c(),xe.m(n,R)):xe&&(xe.d(1),xe=null),be&1&&H!==(H=ce(ue[0].last_month.u)+"")&&B(G,H),ue[4]?Oe?Oe.p(ue,be):(Oe=Pa(ue),Oe.c(),Oe.m(n,null)):Oe&&(Oe.d(1),Oe=null),be&32&&j!==(j="grid grid-cols-"+ue[5]+" mb-3")&&u(n,"class",j),be&2&&Re!==(Re=ce(ue[1].h.p,2)+"")&&B(ve,Re),ue[4]?et?et.p(ue,be):(et=Na(ue),et.c(),et.m(ie,me)):et&&(et.d(1),et=null),be&2&&oe!==(oe=ce(ue[1].d.p,1)+"")&&B(Me,oe),ue[4]?Ge?Ge.p(ue,be):(Ge=Ma(ue),Ge.c(),Ge.m(ie,x)):Ge&&(Ge.d(1),Ge=null),be&2&&Xe!==(Xe=ce(ue[1].m.p)+"")&&B(Le,Xe),ue[4]?tt?tt.p(ue,be):(tt=Aa(ue),tt.c(),tt.m(ie,ge)):tt&&(tt.d(1),tt=null),be&1&&ft!==(ft=ce(ue[0].last_month.p)+"")&&B(Sl,ft),ue[4]?lt?lt.p(ue,be):(lt=Da(ue),lt.c(),lt.m(ie,null)):lt&&(lt.d(1),lt=null),be&32&&dt!==(dt="grid grid-cols-"+ue[5])&&u(ie,"class",dt)},d(ue){ue&&w(e),ue&&w(l),ue&&w(n),Ze&&Ze.d(),Je&&Je.d(),xe&&xe.d(),Oe&&Oe.d(),ue&&w(te),ue&&w(le),ue&&w(de),ue&&w(ie),et&&et.d(),Ge&&Ge.d(),tt&&tt.d(),lt&<.d()}}}function $a(t){let e,l,n,i,o,r,a=ce(t[1].h.c,2)+"",f,c,p,_,b,d,v,g=ce(t[1].d.c,1)+"",k,C,T,P,E,S,A,I=ce(t[1].m.c)+"",F,Y,U,R,q,z,O,H=ce(t[0].last_month.c)+"",G,L,W;return{c(){e=m("strong"),e.textContent="Cost",l=h(),n=m("div"),i=m("div"),i.textContent="Hour",o=h(),r=m("div"),f=$(a),c=h(),p=$(t[2]),_=h(),b=m("div"),b.textContent="Day",d=h(),v=m("div"),k=$(g),C=h(),T=$(t[2]),P=h(),E=m("div"),E.textContent="Month",S=h(),A=m("div"),F=$(I),Y=h(),U=$(t[2]),R=h(),q=m("div"),q.textContent="Last month",z=h(),O=m("div"),G=$(H),L=h(),W=$(t[2]),u(r,"class","text-right"),u(v,"class","text-right"),u(A,"class","text-right"),u(O,"class","text-right"),u(n,"class","grid grid-cols-2")},m(j,te){y(j,e,te),y(j,l,te),y(j,n,te),s(n,i),s(n,o),s(n,r),s(r,f),s(r,c),s(r,p),s(n,_),s(n,b),s(n,d),s(n,v),s(v,k),s(v,C),s(v,T),s(n,P),s(n,E),s(n,S),s(n,A),s(A,F),s(A,Y),s(A,U),s(n,R),s(n,q),s(n,z),s(n,O),s(O,G),s(O,L),s(O,W)},p(j,te){te&2&&a!==(a=ce(j[1].h.c,2)+"")&&B(f,a),te&4&&B(p,j[2]),te&2&&g!==(g=ce(j[1].d.c,1)+"")&&B(k,g),te&4&&B(T,j[2]),te&2&&I!==(I=ce(j[1].m.c)+"")&&B(F,I),te&4&&B(U,j[2]),te&1&&H!==(H=ce(j[0].last_month.c)+"")&&B(G,H),te&4&&B(W,j[2])},d(j){j&&w(e),j&&w(l),j&&w(n)}}}function Ca(t){let e,l=ce(t[1].h.c,2)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].h.c,2)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Ta(t){let e,l=ce(t[1].d.c,1)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].d.c,1)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Sa(t){let e,l=ce(t[1].m.c)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].m.c)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Pa(t){let e,l=ce(t[0].last_month.c)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&1&&l!==(l=ce(r[0].last_month.c)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Na(t){let e,l=ce(t[1].h.i,2)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].h.i,2)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Ma(t){let e,l=ce(t[1].d.i,1)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].d.i,1)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Aa(t){let e,l=ce(t[1].m.i)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&2&&l!==(l=ce(r[1].m.i)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function Da(t){let e,l=ce(t[0].last_month.i)+"",n,i,o;return{c(){e=m("div"),n=$(l),i=h(),o=$(t[2]),u(e,"class","text-right")},m(r,a){y(r,e,a),s(e,n),s(e,i),s(e,o)},p(r,a){a&1&&l!==(l=ce(r[0].last_month.i)+"")&&B(n,l),a&4&&B(o,r[2])},d(r){r&&w(e)}}}function mp(t){let e,l,n,i,o,r,a=t[1]&&ya(t);return{c(){e=m("div"),l=m("strong"),l.textContent="Real time calculation",n=h(),i=m("br"),o=m("br"),r=h(),a&&a.c(),u(e,"class","mx-2 text-sm")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),s(e,r),a&&a.m(e,null)},p(f,[c]){f[1]?a?a.p(f,c):(a=ya(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:ne,o:ne,d(f){f&&w(e),a&&a.d()}}}function pp(t,e,l){let{sysinfo:n}=e,{data:i}=e,{currency:o}=e,{hasExport:r}=e,a=!1,f=3;return t.$$set=c=>{"sysinfo"in c&&l(0,n=c.sysinfo),"data"in c&&l(1,i=c.data),"currency"in c&&l(2,o=c.currency),"hasExport"in c&&l(3,r=c.hasExport)},t.$$.update=()=>{t.$$.dirty&18&&(l(4,a=i&&i.h&&(i.h.c>.01||i.d.c>.01||i.m.c>.01||i.h.i>.01||i.d.i>.01||i.m.i>.01)),l(5,f=a?3:2))},[n,i,o,r,a,f]}class _p extends $e{constructor(e){super(),ye(this,e,pp,mp,ke,{sysinfo:0,data:1,currency:2,hasExport:3})}}function dp(t){let e,l,n,i;return n=new un({props:{config:t[0]}}),{c(){e=m("a"),e.textContent="Provided by ENTSO-E",l=h(),J(n.$$.fragment),u(e,"href","https://transparency.entsoe.eu/"),u(e,"target","_blank"),u(e,"class","text-xs float-right z-40")},m(o,r){y(o,e,r),y(o,l,r),X(n,o,r),i=!0},p(o,[r]){const a={};r&1&&(a.config=o[0]),n.$set(a)},i(o){i||(M(n.$$.fragment,o),i=!0)},o(o){D(n.$$.fragment,o),i=!1},d(o){o&&w(e),o&&w(l),Z(n,o)}}}function vp(t,e,l){let{json:n}=e,{sysinfo:i}=e,o={},r=0,a=0;return t.$$set=f=>{"json"in f&&l(1,n=f.json),"sysinfo"in f&&l(2,i=f.sysinfo)},t.$$.update=()=>{if(t.$$.dirty&30){let f=n.currency,c=new Date().getUTCHours(),p=0,_=0,b=0,d=[],v=[],g=[],k=new Date;for(rl(k,i.clock_offset),p=c;p<24&&(_=n[Ie(b++)],_!=null);p++)v.push({label:Ie(k.getUTCHours())}),g.push(_*100),l(4,a=Math.min(a,_*100)),l(3,r=Math.max(r,_*100)),rl(k,1);for(p=0;p<24&&(_=n[Ie(b++)],_!=null);p++)v.push({label:Ie(k.getUTCHours())}),g.push(_*100),l(4,a=Math.min(a,_*100)),l(3,r=Math.max(r,_*100)),rl(k,1);if(a>-100&&r<100){switch(f){case"NOK":case"SEK":case"DKK":f="\xF8re";break;case"EUR":f="cent";break;default:f=f+"/100"}for(l(4,a*=100),l(3,r*=100),p=0;p=0?S.toFixed(A):"",title:S>=0?S.toFixed(2)+" "+f:"",value:_>=0?Math.abs(_):0,label2:S<0?S.toFixed(A):"",title2:S<0?S.toFixed(2)+" "+f:"",value2:_<0?Math.abs(_):0,color:"#7c3aed"})}let T=Math.max(r,Math.abs(a));if(a<0){l(4,a=Math.min(T/4*-1,a));let S=Math.ceil(Math.abs(a)/T*4),A=a/S;for(p=1;p{"json"in f&&l(1,n=f.json),"sysinfo"in f&&l(2,i=f.sysinfo)},t.$$.update=()=>{if(t.$$.dirty&30){let f=0,c=[],p=[],_=[],b=rl(new Date,-24),d=new Date().getUTCHours();for(rl(b,i.clock_offset),f=d;f<24;f++){let k=n["i"+Ie(f)],C=n["e"+Ie(f)];k===void 0&&(k=0),C===void 0&&(C=0),p.push({label:Ie(b.getUTCHours())}),_.push({label:k.toFixed(1),title:k.toFixed(2)+" kWh",value:k*10,label2:C.toFixed(1),title2:C.toFixed(2)+" kWh",value2:C*10,color:"#7c3aed"}),l(4,a=Math.max(a,C*10)),l(3,r=Math.max(r,k*10)),rl(b,1)}for(f=0;f{"json"in f&&l(1,n=f.json),"sysinfo"in f&&l(2,i=f.sysinfo)},t.$$.update=()=>{if(t.$$.dirty&30){let f=0,c=[],p=[],_=[],b=new Date,d=new Date;for(rl(b,i.clock_offset),rl(d,i.clock_offset),d.setDate(0),f=b.getDate();f<=d.getDate();f++){let k=n["i"+Ie(f)],C=n["e"+Ie(f)];k===void 0&&(k=0),C===void 0&&(C=0),p.push({label:Ie(f)}),_.push({label:k.toFixed(k<10?1:0),title:k.toFixed(2)+" kWh",value:k,label2:C.toFixed(C<10?1:0),title2:C.toFixed(2)+" kWh",value2:C,color:"#7c3aed"}),l(4,a=Math.max(a,C)),l(3,r=Math.max(r,k))}for(f=1;f{"json"in a&&l(1,n=a.json)},t.$$.update=()=>{if(t.$$.dirty&14){let a=0,f=0,c=[],p=[],_=[];n.s&&n.s.forEach((v,g)=>{var k=v.n?v.n:v.a;f=v.v,f==-127&&(f=0),p.push({label:k.slice(-4)}),_.push({label:f.toFixed(1),value:f,color:"#7c3aed"}),l(3,r=Math.min(r,f)),l(2,o=Math.max(o,f))}),l(2,o=Math.ceil(o)),l(3,r=Math.floor(r));let b=o;r<0&&(b+=Math.abs(r));let d=b/4;for(a=0;a<5;a++)f=r+d*a,c.push({value:f,label:f.toFixed(1)});l(0,i={title:"Temperature sensors (\xB0C)",height:226,width:1520,padding:{top:20,right:15,bottom:20,left:35},y:{min:r,max:o,ticks:c},x:{ticks:p},points:_})}},[i,n,o,r]}class Sp extends $e{constructor(e){super(),ye(this,e,Tp,Cp,ke,{json:1})}}function Pp(t){let e,l;return e=new un({props:{config:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,[i]){const o={};i&1&&(o.config=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}let Np=0;function Mp(t,e,l){let n={},i=0,o;return Dc.subscribe(r=>{l(2,o=r)}),Ac(),t.$$.update=()=>{if(t.$$.dirty&6){let r=0,a=[],f=[],c=[];if(a.push({value:0,label:0}),o&&o.p)for(r=0;r0?Ie(p.d)+"."+Js[new Date().getMonth()]:"-"}),l(1,i=Math.max(i,p.v))}if(o&&o.t){for(r=0;r=i)break;a.push({value:p,label:p})}a.push({label:o.m.toFixed(1),align:"right",color:"green",value:o.m})}o&&o.c&&(a.push({label:o.c.toFixed(0),color:"orange",value:o.c}),l(1,i=Math.max(i,o.c))),l(1,i=Math.ceil(i)),l(0,n={title:"Tariff peaks",padding:{top:20,right:35,bottom:20,left:35},y:{min:Np,max:i,ticks:a},x:{ticks:f},points:c})}},[n,i,o]}class Ap extends $e{constructor(e){super(),ye(this,e,Mp,Pp,ke,{})}}function Ea(t){let e,l,n,i,o,r,a=(t[0].mt?ks(t[0].mt):"-")+"",f,c,p,_=(t[0].ic?t[0].ic.toFixed(1):"-")+"",b,d,v;return i=new Lc({props:{val:t[0].i?t[0].i:0,max:t[0].im?t[0].im:15e3,unit:"W",label:"Import",sub:t[0].p,subunit:t[0].pc,colorFn:Cc}}),{c(){e=m("div"),l=m("div"),n=m("div"),J(i.$$.fragment),o=h(),r=m("div"),f=$(a),c=h(),p=m("div"),b=$(_),d=$(" kWh"),u(n,"class","col-span-2"),u(p,"class","text-right"),u(l,"class","grid grid-cols-2"),u(e,"class","cnt")},m(g,k){y(g,e,k),s(e,l),s(l,n),X(i,n,null),s(l,o),s(l,r),s(r,f),s(l,c),s(l,p),s(p,b),s(p,d),v=!0},p(g,k){const C={};k&1&&(C.val=g[0].i?g[0].i:0),k&1&&(C.max=g[0].im?g[0].im:15e3),k&1&&(C.sub=g[0].p),k&1&&(C.subunit=g[0].pc),i.$set(C),(!v||k&1)&&a!==(a=(g[0].mt?ks(g[0].mt):"-")+"")&&B(f,a),(!v||k&1)&&_!==(_=(g[0].ic?g[0].ic.toFixed(1):"-")+"")&&B(b,_)},i(g){v||(M(i.$$.fragment,g),v=!0)},o(g){D(i.$$.fragment,g),v=!1},d(g){g&&w(e),Z(i)}}}function Ia(t){let e,l,n,i,o,r,a,f,c=(t[0].ec?t[0].ec.toFixed(1):"-")+"",p,_,b;return i=new Lc({props:{val:t[0].e?t[0].e:0,max:t[0].om?t[0].om*1e3:1e4,unit:"W",label:"Export",colorFn:mm}}),{c(){e=m("div"),l=m("div"),n=m("div"),J(i.$$.fragment),o=h(),r=m("div"),a=h(),f=m("div"),p=$(c),_=$(" kWh"),u(n,"class","col-span-2"),u(f,"class","text-right"),u(l,"class","grid grid-cols-2"),u(e,"class","cnt")},m(d,v){y(d,e,v),s(e,l),s(l,n),X(i,n,null),s(l,o),s(l,r),s(l,a),s(l,f),s(f,p),s(f,_),b=!0},p(d,v){const g={};v&1&&(g.val=d[0].e?d[0].e:0),v&1&&(g.max=d[0].om?d[0].om*1e3:1e4),i.$set(g),(!b||v&1)&&c!==(c=(d[0].ec?d[0].ec.toFixed(1):"-")+"")&&B(p,c)},i(d){b||(M(i.$$.fragment,d),b=!0)},o(d){D(i.$$.fragment,d),b=!1},d(d){d&&w(e),Z(i)}}}function Fa(t){let e,l,n;return l=new np({props:{u1:t[0].u1,u2:t[0].u2,u3:t[0].u3,ds:t[0].ds}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&1&&(r.u1=i[0].u1),o&1&&(r.u2=i[0].u2),o&1&&(r.u3=i[0].u3),o&1&&(r.ds=i[0].ds),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ra(t){let e,l,n;return l=new op({props:{u1:t[0].u1,u2:t[0].u2,u3:t[0].u3,i1:t[0].i1,i2:t[0].i2,i3:t[0].i3,max:t[0].mf?t[0].mf:32}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&1&&(r.u1=i[0].u1),o&1&&(r.u2=i[0].u2),o&1&&(r.u3=i[0].u3),o&1&&(r.i1=i[0].i1),o&1&&(r.i2=i[0].i2),o&1&&(r.i3=i[0].i3),o&1&&(r.max=i[0].mf?i[0].mf:32),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function La(t){let e,l,n;return l=new ap({props:{importInstant:t[0].ri,exportInstant:t[0].re,importTotal:t[0].ric,exportTotal:t[0].rec}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&1&&(r.importInstant=i[0].ri),o&1&&(r.exportInstant=i[0].re),o&1&&(r.importTotal=i[0].ric),o&1&&(r.exportTotal=i[0].rec),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ua(t){let e,l,n;return l=new _p({props:{sysinfo:t[1],data:t[0].ea,currency:t[0].pc,hasExport:t[0].om>0||t[0].e>0}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&2&&(r.sysinfo=i[1]),o&1&&(r.data=i[0].ea),o&1&&(r.currency=i[0].pc),o&1&&(r.hasExport=i[0].om>0||i[0].e>0),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Oa(t){let e,l,n;return l=new Ap({}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt h-64")},m(i,o){y(i,e,o),X(l,e,null),n=!0},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function qa(t){let e,l,n;return l=new hp({props:{json:t[2],sysinfo:t[1]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&4&&(r.json=i[2]),o&2&&(r.sysinfo=i[1]),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Ha(t){let e,l,n;return l=new kp({props:{json:t[3],sysinfo:t[1]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&8&&(r.json=i[3]),o&2&&(r.sysinfo=i[1]),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function ja(t){let e,l,n;return l=new $p({props:{json:t[4],sysinfo:t[1]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&16&&(r.json=i[4]),o&2&&(r.sysinfo=i[1]),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Wa(t){let e,l,n;return l=new Sp({props:{json:t[5]}}),{c(){e=m("div"),J(l.$$.fragment),u(e,"class","cnt gwf")},m(i,o){y(i,e,o),X(l,e,null),n=!0},p(i,o){const r={};o&32&&(r.json=i[5]),l.$set(r)},i(i){n||(M(l.$$.fragment,i),n=!0)},o(i){D(l.$$.fragment,i),n=!1},d(i){i&&w(e),Z(l)}}}function Dp(t){let e,l=Ye(t[1].ui.i,t[0].i),n,i=Ye(t[1].ui.e,t[0].om||t[0].e>0),o,r=Ye(t[1].ui.v,t[0].u1>100||t[0].u2>100||t[0].u3>100),a,f=Ye(t[1].ui.a,t[0].i1>.01||t[0].i2>.01||t[0].i3>.01),c,p=Ye(t[1].ui.r,t[0].ri>0||t[0].re>0||t[0].ric>0||t[0].rec>0),_,b=Ye(t[1].ui.c,t[0].ea),d,v=Ye(t[1].ui.t,t[0].pr&&(t[0].pr.startsWith("10YNO")||t[0].pr=="10Y1001A1001A48H")),g,k=Ye(t[1].ui.p,t[0].pe&&!Number.isNaN(t[0].p)),C,T=Ye(t[1].ui.d,t[3]),P,E=Ye(t[1].ui.m,t[4]),S,A=Ye(t[1].ui.s,t[0].t&&t[0].t!=-127&&t[5].c>1),I,F=l&&Ea(t),Y=i&&Ia(t),U=r&&Fa(t),R=f&&Ra(t),q=p&&La(t),z=b&&Ua(t),O=v&&Oa(),H=k&&qa(t),G=T&&Ha(t),L=E&&ja(t),W=A&&Wa(t);return{c(){e=m("div"),F&&F.c(),n=h(),Y&&Y.c(),o=h(),U&&U.c(),a=h(),R&&R.c(),c=h(),q&&q.c(),_=h(),z&&z.c(),d=h(),O&&O.c(),g=h(),H&&H.c(),C=h(),G&&G.c(),P=h(),L&&L.c(),S=h(),W&&W.c(),u(e,"class","grid 2xl:grid-cols-6 xl:grid-cols-5 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2")},m(j,te){y(j,e,te),F&&F.m(e,null),s(e,n),Y&&Y.m(e,null),s(e,o),U&&U.m(e,null),s(e,a),R&&R.m(e,null),s(e,c),q&&q.m(e,null),s(e,_),z&&z.m(e,null),s(e,d),O&&O.m(e,null),s(e,g),H&&H.m(e,null),s(e,C),G&&G.m(e,null),s(e,P),L&&L.m(e,null),s(e,S),W&&W.m(e,null),I=!0},p(j,[te]){te&3&&(l=Ye(j[1].ui.i,j[0].i)),l?F?(F.p(j,te),te&3&&M(F,1)):(F=Ea(j),F.c(),M(F,1),F.m(e,n)):F&&(Se(),D(F,1,1,()=>{F=null}),Pe()),te&3&&(i=Ye(j[1].ui.e,j[0].om||j[0].e>0)),i?Y?(Y.p(j,te),te&3&&M(Y,1)):(Y=Ia(j),Y.c(),M(Y,1),Y.m(e,o)):Y&&(Se(),D(Y,1,1,()=>{Y=null}),Pe()),te&3&&(r=Ye(j[1].ui.v,j[0].u1>100||j[0].u2>100||j[0].u3>100)),r?U?(U.p(j,te),te&3&&M(U,1)):(U=Fa(j),U.c(),M(U,1),U.m(e,a)):U&&(Se(),D(U,1,1,()=>{U=null}),Pe()),te&3&&(f=Ye(j[1].ui.a,j[0].i1>.01||j[0].i2>.01||j[0].i3>.01)),f?R?(R.p(j,te),te&3&&M(R,1)):(R=Ra(j),R.c(),M(R,1),R.m(e,c)):R&&(Se(),D(R,1,1,()=>{R=null}),Pe()),te&3&&(p=Ye(j[1].ui.r,j[0].ri>0||j[0].re>0||j[0].ric>0||j[0].rec>0)),p?q?(q.p(j,te),te&3&&M(q,1)):(q=La(j),q.c(),M(q,1),q.m(e,_)):q&&(Se(),D(q,1,1,()=>{q=null}),Pe()),te&3&&(b=Ye(j[1].ui.c,j[0].ea)),b?z?(z.p(j,te),te&3&&M(z,1)):(z=Ua(j),z.c(),M(z,1),z.m(e,d)):z&&(Se(),D(z,1,1,()=>{z=null}),Pe()),te&3&&(v=Ye(j[1].ui.t,j[0].pr&&(j[0].pr.startsWith("10YNO")||j[0].pr=="10Y1001A1001A48H"))),v?O?te&3&&M(O,1):(O=Oa(),O.c(),M(O,1),O.m(e,g)):O&&(Se(),D(O,1,1,()=>{O=null}),Pe()),te&3&&(k=Ye(j[1].ui.p,j[0].pe&&!Number.isNaN(j[0].p))),k?H?(H.p(j,te),te&3&&M(H,1)):(H=qa(j),H.c(),M(H,1),H.m(e,C)):H&&(Se(),D(H,1,1,()=>{H=null}),Pe()),te&10&&(T=Ye(j[1].ui.d,j[3])),T?G?(G.p(j,te),te&10&&M(G,1)):(G=Ha(j),G.c(),M(G,1),G.m(e,P)):G&&(Se(),D(G,1,1,()=>{G=null}),Pe()),te&18&&(E=Ye(j[1].ui.m,j[4])),E?L?(L.p(j,te),te&18&&M(L,1)):(L=ja(j),L.c(),M(L,1),L.m(e,S)):L&&(Se(),D(L,1,1,()=>{L=null}),Pe()),te&35&&(A=Ye(j[1].ui.s,j[0].t&&j[0].t!=-127&&j[5].c>1)),A?W?(W.p(j,te),te&35&&M(W,1)):(W=Wa(j),W.c(),M(W,1),W.m(e,null)):W&&(Se(),D(W,1,1,()=>{W=null}),Pe())},i(j){I||(M(F),M(Y),M(U),M(R),M(q),M(z),M(O),M(H),M(G),M(L),M(W),I=!0)},o(j){D(F),D(Y),D(U),D(R),D(q),D(z),D(O),D(H),D(G),D(L),D(W),I=!1},d(j){j&&w(e),F&&F.d(),Y&&Y.d(),U&&U.d(),R&&R.d(),q&&q.d(),z&&z.d(),O&&O.d(),H&&H.d(),G&&G.d(),L&&L.d(),W&&W.d()}}}function Ep(t,e,l){let{data:n={}}=e,{sysinfo:i={}}=e,o={},r={},a={},f={};return Tc.subscribe(c=>{l(2,o=c)}),Sc.subscribe(c=>{l(3,r=c)}),Pc.subscribe(c=>{l(4,a=c)}),Mc.subscribe(c=>{l(5,f=c)}),t.$$set=c=>{"data"in c&&l(0,n=c.data),"sysinfo"in c&&l(1,i=c.sysinfo)},[n,i,o,r,a,f]}class Ip extends $e{constructor(e){super(),ye(this,e,Ep,Dp,ke,{data:0,sysinfo:1})}}let so={};const Uc=rt(so);async function Fp(){so=await(await fetch("/configuration.json")).json(),Uc.set(so)}function Ga(t,e,l){const n=t.slice();return n[2]=e[l],n[4]=l,n}function Rp(t){let e;return{c(){e=m("option"),e.textContent="UART0",e.__value=3,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Lp(t){let e;return{c(){e=m("option"),e.textContent="UART0",e.__value=20,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Ba(t){let e;return{c(){e=m("option"),e.textContent="UART2",e.__value=113,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function za(t){let e,l,n;return{c(){e=m("option"),e.textContent="UART1",l=h(),n=m("option"),n.textContent="UART2",e.__value=9,e.value=e.__value,n.__value=16,n.value=n.__value},m(i,o){y(i,e,o),y(i,l,o),y(i,n,o)},d(i){i&&w(e),i&&w(l),i&&w(n)}}}function Ya(t){let e;return{c(){e=m("option"),e.textContent="UART1",e.__value=18,e.value=e.__value},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Va(t){let e,l,n;return{c(){e=m("option"),l=$("GPIO"),n=$(t[4]),e.__value=t[4],e.value=e.__value},m(i,o){y(i,e,o),s(e,l),s(e,n)},d(i){i&&w(e)}}}function Ka(t){let e,l=t[4]>3&&!(t[0]=="esp32"&&(t[4]==9||t[4]==16))&&!(t[0]=="esp32s2"&&t[4]==18)&&!(t[0]=="esp8266"&&(t[4]==3||t[4]==113))&&Va(t);return{c(){l&&l.c(),e=We()},m(n,i){l&&l.m(n,i),y(n,e,i)},p(n,i){n[4]>3&&!(n[0]=="esp32"&&(n[4]==9||n[4]==16))&&!(n[0]=="esp32s2"&&n[4]==18)&&!(n[0]=="esp8266"&&(n[4]==3||n[4]==113))?l||(l=Va(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(n){l&&l.d(n),n&&w(e)}}}function Up(t){let e,l,n,i,o;function r(v,g){return v[0]=="esp32c3"?Lp:Rp}let a=r(t),f=a(t),c=t[0]=="esp8266"&&Ba(),p=(t[0]=="esp32"||t[0]=="esp32solo")&&za(),_=t[0]=="esp32s2"&&Ya(),b={length:t[1]+1},d=[];for(let v=0;v{"chip"in o&&l(0,n=o.chip)},t.$$.update=()=>{if(t.$$.dirty&1)switch(n){case"esp8266":l(1,i=16);break;case"esp32s2":l(1,i=44);break;case"esp32c3":l(1,i=19);break}},[n,i]}class Oc extends $e{constructor(e){super(),ye(this,e,Op,Up,ke,{chip:0})}}function Qa(t){let e,l,n=t[1]&&Xa(t);return{c(){e=m("div"),l=m("div"),n&&n.c(),u(l,"class","fixed inset-0 bg-gray-500 bg-opacity-50 flex items-center justify-center"),u(e,"class","z-50"),u(e,"aria-modal","true")},m(i,o){y(i,e,o),s(e,l),n&&n.m(l,null)},p(i,o){i[1]?n?n.p(i,o):(n=Xa(i),n.c(),n.m(l,null)):n&&(n.d(1),n=null)},d(i){i&&w(e),n&&n.d()}}}function Xa(t){let e,l;return{c(){e=m("div"),l=$(t[1]),u(e,"class","bg-white m-2 p-3 rounded-md shadow-lg pb-4 text-gray-700 w-96")},m(n,i){y(n,e,i),s(e,l)},p(n,i){i&2&&B(l,n[1])},d(n){n&&w(e)}}}function qp(t){let e,l=t[0]&&Qa(t);return{c(){l&&l.c(),e=We()},m(n,i){l&&l.m(n,i),y(n,e,i)},p(n,[i]){n[0]?l?l.p(n,i):(l=Qa(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:ne,o:ne,d(n){l&&l.d(n),n&&w(e)}}}function Hp(t,e,l){let{active:n}=e,{message:i}=e;return t.$$set=o=>{"active"in o&&l(0,n=o.active),"message"in o&&l(1,i=o.message)},[n,i]}class At extends $e{constructor(e){super(),ye(this,e,Hp,qp,ke,{active:0,message:1})}}function Za(t,e,l){const n=t.slice();return n[1]=e[l],n}function Ja(t){let e,l,n=t[1]+"",i;return{c(){e=m("option"),l=$("Europe/"),i=$(n),e.__value="Europe/"+t[1],e.value=e.__value},m(o,r){y(o,e,r),s(e,l),s(e,i)},p:ne,d(o){o&&w(e)}}}function jp(t){let e,l,n,i=t[0],o=[];for(let r=0;r{r[p]=null}),Pe(),l=r[e],l||(l=r[e]=o[e](f),l.c()),M(l,1),l.m(n.parentNode,n))},i(f){i||(M(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function e0(t){let e,l;return e=new al({props:{color:"blue",text:"Upload cert",title:"Click here to upload certificate"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function t0(t){let e,l;return e=new al({props:{color:"green",text:"Cert OK",title:"Click here to replace certificate"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function l0(t){let e,l,n,i;const o=[t0,e0],r=[];function a(f,c){return f[3].q.s.r?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=We()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e!==p&&(Se(),D(r[p],1,1,()=>{r[p]=null}),Pe(),l=r[e],l||(l=r[e]=o[e](f),l.c()),M(l,1),l.m(n.parentNode,n))},i(f){i||(M(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function n0(t){let e,l;return e=new al({props:{color:"blue",text:"Upload key",title:"Click here to upload key"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function i0(t){let e,l;return e=new al({props:{color:"green",text:"Key OK",title:"Click here to replace key"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function s0(t){let e,l,n,i;const o=[i0,n0],r=[];function a(f,c){return f[3].q.s.k?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=We()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e!==p&&(Se(),D(r[p],1,1,()=>{r[p]=null}),Pe(),l=r[e],l||(l=r[e]=o[e](f),l.c()),M(l,1),l.m(n.parentNode,n))},i(f){i||(M(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function ff(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O,H,G;return o=new Ft({}),{c(){e=m("div"),l=m("strong"),l.textContent="Domoticz",n=h(),i=m("a"),J(o.$$.fragment),r=h(),a=m("input"),f=h(),c=m("div"),p=m("div"),_=$("Electricity IDX"),b=m("br"),d=h(),v=m("input"),g=h(),k=m("div"),C=$("Current IDX"),T=m("br"),P=h(),E=m("input"),S=h(),A=m("div"),I=$(`Voltage IDX: L1, L2 & L3 + `),F=m("div"),Y=m("input"),U=h(),R=m("input"),q=h(),z=m("input"),u(l,"class","text-sm"),u(i,"href",Rt("MQTT-configuration#domoticz")),u(i,"target","_blank"),u(i,"class","float-right"),u(a,"type","hidden"),u(a,"name","o"),a.value="true",u(v,"name","oe"),u(v,"type","text"),u(v,"class","in-f tr w-full"),u(p,"class","w-1/2"),u(E,"name","oc"),u(E,"type","text"),u(E,"class","in-l tr w-full"),u(k,"class","w-1/2"),u(c,"class","my-1 flex"),u(Y,"name","ou1"),u(Y,"type","text"),u(Y,"class","in-f tr w-1/3"),u(R,"name","ou2"),u(R,"type","text"),u(R,"class","in-m tr w-1/3"),u(z,"name","ou3"),u(z,"type","text"),u(z,"class","in-l tr w-1/3"),u(F,"class","flex"),u(A,"class","my-1"),u(e,"class","cnt")},m(L,W){y(L,e,W),s(e,l),s(e,n),s(e,i),X(o,i,null),s(e,r),s(e,a),s(e,f),s(e,c),s(c,p),s(p,_),s(p,b),s(p,d),s(p,v),V(v,t[3].o.e),s(c,g),s(c,k),s(k,C),s(k,T),s(k,P),s(k,E),V(E,t[3].o.c),s(e,S),s(e,A),s(A,I),s(A,F),s(F,Y),V(Y,t[3].o.u1),s(F,U),s(F,R),V(R,t[3].o.u2),s(F,q),s(F,z),V(z,t[3].o.u3),O=!0,H||(G=[K(v,"input",t[60]),K(E,"input",t[61]),K(Y,"input",t[62]),K(R,"input",t[63]),K(z,"input",t[64])],H=!0)},p(L,W){W[0]&8&&v.value!==L[3].o.e&&V(v,L[3].o.e),W[0]&8&&E.value!==L[3].o.c&&V(E,L[3].o.c),W[0]&8&&Y.value!==L[3].o.u1&&V(Y,L[3].o.u1),W[0]&8&&R.value!==L[3].o.u2&&V(R,L[3].o.u2),W[0]&8&&z.value!==L[3].o.u3&&V(z,L[3].o.u3)},i(L){O||(M(o.$$.fragment,L),O=!0)},o(L){D(o.$$.fragment,L),O=!1},d(L){L&&w(e),Z(o),H=!1,Ke(G)}}}function cf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z;return o=new Ft({}),{c(){e=m("div"),l=m("strong"),l.textContent="Home-Assistant",n=h(),i=m("a"),J(o.$$.fragment),r=h(),a=m("input"),f=h(),c=m("div"),p=$("Discovery topic prefix"),_=m("br"),b=h(),d=m("input"),v=h(),g=m("div"),k=$("Hostname for URL"),C=m("br"),T=h(),P=m("input"),S=h(),A=m("div"),I=$("Name tag"),F=m("br"),Y=h(),U=m("input"),u(l,"class","text-sm"),u(i,"href",Rt("MQTT-configuration#home-assistant")),u(i,"target","_blank"),u(i,"class","float-right"),u(a,"type","hidden"),u(a,"name","h"),a.value="true",u(d,"name","ht"),u(d,"type","text"),u(d,"class","in-s"),u(d,"placeholder","homeassistant"),u(c,"class","my-1"),u(P,"name","hh"),u(P,"type","text"),u(P,"class","in-s"),u(P,"placeholder",E=t[3].g.h+".local"),u(g,"class","my-1"),u(U,"name","hn"),u(U,"type","text"),u(U,"class","in-s"),u(A,"class","my-1"),u(e,"class","cnt")},m(O,H){y(O,e,H),s(e,l),s(e,n),s(e,i),X(o,i,null),s(e,r),s(e,a),s(e,f),s(e,c),s(c,p),s(c,_),s(c,b),s(c,d),V(d,t[3].h.t),s(e,v),s(e,g),s(g,k),s(g,C),s(g,T),s(g,P),V(P,t[3].h.h),s(e,S),s(e,A),s(A,I),s(A,F),s(A,Y),s(A,U),V(U,t[3].h.n),R=!0,q||(z=[K(d,"input",t[65]),K(P,"input",t[66]),K(U,"input",t[67])],q=!0)},p(O,H){H[0]&8&&d.value!==O[3].h.t&&V(d,O[3].h.t),(!R||H[0]&8&&E!==(E=O[3].g.h+".local"))&&u(P,"placeholder",E),H[0]&8&&P.value!==O[3].h.h&&V(P,O[3].h.h),H[0]&8&&U.value!==O[3].h.n&&V(U,O[3].h.n)},i(O){R||(M(o.$$.fragment,O),R=!0)},o(O){D(o.$$.fragment,O),R=!1},d(O){O&&w(e),Z(o),q=!1,Ke(z)}}}function mf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P;o=new Ft({});let E={length:9},S=[];for(let A=0;A20&&vf(t),p=t[0].chip=="esp8266"&&gf(t);return{c(){e=m("div"),l=m("strong"),l.textContent="Hardware",n=h(),i=m("a"),J(o.$$.fragment),r=h(),c&&c.c(),a=h(),p&&p.c(),u(l,"class","text-sm"),u(i,"href",Rt("GPIO-configuration")),u(i,"target","_blank"),u(i,"class","float-right"),u(e,"class","cnt")},m(_,b){y(_,e,b),s(e,l),s(e,n),s(e,i),X(o,i,null),s(e,r),c&&c.m(e,null),s(e,a),p&&p.m(e,null),f=!0},p(_,b){_[0].board>20?c?(c.p(_,b),b[0]&1&&M(c,1)):(c=vf(_),c.c(),M(c,1),c.m(e,a)):c&&(Se(),D(c,1,1,()=>{c=null}),Pe()),_[0].chip=="esp8266"?p?p.p(_,b):(p=gf(_),p.c(),p.m(e,null)):p&&(p.d(1),p=null)},i(_){f||(M(o.$$.fragment,_),M(c),f=!0)},o(_){D(o.$$.fragment,_),D(c),f=!1},d(_){_&&w(e),Z(o),c&&c.d(),p&&p.d()}}}function vf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O,H,G,L,W,j,te,le,de,ie,we,Fe,Ce,Re,ve,Ne,Ee,me,se,pe,Q,oe,Me,Ae,he,x,_e,Ue,je,Xe;b=new Oc({props:{chip:t[0].chip}});let Le=t[0].chip!="esp8266"&&hf(t),He=t[3].i.v.p>0&&bf(t);return{c(){e=m("input"),l=h(),n=m("div"),i=m("div"),o=$("HAN"),r=m("label"),a=m("input"),f=$(" pullup"),c=m("br"),p=h(),_=m("select"),J(b.$$.fragment),d=h(),v=m("div"),g=$("AP button"),k=m("br"),C=h(),T=m("input"),P=h(),E=m("div"),S=$("LED"),A=m("label"),I=m("input"),F=$(" inv"),Y=m("br"),U=h(),R=m("div"),q=m("input"),z=h(),O=m("div"),H=$("RGB"),G=m("label"),L=m("input"),W=$(" inverted"),j=m("br"),te=h(),le=m("div"),de=m("input"),ie=h(),we=m("input"),Fe=h(),Ce=m("input"),Re=h(),ve=m("div"),Ne=$("Temperature"),Ee=m("br"),me=h(),se=m("input"),pe=h(),Q=m("div"),oe=$("Analog temp"),Me=m("br"),Ae=h(),he=m("input"),x=h(),Le&&Le.c(),_e=h(),He&&He.c(),u(e,"type","hidden"),u(e,"name","i"),e.value="true",u(a,"name","ihu"),a.__value="true",a.value=a.__value,u(a,"type","checkbox"),u(a,"class","rounded mb-1"),u(r,"class","ml-2"),u(_,"name","ihp"),u(_,"class","in-f w-full"),t[3].i.h.p===void 0&&Qe(()=>t[72].call(_)),u(i,"class","w-1/3"),u(T,"name","ia"),u(T,"type","number"),u(T,"min","0"),u(T,"max",t[6]),u(T,"class","in-m tr w-full"),u(v,"class","w-1/3"),u(I,"name","ili"),I.__value="true",I.value=I.__value,u(I,"type","checkbox"),u(I,"class","rounded mb-1"),u(A,"class","ml-4"),u(q,"name","ilp"),u(q,"type","number"),u(q,"min","0"),u(q,"max",t[6]),u(q,"class","in-l tr w-full"),u(R,"class","flex"),u(E,"class","w-1/3"),u(L,"name","iri"),L.__value="true",L.value=L.__value,u(L,"type","checkbox"),u(L,"class","rounded mb-1"),u(G,"class","ml-4"),u(de,"name","irr"),u(de,"type","number"),u(de,"min","0"),u(de,"max",t[6]),u(de,"class","in-f tr w-1/3"),u(we,"name","irg"),u(we,"type","number"),u(we,"min","0"),u(we,"max",t[6]),u(we,"class","in-m tr w-1/3"),u(Ce,"name","irb"),u(Ce,"type","number"),u(Ce,"min","0"),u(Ce,"max",t[6]),u(Ce,"class","in-l tr w-1/3"),u(le,"class","flex"),u(O,"class","w-full"),u(se,"name","itd"),u(se,"type","number"),u(se,"min","0"),u(se,"max",t[6]),u(se,"class","in-f tr w-full"),u(ve,"class","my-1 w-1/3"),u(he,"name","ita"),u(he,"type","number"),u(he,"min","0"),u(he,"max",t[6]),u(he,"class","in-l tr w-full"),u(Q,"class","my-1 pr-1 w-1/3"),u(n,"class","flex flex-wrap")},m(re,ge){y(re,e,ge),y(re,l,ge),y(re,n,ge),s(n,i),s(i,o),s(i,r),s(r,a),a.checked=t[3].i.h.u,s(r,f),s(i,c),s(i,p),s(i,_),X(b,_,null),De(_,t[3].i.h.p,!0),s(n,d),s(n,v),s(v,g),s(v,k),s(v,C),s(v,T),V(T,t[3].i.a),s(n,P),s(n,E),s(E,S),s(E,A),s(A,I),I.checked=t[3].i.l.i,s(A,F),s(E,Y),s(E,U),s(E,R),s(R,q),V(q,t[3].i.l.p),s(n,z),s(n,O),s(O,H),s(O,G),s(G,L),L.checked=t[3].i.r.i,s(G,W),s(O,j),s(O,te),s(O,le),s(le,de),V(de,t[3].i.r.r),s(le,ie),s(le,we),V(we,t[3].i.r.g),s(le,Fe),s(le,Ce),V(Ce,t[3].i.r.b),s(n,Re),s(n,ve),s(ve,Ne),s(ve,Ee),s(ve,me),s(ve,se),V(se,t[3].i.t.d),s(n,pe),s(n,Q),s(Q,oe),s(Q,Me),s(Q,Ae),s(Q,he),V(he,t[3].i.t.a),s(n,x),Le&&Le.m(n,null),s(n,_e),He&&He.m(n,null),Ue=!0,je||(Xe=[K(a,"change",t[71]),K(_,"change",t[72]),K(T,"input",t[73]),K(I,"change",t[74]),K(q,"input",t[75]),K(L,"change",t[76]),K(de,"input",t[77]),K(we,"input",t[78]),K(Ce,"input",t[79]),K(se,"input",t[80]),K(he,"input",t[81])],je=!0)},p(re,ge){ge[0]&8&&(a.checked=re[3].i.h.u);const Ut={};ge[0]&1&&(Ut.chip=re[0].chip),b.$set(Ut),ge[0]&8&&De(_,re[3].i.h.p),(!Ue||ge[0]&64)&&u(T,"max",re[6]),ge[0]&8&&ae(T.value)!==re[3].i.a&&V(T,re[3].i.a),ge[0]&8&&(I.checked=re[3].i.l.i),(!Ue||ge[0]&64)&&u(q,"max",re[6]),ge[0]&8&&ae(q.value)!==re[3].i.l.p&&V(q,re[3].i.l.p),ge[0]&8&&(L.checked=re[3].i.r.i),(!Ue||ge[0]&64)&&u(de,"max",re[6]),ge[0]&8&&ae(de.value)!==re[3].i.r.r&&V(de,re[3].i.r.r),(!Ue||ge[0]&64)&&u(we,"max",re[6]),ge[0]&8&&ae(we.value)!==re[3].i.r.g&&V(we,re[3].i.r.g),(!Ue||ge[0]&64)&&u(Ce,"max",re[6]),ge[0]&8&&ae(Ce.value)!==re[3].i.r.b&&V(Ce,re[3].i.r.b),(!Ue||ge[0]&64)&&u(se,"max",re[6]),ge[0]&8&&ae(se.value)!==re[3].i.t.d&&V(se,re[3].i.t.d),(!Ue||ge[0]&64)&&u(he,"max",re[6]),ge[0]&8&&ae(he.value)!==re[3].i.t.a&&V(he,re[3].i.t.a),re[0].chip!="esp8266"?Le?Le.p(re,ge):(Le=hf(re),Le.c(),Le.m(n,_e)):Le&&(Le.d(1),Le=null),re[3].i.v.p>0?He?He.p(re,ge):(He=bf(re),He.c(),He.m(n,null)):He&&(He.d(1),He=null)},i(re){Ue||(M(b.$$.fragment,re),Ue=!0)},o(re){D(b.$$.fragment,re),Ue=!1},d(re){re&&w(e),re&&w(l),re&&w(n),Z(b),Le&&Le.d(),He&&He.d(),je=!1,Ke(Xe)}}}function hf(t){let e,l,n,i,o,r,a;return{c(){e=m("div"),l=$("Vcc"),n=m("br"),i=h(),o=m("input"),u(o,"name","ivp"),u(o,"type","number"),u(o,"min","0"),u(o,"max",t[6]),u(o,"class","in-s tr w-full"),u(e,"class","my-1 pl-1 w-1/3")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),V(o,t[3].i.v.p),r||(a=K(o,"input",t[82]),r=!0)},p(f,c){c[0]&64&&u(o,"max",f[6]),c[0]&8&&ae(o.value)!==f[3].i.v.p&&V(o,f[3].i.v.p)},d(f){f&&w(e),r=!1,a()}}}function bf(t){let e,l,n,i,o,r,a,f,c,p;return{c(){e=m("div"),l=$("Voltage divider"),n=m("br"),i=h(),o=m("div"),r=m("input"),a=h(),f=m("input"),u(r,"name","ivdv"),u(r,"type","number"),u(r,"min","0"),u(r,"max","65535"),u(r,"class","in-f tr w-full"),u(r,"placeholder","VCC"),u(f,"name","ivdg"),u(f,"type","number"),u(f,"min","0"),u(f,"max","65535"),u(f,"class","in-l tr w-full"),u(f,"placeholder","GND"),u(o,"class","flex"),u(e,"class","my-1")},m(_,b){y(_,e,b),s(e,l),s(e,n),s(e,i),s(e,o),s(o,r),V(r,t[3].i.v.d.v),s(o,a),s(o,f),V(f,t[3].i.v.d.g),c||(p=[K(r,"input",t[83]),K(f,"input",t[84])],c=!0)},p(_,b){b[0]&8&&ae(r.value)!==_[3].i.v.d.v&&V(r,_[3].i.v.d.v),b[0]&8&&ae(f.value)!==_[3].i.v.d.g&&V(f,_[3].i.v.d.g)},d(_){_&&w(e),c=!1,Ke(p)}}}function gf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T=(t[0].board==2||t[0].board==100)&&kf(t);return{c(){e=m("input"),l=h(),n=m("div"),i=m("div"),o=$("Vcc offset"),r=m("br"),a=h(),f=m("input"),c=h(),p=m("div"),_=$("Multiplier"),b=m("br"),d=h(),v=m("input"),g=h(),T&&T.c(),u(e,"type","hidden"),u(e,"name","iv"),e.value="true",u(f,"name","ivo"),u(f,"type","number"),u(f,"min","0.0"),u(f,"max","3.5"),u(f,"step","0.01"),u(f,"class","in-f tr w-full"),u(i,"class","w-1/3"),u(v,"name","ivm"),u(v,"type","number"),u(v,"min","0.1"),u(v,"max","10"),u(v,"step","0.01"),u(v,"class","in-l tr w-full"),u(p,"class","w-1/3 pr-1"),u(n,"class","my-1 flex flex-wrap")},m(P,E){y(P,e,E),y(P,l,E),y(P,n,E),s(n,i),s(i,o),s(i,r),s(i,a),s(i,f),V(f,t[3].i.v.o),s(n,c),s(n,p),s(p,_),s(p,b),s(p,d),s(p,v),V(v,t[3].i.v.m),s(n,g),T&&T.m(n,null),k||(C=[K(f,"input",t[85]),K(v,"input",t[86])],k=!0)},p(P,E){E[0]&8&&ae(f.value)!==P[3].i.v.o&&V(f,P[3].i.v.o),E[0]&8&&ae(v.value)!==P[3].i.v.m&&V(v,P[3].i.v.m),P[0].board==2||P[0].board==100?T?T.p(P,E):(T=kf(P),T.c(),T.m(n,null)):T&&(T.d(1),T=null)},d(P){P&&w(e),P&&w(l),P&&w(n),T&&T.d(),k=!1,Ke(C)}}}function kf(t){let e,l,n,i,o,r,a;return{c(){e=m("div"),l=$("Boot limit"),n=m("br"),i=h(),o=m("input"),u(o,"name","ivb"),u(o,"type","number"),u(o,"min","2.5"),u(o,"max","3.5"),u(o,"step","0.1"),u(o,"class","in-s tr w-full"),u(e,"class","w-1/3 pl-1")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),V(o,t[3].i.v.b),r||(a=K(o,"input",t[87]),r=!0)},p(f,c){c[0]&8&&ae(o.value)!==f[3].i.v.b&&V(o,f[3].i.v.b)},d(f){f&&w(e),r=!1,a()}}}function wf(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C=t[3].d.t&&yf();return{c(){e=m("div"),e.textContent="Debug can cause sudden reboots. Do not leave on!",l=h(),n=m("div"),i=m("label"),o=m("input"),r=$(" Enable telnet"),a=h(),C&&C.c(),f=h(),c=m("div"),p=m("select"),_=m("option"),_.textContent="Verbose",b=m("option"),b.textContent="Debug",d=m("option"),d.textContent="Info",v=m("option"),v.textContent="Warning",u(e,"class","bd-red"),u(o,"type","checkbox"),u(o,"name","dt"),o.__value="true",o.value=o.__value,u(o,"class","rounded mb-1"),u(n,"class","my-1"),_.__value=1,_.value=_.__value,b.__value=2,b.value=b.__value,d.__value=3,d.value=d.__value,v.__value=4,v.value=v.__value,u(p,"name","dl"),u(p,"class","in-s"),t[3].d.l===void 0&&Qe(()=>t[90].call(p)),u(c,"class","my-1")},m(T,P){y(T,e,P),y(T,l,P),y(T,n,P),s(n,i),s(i,o),o.checked=t[3].d.t,s(i,r),y(T,a,P),C&&C.m(T,P),y(T,f,P),y(T,c,P),s(c,p),s(p,_),s(p,b),s(p,d),s(p,v),De(p,t[3].d.l,!0),g||(k=[K(o,"change",t[89]),K(p,"change",t[90])],g=!0)},p(T,P){P[0]&8&&(o.checked=T[3].d.t),T[3].d.t?C||(C=yf(),C.c(),C.m(f.parentNode,f)):C&&(C.d(1),C=null),P[0]&8&&De(p,T[3].d.l)},d(T){T&&w(e),T&&w(l),T&&w(n),T&&w(a),C&&C.d(T),T&&w(f),T&&w(c),g=!1,Ke(k)}}}function yf(t){let e;return{c(){e=m("div"),e.textContent="Telnet is unsafe and should be off when not in use",u(e,"class","bd-red")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function o0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O,H,G,L,W,j,te,le,de,ie,we,Fe,Ce,Re,ve,Ne,Ee,me,se,pe,Q,oe,Me,Ae,he,x,_e,Ue,je,Xe,Le,He,re,ge,Ut,Ol,xt,ft,Sl,cl,Ot,dt,Ze,Je,xe,Oe,et,Ge,tt,lt,ue,be,Ni,ml,rn,Tt,Mi,Ai,Di,pl,Ei,Ii,Fi,St,Be,_l,qt,Cs,Ri,Te,an,Li,fn,cn,yo,ri,$o,el,Ui,Co,Ts,To,ai,Ht,So,Po,Pl,tl,Nl,No,Oi,Mo,pt,Ml,Ao,qi,mn,pn,_n,dn,Hi,Do,dl,Eo,ji,Io,ql,Fo,Ro,Lo,ll,vn,hn,Uo,bn,Hl,Oo,qo,Ho,gn,jt,jo,Wi,Wo,jl,Go,Bo,zo,kn,Wt,Yo,Gi,Vo,Ss,Ko,Wl,Bi,Gt,Qo,Xo,Zo,Ps,zi,Bt,Jo,xo,eu,ct,Yi,tu,wn,yn,lu,fi,nu,Gl,iu,su,ou,vl,uu,Bl,ru,au,fu,hl,cu,$n,zl,mu,pu,_u,Dt,Cn,Tn,Sn,Pn,du,Yl,vu,hu,bu,Nn,Et,gu,Vi,ku,Ki,Qi,zt,wu,yu,at,Xi,$u,Mn,An,Cu,Vl,Tu,Su,Pu,Al,nl,Dn,En,Nu,Pt,Zi,Ji,Mu,Nt,In,xi,es,Au,Ns,ts,ls,Yt,Du,Eu,ci,Iu,Dl,Fu,mi,Vt,Ru,Lu,Uu,ns,bl,Ou,Ve,is,qu,Fn,Rn,Hu,pi,ju,il,Wu,Ms,Gu,Bu,Ln,gl,zu,Kt,Yu,As,Kl,Vu,Ku,Qu,kl,Xu,Ql,Zu,Ju,xu,wl,er,Un,On,tr,lr,nr,yl,ir,qn,sr,or,ur,vt,Hn,jn,Wn,Gn,Bn,zn,rr,Xl,ar,fr,cr,$l,mr,Ds,Es,Is=t[3].p.r.startsWith("10YNO")||t[3].p.r=="10Y1001A1001A48H",Fs,sl,ss,pr,Yn,Vn,_r,_i,dr,di,vr,Rs,Mt,os,hr,Kn,Qn,br,vi,gr,us,rs,Qt,kr,wr,yr,El,Ls,Xn,$r,as,Zn,Cr,fs,Us,Zl,Os,Jl,qs,xl,Hs,en,Xt,js,Tr;a=new Ft({}),F=new Gp({});let Hc=["NOK","SEK","DKK","EUR"],hi=[];for(let N=0;N<4;N+=1)hi[N]=Kp(Vp(t,Hc,N));let ht=t[3].p.e&&t[0].chip!="esp8266"&&tf(t),bt=t[3].g.s>0&&lf(t);cn=new Ft({});let jc=[24,48,96,192,384,576,1152],bi=[];for(let N=0;N<7;N+=1)bi[N]=Qp(Yp(t,jc,N));let Wc=[64,256,512,1024,1536,2048,3072,4096],gi=[];for(let N=0;N<8;N+=1)gi[N]=Xp(zp(t,Wc,N));let gt=t[3].m.e.e&&nf(t),kt=t[3].m.e.e&&sf(t),wt=t[3].m.m.e&&of(t);yn=new Ft({}),An=new Ft({}),In=new qc({});let yt=t[3].n.m=="static"&&uf(t);Rn=new Ft({});let $t=t[0].chip!="esp8266"&&rf(t),nt=t[3].q.s.e&&af(t),it=t[3].q.m==3&&ff(t),st=t[3].q.m==4&&cf(t),ot=Is&&mf(t);Vn=new Ft({});let Jn=t[7],_t=[];for(let N=0;N20||t[0].chip=="esp8266")&&df(t);Qn=new Ft({});let Ct=t[3].d.s&&wf(t);return Zl=new At({props:{active:t[1],message:"Loading configuration"}}),Jl=new At({props:{active:t[2],message:"Saving configuration"}}),xl=new At({props:{active:t[4],message:"Performing factory reset"}}),en=new At({props:{active:t[5],message:"Device have been factory reset and switched to AP mode"}}),{c(){e=m("form"),l=m("div"),n=m("div"),i=m("strong"),i.textContent="General",o=h(),r=m("a"),J(a.$$.fragment),f=h(),c=m("input"),p=h(),_=m("div"),b=m("div"),d=m("div"),v=$("Hostname"),g=m("br"),k=h(),C=m("input"),T=h(),P=m("div"),E=$("Time zone"),S=m("br"),A=h(),I=m("select"),J(F.$$.fragment),Y=h(),U=m("input"),R=h(),q=m("div"),z=m("div"),O=m("div"),H=$("Price region"),G=m("br"),L=h(),W=m("select"),j=m("optgroup"),te=m("option"),te.textContent="NO1",le=m("option"),le.textContent="NO2",de=m("option"),de.textContent="NO3",ie=m("option"),ie.textContent="NO4",we=m("option"),we.textContent="NO5",Fe=m("optgroup"),Ce=m("option"),Ce.textContent="SE1",Re=m("option"),Re.textContent="SE2",ve=m("option"),ve.textContent="SE3",Ne=m("option"),Ne.textContent="SE4",Ee=m("optgroup"),me=m("option"),me.textContent="DK1",se=m("option"),se.textContent="DK2",pe=m("option"),pe.textContent="Austria",Q=m("option"),Q.textContent="Belgium",oe=m("option"),oe.textContent="Czech Republic",Me=m("option"),Me.textContent="Estonia",Ae=m("option"),Ae.textContent="Finland",he=m("option"),he.textContent="France",x=m("option"),x.textContent="Germany",_e=m("option"),_e.textContent="Great Britain",Ue=m("option"),Ue.textContent="Latvia",je=m("option"),je.textContent="Lithuania",Xe=m("option"),Xe.textContent="Netherland",Le=m("option"),Le.textContent="Poland",He=m("option"),He.textContent="Switzerland",re=h(),ge=m("div"),Ut=$("Currency"),Ol=m("br"),xt=h(),ft=m("select");for(let N=0;N<4;N+=1)hi[N].c();Sl=h(),cl=m("div"),Ot=m("div"),dt=m("div"),Ze=$("Fixed price"),Je=m("br"),xe=h(),Oe=m("input"),et=h(),Ge=m("div"),tt=$("Multiplier"),lt=m("br"),ue=h(),be=m("input"),Ni=h(),ml=m("div"),rn=m("label"),Tt=m("input"),Mi=$(" Enable price fetch from remote server"),Ai=h(),ht&&ht.c(),Di=h(),pl=m("div"),Ei=$("Security"),Ii=m("br"),Fi=h(),St=m("select"),Be=m("option"),Be.textContent="None",_l=m("option"),_l.textContent="Only configuration",qt=m("option"),qt.textContent="Everything",Cs=h(),bt&&bt.c(),Ri=h(),Te=m("div"),an=m("strong"),an.textContent="Meter",Li=h(),fn=m("a"),J(cn.$$.fragment),yo=h(),ri=m("input"),$o=h(),el=m("div"),Ui=m("span"),Ui.textContent="Buffer size",Co=h(),Ts=m("span"),Ts.textContent="Serial conf.",To=h(),ai=m("label"),Ht=m("input"),So=$(" inverted"),Po=h(),Pl=m("div"),tl=m("select"),Nl=m("option"),No=$("Autodetect");for(let N=0;N<7;N+=1)bi[N].c();Mo=h(),pt=m("select"),Ml=m("option"),Ao=$("-"),mn=m("option"),mn.textContent="7N1",pn=m("option"),pn.textContent="8N1",_n=m("option"),_n.textContent="7E1",dn=m("option"),dn.textContent="8E1",Do=h(),dl=m("select");for(let N=0;N<8;N+=1)gi[N].c();Eo=h(),ji=m("div"),ji.innerHTML="Buffer size
",Io=h(),ql=m("div"),Fo=$("Voltage"),Ro=m("br"),Lo=h(),ll=m("select"),vn=m("option"),vn.textContent="400V (TN)",hn=m("option"),hn.textContent="230V (IT/TT)",Uo=h(),bn=m("div"),Hl=m("div"),Oo=$("Main fuse"),qo=m("br"),Ho=h(),gn=m("label"),jt=m("input"),jo=h(),Wi=m("span"),Wi.textContent="A",Wo=h(),jl=m("div"),Go=$("Production"),Bo=m("br"),zo=h(),kn=m("label"),Wt=m("input"),Yo=h(),Gi=m("span"),Gi.textContent="kWp",Vo=h(),Ss=m("div"),Ko=h(),Wl=m("div"),Bi=m("label"),Gt=m("input"),Qo=$(" Meter is encrypted"),Xo=h(),gt&>.c(),Zo=h(),kt&&kt.c(),Ps=h(),zi=m("label"),Bt=m("input"),Jo=$(" Multipliers"),xo=h(),wt&&wt.c(),eu=h(),ct=m("div"),Yi=m("strong"),Yi.textContent="WiFi",tu=h(),wn=m("a"),J(yn.$$.fragment),lu=h(),fi=m("input"),nu=h(),Gl=m("div"),iu=$("SSID"),su=m("br"),ou=h(),vl=m("input"),uu=h(),Bl=m("div"),ru=$("Password"),au=m("br"),fu=h(),hl=m("input"),cu=h(),$n=m("div"),zl=m("div"),mu=$("Power saving"),pu=m("br"),_u=h(),Dt=m("select"),Cn=m("option"),Cn.textContent="Default",Tn=m("option"),Tn.textContent="Off",Sn=m("option"),Sn.textContent="Minimum",Pn=m("option"),Pn.textContent="Maximum",du=h(),Yl=m("div"),vu=$("Power"),hu=m("br"),bu=h(),Nn=m("div"),Et=m("input"),gu=h(),Vi=m("span"),Vi.textContent="dBm",ku=h(),Ki=m("div"),Qi=m("label"),zt=m("input"),wu=$(" Auto reboot on connection problem"),yu=h(),at=m("div"),Xi=m("strong"),Xi.textContent="Network",$u=h(),Mn=m("a"),J(An.$$.fragment),Cu=h(),Vl=m("div"),Tu=$("IP"),Su=m("br"),Pu=h(),Al=m("div"),nl=m("select"),Dn=m("option"),Dn.textContent="DHCP",En=m("option"),En.textContent="Static",Nu=h(),Pt=m("input"),Mu=h(),Nt=m("select"),J(In.$$.fragment),Au=h(),yt&&yt.c(),Ns=h(),ts=m("div"),ls=m("label"),Yt=m("input"),Du=$(" enable mDNS"),Eu=h(),ci=m("input"),Iu=h(),Dl=m("div"),Fu=$("NTP "),mi=m("label"),Vt=m("input"),Ru=$(" obtain from DHCP"),Lu=m("br"),Uu=h(),ns=m("div"),bl=m("input"),Ou=h(),Ve=m("div"),is=m("strong"),is.textContent="MQTT",qu=h(),Fn=m("a"),J(Rn.$$.fragment),Hu=h(),pi=m("input"),ju=h(),il=m("div"),Wu=$(`Server + `),$t&&$t.c(),Ms=h(),Gu=m("br"),Bu=h(),Ln=m("div"),gl=m("input"),zu=h(),Kt=m("input"),Yu=h(),nt&&nt.c(),As=h(),Kl=m("div"),Vu=$("Username"),Ku=m("br"),Qu=h(),kl=m("input"),Xu=h(),Ql=m("div"),Zu=$("Password"),Ju=m("br"),xu=h(),wl=m("input"),er=h(),Un=m("div"),On=m("div"),tr=$("Client ID"),lr=m("br"),nr=h(),yl=m("input"),ir=h(),qn=m("div"),sr=$("Payload"),or=m("br"),ur=h(),vt=m("select"),Hn=m("option"),Hn.textContent="JSON",jn=m("option"),jn.textContent="Raw (minimal)",Wn=m("option"),Wn.textContent="Raw (full)",Gn=m("option"),Gn.textContent="Domoticz",Bn=m("option"),Bn.textContent="HomeAssistant",zn=m("option"),zn.textContent="HEX dump",rr=h(),Xl=m("div"),ar=$("Publish topic"),fr=m("br"),cr=h(),$l=m("input"),mr=h(),it&&it.c(),Ds=h(),st&&st.c(),Es=h(),ot&&ot.c(),Fs=h(),sl=m("div"),ss=m("strong"),ss.textContent="User interface",pr=h(),Yn=m("a"),J(Vn.$$.fragment),_r=h(),_i=m("input"),dr=h(),di=m("div");for(let N=0;N<_t.length;N+=1)_t[N].c();vr=h(),ut&&ut.c(),Rs=h(),Mt=m("div"),os=m("strong"),os.textContent="Debugging",hr=h(),Kn=m("a"),J(Qn.$$.fragment),br=h(),vi=m("input"),gr=h(),us=m("div"),rs=m("label"),Qt=m("input"),kr=$(" Enable debugging"),wr=h(),Ct&&Ct.c(),yr=h(),El=m("div"),Ls=m("div"),Xn=m("button"),Xn.textContent="Factory reset",$r=h(),as=m("div"),Zn=m("button"),Zn.textContent="Reboot",Cr=h(),fs=m("div"),fs.innerHTML='',Us=h(),J(Zl.$$.fragment),Os=h(),J(Jl.$$.fragment),qs=h(),J(xl.$$.fragment),Hs=h(),J(en.$$.fragment),u(i,"class","text-sm"),u(r,"href",Rt("General-configuration")),u(r,"target","_blank"),u(r,"class","float-right"),u(c,"type","hidden"),u(c,"name","g"),c.value="true",u(C,"name","gh"),u(C,"type","text"),u(C,"class","in-f w-full"),u(C,"pattern","[A-Za-z0-9-]+"),u(I,"name","gt"),u(I,"class","in-l w-full"),t[3].g.t===void 0&&Qe(()=>t[13].call(I)),u(b,"class","flex"),u(_,"class","my-1"),u(U,"type","hidden"),u(U,"name","p"),U.value="true",te.__value="10YNO-1--------2",te.value=te.__value,le.__value="10YNO-2--------T",le.value=le.__value,de.__value="10YNO-3--------J",de.value=de.__value,ie.__value="10YNO-4--------9",ie.value=ie.__value,we.__value="10Y1001A1001A48H",we.value=we.__value,u(j,"label","Norway"),Ce.__value="10Y1001A1001A44P",Ce.value=Ce.__value,Re.__value="10Y1001A1001A45N",Re.value=Re.__value,ve.__value="10Y1001A1001A46L",ve.value=ve.__value,Ne.__value="10Y1001A1001A47J",Ne.value=Ne.__value,u(Fe,"label","Sweden"),me.__value="10YDK-1--------W",me.value=me.__value,se.__value="10YDK-2--------M",se.value=se.__value,u(Ee,"label","Denmark"),pe.__value="10YAT-APG------L",pe.value=pe.__value,Q.__value="10YBE----------2",Q.value=Q.__value,oe.__value="10YCZ-CEPS-----N",oe.value=oe.__value,Me.__value="10Y1001A1001A39I",Me.value=Me.__value,Ae.__value="10YFI-1--------U",Ae.value=Ae.__value,he.__value="10YFR-RTE------C",he.value=he.__value,x.__value="10Y1001A1001A83F",x.value=x.__value,_e.__value="10YGB----------A",_e.value=_e.__value,Ue.__value="10YLV-1001A00074",Ue.value=Ue.__value,je.__value="10YLT-1001A0008Q",je.value=je.__value,Xe.__value="10YNL----------L",Xe.value=Xe.__value,Le.__value="10YPL-AREA-----S",Le.value=Le.__value,He.__value="10YCH-SWISSGRIDZ",He.value=He.__value,u(W,"name","pr"),u(W,"class","in-f w-full"),t[3].p.r===void 0&&Qe(()=>t[14].call(W)),u(O,"class","w-full"),u(ft,"name","pc"),u(ft,"class","in-l"),t[3].p.c===void 0&&Qe(()=>t[15].call(ft)),u(z,"class","flex"),u(q,"class","my-1"),u(Oe,"name","pf"),u(Oe,"type","number"),u(Oe,"min","0.001"),u(Oe,"max","65"),u(Oe,"step","0.001"),u(Oe,"class","in-f tr w-full"),u(dt,"class","w-1/2"),u(be,"name","pm"),u(be,"type","number"),u(be,"min","0.001"),u(be,"max","1000"),u(be,"step","0.001"),u(be,"class","in-l tr w-full"),u(Ge,"class","w-1/2"),u(Ot,"class","flex"),u(cl,"class","my-1"),u(Tt,"type","checkbox"),u(Tt,"name","pe"),Tt.__value="true",Tt.value=Tt.__value,u(Tt,"class","rounded mb-1"),u(ml,"class","my-1"),Be.__value=0,Be.value=Be.__value,_l.__value=1,_l.value=_l.__value,qt.__value=2,qt.value=qt.__value,u(St,"name","gs"),u(St,"class","in-s"),t[3].g.s===void 0&&Qe(()=>t[20].call(St)),u(pl,"class","my-1"),u(n,"class","cnt"),u(an,"class","text-sm"),u(fn,"href",Rt("Meter-configuration")),u(fn,"target","_blank"),u(fn,"class","float-right"),u(ri,"type","hidden"),u(ri,"name","m"),ri.value="true",u(Ui,"class","float-right"),u(Ht,"name","mi"),Ht.__value="true",Ht.value=Ht.__value,u(Ht,"type","checkbox"),u(Ht,"class","rounded mb-1"),u(ai,"class","mt-2 ml-3 whitespace-nowrap"),Nl.__value=0,Nl.value=Nl.__value,Nl.disabled=Oi=t[3].m.b!=0,u(tl,"name","mb"),u(tl,"class","in-f tr w-1/2"),t[3].m.b===void 0&&Qe(()=>t[24].call(tl)),Ml.__value=0,Ml.value=Ml.__value,Ml.disabled=qi=t[3].m.b!=0,mn.__value=2,mn.value=mn.__value,pn.__value=3,pn.value=pn.__value,_n.__value=10,_n.value=_n.__value,dn.__value=11,dn.value=dn.__value,u(pt,"name","mp"),u(pt,"class","in-m"),pt.disabled=Hi=t[3].m.b==0,t[3].m.p===void 0&&Qe(()=>t[25].call(pt)),u(dl,"name","ms"),u(dl,"class","in-l tr w-1/2"),t[3].m.s===void 0&&Qe(()=>t[26].call(dl)),u(Pl,"class","flex w-full"),u(el,"class","my-1"),u(ji,"class","my-1"),vn.__value=2,vn.value=vn.__value,hn.__value=1,hn.value=hn.__value,u(ll,"name","md"),u(ll,"class","in-s"),t[3].m.d===void 0&&Qe(()=>t[27].call(ll)),u(ql,"class","my-1"),u(jt,"name","mf"),u(jt,"type","number"),u(jt,"min","5"),u(jt,"max","65535"),u(jt,"class","in-f tr w-full"),u(Wi,"class","in-post"),u(gn,"class","flex"),u(Hl,"class","mx-1"),u(Wt,"name","mr"),u(Wt,"type","number"),u(Wt,"min","0"),u(Wt,"max","65535"),u(Wt,"class","in-f tr w-full"),u(Gi,"class","in-post"),u(kn,"class","flex"),u(jl,"class","mx-1"),u(bn,"class","my-1 flex"),u(Ss,"class","my-1"),u(Gt,"type","checkbox"),u(Gt,"name","me"),Gt.__value="true",Gt.value=Gt.__value,u(Gt,"class","rounded mb-1"),u(Wl,"class","my-1"),u(Bt,"type","checkbox"),u(Bt,"name","mm"),Bt.__value="true",Bt.value=Bt.__value,u(Bt,"class","rounded mb-1"),u(Te,"class","cnt"),u(Yi,"class","text-sm"),u(wn,"href",Rt("WiFi-configuration")),u(wn,"target","_blank"),u(wn,"class","float-right"),u(fi,"type","hidden"),u(fi,"name","w"),fi.value="true",u(vl,"name","ws"),u(vl,"type","text"),u(vl,"class","in-s"),u(Gl,"class","my-1"),u(hl,"name","wp"),u(hl,"type","password"),u(hl,"class","in-s"),u(Bl,"class","my-1"),Cn.__value=255,Cn.value=Cn.__value,Tn.__value=0,Tn.value=Tn.__value,Sn.__value=1,Sn.value=Sn.__value,Pn.__value=2,Pn.value=Pn.__value,u(Dt,"name","wz"),u(Dt,"class","in-s"),t[3].w.z===void 0&&Qe(()=>t[40].call(Dt)),u(zl,"class","w-1/2"),u(Et,"name","ww"),u(Et,"type","number"),u(Et,"min","0"),u(Et,"max","20.5"),u(Et,"step","0.5"),u(Et,"class","in-f tr w-full"),u(Vi,"class","in-post"),u(Nn,"class","flex"),u(Yl,"class","ml-2 w-1/2"),u($n,"class","my-1 flex"),u(zt,"type","checkbox"),u(zt,"name","wa"),zt.__value="true",zt.value=zt.__value,u(zt,"class","rounded mb-1"),u(Ki,"class","my-3"),u(ct,"class","cnt"),u(Xi,"class","text-sm"),u(Mn,"href",Rt("Network-configuration")),u(Mn,"target","_blank"),u(Mn,"class","float-right"),Dn.__value="dhcp",Dn.value=Dn.__value,En.__value="static",En.value=En.__value,u(nl,"name","nm"),u(nl,"class","in-f"),t[3].n.m===void 0&&Qe(()=>t[43].call(nl)),u(Pt,"name","ni"),u(Pt,"type","text"),u(Pt,"class","in-m w-full"),Pt.disabled=Zi=t[3].n.m=="dhcp",Pt.required=Ji=t[3].n.m=="static",u(Nt,"name","ns"),u(Nt,"class","in-l"),Nt.disabled=xi=t[3].n.m=="dhcp",Nt.required=es=t[3].n.m=="static",t[3].n.s===void 0&&Qe(()=>t[45].call(Nt)),u(Al,"class","flex"),u(Vl,"class","my-1"),u(Yt,"name","nd"),Yt.__value="true",Yt.value=Yt.__value,u(Yt,"type","checkbox"),u(Yt,"class","rounded mb-1"),u(ts,"class","my-1"),u(ci,"type","hidden"),u(ci,"name","ntp"),ci.value="true",u(Vt,"name","ntpd"),Vt.__value="true",Vt.value=Vt.__value,u(Vt,"type","checkbox"),u(Vt,"class","rounded mb-1"),u(mi,"class","ml-4"),u(bl,"name","ntph"),u(bl,"type","text"),u(bl,"class","in-s"),u(ns,"class","flex"),u(Dl,"class","my-1"),u(at,"class","cnt"),u(is,"class","text-sm"),u(Fn,"href",Rt("MQTT-configuration")),u(Fn,"target","_blank"),u(Fn,"class","float-right"),u(pi,"type","hidden"),u(pi,"name","q"),pi.value="true",u(gl,"name","qh"),u(gl,"type","text"),u(gl,"class","in-f w-3/4"),u(Kt,"name","qp"),u(Kt,"type","number"),u(Kt,"min","1024"),u(Kt,"max","65535"),u(Kt,"class","in-l tr w-1/4"),u(Ln,"class","flex"),u(il,"class","my-1"),u(kl,"name","qu"),u(kl,"type","text"),u(kl,"class","in-s"),u(Kl,"class","my-1"),u(wl,"name","qa"),u(wl,"type","password"),u(wl,"class","in-s"),u(Ql,"class","my-1"),u(yl,"name","qc"),u(yl,"type","text"),u(yl,"class","in-f w-full"),Hn.__value=0,Hn.value=Hn.__value,jn.__value=1,jn.value=jn.__value,Wn.__value=2,Wn.value=Wn.__value,Gn.__value=3,Gn.value=Gn.__value,Bn.__value=4,Bn.value=Bn.__value,zn.__value=255,zn.value=zn.__value,u(vt,"name","qm"),u(vt,"class","in-l"),t[3].q.m===void 0&&Qe(()=>t[58].call(vt)),u(Un,"class","my-1 flex"),u($l,"name","qb"),u($l,"type","text"),u($l,"class","in-s"),u(Xl,"class","my-1"),u(Ve,"class","cnt"),u(ss,"class","text-sm"),u(Yn,"href",Rt("User-interface")),u(Yn,"target","_blank"),u(Yn,"class","float-right"),u(_i,"type","hidden"),u(_i,"name","u"),_i.value="true",u(di,"class","flex flex-wrap"),u(sl,"class","cnt"),u(os,"class","text-sm"),u(Kn,"href","https://amsleser.no/blog/post/24-telnet-debug"),u(Kn,"target","_blank"),u(Kn,"class","float-right"),u(vi,"type","hidden"),u(vi,"name","d"),vi.value="true",u(Qt,"type","checkbox"),u(Qt,"name","ds"),Qt.__value="true",Qt.value=Qt.__value,u(Qt,"class","rounded mb-1"),u(us,"class","mt-3"),u(Mt,"class","cnt"),u(l,"class","grid xl:grid-cols-4 lg:grid-cols-2 md:grid-cols-2"),u(Xn,"type","button"),u(Xn,"class","py-2 px-4 rounded bg-red-500 text-white ml-2"),u(Zn,"type","button"),u(Zn,"class","py-2 px-4 rounded bg-yellow-500 text-white"),u(as,"class","text-center"),u(fs,"class","text-right"),u(El,"class","grid grid-cols-3"),u(e,"autocomplete","off")},m(N,ee){y(N,e,ee),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),X(a,r,null),s(n,f),s(n,c),s(n,p),s(n,_),s(_,b),s(b,d),s(d,v),s(d,g),s(d,k),s(d,C),V(C,t[3].g.h),s(b,T),s(b,P),s(P,E),s(P,S),s(P,A),s(P,I),X(F,I,null),De(I,t[3].g.t,!0),s(n,Y),s(n,U),s(n,R),s(n,q),s(q,z),s(z,O),s(O,H),s(O,G),s(O,L),s(O,W),s(W,j),s(j,te),s(j,le),s(j,de),s(j,ie),s(j,we),s(W,Fe),s(Fe,Ce),s(Fe,Re),s(Fe,ve),s(Fe,Ne),s(W,Ee),s(Ee,me),s(Ee,se),s(W,pe),s(W,Q),s(W,oe),s(W,Me),s(W,Ae),s(W,he),s(W,x),s(W,_e),s(W,Ue),s(W,je),s(W,Xe),s(W,Le),s(W,He),De(W,t[3].p.r,!0),s(z,re),s(z,ge),s(ge,Ut),s(ge,Ol),s(ge,xt),s(ge,ft);for(let ze=0;ze<4;ze+=1)hi[ze]&&hi[ze].m(ft,null);De(ft,t[3].p.c,!0),s(n,Sl),s(n,cl),s(cl,Ot),s(Ot,dt),s(dt,Ze),s(dt,Je),s(dt,xe),s(dt,Oe),V(Oe,t[3].p.f),s(Ot,et),s(Ot,Ge),s(Ge,tt),s(Ge,lt),s(Ge,ue),s(Ge,be),V(be,t[3].p.m),s(n,Ni),s(n,ml),s(ml,rn),s(rn,Tt),Tt.checked=t[3].p.e,s(rn,Mi),s(ml,Ai),ht&&ht.m(ml,null),s(n,Di),s(n,pl),s(pl,Ei),s(pl,Ii),s(pl,Fi),s(pl,St),s(St,Be),s(St,_l),s(St,qt),De(St,t[3].g.s,!0),s(n,Cs),bt&&bt.m(n,null),s(l,Ri),s(l,Te),s(Te,an),s(Te,Li),s(Te,fn),X(cn,fn,null),s(Te,yo),s(Te,ri),s(Te,$o),s(Te,el),s(el,Ui),s(el,Co),s(el,Ts),s(el,To),s(el,ai),s(ai,Ht),Ht.checked=t[3].m.i,s(ai,So),s(el,Po),s(el,Pl),s(Pl,tl),s(tl,Nl),s(Nl,No);for(let ze=0;ze<7;ze+=1)bi[ze]&&bi[ze].m(tl,null);De(tl,t[3].m.b,!0),s(Pl,Mo),s(Pl,pt),s(pt,Ml),s(Ml,Ao),s(pt,mn),s(pt,pn),s(pt,_n),s(pt,dn),De(pt,t[3].m.p,!0),s(Pl,Do),s(Pl,dl);for(let ze=0;ze<8;ze+=1)gi[ze]&&gi[ze].m(dl,null);De(dl,t[3].m.s,!0),s(Te,Eo),s(Te,ji),s(Te,Io),s(Te,ql),s(ql,Fo),s(ql,Ro),s(ql,Lo),s(ql,ll),s(ll,vn),s(ll,hn),De(ll,t[3].m.d,!0),s(Te,Uo),s(Te,bn),s(bn,Hl),s(Hl,Oo),s(Hl,qo),s(Hl,Ho),s(Hl,gn),s(gn,jt),V(jt,t[3].m.f),s(gn,jo),s(gn,Wi),s(bn,Wo),s(bn,jl),s(jl,Go),s(jl,Bo),s(jl,zo),s(jl,kn),s(kn,Wt),V(Wt,t[3].m.r),s(kn,Yo),s(kn,Gi),s(Te,Vo),s(Te,Ss),s(Te,Ko),s(Te,Wl),s(Wl,Bi),s(Bi,Gt),Gt.checked=t[3].m.e.e,s(Bi,Qo),s(Wl,Xo),gt&>.m(Wl,null),s(Te,Zo),kt&&kt.m(Te,null),s(Te,Ps),s(Te,zi),s(zi,Bt),Bt.checked=t[3].m.m.e,s(zi,Jo),s(Te,xo),wt&&wt.m(Te,null),s(l,eu),s(l,ct),s(ct,Yi),s(ct,tu),s(ct,wn),X(yn,wn,null),s(ct,lu),s(ct,fi),s(ct,nu),s(ct,Gl),s(Gl,iu),s(Gl,su),s(Gl,ou),s(Gl,vl),V(vl,t[3].w.s),s(ct,uu),s(ct,Bl),s(Bl,ru),s(Bl,au),s(Bl,fu),s(Bl,hl),V(hl,t[3].w.p),s(ct,cu),s(ct,$n),s($n,zl),s(zl,mu),s(zl,pu),s(zl,_u),s(zl,Dt),s(Dt,Cn),s(Dt,Tn),s(Dt,Sn),s(Dt,Pn),De(Dt,t[3].w.z,!0),s($n,du),s($n,Yl),s(Yl,vu),s(Yl,hu),s(Yl,bu),s(Yl,Nn),s(Nn,Et),V(Et,t[3].w.w),s(Nn,gu),s(Nn,Vi),s(ct,ku),s(ct,Ki),s(Ki,Qi),s(Qi,zt),zt.checked=t[3].w.a,s(Qi,wu),s(l,yu),s(l,at),s(at,Xi),s(at,$u),s(at,Mn),X(An,Mn,null),s(at,Cu),s(at,Vl),s(Vl,Tu),s(Vl,Su),s(Vl,Pu),s(Vl,Al),s(Al,nl),s(nl,Dn),s(nl,En),De(nl,t[3].n.m,!0),s(Al,Nu),s(Al,Pt),V(Pt,t[3].n.i),s(Al,Mu),s(Al,Nt),X(In,Nt,null),De(Nt,t[3].n.s,!0),s(at,Au),yt&&yt.m(at,null),s(at,Ns),s(at,ts),s(ts,ls),s(ls,Yt),Yt.checked=t[3].n.d,s(ls,Du),s(at,Eu),s(at,ci),s(at,Iu),s(at,Dl),s(Dl,Fu),s(Dl,mi),s(mi,Vt),Vt.checked=t[3].n.h,s(mi,Ru),s(Dl,Lu),s(Dl,Uu),s(Dl,ns),s(ns,bl),V(bl,t[3].n.n1),s(l,Ou),s(l,Ve),s(Ve,is),s(Ve,qu),s(Ve,Fn),X(Rn,Fn,null),s(Ve,Hu),s(Ve,pi),s(Ve,ju),s(Ve,il),s(il,Wu),$t&&$t.m(il,null),s(il,Ms),s(il,Gu),s(il,Bu),s(il,Ln),s(Ln,gl),V(gl,t[3].q.h),s(Ln,zu),s(Ln,Kt),V(Kt,t[3].q.p),s(Ve,Yu),nt&&nt.m(Ve,null),s(Ve,As),s(Ve,Kl),s(Kl,Vu),s(Kl,Ku),s(Kl,Qu),s(Kl,kl),V(kl,t[3].q.u),s(Ve,Xu),s(Ve,Ql),s(Ql,Zu),s(Ql,Ju),s(Ql,xu),s(Ql,wl),V(wl,t[3].q.a),s(Ve,er),s(Ve,Un),s(Un,On),s(On,tr),s(On,lr),s(On,nr),s(On,yl),V(yl,t[3].q.c),s(Un,ir),s(Un,qn),s(qn,sr),s(qn,or),s(qn,ur),s(qn,vt),s(vt,Hn),s(vt,jn),s(vt,Wn),s(vt,Gn),s(vt,Bn),s(vt,zn),De(vt,t[3].q.m,!0),s(Ve,rr),s(Ve,Xl),s(Xl,ar),s(Xl,fr),s(Xl,cr),s(Xl,$l),V($l,t[3].q.b),s(l,mr),it&&it.m(l,null),s(l,Ds),st&&st.m(l,null),s(l,Es),ot&&ot.m(l,null),s(l,Fs),s(l,sl),s(sl,ss),s(sl,pr),s(sl,Yn),X(Vn,Yn,null),s(sl,_r),s(sl,_i),s(sl,dr),s(sl,di);for(let ze=0;ze<_t.length;ze+=1)_t[ze]&&_t[ze].m(di,null);s(l,vr),ut&&ut.m(l,null),s(l,Rs),s(l,Mt),s(Mt,os),s(Mt,hr),s(Mt,Kn),X(Qn,Kn,null),s(Mt,br),s(Mt,vi),s(Mt,gr),s(Mt,us),s(us,rs),s(rs,Qt),Qt.checked=t[3].d.s,s(rs,kr),s(Mt,wr),Ct&&Ct.m(Mt,null),s(e,yr),s(e,El),s(El,Ls),s(Ls,Xn),s(El,$r),s(El,as),s(as,Zn),s(El,Cr),s(El,fs),y(N,Us,ee),X(Zl,N,ee),y(N,Os,ee),X(Jl,N,ee),y(N,qs,ee),X(xl,N,ee),y(N,Hs,ee),X(en,N,ee),Xt=!0,js||(Tr=[K(C,"input",t[12]),K(I,"change",t[13]),K(W,"change",t[14]),K(ft,"change",t[15]),K(Oe,"input",t[16]),K(be,"input",t[17]),K(Tt,"change",t[18]),K(St,"change",t[20]),K(Ht,"change",t[23]),K(tl,"change",t[24]),K(pt,"change",t[25]),K(dl,"change",t[26]),K(ll,"change",t[27]),K(jt,"input",t[28]),K(Wt,"input",t[29]),K(Gt,"change",t[30]),K(Bt,"change",t[33]),K(vl,"input",t[38]),K(hl,"input",t[39]),K(Dt,"change",t[40]),K(Et,"input",t[41]),K(zt,"change",t[42]),K(nl,"change",t[43]),K(Pt,"input",t[44]),K(Nt,"change",t[45]),K(Yt,"change",t[49]),K(Vt,"change",t[50]),K(bl,"input",t[51]),K(gl,"input",t[53]),K(Kt,"input",t[54]),K(kl,"input",t[55]),K(wl,"input",t[56]),K(yl,"input",t[57]),K(vt,"change",t[58]),K($l,"input",t[59]),K(Qt,"change",t[88]),K(Xn,"click",t[8]),K(Zn,"click",t[10]),K(e,"submit",ys(t[9]))],js=!0)},p(N,ee){if(ee[0]&8&&C.value!==N[3].g.h&&V(C,N[3].g.h),ee[0]&8&&De(I,N[3].g.t),ee[0]&8&&De(W,N[3].p.r),ee[0]&8&&De(ft,N[3].p.c),ee[0]&8&&ae(Oe.value)!==N[3].p.f&&V(Oe,N[3].p.f),ee[0]&8&&ae(be.value)!==N[3].p.m&&V(be,N[3].p.m),ee[0]&8&&(Tt.checked=N[3].p.e),N[3].p.e&&N[0].chip!="esp8266"?ht?ht.p(N,ee):(ht=tf(N),ht.c(),ht.m(ml,null)):ht&&(ht.d(1),ht=null),ee[0]&8&&De(St,N[3].g.s),N[3].g.s>0?bt?bt.p(N,ee):(bt=lf(N),bt.c(),bt.m(n,null)):bt&&(bt.d(1),bt=null),ee[0]&8&&(Ht.checked=N[3].m.i),(!Xt||ee[0]&8&&Oi!==(Oi=N[3].m.b!=0))&&(Nl.disabled=Oi),ee[0]&8&&De(tl,N[3].m.b),(!Xt||ee[0]&8&&qi!==(qi=N[3].m.b!=0))&&(Ml.disabled=qi),(!Xt||ee[0]&8&&Hi!==(Hi=N[3].m.b==0))&&(pt.disabled=Hi),ee[0]&8&&De(pt,N[3].m.p),ee[0]&8&&De(dl,N[3].m.s),ee[0]&8&&De(ll,N[3].m.d),ee[0]&8&&ae(jt.value)!==N[3].m.f&&V(jt,N[3].m.f),ee[0]&8&&ae(Wt.value)!==N[3].m.r&&V(Wt,N[3].m.r),ee[0]&8&&(Gt.checked=N[3].m.e.e),N[3].m.e.e?gt?gt.p(N,ee):(gt=nf(N),gt.c(),gt.m(Wl,null)):gt&&(gt.d(1),gt=null),N[3].m.e.e?kt?kt.p(N,ee):(kt=sf(N),kt.c(),kt.m(Te,Ps)):kt&&(kt.d(1),kt=null),ee[0]&8&&(Bt.checked=N[3].m.m.e),N[3].m.m.e?wt?wt.p(N,ee):(wt=of(N),wt.c(),wt.m(Te,null)):wt&&(wt.d(1),wt=null),ee[0]&8&&vl.value!==N[3].w.s&&V(vl,N[3].w.s),ee[0]&8&&hl.value!==N[3].w.p&&V(hl,N[3].w.p),ee[0]&8&&De(Dt,N[3].w.z),ee[0]&8&&ae(Et.value)!==N[3].w.w&&V(Et,N[3].w.w),ee[0]&8&&(zt.checked=N[3].w.a),ee[0]&8&&De(nl,N[3].n.m),(!Xt||ee[0]&8&&Zi!==(Zi=N[3].n.m=="dhcp"))&&(Pt.disabled=Zi),(!Xt||ee[0]&8&&Ji!==(Ji=N[3].n.m=="static"))&&(Pt.required=Ji),ee[0]&8&&Pt.value!==N[3].n.i&&V(Pt,N[3].n.i),(!Xt||ee[0]&8&&xi!==(xi=N[3].n.m=="dhcp"))&&(Nt.disabled=xi),(!Xt||ee[0]&8&&es!==(es=N[3].n.m=="static"))&&(Nt.required=es),ee[0]&8&&De(Nt,N[3].n.s),N[3].n.m=="static"?yt?yt.p(N,ee):(yt=uf(N),yt.c(),yt.m(at,Ns)):yt&&(yt.d(1),yt=null),ee[0]&8&&(Yt.checked=N[3].n.d),ee[0]&8&&(Vt.checked=N[3].n.h),ee[0]&8&&bl.value!==N[3].n.n1&&V(bl,N[3].n.n1),N[0].chip!="esp8266"?$t?$t.p(N,ee):($t=rf(N),$t.c(),$t.m(il,Ms)):$t&&($t.d(1),$t=null),ee[0]&8&&gl.value!==N[3].q.h&&V(gl,N[3].q.h),ee[0]&8&&ae(Kt.value)!==N[3].q.p&&V(Kt,N[3].q.p),N[3].q.s.e?nt?(nt.p(N,ee),ee[0]&8&&M(nt,1)):(nt=af(N),nt.c(),M(nt,1),nt.m(Ve,As)):nt&&(Se(),D(nt,1,1,()=>{nt=null}),Pe()),ee[0]&8&&kl.value!==N[3].q.u&&V(kl,N[3].q.u),ee[0]&8&&wl.value!==N[3].q.a&&V(wl,N[3].q.a),ee[0]&8&&yl.value!==N[3].q.c&&V(yl,N[3].q.c),ee[0]&8&&De(vt,N[3].q.m),ee[0]&8&&$l.value!==N[3].q.b&&V($l,N[3].q.b),N[3].q.m==3?it?(it.p(N,ee),ee[0]&8&&M(it,1)):(it=ff(N),it.c(),M(it,1),it.m(l,Ds)):it&&(Se(),D(it,1,1,()=>{it=null}),Pe()),N[3].q.m==4?st?(st.p(N,ee),ee[0]&8&&M(st,1)):(st=cf(N),st.c(),M(st,1),st.m(l,Es)):st&&(Se(),D(st,1,1,()=>{st=null}),Pe()),ee[0]&8&&(Is=N[3].p.r.startsWith("10YNO")||N[3].p.r=="10Y1001A1001A48H"),Is?ot?(ot.p(N,ee),ee[0]&8&&M(ot,1)):(ot=mf(N),ot.c(),M(ot,1),ot.m(l,Fs)):ot&&(Se(),D(ot,1,1,()=>{ot=null}),Pe()),ee[0]&136){Jn=N[7];let It;for(It=0;It20||N[0].chip=="esp8266"?ut?(ut.p(N,ee),ee[0]&1&&M(ut,1)):(ut=df(N),ut.c(),M(ut,1),ut.m(l,Rs)):ut&&(Se(),D(ut,1,1,()=>{ut=null}),Pe()),ee[0]&8&&(Qt.checked=N[3].d.s),N[3].d.s?Ct?Ct.p(N,ee):(Ct=wf(N),Ct.c(),Ct.m(Mt,null)):Ct&&(Ct.d(1),Ct=null);const ze={};ee[0]&2&&(ze.active=N[1]),Zl.$set(ze);const Sr={};ee[0]&4&&(Sr.active=N[2]),Jl.$set(Sr);const Pr={};ee[0]&16&&(Pr.active=N[4]),xl.$set(Pr);const Nr={};ee[0]&32&&(Nr.active=N[5]),en.$set(Nr)},i(N){Xt||(M(a.$$.fragment,N),M(F.$$.fragment,N),M(cn.$$.fragment,N),M(yn.$$.fragment,N),M(An.$$.fragment,N),M(In.$$.fragment,N),M(Rn.$$.fragment,N),M(nt),M(it),M(st),M(ot),M(Vn.$$.fragment,N),M(ut),M(Qn.$$.fragment,N),M(Zl.$$.fragment,N),M(Jl.$$.fragment,N),M(xl.$$.fragment,N),M(en.$$.fragment,N),Xt=!0)},o(N){D(a.$$.fragment,N),D(F.$$.fragment,N),D(cn.$$.fragment,N),D(yn.$$.fragment,N),D(An.$$.fragment,N),D(In.$$.fragment,N),D(Rn.$$.fragment,N),D(nt),D(it),D(st),D(ot),D(Vn.$$.fragment,N),D(ut),D(Qn.$$.fragment,N),D(Zl.$$.fragment,N),D(Jl.$$.fragment,N),D(xl.$$.fragment,N),D(en.$$.fragment,N),Xt=!1},d(N){N&&w(e),Z(a),Z(F),Zt(hi,N),ht&&ht.d(),bt&&bt.d(),Z(cn),Zt(bi,N),Zt(gi,N),gt&>.d(),kt&&kt.d(),wt&&wt.d(),Z(yn),Z(An),Z(In),yt&&yt.d(),Z(Rn),$t&&$t.d(),nt&&nt.d(),it&&it.d(),st&&st.d(),ot&&ot.d(),Z(Vn),Zt(_t,N),ut&&ut.d(),Z(Qn),Ct&&Ct.d(),N&&w(Us),Z(Zl,N),N&&w(Os),Z(Jl,N),N&&w(qs),Z(xl,N),N&&w(Hs),Z(en,N),js=!1,Ke(Tr)}}}async function u0(){await(await fetch("/reboot",{method:"POST"})).json()}function r0(t,e,l){let{sysinfo:n={}}=e,i=[{name:"Import gauge",key:"i"},{name:"Export gauge",key:"e"},{name:"Voltage",key:"v"},{name:"Amperage",key:"a"},{name:"Reactive",key:"r"},{name:"Realtime",key:"c"},{name:"Peaks",key:"t"},{name:"Price",key:"p"},{name:"Day plot",key:"d"},{name:"Month plot",key:"m"},{name:"Temperature plot",key:"s"}],o=!0,r=!1,a={g:{t:"",h:"",s:0,u:"",p:""},m:{b:2400,p:11,i:!1,d:0,f:0,r:0,e:{e:!1,k:"",a:""},m:{e:!1,w:!1,v:!1,a:!1,c:!1}},w:{s:"",p:"",w:0,z:255,a:!0},n:{m:"",i:"",s:"",g:"",d1:"",d2:"",d:!1,n1:"",n2:"",h:!1},q:{h:"",p:1883,u:"",a:"",b:"",s:{e:!1,c:!1,r:!0,k:!1}},o:{e:"",c:"",u1:"",u2:"",u3:""},t:{t:[0,0,0,0,0,0,0,0,0,0],h:1},p:{e:!1,t:"",r:"",c:"",m:1,f:null},d:{s:!1,t:!1,l:5},u:{i:0,e:0,v:0,a:0,r:0,c:0,t:0,p:0,d:0,m:0,s:0},i:{h:{p:null,u:!0},a:null,l:{p:null,i:!1},r:{r:null,g:null,b:null,i:!1},t:{d:null,a:null},v:{p:null,d:{v:null,g:null},o:null,m:null,b:null}},h:{t:"",h:"",n:""}};Uc.subscribe(Be=>{Be.version&&(l(3,a=Be),l(1,o=!1))}),Fp();let f=!1,c=!1;async function p(){if(confirm("Are you sure you want to factory reset the device?")){l(4,f=!0);const Be=new URLSearchParams;Be.append("perform","true");let qt=await(await fetch("/reset",{method:"POST",body:Be})).json();l(4,f=!1),l(5,c=qt.success)}}async function _(Be){l(2,r=!0);const _l=new FormData(Be.target),qt=new URLSearchParams;for(let Te of _l){const[an,Li]=Te;qt.append(an,Li)}let Ri=await(await fetch("/save",{method:"POST",body:qt})).json();Lt.update(Te=>(Te.booting=Ri.reboot,Te.ui=a.u,Te)),l(2,r=!1),ni("/")}const b=function(){confirm("Are you sure you want to reboot the device?")&&(Lt.update(Be=>(Be.booting=!0,Be)),u0())},d=function(){a.q.s.e?a.q.p==1883&&l(3,a.q.p=8883,a):a.q.p==8883&&l(3,a.q.p=1883,a)};let v=44;function g(){a.g.h=this.value,l(3,a)}function k(){a.g.t=mt(this),l(3,a)}function C(){a.p.r=mt(this),l(3,a)}function T(){a.p.c=mt(this),l(3,a)}function P(){a.p.f=ae(this.value),l(3,a)}function E(){a.p.m=ae(this.value),l(3,a)}function S(){a.p.e=this.checked,l(3,a)}function A(){a.p.t=this.value,l(3,a)}function I(){a.g.s=mt(this),l(3,a)}function F(){a.g.u=this.value,l(3,a)}function Y(){a.g.p=this.value,l(3,a)}function U(){a.m.i=this.checked,l(3,a)}function R(){a.m.b=mt(this),l(3,a)}function q(){a.m.p=mt(this),l(3,a)}function z(){a.m.s=mt(this),l(3,a)}function O(){a.m.d=mt(this),l(3,a)}function H(){a.m.f=ae(this.value),l(3,a)}function G(){a.m.r=ae(this.value),l(3,a)}function L(){a.m.e.e=this.checked,l(3,a)}function W(){a.m.e.k=this.value,l(3,a)}function j(){a.m.e.a=this.value,l(3,a)}function te(){a.m.m.e=this.checked,l(3,a)}function le(){a.m.m.w=ae(this.value),l(3,a)}function de(){a.m.m.v=ae(this.value),l(3,a)}function ie(){a.m.m.a=ae(this.value),l(3,a)}function we(){a.m.m.c=ae(this.value),l(3,a)}function Fe(){a.w.s=this.value,l(3,a)}function Ce(){a.w.p=this.value,l(3,a)}function Re(){a.w.z=mt(this),l(3,a)}function ve(){a.w.w=ae(this.value),l(3,a)}function Ne(){a.w.a=this.checked,l(3,a)}function Ee(){a.n.m=mt(this),l(3,a)}function me(){a.n.i=this.value,l(3,a)}function se(){a.n.s=mt(this),l(3,a)}function pe(){a.n.g=this.value,l(3,a)}function Q(){a.n.d1=this.value,l(3,a)}function oe(){a.n.d2=this.value,l(3,a)}function Me(){a.n.d=this.checked,l(3,a)}function Ae(){a.n.h=this.checked,l(3,a)}function he(){a.n.n1=this.value,l(3,a)}function x(){a.q.s.e=this.checked,l(3,a)}function _e(){a.q.h=this.value,l(3,a)}function Ue(){a.q.p=ae(this.value),l(3,a)}function je(){a.q.u=this.value,l(3,a)}function Xe(){a.q.a=this.value,l(3,a)}function Le(){a.q.c=this.value,l(3,a)}function He(){a.q.m=mt(this),l(3,a)}function re(){a.q.b=this.value,l(3,a)}function ge(){a.o.e=this.value,l(3,a)}function Ut(){a.o.c=this.value,l(3,a)}function Ol(){a.o.u1=this.value,l(3,a)}function xt(){a.o.u2=this.value,l(3,a)}function ft(){a.o.u3=this.value,l(3,a)}function Sl(){a.h.t=this.value,l(3,a)}function cl(){a.h.h=this.value,l(3,a)}function Ot(){a.h.n=this.value,l(3,a)}function dt(Be){a.t.t[Be]=ae(this.value),l(3,a)}function Ze(){a.t.h=ae(this.value),l(3,a)}function Je(Be){a.u[Be.key]=mt(this),l(3,a)}function xe(){a.i.h.u=this.checked,l(3,a)}function Oe(){a.i.h.p=mt(this),l(3,a)}function et(){a.i.a=ae(this.value),l(3,a)}function Ge(){a.i.l.i=this.checked,l(3,a)}function tt(){a.i.l.p=ae(this.value),l(3,a)}function lt(){a.i.r.i=this.checked,l(3,a)}function ue(){a.i.r.r=ae(this.value),l(3,a)}function be(){a.i.r.g=ae(this.value),l(3,a)}function Ni(){a.i.r.b=ae(this.value),l(3,a)}function ml(){a.i.t.d=ae(this.value),l(3,a)}function rn(){a.i.t.a=ae(this.value),l(3,a)}function Tt(){a.i.v.p=ae(this.value),l(3,a)}function Mi(){a.i.v.d.v=ae(this.value),l(3,a)}function Ai(){a.i.v.d.g=ae(this.value),l(3,a)}function Di(){a.i.v.o=ae(this.value),l(3,a)}function pl(){a.i.v.m=ae(this.value),l(3,a)}function Ei(){a.i.v.b=ae(this.value),l(3,a)}function Ii(){a.d.s=this.checked,l(3,a)}function Fi(){a.d.t=this.checked,l(3,a)}function St(){a.d.l=mt(this),l(3,a)}return t.$$set=Be=>{"sysinfo"in Be&&l(0,n=Be.sysinfo)},t.$$.update=()=>{t.$$.dirty[0]&1&&l(6,v=n.chip=="esp8266"?16:n.chip=="esp32s2"?44:39)},[n,o,r,a,f,c,v,i,p,_,b,d,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O,H,G,L,W,j,te,le,de,ie,we,Fe,Ce,Re,ve,Ne,Ee,me,se,pe,Q,oe,Me,Ae,he,x,_e,Ue,je,Xe,Le,He,re,ge,Ut,Ol,xt,ft,Sl,cl,Ot,dt,Ze,Je,xe,Oe,et,Ge,tt,lt,ue,be,Ni,ml,rn,Tt,Mi,Ai,Di,pl,Ei,Ii,Fi,St]}class a0 extends $e{constructor(e){super(),ye(this,e,r0,o0,ke,{sysinfo:0},null,[-1,-1,-1,-1])}}function $f(t,e,l){const n=t.slice();return n[20]=e[l],n}function f0(t){let e=fe(t[1].chip,t[1].board)+"",l;return{c(){l=$(e)},m(n,i){y(n,l,i)},p(n,i){i&2&&e!==(e=fe(n[1].chip,n[1].board)+"")&&B(l,e)},d(n){n&&w(l)}}}function Cf(t){let e,l,n=t[1].apmac+"",i,o,r,a,f,c,p,_,b,d=Yr(t[1])+"",v,g,k=t[1].boot_reason+"",C,T,P=t[1].ex_cause+"",E,S,A;const I=[m0,c0],F=[];function Y(U,R){return U[0].u>0?0:1}return f=Y(t),c=F[f]=I[f](t),{c(){e=m("div"),l=$("AP MAC: "),i=$(n),o=h(),r=m("div"),a=$(`Last boot: + `),c.c(),p=h(),_=m("div"),b=$("Reason: "),v=$(d),g=$(" ("),C=$(k),T=$("/"),E=$(P),S=$(")"),u(e,"class","my-2"),u(r,"class","my-2"),u(_,"class","my-2")},m(U,R){y(U,e,R),s(e,l),s(e,i),y(U,o,R),y(U,r,R),s(r,a),F[f].m(r,null),y(U,p,R),y(U,_,R),s(_,b),s(_,v),s(_,g),s(_,C),s(_,T),s(_,E),s(_,S),A=!0},p(U,R){(!A||R&2)&&n!==(n=U[1].apmac+"")&&B(i,n);let q=f;f=Y(U),f===q?F[f].p(U,R):(Se(),D(F[q],1,1,()=>{F[q]=null}),Pe(),c=F[f],c?c.p(U,R):(c=F[f]=I[f](U),c.c()),M(c,1),c.m(r,null)),(!A||R&2)&&d!==(d=Yr(U[1])+"")&&B(v,d),(!A||R&2)&&k!==(k=U[1].boot_reason+"")&&B(C,k),(!A||R&2)&&P!==(P=U[1].ex_cause+"")&&B(E,P)},i(U){A||(M(c),A=!0)},o(U){D(c),A=!1},d(U){U&&w(e),U&&w(o),U&&w(r),F[f].d(),U&&w(p),U&&w(_)}}}function c0(t){let e;return{c(){e=$("-")},m(l,n){y(l,e,n)},p:ne,i:ne,o:ne,d(l){l&&w(e)}}}function m0(t){let e,l;return e=new Fc({props:{timestamp:new Date(new Date().getTime()-t[0].u*1e3),fullTimeColor:""}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.timestamp=new Date(new Date().getTime()-n[0].u*1e3)),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function p0(t){let e;return{c(){e=m("span"),e.textContent="Update consents",u(e,"class","btn-pri-sm")},m(l,n){y(l,e,n)},p:ne,d(l){l&&w(e)}}}function Tf(t){let e,l,n,i,o,r=ks(t[1].meter.mfg)+"",a,f,c,p,_=t[1].meter.model+"",b,d,v,g,k=t[1].meter.id+"",C;return{c(){e=m("div"),l=m("strong"),l.textContent="Meter",n=h(),i=m("div"),o=$("Manufacturer: "),a=$(r),f=h(),c=m("div"),p=$("Model: "),b=$(_),d=h(),v=m("div"),g=$("ID: "),C=$(k),u(l,"class","text-sm"),u(i,"class","my-2"),u(c,"class","my-2"),u(v,"class","my-2"),u(e,"class","cnt")},m(T,P){y(T,e,P),s(e,l),s(e,n),s(e,i),s(i,o),s(i,a),s(e,f),s(e,c),s(c,p),s(c,b),s(e,d),s(e,v),s(v,g),s(v,C)},p(T,P){P&2&&r!==(r=ks(T[1].meter.mfg)+"")&&B(a,r),P&2&&_!==(_=T[1].meter.model+"")&&B(b,_),P&2&&k!==(k=T[1].meter.id+"")&&B(C,k)},d(T){T&&w(e)}}}function Sf(t){let e,l,n,i,o,r=t[1].net.ip+"",a,f,c,p,_=t[1].net.mask+"",b,d,v,g,k=t[1].net.gw+"",C,T,P,E,S=t[1].net.dns1+"",A,I,F=t[1].net.dns2&&Pf(t);return{c(){e=m("div"),l=m("strong"),l.textContent="Network",n=h(),i=m("div"),o=$("IP: "),a=$(r),f=h(),c=m("div"),p=$("Mask: "),b=$(_),d=h(),v=m("div"),g=$("Gateway: "),C=$(k),T=h(),P=m("div"),E=$("DNS: "),A=$(S),I=h(),F&&F.c(),u(l,"class","text-sm"),u(i,"class","my-2"),u(c,"class","my-2"),u(v,"class","my-2"),u(P,"class","my-2"),u(e,"class","cnt")},m(Y,U){y(Y,e,U),s(e,l),s(e,n),s(e,i),s(i,o),s(i,a),s(e,f),s(e,c),s(c,p),s(c,b),s(e,d),s(e,v),s(v,g),s(v,C),s(e,T),s(e,P),s(P,E),s(P,A),s(P,I),F&&F.m(P,null)},p(Y,U){U&2&&r!==(r=Y[1].net.ip+"")&&B(a,r),U&2&&_!==(_=Y[1].net.mask+"")&&B(b,_),U&2&&k!==(k=Y[1].net.gw+"")&&B(C,k),U&2&&S!==(S=Y[1].net.dns1+"")&&B(A,S),Y[1].net.dns2?F?F.p(Y,U):(F=Pf(Y),F.c(),F.m(P,null)):F&&(F.d(1),F=null)},d(Y){Y&&w(e),F&&F.d()}}}function Pf(t){let e,l=t[1].net.dns2+"",n;return{c(){e=$("/ "),n=$(l)},m(i,o){y(i,e,o),y(i,n,o)},p(i,o){o&2&&l!==(l=i[1].net.dns2+"")&&B(n,l)},d(i){i&&w(e),i&&w(n)}}}function Nf(t){let e,l,n,i=t[1].upgrade.t+"",o,r,a=t[1].version+"",f,c,p=t[1].upgrade.x+"",_,b,d=t[1].upgrade.e+"",v,g;return{c(){e=m("div"),l=m("div"),n=$("Previous upgrade attempt ("),o=$(i),r=$(") does not match current version ("),f=$(a),c=$(") ["),_=$(p),b=$("/"),v=$(d),g=$("]"),u(l,"class","bd-yellow"),u(e,"class","my-2")},m(k,C){y(k,e,C),s(e,l),s(l,n),s(l,o),s(l,r),s(l,f),s(l,c),s(l,_),s(l,b),s(l,v),s(l,g)},p(k,C){C&2&&i!==(i=k[1].upgrade.t+"")&&B(o,i),C&2&&a!==(a=k[1].version+"")&&B(f,a),C&2&&p!==(p=k[1].upgrade.x+"")&&B(_,p),C&2&&d!==(d=k[1].upgrade.e+"")&&B(v,d)},d(k){k&&w(e)}}}function Mf(t){let e,l,n,i=t[2].tag_name+"",o,r,a,f,c,p,_=(t[1].security==0||t[0].a)&&t[1].fwconsent===1&&t[2]&&t[2].tag_name!=t[1].version&&Af(t),b=t[1].fwconsent===2&&Df();return{c(){e=m("div"),l=$(`Latest version: + `),n=m("a"),o=$(i),a=h(),_&&_.c(),f=h(),b&&b.c(),c=We(),u(n,"href",r=t[2].html_url),u(n,"class","ml-2 text-blue-600 hover:text-blue-800"),u(n,"target","_blank"),u(n,"rel","noreferrer"),u(e,"class","my-2 flex")},m(d,v){y(d,e,v),s(e,l),s(e,n),s(n,o),s(e,a),_&&_.m(e,null),y(d,f,v),b&&b.m(d,v),y(d,c,v),p=!0},p(d,v){(!p||v&4)&&i!==(i=d[2].tag_name+"")&&B(o,i),(!p||v&4&&r!==(r=d[2].html_url))&&u(n,"href",r),(d[1].security==0||d[0].a)&&d[1].fwconsent===1&&d[2]&&d[2].tag_name!=d[1].version?_?(_.p(d,v),v&7&&M(_,1)):(_=Af(d),_.c(),M(_,1),_.m(e,null)):_&&(Se(),D(_,1,1,()=>{_=null}),Pe()),d[1].fwconsent===2?b||(b=Df(),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null)},i(d){p||(M(_),p=!0)},o(d){D(_),p=!1},d(d){d&&w(e),_&&_.d(),d&&w(f),b&&b.d(d),d&&w(c)}}}function Af(t){let e,l,n,i,o,r;return n=new Rc({}),{c(){e=m("div"),l=m("button"),J(n.$$.fragment),u(e,"class","flex-none ml-2 text-green-500"),u(e,"title","Install this version")},m(a,f){y(a,e,f),s(e,l),X(n,l,null),i=!0,o||(r=K(l,"click",t[10]),o=!0)},p:ne,i(a){i||(M(n.$$.fragment,a),i=!0)},o(a){D(n.$$.fragment,a),i=!1},d(a){a&&w(e),Z(n),o=!1,r()}}}function Df(t){let e;return{c(){e=m("div"),e.innerHTML='
You have disabled one-click firmware upgrade, link to self-upgrade is disabled
',u(e,"class","my-2")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Ef(t){let e,l=ws(fe(t[1].chip,t[1].board))+"",n;return{c(){e=m("div"),n=$(l),u(e,"class","bd-red")},m(i,o){y(i,e,o),s(e,n)},p(i,o){o&2&&l!==(l=ws(fe(i[1].chip,i[1].board))+"")&&B(n,l)},d(i){i&&w(e)}}}function If(t){let e,l,n,i,o,r;function a(p,_){return p[4].length==0?d0:_0}let f=a(t),c=f(t);return{c(){e=m("div"),l=m("form"),n=m("input"),i=h(),c.c(),Kf(n,"display","none"),u(n,"name","file"),u(n,"type","file"),u(n,"accept",".bin"),u(l,"action","/firmware"),u(l,"enctype","multipart/form-data"),u(l,"method","post"),u(l,"autocomplete","off"),u(e,"class","my-2 flex")},m(p,_){y(p,e,_),s(e,l),s(l,n),t[12](n),s(l,i),c.m(l,null),o||(r=[K(n,"change",t[13]),K(l,"submit",t[15])],o=!0)},p(p,_){f===(f=a(p))&&c?c.p(p,_):(c.d(1),c=f(p),c&&(c.c(),c.m(l,null)))},d(p){p&&w(e),t[12](null),c.d(),o=!1,Ke(r)}}}function _0(t){let e=t[4][0].name+"",l,n,i;return{c(){l=$(e),n=h(),i=m("button"),i.textContent="Upload",u(i,"type","submit"),u(i,"class","btn-pri-sm float-right")},m(o,r){y(o,l,r),y(o,n,r),y(o,i,r)},p(o,r){r&16&&e!==(e=o[4][0].name+"")&&B(l,e)},d(o){o&&w(l),o&&w(n),o&&w(i)}}}function d0(t){let e,l,n;return{c(){e=m("button"),e.textContent="Select firmware file for upgrade",u(e,"type","button"),u(e,"class","btn-pri-sm float-right")},m(i,o){y(i,e,o),l||(n=K(e,"click",t[14]),l=!0)},p:ne,d(i){i&&w(e),l=!1,n()}}}function Ff(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g=t[9],k=[];for(let S=0;S Include Secrets
(SSID, PSK, passwords and tokens)',f=h(),C&&C.c(),c=h(),p=m("form"),_=m("input"),b=h(),E.c(),u(l,"class","text-sm"),u(a,"class","my-1 mx-3 col-span-2"),u(o,"class","grid grid-cols-2"),u(i,"method","get"),u(i,"action","/configfile.cfg"),u(i,"autocomplete","off"),Kf(_,"display","none"),u(_,"name","file"),u(_,"type","file"),u(_,"accept",".cfg"),u(p,"action","/configfile"),u(p,"enctype","multipart/form-data"),u(p,"method","post"),u(p,"autocomplete","off"),u(e,"class","cnt")},m(S,A){y(S,e,A),s(e,l),s(e,n),s(e,i),s(i,o);for(let I=0;I{me=null}),Pe());const je={};_e&8388608&&(je.$$scope={dirty:_e,ctx:x}),S.$set(je),x[1].meter?se?se.p(x,_e):(se=Tf(x),se.c(),se.m(e,Y)):se&&(se.d(1),se=null),x[1].net?pe?pe.p(x,_e):(pe=Sf(x),pe.c(),pe.m(e,U)):pe&&(pe.d(1),pe=null),(!ve||_e&2)&&G!==(G=x[1].version+"")&&B(L,G),x[1].upgrade.t&&x[1].upgrade.t!=x[1].version?Q?Q.p(x,_e):(Q=Nf(x),Q.c(),Q.m(R,j)):Q&&(Q.d(1),Q=null),x[2]?oe?(oe.p(x,_e),_e&4&&M(oe,1)):(oe=Mf(x),oe.c(),M(oe,1),oe.m(R,te)):oe&&(Se(),D(oe,1,1,()=>{oe=null}),Pe()),_e&3&&(le=(x[1].security==0||x[0].a)&&ii(x[1].board)),le?Me?Me.p(x,_e):(Me=Ef(x),Me.c(),Me.m(R,de)):Me&&(Me.d(1),Me=null),x[1].security==0||x[0].a?Ae?Ae.p(x,_e):(Ae=If(x),Ae.c(),Ae.m(R,null)):Ae&&(Ae.d(1),Ae=null),x[1].security==0||x[0].a?he?he.p(x,_e):(he=Ff(x),he.c(),he.m(e,null)):he&&(he.d(1),he=null);const Xe={};_e&32&&(Xe.active=x[5]),Fe.$set(Xe);const Le={};_e&256&&(Le.active=x[8]),Re.$set(Le)},i(x){ve||(M(b.$$.fragment,x),M(me),M(S.$$.fragment,x),M(oe),M(Fe.$$.fragment,x),M(Re.$$.fragment,x),ve=!0)},o(x){D(b.$$.fragment,x),D(me),D(S.$$.fragment,x),D(oe),D(Fe.$$.fragment,x),D(Re.$$.fragment,x),ve=!1},d(x){x&&w(e),Z(b),me&&me.d(),Z(S),se&&se.d(),pe&&pe.d(),Q&&Q.d(),oe&&oe.d(),Me&&Me.d(),Ae&&Ae.d(),he&&he.d(),x&&w(we),Z(Fe,x),x&&w(Ce),Z(Re,x),Ne=!1,Ee()}}}async function g0(){await(await fetch("/reboot",{method:"POST"})).json()}function k0(t,e,l){let{data:n}=e,{sysinfo:i}=e,o=[{name:"WiFi",key:"iw"},{name:"MQTT",key:"im"},{name:"Web",key:"ie"},{name:"Meter",key:"it"},{name:"Thresholds",key:"ih"},{name:"GPIO",key:"ig"},{name:"NTP",key:"in"},{name:"Price API",key:"is"}],r={};ko.subscribe(I=>{l(2,r=Ic(i.version,I)),r||l(2,r=I[0])});function a(){confirm("Do you want to upgrade this device to "+r.tag_name+"?")&&(i.board!=2&&i.board!=4&&i.board!=7||confirm(ws(fe(i.chip,i.board))))&&(Lt.update(I=>(I.upgrading=!0,I)),Ec(r.tag_name))}const f=function(){confirm("Are you sure you want to reboot the device?")&&(Lt.update(I=>(I.booting=!0,I)),g0())};let c,p=[],_=!1,b,d=[],v=!1;ho();function g(I){bs[I?"unshift":"push"](()=>{c=I,l(3,c)})}function k(){p=this.files,l(4,p)}const C=()=>{c.click()},T=()=>l(5,_=!0);function P(I){bs[I?"unshift":"push"](()=>{b=I,l(6,b)})}function E(){d=this.files,l(7,d)}const S=()=>{b.click()},A=()=>l(8,v=!0);return t.$$set=I=>{"data"in I&&l(0,n=I.data),"sysinfo"in I&&l(1,i=I.sysinfo)},[n,i,r,c,p,_,b,d,v,o,a,f,g,k,C,T,P,E,S,A]}class w0 extends $e{constructor(e){super(),ye(this,e,k0,b0,ke,{data:0,sysinfo:1})}}function Uf(t){let e,l,n=fe(t[0],7)+"",i,o,r=fe(t[0],5)+"",a,f,c=fe(t[0],4)+"",p,_,b=fe(t[0],3)+"",d,v,g,k,C=fe(t[0],2)+"",T,P,E=fe(t[0],1)+"",S,A,I=fe(t[0],0)+"",F,Y,U,R,q=fe(t[0],101)+"",z,O,H=fe(t[0],100)+"",G;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=m("option"),a=$(r),f=m("option"),p=$(c),_=m("option"),d=$(b),v=h(),g=m("optgroup"),k=m("option"),T=$(C),P=m("option"),S=$(E),A=m("option"),F=$(I),Y=h(),U=m("optgroup"),R=m("option"),z=$(q),O=m("option"),G=$(H),l.__value=7,l.value=l.__value,o.__value=5,o.value=o.__value,f.__value=4,f.value=f.__value,_.__value=3,_.value=_.__value,u(e,"label","amsleser.no"),k.__value=2,k.value=k.__value,P.__value=1,P.value=P.__value,A.__value=0,A.value=A.__value,u(g,"label","Custom hardware"),R.__value=101,R.value=R.__value,O.__value=100,O.value=O.__value,u(U,"label","Generic hardware")},m(L,W){y(L,e,W),s(e,l),s(l,i),s(e,o),s(o,a),s(e,f),s(f,p),s(e,_),s(_,d),y(L,v,W),y(L,g,W),s(g,k),s(k,T),s(g,P),s(P,S),s(g,A),s(A,F),y(L,Y,W),y(L,U,W),s(U,R),s(R,z),s(U,O),s(O,G)},p(L,W){W&1&&n!==(n=fe(L[0],7)+"")&&B(i,n),W&1&&r!==(r=fe(L[0],5)+"")&&B(a,r),W&1&&c!==(c=fe(L[0],4)+"")&&B(p,c),W&1&&b!==(b=fe(L[0],3)+"")&&B(d,b),W&1&&C!==(C=fe(L[0],2)+"")&&B(T,C),W&1&&E!==(E=fe(L[0],1)+"")&&B(S,E),W&1&&I!==(I=fe(L[0],0)+"")&&B(F,I),W&1&&q!==(q=fe(L[0],101)+"")&&B(z,q),W&1&&H!==(H=fe(L[0],100)+"")&&B(G,H)},d(L){L&&w(e),L&&w(v),L&&w(g),L&&w(Y),L&&w(U)}}}function Of(t){let e,l,n=fe(t[0],201)+"",i,o,r=fe(t[0],202)+"",a,f,c=fe(t[0],203)+"",p,_,b=fe(t[0],200)+"",d;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=m("option"),a=$(r),f=m("option"),p=$(c),_=m("option"),d=$(b),l.__value=201,l.value=l.__value,o.__value=202,o.value=o.__value,f.__value=203,f.value=f.__value,_.__value=200,_.value=_.__value,u(e,"label","Generic hardware")},m(v,g){y(v,e,g),s(e,l),s(l,i),s(e,o),s(o,a),s(e,f),s(f,p),s(e,_),s(_,d)},p(v,g){g&1&&n!==(n=fe(v[0],201)+"")&&B(i,n),g&1&&r!==(r=fe(v[0],202)+"")&&B(a,r),g&1&&c!==(c=fe(v[0],203)+"")&&B(p,c),g&1&&b!==(b=fe(v[0],200)+"")&&B(d,b)},d(v){v&&w(e)}}}function qf(t){let e,l,n=fe(t[0],7)+"",i,o,r=fe(t[0],6)+"",a,f,c=fe(t[0],5)+"",p,_,b,d,v=fe(t[0],51)+"",g,k,C=fe(t[0],50)+"",T;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=m("option"),a=$(r),f=m("option"),p=$(c),_=h(),b=m("optgroup"),d=m("option"),g=$(v),k=m("option"),T=$(C),l.__value=7,l.value=l.__value,o.__value=6,o.value=o.__value,f.__value=5,f.value=f.__value,u(e,"label","amsleser.no"),d.__value=51,d.value=d.__value,k.__value=50,k.value=k.__value,u(b,"label","Generic hardware")},m(P,E){y(P,e,E),s(e,l),s(l,i),s(e,o),s(o,a),s(e,f),s(f,p),y(P,_,E),y(P,b,E),s(b,d),s(d,g),s(b,k),s(k,T)},p(P,E){E&1&&n!==(n=fe(P[0],7)+"")&&B(i,n),E&1&&r!==(r=fe(P[0],6)+"")&&B(a,r),E&1&&c!==(c=fe(P[0],5)+"")&&B(p,c),E&1&&v!==(v=fe(P[0],51)+"")&&B(g,v),E&1&&C!==(C=fe(P[0],50)+"")&&B(T,C)},d(P){P&&w(e),P&&w(_),P&&w(b)}}}function Hf(t){let e,l,n=fe(t[0],8)+"",i,o,r,a,f=fe(t[0],71)+"",c,p,_=fe(t[0],70)+"",b;return{c(){e=m("optgroup"),l=m("option"),i=$(n),o=h(),r=m("optgroup"),a=m("option"),c=$(f),p=m("option"),b=$(_),l.__value=8,l.value=l.__value,u(e,"label","Custom hardware"),a.__value=71,a.value=a.__value,p.__value=70,p.value=p.__value,u(r,"label","Generic hardware")},m(d,v){y(d,e,v),s(e,l),s(l,i),y(d,o,v),y(d,r,v),s(r,a),s(a,c),s(r,p),s(p,b)},p(d,v){v&1&&n!==(n=fe(d[0],8)+"")&&B(i,n),v&1&&f!==(f=fe(d[0],71)+"")&&B(c,f),v&1&&_!==(_=fe(d[0],70)+"")&&B(b,_)},d(d){d&&w(e),d&&w(o),d&&w(r)}}}function jf(t){let e,l,n=fe(t[0],200)+"",i;return{c(){e=m("optgroup"),l=m("option"),i=$(n),l.__value=200,l.value=l.__value,u(e,"label","Generic hardware")},m(o,r){y(o,e,r),s(e,l),s(l,i)},p(o,r){r&1&&n!==(n=fe(o[0],200)+"")&&B(i,n)},d(o){o&&w(e)}}}function y0(t){let e,l,n,i,o,r,a,f=t[0]=="esp8266"&&Uf(t),c=t[0]=="esp32"&&Of(t),p=t[0]=="esp32s2"&&qf(t),_=t[0]=="esp32c3"&&Hf(t),b=t[0]=="esp32solo"&&jf(t);return{c(){e=m("option"),l=h(),f&&f.c(),n=h(),c&&c.c(),i=h(),p&&p.c(),o=h(),_&&_.c(),r=h(),b&&b.c(),a=We(),e.__value=-1,e.value=e.__value},m(d,v){y(d,e,v),y(d,l,v),f&&f.m(d,v),y(d,n,v),c&&c.m(d,v),y(d,i,v),p&&p.m(d,v),y(d,o,v),_&&_.m(d,v),y(d,r,v),b&&b.m(d,v),y(d,a,v)},p(d,[v]){d[0]=="esp8266"?f?f.p(d,v):(f=Uf(d),f.c(),f.m(n.parentNode,n)):f&&(f.d(1),f=null),d[0]=="esp32"?c?c.p(d,v):(c=Of(d),c.c(),c.m(i.parentNode,i)):c&&(c.d(1),c=null),d[0]=="esp32s2"?p?p.p(d,v):(p=qf(d),p.c(),p.m(o.parentNode,o)):p&&(p.d(1),p=null),d[0]=="esp32c3"?_?_.p(d,v):(_=Hf(d),_.c(),_.m(r.parentNode,r)):_&&(_.d(1),_=null),d[0]=="esp32solo"?b?b.p(d,v):(b=jf(d),b.c(),b.m(a.parentNode,a)):b&&(b.d(1),b=null)},i:ne,o:ne,d(d){d&&w(e),d&&w(l),f&&f.d(d),d&&w(n),c&&c.d(d),d&&w(i),p&&p.d(d),d&&w(o),_&&_.d(d),d&&w(r),b&&b.d(d),d&&w(a)}}}function $0(t,e,l){let{chip:n}=e;return t.$$set=i=>{"chip"in i&&l(0,n=i.chip)},[n]}class C0 extends $e{constructor(e){super(),ye(this,e,$0,y0,ke,{chip:0})}}function Wf(t){let e;return{c(){e=m("div"),e.textContent="WARNING: Changing this configuration will affect basic configuration of your device. Only make changes here if instructed by vendor",u(e,"class","bd-red")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function Gf(t){let e,l,n,i,o,r,a;return r=new Oc({props:{chip:t[0].chip}}),{c(){e=m("div"),l=$("HAN GPIO"),n=m("br"),i=h(),o=m("select"),J(r.$$.fragment),u(o,"name","vh"),u(o,"class","in-s"),u(e,"class","my-3")},m(f,c){y(f,e,c),s(e,l),s(e,n),s(e,i),s(e,o),X(r,o,null),a=!0},p(f,c){const p={};c&1&&(p.chip=f[0].chip),r.$set(p)},i(f){a||(M(r.$$.fragment,f),a=!0)},o(f){D(r.$$.fragment,f),a=!1},d(f){f&&w(e),Z(r)}}}function T0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O=t[0].usrcfg&&Wf();v=new C0({props:{chip:t[0].chip}});let H=t[0].board&&t[0].board>20&&Gf(t);return U=new At({props:{active:t[1],message:"Saving device configuration"}}),{c(){e=m("div"),l=m("div"),n=m("form"),i=m("input"),o=h(),r=m("strong"),r.textContent="Initial configuration",a=h(),O&&O.c(),f=h(),c=m("div"),p=$("Board type"),_=m("br"),b=h(),d=m("select"),J(v.$$.fragment),g=h(),H&&H.c(),k=h(),C=m("div"),T=m("label"),P=m("input"),E=$(" Clear all other configuration"),S=h(),A=m("div"),A.innerHTML='',I=h(),F=m("span"),F.textContent="\xA0",Y=h(),J(U.$$.fragment),u(i,"type","hidden"),u(i,"name","v"),i.value="true",u(r,"class","text-sm"),u(d,"name","vb"),u(d,"class","in-s"),t[0].board===void 0&&Qe(()=>t[4].call(d)),u(c,"class","my-3"),u(P,"type","checkbox"),u(P,"name","vr"),P.__value="true",P.value=P.__value,u(P,"class","rounded mb-1"),u(C,"class","my-3"),u(A,"class","my-3"),u(F,"class","clear-both"),u(n,"autocomplete","off"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2")},m(G,L){y(G,e,L),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),s(n,a),O&&O.m(n,null),s(n,f),s(n,c),s(c,p),s(c,_),s(c,b),s(c,d),X(v,d,null),De(d,t[0].board,!0),s(n,g),H&&H.m(n,null),s(n,k),s(n,C),s(C,T),s(T,P),P.checked=t[2],s(T,E),s(n,S),s(n,A),s(n,I),s(n,F),y(G,Y,L),X(U,G,L),R=!0,q||(z=[K(d,"change",t[4]),K(P,"change",t[5]),K(n,"submit",ys(t[3]))],q=!0)},p(G,[L]){G[0].usrcfg?O||(O=Wf(),O.c(),O.m(n,f)):O&&(O.d(1),O=null);const W={};L&1&&(W.chip=G[0].chip),v.$set(W),L&1&&De(d,G[0].board),G[0].board&&G[0].board>20?H?(H.p(G,L),L&1&&M(H,1)):(H=Gf(G),H.c(),M(H,1),H.m(n,k)):H&&(Se(),D(H,1,1,()=>{H=null}),Pe()),L&4&&(P.checked=G[2]);const j={};L&2&&(j.active=G[1]),U.$set(j)},i(G){R||(M(v.$$.fragment,G),M(H),M(U.$$.fragment,G),R=!0)},o(G){D(v.$$.fragment,G),D(H),D(U.$$.fragment,G),R=!1},d(G){G&&w(e),O&&O.d(),Z(v),H&&H.d(),G&&w(Y),Z(U,G),q=!1,Ke(z)}}}function S0(t,e,l){let{sysinfo:n={}}=e,i=!1;async function o(c){l(1,i=!0);const p=new FormData(c.target),_=new URLSearchParams;for(let v of p){const[g,k]=v;_.append(g,k)}let d=await(await fetch("/save",{method:"POST",body:_})).json();l(1,i=!1),Lt.update(v=>(v.vndcfg=d.success,v.booting=d.reboot,v)),ni(n.usrcfg?"/":"/setup")}let r=!1;function a(){n.board=mt(this),l(0,n)}function f(){r=this.checked,l(2,r),l(0,n)}return t.$$set=c=>{"sysinfo"in c&&l(0,n=c.sysinfo)},t.$$.update=()=>{t.$$.dirty&1&&l(2,r=!n.usrcfg)},[n,i,r,o,a,f]}class P0 extends $e{constructor(e){super(),ye(this,e,S0,T0,ke,{sysinfo:0})}}function Bf(t){let e,l,n,i,o,r,a,f;return a=new qc({}),{c(){e=m("br"),l=h(),n=m("div"),i=m("input"),o=h(),r=m("select"),J(a.$$.fragment),u(i,"name","si"),u(i,"type","text"),u(i,"class","in-f w-full"),i.required=t[1],u(r,"name","su"),u(r,"class","in-l"),r.required=t[1],u(n,"class","flex")},m(c,p){y(c,e,p),y(c,l,p),y(c,n,p),s(n,i),s(n,o),s(n,r),X(a,r,null),f=!0},p(c,p){(!f||p&2)&&(i.required=c[1]),(!f||p&2)&&(r.required=c[1])},i(c){f||(M(a.$$.fragment,c),f=!0)},o(c){D(a.$$.fragment,c),f=!1},d(c){c&&w(e),c&&w(l),c&&w(n),Z(a)}}}function zf(t){let e;return{c(){e=m("div"),e.innerHTML=`
Gateway
DNS
-
`,u(e,"class","my-3 flex")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function h0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y=t[1]&&Of(t),U=t[1]&&Uf();return z=new Mt({props:{active:t[2],message:"Saving your configuration to the device"}}),{c(){e=m("div"),l=m("div"),n=m("form"),i=m("input"),o=h(),r=m("strong"),r.textContent="Setup",a=h(),f=m("div"),f.innerHTML=`SSID
+
`,u(e,"class","my-3 flex")},m(l,n){y(l,e,n)},d(l){l&&w(e)}}}function N0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z=t[1]&&Bf(t),O=t[1]&&zf();return Y=new At({props:{active:t[2],message:"Saving your configuration to the device"}}),{c(){e=m("div"),l=m("div"),n=m("form"),i=m("input"),o=h(),r=m("strong"),r.textContent="Setup",a=h(),f=m("div"),f.innerHTML=`SSID
`,c=h(),p=m("div"),p.innerHTML=`PSK
`,_=h(),b=m("div"),d=$(`Hostname - `),v=m("input"),g=h(),k=m("div"),C=m("label"),T=m("input"),P=$(" Static IP"),E=h(),Y&&Y.c(),S=h(),U&&U.c(),M=h(),I=m("div"),I.innerHTML='',F=h(),J(z.$$.fragment),u(i,"type","hidden"),u(i,"name","s"),i.value="true",u(r,"class","text-sm"),u(f,"class","my-3"),u(p,"class","my-3"),u(v,"name","sh"),u(v,"type","text"),u(v,"class","in-s"),u(v,"maxlength","32"),u(v,"pattern","[a-z0-9_-]+"),u(v,"placeholder","Optional, ex.: ams-reader"),u(v,"autocomplete","off"),u(T,"type","checkbox"),u(T,"name","sm"),T.__value="static",T.value=T.__value,u(T,"class","rounded mb-1"),u(k,"class","my-3"),u(I,"class","my-3"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2")},m(H,G){y(H,e,G),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),s(n,a),s(n,f),s(n,c),s(n,p),s(n,_),s(n,b),s(b,d),s(b,v),V(v,t[0].hostname),s(n,g),s(n,k),s(k,C),s(C,T),T.checked=t[1],s(C,P),s(k,E),Y&&Y.m(k,null),s(n,S),U&&U.m(n,null),s(n,M),s(n,I),y(H,F,G),X(z,H,G),O=!0,R||(q=[K(v,"input",t[4]),K(T,"change",t[5]),K(n,"submit",bs(t[3]))],R=!0)},p(H,[G]){G&1&&v.value!==H[0].hostname&&V(v,H[0].hostname),G&2&&(T.checked=H[1]),H[1]?Y?(Y.p(H,G),G&2&&N(Y,1)):(Y=Of(H),Y.c(),N(Y,1),Y.m(k,null)):Y&&(Te(),D(Y,1,1,()=>{Y=null}),Se()),H[1]?U||(U=Uf(),U.c(),U.m(n,M)):U&&(U.d(1),U=null);const L={};G&4&&(L.active=H[2]),z.$set(L)},i(H){O||(N(Y),N(z.$$.fragment,H),O=!0)},o(H){D(Y),D(z.$$.fragment,H),O=!1},d(H){H&&w(e),Y&&Y.d(),U&&U.d(),H&&w(F),Z(z,H),R=!1,Ve(q)}}}function b0(t,e,l){let{sysinfo:n={}}=e,i=!1,o=!1,r=0;function a(){var _="";r++;var b=function(){setTimeout(a,1e3)};if(n.net.ip&&r%3==0){if(!n.net.ip){b();return}_="http://"+n.net.ip}else n.hostname&&r%3==1?_="http://"+n.hostname:n.hostname&&r%3==2?_="http://"+n.hostname+".local":_="";console&&console.log("Trying url "+_),Rt.update(v=>(v.trying=_,v));var d=new XMLHttpRequest;d.timeout=5e3,d.addEventListener("abort",b),d.addEventListener("error",b),d.addEventListener("timeout",b),d.addEventListener("load",function(v){window.location.href=_||"/"}),d.open("GET",_+"/is-alive",!0),d.send()}async function f(_){l(2,o=!0);const b=new FormData(_.target),d=new URLSearchParams;for(let k of b){const[C,T]=k;d.append(C,T)}let g=await(await fetch("/save",{method:"POST",body:d})).json();l(2,o=!1),Rt.update(k=>(k.hostname=b.get("sh"),k.usrcfg=g.success,k.booting=g.reboot,i&&(k.net.ip=b.get("si"),k.net.mask=b.get("su"),k.net.gw=b.get("sg"),k.net.dns1=b.get("sd")),setTimeout(a,5e3),k))}function c(){n.hostname=this.value,l(0,n)}function p(){i=this.checked,l(1,i)}return t.$$set=_=>{"sysinfo"in _&&l(0,n=_.sysinfo)},[n,i,o,f,c,p]}class g0 extends $e{constructor(e){super(),ye(this,e,b0,h0,ke,{sysinfo:0})}}function k0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C;return v=new Mt({props:{active:t[2],message:"Uploading file, please wait"}}),{c(){e=m("div"),l=m("div"),n=m("strong"),i=$("Upload "),o=$(t[1]),r=h(),a=m("p"),a.textContent="Select a suitable file and click upload",f=h(),c=m("form"),p=m("input"),_=h(),b=m("div"),b.innerHTML='',d=h(),J(v.$$.fragment),u(a,"class","mb-4"),u(p,"name","file"),u(p,"type","file"),u(b,"class","w-full text-right mt-4"),u(c,"action",t[0]),u(c,"enctype","multipart/form-data"),u(c,"method","post"),u(c,"autocomplete","off"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-4 lg:grid-cols-2 md:grid-cols-2")},m(T,P){y(T,e,P),s(e,l),s(l,n),s(n,i),s(n,o),s(l,r),s(l,a),s(l,f),s(l,c),s(c,p),s(c,_),s(c,b),y(T,d,P),X(v,T,P),g=!0,k||(C=K(c,"submit",t[3]),k=!0)},p(T,[P]){(!g||P&2)&&B(o,T[1]),(!g||P&1)&&u(c,"action",T[0]);const E={};P&4&&(E.active=T[2]),v.$set(E)},i(T){g||(N(v.$$.fragment,T),g=!0)},o(T){D(v.$$.fragment,T),g=!1},d(T){T&&w(e),T&&w(d),Z(v,T),k=!1,C()}}}function w0(t,e,l){let{action:n}=e,{title:i}=e,o=!1;const r=()=>l(2,o=!0);return t.$$set=a=>{"action"in a&&l(0,n=a.action),"title"in a&&l(1,i=a.title)},[n,i,o,r]}class vo extends $e{constructor(e){super(),ye(this,e,w0,k0,ke,{action:0,title:1})}}function y0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,M,I,F,z,O,R,q,Y,U,H;return q=new Mt({props:{active:t[1],message:"Saving preferences"}}),{c(){e=m("div"),l=m("div"),n=m("form"),i=m("div"),i.textContent="Various permissions we need to do stuff:",o=h(),r=m("hr"),a=h(),f=m("div"),c=$("Enable one-click upgrade? (implies data collection)"),p=m("br"),_=h(),b=m("a"),d=$("Read more"),v=m("br"),g=h(),k=m("label"),C=m("input"),P=$(" Yes"),E=m("label"),S=m("input"),I=$(" No"),F=m("br"),z=h(),O=m("div"),O.innerHTML='',R=h(),J(q.$$.fragment),u(b,"href",Ft("Data-collection-on-one-click-firmware-upgrade")),u(b,"target","_blank"),u(b,"class","text-blue-600 hover:text-blue-800"),u(C,"type","radio"),u(C,"name","sf"),C.value=1,C.checked=T=t[0].fwconsent===1,u(C,"class","rounded m-2"),C.required=!0,u(S,"type","radio"),u(S,"name","sf"),S.value=2,S.checked=M=t[0].fwconsent===2,u(S,"class","rounded m-2"),S.required=!0,u(f,"class","my-3"),u(O,"class","my-3"),u(n,"autocomplete","off"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-3 lg:grid-cols-2")},m(G,L){y(G,e,L),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),s(n,a),s(n,f),s(f,c),s(f,p),s(f,_),s(f,b),s(b,d),s(f,v),s(f,g),s(f,k),s(k,C),s(k,P),s(f,E),s(E,S),s(E,I),s(f,F),s(n,z),s(n,O),y(G,R,L),X(q,G,L),Y=!0,U||(H=K(n,"submit",bs(t[2])),U=!0)},p(G,[L]){(!Y||L&1&&T!==(T=G[0].fwconsent===1))&&(C.checked=T),(!Y||L&1&&M!==(M=G[0].fwconsent===2))&&(S.checked=M);const W={};L&2&&(W.active=G[1]),q.$set(W)},i(G){Y||(N(q.$$.fragment,G),Y=!0)},o(G){D(q.$$.fragment,G),Y=!1},d(G){G&&w(e),G&&w(R),Z(q,G),U=!1,H()}}}function $0(t,e,l){let{sysinfo:n={}}=e,i=!1;async function o(r){l(1,i=!0);const a=new FormData(r.target),f=new URLSearchParams;for(let _ of a){const[b,d]=_;f.append(b,d)}let p=await(await fetch("/save",{method:"POST",body:f})).json();l(1,i=!1),Rt.update(_=>(_.fwconsent=a.sf===!0?1:a.sf===!1?2:0,_.booting=p.reboot,_)),ni("/")}return t.$$set=r=>{"sysinfo"in r&&l(0,n=r.sysinfo)},[n,i,o]}class C0 extends $e{constructor(e){super(),ye(this,e,$0,y0,ke,{sysinfo:0})}}function T0(t){let e,l;return e=new Cp({props:{data:t[1],sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&2&&(o.data=n[1]),i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function S0(t){let e,l;return e=new Jp({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function P0(t){let e,l;return e=new f0({props:{sysinfo:t[0],data:t[1]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),i&2&&(o.data=n[1]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function N0(t){let e,l;return e=new vo({props:{title:"CA",action:"/mqtt-ca"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function M0(t){let e,l;return e=new vo({props:{title:"certificate",action:"/mqtt-cert"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function A0(t){let e,l;return e=new vo({props:{title:"private key",action:"/mqtt-key"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function D0(t){let e,l;return e=new C0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function E0(t){let e,l;return e=new g0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function I0(t){let e,l;return e=new v0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function F0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E;return e=new Um({props:{data:t[1]}}),n=new wl({props:{path:"/",$$slots:{default:[T0]},$$scope:{ctx:t}}}),o=new wl({props:{path:"/configuration",$$slots:{default:[S0]},$$scope:{ctx:t}}}),a=new wl({props:{path:"/status",$$slots:{default:[P0]},$$scope:{ctx:t}}}),c=new wl({props:{path:"/mqtt-ca",$$slots:{default:[N0]},$$scope:{ctx:t}}}),_=new wl({props:{path:"/mqtt-cert",$$slots:{default:[M0]},$$scope:{ctx:t}}}),d=new wl({props:{path:"/mqtt-key",$$slots:{default:[A0]},$$scope:{ctx:t}}}),g=new wl({props:{path:"/consent",$$slots:{default:[D0]},$$scope:{ctx:t}}}),C=new wl({props:{path:"/setup",$$slots:{default:[E0]},$$scope:{ctx:t}}}),P=new wl({props:{path:"/vendor",$$slots:{default:[I0]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment),l=h(),J(n.$$.fragment),i=h(),J(o.$$.fragment),r=h(),J(a.$$.fragment),f=h(),J(c.$$.fragment),p=h(),J(_.$$.fragment),b=h(),J(d.$$.fragment),v=h(),J(g.$$.fragment),k=h(),J(C.$$.fragment),T=h(),J(P.$$.fragment)},m(S,M){X(e,S,M),y(S,l,M),X(n,S,M),y(S,i,M),X(o,S,M),y(S,r,M),X(a,S,M),y(S,f,M),X(c,S,M),y(S,p,M),X(_,S,M),y(S,b,M),X(d,S,M),y(S,v,M),X(g,S,M),y(S,k,M),X(C,S,M),y(S,T,M),X(P,S,M),E=!0},p(S,M){const I={};M&2&&(I.data=S[1]),e.$set(I);const F={};M&7&&(F.$$scope={dirty:M,ctx:S}),n.$set(F);const z={};M&5&&(z.$$scope={dirty:M,ctx:S}),o.$set(z);const O={};M&7&&(O.$$scope={dirty:M,ctx:S}),a.$set(O);const R={};M&4&&(R.$$scope={dirty:M,ctx:S}),c.$set(R);const q={};M&4&&(q.$$scope={dirty:M,ctx:S}),_.$set(q);const Y={};M&4&&(Y.$$scope={dirty:M,ctx:S}),d.$set(Y);const U={};M&5&&(U.$$scope={dirty:M,ctx:S}),g.$set(U);const H={};M&5&&(H.$$scope={dirty:M,ctx:S}),C.$set(H);const G={};M&5&&(G.$$scope={dirty:M,ctx:S}),P.$set(G)},i(S){E||(N(e.$$.fragment,S),N(n.$$.fragment,S),N(o.$$.fragment,S),N(a.$$.fragment,S),N(c.$$.fragment,S),N(_.$$.fragment,S),N(d.$$.fragment,S),N(g.$$.fragment,S),N(C.$$.fragment,S),N(P.$$.fragment,S),E=!0)},o(S){D(e.$$.fragment,S),D(n.$$.fragment,S),D(o.$$.fragment,S),D(a.$$.fragment,S),D(c.$$.fragment,S),D(_.$$.fragment,S),D(d.$$.fragment,S),D(g.$$.fragment,S),D(C.$$.fragment,S),D(P.$$.fragment,S),E=!1},d(S){Z(e,S),S&&w(l),Z(n,S),S&&w(i),Z(o,S),S&&w(r),Z(a,S),S&&w(f),Z(c,S),S&&w(p),Z(_,S),S&&w(b),Z(d,S),S&&w(v),Z(g,S),S&&w(k),Z(C,S),S&&w(T),Z(P,S)}}}function R0(t){let e,l,n,i;const o=[U0,O0],r=[];function a(f,c){return f[0].trying?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=Ge()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e===p?r[e].p(f,c):(Te(),D(r[p],1,1,()=>{r[p]=null}),Se(),l=r[e],l?l.p(f,c):(l=r[e]=o[e](f),l.c()),N(l,1),l.m(n.parentNode,n))},i(f){i||(N(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function L0(t){let e,l;return e=new Mt({props:{active:"true",message:"Device is upgrading, please wait"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function O0(t){let e,l;return e=new Mt({props:{active:"true",message:"Device is booting, please wait"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function U0(t){let e,l;return e=new Mt({props:{active:"true",message:"Device is booting, please wait. Trying to reach it on "+t[0].trying}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.message="Device is booting, please wait. Trying to reach it on "+n[0].trying),e.$set(o)},i(n){l||(N(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function q0(t){let e,l,n,i,o,r;l=new mc({props:{$$slots:{default:[F0]},$$scope:{ctx:t}}});const a=[L0,R0],f=[];function c(p,_){return p[0].upgrading?0:p[0].booting?1:-1}return~(i=c(t))&&(o=f[i]=a[i](t)),{c(){e=m("div"),J(l.$$.fragment),n=h(),o&&o.c(),u(e,"class","container mx-auto m-3")},m(p,_){y(p,e,_),X(l,e,null),s(e,n),~i&&f[i].m(e,null),r=!0},p(p,[_]){const b={};_&7&&(b.$$scope={dirty:_,ctx:p}),l.$set(b);let d=i;i=c(p),i===d?~i&&f[i].p(p,_):(o&&(Te(),D(f[d],1,1,()=>{f[d]=null}),Se()),~i?(o=f[i],o?o.p(p,_):(o=f[i]=a[i](p),o.c()),N(o,1),o.m(e,null)):o=null)},i(p){r||(N(l.$$.fragment,p),N(o),r=!0)},o(p){D(l.$$.fragment,p),D(o),r=!1},d(p){p&&w(e),Z(l),~i&&f[i].d()}}}function H0(t,e,l){let n={};Rt.subscribe(o=>{l(0,n=o),n.vndcfg===!1?ni("/vendor"):n.usrcfg===!1?ni("/setup"):n.fwconsent===0&&ni("/consent")}),co();let i={};return sm.subscribe(o=>{l(1,i=o)}),[n,i]}class j0 extends $e{constructor(e){super(),ye(this,e,H0,q0,ke,{})}}new j0({target:document.getElementById("app")}); + `),v=m("input"),g=h(),k=m("div"),C=m("label"),T=m("input"),P=$(" Static IP"),E=h(),z&&z.c(),S=h(),O&&O.c(),A=h(),I=m("div"),I.innerHTML='',F=h(),J(Y.$$.fragment),u(i,"type","hidden"),u(i,"name","s"),i.value="true",u(r,"class","text-sm"),u(f,"class","my-3"),u(p,"class","my-3"),u(v,"name","sh"),u(v,"type","text"),u(v,"class","in-s"),u(v,"maxlength","32"),u(v,"pattern","[a-z0-9_-]+"),u(v,"placeholder","Optional, ex.: ams-reader"),u(v,"autocomplete","off"),u(T,"type","checkbox"),u(T,"name","sm"),T.__value="static",T.value=T.__value,u(T,"class","rounded mb-1"),u(k,"class","my-3"),u(I,"class","my-3"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2")},m(H,G){y(H,e,G),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),s(n,a),s(n,f),s(n,c),s(n,p),s(n,_),s(n,b),s(b,d),s(b,v),V(v,t[0].hostname),s(n,g),s(n,k),s(k,C),s(C,T),T.checked=t[1],s(C,P),s(k,E),z&&z.m(k,null),s(n,S),O&&O.m(n,null),s(n,A),s(n,I),y(H,F,G),X(Y,H,G),U=!0,R||(q=[K(v,"input",t[4]),K(T,"change",t[5]),K(n,"submit",ys(t[3]))],R=!0)},p(H,[G]){G&1&&v.value!==H[0].hostname&&V(v,H[0].hostname),G&2&&(T.checked=H[1]),H[1]?z?(z.p(H,G),G&2&&M(z,1)):(z=Bf(H),z.c(),M(z,1),z.m(k,null)):z&&(Se(),D(z,1,1,()=>{z=null}),Pe()),H[1]?O||(O=zf(),O.c(),O.m(n,A)):O&&(O.d(1),O=null);const L={};G&4&&(L.active=H[2]),Y.$set(L)},i(H){U||(M(z),M(Y.$$.fragment,H),U=!0)},o(H){D(z),D(Y.$$.fragment,H),U=!1},d(H){H&&w(e),z&&z.d(),O&&O.d(),H&&w(F),Z(Y,H),R=!1,Ke(q)}}}function M0(t,e,l){let{sysinfo:n={}}=e,i=!1,o=!1,r=0;function a(){var _="";r++;var b=function(){setTimeout(a,1e3)};if(n.net.ip&&r%3==0){if(!n.net.ip){b();return}_="http://"+n.net.ip}else n.hostname&&r%3==1?_="http://"+n.hostname:n.hostname&&r%3==2?_="http://"+n.hostname+".local":_="";console&&console.log("Trying url "+_),Lt.update(v=>(v.trying=_,v));var d=new XMLHttpRequest;d.timeout=5e3,d.addEventListener("abort",b),d.addEventListener("error",b),d.addEventListener("timeout",b),d.addEventListener("load",function(v){window.location.href=_||"/"}),d.open("GET",_+"/is-alive",!0),d.send()}async function f(_){l(2,o=!0);const b=new FormData(_.target),d=new URLSearchParams;for(let k of b){const[C,T]=k;d.append(C,T)}let g=await(await fetch("/save",{method:"POST",body:d})).json();l(2,o=!1),Lt.update(k=>(k.hostname=b.get("sh"),k.usrcfg=g.success,k.booting=g.reboot,i&&(k.net.ip=b.get("si"),k.net.mask=b.get("su"),k.net.gw=b.get("sg"),k.net.dns1=b.get("sd")),setTimeout(a,5e3),k))}function c(){n.hostname=this.value,l(0,n)}function p(){i=this.checked,l(1,i)}return t.$$set=_=>{"sysinfo"in _&&l(0,n=_.sysinfo)},[n,i,o,f,c,p]}class A0 extends $e{constructor(e){super(),ye(this,e,M0,N0,ke,{sysinfo:0})}}function D0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C;return v=new At({props:{active:t[2],message:"Uploading file, please wait"}}),{c(){e=m("div"),l=m("div"),n=m("strong"),i=$("Upload "),o=$(t[1]),r=h(),a=m("p"),a.textContent="Select a suitable file and click upload",f=h(),c=m("form"),p=m("input"),_=h(),b=m("div"),b.innerHTML='',d=h(),J(v.$$.fragment),u(a,"class","mb-4"),u(p,"name","file"),u(p,"type","file"),u(b,"class","w-full text-right mt-4"),u(c,"action",t[0]),u(c,"enctype","multipart/form-data"),u(c,"method","post"),u(c,"autocomplete","off"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-4 lg:grid-cols-2 md:grid-cols-2")},m(T,P){y(T,e,P),s(e,l),s(l,n),s(n,i),s(n,o),s(l,r),s(l,a),s(l,f),s(l,c),s(c,p),s(c,_),s(c,b),y(T,d,P),X(v,T,P),g=!0,k||(C=K(c,"submit",t[3]),k=!0)},p(T,[P]){(!g||P&2)&&B(o,T[1]),(!g||P&1)&&u(c,"action",T[0]);const E={};P&4&&(E.active=T[2]),v.$set(E)},i(T){g||(M(v.$$.fragment,T),g=!0)},o(T){D(v.$$.fragment,T),g=!1},d(T){T&&w(e),T&&w(d),Z(v,T),k=!1,C()}}}function E0(t,e,l){let{action:n}=e,{title:i}=e,o=!1;const r=()=>l(2,o=!0);return t.$$set=a=>{"action"in a&&l(0,n=a.action),"title"in a&&l(1,i=a.title)},[n,i,o,r]}class wo extends $e{constructor(e){super(),ye(this,e,E0,D0,ke,{action:0,title:1})}}function I0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E,S,A,I,F,Y,U,R,q,z,O,H;return q=new At({props:{active:t[1],message:"Saving preferences"}}),{c(){e=m("div"),l=m("div"),n=m("form"),i=m("div"),i.textContent="Various permissions we need to do stuff:",o=h(),r=m("hr"),a=h(),f=m("div"),c=$("Enable one-click upgrade? (implies data collection)"),p=m("br"),_=h(),b=m("a"),d=$("Read more"),v=m("br"),g=h(),k=m("label"),C=m("input"),P=$(" Yes"),E=m("label"),S=m("input"),I=$(" No"),F=m("br"),Y=h(),U=m("div"),U.innerHTML='',R=h(),J(q.$$.fragment),u(b,"href",Rt("Data-collection-on-one-click-firmware-upgrade")),u(b,"target","_blank"),u(b,"class","text-blue-600 hover:text-blue-800"),u(C,"type","radio"),u(C,"name","sf"),C.value=1,C.checked=T=t[0].fwconsent===1,u(C,"class","rounded m-2"),C.required=!0,u(S,"type","radio"),u(S,"name","sf"),S.value=2,S.checked=A=t[0].fwconsent===2,u(S,"class","rounded m-2"),S.required=!0,u(f,"class","my-3"),u(U,"class","my-3"),u(n,"autocomplete","off"),u(l,"class","cnt"),u(e,"class","grid xl:grid-cols-3 lg:grid-cols-2")},m(G,L){y(G,e,L),s(e,l),s(l,n),s(n,i),s(n,o),s(n,r),s(n,a),s(n,f),s(f,c),s(f,p),s(f,_),s(f,b),s(b,d),s(f,v),s(f,g),s(f,k),s(k,C),s(k,P),s(f,E),s(E,S),s(E,I),s(f,F),s(n,Y),s(n,U),y(G,R,L),X(q,G,L),z=!0,O||(H=K(n,"submit",ys(t[2])),O=!0)},p(G,[L]){(!z||L&1&&T!==(T=G[0].fwconsent===1))&&(C.checked=T),(!z||L&1&&A!==(A=G[0].fwconsent===2))&&(S.checked=A);const W={};L&2&&(W.active=G[1]),q.$set(W)},i(G){z||(M(q.$$.fragment,G),z=!0)},o(G){D(q.$$.fragment,G),z=!1},d(G){G&&w(e),G&&w(R),Z(q,G),O=!1,H()}}}function F0(t,e,l){let{sysinfo:n={}}=e,i=!1;async function o(r){l(1,i=!0);const a=new FormData(r.target),f=new URLSearchParams;for(let _ of a){const[b,d]=_;f.append(b,d)}let p=await(await fetch("/save",{method:"POST",body:f})).json();l(1,i=!1),Lt.update(_=>(_.fwconsent=a.sf===!0?1:a.sf===!1?2:0,_.booting=p.reboot,_)),ni("/")}return t.$$set=r=>{"sysinfo"in r&&l(0,n=r.sysinfo)},[n,i,o]}class R0 extends $e{constructor(e){super(),ye(this,e,F0,I0,ke,{sysinfo:0})}}function L0(t){let e,l;return e=new Ip({props:{data:t[1],sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&2&&(o.data=n[1]),i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function U0(t){let e,l;return e=new a0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function O0(t){let e,l;return e=new w0({props:{sysinfo:t[0],data:t[1]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),i&2&&(o.data=n[1]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function q0(t){let e,l;return e=new wo({props:{title:"CA",action:"/mqtt-ca"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function H0(t){let e,l;return e=new wo({props:{title:"certificate",action:"/mqtt-cert"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function j0(t){let e,l;return e=new wo({props:{title:"private key",action:"/mqtt-key"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function W0(t){let e,l;return e=new R0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function G0(t){let e,l;return e=new A0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function B0(t){let e,l;return e=new P0({props:{sysinfo:t[0]}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.sysinfo=n[0]),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function z0(t){let e,l,n,i,o,r,a,f,c,p,_,b,d,v,g,k,C,T,P,E;return e=new Vm({props:{data:t[1]}}),n=new Cl({props:{path:"/",$$slots:{default:[L0]},$$scope:{ctx:t}}}),o=new Cl({props:{path:"/configuration",$$slots:{default:[U0]},$$scope:{ctx:t}}}),a=new Cl({props:{path:"/status",$$slots:{default:[O0]},$$scope:{ctx:t}}}),c=new Cl({props:{path:"/mqtt-ca",$$slots:{default:[q0]},$$scope:{ctx:t}}}),_=new Cl({props:{path:"/mqtt-cert",$$slots:{default:[H0]},$$scope:{ctx:t}}}),d=new Cl({props:{path:"/mqtt-key",$$slots:{default:[j0]},$$scope:{ctx:t}}}),g=new Cl({props:{path:"/consent",$$slots:{default:[W0]},$$scope:{ctx:t}}}),C=new Cl({props:{path:"/setup",$$slots:{default:[G0]},$$scope:{ctx:t}}}),P=new Cl({props:{path:"/vendor",$$slots:{default:[B0]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment),l=h(),J(n.$$.fragment),i=h(),J(o.$$.fragment),r=h(),J(a.$$.fragment),f=h(),J(c.$$.fragment),p=h(),J(_.$$.fragment),b=h(),J(d.$$.fragment),v=h(),J(g.$$.fragment),k=h(),J(C.$$.fragment),T=h(),J(P.$$.fragment)},m(S,A){X(e,S,A),y(S,l,A),X(n,S,A),y(S,i,A),X(o,S,A),y(S,r,A),X(a,S,A),y(S,f,A),X(c,S,A),y(S,p,A),X(_,S,A),y(S,b,A),X(d,S,A),y(S,v,A),X(g,S,A),y(S,k,A),X(C,S,A),y(S,T,A),X(P,S,A),E=!0},p(S,A){const I={};A&2&&(I.data=S[1]),e.$set(I);const F={};A&7&&(F.$$scope={dirty:A,ctx:S}),n.$set(F);const Y={};A&5&&(Y.$$scope={dirty:A,ctx:S}),o.$set(Y);const U={};A&7&&(U.$$scope={dirty:A,ctx:S}),a.$set(U);const R={};A&4&&(R.$$scope={dirty:A,ctx:S}),c.$set(R);const q={};A&4&&(q.$$scope={dirty:A,ctx:S}),_.$set(q);const z={};A&4&&(z.$$scope={dirty:A,ctx:S}),d.$set(z);const O={};A&5&&(O.$$scope={dirty:A,ctx:S}),g.$set(O);const H={};A&5&&(H.$$scope={dirty:A,ctx:S}),C.$set(H);const G={};A&5&&(G.$$scope={dirty:A,ctx:S}),P.$set(G)},i(S){E||(M(e.$$.fragment,S),M(n.$$.fragment,S),M(o.$$.fragment,S),M(a.$$.fragment,S),M(c.$$.fragment,S),M(_.$$.fragment,S),M(d.$$.fragment,S),M(g.$$.fragment,S),M(C.$$.fragment,S),M(P.$$.fragment,S),E=!0)},o(S){D(e.$$.fragment,S),D(n.$$.fragment,S),D(o.$$.fragment,S),D(a.$$.fragment,S),D(c.$$.fragment,S),D(_.$$.fragment,S),D(d.$$.fragment,S),D(g.$$.fragment,S),D(C.$$.fragment,S),D(P.$$.fragment,S),E=!1},d(S){Z(e,S),S&&w(l),Z(n,S),S&&w(i),Z(o,S),S&&w(r),Z(a,S),S&&w(f),Z(c,S),S&&w(p),Z(_,S),S&&w(b),Z(d,S),S&&w(v),Z(g,S),S&&w(k),Z(C,S),S&&w(T),Z(P,S)}}}function Y0(t){let e,l,n,i;const o=[Q0,K0],r=[];function a(f,c){return f[0].trying?0:1}return e=a(t),l=r[e]=o[e](t),{c(){l.c(),n=We()},m(f,c){r[e].m(f,c),y(f,n,c),i=!0},p(f,c){let p=e;e=a(f),e===p?r[e].p(f,c):(Se(),D(r[p],1,1,()=>{r[p]=null}),Pe(),l=r[e],l?l.p(f,c):(l=r[e]=o[e](f),l.c()),M(l,1),l.m(n.parentNode,n))},i(f){i||(M(l),i=!0)},o(f){D(l),i=!1},d(f){r[e].d(f),f&&w(n)}}}function V0(t){let e,l;return e=new At({props:{active:"true",message:"Device is upgrading, please wait"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function K0(t){let e,l;return e=new At({props:{active:"true",message:"Device is booting, please wait"}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p:ne,i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function Q0(t){let e,l;return e=new At({props:{active:"true",message:"Device is booting, please wait. Trying to reach it on "+t[0].trying}}),{c(){J(e.$$.fragment)},m(n,i){X(e,n,i),l=!0},p(n,i){const o={};i&1&&(o.message="Device is booting, please wait. Trying to reach it on "+n[0].trying),e.$set(o)},i(n){l||(M(e.$$.fragment,n),l=!0)},o(n){D(e.$$.fragment,n),l=!1},d(n){Z(e,n)}}}function X0(t){let e,l,n,i,o,r;l=new gc({props:{$$slots:{default:[z0]},$$scope:{ctx:t}}});const a=[V0,Y0],f=[];function c(p,_){return p[0].upgrading?0:p[0].booting?1:-1}return~(i=c(t))&&(o=f[i]=a[i](t)),{c(){e=m("div"),J(l.$$.fragment),n=h(),o&&o.c(),u(e,"class","container mx-auto m-3")},m(p,_){y(p,e,_),X(l,e,null),s(e,n),~i&&f[i].m(e,null),r=!0},p(p,[_]){const b={};_&7&&(b.$$scope={dirty:_,ctx:p}),l.$set(b);let d=i;i=c(p),i===d?~i&&f[i].p(p,_):(o&&(Se(),D(f[d],1,1,()=>{f[d]=null}),Pe()),~i?(o=f[i],o?o.p(p,_):(o=f[i]=a[i](p),o.c()),M(o,1),o.m(e,null)):o=null)},i(p){r||(M(l.$$.fragment,p),M(o),r=!0)},o(p){D(l.$$.fragment,p),D(o),r=!1},d(p){p&&w(e),Z(l),~i&&f[i].d()}}}function Z0(t,e,l){let n={};Lt.subscribe(o=>{l(0,n=o),n.vndcfg===!1?ni("/vendor"):n.usrcfg===!1?ni("/setup"):n.fwconsent===0&&ni("/consent")}),ho();let i={};return _m.subscribe(o=>{l(1,i=o)}),[n,i]}class J0 extends $e{constructor(e){super(),ye(this,e,Z0,X0,ke,{})}}new J0({target:document.getElementById("app")}); diff --git a/lib/SvelteUi/app/package-lock.json b/lib/SvelteUi/app/package-lock.json index 22904cb0..7a0d0c0d 100644 --- a/lib/SvelteUi/app/package-lock.json +++ b/lib/SvelteUi/app/package-lock.json @@ -24,6 +24,18 @@ "vite": "^3.2.7" } }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.15.18", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", @@ -56,6 +68,60 @@ "node": ">=12" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -91,44 +157,25 @@ "node": ">= 8" } }, - "node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - } - }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.4.tgz", - "integrity": "sha512-UZco2fdj0OVuRWC0SUJjEOftITc2IeHLFJNp00ym9MuQ9dShnlO4P29G8KUxRlcS7kSpzHuko6eCR9MOALj7lQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.4.0.tgz", + "integrity": "sha512-6QupI/jemMfK+yI2pMtJcu5iO2gtgTfcBdGwMZZt+lgbFELhszbDl6Qjh000HgAV8+XUA+8EY8DusOFk8WhOIg==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^4.2.1", "debug": "^4.3.4", "deepmerge": "^4.2.2", "kleur": "^4.1.5", - "magic-string": "^0.26.2", - "svelte-hmr": "^0.14.12" + "magic-string": "^0.26.7", + "svelte-hmr": "^0.15.1", + "vitefu": "^0.2.2" }, "engines": { "node": "^14.18.0 || >= 16" }, "peerDependencies": { - "diff-match-patch": "^1.0.5", "svelte": "^3.44.0", - "vite": "^3.0.0 || ^3.1.0-beta.1" - }, - "peerDependenciesMeta": { - "diff-match-patch": { - "optional": true - } + "vite": "^3.0.0" } }, "node_modules/@tailwindcss/forms": { @@ -152,18 +199,18 @@ } }, "node_modules/@types/http-proxy": { - "version": "1.17.9", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", - "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", + "version": "1.17.11", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.11.tgz", + "integrity": "sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { - "version": "18.7.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz", - "integrity": "sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==", + "version": "20.3.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.3.tgz", + "integrity": "sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==", "dev": true }, "node_modules/@types/pug": { @@ -173,50 +220,25 @@ "dev": true }, "node_modules/@types/sass": { - "version": "1.43.1", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.1.tgz", - "integrity": "sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.45.0.tgz", + "integrity": "sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==", + "deprecated": "This is a stub types definition. sass provides its own type definitions, so you do not need this installed.", "dev": true, "dependencies": { - "@types/node": "*" + "sass": "*" } }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -233,9 +255,9 @@ "dev": true }, "node_modules/autoprefixer": { - "version": "10.4.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz", - "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==", + "version": "10.4.14", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", + "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", "dev": true, "funding": [ { @@ -248,8 +270,8 @@ } ], "dependencies": { - "browserslist": "^4.21.3", - "caniuse-lite": "^1.0.30001373", + "browserslist": "^4.21.5", + "caniuse-lite": "^1.0.30001464", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -308,9 +330,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "funding": [ { "type": "opencollective", @@ -319,13 +341,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -364,9 +390,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001434", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz", - "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==", + "version": "1.0.30001509", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz", + "integrity": "sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==", "funding": [ { "type": "opencollective", @@ -375,6 +401,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -405,24 +435,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -443,9 +455,9 @@ "dev": true }, "node_modules/css-declaration-sorter": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", - "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.0.tgz", + "integrity": "sha512-jDfsatwWMWN0MODAFuHszfjphEXfNw9JUAhmY4pLu3TyTU+ohUpsbVtbU+1MZn4a47D9kqh03i4eyOm+74+zew==", "engines": { "node": "^10 || ^12 || >=14" }, @@ -503,11 +515,11 @@ } }, "node_modules/cssnano": { - "version": "5.1.14", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.14.tgz", - "integrity": "sha512-Oou7ihiTocbKqi0J1bB+TRJIQX5RMR3JghA8hcWSw9mjBLQ5Y3RWqEDoYG3sRNlAbCIXpqMoZGbq5KDR3vdzgw==", + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.15.tgz", + "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==", "dependencies": { - "cssnano-preset-default": "^5.2.13", + "cssnano-preset-default": "^5.2.14", "lilconfig": "^2.0.3", "yaml": "^1.10.2" }, @@ -523,21 +535,21 @@ } }, "node_modules/cssnano-preset-default": { - "version": "5.2.13", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.13.tgz", - "integrity": "sha512-PX7sQ4Pb+UtOWuz8A1d+Rbi+WimBIxJTRyBdgGp1J75VU0r/HFQeLnMYgHiCAp6AR4rqrc7Y4R+1Rjk3KJz6DQ==", + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", + "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", "dependencies": { "css-declaration-sorter": "^6.3.1", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", - "postcss-colormin": "^5.3.0", + "postcss-colormin": "^5.3.1", "postcss-convert-values": "^5.1.3", "postcss-discard-comments": "^5.1.2", "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", "postcss-merge-longhand": "^5.1.7", - "postcss-merge-rules": "^5.1.3", + "postcss-merge-rules": "^5.1.4", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", "postcss-minify-params": "^5.1.4", @@ -552,7 +564,7 @@ "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", "postcss-ordered-values": "^5.1.3", - "postcss-reduce-initial": "^5.1.1", + "postcss-reduce-initial": "^5.1.2", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", "postcss-unique-selectors": "^5.1.1" @@ -575,14 +587,6 @@ "postcss": "^8.2.15" } }, - "node_modules/cssnano/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "engines": { - "node": ">= 6" - } - }, "node_modules/csso": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", @@ -618,20 +622,14 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==", - "dev": true - }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -641,23 +639,6 @@ "node": ">=8" } }, - "node_modules/detective": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", - "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -722,9 +703,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==" + "version": "1.4.447", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.447.tgz", + "integrity": "sha512-sxX0LXh+uL41hSJsujAN86PjhrV/6c79XmpY0TvjZStV6VxIgarf8SRkUoUTuYmFcZQTemsoqo8qXOGw5npWfw==" }, "node_modules/entities": { "version": "2.2.0", @@ -1105,12 +1086,6 @@ "node": ">=6" } }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -1118,9 +1093,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -1133,22 +1108,10 @@ "node": ">=8.6.0" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -1167,9 +1130,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true, "funding": [ { @@ -1246,21 +1209,21 @@ } }, "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "is-glob": "^4.0.3" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=10.13.0" + "node": ">= 6" } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/has": { @@ -1313,6 +1276,12 @@ } } }, + "node_modules/immutable": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", + "dev": true + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1342,9 +1311,9 @@ } }, "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -1395,6 +1364,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/jiti": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", + "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -1405,13 +1383,19 @@ } }, "node_modules/lilconfig": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", - "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", "engines": { "node": ">=10" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -1432,9 +1416,9 @@ } }, "node_modules/magic-string": { - "version": "0.26.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.3.tgz", - "integrity": "sha512-u1Po0NDyFcwdg2nzHT88wSK0+Rih0N1M+Ph1Sp08k8yvFFU3KR72wryS7e1qMPJypt99WB7fIFVCA92mQrMjrg==", + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz", + "integrity": "sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==", "dev": true, "dependencies": { "sourcemap-codec": "^1.4.8" @@ -1501,10 +1485,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/mkdirp": { "version": "0.5.6", @@ -1524,6 +1511,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -1552,9 +1550,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -1596,6 +1594,15 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", @@ -1665,6 +1672,15 @@ "node": ">=0.10.0" } }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/postcss": { "version": "8.4.24", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", @@ -1705,11 +1721,11 @@ } }, "node_modules/postcss-colormin": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", - "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz", + "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", "dependencies": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "colord": "^2.9.1", "postcss-value-parser": "^4.2.0" @@ -1781,9 +1797,9 @@ } }, "node_modules/postcss-import": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", - "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", "dev": true, "dependencies": { "postcss-value-parser": "^4.0.0", @@ -1791,16 +1807,16 @@ "resolve": "^1.1.7" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.0.0" }, "peerDependencies": { "postcss": "^8.0.0" } }, "node_modules/postcss-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz", - "integrity": "sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", "dev": true, "dependencies": { "camelcase-css": "^2.0.1" @@ -1813,7 +1829,7 @@ "url": "https://opencollective.com/postcss/" }, "peerDependencies": { - "postcss": "^8.3.3" + "postcss": "^8.4.21" } }, "node_modules/postcss-load-config": { @@ -1845,6 +1861,15 @@ } } }, + "node_modules/postcss-load-config/node_modules/yaml": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/postcss-merge-longhand": { "version": "5.1.7", "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz", @@ -1861,9 +1886,9 @@ } }, "node_modules/postcss-merge-rules": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.3.tgz", - "integrity": "sha512-LbLd7uFC00vpOuMvyZop8+vvhnfRGpp2S+IMQKeuOZZapPRY4SMq5ErjQeHbHsjCUgJkRNrlU+LmxsKIqPKQlA==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", + "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", "dependencies": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", @@ -1938,12 +1963,12 @@ } }, "node_modules/postcss-nested": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", - "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.6" + "postcss-selector-parser": "^6.0.11" }, "engines": { "node": ">=12.0" @@ -2097,9 +2122,9 @@ } }, "node_modules/postcss-reduce-initial": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.1.tgz", - "integrity": "sha512-//jeDqWcHPuXGZLoolFrUXBDyuEGbr9S2rMo19bkTIjBQ4PqkaO+oI8wua5BOUxpfi97i3PCoInsiFIEBfkm9w==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", + "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", "dependencies": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0" @@ -2126,9 +2151,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", + "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2191,18 +2216,6 @@ } ] }, - "node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -2231,12 +2244,12 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -2319,6 +2332,23 @@ "rimraf": "^2.5.2" } }, + "node_modules/sass": { + "version": "1.63.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz", + "integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/sorcery": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", @@ -2354,6 +2384,7 @@ "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, "node_modules/stable": { @@ -2389,6 +2420,57 @@ "postcss": "^8.2.15" } }, + "node_modules/sucrase": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", + "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -2402,24 +2484,24 @@ } }, "node_modules/svelte": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.49.0.tgz", - "integrity": "sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==", + "version": "3.59.2", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", + "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/svelte-hmr": { - "version": "0.14.12", - "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.14.12.tgz", - "integrity": "sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.2.tgz", + "integrity": "sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==", "dev": true, "engines": { "node": "^12.20 || ^14.13.1 || >= 16" }, "peerDependencies": { - "svelte": ">=3.19.0" + "svelte": "^3.19.0 || ^4.0.0-next.0" } }, "node_modules/svelte-navigator": { @@ -2545,81 +2627,74 @@ } }, "node_modules/tailwindcss": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", - "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz", + "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==", "dev": true, "dependencies": { + "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", "chokidar": "^3.5.3", - "color-name": "^1.1.4", - "detective": "^5.2.1", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "lilconfig": "^2.0.6", + "jiti": "^1.18.2", + "lilconfig": "^2.1.0", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.14", - "postcss-import": "^14.1.0", - "postcss-js": "^4.0.0", - "postcss-load-config": "^3.1.4", - "postcss-nested": "5.0.6", - "postcss-selector-parser": "^6.0.10", + "postcss": "^8.4.23", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.1", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", - "quick-lru": "^5.1.1", - "resolve": "^1.22.1" + "resolve": "^1.22.2", + "sucrase": "^3.32.0" }, "bin": { "tailwind": "lib/cli.js", "tailwindcss": "lib/cli.js" }, "engines": { - "node": ">=12.13.0" - }, - "peerDependencies": { - "postcss": "^8.0.9" + "node": ">=14.0.0" } }, - "node_modules/tailwindcss/node_modules/postcss-load-config": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", - "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "node_modules/tailwindcss/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^1.10.2" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } + "node": ">=10.13.0" } }, - "node_modules/tailwindcss/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, "engines": { - "node": ">= 6" + "node": ">=0.8" } }, "node_modules/to-regex-range": { @@ -2634,16 +2709,22 @@ "node": ">=8.0" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", "dev": true }, "node_modules/typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "peer": true, "bin": { @@ -2655,9 +2736,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "funding": [ { "type": "opencollective", @@ -2666,6 +2747,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -2673,7 +2758,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -2733,32 +2818,42 @@ } } }, + "node_modules/vitefu": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", + "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", + "dev": true, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, "node_modules/yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", - "dev": true, + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "engines": { - "node": ">= 14" + "node": ">= 6" } } }, "dependencies": { + "@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true + }, "@esbuild/android-arm": { "version": "0.15.18", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.18.tgz", @@ -2773,6 +2868,53 @@ "dev": true, "optional": true }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2799,28 +2941,18 @@ "fastq": "^1.6.0" } }, - "@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "requires": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - } - }, "@sveltejs/vite-plugin-svelte": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.4.tgz", - "integrity": "sha512-UZco2fdj0OVuRWC0SUJjEOftITc2IeHLFJNp00ym9MuQ9dShnlO4P29G8KUxRlcS7kSpzHuko6eCR9MOALj7lQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.4.0.tgz", + "integrity": "sha512-6QupI/jemMfK+yI2pMtJcu5iO2gtgTfcBdGwMZZt+lgbFELhszbDl6Qjh000HgAV8+XUA+8EY8DusOFk8WhOIg==", "dev": true, "requires": { - "@rollup/pluginutils": "^4.2.1", "debug": "^4.3.4", "deepmerge": "^4.2.2", "kleur": "^4.1.5", - "magic-string": "^0.26.2", - "svelte-hmr": "^0.14.12" + "magic-string": "^0.26.7", + "svelte-hmr": "^0.15.1", + "vitefu": "^0.2.2" } }, "@tailwindcss/forms": { @@ -2838,18 +2970,18 @@ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==" }, "@types/http-proxy": { - "version": "1.17.9", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", - "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", + "version": "1.17.11", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.11.tgz", + "integrity": "sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==", "dev": true, "requires": { "@types/node": "*" } }, "@types/node": { - "version": "18.7.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz", - "integrity": "sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==", + "version": "20.3.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.3.tgz", + "integrity": "sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw==", "dev": true }, "@types/pug": { @@ -2859,41 +2991,24 @@ "dev": true }, "@types/sass": { - "version": "1.43.1", - "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.43.1.tgz", - "integrity": "sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==", + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/@types/sass/-/sass-1.45.0.tgz", + "integrity": "sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==", "dev": true, "requires": { - "@types/node": "*" + "sass": "*" } }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", "dev": true }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -2907,13 +3022,13 @@ "dev": true }, "autoprefixer": { - "version": "10.4.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz", - "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==", + "version": "10.4.14", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", + "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", "dev": true, "requires": { - "browserslist": "^4.21.3", - "caniuse-lite": "^1.0.30001373", + "browserslist": "^4.21.5", + "caniuse-lite": "^1.0.30001464", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -2957,14 +3072,14 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" } }, "buffer-crc32": { @@ -2991,9 +3106,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001434", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001434.tgz", - "integrity": "sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==" + "version": "1.0.30001509", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001509.tgz", + "integrity": "sha512-2uDDk+TRiTX5hMcUYT/7CSyzMZxjfGu0vAUjS2g0LSD8UoXOv0LtpH4LxGMemsiPq6LCVIUjNwVM0erkOkGCDA==" }, "chokidar": { "version": "3.5.3", @@ -3009,25 +3124,8 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -3045,9 +3143,9 @@ "dev": true }, "css-declaration-sorter": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.1.tgz", - "integrity": "sha512-fBffmak0bPAnyqc/HO8C3n2sHrp9wcqQz6ES9koRF2/mLOVAx9zIQ3Y7R29sYCteTPqMCwns4WYQoCX91Xl3+w==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.0.tgz", + "integrity": "sha512-jDfsatwWMWN0MODAFuHszfjphEXfNw9JUAhmY4pLu3TyTU+ohUpsbVtbU+1MZn4a47D9kqh03i4eyOm+74+zew==", "requires": {} }, "css-select": { @@ -3082,38 +3180,31 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" }, "cssnano": { - "version": "5.1.14", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.14.tgz", - "integrity": "sha512-Oou7ihiTocbKqi0J1bB+TRJIQX5RMR3JghA8hcWSw9mjBLQ5Y3RWqEDoYG3sRNlAbCIXpqMoZGbq5KDR3vdzgw==", + "version": "5.1.15", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.15.tgz", + "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==", "requires": { - "cssnano-preset-default": "^5.2.13", + "cssnano-preset-default": "^5.2.14", "lilconfig": "^2.0.3", "yaml": "^1.10.2" - }, - "dependencies": { - "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" - } } }, "cssnano-preset-default": { - "version": "5.2.13", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.13.tgz", - "integrity": "sha512-PX7sQ4Pb+UtOWuz8A1d+Rbi+WimBIxJTRyBdgGp1J75VU0r/HFQeLnMYgHiCAp6AR4rqrc7Y4R+1Rjk3KJz6DQ==", + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz", + "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==", "requires": { "css-declaration-sorter": "^6.3.1", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", - "postcss-colormin": "^5.3.0", + "postcss-colormin": "^5.3.1", "postcss-convert-values": "^5.1.3", "postcss-discard-comments": "^5.1.2", "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", "postcss-merge-longhand": "^5.1.7", - "postcss-merge-rules": "^5.1.3", + "postcss-merge-rules": "^5.1.4", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", "postcss-minify-params": "^5.1.4", @@ -3128,7 +3219,7 @@ "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", "postcss-ordered-values": "^5.1.3", - "postcss-reduce-initial": "^5.1.1", + "postcss-reduce-initial": "^5.1.2", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", "postcss-unique-selectors": "^5.1.1" @@ -3164,15 +3255,9 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, "detect-indent": { @@ -3181,17 +3266,6 @@ "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", "dev": true }, - "detective": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", - "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, - "requires": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - } - }, "didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -3238,9 +3312,9 @@ } }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==" + "version": "1.4.447", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.447.tgz", + "integrity": "sha512-sxX0LXh+uL41hSJsujAN86PjhrV/6c79XmpY0TvjZStV6VxIgarf8SRkUoUTuYmFcZQTemsoqo8qXOGw5npWfw==" }, "entities": { "version": "2.2.0", @@ -3428,12 +3502,6 @@ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, "eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -3441,9 +3509,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -3451,23 +3519,12 @@ "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } } }, "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -3483,9 +3540,9 @@ } }, "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, "fraction.js": { @@ -3528,18 +3585,18 @@ } }, "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { - "is-glob": "^4.0.3" + "is-glob": "^4.0.1" } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "has": { @@ -3575,6 +3632,12 @@ "micromatch": "^4.0.2" } }, + "immutable": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3601,9 +3664,9 @@ } }, "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "requires": { "has": "^1.0.3" @@ -3636,6 +3699,12 @@ "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", "dev": true }, + "jiti": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", + "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", + "dev": true + }, "kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -3643,9 +3712,15 @@ "dev": true }, "lilconfig": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", - "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==" + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "lodash.memoize": { "version": "4.1.2", @@ -3667,9 +3742,9 @@ } }, "magic-string": { - "version": "0.26.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.3.tgz", - "integrity": "sha512-u1Po0NDyFcwdg2nzHT88wSK0+Rih0N1M+Ph1Sp08k8yvFFU3KR72wryS7e1qMPJypt99WB7fIFVCA92mQrMjrg==", + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz", + "integrity": "sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==", "dev": true, "requires": { "sourcemap-codec": "^1.4.8" @@ -3718,9 +3793,9 @@ } }, "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "mkdirp": { @@ -3738,6 +3813,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -3754,9 +3840,9 @@ } }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==" }, "normalize-path": { "version": "3.0.0", @@ -3783,6 +3869,12 @@ "boolbase": "^1.0.0" } }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, "object-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", @@ -3837,6 +3929,12 @@ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true }, + "pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true + }, "postcss": { "version": "8.4.24", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", @@ -3857,11 +3955,11 @@ } }, "postcss-colormin": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz", - "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz", + "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==", "requires": { - "browserslist": "^4.16.6", + "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", "colord": "^2.9.1", "postcss-value-parser": "^4.2.0" @@ -3901,9 +3999,9 @@ "requires": {} }, "postcss-import": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", - "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", "dev": true, "requires": { "postcss-value-parser": "^4.0.0", @@ -3912,9 +4010,9 @@ } }, "postcss-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz", - "integrity": "sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", "dev": true, "requires": { "camelcase-css": "^2.0.1" @@ -3928,6 +4026,14 @@ "requires": { "lilconfig": "^2.0.5", "yaml": "^2.1.1" + }, + "dependencies": { + "yaml": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "dev": true + } } }, "postcss-merge-longhand": { @@ -3940,9 +4046,9 @@ } }, "postcss-merge-rules": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.3.tgz", - "integrity": "sha512-LbLd7uFC00vpOuMvyZop8+vvhnfRGpp2S+IMQKeuOZZapPRY4SMq5ErjQeHbHsjCUgJkRNrlU+LmxsKIqPKQlA==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz", + "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==", "requires": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0", @@ -3987,12 +4093,12 @@ } }, "postcss-nested": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", - "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", + "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", "dev": true, "requires": { - "postcss-selector-parser": "^6.0.6" + "postcss-selector-parser": "^6.0.11" } }, "postcss-normalize-charset": { @@ -4077,9 +4183,9 @@ } }, "postcss-reduce-initial": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.1.tgz", - "integrity": "sha512-//jeDqWcHPuXGZLoolFrUXBDyuEGbr9S2rMo19bkTIjBQ4PqkaO+oI8wua5BOUxpfi97i3PCoInsiFIEBfkm9w==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz", + "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==", "requires": { "browserslist": "^4.21.4", "caniuse-api": "^3.0.0" @@ -4094,9 +4200,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", + "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", "requires": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -4130,12 +4236,6 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true - }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -4161,12 +4261,12 @@ "dev": true }, "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "requires": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -4216,6 +4316,17 @@ "rimraf": "^2.5.2" } }, + "sass": { + "version": "1.63.6", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.63.6.tgz", + "integrity": "sha512-MJuxGMHzaOW7ipp+1KdELtqKbfAWbH7OLIdoSMnVe3EXPMTmxTmlaZDCTsgIpPCs3w99lLo9/zDKkOrJuT5byw==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, "sorcery": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz", @@ -4267,6 +4378,43 @@ "postcss-selector-parser": "^6.0.4" } }, + "sucrase": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz", + "integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4274,15 +4422,15 @@ "dev": true }, "svelte": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.49.0.tgz", - "integrity": "sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==", + "version": "3.59.2", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", + "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", "dev": true }, "svelte-hmr": { - "version": "0.14.12", - "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.14.12.tgz", - "integrity": "sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.2.tgz", + "integrity": "sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg==", "dev": true, "requires": {} }, @@ -4345,53 +4493,65 @@ } }, "tailwindcss": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", - "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz", + "integrity": "sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==", "dev": true, "requires": { + "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", "chokidar": "^3.5.3", - "color-name": "^1.1.4", - "detective": "^5.2.1", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", - "lilconfig": "^2.0.6", + "jiti": "^1.18.2", + "lilconfig": "^2.1.0", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.14", - "postcss-import": "^14.1.0", - "postcss-js": "^4.0.0", - "postcss-load-config": "^3.1.4", - "postcss-nested": "5.0.6", - "postcss-selector-parser": "^6.0.10", + "postcss": "^8.4.23", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.1", + "postcss-nested": "^6.0.1", + "postcss-selector-parser": "^6.0.11", "postcss-value-parser": "^4.2.0", - "quick-lru": "^5.1.1", - "resolve": "^1.22.1" + "resolve": "^1.22.2", + "sucrase": "^3.32.0" }, "dependencies": { - "postcss-load-config": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", - "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "lilconfig": "^2.0.5", - "yaml": "^1.10.2" + "is-glob": "^4.0.3" } - }, - "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true } } }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4401,23 +4561,29 @@ "is-number": "^7.0.0" } }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", "dev": true }, "typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "peer": true }, "update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -4441,23 +4607,23 @@ "rollup": "^2.79.1" } }, + "vitefu": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", + "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", + "dev": true, + "requires": {} + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, "yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", - "dev": true + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" } } } diff --git a/lib/SvelteUi/app/src/lib/ConfigurationPanel.svelte b/lib/SvelteUi/app/src/lib/ConfigurationPanel.svelte index 89ccc1ea..7c21341d 100644 --- a/lib/SvelteUi/app/src/lib/ConfigurationPanel.svelte +++ b/lib/SvelteUi/app/src/lib/ConfigurationPanel.svelte @@ -290,25 +290,33 @@
- Serial configuration -
- inverted +
+ - - +
- +
+ Buffer size
+
Voltage