From 24e68428c496d4f5784ba72659a3d04251bad5fe Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sun, 5 Feb 2023 19:26:48 +0100 Subject: [PATCH] Commited gui dist files --- lib/SvelteUi/app/.gitignore | 2 -- lib/SvelteUi/app/dist/favicon.svg | 19 +++++++++++++++++++ lib/SvelteUi/app/dist/github.svg | 6 ++++++ lib/SvelteUi/app/dist/index.css | 1 + lib/SvelteUi/app/dist/index.html | 16 ++++++++++++++++ lib/SvelteUi/app/dist/index.js | 22 ++++++++++++++++++++++ 6 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 lib/SvelteUi/app/dist/favicon.svg create mode 100644 lib/SvelteUi/app/dist/github.svg create mode 100644 lib/SvelteUi/app/dist/index.css create mode 100644 lib/SvelteUi/app/dist/index.html create mode 100644 lib/SvelteUi/app/dist/index.js diff --git a/lib/SvelteUi/app/.gitignore b/lib/SvelteUi/app/.gitignore index a547bf36..234f2f1b 100644 --- a/lib/SvelteUi/app/.gitignore +++ b/lib/SvelteUi/app/.gitignore @@ -8,8 +8,6 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist -dist-ssr *.local # Editor directories and files diff --git a/lib/SvelteUi/app/dist/favicon.svg b/lib/SvelteUi/app/dist/favicon.svg new file mode 100644 index 00000000..b00c064f --- /dev/null +++ b/lib/SvelteUi/app/dist/favicon.svg @@ -0,0 +1,19 @@ + + + + Amsleser + + + + + + + + + diff --git a/lib/SvelteUi/app/dist/github.svg b/lib/SvelteUi/app/dist/github.svg new file mode 100644 index 00000000..f25b68d5 --- /dev/null +++ b/lib/SvelteUi/app/dist/github.svg @@ -0,0 +1,6 @@ + + + + GitHub + + diff --git a/lib/SvelteUi/app/dist/index.css b/lib/SvelteUi/app/dist/index.css new file mode 100644 index 00000000..8feb705d --- /dev/null +++ b/lib/SvelteUi/app/dist/index.css @@ -0,0 +1 @@ +/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.static{position:static}.fixed{position:fixed}.inset-0{bottom:0;left:0;right:0;top:0}.z-50{z-index:50}.z-40{z-index:40}.col-span-2{grid-column:span 2/span 2}.float-right{float:right}.clear-both{clear:both}.m-3{margin:.75rem}.m-1{margin:.25rem}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-auto{margin-bottom:auto;margin-top:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mb-3{margin-bottom:.75rem}.mb-1{margin-bottom:.25rem}.mt-2{margin-top:.5rem}.ml-3{margin-left:.75rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-3{margin-right:.75rem}.mt-3{margin-top:.75rem}.mb-4{margin-bottom:1rem}.mt-4{margin-top:1rem}.mt-1{margin-top:.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-64{height:16rem}.h-6{height:1.5rem}.w-full{width:100%}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-3\/4{width:75%}.w-1\/3{width:33.333333%}.w-40{width:10rem}.w-6{width:1.5rem}.w-96{width:24rem}.flex-none{flex:none}.flex-auto{flex:1 1 auto}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:.5}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.pr-1{padding-right:.25rem}.pl-1{padding-left:.25rem}.pb-4{padding-bottom:1rem}.text-center{text-align:center}.text-right{text-align:right}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.gh-logo{height:2rem;width:2rem}.cnt{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);margin:.5rem;padding:.5rem}.in-pre{border-bottom-left-radius:.375rem;border-color:rgb(209 213 219/var(--tw-border-opacity));border-top-left-radius:.375rem;border-width:1px 0 1px 1px}.in-post,.in-pre{--tw-border-opacity:1;--tw-bg-opacity:1;align-items:center;background-color:rgb(243 244 246/var(--tw-bg-opacity));display:flex;font-size:.875rem;line-height:1.25rem;padding-left:.75rem;padding-right:.75rem;white-space:nowrap}.in-post{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem;border-width:1px 1px 1px 0}.in-post,.in-txt{border-color:rgb(209 213 219/var(--tw-border-opacity))}.in-txt{--tw-border-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:2.5rem}.in-txt:disabled{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.in-f{--tw-border-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);border-bottom-left-radius:.375rem;border-color:rgb(209 213 219/var(--tw-border-opacity));border-top-left-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:2.5rem}.in-f:disabled{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.in-m{--tw-border-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);border-color:rgb(209 213 219/var(--tw-border-opacity));border-left-width:0;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:2.5rem}.in-m:disabled{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.in-l{--tw-border-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);border-bottom-right-radius:.375rem;border-color:rgb(209 213 219/var(--tw-border-opacity));border-left-width:0;border-top-right-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:2.5rem}.in-l:disabled{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.in-s{--tw-border-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);border-color:rgb(209 213 219/var(--tw-border-opacity));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:2.5rem;width:100%}.in-s:disabled{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.tr{text-align:right}.bd-grn{background-color:rgb(34 197 94/var(--tw-bg-opacity));color:rgb(220 252 231/var(--tw-text-opacity))}.bd-grn,.bd-ylo{--tw-bg-opacity:1;--tw-text-opacity:1;border-radius:.25rem;font-size:.75rem;font-weight:600;line-height:1rem;margin-bottom:auto;margin-right:.5rem;margin-top:auto;padding:.125rem .625rem}.bd-ylo{background-color:rgb(234 179 8/var(--tw-bg-opacity));color:rgb(254 249 195/var(--tw-text-opacity))}.bd-red{background-color:rgb(239 68 68/var(--tw-bg-opacity));color:rgb(254 226 226/var(--tw-text-opacity))}.bd-blu,.bd-red{--tw-bg-opacity:1;--tw-text-opacity:1;border-radius:.25rem;font-size:.75rem;font-weight:600;line-height:1rem;margin-bottom:auto;margin-right:.5rem;margin-top:auto;padding:.125rem .625rem}.bd-blu{background-color:rgb(59 130 246/var(--tw-bg-opacity));color:rgb(219 234 254/var(--tw-text-opacity))}.bd-gry{background-color:rgb(107 114 128/var(--tw-bg-opacity));color:rgb(243 244 246/var(--tw-text-opacity));font-size:.75rem;font-weight:600;line-height:1rem;margin-bottom:auto;margin-right:.5rem;margin-top:auto;padding:.125rem .625rem}.bd-gry,.btn-pri{--tw-bg-opacity:1;--tw-text-opacity:1;border-radius:.25rem}.btn-pri{background-color:rgb(59 130 246/var(--tw-bg-opacity));color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.75rem;padding:.5rem 1rem}.pl-root{position:relative}.pl-ov{left:25%;position:absolute;text-align:center;top:27%;width:50%}.pl-val{font-size:1.7rem}.pl-unt{color:gray;font-size:1rem}.pl-sub{font-size:1rem;padding-top:10px}.pl-snt{color:gray;font-size:.7rem}.pl-lab{font-size:1rem}.chart{height:100%;margin:0 auto;width:100%}svg{position:relative;width:100%}.tick{font-family:Helvetica,Arial;font-size:.85em;font-weight:200}.tick line{stroke:#e2e2e2;stroke-dasharray:2}.tick text{fill:#999;text-anchor:start}.tick.tick-0 line{stroke-dasharray:0}.tick.tick-green line{stroke:#32d900!important}.tick.tick-green text{fill:#32d900!important}.tick.tick-orange line{stroke:#d95600!important}.tick.tick-orange text{fill:#d95600!important}.x-axis .tick text{text-anchor:middle}.bars rect{stroke:#000;stroke-opacity:.25;opacity:.9}.bars text{display:block;font-family:Helvetica,Arial;font-size:.85em;text-align:center}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:768px){.md\:col-span-3{grid-column:span 3/span 3}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){.lg\:col-span-4{grid-column:span 4/span 4}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\:col-span-5{grid-column:span 5/span 5}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:1536px){.\32xl\:col-span-6{grid-column:span 6/span 6}.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} diff --git a/lib/SvelteUi/app/dist/index.html b/lib/SvelteUi/app/dist/index.html new file mode 100644 index 00000000..6a9fa71d --- /dev/null +++ b/lib/SvelteUi/app/dist/index.html @@ -0,0 +1,16 @@ + + + + + + + + AMS reader + + + + +
+ + + diff --git a/lib/SvelteUi/app/dist/index.js b/lib/SvelteUi/app/dist/index.js new file mode 100644 index 00000000..37b51dea --- /dev/null +++ b/lib/SvelteUi/app/dist/index.js @@ -0,0 +1,22 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function l(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}})();function fe(){}function pl(t,e){for(const l in e)t[l]=e[l];return t}function xp(t){return t()}function sf(){return Object.create(null)}function et(t){t.forEach(xp)}function ec(t){return typeof t=="function"}function Se(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let os;function zc(t,e){return os||(os=document.createElement("a")),os.href=e,t===os.href}function Bc(t){return Object.keys(t).length===0}function tu(t,...e){if(t==null)return fe;const l=t.subscribe(...e);return l.unsubscribe?()=>l.unsubscribe():l}function oo(t){let e;return tu(t,l=>e=l)(),e}function hl(t,e,l){t.$$.on_destroy.push(tu(e,l))}function lu(t,e,l,n){if(t){const o=tc(t,e,l,n);return t[0](o)}}function tc(t,e,l,n){return t[1]&&n?pl(l.ctx.slice(),t[1](n(e))):l.ctx}function nu(t,e,l,n){if(t[2]&&n){const o=t[2](n(l));if(e.dirty===void 0)return o;if(typeof o=="object"){const s=[],u=Math.max(e.dirty.length,o.length);for(let c=0;c32){const e=[],l=t.ctx.length/32;for(let n=0;nt.removeEventListener(e,l,n)}function gs(t){return function(e){return e.preventDefault(),t.call(this,e)}}function a(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}function gl(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]:a(t,n,e[n])}function re(t){return t===""?null:+t}function Yc(t){return Array.from(t.childNodes)}function V(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Y(t,e){t.value=e==null?"":e}function lc(t,e,l,n){l===null?t.style.removeProperty(e):t.style.setProperty(e,l,n?"important":"")}function de(t,e){for(let l=0;l{u.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{s=B(n.contentWindow,"resize",e)}),i(t,n),()=>{(o||s&&n.contentWindow)&&s(),b(n)}}function Qc(t,e,{bubbles:l=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,l,n,e),o}let wo;function go(t){wo=t}function yo(){if(!wo)throw new Error("Function called outside component initialization");return wo}function Zc(t){yo().$$.on_mount.push(t)}function Jc(t){yo().$$.on_destroy.push(t)}function Xc(){const t=yo();return(e,l,{cancelable:n=!1}={})=>{const o=t.$$.callbacks[e];if(o){const s=Qc(e,l,{cancelable:n});return o.slice().forEach(u=>{u.call(t,s)}),!s.defaultPrevented}return!0}}function ko(t,e){return yo().$$.context.set(t,e),e}function zl(t){return yo().$$.context.get(t)}const bo=[],vs=[],ps=[],uf=[],nc=Promise.resolve();let js=!1;function ic(){js||(js=!0,nc.then(oc))}function xc(){return ic(),nc}function Re(t){ps.push(t)}const Rs=new Set;let us=0;function oc(){const t=wo;do{for(;us{cs.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}else n&&n()}function so(t,e){const l={},n={},o={$$scope:1};let s=t.length;for(;s--;){const u=t[s],c=e[s];if(c){for(const f in u)f in c||(n[f]=1);for(const f in c)o[f]||(l[f]=c[f],o[f]=1);t[s]=c}else for(const f in u)o[f]=1}for(const u in n)u in l||(l[u]=void 0);return l}function af(t){return typeof t=="object"&&t!==null?t:{}}function ee(t){t&&t.c()}function X(t,e,l,n){const{fragment:o,on_mount:s,on_destroy:u,after_update:c}=t.$$;o&&o.m(e,l),n||Re(()=>{const f=s.map(xp).filter(ec);u?u.push(...f):et(f),t.$$.on_mount=[]}),c.forEach(Re)}function x(t,e){const l=t.$$;l.fragment!==null&&(et(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function t1(t,e){t.$$.dirty[0]===-1&&(bo.push(t),ic(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const k=w.length?w[0]:v;return p.ctx&&o(p.ctx[_],p.ctx[_]=k)&&(!p.skip_bound&&p.bound[_]&&p.bound[_](k),m&&t1(t,_)),v}):[],p.update(),m=!0,et(p.before_update),p.fragment=n?n(p.ctx):!1,e.target){if(e.hydrate){const _=Yc(e.target);p.fragment&&p.fragment.l(_),_.forEach(b)}else p.fragment&&p.fragment.c();e.intro&&F(t.$$.fragment),X(t,e.target,e.anchor,e.customElement),oc()}go(f)}class Ae{$destroy(){x(this,1),this.$destroy=fe}$on(e,l){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const o=n.indexOf(l);o!==-1&&n.splice(o,1)}}$set(e){this.$$set&&!Bc(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const rf=t=>typeof t>"u",sc=t=>typeof t=="function",uc=t=>typeof t=="number";function l1(t){return!t.defaultPrevented&&t.button===0&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ac(){let t=0;return()=>t++}function n1(){return Math.random().toString(36).substring(2)}const Bl=typeof window>"u";function rc(t,e,l){return t.addEventListener(e,l),()=>t.removeEventListener(e,l)}const zs=(t,e)=>t?{}:{style:e},lo=t=>({"aria-hidden":"true",...zs(t,"display:none;")}),to=[];function fc(t,e){return{subscribe:ft(t,e).subscribe}}function ft(t,e=fe){let l;const n=new Set;function o(c){if(Se(t,c)&&(t=c,l)){const f=!to.length;for(const p of n)p[1](),to.push(p,t);if(f){for(let p=0;p{n.delete(p),n.size===0&&(l(),l=null)}}return{set:o,update:s,subscribe:u}}function i1(t,e,l){const n=!Array.isArray(t),o=n?[t]:t,s=e.length<2;return fc(l,u=>{let c=!1;const f=[];let p=0,m=fe;const _=()=>{if(p)return;m();const w=e(n?f[0]:f,u);s?u(w):m=ec(w)?w:fe},v=o.map((w,k)=>tu(w,g=>{f[k]=g,p&=~(1<{p|=1<`@@svnav-ctx__${t}`,Bs=Co("LOCATION"),uo=Co("ROUTER"),pc=Co("ROUTE"),o1=Co("ROUTE_PARAMS"),s1=Co("FOCUS_ELEM"),cc=/^:(.+)/,ho=(t,e,l)=>t.substr(e,l),Ys=(t,e)=>ho(t,0,e.length)===e,u1=t=>t==="",a1=t=>cc.test(t),mc=t=>t[0]==="*",r1=t=>t.replace(/\*.*$/,""),_c=t=>t.replace(/(^\/+|\/+$)/g,"");function wl(t,e=!1){const l=_c(t).split("/");return e?l.filter(Boolean):l}const Ls=(t,e)=>t+(e?`?${e}`:""),su=t=>`/${_c(t)}`;function $o(...t){const e=n=>wl(n,!0).join("/"),l=t.map(e).join("/");return su(l)}const uu=1,ks=2,Pn=3,f1=4,dc=5,p1=6,vc=7,c1=8,m1=9,bc=10,hc=11,_1={[uu]:"Link",[ks]:"Route",[Pn]:"Router",[f1]:"useFocus",[dc]:"useLocation",[p1]:"useMatch",[vc]:"useNavigate",[c1]:"useParams",[m1]:"useResolvable",[bc]:"useResolve",[hc]:"navigate"},au=t=>_1[t];function d1(t,e){let l;return t===ks?l=e.path?`path="${e.path}"`:"default":t===uu?l=`to="${e.to}"`:t===Pn&&(l=`basepath="${e.basepath||""}"`),`<${au(t)} ${l||""} />`}function v1(t,e,l,n){const o=l&&d1(n||t,l),s=o?` + +Occurred in: ${o}`:"",u=au(t),c=sc(e)?e(u):e;return`<${u}> ${c}${s}`}const gc=t=>(...e)=>t(v1(...e)),kc=gc(t=>{throw new Error(t)}),bs=gc(console.warn),ff=4,b1=3,h1=2,g1=1,k1=1;function w1(t,e){const l=t.default?0:wl(t.fullPath).reduce((n,o)=>{let s=n;return s+=ff,u1(o)?s+=k1:a1(o)?s+=h1:mc(o)?s-=ff+g1:s+=b1,s},0);return{route:t,score:l,index:e}}function y1(t){return t.map(w1).sort((e,l)=>e.scorel.score?-1:e.index-l.index)}function wc(t,e){let l,n;const[o]=e.split("?"),s=wl(o),u=s[0]==="",c=y1(t);for(let f=0,p=c.length;f({...m,params:v,uri:y});if(m.default){n=w(e);continue}const k=wl(m.fullPath),g=Math.max(s.length,k.length);let C=0;for(;C{p===".."?f.pop():p!=="."&&f.push(p)}),Ls(`/${f.join("/")}`,n)}function pf(t,e){const{pathname:l,hash:n="",search:o="",state:s}=t,u=wl(e,!0),c=wl(l,!0);for(;u.length;)u[0]!==c[0]&&kc(Pn,`Invalid state: All locations must begin with the basepath "${e}", found "${l}"`),u.shift(),c.shift();return{pathname:$o(...c),hash:n,search:o,state:s}}const cf=t=>t.length===1?"":t,ru=t=>{const e=t.indexOf("?"),l=t.indexOf("#"),n=e!==-1,o=l!==-1,s=o?cf(ho(t,l)):"",u=o?ho(t,0,l):t,c=n?cf(ho(u,e)):"";return{pathname:(n?ho(u,0,e):u)||"/",search:c,hash:s}},$1=t=>{const{pathname:e,search:l,hash:n}=t;return e+l+n};function S1(t,e,l){return $o(l,C1(t,e))}function P1(t,e){const l=su(r1(t)),n=wl(l,!0),o=wl(e,!0).slice(0,n.length),s=yc({fullPath:l},$o(...o));return s&&s.uri}const Us="POP",T1="PUSH",F1="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 I1(t){let e=[],l=Hs(t),n=Us;const o=(s=e)=>s.forEach(u=>u({location:l,action:n}));return{get location(){return l},listen(s){e.push(s);const u=()=>{l=Hs(t),n=Us,o([s])};o([s]);const c=rc(t,"popstate",u);return()=>{c(),e=e.filter(f=>f!==s)}},navigate(s,u){const{state:c={},replace:f=!1}=u||{};if(n=f?F1:T1,uc(s))u&&bs(hc,"Navigation options (state or replace) are not supported, when passing a number as the first argument to navigate. They are ignored."),n=Us,t.history.go(s);else{const p={...c,_key:n1()};try{t.history[f?"replaceState":"pushState"](p,"",s)}catch{t.location[f?"replace":"assign"](s)}}l=Hs(t),o()}}}function qs(t,e){return{...ru(e),state:t}}function A1(t="/"){let e=0,l=[qs(null,t)];return{get entries(){return l},get location(){return l[e]},addEventListener(){},removeEventListener(){},history:{get state(){return l[e].state},pushState(n,o,s){e++,l=l.slice(0,e),l.push(qs(n,s))},replaceState(n,o,s){l[e]=qs(n,s)},go(n){const o=e+n;o<0||o>l.length-1||(e=o)}}}}const M1=!!(!Bl&&window.document&&window.document.createElement),D1=!Bl&&window.location.origin==="null",Cc=I1(M1&&!D1?window:A1()),{navigate:no}=Cc;let Ml=null,$c=!0;function N1(t,e){const l=document.querySelectorAll("[data-svnav-router]");for(let n=0;nMl.level||t.level===Ml.level&&N1(t.routerId,Ml.routerId))&&(Ml=t)}function O1(){Ml=null}function R1(){$c=!1}function mf(t){if(!t)return!1;const e="tabindex";try{if(!t.hasAttribute(e)){t.setAttribute(e,"-1");let l;l=rc(t,"blur",()=>{t.removeAttribute(e),l()})}return t.focus(),document.activeElement===t}catch{return!1}}function L1(t,e){return Number(t.dataset.svnavRouteEnd)===e}function U1(t){return/^H[1-6]$/i.test(t.tagName)}function _f(t,e=document){return e.querySelector(t)}function H1(t){let l=_f(`[data-svnav-route-start="${t}"]`).nextElementSibling;for(;!L1(l,t);){if(U1(l))return l;const n=_f("h1,h2,h3,h4,h5,h6",l);if(n)return n;l=l.nextElementSibling}return null}function q1(t){Promise.resolve(oo(t.focusElement)).then(e=>{const l=e||H1(t.id);l||bs(Pn,`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,ks),!mf(l)&&mf(document.documentElement)})}const G1=(t,e,l)=>(n,o)=>xc().then(()=>{if(!Ml||$c){R1();return}if(n&&q1(Ml.route),t.announcements&&o){const{path:s,fullPath:u,meta:c,params:f,uri:p}=Ml.route,m=t.createAnnouncement({path:s,fullPath:u,meta:c,params:f,uri:p},oo(l));Promise.resolve(m).then(_=>{e.set(_)})}O1()}),df="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 W1(t){let e,l,n=[{role:"status"},{"aria-atomic":"true"},{"aria-live":"polite"},{"data-svnav-announcer":""},zs(t[6],df)],o={};for(let s=0;s`Navigated to ${J.uri}`,announcements:!0,...k},y=m,S=su(m),I=zl(Bs),D=zl(uo),A=!I,M=z1(),z=w&&!(D&&!D.manageFocus),R=ft("");hl(t,R,J=>l(0,c=J));const L=D?D.disableInlineStyles:g,T=ft([]);hl(t,T,J=>l(20,u=J));const P=ft(null);hl(t,P,J=>l(18,o=J));let N=!1;const q=A?0:D.level+1,U=A?ft((()=>pf(Bl?ru(_):v.location,S))()):I;hl(t,U,J=>l(17,n=J));const G=ft(n);hl(t,G,J=>l(19,s=J));const W=G1(C,R,U),Z=J=>H=>H.filter(ne=>ne.id!==J);function K(J){if(Bl){if(N)return;const H=yc(J,n.pathname);if(H)return N=!0,H}else T.update(H=>{const ne=Z(J.id)(H);return ne.push(J),ne})}function te(J){T.update(Z(J))}return!A&&m!==vf&&bs(Pn,'Only top-level Routers can have a "basepath" prop. It is ignored.',{basepath:m}),A&&(Zc(()=>v.listen(H=>{const ne=pf(H.location,S);G.set(n),U.set(ne)})),ko(Bs,U)),ko(uo,{activeRoute:P,registerRoute:K,unregisterRoute:te,manageFocus:z,level:q,id:M,history:A?v:D.history,basepath:A?S:D.basepath,disableInlineStyles:L}),t.$$set=J=>{"basepath"in J&&l(11,m=J.basepath),"url"in J&&l(12,_=J.url),"history"in J&&l(13,v=J.history),"primary"in J&&l(14,w=J.primary),"a11y"in J&&l(15,k=J.a11y),"disableInlineStyles"in J&&l(16,g=J.disableInlineStyles),"$$scope"in J&&l(21,p=J.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&2048&&m!==y&&bs(Pn,'You cannot change the "basepath" prop. It is ignored.'),t.$$.dirty[0]&1179648){const J=wc(u,n.pathname);P.set(J)}if(t.$$.dirty[0]&655360&&A){const J=!!n.hash,H=!J&&z,ne=!J||n.pathname!==s.pathname;W(H,ne)}t.$$.dirty[0]&262144&&z&&o&&o.primary&&E1({level:q,routerId:M,route:o})},[c,C,A,M,z,R,L,T,P,U,G,m,_,v,w,k,g,n,o,s,u,p,f]}class Sc extends Ae{constructor(e){super(),Ie(this,e,B1,j1,Se,{basepath:11,url:12,history:13,primary:14,a11y:15,disableInlineStyles:16},null,[-1,-1])}}function So(t,e,l=uo,n=Pn){zl(l)||kc(t,s=>`You cannot use ${s} outside of a ${au(n)}.`,e)}const Y1=t=>{const{subscribe:e}=zl(t);return{subscribe:e}};function Pc(){return So(dc),Y1(Bs)}function Tc(){const{history:t}=zl(uo);return t}function Fc(){const t=zl(pc);return t?i1(t,e=>e.base):ft("/")}function Ic(){So(bc);const t=Fc(),{basepath:e}=zl(uo);return n=>S1(n,oo(t),e)}function V1(){So(vc);const t=Ic(),{navigate:e}=Tc();return(n,o)=>{const s=uc(n)?n:t(n);return e(s,o)}}const K1=t=>({params:t&16,location:t&8}),bf=t=>({params:Bl?oo(t[10]):t[4],location:t[3],navigate:t[11]});function hf(t){let e,l;return e=new Sc({props:{primary:t[1],$$slots:{default:[J1]},$$scope:{ctx:t}}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&2&&(s.primary=n[1]),o&528409&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Q1(t){let e;const l=t[18].default,n=lu(l,t,t[19],bf);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),e=!0},p(o,s){n&&n.p&&(!e||s&524312)&&iu(n,l,o,o[19],e?nu(l,o[19],s,K1):ou(o[19]),bf)},i(o){e||(F(n,o),e=!0)},o(o){O(n,o),e=!1},d(o){n&&n.d(o)}}}function Z1(t){let e,l,n;const o=[{location:t[3]},{navigate:t[11]},Bl?oo(t[10]):t[4],t[12]];var s=t[0];function u(c){let f={};for(let p=0;p{x(m,1)}),De()}s?(e=new s(u()),ee(e.$$.fragment),F(e.$$.fragment,1),X(e,l.parentNode,l)):e=null}else s&&e.$set(p)},i(c){n||(e&&F(e.$$.fragment,c),n=!0)},o(c){e&&O(e.$$.fragment,c),n=!1},d(c){c&&b(l),e&&x(e,c)}}}function J1(t){let e,l,n,o;const s=[Z1,Q1],u=[];function c(f,p){return f[0]!==null?0:1}return e=c(t),l=u[e]=s[e](t),{c(){l.c(),n=Qe()},m(f,p){u[e].m(f,p),h(f,n,p),o=!0},p(f,p){let m=e;e=c(f),e===m?u[e].p(f,p):(Me(),O(u[m],1,1,()=>{u[m]=null}),De(),l=u[e],l?l.p(f,p):(l=u[e]=s[e](f),l.c()),F(l,1),l.m(n.parentNode,n))},i(f){o||(F(l),o=!0)},o(f){O(l),o=!1},d(f){u[e].d(f),f&&b(n)}}}function X1(t){let e,l,n,o,s,u=[lo(t[7]),{"data-svnav-route-start":t[5]}],c={};for(let _=0;_{f=null}),De()),gl(o,m=so(p,[lo(_[7]),{"data-svnav-route-end":_[5]}]))},i(_){s||(F(f),s=!0)},o(_){O(f),s=!1},d(_){_&&b(e),_&&b(l),f&&f.d(_),_&&b(n),_&&b(o)}}}const x1=ac();function e0(t,e,l){let n;const o=["path","component","meta","primary"];let s=ds(e,o),u,c,f,p,{$$slots:m={},$$scope:_}=e,{path:v=""}=e,{component:w=null}=e,{meta:k={}}=e,{primary:g=!0}=e;So(ks,e);const C=x1(),{registerRoute:y,unregisterRoute:S,activeRoute:I,disableInlineStyles:D}=zl(uo);hl(t,I,N=>l(16,u=N));const A=Fc();hl(t,A,N=>l(17,f=N));const M=Pc();hl(t,M,N=>l(3,c=N));const z=ft(null);let R;const L=ft(),T=ft({});hl(t,T,N=>l(4,p=N)),ko(pc,L),ko(o1,T),ko(s1,z);const P=V1();return Bl||Jc(()=>S(C)),t.$$set=N=>{l(24,e=pl(pl({},e),_s(N))),l(12,s=ds(e,o)),"path"in N&&l(13,v=N.path),"component"in N&&l(0,w=N.component),"meta"in N&&l(14,k=N.meta),"primary"in N&&l(1,g=N.primary),"$$scope"in N&&l(19,_=N.$$scope)},t.$$.update=()=>{if(t.$$.dirty&155658){const N=v==="",q=$o(f,v),Q={id:C,path:v,meta:k,default:N,fullPath:N?"":q,base:N?f:P1(q,c.pathname),primary:g,focusElement:z};L.set(Q),l(15,R=y(Q))}if(t.$$.dirty&98304&&l(2,n=!!(R||u&&u.id===C)),t.$$.dirty&98308&&n){const{params:N}=R||u;T.set(N)}},e=_s(e),[w,g,n,c,p,C,I,D,A,M,T,P,s,v,k,R,u,f,m,_]}class Al extends Ae{constructor(e){super(),Ie(this,e,e0,X1,Se,{path:13,component:0,meta:14,primary:1})}}function t0(t){let e,l,n,o;const s=t[13].default,u=lu(s,t,t[12],null);let c=[{href:t[0]},t[2],t[1]],f={};for(let p=0;pl(11,_=z));const I=Xc(),D=Ic(),{navigate:A}=Tc();function M(z){I("click",z),l1(z)&&(z.preventDefault(),A(n,{state:C,replace:u||g}))}return t.$$set=z=>{l(19,e=pl(pl({},e),_s(z))),l(18,m=ds(e,p)),"to"in z&&l(5,k=z.to),"replace"in z&&l(6,g=z.replace),"state"in z&&l(7,C=z.state),"getProps"in z&&l(8,y=z.getProps),"$$scope"in z&&l(12,w=z.$$scope)},t.$$.update=()=>{t.$$.dirty&2080&&l(0,n=D(k,_)),t.$$.dirty&2049&&l(10,o=Ys(_.pathname,n)),t.$$.dirty&2049&&l(9,s=n===_.pathname),t.$$.dirty&2049&&(u=ru(n)===$1(_)),t.$$.dirty&512&&l(2,c=s?{"aria-current":"page"}:{}),l(1,f=(()=>{if(sc(y)){const z=y({location:_,href:n,isPartiallyCurrent:o,isCurrent:s});return{...m,...z}}return m})())},e=_s(e),[n,f,c,S,M,k,g,C,y,s,o,_,w,v]}class Sn extends Ae{constructor(e){super(),Ie(this,e,l0,t0,Se,{to:5,replace:6,state:7,getProps:8})}}let Vs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Gs(t){return t>218&&t<242?"#32d900":t>212&&t<248?"#b1d900":t>208&&t<252?"#ffb800":"#d90000"}function ms(t){return t>90?"#d90000":t>85?"#e32100":t>80?"#ffb800":t>75?"#dcd800":"#32d900"}function n0(t){return t>75?"#32d900":t>50?"#77d900":t>25?"#94d900":"#dcd800"}function hs(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 Ne(t){for(t=t.toString();t.length<2;)t="0"+t;return t}function ye(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 3:return"Pow-K (UART0)";case 4:return"Pow-U (UART0)";case 101:return"Wemos D1 mini";case 100:return"Generic ESP8266"}}function gf(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 last 30s";case 98:return"Exception in code, debugging necessary";case 99:return"Autodetection failed"}return t<0?"Unspecified error "+t:""}function kf(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 wf(t){switch(t){case 401:case 403:return"Unauthorized, check API key";case 404:return"Price unavailable, not found";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 io(t){switch(t){case 2:case 4:case 7:return!0}return!1}function Ke(t,e){return t==1||t==2&&e}async function Yl(t,e={}){const{timeout:l=8e3}=e,n=new AbortController,o=setTimeout(()=>n.abort(),l),s=await fetch(t,{...e,signal:n.signal});return clearTimeout(o),s}let bl={version:"",chip:"",mac:null,apmac:null,vndcfg:null,usrcfg:null,fwconsent:null,booting:!1,upgrading:!1,ui:{},security:0,trying:null};const qt=ft(bl);async function fu(){bl=await(await Yl("/sysinfo.json?t="+Math.floor(Date.now()/1e3))).json(),qt.set(bl)}let as=0,yf=-127,Cf=null,i0={};const o0=fc(i0,t=>{let e;async function l(){Yl("/data.json").then(n=>n.json()).then(n=>{t(n),yf!=n.t&&(yf=n.t,setTimeout(Nc,2e3)),Cf!=n.p&&(Cf=n.p,setTimeout(s0,4e3)),bl.upgrading?window.location.reload():(!bl||!bl.chip||bl.booting||as>1&&!io(bl.board))&&(fu(),Cn&&clearTimeout(Cn),Cn=setTimeout(pu,2e3),$n&&clearTimeout($n),$n=setTimeout(cu,3e3));let o=5e3;if(io(bl.board)&&n.v>2.5){let s=3.3-Math.min(3.3,n.v);s>0&&(o=Math.max(s,.1)*10*5e3)}o>5e3&&console.log("Scheduling next data fetch in "+o+"ms"),e&&clearTimeout(e),e=setTimeout(l,o),as=0}).catch(n=>{as++,as>3?(t({em:3,hm:0,wm:0,mm:0}),e=setTimeout(l,15e3)):e=setTimeout(l,io(bl.board)?1e4:5e3)})}return l(),function(){clearTimeout(e)}});let Ks={};const Ac=ft(Ks);async function s0(){Ks=await(await Yl("/energyprice.json")).json(),Ac.set(Ks)}let Qs={},Cn;async function pu(){Cn&&(clearTimeout(Cn),Cn=0),Qs=await(await Yl("/dayplot.json")).json(),Mc.set(Qs);let e=new Date;Cn=setTimeout(pu,(60-e.getMinutes())*6e4+20)}const Mc=ft(Qs,t=>(pu(),function(){}));let Zs={},$n;async function cu(){$n&&(clearTimeout($n),$n=0),Zs=await(await Yl("/monthplot.json")).json(),Dc.set(Zs);let e=new Date;$n=setTimeout(cu,(24-e.getHours())*36e5+40)}const Dc=ft(Zs,t=>(cu(),function(){}));let Js={};async function Nc(){Js=await(await Yl("/temperature.json")).json(),Ec.set(Js)}const Ec=ft(Js,t=>(Nc(),function(){}));let Xs={},rs;async function Oc(){rs&&(clearTimeout(rs),rs=0),Xs=await(await Yl("/tariff.json")).json(),Rc.set(Xs);let e=new Date;rs=setTimeout(Oc,(60-e.getMinutes())*6e4+30)}const Rc=ft(Xs,t=>function(){});let xs=[];const mu=ft(xs);async function u0(){xs=await(await Yl("https://api.github.com/repos/UtilitechAS/amsreader-firmware/releases")).json(),mu.set(xs)}async function Lc(t){const e=new URLSearchParams;e.append("version",t.tag_name),await(await fetch("/upgrade",{method:"POST",body:e})).json()}function Uc(t,e){if(/^v\d{1,2}\.\d{1,2}\.\d{1,2}$/.test(t)){var l=t.substring(1).split("."),n=parseInt(l[0]),o=parseInt(l[1]),s=parseInt(l[2]);e.reverse();for(var u,c,f,p=0;ps&&(u=m):k==o+1&&(c=m);else if(w==n+1)if(f){var C=f.tag_name.substring(1).split(".");parseInt(C[0]);var y=parseInt(C[1]);parseInt(C[2]),k==y&&(f=m)}else f=m}return c||f||u||!1}else return e[0]}const a0="/github.svg";function $f(t){let e,l;function n(u,c){return u[1]>1?d0:u[1]>0?_0:u[2]>1?m0:u[2]>0?c0:u[3]>1?p0:u[3]>0?f0:r0}let o=n(t),s=o(t);return{c(){e=$(`Up + `),s.c(),l=Qe()},m(u,c){h(u,e,c),s.m(u,c),h(u,l,c)},p(u,c){o===(o=n(u))&&s?s.p(u,c):(s.d(1),s=o(u),s&&(s.c(),s.m(l.parentNode,l)))},d(u){u&&b(e),s.d(u),u&&b(l)}}}function r0(t){let e,l;return{c(){e=$(t[0]),l=$(" seconds")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&1&&V(e,n[0])},d(n){n&&b(e),n&&b(l)}}}function f0(t){let e,l;return{c(){e=$(t[3]),l=$(" minute")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&8&&V(e,n[3])},d(n){n&&b(e),n&&b(l)}}}function p0(t){let e,l;return{c(){e=$(t[3]),l=$(" minutes")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&8&&V(e,n[3])},d(n){n&&b(e),n&&b(l)}}}function c0(t){let e,l;return{c(){e=$(t[2]),l=$(" hour")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&4&&V(e,n[2])},d(n){n&&b(e),n&&b(l)}}}function m0(t){let e,l;return{c(){e=$(t[2]),l=$(" hours")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&4&&V(e,n[2])},d(n){n&&b(e),n&&b(l)}}}function _0(t){let e,l;return{c(){e=$(t[1]),l=$(" day")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&2&&V(e,n[1])},d(n){n&&b(e),n&&b(l)}}}function d0(t){let e,l;return{c(){e=$(t[1]),l=$(" days")},m(n,o){h(n,e,o),h(n,l,o)},p(n,o){o&2&&V(e,n[1])},d(n){n&&b(e),n&&b(l)}}}function v0(t){let e,l=t[0]&&$f(t);return{c(){l&&l.c(),e=Qe()},m(n,o){l&&l.m(n,o),h(n,e,o)},p(n,[o]){n[0]?l?l.p(n,o):(l=$f(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:fe,o:fe,d(n){l&&l.d(n),n&&b(e)}}}function b0(t,e,l){let{epoch:n}=e,o=0,s=0,u=0;return t.$$set=c=>{"epoch"in c&&l(0,n=c.epoch)},t.$$.update=()=>{t.$$.dirty&1&&(l(1,o=Math.floor(n/86400)),l(2,s=Math.floor(n/3600)),l(3,u=Math.floor(n/60)))},[n,o,s,u]}class h0 extends Ae{constructor(e){super(),Ie(this,e,b0,v0,Se,{epoch:0})}}function g0(t){let e,l;return{c(){e=r("span"),l=$(t[2]),a(e,"title",t[1]),a(e,"class","bd-gry")},m(n,o){h(n,e,o),i(e,l)},p(n,o){o&4&&V(l,n[2]),o&2&&a(e,"title",n[1])},d(n){n&&b(e)}}}function k0(t){let e,l;return{c(){e=r("span"),l=$(t[2]),a(e,"title",t[1]),a(e,"class","bd-blu")},m(n,o){h(n,e,o),i(e,l)},p(n,o){o&4&&V(l,n[2]),o&2&&a(e,"title",n[1])},d(n){n&&b(e)}}}function w0(t){let e,l;return{c(){e=r("span"),l=$(t[2]),a(e,"title",t[1]),a(e,"class","bd-red")},m(n,o){h(n,e,o),i(e,l)},p(n,o){o&4&&V(l,n[2]),o&2&&a(e,"title",n[1])},d(n){n&&b(e)}}}function y0(t){let e,l;return{c(){e=r("span"),l=$(t[2]),a(e,"title",t[1]),a(e,"class","bd-ylo")},m(n,o){h(n,e,o),i(e,l)},p(n,o){o&4&&V(l,n[2]),o&2&&a(e,"title",n[1])},d(n){n&&b(e)}}}function C0(t){let e,l;return{c(){e=r("span"),l=$(t[2]),a(e,"title",t[1]),a(e,"class","bd-grn")},m(n,o){h(n,e,o),i(e,l)},p(n,o){o&4&&V(l,n[2]),o&2&&a(e,"title",n[1])},d(n){n&&b(e)}}}function $0(t){let e;function l(s,u){if(s[0]=="green")return C0;if(s[0]==="yellow")return y0;if(s[0]==="red")return w0;if(s[0]==="blue")return k0;if(s[0]==="gray")return g0}let n=l(t),o=n&&n(t);return{c(){o&&o.c(),e=Qe()},m(s,u){o&&o.m(s,u),h(s,e,u)},p(s,[u]){n===(n=l(s))&&o?o.p(s,u):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(e.parentNode,e)))},i:fe,o:fe,d(s){o&&o.d(s),s&&b(e)}}}function S0(t,e,l){let{color:n}=e,{title:o}=e,{text:s}=e;return t.$$set=u=>{"color"in u&&l(0,n=u.color),"title"in u&&l(1,o=u.title),"text"in u&&l(2,s=u.text)},[n,o,s]}class kl extends Ae{constructor(e){super(),Ie(this,e,S0,$0,Se,{color:0,title:1,text:2})}}function P0(t){let e,l=`${Ne(t[0].getDate())}.${Ne(t[0].getMonth())}.${t[0].getFullYear()} ${Ne(t[0].getHours())}:${Ne(t[0].getMinutes())}`,n;return{c(){e=r("span"),n=$(l),a(e,"class","text-red-500")},m(o,s){h(o,e,s),i(e,n)},p(o,s){s&1&&l!==(l=`${Ne(o[0].getDate())}.${Ne(o[0].getMonth())}.${o[0].getFullYear()} ${Ne(o[0].getHours())}:${Ne(o[0].getMinutes())}`)&&V(n,l)},d(o){o&&b(e)}}}function T0(t){let e=`${Ne(t[0].getDate())}. ${Vs[t[0].getMonth()]} ${Ne(t[0].getHours())}:${Ne(t[0].getMinutes())}`,l;return{c(){l=$(e)},m(n,o){h(n,l,o)},p(n,o){o&1&&e!==(e=`${Ne(n[0].getDate())}. ${Vs[n[0].getMonth()]} ${Ne(n[0].getHours())}:${Ne(n[0].getMinutes())}`)&&V(l,e)},d(n){n&&b(l)}}}function F0(t){let e,l;function n(u,c){return c&1&&(e=null),e==null&&(e=Math.abs(new Date().getTime()-u[0].getTime())<3e5),e?T0:P0}let o=n(t,-1),s=o(t);return{c(){s.c(),l=Qe()},m(u,c){s.m(u,c),h(u,l,c)},p(u,[c]){o===(o=n(u,c))&&s?s.p(u,c):(s.d(1),s=o(u),s&&(s.c(),s.m(l.parentNode,l)))},i:fe,o:fe,d(u){s.d(u),u&&b(l)}}}function I0(t,e,l){let{timestamp:n}=e;return t.$$set=o=>{"timestamp"in o&&l(0,n=o.timestamp)},[n]}class A0 extends Ae{constructor(e){super(),Ie(this,e,I0,F0,Se,{timestamp:0})}}function M0(t){let e,l,n;return{c(){e=je("svg"),l=je("path"),n=je("path"),a(l,"stroke-linecap","round"),a(l,"stroke-linejoin","round"),a(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"),a(n,"stroke-linecap","round"),a(n,"stroke-linejoin","round"),a(n,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"fill","none"),a(e,"viewBox","0 0 24 24"),a(e,"stroke-width","1.5"),a(e,"stroke","currentColor"),a(e,"class","w-6 h-6")},m(o,s){h(o,e,s),i(e,l),i(e,n)},p:fe,i:fe,o:fe,d(o){o&&b(e)}}}class D0 extends Ae{constructor(e){super(),Ie(this,e,null,M0,Se,{})}}function N0(t){let e,l;return{c(){e=je("svg"),l=je("path"),a(l,"stroke-linecap","round"),a(l,"stroke-linejoin","round"),a(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"),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"fill","none"),a(e,"viewBox","0 0 24 24"),a(e,"stroke-width","1.5"),a(e,"stroke","currentColor"),a(e,"class","w-6 h-6")},m(n,o){h(n,e,o),i(e,l)},p:fe,i:fe,o:fe,d(n){n&&b(e)}}}class E0 extends Ae{constructor(e){super(),Ie(this,e,null,N0,Se,{})}}function O0(t){let e,l;return{c(){e=je("svg"),l=je("path"),a(l,"stroke-linecap","round"),a(l,"stroke-linejoin","round"),a(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"),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"fill","none"),a(e,"viewBox","0 0 24 24"),a(e,"stroke-width","1.5"),a(e,"stroke","currentColor"),a(e,"class","w-6 h-6")},m(n,o){h(n,e,o),i(e,l)},p:fe,i:fe,o:fe,d(n){n&&b(e)}}}class fl extends Ae{constructor(e){super(),Ie(this,e,null,O0,Se,{})}}function R0(t){let e,l;return{c(){e=je("svg"),l=je("path"),a(l,"stroke-linecap","round"),a(l,"stroke-linejoin","round"),a(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"),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"fill","none"),a(e,"viewBox","0 0 24 24"),a(e,"stroke-width","1.5"),a(e,"stroke","currentColor"),a(e,"class","w-6 h-6")},m(n,o){h(n,e,o),i(e,l)},p:fe,i:fe,o:fe,d(n){n&&b(e)}}}class Hc extends Ae{constructor(e){super(),Ie(this,e,null,R0,Se,{})}}function L0(t){let e,l,n=t[1].version+"",o;return{c(){e=$("AMS reader "),l=r("span"),o=$(n)},m(s,u){h(s,e,u),h(s,l,u),i(l,o)},p(s,u){u&2&&n!==(n=s[1].version+"")&&V(o,n)},d(s){s&&b(e),s&&b(l)}}}function Sf(t){let e,l=(t[0].t>-50?t[0].t.toFixed(1):"-")+"",n,o;return{c(){e=r("div"),n=$(l),o=$("\xB0C"),a(e,"class","flex-none my-auto")},m(s,u){h(s,e,u),i(e,n),i(e,o)},p(s,u){u&1&&l!==(l=(s[0].t>-50?s[0].t.toFixed(1):"-")+"")&&V(n,l)},d(s){s&&b(e)}}}function Pf(t){let e,l="HAN: "+gf(t[0].he),n;return{c(){e=r("div"),n=$(l),a(e,"class","bd-red")},m(o,s){h(o,e,s),i(e,n)},p(o,s){s&1&&l!==(l="HAN: "+gf(o[0].he))&&V(n,l)},d(o){o&&b(e)}}}function Tf(t){let e,l="MQTT: "+kf(t[0].me),n;return{c(){e=r("div"),n=$(l),a(e,"class","bd-red")},m(o,s){h(o,e,s),i(e,n)},p(o,s){s&1&&l!==(l="MQTT: "+kf(o[0].me))&&V(n,l)},d(o){o&&b(e)}}}function Ff(t){let e,l="PriceAPI: "+wf(t[0].ee),n;return{c(){e=r("div"),n=$(l),a(e,"class","bd-red")},m(o,s){h(o,e,s),i(e,n)},p(o,s){s&1&&l!==(l="PriceAPI: "+wf(o[0].ee))&&V(n,l)},d(o){o&&b(e)}}}function If(t){let e,l,n,o,s,u;return l=new Sn({props:{to:"/configuration",$$slots:{default:[U0]},$$scope:{ctx:t}}}),s=new Sn({props:{to:"/status",$$slots:{default:[H0]},$$scope:{ctx:t}}}),{c(){e=r("div"),ee(l.$$.fragment),n=d(),o=r("div"),ee(s.$$.fragment),a(e,"class","flex-none px-1 mt-1"),a(e,"title","Configuration"),a(o,"class","flex-none px-1 mt-1"),a(o,"title","Device information")},m(c,f){h(c,e,f),X(l,e,null),h(c,n,f),h(c,o,f),X(s,o,null),u=!0},i(c){u||(F(l.$$.fragment,c),F(s.$$.fragment,c),u=!0)},o(c){O(l.$$.fragment,c),O(s.$$.fragment,c),u=!1},d(c){c&&b(e),x(l),c&&b(n),c&&b(o),x(s)}}}function U0(t){let e,l;return e=new D0({}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function H0(t){let e,l;return e=new E0({}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Af(t){let e,l,n,o,s;const u=[G0,q0],c=[];function f(p,m){return p[1].security==0||p[0].a?0:1}return l=f(t),n=c[l]=u[l](t),{c(){e=r("div"),n.c(),a(e,"class","flex-none mr-3 text-yellow-500"),a(e,"title",o="New version: "+t[2].tag_name)},m(p,m){h(p,e,m),c[l].m(e,null),s=!0},p(p,m){let _=l;l=f(p),l===_?c[l].p(p,m):(Me(),O(c[_],1,1,()=>{c[_]=null}),De(),n=c[l],n?n.p(p,m):(n=c[l]=u[l](p),n.c()),F(n,1),n.m(e,null)),(!s||m&4&&o!==(o="New version: "+p[2].tag_name))&&a(e,"title",o)},i(p){s||(F(n),s=!0)},o(p){O(n),s=!1},d(p){p&&b(e),c[l].d()}}}function q0(t){let e,l,n=t[2].tag_name+"",o;return{c(){e=r("span"),l=$("New version: "),o=$(n)},m(s,u){h(s,e,u),i(e,l),i(e,o)},p(s,u){u&4&&n!==(n=s[2].tag_name+"")&&V(o,n)},i:fe,o:fe,d(s){s&&b(e)}}}function G0(t){let e,l,n,o=t[2].tag_name+"",s,u,c,f,p,m;return c=new Hc({}),{c(){e=r("button"),l=r("span"),n=$("New version: "),s=$(o),u=d(),ee(c.$$.fragment),a(l,"class","mt-1"),a(e,"class","flex")},m(_,v){h(_,e,v),i(e,l),i(l,n),i(l,s),i(e,u),X(c,e,null),f=!0,p||(m=B(e,"click",t[3]),p=!0)},p(_,v){(!f||v&4)&&o!==(o=_[2].tag_name+"")&&V(s,o)},i(_){f||(F(c.$$.fragment,_),f=!0)},o(_){O(c.$$.fragment,_),f=!1},d(_){_&&b(e),x(c),p=!1,m()}}}function W0(t){let e,l,n,o,s,u,c,f,p,m,_,v,w=(t[0].m?(t[0].m/1e3).toFixed(1):"-")+"",k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G,W,Z,K,te,J,H,ne,Ce,ge,Ee,he;o=new Sn({props:{to:"/",$$slots:{default:[L0]},$$scope:{ctx:t}}}),f=new h0({props:{epoch:t[0].u}});let ve=t[0].t>-50&&Sf(t);S=new kl({props:{title:"ESP",text:t[1].booting?"Booting":t[0].v>2?t[0].v.toFixed(2)+"V":"ESP",color:t[1].booting?"yellow":t[0].em===1?"green":t[0].em===2?"yellow":t[0].em===3?"red":"gray"}}),D=new kl({props:{title:"HAN",text:"HAN",color:t[1].booting?"gray":t[0].hm===1?"green":t[0].hm===2?"yellow":t[0].hm===3?"red":"gray"}}),M=new kl({props:{title:"WiFi",text:t[0].r?t[0].r.toFixed(0)+"dBm":"WiFi",color:t[1].booting?"gray":t[0].wm===1?"green":t[0].wm===2?"yellow":t[0].wm===3?"red":"gray"}}),R=new kl({props:{title:"MQTT",text:"MQTT",color:t[1].booting?"gray":t[0].mm===1?"green":t[0].mm===2?"yellow":t[0].mm===3?"red":"gray"}});let ae=(t[0].he<0||t[0].he>0)&&Pf(t),ke=t[0].me<0&&Tf(t),_e=(t[0].ee>0||t[0].ee<0)&&Ff(t);te=new A0({props:{timestamp:t[0].c?new Date(t[0].c*1e3):new Date(0)}});let le=t[1].vndcfg&&t[1].usrcfg&&If(t);ge=new fl({});let ue=t[1].fwconsent===1&&t[2]&&Af(t);return{c(){e=r("nav"),l=r("div"),n=r("div"),ee(o.$$.fragment),s=d(),u=r("div"),c=r("div"),ee(f.$$.fragment),p=d(),ve&&ve.c(),m=d(),_=r("div"),v=$("Free mem: "),k=$(w),g=$("kb"),C=d(),y=r("div"),ee(S.$$.fragment),I=d(),ee(D.$$.fragment),A=d(),ee(M.$$.fragment),z=d(),ee(R.$$.fragment),L=d(),ae&&ae.c(),T=d(),ke&&ke.c(),P=d(),_e&&_e.c(),N=d(),q=r("div"),Q=r("div"),U=r("a"),G=r("img"),Z=d(),K=r("div"),ee(te.$$.fragment),J=d(),le&&le.c(),H=d(),ne=r("div"),Ce=r("a"),ee(ge.$$.fragment),Ee=d(),ue&&ue.c(),a(n,"class","flex text-lg text-gray-100 p-2"),a(c,"class","flex-none my-auto"),a(_,"class","flex-none my-auto"),a(u,"class","flex-none my-auto p-2 flex space-x-4"),a(y,"class","flex-auto flex-wrap my-auto justify-center p-2"),a(G,"class","gh-logo"),zc(G.src,W=a0)||a(G,"src",W),a(G,"alt","GitHub repo"),a(U,"class","float-right"),a(U,"href","https://github.com/UtilitechAS/amsreader-firmware"),a(U,"target","_blank"),a(U,"rel","noreferrer"),a(U,"aria-label","GitHub"),a(Q,"class","flex-none"),a(K,"class","flex-none my-auto px-2"),a(Ce,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki"),a(Ce,"target","_blank"),a(Ce,"rel","noreferrer"),a(ne,"class","flex-none px-1 mt-1"),a(ne,"title","Documentation"),a(q,"class","flex-auto p-2 flex flex-row-reverse flex-wrap"),a(l,"class","flex flex-wrap space-x-4 text-sm text-gray-300"),a(e,"class","bg-violet-600 p-1 rounded-md mx-2")},m(j,pe){h(j,e,pe),i(e,l),i(l,n),X(o,n,null),i(l,s),i(l,u),i(u,c),X(f,c,null),i(u,p),ve&&ve.m(u,null),i(u,m),i(u,_),i(_,v),i(_,k),i(_,g),i(l,C),i(l,y),X(S,y,null),i(y,I),X(D,y,null),i(y,A),X(M,y,null),i(y,z),X(R,y,null),i(l,L),ae&&ae.m(l,null),i(l,T),ke&&ke.m(l,null),i(l,P),_e&&_e.m(l,null),i(l,N),i(l,q),i(q,Q),i(Q,U),i(U,G),i(q,Z),i(q,K),X(te,K,null),i(q,J),le&&le.m(q,null),i(q,H),i(q,ne),i(ne,Ce),X(ge,Ce,null),i(q,Ee),ue&&ue.m(q,null),he=!0},p(j,[pe]){const $e={};pe&18&&($e.$$scope={dirty:pe,ctx:j}),o.$set($e);const we={};pe&1&&(we.epoch=j[0].u),f.$set(we),j[0].t>-50?ve?ve.p(j,pe):(ve=Sf(j),ve.c(),ve.m(u,m)):ve&&(ve.d(1),ve=null),(!he||pe&1)&&w!==(w=(j[0].m?(j[0].m/1e3).toFixed(1):"-")+"")&&V(k,w);const oe={};pe&3&&(oe.text=j[1].booting?"Booting":j[0].v>2?j[0].v.toFixed(2)+"V":"ESP"),pe&3&&(oe.color=j[1].booting?"yellow":j[0].em===1?"green":j[0].em===2?"yellow":j[0].em===3?"red":"gray"),S.$set(oe);const ce={};pe&3&&(ce.color=j[1].booting?"gray":j[0].hm===1?"green":j[0].hm===2?"yellow":j[0].hm===3?"red":"gray"),D.$set(ce);const ze={};pe&1&&(ze.text=j[0].r?j[0].r.toFixed(0)+"dBm":"WiFi"),pe&3&&(ze.color=j[1].booting?"gray":j[0].wm===1?"green":j[0].wm===2?"yellow":j[0].wm===3?"red":"gray"),M.$set(ze);const Pe={};pe&3&&(Pe.color=j[1].booting?"gray":j[0].mm===1?"green":j[0].mm===2?"yellow":j[0].mm===3?"red":"gray"),R.$set(Pe),j[0].he<0||j[0].he>0?ae?ae.p(j,pe):(ae=Pf(j),ae.c(),ae.m(l,T)):ae&&(ae.d(1),ae=null),j[0].me<0?ke?ke.p(j,pe):(ke=Tf(j),ke.c(),ke.m(l,P)):ke&&(ke.d(1),ke=null),j[0].ee>0||j[0].ee<0?_e?_e.p(j,pe):(_e=Ff(j),_e.c(),_e.m(l,N)):_e&&(_e.d(1),_e=null);const qe={};pe&1&&(qe.timestamp=j[0].c?new Date(j[0].c*1e3):new Date(0)),te.$set(qe),j[1].vndcfg&&j[1].usrcfg?le?pe&2&&F(le,1):(le=If(j),le.c(),F(le,1),le.m(q,H)):le&&(Me(),O(le,1,1,()=>{le=null}),De()),j[1].fwconsent===1&&j[2]?ue?(ue.p(j,pe),pe&6&&F(ue,1)):(ue=Af(j),ue.c(),F(ue,1),ue.m(q,null)):ue&&(Me(),O(ue,1,1,()=>{ue=null}),De())},i(j){he||(F(o.$$.fragment,j),F(f.$$.fragment,j),F(S.$$.fragment,j),F(D.$$.fragment,j),F(M.$$.fragment,j),F(R.$$.fragment,j),F(te.$$.fragment,j),F(le),F(ge.$$.fragment,j),F(ue),he=!0)},o(j){O(o.$$.fragment,j),O(f.$$.fragment,j),O(S.$$.fragment,j),O(D.$$.fragment,j),O(M.$$.fragment,j),O(R.$$.fragment,j),O(te.$$.fragment,j),O(le),O(ge.$$.fragment,j),O(ue),he=!1},d(j){j&&b(e),x(o),x(f),ve&&ve.d(),x(S),x(D),x(M),x(R),ae&&ae.d(),ke&&ke.d(),_e&&_e.d(),x(te),le&&le.d(),x(ge),ue&&ue.d()}}}function j0(t,e,l){let{data:n={}}=e,o={},s={};function u(){confirm("Do you want to upgrade this device to "+s.tag_name+"?")&&(!io(o.board)||confirm("WARNING: "+ye(o.chip,o.board)+" 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."))&&(qt.update(c=>(c.upgrading=!0,c)),Lc(s))}return qt.subscribe(c=>{l(1,o=c),c.fwconsent===1&&u0()}),mu.subscribe(c=>{l(2,s=Uc(o.version,c))}),t.$$set=c=>{"data"in c&&l(0,n=c.data)},[n,o,s,u]}class z0 extends Ae{constructor(e){super(),Ie(this,e,j0,W0,Se,{data:0})}}function B0(t){let e,l,n,o;return{c(){e=je("svg"),l=je("path"),n=je("path"),a(l,"d",Ws(150,150,115,210,510)),a(l,"stroke","#eee"),a(l,"fill","none"),a(l,"stroke-width","55"),a(n,"d",o=Ws(150,150,115,210,210+300*t[0]/100)),a(n,"stroke",t[1]),a(n,"fill","none"),a(n,"stroke-width","55"),a(e,"viewBox","0 0 300 300"),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"height","100%")},m(s,u){h(s,e,u),i(e,l),i(e,n)},p(s,[u]){u&1&&o!==(o=Ws(150,150,115,210,210+300*s[0]/100))&&a(n,"d",o),u&2&&a(n,"stroke",s[1])},i:fe,o:fe,d(s){s&&b(e)}}}function Mf(t,e,l,n){var o=(n-90)*Math.PI/180;return{x:t+l*Math.cos(o),y:e+l*Math.sin(o)}}function Ws(t,e,l,n,o){var s=Mf(t,e,l,o),u=Mf(t,e,l,n),c=o-n<=180?"0":"1",f=["M",s.x,s.y,"A",l,l,0,c,0,u.x,u.y].join(" ");return f}function Y0(t,e,l){let{pct:n=0}=e,{color:o="red"}=e;return t.$$set=s=>{"pct"in s&&l(0,n=s.pct),"color"in s&&l(1,o=s.color)},[n,o]}class V0 extends Ae{constructor(e){super(),Ie(this,e,Y0,B0,Se,{pct:0,color:1})}}function Df(t){let e,l,n,o,s,u,c,f;return{c(){e=r("br"),l=d(),n=r("span"),o=$(t[3]),s=d(),u=r("span"),c=$(t[4]),f=$("/kWh"),a(n,"class","pl-sub"),a(u,"class","pl-snt")},m(p,m){h(p,e,m),h(p,l,m),h(p,n,m),i(n,o),h(p,s,m),h(p,u,m),i(u,c),i(u,f)},p(p,m){m&8&&V(o,p[3]),m&16&&V(c,p[4])},d(p){p&&b(e),p&&b(l),p&&b(n),p&&b(s),p&&b(u)}}}function K0(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C;l=new V0({props:{pct:t[6],color:t[5](t[6])}});let y=t[3]&&Df(t);return{c(){e=r("div"),ee(l.$$.fragment),n=d(),o=r("span"),s=r("span"),u=$(t[2]),c=d(),f=r("br"),p=d(),m=r("span"),_=$(t[0]),v=d(),w=r("span"),k=$(t[1]),g=d(),y&&y.c(),a(s,"class","pl-lab"),a(m,"class","pl-val"),a(w,"class","pl-unt"),a(o,"class","pl-ov"),a(e,"class","pl-root")},m(S,I){h(S,e,I),X(l,e,null),i(e,n),i(e,o),i(o,s),i(s,u),i(o,c),i(o,f),i(o,p),i(o,m),i(m,_),i(o,v),i(o,w),i(w,k),i(o,g),y&&y.m(o,null),C=!0},p(S,[I]){const D={};I&64&&(D.pct=S[6]),I&96&&(D.color=S[5](S[6])),l.$set(D),(!C||I&4)&&V(u,S[2]),(!C||I&1)&&V(_,S[0]),(!C||I&2)&&V(k,S[1]),S[3]?y?y.p(S,I):(y=Df(S),y.c(),y.m(o,null)):y&&(y.d(1),y=null)},i(S){C||(F(l.$$.fragment,S),C=!0)},o(S){O(l.$$.fragment,S),C=!1},d(S){S&&b(e),x(l),y&&y.d()}}}function Q0(t,e,l){let{val:n}=e,{max:o}=e,{unit:s}=e,{label:u}=e,{sub:c=""}=e,{subunit:f=""}=e,{colorFn:p}=e,m=0;return t.$$set=_=>{"val"in _&&l(0,n=_.val),"max"in _&&l(7,o=_.max),"unit"in _&&l(1,s=_.unit),"label"in _&&l(2,u=_.label),"sub"in _&&l(3,c=_.sub),"subunit"in _&&l(4,f=_.subunit),"colorFn"in _&&l(5,p=_.colorFn)},t.$$.update=()=>{t.$$.dirty&129&&l(6,m=Math.min(n,o)/o*100)},[n,s,u,c,f,p,m,o]}class qc extends Ae{constructor(e){super(),Ie(this,e,Q0,K0,Se,{val:0,max:7,unit:1,label:2,sub:3,subunit:4,colorFn:5})}}function Nf(t,e,l){const n=t.slice();return n[9]=e[l],n[11]=l,n}function Ef(t,e,l){const n=t.slice();return n[9]=e[l],n[11]=l,n}function Of(t,e,l){const n=t.slice();return n[13]=e[l],n}function Rf(t){let e,l=t[0].title+"",n;return{c(){e=r("strong"),n=$(l),a(e,"class","text-sm")},m(o,s){h(o,e,s),i(e,n)},p(o,s){s&1&&l!==(l=o[0].title+"")&&V(n,l)},d(o){o&&b(e)}}}function Lf(t){let e,l,n,o=t[13].label+"",s,u,c,f;return{c(){e=je("g"),l=je("line"),n=je("text"),s=$(o),a(l,"x2","100%"),a(n,"y","-4"),a(n,"x",u=t[13].align=="right"?"85%":""),a(e,"class",c="tick tick-"+t[13].value+" tick-"+t[13].color),a(e,"transform",f="translate(0, "+t[6](t[13].value)+")")},m(p,m){h(p,e,m),i(e,l),i(e,n),i(n,s)},p(p,m){m&1&&o!==(o=p[13].label+"")&&V(s,o),m&1&&u!==(u=p[13].align=="right"?"85%":"")&&a(n,"x",u),m&1&&c!==(c="tick tick-"+p[13].value+" tick-"+p[13].color)&&a(e,"class",c),m&65&&f!==(f="translate(0, "+p[6](p[13].value)+")")&&a(e,"transform",f)},d(p){p&&b(e)}}}function Uf(t){let e,l,n=t[9].label+"",o,s,u;return{c(){e=je("g"),l=je("text"),o=$(n),a(l,"x",s=t[3]/2),a(l,"y","-4"),a(e,"class","tick"),a(e,"transform",u="translate("+t[5](t[11])+","+t[4]+")")},m(c,f){h(c,e,f),i(e,l),i(l,o)},p(c,f){f&1&&n!==(n=c[9].label+"")&&V(o,n),f&8&&s!==(s=c[3]/2)&&a(l,"x",s),f&48&&u!==(u="translate("+c[5](c[11])+","+c[4]+")")&&a(e,"transform",u)},d(c){c&&b(e)}}}function Hf(t){let e,l,n,o,s,u,c,f=t[3]>15&&qf(t);return{c(){e=je("rect"),f&&f.c(),c=Qe(),a(e,"x",l=t[5](t[11])+2),a(e,"y",n=t[6](t[9].value)),a(e,"width",o=t[3]-4),a(e,"height",s=t[6](t[0].y.min)-t[6](Math.min(t[0].y.min,0)+t[9].value)),a(e,"fill",u=t[9].color)},m(p,m){h(p,e,m),f&&f.m(p,m),h(p,c,m)},p(p,m){m&32&&l!==(l=p[5](p[11])+2)&&a(e,"x",l),m&65&&n!==(n=p[6](p[9].value))&&a(e,"y",n),m&8&&o!==(o=p[3]-4)&&a(e,"width",o),m&65&&s!==(s=p[6](p[0].y.min)-p[6](Math.min(p[0].y.min,0)+p[9].value))&&a(e,"height",s),m&1&&u!==(u=p[9].color)&&a(e,"fill",u),p[3]>15?f?f.p(p,m):(f=qf(p),f.c(),f.m(c.parentNode,c)):f&&(f.d(1),f=null)},d(p){p&&b(e),f&&f.d(p),p&&b(c)}}}function qf(t){let e,l=t[9].label+"",n,o,s,u,c,f,p;return{c(){e=je("text"),n=$(l),a(e,"y",o=t[6](t[9].value)>t[6](0)-t[7]?t[6](t[9].value)-t[7]:t[6](t[9].value)+10),a(e,"x",s=t[5](t[11])+t[3]/2),a(e,"width",u=t[3]-4),a(e,"dominant-baseline","middle"),a(e,"text-anchor",c=t[3]<25?"left":"middle"),a(e,"fill",f=t[6](t[9].value)>t[6](0)-t[7]?t[9].color:"white"),a(e,"transform",p="rotate("+(t[3]<25?90:0)+", "+(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)+9)+")")},m(m,_){h(m,e,_),i(e,n)},p(m,_){_&1&&l!==(l=m[9].label+"")&&V(n,l),_&193&&o!==(o=m[6](m[9].value)>m[6](0)-m[7]?m[6](m[9].value)-m[7]:m[6](m[9].value)+10)&&a(e,"y",o),_&40&&s!==(s=m[5](m[11])+m[3]/2)&&a(e,"x",s),_&8&&u!==(u=m[3]-4)&&a(e,"width",u),_&8&&c!==(c=m[3]<25?"left":"middle")&&a(e,"text-anchor",c),_&193&&f!==(f=m[6](m[9].value)>m[6](0)-m[7]?m[9].color:"white")&&a(e,"fill",f),_&233&&p!==(p="rotate("+(m[3]<25?90:0)+", "+(m[5](m[11])+m[3]/2)+", "+(m[6](m[9].value)>m[6](0)-m[7]?m[6](m[9].value)-m[7]:m[6](m[9].value)+9)+")")&&a(e,"transform",p)},d(m){m&&b(e)}}}function Gf(t){let e,l,n,o,s,u,c,f=t[3]>15&&Wf(t);return{c(){e=je("rect"),f&&f.c(),c=Qe(),a(e,"x",l=t[5](t[11])+2),a(e,"y",n=t[6](0)),a(e,"width",o=t[3]-4),a(e,"height",s=t[6](t[0].y.min)-t[6](t[0].y.min+t[9].value2)),a(e,"fill",u=t[9].color)},m(p,m){h(p,e,m),f&&f.m(p,m),h(p,c,m)},p(p,m){m&32&&l!==(l=p[5](p[11])+2)&&a(e,"x",l),m&64&&n!==(n=p[6](0))&&a(e,"y",n),m&8&&o!==(o=p[3]-4)&&a(e,"width",o),m&65&&s!==(s=p[6](p[0].y.min)-p[6](p[0].y.min+p[9].value2))&&a(e,"height",s),m&1&&u!==(u=p[9].color)&&a(e,"fill",u),p[3]>15?f?f.p(p,m):(f=Wf(p),f.c(),f.m(c.parentNode,c)):f&&(f.d(1),f=null)},d(p){p&&b(e),f&&f.d(p),p&&b(c)}}}function Wf(t){let e,l=t[9].label2+"",n,o,s,u,c,f,p;return{c(){e=je("text"),n=$(l),a(e,"y",o=t[6](-t[9].value2)t[6](0)-12?t[6](t[9].value2-t[0].y.min)-12:t[6](t[9].value2-t[0].y.min)+9)+")")},m(m,_){h(m,e,_),i(e,n)},p(m,_){_&1&&l!==(l=m[9].label2+"")&&V(n,l),_&65&&o!==(o=m[6](-m[9].value2)m[6](0)-12?m[6](m[9].value2-m[0].y.min)-12:m[6](m[9].value2-m[0].y.min)+9)+")")&&a(e,"transform",p)},d(m){m&&b(e)}}}function jf(t){let e,l,n=t[9].value!==void 0&&Hf(t),o=t[9].value2>1e-4&&Gf(t);return{c(){n&&n.c(),e=Qe(),o&&o.c(),l=Qe()},m(s,u){n&&n.m(s,u),h(s,e,u),o&&o.m(s,u),h(s,l,u)},p(s,u){s[9].value!==void 0?n?n.p(s,u):(n=Hf(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),s[9].value2>1e-4?o?o.p(s,u):(o=Gf(s),o.c(),o.m(l.parentNode,l)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&b(e),o&&o.d(s),s&&b(l)}}}function Z0(t){let e,l,n,o,s,u,c,f=t[0].title&&Rf(t),p=t[0].y.ticks,m=[];for(let g=0;gt[8].call(e))},m(g,C){h(g,e,C),f&&f.m(e,null),i(e,l),i(e,n),i(n,o);for(let y=0;y{"config"in v&&l(0,n=v.config)},t.$$.update=()=>{if(t.$$.dirty&31){l(4,p=s-(n.title?20:0));let v=o-(n.padding.left+n.padding.right);l(3,u=v/n.points.length),l(7,m=u<25?28:17);let w=(p-n.padding.top-n.padding.bottom)/(n.y.max-n.y.min);l(5,c=function(k){return k*u+n.padding.left}),l(6,f=function(k){let g=0;return k>n.y.max?g=n.padding.bottom:kp||g<0?0:g})}},[n,o,s,u,p,c,f,m,_]}class Tn extends Ae{constructor(e){super(),Ie(this,e,J0,Z0,Se,{config:0})}}function X0(t){let e,l;return e=new Tn({props:{config:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.config=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}let x0=200,em=260;function tm(t,e,l){let{u1:n}=e,{u2:o}=e,{u3:s}=e,{ds:u}=e,c={};return t.$$set=f=>{"u1"in f&&l(1,n=f.u1),"u2"in f&&l(2,o=f.u2),"u3"in f&&l(3,s=f.u3),"ds"in f&&l(4,u=f.ds)},t.$$.update=()=>{if(t.$$.dirty&30){let f=[],p=[];n>0&&(f.push({label:u===1?"L1-L2":"L1"}),p.push({label:n?n.toFixed(0)+"V":"-",value:n||0,color:Gs(n||0)})),o>0&&(f.push({label:u===1?"L1-L3":"L2"}),p.push({label:o?o.toFixed(0)+"V":"-",value:o||0,color:Gs(o||0)})),s>0&&(f.push({label:u===1?"L2-L3":"L3"}),p.push({label:s?s.toFixed(0)+"V":"-",value:s||0,color:Gs(s||0)})),l(0,c={padding:{top:20,right:15,bottom:20,left:35},y:{min:x0,max:em,ticks:[{value:207,label:"-10%"},{value:230,label:"230v"},{value:253,label:"+10%"}]},x:{ticks:f},points:p})}},[c,n,o,s,u]}class lm extends Ae{constructor(e){super(),Ie(this,e,tm,X0,Se,{u1:1,u2:2,u3:3,ds:4})}}function nm(t){let e,l;return e=new Tn({props:{config:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.config=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function im(t,e,l){let{u1:n}=e,{u2:o}=e,{u3:s}=e,{i1:u}=e,{i2:c}=e,{i3:f}=e,{max:p}=e,m={};return t.$$set=_=>{"u1"in _&&l(1,n=_.u1),"u2"in _&&l(2,o=_.u2),"u3"in _&&l(3,s=_.u3),"i1"in _&&l(4,u=_.i1),"i2"in _&&l(5,c=_.i2),"i3"in _&&l(6,f=_.i3),"max"in _&&l(7,p=_.max)},t.$$.update=()=>{if(t.$$.dirty&254){let _=[],v=[];n>0&&(_.push({label:"L1"}),v.push({label:u?(u>10?u.toFixed(0):u.toFixed(1))+"A":"-",value:u||0,color:ms(u?u/p*100:0)})),o>0&&(_.push({label:"L2"}),v.push({label:c?(c>10?c.toFixed(0):c.toFixed(1))+"A":"-",value:c||0,color:ms(c?c/p*100:0)})),s>0&&(_.push({label:"L3"}),v.push({label:f?(f>10?f.toFixed(0):f.toFixed(1))+"A":"-",value:f||0,color:ms(f?f/p*100:0)})),l(0,m={padding:{top:20,right:15,bottom:20,left:35},y:{min:0,max:p,ticks:[{value:0,label:"0%"},{value:p/4,label:"25%"},{value:p/2,label:"50%"},{value:p/4*3,label:"75%"},{value:p,label:"100%"}]},x:{ticks:_},points:v})}},[m,n,o,s,u,c,f,p]}class om extends Ae{constructor(e){super(),Ie(this,e,im,nm,Se,{u1:1,u2:2,u3:3,i1:4,i2:5,i3:6,max:7})}}function sm(t){let e,l,n,o,s,u,c,f=(typeof t[0]<"u"?t[0].toFixed(0):"-")+"",p,m,_,v,w,k,g=(typeof t[1]<"u"?t[1].toFixed(0):"-")+"",C,y,S,I,D,A,M,z=(typeof t[2]<"u"?t[2].toFixed(1):"-")+"",R,L,T,P,N,q,Q=(typeof t[3]<"u"?t[3].toFixed(1):"-")+"",U,G;return{c(){e=r("div"),l=r("strong"),l.textContent="Reactive",n=d(),o=r("div"),s=r("div"),s.textContent="Instant in",u=d(),c=r("div"),p=$(f),m=$(" VAr"),_=d(),v=r("div"),v.textContent="Instant out",w=d(),k=r("div"),C=$(g),y=$(" VAr"),S=d(),I=r("div"),D=r("div"),D.textContent="Total in",A=d(),M=r("div"),R=$(z),L=$(" kVArh"),T=d(),P=r("div"),P.textContent="Total out",N=d(),q=r("div"),U=$(Q),G=$(" kVArh"),a(l,"class","text-sm"),a(c,"class","text-right"),a(k,"class","text-right"),a(o,"class","grid grid-cols-2 mt-4"),a(M,"class","text-right"),a(q,"class","text-right"),a(I,"class","grid grid-cols-2 mt-4"),a(e,"class","mx-2")},m(W,Z){h(W,e,Z),i(e,l),i(e,n),i(e,o),i(o,s),i(o,u),i(o,c),i(c,p),i(c,m),i(o,_),i(o,v),i(o,w),i(o,k),i(k,C),i(k,y),i(e,S),i(e,I),i(I,D),i(I,A),i(I,M),i(M,R),i(M,L),i(I,T),i(I,P),i(I,N),i(I,q),i(q,U),i(q,G)},p(W,[Z]){Z&1&&f!==(f=(typeof W[0]<"u"?W[0].toFixed(0):"-")+"")&&V(p,f),Z&2&&g!==(g=(typeof W[1]<"u"?W[1].toFixed(0):"-")+"")&&V(C,g),Z&4&&z!==(z=(typeof W[2]<"u"?W[2].toFixed(1):"-")+"")&&V(R,z),Z&8&&Q!==(Q=(typeof W[3]<"u"?W[3].toFixed(1):"-")+"")&&V(U,Q)},i:fe,o:fe,d(W){W&&b(e)}}}function um(t,e,l){let{importInstant:n}=e,{exportInstant:o}=e,{importTotal:s}=e,{exportTotal:u}=e;return t.$$set=c=>{"importInstant"in c&&l(0,n=c.importInstant),"exportInstant"in c&&l(1,o=c.exportInstant),"importTotal"in c&&l(2,s=c.importTotal),"exportTotal"in c&&l(3,u=c.exportTotal)},[n,o,s,u]}class am extends Ae{constructor(e){super(),Ie(this,e,um,sm,Se,{importInstant:0,exportInstant:1,importTotal:2,exportTotal:3})}}function zf(t){let e;function l(s,u){return s[2]&&s[1]?pm:s[2]?fm:rm}let n=l(t),o=n(t);return{c(){o.c(),e=Qe()},m(s,u){o.m(s,u),h(s,e,u)},p(s,u){n===(n=l(s))&&o?o.p(s,u):(o.d(1),o=n(s),o&&(o.c(),o.m(e.parentNode,e)))},d(s){o.d(s),s&&b(e)}}}function rm(t){let e,l,n,o,s,u,c=(t[0].h.u?t[0].h.u.toFixed(2):"-")+"",f,p,m,_,v,w,k=(t[0].d.u?t[0].d.u.toFixed(1):"-")+"",g,C,y,S,I,D,A=(t[0].m.u?t[0].m.u.toFixed(0):"-")+"",M,z,R,L,T=t[1]&&Bf(t);return{c(){e=r("strong"),e.textContent="Consumption",l=d(),n=r("div"),o=r("div"),o.textContent="Hour",s=d(),u=r("div"),f=$(c),p=$(" kWh"),m=d(),_=r("div"),_.textContent="Day",v=d(),w=r("div"),g=$(k),C=$(" kWh"),y=d(),S=r("div"),S.textContent="Month",I=d(),D=r("div"),M=$(A),z=$(" kWh"),R=d(),T&&T.c(),L=Qe(),a(u,"class","text-right"),a(w,"class","text-right"),a(D,"class","text-right"),a(n,"class","grid grid-cols-2 mb-3")},m(P,N){h(P,e,N),h(P,l,N),h(P,n,N),i(n,o),i(n,s),i(n,u),i(u,f),i(u,p),i(n,m),i(n,_),i(n,v),i(n,w),i(w,g),i(w,C),i(n,y),i(n,S),i(n,I),i(n,D),i(D,M),i(D,z),h(P,R,N),T&&T.m(P,N),h(P,L,N)},p(P,N){N&1&&c!==(c=(P[0].h.u?P[0].h.u.toFixed(2):"-")+"")&&V(f,c),N&1&&k!==(k=(P[0].d.u?P[0].d.u.toFixed(1):"-")+"")&&V(g,k),N&1&&A!==(A=(P[0].m.u?P[0].m.u.toFixed(0):"-")+"")&&V(M,A),P[1]?T?T.p(P,N):(T=Bf(P),T.c(),T.m(L.parentNode,L)):T&&(T.d(1),T=null)},d(P){P&&b(e),P&&b(l),P&&b(n),P&&b(R),T&&T.d(P),P&&b(L)}}}function fm(t){let e,l,n,o,s,u,c=(t[0].h.u?t[0].h.u.toFixed(2):"-")+"",f,p,m,_,v,w,k=(t[0].d.u?t[0].d.u.toFixed(1):"-")+"",g,C,y,S,I,D,A=(t[0].m.u?t[0].m.u.toFixed(0):"-")+"",M,z,R,L,T,P,N,q,Q,U=(t[0].h.p?t[0].h.p.toFixed(2):"-")+"",G,W,Z,K,te,J,H=(t[0].d.p?t[0].d.p.toFixed(1):"-")+"",ne,Ce,ge,Ee,he,ve,ae=(t[0].m.p?t[0].m.p.toFixed(0):"-")+"",ke,_e;return{c(){e=r("strong"),e.textContent="Import",l=d(),n=r("div"),o=r("div"),o.textContent="Hour",s=d(),u=r("div"),f=$(c),p=$(" kWh"),m=d(),_=r("div"),_.textContent="Day",v=d(),w=r("div"),g=$(k),C=$(" kWh"),y=d(),S=r("div"),S.textContent="Month",I=d(),D=r("div"),M=$(A),z=$(" kWh"),R=d(),L=r("strong"),L.textContent="Export",T=d(),P=r("div"),N=r("div"),N.textContent="Hour",q=d(),Q=r("div"),G=$(U),W=$(" kWh"),Z=d(),K=r("div"),K.textContent="Day",te=d(),J=r("div"),ne=$(H),Ce=$(" kWh"),ge=d(),Ee=r("div"),Ee.textContent="Month",he=d(),ve=r("div"),ke=$(ae),_e=$(" kWh"),a(u,"class","text-right"),a(w,"class","text-right"),a(D,"class","text-right"),a(n,"class","grid grid-cols-2 mb-3"),a(Q,"class","text-right"),a(J,"class","text-right"),a(ve,"class","text-right"),a(P,"class","grid grid-cols-2")},m(le,ue){h(le,e,ue),h(le,l,ue),h(le,n,ue),i(n,o),i(n,s),i(n,u),i(u,f),i(u,p),i(n,m),i(n,_),i(n,v),i(n,w),i(w,g),i(w,C),i(n,y),i(n,S),i(n,I),i(n,D),i(D,M),i(D,z),h(le,R,ue),h(le,L,ue),h(le,T,ue),h(le,P,ue),i(P,N),i(P,q),i(P,Q),i(Q,G),i(Q,W),i(P,Z),i(P,K),i(P,te),i(P,J),i(J,ne),i(J,Ce),i(P,ge),i(P,Ee),i(P,he),i(P,ve),i(ve,ke),i(ve,_e)},p(le,ue){ue&1&&c!==(c=(le[0].h.u?le[0].h.u.toFixed(2):"-")+"")&&V(f,c),ue&1&&k!==(k=(le[0].d.u?le[0].d.u.toFixed(1):"-")+"")&&V(g,k),ue&1&&A!==(A=(le[0].m.u?le[0].m.u.toFixed(0):"-")+"")&&V(M,A),ue&1&&U!==(U=(le[0].h.p?le[0].h.p.toFixed(2):"-")+"")&&V(G,U),ue&1&&H!==(H=(le[0].d.p?le[0].d.p.toFixed(1):"-")+"")&&V(ne,H),ue&1&&ae!==(ae=(le[0].m.p?le[0].m.p.toFixed(0):"-")+"")&&V(ke,ae)},d(le){le&&b(e),le&&b(l),le&&b(n),le&&b(R),le&&b(L),le&&b(T),le&&b(P)}}}function pm(t){let e,l,n,o,s,u,c=(t[0].h.u?t[0].h.u.toFixed(2):"-")+"",f,p,m,_,v=(t[0].h.c?t[0].h.c.toFixed(2):"-")+"",w,k,g,C,y,S,I,D=(t[0].d.u?t[0].d.u.toFixed(1):"-")+"",A,M,z,R,L=(t[0].d.c?t[0].d.c.toFixed(1):"-")+"",T,P,N,q,Q,U,G,W=(t[0].m.u?t[0].m.u.toFixed(0):"-")+"",Z,K,te,J,H=(t[0].m.c?t[0].m.c.toFixed(0):"-")+"",ne,Ce,ge,Ee,he,ve,ae,ke,_e,le,ue=(t[0].h.p?t[0].h.p.toFixed(2):"-")+"",j,pe,$e,we,oe=(t[0].h.i?t[0].h.i.toFixed(2):"-")+"",ce,ze,Pe,qe,Be,_t,Ue,Oe=(t[0].d.p?t[0].d.p.toFixed(1):"-")+"",it,He,Ge,se,be=(t[0].d.i?t[0].d.i.toFixed(1):"-")+"",ot,Ve,bt,dt,Gt,Ze,ht,Rt=(t[0].m.p?t[0].m.p.toFixed(0):"-")+"",tt,lt,Lt,Je,gt=(t[0].m.i?t[0].m.i.toFixed(0):"-")+"",nt,Te,Xe;return{c(){e=r("strong"),e.textContent="Import",l=d(),n=r("div"),o=r("div"),o.textContent="Hour",s=d(),u=r("div"),f=$(c),p=$(" kWh"),m=d(),_=r("div"),w=$(v),k=d(),g=$(t[1]),C=d(),y=r("div"),y.textContent="Day",S=d(),I=r("div"),A=$(D),M=$(" kWh"),z=d(),R=r("div"),T=$(L),P=d(),N=$(t[1]),q=d(),Q=r("div"),Q.textContent="Month",U=d(),G=r("div"),Z=$(W),K=$(" kWh"),te=d(),J=r("div"),ne=$(H),Ce=d(),ge=$(t[1]),Ee=d(),he=r("strong"),he.textContent="Export",ve=d(),ae=r("div"),ke=r("div"),ke.textContent="Hour",_e=d(),le=r("div"),j=$(ue),pe=$(" kWh"),$e=d(),we=r("div"),ce=$(oe),ze=d(),Pe=$(t[1]),qe=d(),Be=r("div"),Be.textContent="Day",_t=d(),Ue=r("div"),it=$(Oe),He=$(" kWh"),Ge=d(),se=r("div"),ot=$(be),Ve=d(),bt=$(t[1]),dt=d(),Gt=r("div"),Gt.textContent="Month",Ze=d(),ht=r("div"),tt=$(Rt),lt=$(" kWh"),Lt=d(),Je=r("div"),nt=$(gt),Te=d(),Xe=$(t[1]),a(u,"class","text-right"),a(_,"class","text-right"),a(I,"class","text-right"),a(R,"class","text-right"),a(G,"class","text-right"),a(J,"class","text-right"),a(n,"class","grid grid-cols-3 mb-3"),a(le,"class","text-right"),a(we,"class","text-right"),a(Ue,"class","text-right"),a(se,"class","text-right"),a(ht,"class","text-right"),a(Je,"class","text-right"),a(ae,"class","grid grid-cols-3")},m(me,Fe){h(me,e,Fe),h(me,l,Fe),h(me,n,Fe),i(n,o),i(n,s),i(n,u),i(u,f),i(u,p),i(n,m),i(n,_),i(_,w),i(_,k),i(_,g),i(n,C),i(n,y),i(n,S),i(n,I),i(I,A),i(I,M),i(n,z),i(n,R),i(R,T),i(R,P),i(R,N),i(n,q),i(n,Q),i(n,U),i(n,G),i(G,Z),i(G,K),i(n,te),i(n,J),i(J,ne),i(J,Ce),i(J,ge),h(me,Ee,Fe),h(me,he,Fe),h(me,ve,Fe),h(me,ae,Fe),i(ae,ke),i(ae,_e),i(ae,le),i(le,j),i(le,pe),i(ae,$e),i(ae,we),i(we,ce),i(we,ze),i(we,Pe),i(ae,qe),i(ae,Be),i(ae,_t),i(ae,Ue),i(Ue,it),i(Ue,He),i(ae,Ge),i(ae,se),i(se,ot),i(se,Ve),i(se,bt),i(ae,dt),i(ae,Gt),i(ae,Ze),i(ae,ht),i(ht,tt),i(ht,lt),i(ae,Lt),i(ae,Je),i(Je,nt),i(Je,Te),i(Je,Xe)},p(me,Fe){Fe&1&&c!==(c=(me[0].h.u?me[0].h.u.toFixed(2):"-")+"")&&V(f,c),Fe&1&&v!==(v=(me[0].h.c?me[0].h.c.toFixed(2):"-")+"")&&V(w,v),Fe&2&&V(g,me[1]),Fe&1&&D!==(D=(me[0].d.u?me[0].d.u.toFixed(1):"-")+"")&&V(A,D),Fe&1&&L!==(L=(me[0].d.c?me[0].d.c.toFixed(1):"-")+"")&&V(T,L),Fe&2&&V(N,me[1]),Fe&1&&W!==(W=(me[0].m.u?me[0].m.u.toFixed(0):"-")+"")&&V(Z,W),Fe&1&&H!==(H=(me[0].m.c?me[0].m.c.toFixed(0):"-")+"")&&V(ne,H),Fe&2&&V(ge,me[1]),Fe&1&&ue!==(ue=(me[0].h.p?me[0].h.p.toFixed(2):"-")+"")&&V(j,ue),Fe&1&&oe!==(oe=(me[0].h.i?me[0].h.i.toFixed(2):"-")+"")&&V(ce,oe),Fe&2&&V(Pe,me[1]),Fe&1&&Oe!==(Oe=(me[0].d.p?me[0].d.p.toFixed(1):"-")+"")&&V(it,Oe),Fe&1&&be!==(be=(me[0].d.i?me[0].d.i.toFixed(1):"-")+"")&&V(ot,be),Fe&2&&V(bt,me[1]),Fe&1&&Rt!==(Rt=(me[0].m.p?me[0].m.p.toFixed(0):"-")+"")&&V(tt,Rt),Fe&1&>!==(gt=(me[0].m.i?me[0].m.i.toFixed(0):"-")+"")&&V(nt,gt),Fe&2&&V(Xe,me[1])},d(me){me&&b(e),me&&b(l),me&&b(n),me&&b(Ee),me&&b(he),me&&b(ve),me&&b(ae)}}}function Bf(t){let e,l,n,o,s,u,c=(t[0].h.c?t[0].h.c.toFixed(2):"-")+"",f,p,m,_,v,w,k,g=(t[0].d.c?t[0].d.c.toFixed(1):"-")+"",C,y,S,I,D,A,M,z=(t[0].m.c?t[0].m.c.toFixed(0):"-")+"",R,L,T;return{c(){e=r("strong"),e.textContent="Cost",l=d(),n=r("div"),o=r("div"),o.textContent="Hour",s=d(),u=r("div"),f=$(c),p=d(),m=$(t[1]),_=d(),v=r("div"),v.textContent="Day",w=d(),k=r("div"),C=$(g),y=d(),S=$(t[1]),I=d(),D=r("div"),D.textContent="Month",A=d(),M=r("div"),R=$(z),L=d(),T=$(t[1]),a(u,"class","text-right"),a(k,"class","text-right"),a(M,"class","text-right"),a(n,"class","grid grid-cols-2")},m(P,N){h(P,e,N),h(P,l,N),h(P,n,N),i(n,o),i(n,s),i(n,u),i(u,f),i(u,p),i(u,m),i(n,_),i(n,v),i(n,w),i(n,k),i(k,C),i(k,y),i(k,S),i(n,I),i(n,D),i(n,A),i(n,M),i(M,R),i(M,L),i(M,T)},p(P,N){N&1&&c!==(c=(P[0].h.c?P[0].h.c.toFixed(2):"-")+"")&&V(f,c),N&2&&V(m,P[1]),N&1&&g!==(g=(P[0].d.c?P[0].d.c.toFixed(1):"-")+"")&&V(C,g),N&2&&V(S,P[1]),N&1&&z!==(z=(P[0].m.c?P[0].m.c.toFixed(0):"-")+"")&&V(R,z),N&2&&V(T,P[1])},d(P){P&&b(e),P&&b(l),P&&b(n)}}}function cm(t){let e,l,n,o,s,u,c=t[0]&&zf(t);return{c(){e=r("div"),l=r("strong"),l.textContent="Real time calculation",n=d(),o=r("br"),s=r("br"),u=d(),c&&c.c(),a(e,"class","mx-2 text-sm")},m(f,p){h(f,e,p),i(e,l),i(e,n),i(e,o),i(e,s),i(e,u),c&&c.m(e,null)},p(f,[p]){f[0]?c?c.p(f,p):(c=zf(f),c.c(),c.m(e,null)):c&&(c.d(1),c=null)},i:fe,o:fe,d(f){f&&b(e),c&&c.d()}}}function mm(t,e,l){let{data:n}=e,{currency:o}=e,{hasExport:s}=e;return t.$$set=u=>{"data"in u&&l(0,n=u.data),"currency"in u&&l(1,o=u.currency),"hasExport"in u&&l(2,s=u.hasExport)},[n,o,s]}class _m extends Ae{constructor(e){super(),Ie(this,e,mm,cm,Se,{data:0,currency:1,hasExport:2})}}function dm(t){let e,l,n,o;return n=new Tn({props:{config:t[0]}}),{c(){e=r("a"),e.textContent="Provided by ENTSO-E",l=d(),ee(n.$$.fragment),a(e,"href","https://transparency.entsoe.eu/"),a(e,"target","_blank"),a(e,"class","text-xs float-right z-40")},m(s,u){h(s,e,u),h(s,l,u),X(n,s,u),o=!0},p(s,[u]){const c={};u&1&&(c.config=s[0]),n.$set(c)},i(s){o||(F(n.$$.fragment,s),o=!0)},o(s){O(n.$$.fragment,s),o=!1},d(s){s&&b(e),s&&b(l),x(n,s)}}}function vm(t,e,l){let{json:n}=e,o={},s=0,u=0;return t.$$set=c=>{"json"in c&&l(1,n=c.json)},t.$$.update=()=>{if(t.$$.dirty&14){let c=new Date().getUTCHours(),f=0,p=0,m=0,_=n[20]==null?2:1,v=[],w=[],k=[],g=new Date;for(f=c;f<24&&(g.setUTCHours(f),p=n[Ne(m++)],p!=null);f++)w.push({label:Ne(g.getHours())}),k.push({label:p>0?p.toFixed(_):"",value:p>0?Math.abs(p*100):0,label2:p<0?p.toFixed(_):"",value2:p<0?Math.abs(p*100):0,color:"#7c3aed"}),l(3,u=Math.min(u,p*100)),l(2,s=Math.max(s,p*100));for(f=0;f<24&&(g.setUTCHours(f),p=n[Ne(m++)],p!=null);f++)w.push({label:Ne(g.getHours())}),k.push({label:p>0?p.toFixed(_):"",value:p>0?Math.abs(p*100):0,label2:p<0?p.toFixed(_):"",value2:p<0?Math.abs(p*100):0,color:"#7c3aed"}),l(3,u=Math.min(u,p*100)),l(2,s=Math.max(s,p*100));if(l(2,s=Math.ceil(s)),l(3,u=Math.floor(u)),u<0){let y=u/4;for(f=1;f<5;f++){let S=y*f;v.push({value:S,label:(S/100).toFixed(2)})}}let C=s/4;for(f=0;f<5;f++){let y=C*f;v.push({value:y,label:(y/100).toFixed(2)})}l(0,o={title:"Future energy price ("+n.currency+")",padding:{top:20,right:15,bottom:20,left:35},y:{min:u,max:s,ticks:v},x:{ticks:w},points:k})}},[o,n,s,u]}class bm extends Ae{constructor(e){super(),Ie(this,e,vm,dm,Se,{json:1})}}function hm(t){let e,l;return e=new Tn({props:{config:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.config=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function gm(t,e,l){let{json:n}=e,o={},s=0,u=0;return t.$$set=c=>{"json"in c&&l(1,n=c.json)},t.$$.update=()=>{if(t.$$.dirty&14){let c=0,f=[],p=[],m=[],_=new Date,v=-_.getTimezoneOffset()/60;for(c=_.getUTCHours();c<24;c++){let g=n["i"+Ne(c)],C=n["e"+Ne(c)];g===void 0&&(g=0),C===void 0&&(C=0),p.push({label:Ne((c+v)%24)}),m.push({label:g.toFixed(1),value:g*10,label2:C.toFixed(1),value2:C*10,color:"#7c3aed"}),l(3,u=Math.max(u,C*10)),l(2,s=Math.max(s,g*10))}for(c=0;c<_.getUTCHours();c++){let g=n["i"+Ne(c)],C=n["e"+Ne(c)];g===void 0&&(g=0),C===void 0&&(C=0),p.push({label:Ne((c+v)%24)}),m.push({label:g.toFixed(1),value:g*10,label2:C.toFixed(1),value2:C*10,color:"#7c3aed"}),l(3,u=Math.max(u,C*10)),l(2,s=Math.max(s,g*10))}let w=Math.ceil(Math.max(u,s));if(l(2,s=w),l(3,u=u==0?0:w*-1),u<0){let g=u/4;for(c=1;c<5;c++){let C=g*c;f.push({value:C,label:(C/10).toFixed(1)})}}let k=s/4;for(c=0;c<5;c++){let g=k*c;f.push({value:g,label:(g/10).toFixed(1)})}l(0,o={title:"Energy use last 24 hours (kWh)",height:226,width:1520,padding:{top:20,right:15,bottom:20,left:35},y:{min:u,max:s,ticks:f},x:{ticks:p},points:m})}},[o,n,s,u]}class km extends Ae{constructor(e){super(),Ie(this,e,gm,hm,Se,{json:1})}}function wm(t){let e,l;return e=new Tn({props:{config:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.config=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function ym(t,e,l){let{json:n}=e,o={},s=0,u=0;return t.$$set=c=>{"json"in c&&l(1,n=c.json)},t.$$.update=()=>{if(t.$$.dirty&14){let c=0,f=[],p=[],m=[],_=new Date,v=new Date;for(v.setDate(0),c=_.getDate();c<=v.getDate();c++){let g=n["i"+Ne(c)],C=n["e"+Ne(c)];g===void 0&&(g=0),C===void 0&&(C=0),p.push({label:Ne(c)}),m.push({label:g.toFixed(0),value:g,label2:C.toFixed(0),value2:C,color:"#7c3aed"}),l(3,u=Math.max(u,C)),l(2,s=Math.max(s,g))}for(c=1;c<_.getDate();c++){let g=n["i"+Ne(c)],C=n["e"+Ne(c)];g===void 0&&(g=0),C===void 0&&(C=0),p.push({label:Ne(c)}),m.push({label:g.toFixed(0),value:g,label2:C.toFixed(0),value2:C,color:"#7c3aed"}),l(3,u=Math.max(u,C)),l(2,s=Math.max(s,g))}let w=Math.ceil(Math.max(u,s)/10)*10;if(l(2,s=w),l(3,u=u==0?0:w*-1),u<0){let g=u/4;for(c=0;c<5;c++){let C=g*c;f.push({value:C,label:C.toFixed(0)})}}let k=s/4;for(c=0;c<5;c++){let g=k*c;f.push({value:g,label:g.toFixed(0)})}l(0,o={title:"Energy use last month (kWh)",height:226,width:1520,padding:{top:20,right:15,bottom:20,left:35},y:{min:u,max:s,ticks:f},x:{ticks:p},points:m})}},[o,n,s,u]}class Cm extends Ae{constructor(e){super(),Ie(this,e,ym,wm,Se,{json:1})}}function $m(t){let e,l;return e=new Tn({props:{config:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.config=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Sm(t,e,l){let{json:n}=e,o={},s=0,u=0;return t.$$set=c=>{"json"in c&&l(1,n=c.json)},t.$$.update=()=>{if(t.$$.dirty&14){let c=0,f=0,p=[],m=[],_=[];n.s&&n.s.forEach((k,g)=>{var C=k.n?k.n:k.a;f=k.v,f==-127&&(f=0),m.push({label:C.slice(-4)}),_.push({label:f.toFixed(1),value:f,color:"#7c3aed"}),l(3,u=Math.min(u,f)),l(2,s=Math.max(s,f))}),l(2,s=Math.ceil(s)),l(3,u=Math.floor(u));let v=s;u<0&&(v+=Math.abs(u));let w=v/4;for(c=0;c<5;c++)f=u+w*c,p.push({value:f,label:f.toFixed(1)});l(0,o={title:"Temperature sensors (\xB0C)",height:226,width:1520,padding:{top:20,right:15,bottom:20,left:35},y:{min:u,max:s,ticks:p},x:{ticks:m},points:_})}},[o,n,s,u]}class Pm extends Ae{constructor(e){super(),Ie(this,e,Sm,$m,Se,{json:1})}}function Tm(t){let e,l;return e=new Tn({props:{config:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,[o]){const s={};o&1&&(s.config=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}let Fm=0;function Im(t,e,l){let n={},o=0,s;return Rc.subscribe(u=>{l(2,s=u)}),Oc(),t.$$.update=()=>{if(t.$$.dirty&6){let u=0,c=[],f=[],p=[];if(c.push({value:0,label:0}),s&&s.p)for(u=0;u0?Ne(m.d)+"."+Vs[new Date().getMonth()]:"-"}),l(1,o=Math.max(o,m.v))}if(s&&s.t){for(u=0;u=o)break;c.push({value:m,label:m})}c.push({label:s.m.toFixed(1),align:"right",color:"green",value:s.m})}s&&s.c&&(c.push({label:s.c.toFixed(0),color:"orange",value:s.c}),l(1,o=Math.max(o,s.c))),l(1,o=Math.ceil(o)),l(0,n={title:"Tariff peaks",padding:{top:20,right:35,bottom:20,left:35},y:{min:Fm,max:o,ticks:c},x:{ticks:f},points:p})}},[n,o,s]}class Am extends Ae{constructor(e){super(),Ie(this,e,Im,Tm,Se,{})}}function Yf(t){let e,l,n,o,s,u,c=(t[0].mt?hs(t[0].mt):"-")+"",f,p,m,_=(t[0].ic?t[0].ic.toFixed(1):"-")+"",v,w,k;return o=new qc({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[2].currency,colorFn:ms}}),{c(){e=r("div"),l=r("div"),n=r("div"),ee(o.$$.fragment),s=d(),u=r("div"),f=$(c),p=d(),m=r("div"),v=$(_),w=$(" kWh"),a(n,"class","col-span-2"),a(m,"class","text-right"),a(l,"class","grid grid-cols-2"),a(e,"class","cnt")},m(g,C){h(g,e,C),i(e,l),i(l,n),X(o,n,null),i(l,s),i(l,u),i(u,f),i(l,p),i(l,m),i(m,v),i(m,w),k=!0},p(g,C){const y={};C&1&&(y.val=g[0].i?g[0].i:0),C&1&&(y.max=g[0].im?g[0].im:15e3),C&1&&(y.sub=g[0].p),C&4&&(y.subunit=g[2].currency),o.$set(y),(!k||C&1)&&c!==(c=(g[0].mt?hs(g[0].mt):"-")+"")&&V(f,c),(!k||C&1)&&_!==(_=(g[0].ic?g[0].ic.toFixed(1):"-")+"")&&V(v,_)},i(g){k||(F(o.$$.fragment,g),k=!0)},o(g){O(o.$$.fragment,g),k=!1},d(g){g&&b(e),x(o)}}}function Vf(t){let e,l,n,o,s,u,c,f,p=(t[0].ec?t[0].ec.toFixed(1):"-")+"",m,_,v;return o=new qc({props:{val:t[0].e?t[0].e:0,max:t[0].om?t[0].om*1e3:1e4,unit:"W",label:"Export",colorFn:n0}}),{c(){e=r("div"),l=r("div"),n=r("div"),ee(o.$$.fragment),s=d(),u=r("div"),c=d(),f=r("div"),m=$(p),_=$(" kWh"),a(n,"class","col-span-2"),a(f,"class","text-right"),a(l,"class","grid grid-cols-2"),a(e,"class","cnt")},m(w,k){h(w,e,k),i(e,l),i(l,n),X(o,n,null),i(l,s),i(l,u),i(l,c),i(l,f),i(f,m),i(f,_),v=!0},p(w,k){const g={};k&1&&(g.val=w[0].e?w[0].e:0),k&1&&(g.max=w[0].om?w[0].om*1e3:1e4),o.$set(g),(!v||k&1)&&p!==(p=(w[0].ec?w[0].ec.toFixed(1):"-")+"")&&V(m,p)},i(w){v||(F(o.$$.fragment,w),v=!0)},o(w){O(o.$$.fragment,w),v=!1},d(w){w&&b(e),x(o)}}}function Kf(t){let e,l,n;return l=new lm({props:{u1:t[0].u1,u2:t[0].u2,u3:t[0].u3,ds:t[0].ds}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&1&&(u.u1=o[0].u1),s&1&&(u.u2=o[0].u2),s&1&&(u.u3=o[0].u3),s&1&&(u.ds=o[0].ds),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function Qf(t){let e,l,n;return l=new om({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=r("div"),ee(l.$$.fragment),a(e,"class","cnt")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&1&&(u.u1=o[0].u1),s&1&&(u.u2=o[0].u2),s&1&&(u.u3=o[0].u3),s&1&&(u.i1=o[0].i1),s&1&&(u.i2=o[0].i2),s&1&&(u.i3=o[0].i3),s&1&&(u.max=o[0].mf?o[0].mf:32),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function Zf(t){let e,l,n;return l=new am({props:{importInstant:t[0].ri,exportInstant:t[0].re,importTotal:t[0].ric,exportTotal:t[0].rec}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&1&&(u.importInstant=o[0].ri),s&1&&(u.exportInstant=o[0].re),s&1&&(u.importTotal=o[0].ric),s&1&&(u.exportTotal=o[0].rec),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function Jf(t){let e,l,n;return l=new _m({props:{data:t[0].ea,currency:t[2].currency,hasExport:t[0].om>0||t[0].e>0}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&1&&(u.data=o[0].ea),s&4&&(u.currency=o[2].currency),s&1&&(u.hasExport=o[0].om>0||o[0].e>0),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function Xf(t){let e,l,n;return l=new Am({}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt h-64")},m(o,s){h(o,e,s),X(l,e,null),n=!0},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function xf(t){let e,l,n;return l=new bm({props:{json:t[2]}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt 2xl:col-span-6 xl:col-span-5 lg:col-span-4 md:col-span-3 sm:col-span-2 h-64")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&4&&(u.json=o[2]),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function ep(t){let e,l,n;return l=new km({props:{json:t[3]}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt 2xl:col-span-6 xl:col-span-5 lg:col-span-4 md:col-span-3 sm:col-span-2 h-64")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&8&&(u.json=o[3]),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function tp(t){let e,l,n;return l=new Cm({props:{json:t[4]}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt 2xl:col-span-6 xl:col-span-5 lg:col-span-4 md:col-span-3 sm:col-span-2 h-64")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&16&&(u.json=o[4]),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function lp(t){let e,l,n;return l=new Pm({props:{json:t[5]}}),{c(){e=r("div"),ee(l.$$.fragment),a(e,"class","cnt 2xl:col-span-6 xl:col-span-5 lg:col-span-4 md:col-span-3 sm:col-span-2 h-64")},m(o,s){h(o,e,s),X(l,e,null),n=!0},p(o,s){const u={};s&32&&(u.json=o[5]),l.$set(u)},i(o){n||(F(l.$$.fragment,o),n=!0)},o(o){O(l.$$.fragment,o),n=!1},d(o){o&&b(e),x(l)}}}function Mm(t){let e,l=Ke(t[1].ui.i,t[0].i),n,o=Ke(t[1].ui.e,t[0].om||t[0].e>0),s,u=Ke(t[1].ui.v,t[0].u1>100||t[0].u2>100||t[0].u3>100),c,f=Ke(t[1].ui.a,t[0].i1>.01||t[0].i2>.01||t[0].i3>.01),p,m=Ke(t[1].ui.r,t[0].ri>0||t[0].re>0||t[0].ric>0||t[0].rec>0),_,v=Ke(t[1].ui.c,t[0].ea),w,k=Ke(t[1].ui.t,t[0].pr&&(t[0].pr.startsWith("10YNO")||t[0].pr=="10Y1001A1001A48H")),g,C=Ke(t[1].ui.p,typeof t[0].p=="number"&&!Number.isNaN(t[0].p)),y,S=Ke(t[1].ui.d,t[3]),I,D=Ke(t[1].ui.m,t[4]),A,M=Ke(t[1].ui.s,t[0].t&&t[0].t!=-127&&t[5].c>1),z,R=l&&Yf(t),L=o&&Vf(t),T=u&&Kf(t),P=f&&Qf(t),N=m&&Zf(t),q=v&&Jf(t),Q=k&&Xf(),U=C&&xf(t),G=S&&ep(t),W=D&&tp(t),Z=M&&lp(t);return{c(){e=r("div"),R&&R.c(),n=d(),L&&L.c(),s=d(),T&&T.c(),c=d(),P&&P.c(),p=d(),N&&N.c(),_=d(),q&&q.c(),w=d(),Q&&Q.c(),g=d(),U&&U.c(),y=d(),G&&G.c(),I=d(),W&&W.c(),A=d(),Z&&Z.c(),a(e,"class","grid 2xl:grid-cols-6 xl:grid-cols-5 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2")},m(K,te){h(K,e,te),R&&R.m(e,null),i(e,n),L&&L.m(e,null),i(e,s),T&&T.m(e,null),i(e,c),P&&P.m(e,null),i(e,p),N&&N.m(e,null),i(e,_),q&&q.m(e,null),i(e,w),Q&&Q.m(e,null),i(e,g),U&&U.m(e,null),i(e,y),G&&G.m(e,null),i(e,I),W&&W.m(e,null),i(e,A),Z&&Z.m(e,null),z=!0},p(K,[te]){te&3&&(l=Ke(K[1].ui.i,K[0].i)),l?R?(R.p(K,te),te&3&&F(R,1)):(R=Yf(K),R.c(),F(R,1),R.m(e,n)):R&&(Me(),O(R,1,1,()=>{R=null}),De()),te&3&&(o=Ke(K[1].ui.e,K[0].om||K[0].e>0)),o?L?(L.p(K,te),te&3&&F(L,1)):(L=Vf(K),L.c(),F(L,1),L.m(e,s)):L&&(Me(),O(L,1,1,()=>{L=null}),De()),te&3&&(u=Ke(K[1].ui.v,K[0].u1>100||K[0].u2>100||K[0].u3>100)),u?T?(T.p(K,te),te&3&&F(T,1)):(T=Kf(K),T.c(),F(T,1),T.m(e,c)):T&&(Me(),O(T,1,1,()=>{T=null}),De()),te&3&&(f=Ke(K[1].ui.a,K[0].i1>.01||K[0].i2>.01||K[0].i3>.01)),f?P?(P.p(K,te),te&3&&F(P,1)):(P=Qf(K),P.c(),F(P,1),P.m(e,p)):P&&(Me(),O(P,1,1,()=>{P=null}),De()),te&3&&(m=Ke(K[1].ui.r,K[0].ri>0||K[0].re>0||K[0].ric>0||K[0].rec>0)),m?N?(N.p(K,te),te&3&&F(N,1)):(N=Zf(K),N.c(),F(N,1),N.m(e,_)):N&&(Me(),O(N,1,1,()=>{N=null}),De()),te&3&&(v=Ke(K[1].ui.c,K[0].ea)),v?q?(q.p(K,te),te&3&&F(q,1)):(q=Jf(K),q.c(),F(q,1),q.m(e,w)):q&&(Me(),O(q,1,1,()=>{q=null}),De()),te&3&&(k=Ke(K[1].ui.t,K[0].pr&&(K[0].pr.startsWith("10YNO")||K[0].pr=="10Y1001A1001A48H"))),k?Q?te&3&&F(Q,1):(Q=Xf(),Q.c(),F(Q,1),Q.m(e,g)):Q&&(Me(),O(Q,1,1,()=>{Q=null}),De()),te&3&&(C=Ke(K[1].ui.p,typeof K[0].p=="number"&&!Number.isNaN(K[0].p))),C?U?(U.p(K,te),te&3&&F(U,1)):(U=xf(K),U.c(),F(U,1),U.m(e,y)):U&&(Me(),O(U,1,1,()=>{U=null}),De()),te&10&&(S=Ke(K[1].ui.d,K[3])),S?G?(G.p(K,te),te&10&&F(G,1)):(G=ep(K),G.c(),F(G,1),G.m(e,I)):G&&(Me(),O(G,1,1,()=>{G=null}),De()),te&18&&(D=Ke(K[1].ui.m,K[4])),D?W?(W.p(K,te),te&18&&F(W,1)):(W=tp(K),W.c(),F(W,1),W.m(e,A)):W&&(Me(),O(W,1,1,()=>{W=null}),De()),te&35&&(M=Ke(K[1].ui.s,K[0].t&&K[0].t!=-127&&K[5].c>1)),M?Z?(Z.p(K,te),te&35&&F(Z,1)):(Z=lp(K),Z.c(),F(Z,1),Z.m(e,null)):Z&&(Me(),O(Z,1,1,()=>{Z=null}),De())},i(K){z||(F(R),F(L),F(T),F(P),F(N),F(q),F(Q),F(U),F(G),F(W),F(Z),z=!0)},o(K){O(R),O(L),O(T),O(P),O(N),O(q),O(Q),O(U),O(G),O(W),O(Z),z=!1},d(K){K&&b(e),R&&R.d(),L&&L.d(),T&&T.d(),P&&P.d(),N&&N.d(),q&&q.d(),Q&&Q.d(),U&&U.d(),G&&G.d(),W&&W.d(),Z&&Z.d()}}}function Dm(t,e,l){let{data:n={}}=e,{sysinfo:o={}}=e,s={},u={},c={},f={};return Ac.subscribe(p=>{l(2,s=p)}),Mc.subscribe(p=>{l(3,u=p)}),Dc.subscribe(p=>{l(4,c=p)}),Ec.subscribe(p=>{l(5,f=p)}),t.$$set=p=>{"data"in p&&l(0,n=p.data),"sysinfo"in p&&l(1,o=p.sysinfo)},[n,o,s,u,c,f]}class Nm extends Ae{constructor(e){super(),Ie(this,e,Dm,Mm,Se,{data:0,sysinfo:1})}}let eu={};const Gc=ft(eu);async function Em(){eu=await(await fetch("/configuration.json")).json(),Gc.set(eu)}function np(t){let e;return{c(){e=r("option"),e.textContent="UART2",e.__value=113,e.value=e.__value},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function ip(t){let e,l,n;return{c(){e=r("option"),e.textContent="UART1",l=d(),n=r("option"),n.textContent="UART2",e.__value=9,e.value=e.__value,n.__value=16,n.value=n.__value},m(o,s){h(o,e,s),h(o,l,s),h(o,n,s)},d(o){o&&b(e),o&&b(l),o&&b(n)}}}function op(t){let e;return{c(){e=r("option"),e.textContent="UART1",e.__value=18,e.value=e.__value},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function sp(t){let e,l,n,o,s;return{c(){e=r("option"),e.textContent="GPIO6",l=d(),n=r("option"),n.textContent="GPIO7",o=d(),s=r("option"),s.textContent="GPIO8",e.__value=6,e.value=e.__value,n.__value=7,n.value=n.__value,s.__value=8,s.value=s.__value},m(u,c){h(u,e,c),h(u,l,c),h(u,n,c),h(u,o,c),h(u,s,c)},d(u){u&&b(e),u&&b(l),u&&b(n),u&&b(o),u&&b(s)}}}function up(t){let e;return{c(){e=r("option"),e.textContent="GPIO9",e.__value=9,e.value=e.__value},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function ap(t){let e;return{c(){e=r("option"),e.textContent="GPIO11",e.__value=11,e.value=e.__value},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function rp(t){let e;return{c(){e=r("option"),e.textContent="GPIO16",e.__value=16,e.value=e.__value},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function fp(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L=t[0]!="esp32s2"&&pp();return{c(){e=r("option"),e.textContent="GPIO17",l=d(),L&&L.c(),n=d(),o=r("option"),o.textContent="GPIO19",s=d(),u=r("option"),u.textContent="GPIO21",c=d(),f=r("option"),f.textContent="GPIO22",p=d(),m=r("option"),m.textContent="GPIO23",_=d(),v=r("option"),v.textContent="GPIO25",w=d(),k=r("option"),k.textContent="GPIO32",g=d(),C=r("option"),C.textContent="GPIO33",y=d(),S=r("option"),S.textContent="GPIO34",I=d(),D=r("option"),D.textContent="GPIO35",A=d(),M=r("option"),M.textContent="GPIO36",z=d(),R=r("option"),R.textContent="GPIO39",e.__value=17,e.value=e.__value,o.__value=19,o.value=o.__value,u.__value=21,u.value=u.__value,f.__value=22,f.value=f.__value,m.__value=23,m.value=m.__value,v.__value=25,v.value=v.__value,k.__value=32,k.value=k.__value,C.__value=33,C.value=C.__value,S.__value=34,S.value=S.__value,D.__value=35,D.value=D.__value,M.__value=36,M.value=M.__value,R.__value=39,R.value=R.__value},m(T,P){h(T,e,P),h(T,l,P),L&&L.m(T,P),h(T,n,P),h(T,o,P),h(T,s,P),h(T,u,P),h(T,c,P),h(T,f,P),h(T,p,P),h(T,m,P),h(T,_,P),h(T,v,P),h(T,w,P),h(T,k,P),h(T,g,P),h(T,C,P),h(T,y,P),h(T,S,P),h(T,I,P),h(T,D,P),h(T,A,P),h(T,M,P),h(T,z,P),h(T,R,P)},p(T,P){T[0]!="esp32s2"?L||(L=pp(),L.c(),L.m(n.parentNode,n)):L&&(L.d(1),L=null)},d(T){T&&b(e),T&&b(l),L&&L.d(T),T&&b(n),T&&b(o),T&&b(s),T&&b(u),T&&b(c),T&&b(f),T&&b(p),T&&b(m),T&&b(_),T&&b(v),T&&b(w),T&&b(k),T&&b(g),T&&b(C),T&&b(y),T&&b(S),T&&b(I),T&&b(D),T&&b(A),T&&b(M),T&&b(z),T&&b(R)}}}function pp(t){let e;return{c(){e=r("option"),e.textContent="GPIO18",e.__value=18,e.value=e.__value},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function cp(t){let e,l,n,o,s,u,c,f,p;return{c(){e=r("option"),e.textContent="GPIO40",l=d(),n=r("option"),n.textContent="GPIO41",o=d(),s=r("option"),s.textContent="GPIO42",u=d(),c=r("option"),c.textContent="GPIO43",f=d(),p=r("option"),p.textContent="GPIO44",e.__value=40,e.value=e.__value,n.__value=41,n.value=n.__value,s.__value=42,s.value=s.__value,c.__value=43,c.value=c.__value,p.__value=44,p.value=p.__value},m(m,_){h(m,e,_),h(m,l,_),h(m,n,_),h(m,o,_),h(m,s,_),h(m,u,_),h(m,c,_),h(m,f,_),h(m,p,_)},d(m){m&&b(e),m&&b(l),m&&b(n),m&&b(o),m&&b(s),m&&b(u),m&&b(c),m&&b(f),m&&b(p)}}}function Om(t){let e,l,n,o,s,u,c,f,p,m=t[0].startsWith("esp32"),_,v,w,k,g=t[0].startsWith("esp32"),C,y,S,I,D,A,M,z,R,L,T=t[0].startsWith("esp32"),P,N,q=t[0]=="esp8266"&&np(),Q=(t[0]=="esp32"||t[0]=="esp32solo")&&ip(),U=t[0]=="esp32s2"&&op(),G=m&&sp(),W=t[0]=="esp8266"&&up(),Z=g&&ap(),K=t[0]=="esp32s2"&&rp(),te=T&&fp(t),J=t[0]=="esp32s2"&&cp();return{c(){e=r("option"),e.textContent="UART0",l=d(),q&&q.c(),n=d(),Q&&Q.c(),o=d(),U&&U.c(),s=d(),u=r("option"),u.textContent="GPIO4",c=d(),f=r("option"),f.textContent="GPIO5",p=d(),G&&G.c(),_=d(),W&&W.c(),v=d(),w=r("option"),w.textContent="GPIO10",k=d(),Z&&Z.c(),C=d(),y=r("option"),y.textContent="GPIO12",S=d(),I=r("option"),I.textContent="GPIO13",D=d(),A=r("option"),A.textContent="GPIO14",M=d(),z=r("option"),z.textContent="GPIO15",R=d(),K&&K.c(),L=d(),te&&te.c(),P=d(),J&&J.c(),N=Qe(),e.__value=3,e.value=e.__value,u.__value=4,u.value=u.__value,f.__value=5,f.value=f.__value,w.__value=10,w.value=w.__value,y.__value=12,y.value=y.__value,I.__value=13,I.value=I.__value,A.__value=14,A.value=A.__value,z.__value=15,z.value=z.__value},m(H,ne){h(H,e,ne),h(H,l,ne),q&&q.m(H,ne),h(H,n,ne),Q&&Q.m(H,ne),h(H,o,ne),U&&U.m(H,ne),h(H,s,ne),h(H,u,ne),h(H,c,ne),h(H,f,ne),h(H,p,ne),G&&G.m(H,ne),h(H,_,ne),W&&W.m(H,ne),h(H,v,ne),h(H,w,ne),h(H,k,ne),Z&&Z.m(H,ne),h(H,C,ne),h(H,y,ne),h(H,S,ne),h(H,I,ne),h(H,D,ne),h(H,A,ne),h(H,M,ne),h(H,z,ne),h(H,R,ne),K&&K.m(H,ne),h(H,L,ne),te&&te.m(H,ne),h(H,P,ne),J&&J.m(H,ne),h(H,N,ne)},p(H,[ne]){H[0]=="esp8266"?q||(q=np(),q.c(),q.m(n.parentNode,n)):q&&(q.d(1),q=null),H[0]=="esp32"||H[0]=="esp32solo"?Q||(Q=ip(),Q.c(),Q.m(o.parentNode,o)):Q&&(Q.d(1),Q=null),H[0]=="esp32s2"?U||(U=op(),U.c(),U.m(s.parentNode,s)):U&&(U.d(1),U=null),ne&1&&(m=H[0].startsWith("esp32")),m?G||(G=sp(),G.c(),G.m(_.parentNode,_)):G&&(G.d(1),G=null),H[0]=="esp8266"?W||(W=up(),W.c(),W.m(v.parentNode,v)):W&&(W.d(1),W=null),ne&1&&(g=H[0].startsWith("esp32")),g?Z||(Z=ap(),Z.c(),Z.m(C.parentNode,C)):Z&&(Z.d(1),Z=null),H[0]=="esp32s2"?K||(K=rp(),K.c(),K.m(L.parentNode,L)):K&&(K.d(1),K=null),ne&1&&(T=H[0].startsWith("esp32")),T?te?te.p(H,ne):(te=fp(H),te.c(),te.m(P.parentNode,P)):te&&(te.d(1),te=null),H[0]=="esp32s2"?J||(J=cp(),J.c(),J.m(N.parentNode,N)):J&&(J.d(1),J=null)},i:fe,o:fe,d(H){H&&b(e),H&&b(l),q&&q.d(H),H&&b(n),Q&&Q.d(H),H&&b(o),U&&U.d(H),H&&b(s),H&&b(u),H&&b(c),H&&b(f),H&&b(p),G&&G.d(H),H&&b(_),W&&W.d(H),H&&b(v),H&&b(w),H&&b(k),Z&&Z.d(H),H&&b(C),H&&b(y),H&&b(S),H&&b(I),H&&b(D),H&&b(A),H&&b(M),H&&b(z),H&&b(R),K&&K.d(H),H&&b(L),te&&te.d(H),H&&b(P),J&&J.d(H),H&&b(N)}}}function Rm(t,e,l){let{chip:n}=e;return t.$$set=o=>{"chip"in o&&l(0,n=o.chip)},[n]}class Wc extends Ae{constructor(e){super(),Ie(this,e,Rm,Om,Se,{chip:0})}}function mp(t){let e,l,n=t[1]&&_p(t);return{c(){e=r("div"),l=r("div"),n&&n.c(),a(l,"class","fixed inset-0 bg-gray-500 bg-opacity-50 flex items-center justify-center"),a(e,"class","z-50"),a(e,"aria-modal","true")},m(o,s){h(o,e,s),i(e,l),n&&n.m(l,null)},p(o,s){o[1]?n?n.p(o,s):(n=_p(o),n.c(),n.m(l,null)):n&&(n.d(1),n=null)},d(o){o&&b(e),n&&n.d()}}}function _p(t){let e,l;return{c(){e=r("div"),l=$(t[1]),a(e,"class","bg-white m-2 p-3 rounded-md shadow-lg pb-4 text-gray-700 w-96")},m(n,o){h(n,e,o),i(e,l)},p(n,o){o&2&&V(l,n[1])},d(n){n&&b(e)}}}function Lm(t){let e,l=t[0]&&mp(t);return{c(){l&&l.c(),e=Qe()},m(n,o){l&&l.m(n,o),h(n,e,o)},p(n,[o]){n[0]?l?l.p(n,o):(l=mp(n),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:fe,o:fe,d(n){l&&l.d(n),n&&b(e)}}}function Um(t,e,l){let{active:n}=e,{message:o}=e;return t.$$set=s=>{"active"in s&&l(0,n=s.active),"message"in s&&l(1,o=s.message)},[n,o]}class Ot extends Ae{constructor(e){super(),Ie(this,e,Um,Lm,Se,{active:0,message:1})}}function dp(t,e,l){const n=t.slice();return n[1]=e[l],n}function vp(t){let e,l,n=t[1]+"",o;return{c(){e=r("option"),l=$("Europe/"),o=$(n),e.__value="Europe/"+t[1],e.value=e.__value},m(s,u){h(s,e,u),i(e,l),i(e,o)},p:fe,d(s){s&&b(e)}}}function Hm(t){let e,l,n,o=t[0],s=[];for(let u=0;u{u[m]=null}),De(),l=u[e],l||(l=u[e]=s[e](f),l.c()),F(l,1),l.m(n.parentNode,n))},i(f){o||(F(l),o=!0)},o(f){O(l),o=!1},d(f){u[e].d(f),f&&b(n)}}}function Ym(t){let e,l;return e=new kl({props:{color:"blue",text:"Upload cert",title:"Click here to upload certificate"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Vm(t){let e,l;return e=new kl({props:{color:"green",text:"Cert OK",title:"Click here to replace certificate"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Km(t){let e,l,n,o;const s=[Vm,Ym],u=[];function c(f,p){return f[3].q.s.r?0:1}return e=c(t),l=u[e]=s[e](t),{c(){l.c(),n=Qe()},m(f,p){u[e].m(f,p),h(f,n,p),o=!0},p(f,p){let m=e;e=c(f),e!==m&&(Me(),O(u[m],1,1,()=>{u[m]=null}),De(),l=u[e],l||(l=u[e]=s[e](f),l.c()),F(l,1),l.m(n.parentNode,n))},i(f){o||(F(l),o=!0)},o(f){O(l),o=!1},d(f){u[e].d(f),f&&b(n)}}}function Qm(t){let e,l;return e=new kl({props:{color:"blue",text:"Upload key",title:"Click here to upload key"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Zm(t){let e,l;return e=new kl({props:{color:"green",text:"Key OK",title:"Click here to replace key"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function Jm(t){let e,l,n,o;const s=[Zm,Qm],u=[];function c(f,p){return f[3].q.s.k?0:1}return e=c(t),l=u[e]=s[e](t),{c(){l.c(),n=Qe()},m(f,p){u[e].m(f,p),h(f,n,p),o=!0},p(f,p){let m=e;e=c(f),e!==m&&(Me(),O(u[m],1,1,()=>{u[m]=null}),De(),l=u[e],l||(l=u[e]=s[e](f),l.c()),F(l,1),l.m(n.parentNode,n))},i(f){o||(F(l),o=!0)},o(f){O(l),o=!1},d(f){u[e].d(f),f&&b(n)}}}function Sp(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G;return s=new fl({}),{c(){e=r("div"),l=r("strong"),l.textContent="Domoticz",n=d(),o=r("a"),ee(s.$$.fragment),u=d(),c=r("input"),f=d(),p=r("div"),m=r("div"),_=$("Electricity IDX"),v=r("br"),w=d(),k=r("input"),g=d(),C=r("div"),y=$("Current IDX"),S=r("br"),I=d(),D=r("input"),A=d(),M=r("div"),z=$(`Voltage IDX: L1, L2 & L3 + `),R=r("div"),L=r("input"),T=d(),P=r("input"),N=d(),q=r("input"),a(l,"class","text-sm"),a(o,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/MQTT-configuration#domoticz"),a(o,"target","_blank"),a(o,"class","float-right"),a(c,"type","hidden"),a(c,"name","o"),c.value="true",a(k,"name","oe"),a(k,"type","text"),a(k,"class","in-f tr w-full"),a(m,"class","w-1/2"),a(D,"name","oc"),a(D,"type","text"),a(D,"class","in-l tr w-full"),a(C,"class","w-1/2"),a(p,"class","my-1 flex"),a(L,"name","ou1"),a(L,"type","text"),a(L,"class","in-f tr w-1/3"),a(P,"name","ou2"),a(P,"type","text"),a(P,"class","in-m tr w-1/3"),a(q,"name","ou3"),a(q,"type","text"),a(q,"class","in-l tr w-1/3"),a(R,"class","flex"),a(M,"class","my-1"),a(e,"class","cnt")},m(W,Z){h(W,e,Z),i(e,l),i(e,n),i(e,o),X(s,o,null),i(e,u),i(e,c),i(e,f),i(e,p),i(p,m),i(m,_),i(m,v),i(m,w),i(m,k),Y(k,t[3].o.e),i(p,g),i(p,C),i(C,y),i(C,S),i(C,I),i(C,D),Y(D,t[3].o.c),i(e,A),i(e,M),i(M,z),i(M,R),i(R,L),Y(L,t[3].o.u1),i(R,T),i(R,P),Y(P,t[3].o.u2),i(R,N),i(R,q),Y(q,t[3].o.u3),Q=!0,U||(G=[B(k,"input",t[56]),B(D,"input",t[57]),B(L,"input",t[58]),B(P,"input",t[59]),B(q,"input",t[60])],U=!0)},p(W,Z){Z[0]&8&&k.value!==W[3].o.e&&Y(k,W[3].o.e),Z[0]&8&&D.value!==W[3].o.c&&Y(D,W[3].o.c),Z[0]&8&&L.value!==W[3].o.u1&&Y(L,W[3].o.u1),Z[0]&8&&P.value!==W[3].o.u2&&Y(P,W[3].o.u2),Z[0]&8&&q.value!==W[3].o.u3&&Y(q,W[3].o.u3)},i(W){Q||(F(s.$$.fragment,W),Q=!0)},o(W){O(s.$$.fragment,W),Q=!1},d(W){W&&b(e),x(s),U=!1,et(G)}}}function Pp(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G,W,Z,K,te,J,H,ne,Ce,ge,Ee,he,ve,ae,ke,_e,le,ue,j,pe,$e,we,oe,ce,ze,Pe,qe,Be,_t,Ue,Oe,it,He,Ge,se,be,ot,Ve,bt,dt,Gt,Ze,ht,Rt,tt,lt,Lt,Je,gt,nt;return s=new fl({}),{c(){e=r("div"),l=r("strong"),l.textContent="Tariff thresholds",n=d(),o=r("a"),ee(s.$$.fragment),u=d(),c=r("input"),f=d(),p=r("div"),m=r("label"),_=r("span"),_.textContent="1",v=d(),w=r("input"),k=d(),g=r("span"),g.textContent="kWh",C=d(),y=r("label"),S=r("span"),S.textContent="2",I=d(),D=r("input"),A=d(),M=r("span"),M.textContent="kWh",z=d(),R=r("label"),L=r("span"),L.textContent="3",T=d(),P=r("input"),N=d(),q=r("span"),q.textContent="kWh",Q=d(),U=r("label"),G=r("span"),G.textContent="4",W=d(),Z=r("input"),K=d(),te=r("span"),te.textContent="kWh",J=d(),H=r("label"),ne=r("span"),ne.textContent="5",Ce=d(),ge=r("input"),Ee=d(),he=r("span"),he.textContent="kWh",ve=d(),ae=r("label"),ke=r("span"),ke.textContent="6",_e=d(),le=r("input"),ue=d(),j=r("span"),j.textContent="kWh",pe=d(),$e=r("label"),we=r("span"),we.textContent="7",oe=d(),ce=r("input"),ze=d(),Pe=r("span"),Pe.textContent="kWh",qe=d(),Be=r("label"),_t=r("span"),_t.textContent="8",Ue=d(),Oe=r("input"),it=d(),He=r("span"),He.textContent="kWh",Ge=d(),se=r("label"),be=r("span"),be.textContent="9",ot=d(),Ve=r("input"),bt=d(),dt=r("span"),dt.textContent="kWh",Gt=d(),Ze=r("label"),ht=r("span"),ht.textContent="Average of",Rt=d(),tt=r("input"),lt=d(),Lt=r("span"),Lt.textContent="hours",a(l,"class","text-sm"),a(o,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/Threshold-configuration"),a(o,"target","_blank"),a(o,"class","float-right"),a(c,"type","hidden"),a(c,"name","t"),c.value="true",a(_,"class","in-pre"),a(w,"name","t0"),a(w,"type","number"),a(w,"min","0"),a(w,"max","255"),a(w,"class","in-txt w-full"),a(g,"class","in-post"),a(m,"class","flex w-40 m-1"),a(S,"class","in-pre"),a(D,"name","t1"),a(D,"type","number"),a(D,"min","0"),a(D,"max","255"),a(D,"class","in-txt w-full"),a(M,"class","in-post"),a(y,"class","flex w-40 m-1"),a(L,"class","in-pre"),a(P,"name","t2"),a(P,"type","number"),a(P,"min","0"),a(P,"max","255"),a(P,"class","in-txt w-full"),a(q,"class","in-post"),a(R,"class","flex w-40 m-1"),a(G,"class","in-pre"),a(Z,"name","t3"),a(Z,"type","number"),a(Z,"min","0"),a(Z,"max","255"),a(Z,"class","in-txt w-full"),a(te,"class","in-post"),a(U,"class","flex w-40 m-1"),a(ne,"class","in-pre"),a(ge,"name","t4"),a(ge,"type","number"),a(ge,"min","0"),a(ge,"max","255"),a(ge,"class","in-txt w-full"),a(he,"class","in-post"),a(H,"class","flex w-40 m-1"),a(ke,"class","in-pre"),a(le,"name","t5"),a(le,"type","number"),a(le,"min","0"),a(le,"max","255"),a(le,"class","in-txt w-full"),a(j,"class","in-post"),a(ae,"class","flex w-40 m-1"),a(we,"class","in-pre"),a(ce,"name","t6"),a(ce,"type","number"),a(ce,"min","0"),a(ce,"max","255"),a(ce,"class","in-txt w-full"),a(Pe,"class","in-post"),a($e,"class","flex w-40 m-1"),a(_t,"class","in-pre"),a(Oe,"name","t7"),a(Oe,"type","number"),a(Oe,"min","0"),a(Oe,"max","255"),a(Oe,"class","in-txt w-full"),a(He,"class","in-post"),a(Be,"class","flex w-40 m-1"),a(be,"class","in-pre"),a(Ve,"name","t8"),a(Ve,"type","number"),a(Ve,"min","0"),a(Ve,"max","255"),a(Ve,"class","in-txt w-full"),a(dt,"class","in-post"),a(se,"class","flex w-40 m-1"),a(p,"class","flex flex-wrap my-1"),a(ht,"class","in-pre"),a(tt,"name","th"),a(tt,"type","number"),a(tt,"min","0"),a(tt,"max","255"),a(tt,"class","in-txt tr w-full"),a(Lt,"class","in-post"),a(Ze,"class","flex m-1"),a(e,"class","cnt")},m(Te,Xe){h(Te,e,Xe),i(e,l),i(e,n),i(e,o),X(s,o,null),i(e,u),i(e,c),i(e,f),i(e,p),i(p,m),i(m,_),i(m,v),i(m,w),Y(w,t[3].t.t[0]),i(m,k),i(m,g),i(p,C),i(p,y),i(y,S),i(y,I),i(y,D),Y(D,t[3].t.t[1]),i(y,A),i(y,M),i(p,z),i(p,R),i(R,L),i(R,T),i(R,P),Y(P,t[3].t.t[2]),i(R,N),i(R,q),i(p,Q),i(p,U),i(U,G),i(U,W),i(U,Z),Y(Z,t[3].t.t[3]),i(U,K),i(U,te),i(p,J),i(p,H),i(H,ne),i(H,Ce),i(H,ge),Y(ge,t[3].t.t[4]),i(H,Ee),i(H,he),i(p,ve),i(p,ae),i(ae,ke),i(ae,_e),i(ae,le),Y(le,t[3].t.t[5]),i(ae,ue),i(ae,j),i(p,pe),i(p,$e),i($e,we),i($e,oe),i($e,ce),Y(ce,t[3].t.t[6]),i($e,ze),i($e,Pe),i(p,qe),i(p,Be),i(Be,_t),i(Be,Ue),i(Be,Oe),Y(Oe,t[3].t.t[7]),i(Be,it),i(Be,He),i(p,Ge),i(p,se),i(se,be),i(se,ot),i(se,Ve),Y(Ve,t[3].t.t[8]),i(se,bt),i(se,dt),i(e,Gt),i(e,Ze),i(Ze,ht),i(Ze,Rt),i(Ze,tt),Y(tt,t[3].t.h),i(Ze,lt),i(Ze,Lt),Je=!0,gt||(nt=[B(w,"input",t[61]),B(D,"input",t[62]),B(P,"input",t[63]),B(Z,"input",t[64]),B(ge,"input",t[65]),B(le,"input",t[66]),B(ce,"input",t[67]),B(Oe,"input",t[68]),B(Ve,"input",t[69]),B(tt,"input",t[70])],gt=!0)},p(Te,Xe){Xe[0]&8&&re(w.value)!==Te[3].t.t[0]&&Y(w,Te[3].t.t[0]),Xe[0]&8&&re(D.value)!==Te[3].t.t[1]&&Y(D,Te[3].t.t[1]),Xe[0]&8&&re(P.value)!==Te[3].t.t[2]&&Y(P,Te[3].t.t[2]),Xe[0]&8&&re(Z.value)!==Te[3].t.t[3]&&Y(Z,Te[3].t.t[3]),Xe[0]&8&&re(ge.value)!==Te[3].t.t[4]&&Y(ge,Te[3].t.t[4]),Xe[0]&8&&re(le.value)!==Te[3].t.t[5]&&Y(le,Te[3].t.t[5]),Xe[0]&8&&re(ce.value)!==Te[3].t.t[6]&&Y(ce,Te[3].t.t[6]),Xe[0]&8&&re(Oe.value)!==Te[3].t.t[7]&&Y(Oe,Te[3].t.t[7]),Xe[0]&8&&re(Ve.value)!==Te[3].t.t[8]&&Y(Ve,Te[3].t.t[8]),Xe[0]&8&&re(tt.value)!==Te[3].t.h&&Y(tt,Te[3].t.h)},i(Te){Je||(F(s.$$.fragment,Te),Je=!0)},o(Te){O(s.$$.fragment,Te),Je=!1},d(Te){Te&&b(e),x(s),gt=!1,et(nt)}}}function Tp(t){let e,l,n,o,s,u,c,f;s=new fl({});let p=t[0].board>20&&Fp(t),m=t[0].chip=="esp8266"&&Mp(t);return{c(){e=r("div"),l=r("strong"),l.textContent="Hardware",n=d(),o=r("a"),ee(s.$$.fragment),u=d(),p&&p.c(),c=d(),m&&m.c(),a(l,"class","text-sm"),a(o,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/GPIO-configuration"),a(o,"target","_blank"),a(o,"class","float-right"),a(e,"class","cnt")},m(_,v){h(_,e,v),i(e,l),i(e,n),i(e,o),X(s,o,null),i(e,u),p&&p.m(e,null),i(e,c),m&&m.m(e,null),f=!0},p(_,v){_[0].board>20?p?(p.p(_,v),v[0]&1&&F(p,1)):(p=Fp(_),p.c(),F(p,1),p.m(e,c)):p&&(Me(),O(p,1,1,()=>{p=null}),De()),_[0].chip=="esp8266"?m?m.p(_,v):(m=Mp(_),m.c(),m.m(e,null)):m&&(m.d(1),m=null)},i(_){f||(F(s.$$.fragment,_),F(p),f=!0)},o(_){O(s.$$.fragment,_),O(p),f=!1},d(_){_&&b(e),x(s),p&&p.d(),m&&m.d()}}}function Fp(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G,W,Z,K,te,J,H,ne,Ce,ge,Ee,he,ve,ae,ke,_e,le,ue,j,pe,$e,we,oe,ce,ze,Pe,qe,Be,_t,Ue,Oe,it;p=new Wc({props:{chip:t[0].chip}});let He=t[0].chip!="esp8266"&&Ip(t),Ge=t[3].i.v.p>0&&Ap(t);return{c(){e=r("input"),l=d(),n=r("div"),o=r("div"),s=$("HAN"),u=r("br"),c=d(),f=r("select"),ee(p.$$.fragment),m=d(),_=r("div"),v=$("AP button"),w=r("br"),k=d(),g=r("input"),y=d(),S=r("div"),I=$("LED"),D=r("label"),A=r("input"),M=$(" inv"),z=r("br"),R=d(),L=r("div"),T=r("input"),N=d(),q=r("div"),Q=$("RGB"),U=r("label"),G=r("input"),W=$(" inverted"),Z=r("br"),K=d(),te=r("div"),J=r("input"),ne=d(),Ce=r("input"),Ee=d(),he=r("input"),ae=d(),ke=r("div"),_e=$("Temperature"),le=r("br"),ue=d(),j=r("input"),$e=d(),we=r("div"),oe=$("Analog temp"),ce=r("br"),ze=d(),Pe=r("input"),Be=d(),He&&He.c(),_t=d(),Ge&&Ge.c(),a(e,"type","hidden"),a(e,"name","i"),e.value="true",a(f,"name","ih"),a(f,"class","in-f w-full"),t[3].i.h===void 0&&Re(()=>t[82].call(f)),a(o,"class","w-1/3"),a(g,"name","ia"),a(g,"type","number"),a(g,"min","0"),a(g,"max",C=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(g,"class","in-m tr w-full"),a(_,"class","w-1/3"),a(A,"name","ili"),A.__value="true",A.value=A.__value,a(A,"type","checkbox"),a(A,"class","rounded mb-1"),a(D,"class","ml-4"),a(T,"name","ilp"),a(T,"type","number"),a(T,"min","0"),a(T,"max",P=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(T,"class","in-l tr w-full"),a(L,"class","flex"),a(S,"class","w-1/3"),a(G,"name","iri"),G.__value="true",G.value=G.__value,a(G,"type","checkbox"),a(G,"class","rounded mb-1"),a(U,"class","ml-4"),a(J,"name","irr"),a(J,"type","number"),a(J,"min","0"),a(J,"max",H=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(J,"class","in-f tr w-1/3"),a(Ce,"name","irg"),a(Ce,"type","number"),a(Ce,"min","0"),a(Ce,"max",ge=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(Ce,"class","in-m tr w-1/3"),a(he,"name","irb"),a(he,"type","number"),a(he,"min","0"),a(he,"max",ve=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(he,"class","in-l tr w-1/3"),a(te,"class","flex"),a(q,"class","w-full"),a(j,"name","itd"),a(j,"type","number"),a(j,"min","0"),a(j,"max",pe=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(j,"class","in-f tr w-full"),a(ke,"class","my-1 w-1/3"),a(Pe,"name","ita"),a(Pe,"type","number"),a(Pe,"min","0"),a(Pe,"max",qe=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(Pe,"class","in-l tr w-full"),a(we,"class","my-1 pr-1 w-1/3"),a(n,"class","flex flex-wrap")},m(se,be){h(se,e,be),h(se,l,be),h(se,n,be),i(n,o),i(o,s),i(o,u),i(o,c),i(o,f),X(p,f,null),de(f,t[3].i.h),i(n,m),i(n,_),i(_,v),i(_,w),i(_,k),i(_,g),Y(g,t[3].i.a),i(n,y),i(n,S),i(S,I),i(S,D),i(D,A),A.checked=t[3].i.l.i,i(D,M),i(S,z),i(S,R),i(S,L),i(L,T),Y(T,t[3].i.l.p),i(n,N),i(n,q),i(q,Q),i(q,U),i(U,G),G.checked=t[3].i.r.i,i(U,W),i(q,Z),i(q,K),i(q,te),i(te,J),Y(J,t[3].i.r.r),i(te,ne),i(te,Ce),Y(Ce,t[3].i.r.g),i(te,Ee),i(te,he),Y(he,t[3].i.r.b),i(n,ae),i(n,ke),i(ke,_e),i(ke,le),i(ke,ue),i(ke,j),Y(j,t[3].i.t.d),i(n,$e),i(n,we),i(we,oe),i(we,ce),i(we,ze),i(we,Pe),Y(Pe,t[3].i.t.a),i(n,Be),He&&He.m(n,null),i(n,_t),Ge&&Ge.m(n,null),Ue=!0,Oe||(it=[B(f,"change",t[82]),B(g,"input",t[83]),B(A,"change",t[84]),B(T,"input",t[85]),B(G,"change",t[86]),B(J,"input",t[87]),B(Ce,"input",t[88]),B(he,"input",t[89]),B(j,"input",t[90]),B(Pe,"input",t[91])],Oe=!0)},p(se,be){const ot={};be[0]&1&&(ot.chip=se[0].chip),p.$set(ot),be[0]&8&&de(f,se[3].i.h),(!Ue||be[0]&1&&C!==(C=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(g,"max",C),be[0]&8&&re(g.value)!==se[3].i.a&&Y(g,se[3].i.a),be[0]&8&&(A.checked=se[3].i.l.i),(!Ue||be[0]&1&&P!==(P=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(T,"max",P),be[0]&8&&re(T.value)!==se[3].i.l.p&&Y(T,se[3].i.l.p),be[0]&8&&(G.checked=se[3].i.r.i),(!Ue||be[0]&1&&H!==(H=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(J,"max",H),be[0]&8&&re(J.value)!==se[3].i.r.r&&Y(J,se[3].i.r.r),(!Ue||be[0]&1&&ge!==(ge=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(Ce,"max",ge),be[0]&8&&re(Ce.value)!==se[3].i.r.g&&Y(Ce,se[3].i.r.g),(!Ue||be[0]&1&&ve!==(ve=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(he,"max",ve),be[0]&8&&re(he.value)!==se[3].i.r.b&&Y(he,se[3].i.r.b),(!Ue||be[0]&1&&pe!==(pe=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(j,"max",pe),be[0]&8&&re(j.value)!==se[3].i.t.d&&Y(j,se[3].i.t.d),(!Ue||be[0]&1&&qe!==(qe=se[0].chip=="esp8266"?16:se[0].chip=="esp32s2"?44:39))&&a(Pe,"max",qe),be[0]&8&&re(Pe.value)!==se[3].i.t.a&&Y(Pe,se[3].i.t.a),se[0].chip!="esp8266"?He?He.p(se,be):(He=Ip(se),He.c(),He.m(n,_t)):He&&(He.d(1),He=null),se[3].i.v.p>0?Ge?Ge.p(se,be):(Ge=Ap(se),Ge.c(),Ge.m(n,null)):Ge&&(Ge.d(1),Ge=null)},i(se){Ue||(F(p.$$.fragment,se),Ue=!0)},o(se){O(p.$$.fragment,se),Ue=!1},d(se){se&&b(e),se&&b(l),se&&b(n),x(p),He&&He.d(),Ge&&Ge.d(),Oe=!1,et(it)}}}function Ip(t){let e,l,n,o,s,u,c,f;return{c(){e=r("div"),l=$("Vcc"),n=r("br"),o=d(),s=r("input"),a(s,"name","ivp"),a(s,"type","number"),a(s,"min","0"),a(s,"max",u=t[0].chip=="esp8266"?16:t[0].chip=="esp32s2"?44:39),a(s,"class","in-s tr w-full"),a(e,"class","my-1 pl-1 w-1/3")},m(p,m){h(p,e,m),i(e,l),i(e,n),i(e,o),i(e,s),Y(s,t[3].i.v.p),c||(f=B(s,"input",t[92]),c=!0)},p(p,m){m[0]&1&&u!==(u=p[0].chip=="esp8266"?16:p[0].chip=="esp32s2"?44:39)&&a(s,"max",u),m[0]&8&&re(s.value)!==p[3].i.v.p&&Y(s,p[3].i.v.p)},d(p){p&&b(e),c=!1,f()}}}function Ap(t){let e,l,n,o,s,u,c,f,p,m;return{c(){e=r("div"),l=$("Voltage divider"),n=r("br"),o=d(),s=r("div"),u=r("input"),c=d(),f=r("input"),a(u,"name","ivdv"),a(u,"type","number"),a(u,"min","0"),a(u,"max","65535"),a(u,"class","in-f tr w-full"),a(u,"placeholder","VCC"),a(f,"name","ivdg"),a(f,"type","number"),a(f,"min","0"),a(f,"max","65535"),a(f,"class","in-l tr w-full"),a(f,"placeholder","GND"),a(s,"class","flex"),a(e,"class","my-1")},m(_,v){h(_,e,v),i(e,l),i(e,n),i(e,o),i(e,s),i(s,u),Y(u,t[3].i.v.d.v),i(s,c),i(s,f),Y(f,t[3].i.v.d.g),p||(m=[B(u,"input",t[93]),B(f,"input",t[94])],p=!0)},p(_,v){v[0]&8&&re(u.value)!==_[3].i.v.d.v&&Y(u,_[3].i.v.d.v),v[0]&8&&re(f.value)!==_[3].i.v.d.g&&Y(f,_[3].i.v.d.g)},d(_){_&&b(e),p=!1,et(m)}}}function Mp(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S=(t[0].board==2||t[0].board==100)&&Dp(t);return{c(){e=r("input"),l=d(),n=r("div"),o=r("div"),s=$("Vcc offset"),u=r("br"),c=d(),f=r("input"),p=d(),m=r("div"),_=$("Multiplier"),v=r("br"),w=d(),k=r("input"),g=d(),S&&S.c(),a(e,"type","hidden"),a(e,"name","iv"),e.value="true",a(f,"name","ivo"),a(f,"type","number"),a(f,"min","0.0"),a(f,"max","3.5"),a(f,"step","0.01"),a(f,"class","in-f tr w-full"),a(o,"class","w-1/3"),a(k,"name","ivm"),a(k,"type","number"),a(k,"min","0.1"),a(k,"max","10"),a(k,"step","0.01"),a(k,"class","in-l tr w-full"),a(m,"class","w-1/3 pr-1"),a(n,"class","my-1 flex flex-wrap")},m(I,D){h(I,e,D),h(I,l,D),h(I,n,D),i(n,o),i(o,s),i(o,u),i(o,c),i(o,f),Y(f,t[3].i.v.o),i(n,p),i(n,m),i(m,_),i(m,v),i(m,w),i(m,k),Y(k,t[3].i.v.m),i(n,g),S&&S.m(n,null),C||(y=[B(f,"input",t[95]),B(k,"input",t[96])],C=!0)},p(I,D){D[0]&8&&re(f.value)!==I[3].i.v.o&&Y(f,I[3].i.v.o),D[0]&8&&re(k.value)!==I[3].i.v.m&&Y(k,I[3].i.v.m),I[0].board==2||I[0].board==100?S?S.p(I,D):(S=Dp(I),S.c(),S.m(n,null)):S&&(S.d(1),S=null)},d(I){I&&b(e),I&&b(l),I&&b(n),S&&S.d(),C=!1,et(y)}}}function Dp(t){let e,l,n,o,s,u,c;return{c(){e=r("div"),l=$("Boot limit"),n=r("br"),o=d(),s=r("input"),a(s,"name","ivb"),a(s,"type","number"),a(s,"min","2.5"),a(s,"max","3.5"),a(s,"step","0.1"),a(s,"class","in-s tr w-full"),a(e,"class","w-1/3 pl-1")},m(f,p){h(f,e,p),i(e,l),i(e,n),i(e,o),i(e,s),Y(s,t[3].i.v.b),u||(c=B(s,"input",t[97]),u=!0)},p(f,p){p[0]&8&&re(s.value)!==f[3].i.v.b&&Y(s,f[3].i.v.b)},d(f){f&&b(e),u=!1,c()}}}function Np(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y=t[3].d.t&&Ep();return{c(){e=r("div"),e.textContent="Debug can cause sudden reboots. Do not leave on!",l=d(),n=r("div"),o=r("label"),s=r("input"),u=$(" Enable telnet"),c=d(),y&&y.c(),f=d(),p=r("div"),m=r("select"),_=r("option"),_.textContent="Verbose",v=r("option"),v.textContent="Debug",w=r("option"),w.textContent="Info",k=r("option"),k.textContent="Warning",a(e,"class","bd-red"),a(s,"type","checkbox"),a(s,"name","dt"),s.__value="true",s.value=s.__value,a(s,"class","rounded mb-1"),a(n,"class","my-1"),_.__value=1,_.value=_.__value,v.__value=2,v.value=v.__value,w.__value=3,w.value=w.__value,k.__value=4,k.value=k.__value,a(m,"name","dl"),a(m,"class","in-s"),t[3].d.l===void 0&&Re(()=>t[100].call(m)),a(p,"class","my-1")},m(S,I){h(S,e,I),h(S,l,I),h(S,n,I),i(n,o),i(o,s),s.checked=t[3].d.t,i(o,u),h(S,c,I),y&&y.m(S,I),h(S,f,I),h(S,p,I),i(p,m),i(m,_),i(m,v),i(m,w),i(m,k),de(m,t[3].d.l),g||(C=[B(s,"change",t[99]),B(m,"change",t[100])],g=!0)},p(S,I){I[0]&8&&(s.checked=S[3].d.t),S[3].d.t?y||(y=Ep(),y.c(),y.m(f.parentNode,f)):y&&(y.d(1),y=null),I[0]&8&&de(m,S[3].d.l)},d(S){S&&b(e),S&&b(l),S&&b(n),S&&b(c),y&&y.d(S),S&&b(f),S&&b(p),g=!1,et(C)}}}function Ep(t){let e;return{c(){e=r("div"),e.textContent="Telnet is unsafe and should be off when not in use",a(e,"class","bd-red")},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function Xm(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G,W,Z,K,te,J,H,ne,Ce,ge,Ee,he,ve,ae,ke,_e,le,ue,j,pe,$e,we,oe,ce,ze,Pe,qe,Be,_t,Ue,Oe,it,He,Ge,se,be,ot,Ve,bt,dt,Gt,Ze,ht,Rt,tt,lt,Lt,Je,gt,nt,Te,Xe,me,Fe,Po,To,Fo,At,Dl,Nl,El,Io,Ao,Le,Fn,Mo,Ol,Rl,Do,Vl,No,Ll,pt,ao,Mt,ct,cl,Ul,In,Hl,An,Mn,Dn,Nn,En,On,du,kt,ql,vu,Eo,Rn,Ln,Un,Hn,Oo,bu,ro,Wt,hu,gu,Kl,ku,wu,yu,ml,qn,Gn,Cu,Wn,Ql,$u,Su,Pu,jn,jt,Tu,Ro,Fu,Zl,Iu,Au,Mu,zn,zt,Du,Lo,Nu,ws,Eu,Jl,Uo,Bt,Ou,Ru,Lu,ys,Ho,Yt,Uu,Hu,qu,vt,qo,Gu,Bn,Yn,Wu,fo,ju,Xl,zu,Bu,Yu,yl,Vu,xl,Ku,Qu,Zu,Cl,Ju,Vn,en,Xu,xu,ea,Ut,Kn,Qn,Zn,Jn,ta,tn,la,na,ia,Xn,Ht,oa,Go,sa,Wo,jo,Vt,ua,aa,mt,zo,ra,xn,ei,fa,ln,pa,ca,ma,Gl,_l,ti,li,_a,Dt,Bo,Yo,da,Nt,ni,Vo,Ko,va,Cs,Qo,Zo,Kt,ba,ha,po,ga,Wl,ka,co,Qt,wa,ya,Ca,Jo,$l,$a,xe,Xo,Sa,ii,oi,Pa,mo,Ta,dl,Fa,$s,Ia,Aa,si,Sl,Ma,Zt,Da,Ss,nn,Na,Ea,Oa,Pl,Ra,on,La,Ua,Ha,Tl,qa,ui,ai,Ga,Wa,ja,Fl,za,ri,Ba,Ya,Va,wt,fi,pi,ci,mi,_i,di,Ka,sn,Qa,Za,Ja,Il,Xa,Ps,Ts=t[3].p.r.startsWith("10YNO")||t[3].p.r=="10Y1001A1001A48H",Fs,vl,xo,xa,vi,bi,er,_o,tr,Ye,un,lr,nr,ir,Jt,hi,gi,ki,or,an,sr,ur,ar,Xt,wi,yi,Ci,rr,rn,fr,pr,cr,xt,$i,Si,Pi,mr,fn,_r,dr,vr,el,Ti,Fi,Ii,br,pn,hr,gr,kr,tl,Ai,Mi,Di,wr,cn,yr,Cr,$r,ll,Ni,Ei,Oi,Sr,mn,Pr,Tr,Fr,nl,Ri,Li,Ui,Ir,_n,Ar,Mr,Dr,il,Hi,qi,Gi,Nr,dn,Er,Or,Rr,ol,Wi,ji,zi,Lr,vn,Ur,Hr,qr,sl,Bi,Yi,Vi,Gr,bn,Wr,jr,zr,ul,Ki,Qi,Zi,Br,Is,Et,es,Yr,Ji,Xi,Vr,vo,Kr,ts,ls,al,Qr,Zr,Jr,jl,As,xi,Xr,ns,eo,xr,is,Ms,hn,Ds,gn,Ns,kn,Es,wn,rl,Os,ef;c=new fl({}),R=new Gm({});let yt=t[3].p.e&&t[0].chip!="esp8266"&&bp(t),Ct=t[3].g.s>0&&hp(t);Rl=new fl({});let $t=t[3].m.e.e&&gp(t),St=t[3].m.e.e&&kp(t),Pt=t[3].m.m.e&&wp(t);Yn=new fl({}),ei=new fl({}),ni=new jc({});let Tt=t[3].n.m=="static"&&yp(t);oi=new fl({});let Ft=t[0].chip!="esp8266"&&Cp(t),st=t[3].q.s.e&&$p(t),ut=t[3].q.m==3&&Sp(t),at=Ts&&Pp(t);bi=new fl({});let rt=(t[0].board>20||t[0].chip=="esp8266")&&Tp(t);Xi=new fl({});let It=t[3].d.s&&Np(t);return hn=new Ot({props:{active:t[1],message:"Loading configuration"}}),gn=new Ot({props:{active:t[2],message:"Saving configuration"}}),kn=new Ot({props:{active:t[4],message:"Performing factory reset"}}),wn=new Ot({props:{active:t[5],message:"Device have been factory reset and switched to AP mode"}}),{c(){e=r("form"),l=r("div"),n=r("div"),o=r("strong"),o.textContent="General",s=d(),u=r("a"),ee(c.$$.fragment),f=d(),p=r("input"),m=d(),_=r("div"),v=r("div"),w=r("div"),k=$("Hostname"),g=r("br"),C=d(),y=r("input"),S=d(),I=r("div"),D=$("Time zone"),A=r("br"),M=d(),z=r("select"),ee(R.$$.fragment),L=d(),T=r("input"),P=d(),N=r("div"),q=$("Price region"),Q=r("br"),U=d(),G=r("select"),W=r("optgroup"),Z=r("option"),Z.textContent="NO1",K=r("option"),K.textContent="NO2",te=r("option"),te.textContent="NO3",J=r("option"),J.textContent="NO4",H=r("option"),H.textContent="NO5",ne=r("optgroup"),Ce=r("option"),Ce.textContent="SE1",ge=r("option"),ge.textContent="SE2",Ee=r("option"),Ee.textContent="SE3",he=r("option"),he.textContent="SE4",ve=r("optgroup"),ae=r("option"),ae.textContent="DK1",ke=r("option"),ke.textContent="DK2",_e=r("option"),_e.textContent="Austria",le=r("option"),le.textContent="Belgium",ue=r("option"),ue.textContent="Czech Republic",j=r("option"),j.textContent="Estonia",pe=r("option"),pe.textContent="Finland",$e=r("option"),$e.textContent="France",we=r("option"),we.textContent="Germany",oe=r("option"),oe.textContent="Great Britain",ce=r("option"),ce.textContent="Latvia",ze=r("option"),ze.textContent="Lithuania",Pe=r("option"),Pe.textContent="Netherland",qe=r("option"),qe.textContent="Poland",Be=r("option"),Be.textContent="Switzerland",_t=d(),Ue=r("div"),Oe=r("div"),it=r("div"),He=$("Currency"),Ge=r("br"),se=d(),be=r("select"),ot=r("option"),ot.textContent="NOK",Ve=r("option"),Ve.textContent="SEK",bt=r("option"),bt.textContent="DKK",dt=r("option"),dt.textContent="EUR",Gt=d(),Ze=r("div"),ht=$("Multiplier"),Rt=r("br"),tt=d(),lt=r("input"),Lt=d(),Je=r("div"),gt=r("label"),nt=r("input"),Te=$(" Enable price fetch from remote server"),Xe=d(),yt&&yt.c(),me=d(),Fe=r("div"),Po=$("Security"),To=r("br"),Fo=d(),At=r("select"),Dl=r("option"),Dl.textContent="None",Nl=r("option"),Nl.textContent="Only configuration",El=r("option"),El.textContent="Everything",Io=d(),Ct&&Ct.c(),Ao=d(),Le=r("div"),Fn=r("strong"),Fn.textContent="Meter",Mo=d(),Ol=r("a"),ee(Rl.$$.fragment),Do=d(),Vl=r("input"),No=d(),Ll=r("div"),pt=r("span"),pt.textContent="Serial configuration",ao=d(),Mt=r("div"),ct=r("select"),cl=r("option"),Ul=$("Autodetect"),Hl=r("option"),Hl.textContent="2400",An=r("option"),An.textContent="4800",Mn=r("option"),Mn.textContent="9600",Dn=r("option"),Dn.textContent="19200",Nn=r("option"),Nn.textContent="38400",En=r("option"),En.textContent="57600",On=r("option"),On.textContent="115200",du=d(),kt=r("select"),ql=r("option"),vu=$("-"),Rn=r("option"),Rn.textContent="7N1",Ln=r("option"),Ln.textContent="8N1",Un=r("option"),Un.textContent="7E1",Hn=r("option"),Hn.textContent="8E1",bu=d(),ro=r("label"),Wt=r("input"),hu=$(" inverted"),gu=d(),Kl=r("div"),ku=$("Voltage"),wu=r("br"),yu=d(),ml=r("select"),qn=r("option"),qn.textContent="400V (TN)",Gn=r("option"),Gn.textContent="230V (IT/TT)",Cu=d(),Wn=r("div"),Ql=r("div"),$u=$("Main fuse"),Su=r("br"),Pu=d(),jn=r("label"),jt=r("input"),Tu=d(),Ro=r("span"),Ro.textContent="A",Fu=d(),Zl=r("div"),Iu=$("Production"),Au=r("br"),Mu=d(),zn=r("label"),zt=r("input"),Du=d(),Lo=r("span"),Lo.textContent="kWp",Nu=d(),ws=r("div"),Eu=d(),Jl=r("div"),Uo=r("label"),Bt=r("input"),Ou=$(" Meter is encrypted"),Ru=d(),$t&&$t.c(),Lu=d(),St&&St.c(),ys=d(),Ho=r("label"),Yt=r("input"),Uu=$(" Multipliers"),Hu=d(),Pt&&Pt.c(),qu=d(),vt=r("div"),qo=r("strong"),qo.textContent="WiFi",Gu=d(),Bn=r("a"),ee(Yn.$$.fragment),Wu=d(),fo=r("input"),ju=d(),Xl=r("div"),zu=$("SSID"),Bu=r("br"),Yu=d(),yl=r("input"),Vu=d(),xl=r("div"),Ku=$("Password"),Qu=r("br"),Zu=d(),Cl=r("input"),Ju=d(),Vn=r("div"),en=r("div"),Xu=$("Power saving"),xu=r("br"),ea=d(),Ut=r("select"),Kn=r("option"),Kn.textContent="Default",Qn=r("option"),Qn.textContent="Off",Zn=r("option"),Zn.textContent="Minimum",Jn=r("option"),Jn.textContent="Maximum",ta=d(),tn=r("div"),la=$("Power"),na=r("br"),ia=d(),Xn=r("div"),Ht=r("input"),oa=d(),Go=r("span"),Go.textContent="dBm",sa=d(),Wo=r("div"),jo=r("label"),Vt=r("input"),ua=$(" Auto reboot on connection problem"),aa=d(),mt=r("div"),zo=r("strong"),zo.textContent="Network",ra=d(),xn=r("a"),ee(ei.$$.fragment),fa=d(),ln=r("div"),pa=$("IP"),ca=r("br"),ma=d(),Gl=r("div"),_l=r("select"),ti=r("option"),ti.textContent="DHCP",li=r("option"),li.textContent="Static",_a=d(),Dt=r("input"),da=d(),Nt=r("select"),ee(ni.$$.fragment),va=d(),Tt&&Tt.c(),Cs=d(),Qo=r("div"),Zo=r("label"),Kt=r("input"),ba=$(" enable mDNS"),ha=d(),po=r("input"),ga=d(),Wl=r("div"),ka=$("NTP "),co=r("label"),Qt=r("input"),wa=$(" obtain from DHCP"),ya=r("br"),Ca=d(),Jo=r("div"),$l=r("input"),$a=d(),xe=r("div"),Xo=r("strong"),Xo.textContent="MQTT",Sa=d(),ii=r("a"),ee(oi.$$.fragment),Pa=d(),mo=r("input"),Ta=d(),dl=r("div"),Fa=$(`Server + `),Ft&&Ft.c(),$s=d(),Ia=r("br"),Aa=d(),si=r("div"),Sl=r("input"),Ma=d(),Zt=r("input"),Da=d(),st&&st.c(),Ss=d(),nn=r("div"),Na=$("Username"),Ea=r("br"),Oa=d(),Pl=r("input"),Ra=d(),on=r("div"),La=$("Password"),Ua=r("br"),Ha=d(),Tl=r("input"),qa=d(),ui=r("div"),ai=r("div"),Ga=$("Client ID"),Wa=r("br"),ja=d(),Fl=r("input"),za=d(),ri=r("div"),Ba=$("Payload"),Ya=r("br"),Va=d(),wt=r("select"),fi=r("option"),fi.textContent="JSON",pi=r("option"),pi.textContent="Raw (minimal)",ci=r("option"),ci.textContent="Raw (full)",mi=r("option"),mi.textContent="Domoticz",_i=r("option"),_i.textContent="HomeAssistant",di=r("option"),di.textContent="HEX dump",Ka=d(),sn=r("div"),Qa=$("Publish topic"),Za=r("br"),Ja=d(),Il=r("input"),Xa=d(),ut&&ut.c(),Ps=d(),at&&at.c(),Fs=d(),vl=r("div"),xo=r("strong"),xo.textContent="User interface",xa=d(),vi=r("a"),ee(bi.$$.fragment),er=d(),_o=r("input"),tr=d(),Ye=r("div"),un=r("div"),lr=$("Import gauge"),nr=r("br"),ir=d(),Jt=r("select"),hi=r("option"),hi.textContent="Hide",gi=r("option"),gi.textContent="Show",ki=r("option"),ki.textContent="Dynamic",or=d(),an=r("div"),sr=$("Export gauge"),ur=r("br"),ar=d(),Xt=r("select"),wi=r("option"),wi.textContent="Hide",yi=r("option"),yi.textContent="Show",Ci=r("option"),Ci.textContent="Dynamic",rr=d(),rn=r("div"),fr=$("Voltage"),pr=r("br"),cr=d(),xt=r("select"),$i=r("option"),$i.textContent="Hide",Si=r("option"),Si.textContent="Show",Pi=r("option"),Pi.textContent="Dynamic",mr=d(),fn=r("div"),_r=$("Amperage"),dr=r("br"),vr=d(),el=r("select"),Ti=r("option"),Ti.textContent="Hide",Fi=r("option"),Fi.textContent="Show",Ii=r("option"),Ii.textContent="Dynamic",br=d(),pn=r("div"),hr=$("Reactive"),gr=r("br"),kr=d(),tl=r("select"),Ai=r("option"),Ai.textContent="Hide",Mi=r("option"),Mi.textContent="Show",Di=r("option"),Di.textContent="Dynamic",wr=d(),cn=r("div"),yr=$("Realtime"),Cr=r("br"),$r=d(),ll=r("select"),Ni=r("option"),Ni.textContent="Hide",Ei=r("option"),Ei.textContent="Show",Oi=r("option"),Oi.textContent="Dynamic",Sr=d(),mn=r("div"),Pr=$("Peaks"),Tr=r("br"),Fr=d(),nl=r("select"),Ri=r("option"),Ri.textContent="Hide",Li=r("option"),Li.textContent="Show",Ui=r("option"),Ui.textContent="Dynamic",Ir=d(),_n=r("div"),Ar=$("Price"),Mr=r("br"),Dr=d(),il=r("select"),Hi=r("option"),Hi.textContent="Hide",qi=r("option"),qi.textContent="Show",Gi=r("option"),Gi.textContent="Dynamic",Nr=d(),dn=r("div"),Er=$("Day plot"),Or=r("br"),Rr=d(),ol=r("select"),Wi=r("option"),Wi.textContent="Hide",ji=r("option"),ji.textContent="Show",zi=r("option"),zi.textContent="Dynamic",Lr=d(),vn=r("div"),Ur=$("Month plot"),Hr=r("br"),qr=d(),sl=r("select"),Bi=r("option"),Bi.textContent="Hide",Yi=r("option"),Yi.textContent="Show",Vi=r("option"),Vi.textContent="Dynamic",Gr=d(),bn=r("div"),Wr=$("Temperature plot"),jr=r("br"),zr=d(),ul=r("select"),Ki=r("option"),Ki.textContent="Hide",Qi=r("option"),Qi.textContent="Show",Zi=r("option"),Zi.textContent="Dynamic",Br=d(),rt&&rt.c(),Is=d(),Et=r("div"),es=r("strong"),es.textContent="Debugging",Yr=d(),Ji=r("a"),ee(Xi.$$.fragment),Vr=d(),vo=r("input"),Kr=d(),ts=r("div"),ls=r("label"),al=r("input"),Qr=$(" Enable debugging"),Zr=d(),It&&It.c(),Jr=d(),jl=r("div"),As=r("div"),xi=r("button"),xi.textContent="Factory reset",Xr=d(),ns=r("div"),eo=r("button"),eo.textContent="Reboot",xr=d(),is=r("div"),is.innerHTML='',Ms=d(),ee(hn.$$.fragment),Ds=d(),ee(gn.$$.fragment),Ns=d(),ee(kn.$$.fragment),Es=d(),ee(wn.$$.fragment),a(o,"class","text-sm"),a(u,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/General-configuration"),a(u,"target","_blank"),a(u,"class","float-right"),a(p,"type","hidden"),a(p,"name","g"),p.value="true",a(y,"name","gh"),a(y,"type","text"),a(y,"class","in-f w-full"),a(y,"pattern","[A-Za-z0-9-]+"),a(z,"name","gt"),a(z,"class","in-l"),t[3].g.t===void 0&&Re(()=>t[11].call(z)),a(v,"class","flex"),a(_,"class","my-1"),a(T,"type","hidden"),a(T,"name","p"),T.value="true",Z.__value="10YNO-1--------2",Z.value=Z.__value,K.__value="10YNO-2--------T",K.value=K.__value,te.__value="10YNO-3--------J",te.value=te.__value,J.__value="10YNO-4--------9",J.value=J.__value,H.__value="10Y1001A1001A48H",H.value=H.__value,a(W,"label","Norway"),Ce.__value="10Y1001A1001A44P",Ce.value=Ce.__value,ge.__value="10Y1001A1001A45N",ge.value=ge.__value,Ee.__value="10Y1001A1001A46L",Ee.value=Ee.__value,he.__value="10Y1001A1001A47J",he.value=he.__value,a(ne,"label","Sweden"),ae.__value="10YDK-1--------W",ae.value=ae.__value,ke.__value="10YDK-2--------M",ke.value=ke.__value,a(ve,"label","Denmark"),_e.__value="10YAT-APG------L",_e.value=_e.__value,le.__value="10YBE----------2",le.value=le.__value,ue.__value="10YCZ-CEPS-----N",ue.value=ue.__value,j.__value="10Y1001A1001A39I",j.value=j.__value,pe.__value="10YFI-1--------U",pe.value=pe.__value,$e.__value="10YFR-RTE------C",$e.value=$e.__value,we.__value="10Y1001A1001A83F",we.value=we.__value,oe.__value="10YGB----------A",oe.value=oe.__value,ce.__value="10YLV-1001A00074",ce.value=ce.__value,ze.__value="10YLT-1001A0008Q",ze.value=ze.__value,Pe.__value="10YNL----------L",Pe.value=Pe.__value,qe.__value="10YPL-AREA-----S",qe.value=qe.__value,Be.__value="10YCH-SWISSGRIDZ",Be.value=Be.__value,a(G,"name","pr"),a(G,"class","in-s"),t[3].p.r===void 0&&Re(()=>t[12].call(G)),a(N,"class","my-1"),ot.__value="NOK",ot.value=ot.__value,Ve.__value="SEK",Ve.value=Ve.__value,bt.__value="DKK",bt.value=bt.__value,dt.__value="EUR",dt.value=dt.__value,a(be,"name","pc"),a(be,"class","in-f w-full"),t[3].p.c===void 0&&Re(()=>t[13].call(be)),a(it,"class","w-1/2"),a(lt,"name","pm"),a(lt,"type","number"),a(lt,"min","0.001"),a(lt,"max","1000"),a(lt,"step","0.001"),a(lt,"class","in-l tr w-full"),a(Ze,"class","w-1/2"),a(Oe,"class","flex"),a(Ue,"class","my-1"),a(nt,"type","checkbox"),a(nt,"name","pe"),nt.__value="true",nt.value=nt.__value,a(nt,"class","rounded mb-1"),a(Je,"class","my-1"),Dl.__value=0,Dl.value=Dl.__value,Nl.__value=1,Nl.value=Nl.__value,El.__value=2,El.value=El.__value,a(At,"name","gs"),a(At,"class","in-s"),t[3].g.s===void 0&&Re(()=>t[17].call(At)),a(Fe,"class","my-1"),a(n,"class","cnt"),a(Fn,"class","text-sm"),a(Ol,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/Meter-configuration"),a(Ol,"target","_blank"),a(Ol,"class","float-right"),a(Vl,"type","hidden"),a(Vl,"name","m"),Vl.value="true",cl.__value=0,cl.value=cl.__value,cl.disabled=In=t[3].m.b!=0,Hl.__value=2400,Hl.value=Hl.__value,An.__value=4800,An.value=An.__value,Mn.__value=9600,Mn.value=Mn.__value,Dn.__value=19200,Dn.value=Dn.__value,Nn.__value=38400,Nn.value=Nn.__value,En.__value=57600,En.value=En.__value,On.__value=115200,On.value=On.__value,a(ct,"name","mb"),a(ct,"class","in-f"),t[3].m.b===void 0&&Re(()=>t[20].call(ct)),ql.__value=0,ql.value=ql.__value,ql.disabled=Eo=t[3].m.b!=0,Rn.__value=2,Rn.value=Rn.__value,Ln.__value=3,Ln.value=Ln.__value,Un.__value=10,Un.value=Un.__value,Hn.__value=11,Hn.value=Hn.__value,a(kt,"name","mp"),a(kt,"class","in-l"),kt.disabled=Oo=t[3].m.b==0,t[3].m.p===void 0&&Re(()=>t[21].call(kt)),a(Wt,"name","mi"),Wt.__value="true",Wt.value=Wt.__value,a(Wt,"type","checkbox"),a(Wt,"class","rounded mb-1"),a(ro,"class","mt-2 ml-3 whitespace-nowrap"),a(Mt,"class","flex"),a(Ll,"class","my-1"),qn.__value=2,qn.value=qn.__value,Gn.__value=1,Gn.value=Gn.__value,a(ml,"name","md"),a(ml,"class","in-s"),t[3].m.d===void 0&&Re(()=>t[23].call(ml)),a(Kl,"class","my-1"),a(jt,"name","mf"),a(jt,"type","number"),a(jt,"min","5"),a(jt,"max","65535"),a(jt,"class","in-f tr w-full"),a(Ro,"class","in-post"),a(jn,"class","flex"),a(Ql,"class","mx-1"),a(zt,"name","mr"),a(zt,"type","number"),a(zt,"min","0"),a(zt,"max","65535"),a(zt,"class","in-f tr w-full"),a(Lo,"class","in-post"),a(zn,"class","flex"),a(Zl,"class","mx-1"),a(Wn,"class","my-1 flex"),a(ws,"class","my-1"),a(Bt,"type","checkbox"),a(Bt,"name","me"),Bt.__value="true",Bt.value=Bt.__value,a(Bt,"class","rounded mb-1"),a(Jl,"class","my-1"),a(Yt,"type","checkbox"),a(Yt,"name","mm"),Yt.__value="true",Yt.value=Yt.__value,a(Yt,"class","rounded mb-1"),a(Le,"class","cnt"),a(qo,"class","text-sm"),a(Bn,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/WiFi-configuration"),a(Bn,"target","_blank"),a(Bn,"class","float-right"),a(fo,"type","hidden"),a(fo,"name","w"),fo.value="true",a(yl,"name","ws"),a(yl,"type","text"),a(yl,"class","in-s"),a(Xl,"class","my-1"),a(Cl,"name","wp"),a(Cl,"type","password"),a(Cl,"class","in-s"),a(xl,"class","my-1"),Kn.__value=255,Kn.value=Kn.__value,Qn.__value=0,Qn.value=Qn.__value,Zn.__value=1,Zn.value=Zn.__value,Jn.__value=2,Jn.value=Jn.__value,a(Ut,"name","wz"),a(Ut,"class","in-s"),t[3].w.z===void 0&&Re(()=>t[36].call(Ut)),a(en,"class","w-1/2"),a(Ht,"name","ww"),a(Ht,"type","number"),a(Ht,"min","0"),a(Ht,"max","20.5"),a(Ht,"step","0.5"),a(Ht,"class","in-f tr w-full"),a(Go,"class","in-post"),a(Xn,"class","flex"),a(tn,"class","ml-2 w-1/2"),a(Vn,"class","my-1 flex"),a(Vt,"type","checkbox"),a(Vt,"name","wa"),Vt.__value="true",Vt.value=Vt.__value,a(Vt,"class","rounded mb-1"),a(Wo,"class","my-3"),a(vt,"class","cnt"),a(zo,"class","text-sm"),a(xn,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/Network-configuration"),a(xn,"target","_blank"),a(xn,"class","float-right"),ti.__value="dhcp",ti.value=ti.__value,li.__value="static",li.value=li.__value,a(_l,"name","nm"),a(_l,"class","in-f"),t[3].n.m===void 0&&Re(()=>t[39].call(_l)),a(Dt,"name","ni"),a(Dt,"type","text"),a(Dt,"class","in-m w-full"),Dt.disabled=Bo=t[3].n.m=="dhcp",Dt.required=Yo=t[3].n.m=="static",a(Nt,"name","ns"),a(Nt,"class","in-l"),Nt.disabled=Vo=t[3].n.m=="dhcp",Nt.required=Ko=t[3].n.m=="static",t[3].n.s===void 0&&Re(()=>t[41].call(Nt)),a(Gl,"class","flex"),a(ln,"class","my-1"),a(Kt,"name","nd"),Kt.__value="true",Kt.value=Kt.__value,a(Kt,"type","checkbox"),a(Kt,"class","rounded mb-1"),a(Qo,"class","my-1"),a(po,"type","hidden"),a(po,"name","ntp"),po.value="true",a(Qt,"name","ntpd"),Qt.__value="true",Qt.value=Qt.__value,a(Qt,"type","checkbox"),a(Qt,"class","rounded mb-1"),a(co,"class","ml-4"),a($l,"name","ntph"),a($l,"type","text"),a($l,"class","in-s"),a(Jo,"class","flex"),a(Wl,"class","my-1"),a(mt,"class","cnt"),a(Xo,"class","text-sm"),a(ii,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/MQTT-configuration"),a(ii,"target","_blank"),a(ii,"class","float-right"),a(mo,"type","hidden"),a(mo,"name","q"),mo.value="true",a(Sl,"name","qh"),a(Sl,"type","text"),a(Sl,"class","in-f w-3/4"),a(Zt,"name","qp"),a(Zt,"type","number"),a(Zt,"min","1024"),a(Zt,"max","65535"),a(Zt,"class","in-l tr w-1/4"),a(si,"class","flex"),a(dl,"class","my-1"),a(Pl,"name","qu"),a(Pl,"type","text"),a(Pl,"class","in-s"),a(nn,"class","my-1"),a(Tl,"name","qa"),a(Tl,"type","password"),a(Tl,"class","in-s"),a(on,"class","my-1"),a(Fl,"name","qc"),a(Fl,"type","text"),a(Fl,"class","in-f w-full"),fi.__value=0,fi.value=fi.__value,pi.__value=1,pi.value=pi.__value,ci.__value=2,ci.value=ci.__value,mi.__value=3,mi.value=mi.__value,_i.__value=4,_i.value=_i.__value,di.__value=255,di.value=di.__value,a(wt,"name","qm"),a(wt,"class","in-l"),t[3].q.m===void 0&&Re(()=>t[54].call(wt)),a(ui,"class","my-1 flex"),a(Il,"name","qb"),a(Il,"type","text"),a(Il,"class","in-s"),a(sn,"class","my-1"),a(xe,"class","cnt"),a(xo,"class","text-sm"),a(vi,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/User-interface"),a(vi,"target","_blank"),a(vi,"class","float-right"),a(_o,"type","hidden"),a(_o,"name","u"),_o.value="true",hi.__value=0,hi.value=hi.__value,gi.__value=1,gi.value=gi.__value,ki.__value=2,ki.value=ki.__value,a(Jt,"name","ui"),a(Jt,"class","in-s"),t[3].u.i===void 0&&Re(()=>t[71].call(Jt)),a(un,"class","w-1/2"),wi.__value=0,wi.value=wi.__value,yi.__value=1,yi.value=yi.__value,Ci.__value=2,Ci.value=Ci.__value,a(Xt,"name","ue"),a(Xt,"class","in-s"),t[3].u.e===void 0&&Re(()=>t[72].call(Xt)),a(an,"class","w-1/2"),$i.__value=0,$i.value=$i.__value,Si.__value=1,Si.value=Si.__value,Pi.__value=2,Pi.value=Pi.__value,a(xt,"name","uv"),a(xt,"class","in-s"),t[3].u.v===void 0&&Re(()=>t[73].call(xt)),a(rn,"class","w-1/2"),Ti.__value=0,Ti.value=Ti.__value,Fi.__value=1,Fi.value=Fi.__value,Ii.__value=2,Ii.value=Ii.__value,a(el,"name","ua"),a(el,"class","in-s"),t[3].u.a===void 0&&Re(()=>t[74].call(el)),a(fn,"class","w-1/2"),Ai.__value=0,Ai.value=Ai.__value,Mi.__value=1,Mi.value=Mi.__value,Di.__value=2,Di.value=Di.__value,a(tl,"name","ur"),a(tl,"class","in-s"),t[3].u.r===void 0&&Re(()=>t[75].call(tl)),a(pn,"class","w-1/2"),Ni.__value=0,Ni.value=Ni.__value,Ei.__value=1,Ei.value=Ei.__value,Oi.__value=2,Oi.value=Oi.__value,a(ll,"name","uc"),a(ll,"class","in-s"),t[3].u.c===void 0&&Re(()=>t[76].call(ll)),a(cn,"class","w-1/2"),Ri.__value=0,Ri.value=Ri.__value,Li.__value=1,Li.value=Li.__value,Ui.__value=2,Ui.value=Ui.__value,a(nl,"name","ut"),a(nl,"class","in-s"),t[3].u.t===void 0&&Re(()=>t[77].call(nl)),a(mn,"class","w-1/2"),Hi.__value=0,Hi.value=Hi.__value,qi.__value=1,qi.value=qi.__value,Gi.__value=2,Gi.value=Gi.__value,a(il,"name","up"),a(il,"class","in-s"),t[3].u.p===void 0&&Re(()=>t[78].call(il)),a(_n,"class","w-1/2"),Wi.__value=0,Wi.value=Wi.__value,ji.__value=1,ji.value=ji.__value,zi.__value=2,zi.value=zi.__value,a(ol,"name","ud"),a(ol,"class","in-s"),t[3].u.d===void 0&&Re(()=>t[79].call(ol)),a(dn,"class","w-1/2"),Bi.__value=0,Bi.value=Bi.__value,Yi.__value=1,Yi.value=Yi.__value,Vi.__value=2,Vi.value=Vi.__value,a(sl,"name","um"),a(sl,"class","in-s"),t[3].u.m===void 0&&Re(()=>t[80].call(sl)),a(vn,"class","w-1/2"),Ki.__value=0,Ki.value=Ki.__value,Qi.__value=1,Qi.value=Qi.__value,Zi.__value=2,Zi.value=Zi.__value,a(ul,"name","us"),a(ul,"class","in-s"),t[3].u.s===void 0&&Re(()=>t[81].call(ul)),a(bn,"class","w-1/2"),a(Ye,"class","flex flex-wrap"),a(vl,"class","cnt"),a(es,"class","text-sm"),a(Ji,"href","https://amsleser.no/blog/post/24-telnet-debug"),a(Ji,"target","_blank"),a(Ji,"class","float-right"),a(vo,"type","hidden"),a(vo,"name","d"),vo.value="true",a(al,"type","checkbox"),a(al,"name","ds"),al.__value="true",al.value=al.__value,a(al,"class","rounded mb-1"),a(ts,"class","mt-3"),a(Et,"class","cnt"),a(l,"class","grid xl:grid-cols-4 lg:grid-cols-2 md:grid-cols-2"),a(xi,"type","button"),a(xi,"class","py-2 px-4 rounded bg-red-500 text-white ml-2"),a(eo,"type","button"),a(eo,"class","py-2 px-4 rounded bg-yellow-500 text-white"),a(ns,"class","text-center"),a(is,"class","text-right"),a(jl,"class","grid grid-cols-3"),a(e,"autocomplete","off")},m(E,ie){h(E,e,ie),i(e,l),i(l,n),i(n,o),i(n,s),i(n,u),X(c,u,null),i(n,f),i(n,p),i(n,m),i(n,_),i(_,v),i(v,w),i(w,k),i(w,g),i(w,C),i(w,y),Y(y,t[3].g.h),i(v,S),i(v,I),i(I,D),i(I,A),i(I,M),i(I,z),X(R,z,null),de(z,t[3].g.t),i(n,L),i(n,T),i(n,P),i(n,N),i(N,q),i(N,Q),i(N,U),i(N,G),i(G,W),i(W,Z),i(W,K),i(W,te),i(W,J),i(W,H),i(G,ne),i(ne,Ce),i(ne,ge),i(ne,Ee),i(ne,he),i(G,ve),i(ve,ae),i(ve,ke),i(G,_e),i(G,le),i(G,ue),i(G,j),i(G,pe),i(G,$e),i(G,we),i(G,oe),i(G,ce),i(G,ze),i(G,Pe),i(G,qe),i(G,Be),de(G,t[3].p.r),i(n,_t),i(n,Ue),i(Ue,Oe),i(Oe,it),i(it,He),i(it,Ge),i(it,se),i(it,be),i(be,ot),i(be,Ve),i(be,bt),i(be,dt),de(be,t[3].p.c),i(Oe,Gt),i(Oe,Ze),i(Ze,ht),i(Ze,Rt),i(Ze,tt),i(Ze,lt),Y(lt,t[3].p.m),i(n,Lt),i(n,Je),i(Je,gt),i(gt,nt),nt.checked=t[3].p.e,i(gt,Te),i(Je,Xe),yt&&yt.m(Je,null),i(n,me),i(n,Fe),i(Fe,Po),i(Fe,To),i(Fe,Fo),i(Fe,At),i(At,Dl),i(At,Nl),i(At,El),de(At,t[3].g.s),i(n,Io),Ct&&Ct.m(n,null),i(l,Ao),i(l,Le),i(Le,Fn),i(Le,Mo),i(Le,Ol),X(Rl,Ol,null),i(Le,Do),i(Le,Vl),i(Le,No),i(Le,Ll),i(Ll,pt),i(Ll,ao),i(Ll,Mt),i(Mt,ct),i(ct,cl),i(cl,Ul),i(ct,Hl),i(ct,An),i(ct,Mn),i(ct,Dn),i(ct,Nn),i(ct,En),i(ct,On),de(ct,t[3].m.b),i(Mt,du),i(Mt,kt),i(kt,ql),i(ql,vu),i(kt,Rn),i(kt,Ln),i(kt,Un),i(kt,Hn),de(kt,t[3].m.p),i(Mt,bu),i(Mt,ro),i(ro,Wt),Wt.checked=t[3].m.i,i(ro,hu),i(Le,gu),i(Le,Kl),i(Kl,ku),i(Kl,wu),i(Kl,yu),i(Kl,ml),i(ml,qn),i(ml,Gn),de(ml,t[3].m.d),i(Le,Cu),i(Le,Wn),i(Wn,Ql),i(Ql,$u),i(Ql,Su),i(Ql,Pu),i(Ql,jn),i(jn,jt),Y(jt,t[3].m.f),i(jn,Tu),i(jn,Ro),i(Wn,Fu),i(Wn,Zl),i(Zl,Iu),i(Zl,Au),i(Zl,Mu),i(Zl,zn),i(zn,zt),Y(zt,t[3].m.r),i(zn,Du),i(zn,Lo),i(Le,Nu),i(Le,ws),i(Le,Eu),i(Le,Jl),i(Jl,Uo),i(Uo,Bt),Bt.checked=t[3].m.e.e,i(Uo,Ou),i(Jl,Ru),$t&&$t.m(Jl,null),i(Le,Lu),St&&St.m(Le,null),i(Le,ys),i(Le,Ho),i(Ho,Yt),Yt.checked=t[3].m.m.e,i(Ho,Uu),i(Le,Hu),Pt&&Pt.m(Le,null),i(l,qu),i(l,vt),i(vt,qo),i(vt,Gu),i(vt,Bn),X(Yn,Bn,null),i(vt,Wu),i(vt,fo),i(vt,ju),i(vt,Xl),i(Xl,zu),i(Xl,Bu),i(Xl,Yu),i(Xl,yl),Y(yl,t[3].w.s),i(vt,Vu),i(vt,xl),i(xl,Ku),i(xl,Qu),i(xl,Zu),i(xl,Cl),Y(Cl,t[3].w.p),i(vt,Ju),i(vt,Vn),i(Vn,en),i(en,Xu),i(en,xu),i(en,ea),i(en,Ut),i(Ut,Kn),i(Ut,Qn),i(Ut,Zn),i(Ut,Jn),de(Ut,t[3].w.z),i(Vn,ta),i(Vn,tn),i(tn,la),i(tn,na),i(tn,ia),i(tn,Xn),i(Xn,Ht),Y(Ht,t[3].w.w),i(Xn,oa),i(Xn,Go),i(vt,sa),i(vt,Wo),i(Wo,jo),i(jo,Vt),Vt.checked=t[3].w.a,i(jo,ua),i(l,aa),i(l,mt),i(mt,zo),i(mt,ra),i(mt,xn),X(ei,xn,null),i(mt,fa),i(mt,ln),i(ln,pa),i(ln,ca),i(ln,ma),i(ln,Gl),i(Gl,_l),i(_l,ti),i(_l,li),de(_l,t[3].n.m),i(Gl,_a),i(Gl,Dt),Y(Dt,t[3].n.i),i(Gl,da),i(Gl,Nt),X(ni,Nt,null),de(Nt,t[3].n.s),i(mt,va),Tt&&Tt.m(mt,null),i(mt,Cs),i(mt,Qo),i(Qo,Zo),i(Zo,Kt),Kt.checked=t[3].n.d,i(Zo,ba),i(mt,ha),i(mt,po),i(mt,ga),i(mt,Wl),i(Wl,ka),i(Wl,co),i(co,Qt),Qt.checked=t[3].n.h,i(co,wa),i(Wl,ya),i(Wl,Ca),i(Wl,Jo),i(Jo,$l),Y($l,t[3].n.n1),i(l,$a),i(l,xe),i(xe,Xo),i(xe,Sa),i(xe,ii),X(oi,ii,null),i(xe,Pa),i(xe,mo),i(xe,Ta),i(xe,dl),i(dl,Fa),Ft&&Ft.m(dl,null),i(dl,$s),i(dl,Ia),i(dl,Aa),i(dl,si),i(si,Sl),Y(Sl,t[3].q.h),i(si,Ma),i(si,Zt),Y(Zt,t[3].q.p),i(xe,Da),st&&st.m(xe,null),i(xe,Ss),i(xe,nn),i(nn,Na),i(nn,Ea),i(nn,Oa),i(nn,Pl),Y(Pl,t[3].q.u),i(xe,Ra),i(xe,on),i(on,La),i(on,Ua),i(on,Ha),i(on,Tl),Y(Tl,t[3].q.a),i(xe,qa),i(xe,ui),i(ui,ai),i(ai,Ga),i(ai,Wa),i(ai,ja),i(ai,Fl),Y(Fl,t[3].q.c),i(ui,za),i(ui,ri),i(ri,Ba),i(ri,Ya),i(ri,Va),i(ri,wt),i(wt,fi),i(wt,pi),i(wt,ci),i(wt,mi),i(wt,_i),i(wt,di),de(wt,t[3].q.m),i(xe,Ka),i(xe,sn),i(sn,Qa),i(sn,Za),i(sn,Ja),i(sn,Il),Y(Il,t[3].q.b),i(l,Xa),ut&&ut.m(l,null),i(l,Ps),at&&at.m(l,null),i(l,Fs),i(l,vl),i(vl,xo),i(vl,xa),i(vl,vi),X(bi,vi,null),i(vl,er),i(vl,_o),i(vl,tr),i(vl,Ye),i(Ye,un),i(un,lr),i(un,nr),i(un,ir),i(un,Jt),i(Jt,hi),i(Jt,gi),i(Jt,ki),de(Jt,t[3].u.i),i(Ye,or),i(Ye,an),i(an,sr),i(an,ur),i(an,ar),i(an,Xt),i(Xt,wi),i(Xt,yi),i(Xt,Ci),de(Xt,t[3].u.e),i(Ye,rr),i(Ye,rn),i(rn,fr),i(rn,pr),i(rn,cr),i(rn,xt),i(xt,$i),i(xt,Si),i(xt,Pi),de(xt,t[3].u.v),i(Ye,mr),i(Ye,fn),i(fn,_r),i(fn,dr),i(fn,vr),i(fn,el),i(el,Ti),i(el,Fi),i(el,Ii),de(el,t[3].u.a),i(Ye,br),i(Ye,pn),i(pn,hr),i(pn,gr),i(pn,kr),i(pn,tl),i(tl,Ai),i(tl,Mi),i(tl,Di),de(tl,t[3].u.r),i(Ye,wr),i(Ye,cn),i(cn,yr),i(cn,Cr),i(cn,$r),i(cn,ll),i(ll,Ni),i(ll,Ei),i(ll,Oi),de(ll,t[3].u.c),i(Ye,Sr),i(Ye,mn),i(mn,Pr),i(mn,Tr),i(mn,Fr),i(mn,nl),i(nl,Ri),i(nl,Li),i(nl,Ui),de(nl,t[3].u.t),i(Ye,Ir),i(Ye,_n),i(_n,Ar),i(_n,Mr),i(_n,Dr),i(_n,il),i(il,Hi),i(il,qi),i(il,Gi),de(il,t[3].u.p),i(Ye,Nr),i(Ye,dn),i(dn,Er),i(dn,Or),i(dn,Rr),i(dn,ol),i(ol,Wi),i(ol,ji),i(ol,zi),de(ol,t[3].u.d),i(Ye,Lr),i(Ye,vn),i(vn,Ur),i(vn,Hr),i(vn,qr),i(vn,sl),i(sl,Bi),i(sl,Yi),i(sl,Vi),de(sl,t[3].u.m),i(Ye,Gr),i(Ye,bn),i(bn,Wr),i(bn,jr),i(bn,zr),i(bn,ul),i(ul,Ki),i(ul,Qi),i(ul,Zi),de(ul,t[3].u.s),i(l,Br),rt&&rt.m(l,null),i(l,Is),i(l,Et),i(Et,es),i(Et,Yr),i(Et,Ji),X(Xi,Ji,null),i(Et,Vr),i(Et,vo),i(Et,Kr),i(Et,ts),i(ts,ls),i(ls,al),al.checked=t[3].d.s,i(ls,Qr),i(Et,Zr),It&&It.m(Et,null),i(e,Jr),i(e,jl),i(jl,As),i(As,xi),i(jl,Xr),i(jl,ns),i(ns,eo),i(jl,xr),i(jl,is),h(E,Ms,ie),X(hn,E,ie),h(E,Ds,ie),X(gn,E,ie),h(E,Ns,ie),X(kn,E,ie),h(E,Es,ie),X(wn,E,ie),rl=!0,Os||(ef=[B(y,"input",t[10]),B(z,"change",t[11]),B(G,"change",t[12]),B(be,"change",t[13]),B(lt,"input",t[14]),B(nt,"change",t[15]),B(At,"change",t[17]),B(ct,"change",t[20]),B(kt,"change",t[21]),B(Wt,"change",t[22]),B(ml,"change",t[23]),B(jt,"input",t[24]),B(zt,"input",t[25]),B(Bt,"change",t[26]),B(Yt,"change",t[29]),B(yl,"input",t[34]),B(Cl,"input",t[35]),B(Ut,"change",t[36]),B(Ht,"input",t[37]),B(Vt,"change",t[38]),B(_l,"change",t[39]),B(Dt,"input",t[40]),B(Nt,"change",t[41]),B(Kt,"change",t[45]),B(Qt,"change",t[46]),B($l,"input",t[47]),B(Sl,"input",t[49]),B(Zt,"input",t[50]),B(Pl,"input",t[51]),B(Tl,"input",t[52]),B(Fl,"input",t[53]),B(wt,"change",t[54]),B(Il,"input",t[55]),B(Jt,"change",t[71]),B(Xt,"change",t[72]),B(xt,"change",t[73]),B(el,"change",t[74]),B(tl,"change",t[75]),B(ll,"change",t[76]),B(nl,"change",t[77]),B(il,"change",t[78]),B(ol,"change",t[79]),B(sl,"change",t[80]),B(ul,"change",t[81]),B(al,"change",t[98]),B(xi,"click",t[6]),B(eo,"click",t[8]),B(e,"submit",gs(t[7]))],Os=!0)},p(E,ie){ie[0]&8&&y.value!==E[3].g.h&&Y(y,E[3].g.h),ie[0]&8&&de(z,E[3].g.t),ie[0]&8&&de(G,E[3].p.r),ie[0]&8&&de(be,E[3].p.c),ie[0]&8&&re(lt.value)!==E[3].p.m&&Y(lt,E[3].p.m),ie[0]&8&&(nt.checked=E[3].p.e),E[3].p.e&&E[0].chip!="esp8266"?yt?yt.p(E,ie):(yt=bp(E),yt.c(),yt.m(Je,null)):yt&&(yt.d(1),yt=null),ie[0]&8&&de(At,E[3].g.s),E[3].g.s>0?Ct?Ct.p(E,ie):(Ct=hp(E),Ct.c(),Ct.m(n,null)):Ct&&(Ct.d(1),Ct=null),(!rl||ie[0]&8&&In!==(In=E[3].m.b!=0))&&(cl.disabled=In),ie[0]&8&&de(ct,E[3].m.b),(!rl||ie[0]&8&&Eo!==(Eo=E[3].m.b!=0))&&(ql.disabled=Eo),(!rl||ie[0]&8&&Oo!==(Oo=E[3].m.b==0))&&(kt.disabled=Oo),ie[0]&8&&de(kt,E[3].m.p),ie[0]&8&&(Wt.checked=E[3].m.i),ie[0]&8&&de(ml,E[3].m.d),ie[0]&8&&re(jt.value)!==E[3].m.f&&Y(jt,E[3].m.f),ie[0]&8&&re(zt.value)!==E[3].m.r&&Y(zt,E[3].m.r),ie[0]&8&&(Bt.checked=E[3].m.e.e),E[3].m.e.e?$t?$t.p(E,ie):($t=gp(E),$t.c(),$t.m(Jl,null)):$t&&($t.d(1),$t=null),E[3].m.e.e?St?St.p(E,ie):(St=kp(E),St.c(),St.m(Le,ys)):St&&(St.d(1),St=null),ie[0]&8&&(Yt.checked=E[3].m.m.e),E[3].m.m.e?Pt?Pt.p(E,ie):(Pt=wp(E),Pt.c(),Pt.m(Le,null)):Pt&&(Pt.d(1),Pt=null),ie[0]&8&&yl.value!==E[3].w.s&&Y(yl,E[3].w.s),ie[0]&8&&Cl.value!==E[3].w.p&&Y(Cl,E[3].w.p),ie[0]&8&&de(Ut,E[3].w.z),ie[0]&8&&re(Ht.value)!==E[3].w.w&&Y(Ht,E[3].w.w),ie[0]&8&&(Vt.checked=E[3].w.a),ie[0]&8&&de(_l,E[3].n.m),(!rl||ie[0]&8&&Bo!==(Bo=E[3].n.m=="dhcp"))&&(Dt.disabled=Bo),(!rl||ie[0]&8&&Yo!==(Yo=E[3].n.m=="static"))&&(Dt.required=Yo),ie[0]&8&&Dt.value!==E[3].n.i&&Y(Dt,E[3].n.i),(!rl||ie[0]&8&&Vo!==(Vo=E[3].n.m=="dhcp"))&&(Nt.disabled=Vo),(!rl||ie[0]&8&&Ko!==(Ko=E[3].n.m=="static"))&&(Nt.required=Ko),ie[0]&8&&de(Nt,E[3].n.s),E[3].n.m=="static"?Tt?Tt.p(E,ie):(Tt=yp(E),Tt.c(),Tt.m(mt,Cs)):Tt&&(Tt.d(1),Tt=null),ie[0]&8&&(Kt.checked=E[3].n.d),ie[0]&8&&(Qt.checked=E[3].n.h),ie[0]&8&&$l.value!==E[3].n.n1&&Y($l,E[3].n.n1),E[0].chip!="esp8266"?Ft?Ft.p(E,ie):(Ft=Cp(E),Ft.c(),Ft.m(dl,$s)):Ft&&(Ft.d(1),Ft=null),ie[0]&8&&Sl.value!==E[3].q.h&&Y(Sl,E[3].q.h),ie[0]&8&&re(Zt.value)!==E[3].q.p&&Y(Zt,E[3].q.p),E[3].q.s.e?st?(st.p(E,ie),ie[0]&8&&F(st,1)):(st=$p(E),st.c(),F(st,1),st.m(xe,Ss)):st&&(Me(),O(st,1,1,()=>{st=null}),De()),ie[0]&8&&Pl.value!==E[3].q.u&&Y(Pl,E[3].q.u),ie[0]&8&&Tl.value!==E[3].q.a&&Y(Tl,E[3].q.a),ie[0]&8&&Fl.value!==E[3].q.c&&Y(Fl,E[3].q.c),ie[0]&8&&de(wt,E[3].q.m),ie[0]&8&&Il.value!==E[3].q.b&&Y(Il,E[3].q.b),E[3].q.m==3?ut?(ut.p(E,ie),ie[0]&8&&F(ut,1)):(ut=Sp(E),ut.c(),F(ut,1),ut.m(l,Ps)):ut&&(Me(),O(ut,1,1,()=>{ut=null}),De()),ie[0]&8&&(Ts=E[3].p.r.startsWith("10YNO")||E[3].p.r=="10Y1001A1001A48H"),Ts?at?(at.p(E,ie),ie[0]&8&&F(at,1)):(at=Pp(E),at.c(),F(at,1),at.m(l,Fs)):at&&(Me(),O(at,1,1,()=>{at=null}),De()),ie[0]&8&&de(Jt,E[3].u.i),ie[0]&8&&de(Xt,E[3].u.e),ie[0]&8&&de(xt,E[3].u.v),ie[0]&8&&de(el,E[3].u.a),ie[0]&8&&de(tl,E[3].u.r),ie[0]&8&&de(ll,E[3].u.c),ie[0]&8&&de(nl,E[3].u.t),ie[0]&8&&de(il,E[3].u.p),ie[0]&8&&de(ol,E[3].u.d),ie[0]&8&&de(sl,E[3].u.m),ie[0]&8&&de(ul,E[3].u.s),E[0].board>20||E[0].chip=="esp8266"?rt?(rt.p(E,ie),ie[0]&1&&F(rt,1)):(rt=Tp(E),rt.c(),F(rt,1),rt.m(l,Is)):rt&&(Me(),O(rt,1,1,()=>{rt=null}),De()),ie[0]&8&&(al.checked=E[3].d.s),E[3].d.s?It?It.p(E,ie):(It=Np(E),It.c(),It.m(Et,null)):It&&(It.d(1),It=null);const tf={};ie[0]&2&&(tf.active=E[1]),hn.$set(tf);const lf={};ie[0]&4&&(lf.active=E[2]),gn.$set(lf);const nf={};ie[0]&16&&(nf.active=E[4]),kn.$set(nf);const of={};ie[0]&32&&(of.active=E[5]),wn.$set(of)},i(E){rl||(F(c.$$.fragment,E),F(R.$$.fragment,E),F(Rl.$$.fragment,E),F(Yn.$$.fragment,E),F(ei.$$.fragment,E),F(ni.$$.fragment,E),F(oi.$$.fragment,E),F(st),F(ut),F(at),F(bi.$$.fragment,E),F(rt),F(Xi.$$.fragment,E),F(hn.$$.fragment,E),F(gn.$$.fragment,E),F(kn.$$.fragment,E),F(wn.$$.fragment,E),rl=!0)},o(E){O(c.$$.fragment,E),O(R.$$.fragment,E),O(Rl.$$.fragment,E),O(Yn.$$.fragment,E),O(ei.$$.fragment,E),O(ni.$$.fragment,E),O(oi.$$.fragment,E),O(st),O(ut),O(at),O(bi.$$.fragment,E),O(rt),O(Xi.$$.fragment,E),O(hn.$$.fragment,E),O(gn.$$.fragment,E),O(kn.$$.fragment,E),O(wn.$$.fragment,E),rl=!1},d(E){E&&b(e),x(c),x(R),yt&&yt.d(),Ct&&Ct.d(),x(Rl),$t&&$t.d(),St&&St.d(),Pt&&Pt.d(),x(Yn),x(ei),x(ni),Tt&&Tt.d(),x(oi),Ft&&Ft.d(),st&&st.d(),ut&&ut.d(),at&&at.d(),x(bi),rt&&rt.d(),x(Xi),It&&It.d(),E&&b(Ms),x(hn,E),E&&b(Ds),x(gn,E),E&&b(Ns),x(kn,E),E&&b(Es),x(wn,E),Os=!1,et(ef)}}}async function xm(){await(await fetch("/reboot",{method:"POST"})).json()}function e_(t,e,l){let{sysinfo:n={}}=e,o=!0,s=!1,u={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},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:null,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}}};Gc.subscribe(pt=>{pt.version&&(l(3,u=pt),l(1,o=!1))}),Em();let c=!1,f=!1;async function p(){if(confirm("Are you sure you want to factory reset the device?")){l(4,c=!0);const pt=new URLSearchParams;pt.append("perform","true");let Mt=await(await fetch("/reset",{method:"POST",body:pt})).json();l(4,c=!1),l(5,f=Mt.success)}}async function m(pt){l(2,s=!0);const ao=new FormData(pt.target),Mt=new URLSearchParams;for(let Ul of ao){const[In,Hl]=Ul;Mt.append(In,Hl)}let cl=await(await fetch("/save",{method:"POST",body:Mt})).json();qt.update(Ul=>(Ul.booting=cl.reboot,Ul.ui=u.u,Ul)),l(2,s=!1),no("/")}const _=function(){confirm("Are you sure you want to reboot the device?")&&(qt.update(pt=>(pt.booting=!0,pt)),xm())},v=function(){u.q.s.e?u.q.p==1883&&l(3,u.q.p=8883,u):u.q.p==8883&&l(3,u.q.p=1883,u)};function w(){u.g.h=this.value,l(3,u)}function k(){u.g.t=We(this),l(3,u)}function g(){u.p.r=We(this),l(3,u)}function C(){u.p.c=We(this),l(3,u)}function y(){u.p.m=re(this.value),l(3,u)}function S(){u.p.e=this.checked,l(3,u)}function I(){u.p.t=this.value,l(3,u)}function D(){u.g.s=We(this),l(3,u)}function A(){u.g.u=this.value,l(3,u)}function M(){u.g.p=this.value,l(3,u)}function z(){u.m.b=We(this),l(3,u)}function R(){u.m.p=We(this),l(3,u)}function L(){u.m.i=this.checked,l(3,u)}function T(){u.m.d=We(this),l(3,u)}function P(){u.m.f=re(this.value),l(3,u)}function N(){u.m.r=re(this.value),l(3,u)}function q(){u.m.e.e=this.checked,l(3,u)}function Q(){u.m.e.k=this.value,l(3,u)}function U(){u.m.e.a=this.value,l(3,u)}function G(){u.m.m.e=this.checked,l(3,u)}function W(){u.m.m.w=re(this.value),l(3,u)}function Z(){u.m.m.v=re(this.value),l(3,u)}function K(){u.m.m.a=re(this.value),l(3,u)}function te(){u.m.m.c=re(this.value),l(3,u)}function J(){u.w.s=this.value,l(3,u)}function H(){u.w.p=this.value,l(3,u)}function ne(){u.w.z=We(this),l(3,u)}function Ce(){u.w.w=re(this.value),l(3,u)}function ge(){u.w.a=this.checked,l(3,u)}function Ee(){u.n.m=We(this),l(3,u)}function he(){u.n.i=this.value,l(3,u)}function ve(){u.n.s=We(this),l(3,u)}function ae(){u.n.g=this.value,l(3,u)}function ke(){u.n.d1=this.value,l(3,u)}function _e(){u.n.d2=this.value,l(3,u)}function le(){u.n.d=this.checked,l(3,u)}function ue(){u.n.h=this.checked,l(3,u)}function j(){u.n.n1=this.value,l(3,u)}function pe(){u.q.s.e=this.checked,l(3,u)}function $e(){u.q.h=this.value,l(3,u)}function we(){u.q.p=re(this.value),l(3,u)}function oe(){u.q.u=this.value,l(3,u)}function ce(){u.q.a=this.value,l(3,u)}function ze(){u.q.c=this.value,l(3,u)}function Pe(){u.q.m=We(this),l(3,u)}function qe(){u.q.b=this.value,l(3,u)}function Be(){u.o.e=this.value,l(3,u)}function _t(){u.o.c=this.value,l(3,u)}function Ue(){u.o.u1=this.value,l(3,u)}function Oe(){u.o.u2=this.value,l(3,u)}function it(){u.o.u3=this.value,l(3,u)}function He(){u.t.t[0]=re(this.value),l(3,u)}function Ge(){u.t.t[1]=re(this.value),l(3,u)}function se(){u.t.t[2]=re(this.value),l(3,u)}function be(){u.t.t[3]=re(this.value),l(3,u)}function ot(){u.t.t[4]=re(this.value),l(3,u)}function Ve(){u.t.t[5]=re(this.value),l(3,u)}function bt(){u.t.t[6]=re(this.value),l(3,u)}function dt(){u.t.t[7]=re(this.value),l(3,u)}function Gt(){u.t.t[8]=re(this.value),l(3,u)}function Ze(){u.t.h=re(this.value),l(3,u)}function ht(){u.u.i=We(this),l(3,u)}function Rt(){u.u.e=We(this),l(3,u)}function tt(){u.u.v=We(this),l(3,u)}function lt(){u.u.a=We(this),l(3,u)}function Lt(){u.u.r=We(this),l(3,u)}function Je(){u.u.c=We(this),l(3,u)}function gt(){u.u.t=We(this),l(3,u)}function nt(){u.u.p=We(this),l(3,u)}function Te(){u.u.d=We(this),l(3,u)}function Xe(){u.u.m=We(this),l(3,u)}function me(){u.u.s=We(this),l(3,u)}function Fe(){u.i.h=We(this),l(3,u)}function Po(){u.i.a=re(this.value),l(3,u)}function To(){u.i.l.i=this.checked,l(3,u)}function Fo(){u.i.l.p=re(this.value),l(3,u)}function At(){u.i.r.i=this.checked,l(3,u)}function Dl(){u.i.r.r=re(this.value),l(3,u)}function Nl(){u.i.r.g=re(this.value),l(3,u)}function El(){u.i.r.b=re(this.value),l(3,u)}function Io(){u.i.t.d=re(this.value),l(3,u)}function Ao(){u.i.t.a=re(this.value),l(3,u)}function Le(){u.i.v.p=re(this.value),l(3,u)}function Fn(){u.i.v.d.v=re(this.value),l(3,u)}function Mo(){u.i.v.d.g=re(this.value),l(3,u)}function Ol(){u.i.v.o=re(this.value),l(3,u)}function Rl(){u.i.v.m=re(this.value),l(3,u)}function Do(){u.i.v.b=re(this.value),l(3,u)}function Vl(){u.d.s=this.checked,l(3,u)}function No(){u.d.t=this.checked,l(3,u)}function Ll(){u.d.l=We(this),l(3,u)}return t.$$set=pt=>{"sysinfo"in pt&&l(0,n=pt.sysinfo)},[n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G,W,Z,K,te,J,H,ne,Ce,ge,Ee,he,ve,ae,ke,_e,le,ue,j,pe,$e,we,oe,ce,ze,Pe,qe,Be,_t,Ue,Oe,it,He,Ge,se,be,ot,Ve,bt,dt,Gt,Ze,ht,Rt,tt,lt,Lt,Je,gt,nt,Te,Xe,me,Fe,Po,To,Fo,At,Dl,Nl,El,Io,Ao,Le,Fn,Mo,Ol,Rl,Do,Vl,No,Ll]}class t_ extends Ae{constructor(e){super(),Ie(this,e,e_,Xm,Se,{sysinfo:0},null,[-1,-1,-1,-1])}}function Op(t){let e,l,n=t[1].apmac+"",o;return{c(){e=r("div"),l=$("AP MAC: "),o=$(n),a(e,"class","my-2")},m(s,u){h(s,e,u),i(e,l),i(e,o)},p(s,u){u&2&&n!==(n=s[1].apmac+"")&&V(o,n)},d(s){s&&b(e)}}}function l_(t){let e;return{c(){e=r("span"),e.textContent="Update consents",a(e,"class","text-xs py-1 px-2 rounded bg-blue-500 text-white mr-3 ")},m(l,n){h(l,e,n)},p:fe,d(l){l&&b(e)}}}function Rp(t){let e,l,n,o,s,u=hs(t[1].meter.mfg)+"",c,f,p,m,_=t[1].meter.model+"",v,w,k,g,C=t[1].meter.id+"",y;return{c(){e=r("div"),l=r("strong"),l.textContent="Meter",n=d(),o=r("div"),s=$("Manufacturer: "),c=$(u),f=d(),p=r("div"),m=$("Model: "),v=$(_),w=d(),k=r("div"),g=$("ID: "),y=$(C),a(l,"class","text-sm"),a(o,"class","my-2"),a(p,"class","my-2"),a(k,"class","my-2"),a(e,"class","cnt")},m(S,I){h(S,e,I),i(e,l),i(e,n),i(e,o),i(o,s),i(o,c),i(e,f),i(e,p),i(p,m),i(p,v),i(e,w),i(e,k),i(k,g),i(k,y)},p(S,I){I&2&&u!==(u=hs(S[1].meter.mfg)+"")&&V(c,u),I&2&&_!==(_=S[1].meter.model+"")&&V(v,_),I&2&&C!==(C=S[1].meter.id+"")&&V(y,C)},d(S){S&&b(e)}}}function Lp(t){let e,l,n,o,s,u=t[1].net.ip+"",c,f,p,m,_=t[1].net.mask+"",v,w,k,g,C=t[1].net.gw+"",y,S,I,D,A=t[1].net.dns1+"",M,z,R=t[1].net.dns2&&t[1].net.dns2!="0.0.0.0"&&Up(t);return{c(){e=r("div"),l=r("strong"),l.textContent="Network",n=d(),o=r("div"),s=$("IP: "),c=$(u),f=d(),p=r("div"),m=$("Mask: "),v=$(_),w=d(),k=r("div"),g=$("Gateway: "),y=$(C),S=d(),I=r("div"),D=$("DNS: "),M=$(A),z=d(),R&&R.c(),a(l,"class","text-sm"),a(o,"class","my-2"),a(p,"class","my-2"),a(k,"class","my-2"),a(I,"class","my-2"),a(e,"class","cnt")},m(L,T){h(L,e,T),i(e,l),i(e,n),i(e,o),i(o,s),i(o,c),i(e,f),i(e,p),i(p,m),i(p,v),i(e,w),i(e,k),i(k,g),i(k,y),i(e,S),i(e,I),i(I,D),i(I,M),i(I,z),R&&R.m(I,null)},p(L,T){T&2&&u!==(u=L[1].net.ip+"")&&V(c,u),T&2&&_!==(_=L[1].net.mask+"")&&V(v,_),T&2&&C!==(C=L[1].net.gw+"")&&V(y,C),T&2&&A!==(A=L[1].net.dns1+"")&&V(M,A),L[1].net.dns2&&L[1].net.dns2!="0.0.0.0"?R?R.p(L,T):(R=Up(L),R.c(),R.m(I,null)):R&&(R.d(1),R=null)},d(L){L&&b(e),R&&R.d()}}}function Up(t){let e,l=t[1].net.dns2+"",n;return{c(){e=$("/ "),n=$(l)},m(o,s){h(o,e,s),h(o,n,s)},p(o,s){s&2&&l!==(l=o[1].net.dns2+"")&&V(n,l)},d(o){o&&b(e),o&&b(n)}}}function Hp(t){let e,l,n,o=t[2].tag_name+"",s,u,c,f,p,m,_=(t[1].security==0||t[0].a)&&t[1].fwconsent===1&&t[2]&&t[2].tag_name&&qp(t),v=t[1].fwconsent===2&&Gp();return{c(){e=r("div"),l=$(`Latest version: + `),n=r("a"),s=$(o),c=d(),_&&_.c(),f=d(),v&&v.c(),p=Qe(),a(n,"href",u=t[2].html_url),a(n,"class","ml-2 text-blue-600 hover:text-blue-800"),a(n,"target","_blank"),a(n,"rel","noreferrer"),a(e,"class","my-2 flex")},m(w,k){h(w,e,k),i(e,l),i(e,n),i(n,s),i(e,c),_&&_.m(e,null),h(w,f,k),v&&v.m(w,k),h(w,p,k),m=!0},p(w,k){(!m||k&4)&&o!==(o=w[2].tag_name+"")&&V(s,o),(!m||k&4&&u!==(u=w[2].html_url))&&a(n,"href",u),(w[1].security==0||w[0].a)&&w[1].fwconsent===1&&w[2]&&w[2].tag_name?_?(_.p(w,k),k&7&&F(_,1)):(_=qp(w),_.c(),F(_,1),_.m(e,null)):_&&(Me(),O(_,1,1,()=>{_=null}),De()),w[1].fwconsent===2?v||(v=Gp(),v.c(),v.m(p.parentNode,p)):v&&(v.d(1),v=null)},i(w){m||(F(_),m=!0)},o(w){O(_),m=!1},d(w){w&&b(e),_&&_.d(),w&&b(f),v&&v.d(w),w&&b(p)}}}function qp(t){let e,l,n,o,s,u;return n=new Hc({}),{c(){e=r("div"),l=r("button"),ee(n.$$.fragment),a(e,"class","flex-none ml-2 text-green-500"),a(e,"title","Install this version")},m(c,f){h(c,e,f),i(e,l),X(n,l,null),o=!0,s||(u=B(l,"click",t[9]),s=!0)},p:fe,i(c){o||(F(n.$$.fragment,c),o=!0)},o(c){O(n.$$.fragment,c),o=!1},d(c){c&&b(e),x(n),s=!1,u()}}}function Gp(t){let e;return{c(){e=r("div"),e.innerHTML='
You have disabled one-click firmware upgrade, link to self-upgrade is disabled
',a(e,"class","my-2")},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function Wp(t){let e,l=ye(t[1].chip,t[1].board)+"",n,o;return{c(){e=r("div"),n=$(l),o=$(" 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."),a(e,"class","bd-red")},m(s,u){h(s,e,u),i(e,n),i(e,o)},p(s,u){u&2&&l!==(l=ye(s[1].chip,s[1].board)+"")&&V(n,l)},d(s){s&&b(e)}}}function jp(t){let e,l,n,o,s,u;function c(m,_){return m[4].length==0?i_:n_}let f=c(t),p=f(t);return{c(){e=r("div"),l=r("form"),n=r("input"),o=d(),p.c(),lc(n,"display","none"),a(n,"name","file"),a(n,"type","file"),a(n,"accept",".bin"),a(l,"action","/firmware"),a(l,"enctype","multipart/form-data"),a(l,"method","post"),a(l,"autocomplete","off"),a(e,"class","my-2 flex")},m(m,_){h(m,e,_),i(e,l),i(l,n),t[11](n),i(l,o),p.m(l,null),s||(u=[B(n,"change",t[12]),B(l,"submit",t[14])],s=!0)},p(m,_){f===(f=c(m))&&p?p.p(m,_):(p.d(1),p=f(m),p&&(p.c(),p.m(l,null)))},d(m){m&&b(e),t[11](null),p.d(),s=!1,et(u)}}}function n_(t){let e=t[4][0].name+"",l,n,o;return{c(){l=$(e),n=d(),o=r("button"),o.textContent="Upload",a(o,"type","submit"),a(o,"class","ml-2 text-xs py-1 px-2 rounded bg-blue-500 text-white float-right mr-3")},m(s,u){h(s,l,u),h(s,n,u),h(s,o,u)},p(s,u){u&16&&e!==(e=s[4][0].name+"")&&V(l,e)},d(s){s&&b(l),s&&b(n),s&&b(o)}}}function i_(t){let e,l,n;return{c(){e=r("button"),e.textContent="Select firmware file for upgrade",a(e,"type","button"),a(e,"class","text-xs py-1 px-2 rounded bg-blue-500 text-white float-right mr-3")},m(o,s){h(o,e,s),l||(n=B(e,"click",t[13]),l=!0)},p:fe,d(o){o&&b(e),l=!1,n()}}}function zp(t){let e,l,n,o,s,u,c,f,p,m,_,v,w=t[7].length==0&&Bp();function k(y,S){return y[7].length==0?s_:o_}let g=k(t),C=g(t);return{c(){e=r("div"),l=r("strong"),l.textContent="Configuration",n=d(),o=r("form"),s=r("div"),s.innerHTML=` + + + + + + + + + `,u=d(),w&&w.c(),c=d(),f=r("form"),p=r("input"),m=d(),C.c(),a(l,"class","text-sm"),a(s,"class","grid grid-cols-2"),a(o,"method","get"),a(o,"action","/configfile.cfg"),a(o,"autocomplete","off"),lc(p,"display","none"),a(p,"name","file"),a(p,"type","file"),a(p,"accept",".cfg"),a(f,"action","/configfile"),a(f,"enctype","multipart/form-data"),a(f,"method","post"),a(f,"autocomplete","off"),a(e,"class","cnt")},m(y,S){h(y,e,S),i(e,l),i(e,n),i(e,o),i(o,s),i(o,u),w&&w.m(o,null),i(e,c),i(e,f),i(f,p),t[15](p),i(f,m),C.m(f,null),_||(v=[B(p,"change",t[16]),B(f,"submit",t[18])],_=!0)},p(y,S){y[7].length==0?w||(w=Bp(),w.c(),w.m(o,null)):w&&(w.d(1),w=null),g===(g=k(y))&&C?C.p(y,S):(C.d(1),C=g(y),C&&(C.c(),C.m(f,null)))},d(y){y&&b(e),w&&w.d(),t[15](null),C.d(),_=!1,et(v)}}}function Bp(t){let e;return{c(){e=r("button"),e.textContent="Download",a(e,"type","submit"),a(e,"class","ml-2 text-xs py-1 px-2 rounded bg-blue-500 text-white float-right mr-3")},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function o_(t){let e=t[7][0].name+"",l,n,o;return{c(){l=$(e),n=d(),o=r("button"),o.textContent="Upload",a(o,"type","submit"),a(o,"class","ml-2 text-xs py-1 px-2 rounded bg-blue-500 text-white mr-3")},m(s,u){h(s,l,u),h(s,n,u),h(s,o,u)},p(s,u){u&128&&e!==(e=s[7][0].name+"")&&V(l,e)},d(s){s&&b(l),s&&b(n),s&&b(o)}}}function s_(t){let e,l,n;return{c(){e=r("button"),e.textContent="Select file...",a(e,"type","button"),a(e,"class","text-xs py-1 px-2 rounded bg-blue-500 text-white mr-3")},m(o,s){h(o,e,s),l||(n=B(e,"click",t[17]),l=!0)},p:fe,d(o){o&&b(e),l=!1,n()}}}function u_(t){let e,l,n,o,s,u,c=t[1].chip+"",f,p,m,_,v=ye(t[1].chip,t[1].board)+"",w,k,g,C,y=t[1].mac+"",S,I,D,A,M,z,R,L,T,P,N,q,Q,U,G,W=t[1].version+"",Z,K,te,J=(t[1].security==0||t[0].a)&&io(t[1].board),H,ne,Ce,ge,Ee,he,ve,ae,ke,_e=t[1].apmac&&t[1].apmac!=t[1].mac&&Op(t);M=new Sn({props:{to:"/consent",$$slots:{default:[l_]},$$scope:{ctx:t}}});let le=t[1].meter&&Rp(t),ue=t[1].net&&Lp(t),j=t[2]&&Hp(t),pe=J&&Wp(t),$e=(t[1].security==0||t[0].a)&&jp(t),we=(t[1].security==0||t[0].a)&&zp(t);return ge=new Ot({props:{active:t[5],message:"Uploading firmware, please wait"}}),he=new Ot({props:{active:t[8],message:"Uploading configuration, please wait"}}),{c(){e=r("div"),l=r("div"),n=r("strong"),n.textContent="Device information",o=d(),s=r("div"),u=$("Chip: "),f=$(c),p=d(),m=r("div"),_=$("Device: "),w=$(v),k=d(),g=r("div"),C=$("MAC: "),S=$(y),I=d(),_e&&_e.c(),D=d(),A=r("div"),ee(M.$$.fragment),z=d(),R=r("button"),R.textContent="Reboot",L=d(),le&&le.c(),T=d(),ue&&ue.c(),P=d(),N=r("div"),q=r("strong"),q.textContent="Firmware",Q=d(),U=r("div"),G=$("Installed version: "),Z=$(W),K=d(),j&&j.c(),te=d(),pe&&pe.c(),H=d(),$e&&$e.c(),ne=d(),we&&we.c(),Ce=d(),ee(ge.$$.fragment),Ee=d(),ee(he.$$.fragment),a(n,"class","text-sm"),a(s,"class","my-2"),a(m,"class","my-2"),a(g,"class","my-2"),a(R,"class","text-xs py-1 px-2 rounded bg-yellow-500 text-white mr-3 float-right"),a(A,"class","my-2"),a(l,"class","cnt"),a(q,"class","text-sm"),a(U,"class","my-2"),a(N,"class","cnt"),a(e,"class","grid xl:grid-cols-5 lg:grid-cols-3 md:grid-cols-2")},m(oe,ce){h(oe,e,ce),i(e,l),i(l,n),i(l,o),i(l,s),i(s,u),i(s,f),i(l,p),i(l,m),i(m,_),i(m,w),i(l,k),i(l,g),i(g,C),i(g,S),i(l,I),_e&&_e.m(l,null),i(l,D),i(l,A),X(M,A,null),i(A,z),i(A,R),i(e,L),le&&le.m(e,null),i(e,T),ue&&ue.m(e,null),i(e,P),i(e,N),i(N,q),i(N,Q),i(N,U),i(U,G),i(U,Z),i(N,K),j&&j.m(N,null),i(N,te),pe&&pe.m(N,null),i(N,H),$e&&$e.m(N,null),i(e,ne),we&&we.m(e,null),h(oe,Ce,ce),X(ge,oe,ce),h(oe,Ee,ce),X(he,oe,ce),ve=!0,ae||(ke=B(R,"click",t[10]),ae=!0)},p(oe,[ce]){(!ve||ce&2)&&c!==(c=oe[1].chip+"")&&V(f,c),(!ve||ce&2)&&v!==(v=ye(oe[1].chip,oe[1].board)+"")&&V(w,v),(!ve||ce&2)&&y!==(y=oe[1].mac+"")&&V(S,y),oe[1].apmac&&oe[1].apmac!=oe[1].mac?_e?_e.p(oe,ce):(_e=Op(oe),_e.c(),_e.m(l,D)):_e&&(_e.d(1),_e=null);const ze={};ce&524288&&(ze.$$scope={dirty:ce,ctx:oe}),M.$set(ze),oe[1].meter?le?le.p(oe,ce):(le=Rp(oe),le.c(),le.m(e,T)):le&&(le.d(1),le=null),oe[1].net?ue?ue.p(oe,ce):(ue=Lp(oe),ue.c(),ue.m(e,P)):ue&&(ue.d(1),ue=null),(!ve||ce&2)&&W!==(W=oe[1].version+"")&&V(Z,W),oe[2]?j?(j.p(oe,ce),ce&4&&F(j,1)):(j=Hp(oe),j.c(),F(j,1),j.m(N,te)):j&&(Me(),O(j,1,1,()=>{j=null}),De()),ce&3&&(J=(oe[1].security==0||oe[0].a)&&io(oe[1].board)),J?pe?pe.p(oe,ce):(pe=Wp(oe),pe.c(),pe.m(N,H)):pe&&(pe.d(1),pe=null),oe[1].security==0||oe[0].a?$e?$e.p(oe,ce):($e=jp(oe),$e.c(),$e.m(N,null)):$e&&($e.d(1),$e=null),oe[1].security==0||oe[0].a?we?we.p(oe,ce):(we=zp(oe),we.c(),we.m(e,null)):we&&(we.d(1),we=null);const Pe={};ce&32&&(Pe.active=oe[5]),ge.$set(Pe);const qe={};ce&256&&(qe.active=oe[8]),he.$set(qe)},i(oe){ve||(F(M.$$.fragment,oe),F(j),F(ge.$$.fragment,oe),F(he.$$.fragment,oe),ve=!0)},o(oe){O(M.$$.fragment,oe),O(j),O(ge.$$.fragment,oe),O(he.$$.fragment,oe),ve=!1},d(oe){oe&&b(e),_e&&_e.d(),x(M),le&&le.d(),ue&&ue.d(),j&&j.d(),pe&&pe.d(),$e&&$e.d(),we&&we.d(),oe&&b(Ce),x(ge,oe),oe&&b(Ee),x(he,oe),ae=!1,ke()}}}async function a_(){await(await fetch("/reboot",{method:"POST"})).json()}function r_(t,e,l){let{data:n}=e,{sysinfo:o}=e,s={};mu.subscribe(M=>{l(2,s=Uc(o.version,M)),s||l(2,s=M[0])});function u(){confirm("Do you want to upgrade this device to "+s.tag_name+"?")&&(o.board!=2&&o.board!=4&&o.board!=7||confirm("WARNING: "+ye(o.chip,o.board)+" 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."))&&(qt.update(M=>(M.upgrading=!0,M)),Lc(s))}const c=function(){confirm("Are you sure you want to reboot the device?")&&(qt.update(M=>(M.booting=!0,M)),a_())};let f,p=[],m=!1,_,v=[],w=!1;fu();function k(M){vs[M?"unshift":"push"](()=>{f=M,l(3,f)})}function g(){p=this.files,l(4,p)}const C=()=>{f.click()},y=()=>l(5,m=!0);function S(M){vs[M?"unshift":"push"](()=>{_=M,l(6,_)})}function I(){v=this.files,l(7,v)}const D=()=>{_.click()},A=()=>l(8,w=!0);return t.$$set=M=>{"data"in M&&l(0,n=M.data),"sysinfo"in M&&l(1,o=M.sysinfo)},[n,o,s,f,p,m,_,v,w,u,c,k,g,C,y,S,I,D,A]}class f_ extends Ae{constructor(e){super(),Ie(this,e,r_,u_,Se,{data:0,sysinfo:1})}}function Yp(t){let e,l,n=ye(t[0],7)+"",o,s,u=ye(t[0],5)+"",c,f,p=ye(t[0],4)+"",m,_,v=ye(t[0],3)+"",w,k,g,C,y=ye(t[0],2)+"",S,I,D=ye(t[0],1)+"",A,M,z=ye(t[0],0)+"",R,L,T,P,N=ye(t[0],101)+"",q,Q,U=ye(t[0],100)+"",G;return{c(){e=r("optgroup"),l=r("option"),o=$(n),s=r("option"),c=$(u),f=r("option"),m=$(p),_=r("option"),w=$(v),k=d(),g=r("optgroup"),C=r("option"),S=$(y),I=r("option"),A=$(D),M=r("option"),R=$(z),L=d(),T=r("optgroup"),P=r("option"),q=$(N),Q=r("option"),G=$(U),l.__value=7,l.value=l.__value,s.__value=5,s.value=s.__value,f.__value=4,f.value=f.__value,_.__value=3,_.value=_.__value,a(e,"label","amsleser.no"),C.__value=2,C.value=C.__value,I.__value=1,I.value=I.__value,M.__value=0,M.value=M.__value,a(g,"label","Custom hardware"),P.__value=101,P.value=P.__value,Q.__value=100,Q.value=Q.__value,a(T,"label","Generic hardware")},m(W,Z){h(W,e,Z),i(e,l),i(l,o),i(e,s),i(s,c),i(e,f),i(f,m),i(e,_),i(_,w),h(W,k,Z),h(W,g,Z),i(g,C),i(C,S),i(g,I),i(I,A),i(g,M),i(M,R),h(W,L,Z),h(W,T,Z),i(T,P),i(P,q),i(T,Q),i(Q,G)},p(W,Z){Z&1&&n!==(n=ye(W[0],7)+"")&&V(o,n),Z&1&&u!==(u=ye(W[0],5)+"")&&V(c,u),Z&1&&p!==(p=ye(W[0],4)+"")&&V(m,p),Z&1&&v!==(v=ye(W[0],3)+"")&&V(w,v),Z&1&&y!==(y=ye(W[0],2)+"")&&V(S,y),Z&1&&D!==(D=ye(W[0],1)+"")&&V(A,D),Z&1&&z!==(z=ye(W[0],0)+"")&&V(R,z),Z&1&&N!==(N=ye(W[0],101)+"")&&V(q,N),Z&1&&U!==(U=ye(W[0],100)+"")&&V(G,U)},d(W){W&&b(e),W&&b(k),W&&b(g),W&&b(L),W&&b(T)}}}function Vp(t){let e,l,n=ye(t[0],201)+"",o,s,u=ye(t[0],202)+"",c,f,p=ye(t[0],203)+"",m,_,v=ye(t[0],200)+"",w;return{c(){e=r("optgroup"),l=r("option"),o=$(n),s=r("option"),c=$(u),f=r("option"),m=$(p),_=r("option"),w=$(v),l.__value=201,l.value=l.__value,s.__value=202,s.value=s.__value,f.__value=203,f.value=f.__value,_.__value=200,_.value=_.__value,a(e,"label","Generic hardware")},m(k,g){h(k,e,g),i(e,l),i(l,o),i(e,s),i(s,c),i(e,f),i(f,m),i(e,_),i(_,w)},p(k,g){g&1&&n!==(n=ye(k[0],201)+"")&&V(o,n),g&1&&u!==(u=ye(k[0],202)+"")&&V(c,u),g&1&&p!==(p=ye(k[0],203)+"")&&V(m,p),g&1&&v!==(v=ye(k[0],200)+"")&&V(w,v)},d(k){k&&b(e)}}}function Kp(t){let e,l,n=ye(t[0],7)+"",o,s,u=ye(t[0],6)+"",c,f,p=ye(t[0],5)+"",m,_,v,w,k=ye(t[0],51)+"",g,C,y=ye(t[0],50)+"",S;return{c(){e=r("optgroup"),l=r("option"),o=$(n),s=r("option"),c=$(u),f=r("option"),m=$(p),_=d(),v=r("optgroup"),w=r("option"),g=$(k),C=r("option"),S=$(y),l.__value=7,l.value=l.__value,s.__value=6,s.value=s.__value,f.__value=5,f.value=f.__value,a(e,"label","amsleser.no"),w.__value=51,w.value=w.__value,C.__value=50,C.value=C.__value,a(v,"label","Generic hardware")},m(I,D){h(I,e,D),i(e,l),i(l,o),i(e,s),i(s,c),i(e,f),i(f,m),h(I,_,D),h(I,v,D),i(v,w),i(w,g),i(v,C),i(C,S)},p(I,D){D&1&&n!==(n=ye(I[0],7)+"")&&V(o,n),D&1&&u!==(u=ye(I[0],6)+"")&&V(c,u),D&1&&p!==(p=ye(I[0],5)+"")&&V(m,p),D&1&&k!==(k=ye(I[0],51)+"")&&V(g,k),D&1&&y!==(y=ye(I[0],50)+"")&&V(S,y)},d(I){I&&b(e),I&&b(_),I&&b(v)}}}function Qp(t){let e,l,n=ye(t[0],200)+"",o;return{c(){e=r("optgroup"),l=r("option"),o=$(n),l.__value=200,l.value=l.__value,a(e,"label","Generic hardware")},m(s,u){h(s,e,u),i(e,l),i(l,o)},p(s,u){u&1&&n!==(n=ye(s[0],200)+"")&&V(o,n)},d(s){s&&b(e)}}}function p_(t){let e,l,n,o,s,u,c=t[0]=="esp8266"&&Yp(t),f=t[0]=="esp32"&&Vp(t),p=t[0]=="esp32s2"&&Kp(t),m=t[0]=="esp32solo"&&Qp(t);return{c(){e=r("option"),l=d(),c&&c.c(),n=d(),f&&f.c(),o=d(),p&&p.c(),s=d(),m&&m.c(),u=Qe(),e.__value=-1,e.value=e.__value},m(_,v){h(_,e,v),h(_,l,v),c&&c.m(_,v),h(_,n,v),f&&f.m(_,v),h(_,o,v),p&&p.m(_,v),h(_,s,v),m&&m.m(_,v),h(_,u,v)},p(_,[v]){_[0]=="esp8266"?c?c.p(_,v):(c=Yp(_),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),_[0]=="esp32"?f?f.p(_,v):(f=Vp(_),f.c(),f.m(o.parentNode,o)):f&&(f.d(1),f=null),_[0]=="esp32s2"?p?p.p(_,v):(p=Kp(_),p.c(),p.m(s.parentNode,s)):p&&(p.d(1),p=null),_[0]=="esp32solo"?m?m.p(_,v):(m=Qp(_),m.c(),m.m(u.parentNode,u)):m&&(m.d(1),m=null)},i:fe,o:fe,d(_){_&&b(e),_&&b(l),c&&c.d(_),_&&b(n),f&&f.d(_),_&&b(o),p&&p.d(_),_&&b(s),m&&m.d(_),_&&b(u)}}}function c_(t,e,l){let{chip:n}=e;return t.$$set=o=>{"chip"in o&&l(0,n=o.chip)},[n]}class m_ extends Ae{constructor(e){super(),Ie(this,e,c_,p_,Se,{chip:0})}}function Zp(t){let e,l,n,o,s,u,c;return u=new Wc({props:{chip:t[0].chip}}),{c(){e=r("div"),l=$("HAN GPIO"),n=r("br"),o=d(),s=r("select"),ee(u.$$.fragment),a(s,"name","vh"),a(s,"class","in-s"),a(e,"class","my-3")},m(f,p){h(f,e,p),i(e,l),i(e,n),i(e,o),i(e,s),X(u,s,null),c=!0},p(f,p){const m={};p&1&&(m.chip=f[0].chip),u.$set(m)},i(f){c||(F(u.$$.fragment,f),c=!0)},o(f){O(u.$$.fragment,f),c=!1},d(f){f&&b(e),x(u)}}}function __(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L;w=new m_({props:{chip:t[0].chip}});let T=t[0].board&&t[0].board>20&&Zp(t);return M=new Ot({props:{active:t[1],message:"Saving device configuration"}}),{c(){e=r("div"),l=r("div"),n=r("form"),o=r("input"),s=d(),u=r("strong"),u.textContent="Initial configuration",c=d(),f=r("div"),p=$("Board type"),m=r("br"),_=d(),v=r("select"),ee(w.$$.fragment),k=d(),T&&T.c(),g=d(),C=r("div"),C.innerHTML='',y=d(),S=r("div"),S.innerHTML='',I=d(),D=r("span"),D.textContent="\xA0",A=d(),ee(M.$$.fragment),a(o,"type","hidden"),a(o,"name","v"),o.value="true",a(u,"class","text-sm"),a(v,"name","vb"),a(v,"class","in-s"),t[0].board===void 0&&Re(()=>t[3].call(v)),a(f,"class","my-3"),a(C,"class","my-3"),a(S,"class","my-3"),a(D,"class","clear-both"),a(n,"autocomplete","off"),a(l,"class","cnt"),a(e,"class","grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2")},m(P,N){h(P,e,N),i(e,l),i(l,n),i(n,o),i(n,s),i(n,u),i(n,c),i(n,f),i(f,p),i(f,m),i(f,_),i(f,v),X(w,v,null),de(v,t[0].board),i(n,k),T&&T.m(n,null),i(n,g),i(n,C),i(n,y),i(n,S),i(n,I),i(n,D),h(P,A,N),X(M,P,N),z=!0,R||(L=[B(v,"change",t[3]),B(n,"submit",gs(t[2]))],R=!0)},p(P,[N]){const q={};N&1&&(q.chip=P[0].chip),w.$set(q),N&1&&de(v,P[0].board),P[0].board&&P[0].board>20?T?(T.p(P,N),N&1&&F(T,1)):(T=Zp(P),T.c(),F(T,1),T.m(n,g)):T&&(Me(),O(T,1,1,()=>{T=null}),De());const Q={};N&2&&(Q.active=P[1]),M.$set(Q)},i(P){z||(F(w.$$.fragment,P),F(T),F(M.$$.fragment,P),z=!0)},o(P){O(w.$$.fragment,P),O(T),O(M.$$.fragment,P),z=!1},d(P){P&&b(e),x(w),T&&T.d(),P&&b(A),x(M,P),R=!1,et(L)}}}function d_(t,e,l){let{sysinfo:n={}}=e,o=!1;async function s(c){l(1,o=!0);const f=new FormData(c.target),p=new URLSearchParams;for(let v of f){const[w,k]=v;p.append(w,k)}let _=await(await fetch("/save",{method:"POST",body:p})).json();l(1,o=!1),qt.update(v=>(v.vndcfg=_.success,v.booting=_.reboot,v)),no(n.usrcfg?"/":"/setup")}function u(){n.board=We(this),l(0,n)}return t.$$set=c=>{"sysinfo"in c&&l(0,n=c.sysinfo)},[n,o,s,u]}class v_ extends Ae{constructor(e){super(),Ie(this,e,d_,__,Se,{sysinfo:0})}}function Jp(t){let e,l,n,o,s,u,c,f;return c=new jc({}),{c(){e=r("br"),l=d(),n=r("div"),o=r("input"),s=d(),u=r("select"),ee(c.$$.fragment),a(o,"name","si"),a(o,"type","text"),a(o,"class","in-f w-full"),o.required=t[1],a(u,"name","su"),a(u,"class","in-l"),u.required=t[1],a(n,"class","flex")},m(p,m){h(p,e,m),h(p,l,m),h(p,n,m),i(n,o),i(n,s),i(n,u),X(c,u,null),f=!0},p(p,m){(!f||m&2)&&(o.required=p[1]),(!f||m&2)&&(u.required=p[1])},i(p){f||(F(c.$$.fragment,p),f=!0)},o(p){O(c.$$.fragment,p),f=!1},d(p){p&&b(e),p&&b(l),p&&b(n),x(c)}}}function Xp(t){let e;return{c(){e=r("div"),e.innerHTML=`
Gateway
+
+
DNS
+
`,a(e,"class","my-3 flex")},m(l,n){h(l,e,n)},d(l){l&&b(e)}}}function b_(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q=t[1]&&Jp(t),Q=t[1]&&Xp();return L=new Ot({props:{active:t[2],message:"Saving your configuration to the device"}}),{c(){e=r("div"),l=r("div"),n=r("form"),o=r("input"),s=d(),u=r("strong"),u.textContent="Setup",c=d(),f=r("div"),f.innerHTML=`SSID
+ `,p=d(),m=r("div"),m.innerHTML=`PSK
+ `,_=d(),v=r("div"),w=$(`Hostname + `),k=r("input"),g=d(),C=r("div"),y=r("label"),S=r("input"),I=$(" Static IP"),D=d(),q&&q.c(),A=d(),Q&&Q.c(),M=d(),z=r("div"),z.innerHTML='',R=d(),ee(L.$$.fragment),a(o,"type","hidden"),a(o,"name","s"),o.value="true",a(u,"class","text-sm"),a(f,"class","my-3"),a(m,"class","my-3"),a(k,"name","sh"),a(k,"type","text"),a(k,"class","in-s"),a(k,"maxlength","32"),a(k,"pattern","[a-z0-9_-]+"),a(k,"placeholder","Optional, ex.: ams-reader"),a(k,"autocomplete","off"),a(S,"type","checkbox"),a(S,"name","sm"),S.__value="static",S.value=S.__value,a(S,"class","rounded mb-1"),a(C,"class","my-3"),a(z,"class","my-3"),a(l,"class","cnt"),a(e,"class","grid xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2")},m(U,G){h(U,e,G),i(e,l),i(l,n),i(n,o),i(n,s),i(n,u),i(n,c),i(n,f),i(n,p),i(n,m),i(n,_),i(n,v),i(v,w),i(v,k),Y(k,t[0].hostname),i(n,g),i(n,C),i(C,y),i(y,S),S.checked=t[1],i(y,I),i(C,D),q&&q.m(C,null),i(n,A),Q&&Q.m(n,null),i(n,M),i(n,z),h(U,R,G),X(L,U,G),T=!0,P||(N=[B(k,"input",t[4]),B(S,"change",t[5]),B(n,"submit",gs(t[3]))],P=!0)},p(U,[G]){G&1&&k.value!==U[0].hostname&&Y(k,U[0].hostname),G&2&&(S.checked=U[1]),U[1]?q?(q.p(U,G),G&2&&F(q,1)):(q=Jp(U),q.c(),F(q,1),q.m(C,null)):q&&(Me(),O(q,1,1,()=>{q=null}),De()),U[1]?Q||(Q=Xp(),Q.c(),Q.m(n,M)):Q&&(Q.d(1),Q=null);const W={};G&4&&(W.active=U[2]),L.$set(W)},i(U){T||(F(q),F(L.$$.fragment,U),T=!0)},o(U){O(q),O(L.$$.fragment,U),T=!1},d(U){U&&b(e),q&&q.d(),Q&&Q.d(),U&&b(R),x(L,U),P=!1,et(N)}}}function h_(t,e,l){let{sysinfo:n={}}=e,o=!1,s=!1,u=0;function c(){var _="";u++;var v=function(){setTimeout(c,1e3)};if(n.net.ip&&u%3==0){if(n.net.ip=="0.0.0.0"){v();return}_="http://"+n.net.ip}else n.hostname&&u%3==1?_="http://"+n.hostname:n.hostname&&u%3==2?_="http://"+n.hostname+".local":_="";console&&console.log("Trying url "+_),qt.update(k=>(k.trying=_,k));var w=new XMLHttpRequest;w.timeout=5e3,w.addEventListener("abort",v),w.addEventListener("error",v),w.addEventListener("timeout",v),w.addEventListener("load",function(k){window.location.href=_||"/"}),w.open("GET",_+"/is-alive",!0),w.send()}async function f(_){l(2,s=!0);const v=new FormData(_.target),w=new URLSearchParams;for(let C of v){const[y,S]=C;w.append(y,S)}let g=await(await fetch("/save",{method:"POST",body:w})).json();l(2,s=!1),qt.update(C=>(C.hostname=v.get("sh"),C.usrcfg=g.success,C.booting=g.reboot,o&&(C.net.ip=v.get("si"),C.net.mask=v.get("su"),C.net.gw=v.get("sg"),C.net.dns1=v.get("sd")),setTimeout(c,5e3),C))}function p(){n.hostname=this.value,l(0,n)}function m(){o=this.checked,l(1,o)}return t.$$set=_=>{"sysinfo"in _&&l(0,n=_.sysinfo)},[n,o,s,f,p,m]}class g_ extends Ae{constructor(e){super(),Ie(this,e,h_,b_,Se,{sysinfo:0})}}function k_(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y;return k=new Ot({props:{active:t[2],message:"Uploading file, please wait"}}),{c(){e=r("div"),l=r("div"),n=r("strong"),o=$("Upload "),s=$(t[1]),u=d(),c=r("p"),c.textContent="Select a suitable file and click upload",f=d(),p=r("form"),m=r("input"),_=d(),v=r("div"),v.innerHTML='',w=d(),ee(k.$$.fragment),a(c,"class","mb-4"),a(m,"name","file"),a(m,"type","file"),a(v,"class","w-full text-right mt-4"),a(p,"action",t[0]),a(p,"enctype","multipart/form-data"),a(p,"method","post"),a(p,"autocomplete","off"),a(l,"class","cnt"),a(e,"class","grid xl:grid-cols-4 lg:grid-cols-2 md:grid-cols-2")},m(S,I){h(S,e,I),i(e,l),i(l,n),i(n,o),i(n,s),i(l,u),i(l,c),i(l,f),i(l,p),i(p,m),i(p,_),i(p,v),h(S,w,I),X(k,S,I),g=!0,C||(y=B(p,"submit",t[3]),C=!0)},p(S,[I]){(!g||I&2)&&V(s,S[1]),(!g||I&1)&&a(p,"action",S[0]);const D={};I&4&&(D.active=S[2]),k.$set(D)},i(S){g||(F(k.$$.fragment,S),g=!0)},o(S){O(k.$$.fragment,S),g=!1},d(S){S&&b(e),S&&b(w),x(k,S),C=!1,y()}}}function w_(t,e,l){let{action:n}=e,{title:o}=e,s=!1;const u=()=>l(2,s=!0);return t.$$set=c=>{"action"in c&&l(0,n=c.action),"title"in c&&l(1,o=c.title)},[n,o,s,u]}class _u extends Ae{constructor(e){super(),Ie(this,e,w_,k_,Se,{action:0,title:1})}}function y_(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D,A,M,z,R,L,T,P,N,q,Q;return P=new Ot({props:{active:t[1],message:"Saving preferences"}}),{c(){e=r("div"),l=r("div"),n=r("form"),o=r("div"),o.textContent="Various permissions we need to do stuff:",s=d(),u=r("hr"),c=d(),f=r("div"),p=$("Enable one-click upgrade? (implies data collection)"),m=r("br"),_=d(),v=r("a"),v.textContent="Read more",w=r("br"),k=d(),g=r("label"),C=r("input"),S=$(" Yes"),I=r("label"),D=r("input"),M=$(" No"),z=r("br"),R=d(),L=r("div"),L.innerHTML='',T=d(),ee(P.$$.fragment),a(v,"href","https://github.com/UtilitechAS/amsreader-firmware/wiki/Data-collection-on-one-click-firmware-upgrade"),a(v,"target","_blank"),a(v,"class","text-blue-600 hover:text-blue-800"),a(C,"type","radio"),a(C,"name","sf"),C.value=1,C.checked=y=t[0].fwconsent===1,a(C,"class","rounded m-2"),C.required=!0,a(D,"type","radio"),a(D,"name","sf"),D.value=2,D.checked=A=t[0].fwconsent===2,a(D,"class","rounded m-2"),D.required=!0,a(f,"class","my-3"),a(L,"class","my-3"),a(n,"autocomplete","off"),a(l,"class","cnt"),a(e,"class","grid xl:grid-cols-3 lg:grid-cols-2")},m(U,G){h(U,e,G),i(e,l),i(l,n),i(n,o),i(n,s),i(n,u),i(n,c),i(n,f),i(f,p),i(f,m),i(f,_),i(f,v),i(f,w),i(f,k),i(f,g),i(g,C),i(g,S),i(f,I),i(I,D),i(I,M),i(f,z),i(n,R),i(n,L),h(U,T,G),X(P,U,G),N=!0,q||(Q=B(n,"submit",gs(t[2])),q=!0)},p(U,[G]){(!N||G&1&&y!==(y=U[0].fwconsent===1))&&(C.checked=y),(!N||G&1&&A!==(A=U[0].fwconsent===2))&&(D.checked=A);const W={};G&2&&(W.active=U[1]),P.$set(W)},i(U){N||(F(P.$$.fragment,U),N=!0)},o(U){O(P.$$.fragment,U),N=!1},d(U){U&&b(e),U&&b(T),x(P,U),q=!1,Q()}}}function C_(t,e,l){let{sysinfo:n={}}=e,o=!1;async function s(u){l(1,o=!0);const c=new FormData(u.target),f=new URLSearchParams;for(let _ of c){const[v,w]=_;f.append(v,w)}let m=await(await fetch("/save",{method:"POST",body:f})).json();l(1,o=!1),qt.update(_=>(_.fwconsent=c.sf===!0?1:c.sf===!1?2:0,_.booting=m.reboot,_)),no("/")}return t.$$set=u=>{"sysinfo"in u&&l(0,n=u.sysinfo)},[n,o,s]}class $_ extends Ae{constructor(e){super(),Ie(this,e,C_,y_,Se,{sysinfo:0})}}function S_(t){let e,l;return e=new Nm({props:{data:t[1],sysinfo:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&2&&(s.data=n[1]),o&1&&(s.sysinfo=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function P_(t){let e,l;return e=new t_({props:{sysinfo:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&1&&(s.sysinfo=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function T_(t){let e,l;return e=new f_({props:{sysinfo:t[0],data:t[1]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&1&&(s.sysinfo=n[0]),o&2&&(s.data=n[1]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function F_(t){let e,l;return e=new _u({props:{title:"CA",action:"/mqtt-ca"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p:fe,i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function I_(t){let e,l;return e=new _u({props:{title:"certificate",action:"/mqtt-cert"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p:fe,i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function A_(t){let e,l;return e=new _u({props:{title:"private key",action:"/mqtt-key"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p:fe,i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function M_(t){let e,l;return e=new $_({props:{sysinfo:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&1&&(s.sysinfo=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function D_(t){let e,l;return e=new g_({props:{sysinfo:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&1&&(s.sysinfo=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function N_(t){let e,l;return e=new v_({props:{sysinfo:t[0]}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&1&&(s.sysinfo=n[0]),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function E_(t){let e,l,n,o,s,u,c,f,p,m,_,v,w,k,g,C,y,S,I,D;return e=new z0({props:{data:t[1]}}),n=new Al({props:{path:"/",$$slots:{default:[S_]},$$scope:{ctx:t}}}),s=new Al({props:{path:"/configuration",$$slots:{default:[P_]},$$scope:{ctx:t}}}),c=new Al({props:{path:"/status",$$slots:{default:[T_]},$$scope:{ctx:t}}}),p=new Al({props:{path:"/mqtt-ca",$$slots:{default:[F_]},$$scope:{ctx:t}}}),_=new Al({props:{path:"/mqtt-cert",$$slots:{default:[I_]},$$scope:{ctx:t}}}),w=new Al({props:{path:"/mqtt-key",$$slots:{default:[A_]},$$scope:{ctx:t}}}),g=new Al({props:{path:"/consent",$$slots:{default:[M_]},$$scope:{ctx:t}}}),y=new Al({props:{path:"/setup",$$slots:{default:[D_]},$$scope:{ctx:t}}}),I=new Al({props:{path:"/vendor",$$slots:{default:[N_]},$$scope:{ctx:t}}}),{c(){ee(e.$$.fragment),l=d(),ee(n.$$.fragment),o=d(),ee(s.$$.fragment),u=d(),ee(c.$$.fragment),f=d(),ee(p.$$.fragment),m=d(),ee(_.$$.fragment),v=d(),ee(w.$$.fragment),k=d(),ee(g.$$.fragment),C=d(),ee(y.$$.fragment),S=d(),ee(I.$$.fragment)},m(A,M){X(e,A,M),h(A,l,M),X(n,A,M),h(A,o,M),X(s,A,M),h(A,u,M),X(c,A,M),h(A,f,M),X(p,A,M),h(A,m,M),X(_,A,M),h(A,v,M),X(w,A,M),h(A,k,M),X(g,A,M),h(A,C,M),X(y,A,M),h(A,S,M),X(I,A,M),D=!0},p(A,M){const z={};M&2&&(z.data=A[1]),e.$set(z);const R={};M&7&&(R.$$scope={dirty:M,ctx:A}),n.$set(R);const L={};M&5&&(L.$$scope={dirty:M,ctx:A}),s.$set(L);const T={};M&7&&(T.$$scope={dirty:M,ctx:A}),c.$set(T);const P={};M&4&&(P.$$scope={dirty:M,ctx:A}),p.$set(P);const N={};M&4&&(N.$$scope={dirty:M,ctx:A}),_.$set(N);const q={};M&4&&(q.$$scope={dirty:M,ctx:A}),w.$set(q);const Q={};M&5&&(Q.$$scope={dirty:M,ctx:A}),g.$set(Q);const U={};M&5&&(U.$$scope={dirty:M,ctx:A}),y.$set(U);const G={};M&5&&(G.$$scope={dirty:M,ctx:A}),I.$set(G)},i(A){D||(F(e.$$.fragment,A),F(n.$$.fragment,A),F(s.$$.fragment,A),F(c.$$.fragment,A),F(p.$$.fragment,A),F(_.$$.fragment,A),F(w.$$.fragment,A),F(g.$$.fragment,A),F(y.$$.fragment,A),F(I.$$.fragment,A),D=!0)},o(A){O(e.$$.fragment,A),O(n.$$.fragment,A),O(s.$$.fragment,A),O(c.$$.fragment,A),O(p.$$.fragment,A),O(_.$$.fragment,A),O(w.$$.fragment,A),O(g.$$.fragment,A),O(y.$$.fragment,A),O(I.$$.fragment,A),D=!1},d(A){x(e,A),A&&b(l),x(n,A),A&&b(o),x(s,A),A&&b(u),x(c,A),A&&b(f),x(p,A),A&&b(m),x(_,A),A&&b(v),x(w,A),A&&b(k),x(g,A),A&&b(C),x(y,A),A&&b(S),x(I,A)}}}function O_(t){let e,l,n,o;const s=[U_,L_],u=[];function c(f,p){return f[0].trying?0:1}return e=c(t),l=u[e]=s[e](t),{c(){l.c(),n=Qe()},m(f,p){u[e].m(f,p),h(f,n,p),o=!0},p(f,p){let m=e;e=c(f),e===m?u[e].p(f,p):(Me(),O(u[m],1,1,()=>{u[m]=null}),De(),l=u[e],l?l.p(f,p):(l=u[e]=s[e](f),l.c()),F(l,1),l.m(n.parentNode,n))},i(f){o||(F(l),o=!0)},o(f){O(l),o=!1},d(f){u[e].d(f),f&&b(n)}}}function R_(t){let e,l;return e=new Ot({props:{active:"true",message:"Device is upgrading, please wait"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p:fe,i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function L_(t){let e,l;return e=new Ot({props:{active:"true",message:"Device is booting, please wait"}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p:fe,i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function U_(t){let e,l;return e=new Ot({props:{active:"true",message:"Device is booting, please wait. Trying to reach it on "+t[0].trying}}),{c(){ee(e.$$.fragment)},m(n,o){X(e,n,o),l=!0},p(n,o){const s={};o&1&&(s.message="Device is booting, please wait. Trying to reach it on "+n[0].trying),e.$set(s)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){O(e.$$.fragment,n),l=!1},d(n){x(e,n)}}}function H_(t){let e,l,n,o,s,u;l=new Sc({props:{$$slots:{default:[E_]},$$scope:{ctx:t}}});const c=[R_,O_],f=[];function p(m,_){return m[0].upgrading?0:m[0].booting?1:-1}return~(o=p(t))&&(s=f[o]=c[o](t)),{c(){e=r("div"),ee(l.$$.fragment),n=d(),s&&s.c(),a(e,"class","container mx-auto m-3")},m(m,_){h(m,e,_),X(l,e,null),i(e,n),~o&&f[o].m(e,null),u=!0},p(m,[_]){const v={};_&7&&(v.$$scope={dirty:_,ctx:m}),l.$set(v);let w=o;o=p(m),o===w?~o&&f[o].p(m,_):(s&&(Me(),O(f[w],1,1,()=>{f[w]=null}),De()),~o?(s=f[o],s?s.p(m,_):(s=f[o]=c[o](m),s.c()),F(s,1),s.m(e,null)):s=null)},i(m){u||(F(l.$$.fragment,m),F(s),u=!0)},o(m){O(l.$$.fragment,m),O(s),u=!1},d(m){m&&b(e),x(l),~o&&f[o].d()}}}function q_(t,e,l){let n={};qt.subscribe(s=>{l(0,n=s),n.vndcfg===!1?no("/vendor"):n.usrcfg===!1?no("/setup"):n.fwconsent===0&&no("/consent")}),fu();let o={};return o0.subscribe(s=>{l(1,o=s)}),[n,o]}class G_ extends Ae{constructor(e){super(),Ie(this,e,q_,H_,Se,{})}}new G_({target:document.getElementById("app")});