aboutsummaryrefslogtreecommitdiff
path: root/client/index.7cd96668.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/index.7cd96668.js')
-rw-r--r--client/index.7cd96668.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/client/index.7cd96668.js b/client/index.7cd96668.js
new file mode 100644
index 0000000..82936be
--- /dev/null
+++ b/client/index.7cd96668.js
@@ -0,0 +1 @@
+import{S as e,i as t,s as a,e as s,c as n,a as r,d as l,b as i,f as c,g as o,n as d,w as u,h as p,j as h,k as f,l as m,t as g,m as v,o as _,p as w,q as b,r as k,u as $,v as E,x as D,y,z as I,A as j,B as O,C as V,D as T,E as M,F as q,G as x,H as P,I as S,J as N,K as A}from"./client.c04a5805.js";function C(e){let t,a,u,p,h,f,m,g,v;return{c(){t=s("div"),a=s("div"),u=s("div"),p=s("div"),h=s("div"),f=s("div"),m=s("div"),g=s("div"),v=s("div"),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);a=n(s,"DIV",{class:!0}),r(a).forEach(l),u=n(s,"DIV",{class:!0}),r(u).forEach(l),p=n(s,"DIV",{class:!0}),r(p).forEach(l),h=n(s,"DIV",{class:!0}),r(h).forEach(l),f=n(s,"DIV",{class:!0}),r(f).forEach(l),m=n(s,"DIV",{class:!0}),r(m).forEach(l),g=n(s,"DIV",{class:!0}),r(g).forEach(l),v=n(s,"DIV",{class:!0}),r(v).forEach(l),s.forEach(l),this.h()},h(){i(a,"class","svelte-7k6qu0"),i(u,"class","svelte-7k6qu0"),i(p,"class","svelte-7k6qu0"),i(h,"class","svelte-7k6qu0"),i(f,"class","svelte-7k6qu0"),i(m,"class","svelte-7k6qu0"),i(g,"class","svelte-7k6qu0"),i(v,"class","svelte-7k6qu0"),i(t,"class","lds-roller svelte-7k6qu0")},m(e,s){c(e,t,s),o(t,a),o(t,u),o(t,p),o(t,h),o(t,f),o(t,m),o(t,g),o(t,v)},p:d,i:d,o:d,d(e){e&&l(t)}}}class J extends e{constructor(e){super(),t(this,e,null,C,a,{})}}const B={January:1,Feb:2,March:3,April:4,May:5,June:6,July:7,August:8,September:9,October:10,November:11,December:12};function H(e){return e=function(e){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/.test(e))return e;if(/^\d{4}\s[a-z,A-Z]+\s\d{2}$/.test(e)){let t=e.split(" ");return`${t[0]}-${function(e,t=2){let a=e.toString();for(;t-a.length>0;)a="0"+a;return a}(B[t[1]])}-${t[2]}T00:00:00Z`}return/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}/.test(e)?e.replace(" ","T")+"Z":/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}.\d{4}/.test(e)?e.replace(" ","T").split(".")[0]+"Z":(console.warn(e),e)}(e),new Date(e)}const K=u("light");setInterval((function(){if("undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light";e!=p(K)&&K.set(e)}),1e3),K.subscribe((e=>{"undefined"!=typeof window&&("dark"==e?window.document.body.classList.add("dark"):window.document.body.classList.remove("dark"))}));const z={updated:new Date(0,0,0),updating:!0};let F=W("navigator_location"),Z=W("earth_weather"),L=W("space_weather");const G=u(X("navigator_location")?function(e){return e.updated=new Date(e.updated),e}(F):Object.assign(Object.assign({},z),{available:!1,longitude:null,latitude:null,city:null})),R=u(X("earth_weather")?function(e){let t=e;return t.updated=new Date(t.updated),t.yr_data_raw.properties.meta.updated_at=new Date(t.yr_data_raw.properties.meta.updated_at),t.yr_data_raw.properties.timeseries=t.yr_data_raw.properties.timeseries.map((e=>Object.assign(Object.assign({},e),{time:new Date(e.time)}))),t}(Z):Object.assign(Object.assign({},z),{available:!1})),Q=u(X("space_weather")?function(e){let t=e;return t.updated=new Date(t.updated),t.usnoaa_data_raw.geospace_pred_est_kp_1_hour=t.usnoaa_data_raw.geospace_pred_est_kp_1_hour.map((e=>Object.assign(Object.assign({},e),{model_prediction_time:new Date(e.model_prediction_time)}))),t.usnoaa_data_raw.noaa_planetary_k_index_forecast=t.usnoaa_data_raw.noaa_planetary_k_index_forecast.map((e=>Object.assign(Object.assign({},e),{time:new Date(e.time)}))),t.usnoaa_data_raw.outlook_27_day=t.usnoaa_data_raw.outlook_27_day.map((e=>Object.assign(Object.assign({},e),{time:new Date(e.time)}))),t.usnoaa_data_raw.solar_wind_mag_field.TimeStamp=new Date(t.usnoaa_data_raw.solar_wind_mag_field.TimeStamp),t}(L):Object.assign({},z));function U(e,t){"undefined"!=typeof window&&localStorage.setItem(e,JSON.stringify(t))}function W(e){if("undefined"!=typeof window)return JSON.parse(localStorage.getItem(e))}function X(e){return"undefined"!=typeof window&&localStorage.hasOwnProperty(e)}async function Y(){if("undefined"==typeof window)return;let e;te(G,!0);try{e=await async function(){return new Promise(((e,t)=>{"undefined"!=typeof navigator?navigator.geolocation.getCurrentPosition((t=>{e({longitude:t.coords.longitude,latitude:t.coords.latitude})}),(e=>{t(e)})):t(Error())}))}()}catch(e){if(0==p(G).available)return;return console.log(e),G.update((e=>Object.assign(Object.assign({},e),{available:!1,city:null,longitude:null,latitude:null}))),void te(G,!1)}if(p(G).available&&Date.now()-p(G).updated<3e5)return void te(G,!1,!1);let t={city:void 0};try{let a=await fetch(`https://geocode.xyz/${e.latitude},${e.longitude}?geoit=json`);t=await a.json()}catch(e){console.log(e)}G.update((a=>Object.assign(Object.assign(Object.assign({},a),{available:!0,city:t.city}),e))),te(G,!1)}async function ee(){if("undefined"==typeof window)return;if(Date.now()-p(Q).updated<3e5)return;let e;te(Q,!0);try{e=await async function(){let e,t={now:{bz:"-",bt:"-",kp:"-",kp_min:"-",kp_max:"-"},usnoaa_data_raw:{solar_wind_mag_field:!1,noaa_planetary_k_index_forecast:!1,geospace_pred_est_kp_1_hour:!1,outlook_27_day:!1}},a=await fetch("https://services.swpc.noaa.gov/products/summary/solar-wind-mag-field.json");e=await a.json(),e.TimeStamp=H(e.TimeStamp),t.usnoaa_data_raw.solar_wind_mag_field=e,t.now.bz=t.usnoaa_data_raw.solar_wind_mag_field.Bz,t.now.bt=t.usnoaa_data_raw.solar_wind_mag_field.Bt,a=await fetch("https://services.swpc.noaa.gov/json/geospace/geospace_pred_est_kp_1_hour.json"),e=await a.json(),e=e.map((e=>Object.assign(Object.assign({},e),{model_prediction_time:H(e.model_prediction_time)}))),t.usnoaa_data_raw.geospace_pred_est_kp_1_hour=e,a=await fetch("https://services.swpc.noaa.gov/text/27-day-outlook.txt"),e=await a.text(),e=[...e.matchAll(/^(?<time>\d{4}\s.{3}\s\d{2})\s+(?<flux107>\d+)\s+(?<aindex>\d+)\s+(?<kindex>\d+)$/gm)],e=e.map((e=>Object.assign(Object.assign({},e.groups),{time:H(e.groups.time)}))),t.usnoaa_data_raw.outlook_27_day=e,a=await fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json"),e=await a.json(),e.shift(),t.usnoaa_data_raw.noaa_planetary_k_index_forecast=e;let s=new Date,n=new Date(0,0,0),r=1e3,l=0;return t.usnoaa_data_raw.noaa_planetary_k_index_forecast.forEach(((e,a)=>{e[1]>l&&(l=e[1]),e[1]<r&&(r=e[1]);let i=H(e[0]);Math.abs(i.getTime()-s.getTime())<Math.abs(n.getTime()-s.getTime())&&(n=i,t.now.kp=e[1]),t.usnoaa_data_raw.noaa_planetary_k_index_forecast[a]={time:i,kp:e[1],observed:e[2]}})),t.now.kp_min=r.toString(),t.now.kp_max=l.toString(),console.log(t),t}()}catch(e){return void te(Q,!1,!1)}Q.update((t=>Object.assign(Object.assign({},t),e))),te(Q,!1)}function te(e,t=!1,a=!0){let s={};a&&!t&&(s={updated:new Date}),e.update((e=>Object.assign(Object.assign(Object.assign({},e),s),{updating:t})))}function ae(e){let t,a,o;function d(e,t){return void 0!==e[2].city?ne:se}let u=d(e),p=u(e);return{c(){t=s("i"),a=h(),p.c(),o=f(),this.h()},l(e){t=n(e,"I",{class:!0}),r(t).forEach(l),a=m(e),p.l(e),o=f(),this.h()},h(){i(t,"class","symbol fas fa-map-marker-alt svelte-9kdo4s")},m(e,s){c(e,t,s),c(e,a,s),p.m(e,s),c(e,o,s)},p(e,t){u===(u=d(e))&&p?p.p(e,t):(p.d(1),p=u(e),p&&(p.c(),p.m(o.parentNode,o)))},d(e){e&&l(t),e&&l(a),p.d(e),e&&l(o)}}}function se(e){let t,a,d,u,p,h,f=e[2].longitude+"",m=e[2].latitude+"";return{c(){t=s("h1"),a=g("long: "),d=g(f),u=s("br"),p=g("lat: "),h=g(m),this.h()},l(e){t=n(e,"H1",{class:!0});var s=r(t);a=v(s,"long: "),d=v(s,f),u=n(s,"BR",{}),p=v(s,"lat: "),h=v(s,m),s.forEach(l),this.h()},h(){i(t,"class","svelte-9kdo4s")},m(e,s){c(e,t,s),o(t,a),o(t,d),o(t,u),o(t,p),o(t,h)},p(e,t){4&t&&f!==(f=e[2].longitude+"")&&w(d,f),4&t&&m!==(m=e[2].latitude+"")&&w(h,m)},d(e){e&&l(t)}}}function ne(e){let t,a,d=e[2].city+"";return{c(){t=s("h1"),a=g(d),this.h()},l(e){t=n(e,"H1",{class:!0});var s=r(t);a=v(s,d),s.forEach(l),this.h()},h(){i(t,"class","svelte-9kdo4s")},m(e,s){c(e,t,s),o(t,a)},p(e,t){4&t&&d!==(d=e[2].city+"")&&w(a,d)},d(e){e&&l(t)}}}function re(e){let t,a,s;function n(e,a){return 24&a&&(t=null),null==t&&(t=!!(Math.abs(e[3].updated-e[4].updated)>6e5)),t?ie:le}let r=n(e,-1),i=r(e),o=e[1]>=3e5&&ce(e);return{c(){i.c(),a=h(),o&&o.c(),s=f()},l(e){i.l(e),a=m(e),o&&o.l(e),s=f()},m(e,t){i.m(e,t),c(e,a,t),o&&o.m(e,t),c(e,s,t)},p(e,t){r===(r=n(e,t))&&i?i.p(e,t):(i.d(1),i=r(e),i&&(i.c(),i.m(a.parentNode,a))),e[1]>=3e5?o?o.p(e,t):(o=ce(e),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(e){i.d(e),e&&l(a),o&&o.d(e),e&&l(s)}}}function le(e){let t,a,i=e[0].toLocaleString("no-NO",{dateStyle:"medium",timeStyle:"short"})+"";return{c(){t=s("p"),a=g(i)},l(e){t=n(e,"P",{});var s=r(t);a=v(s,i),s.forEach(l)},m(e,s){c(e,t,s),o(t,a)},p(e,t){1&t&&i!==(i=e[0].toLocaleString("no-NO",{dateStyle:"medium",timeStyle:"short"})+"")&&w(a,i)},d(e){e&&l(t)}}}function ie(e){let t,a;return{c(){t=s("p"),a=g("There is more than 10 minutes difference between data updates")},l(e){t=n(e,"P",{});var s=r(t);a=v(s,"There is more than 10 minutes difference between data updates"),s.forEach(l)},m(e,s){c(e,t,s),o(t,a)},p:d,d(e){e&&l(t)}}}function ce(e){let t,a,d,u,p,h=Math.round(e[1]/60/1e3)+"";return{c(){t=s("span"),a=s("i"),d=g(" Data is "),u=g(h),p=g(" minutes old!"),this.h()},l(e){t=n(e,"SPAN",{style:!0});var s=r(t);a=n(s,"I",{class:!0}),r(a).forEach(l),d=v(s," Data is "),u=v(s,h),p=v(s," minutes old!"),s.forEach(l),this.h()},h(){i(a,"class","symbol fas fa-exclamation-circle"),_(t,"color","red")},m(e,s){c(e,t,s),o(t,a),o(t,d),o(t,u),o(t,p)},p(e,t){2&t&&h!==(h=Math.round(e[1]/60/1e3)+"")&&w(u,h)},d(e){e&&l(t)}}}function oe(e){let t,a,u,p,f,_,b,k,$,E,D,y,I=e[4].now.kp+"",j=e[4].now.kp_max+"",O=e[4].now.kp_min+"";return{c(){t=s("h2"),a=g("KP "),u=g(I),p=h(),f=s("p"),_=s("span"),b=g("↑ KP "),k=g(j),$=h(),E=s("span"),D=g("↓ KP "),y=g(O),this.h()},l(e){t=n(e,"H2",{class:!0});var s=r(t);a=v(s,"KP "),u=v(s,I),s.forEach(l),p=m(e),f=n(e,"P",{});var i=r(f);_=n(i,"SPAN",{classname:!0});var c=r(_);b=v(c,"↑ KP "),k=v(c,j),c.forEach(l),$=m(i),E=n(i,"SPAN",{classname:!0});var o=r(E);D=v(o,"↓ KP "),y=v(o,O),o.forEach(l),i.forEach(l),this.h()},h(){i(t,"class","svelte-9kdo4s"),i(_,"classname","pr-2"),i(E,"classname","pl-2")},m(e,s){c(e,t,s),o(t,a),o(t,u),c(e,p,s),c(e,f,s),o(f,_),o(_,b),o(_,k),o(f,$),o(f,E),o(E,D),o(E,y)},p(e,t){16&t&&I!==(I=e[4].now.kp+"")&&w(u,I),16&t&&j!==(j=e[4].now.kp_max+"")&&w(k,j),16&t&&O!==(O=e[4].now.kp_min+"")&&w(y,O)},i:d,o:d,d(e){e&&l(t),e&&l(p),e&&l(f)}}}function de(e){let t,a;return t=new J({}),{c(){y(t.$$.fragment)},l(e){I(t.$$.fragment,e)},m(e,s){j(t,e,s),a=!0},p:d,i(e){a||(E(t.$$.fragment,e),a=!0)},o(e){k(t.$$.fragment,e),a=!1},d(e){O(t,e)}}}function ue(e){let t,a,d,u,p,_,b,k,$,E,D,y,I,j,O,V=e[4].now.bz+"",T=e[4].now.bt+"",M=e[3].available&&pe(e);return{c(){t=s("div"),a=s("p"),d=g("BZ"),u=h(),p=s("p"),_=g(V),b=h(),k=s("div"),$=s("p"),E=g("BT"),D=h(),y=s("p"),I=g(T),j=h(),M&&M.c(),O=f(),this.h()},l(e){t=n(e,"DIV",{});var s=r(t);a=n(s,"P",{class:!0});var i=r(a);d=v(i,"BZ"),i.forEach(l),u=m(s),p=n(s,"P",{class:!0});var c=r(p);_=v(c,V),c.forEach(l),s.forEach(l),b=m(e),k=n(e,"DIV",{});var o=r(k);$=n(o,"P",{class:!0});var h=r($);E=v(h,"BT"),h.forEach(l),D=m(o),y=n(o,"P",{class:!0});var g=r(y);I=v(g,T),g.forEach(l),o.forEach(l),j=m(e),M&&M.l(e),O=f(),this.h()},h(){i(a,"class","svelte-9kdo4s"),i(p,"class","svelte-9kdo4s"),i($,"class","svelte-9kdo4s"),i(y,"class","svelte-9kdo4s")},m(e,s){c(e,t,s),o(t,a),o(a,d),o(t,u),o(t,p),o(p,_),c(e,b,s),c(e,k,s),o(k,$),o($,E),o(k,D),o(k,y),o(y,I),c(e,j,s),M&&M.m(e,s),c(e,O,s)},p(e,t){16&t&&V!==(V=e[4].now.bz+"")&&w(_,V),16&t&&T!==(T=e[4].now.bt+"")&&w(I,T),e[3].available?M?M.p(e,t):(M=pe(e),M.c(),M.m(O.parentNode,O)):M&&(M.d(1),M=null)},d(e){e&&l(t),e&&l(b),e&&l(k),e&&l(j),M&&M.d(e),e&&l(O)}}}function pe(e){let t,a,d,u,p,f,_,b,k,$,E,D,y,I,j,O=e[3].now.temp+"",V=e[3].now.clouds+"";return{c(){t=s("div"),a=s("p"),d=g("Temp"),u=h(),p=s("p"),f=g(O),_=g("°C"),b=h(),k=s("div"),$=s("p"),E=g("Clouds"),D=h(),y=s("p"),I=g(V),j=g("%"),this.h()},l(e){t=n(e,"DIV",{});var s=r(t);a=n(s,"P",{class:!0});var i=r(a);d=v(i,"Temp"),i.forEach(l),u=m(s),p=n(s,"P",{class:!0});var c=r(p);f=v(c,O),_=v(c,"°C"),c.forEach(l),s.forEach(l),b=m(e),k=n(e,"DIV",{});var o=r(k);$=n(o,"P",{class:!0});var h=r($);E=v(h,"Clouds"),h.forEach(l),D=m(o),y=n(o,"P",{class:!0});var g=r(y);I=v(g,V),j=v(g,"%"),g.forEach(l),o.forEach(l),this.h()},h(){i(a,"class","svelte-9kdo4s"),i(p,"class","svelte-9kdo4s"),i($,"class","svelte-9kdo4s"),i(y,"class","svelte-9kdo4s")},m(e,s){c(e,t,s),o(t,a),o(a,d),o(t,u),o(t,p),o(p,f),o(p,_),c(e,b,s),c(e,k,s),o(k,$),o($,E),o(k,D),o(k,y),o(y,I),o(y,j)},p(e,t){8&t&&O!==(O=e[3].now.temp+"")&&w(f,O),8&t&&V!==(V=e[3].now.clouds+"")&&w(I,V)},d(e){e&&l(t),e&&l(b),e&&l(k)}}}function he(e){let t,a,d,u,p,f,g,v,_,w,D,y,I=!e[2].updating&&e[2].available&&!e[3].updating&&!e[4].updating&&ae(e),j=!e[3].updating&&!e[4].updating&&re(e);const O=[de,oe],V=[];function T(e,t){return e[4].updating||e[3].updating?0:1}v=T(e),_=V[v]=O[v](e);let M=!e[4].updating&&!e[3].updating&&ue(e);return{c(){t=s("div"),a=s("div"),d=s("div"),I&&I.c(),u=h(),p=s("div"),j&&j.c(),f=h(),g=s("div"),_.c(),w=h(),D=s("div"),M&&M.c(),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);a=n(s,"DIV",{class:!0});var i=r(a);d=n(i,"DIV",{class:!0});var c=r(d);I&&I.l(c),c.forEach(l),u=m(i),p=n(i,"DIV",{class:!0});var o=r(p);j&&j.l(o),o.forEach(l),f=m(i),g=n(i,"DIV",{class:!0});var h=r(g);_.l(h),h.forEach(l),w=m(i),D=n(i,"DIV",{class:!0});var v=r(D);M&&M.l(v),v.forEach(l),i.forEach(l),s.forEach(l),this.h()},h(){i(d,"class","weatherCurrent-data-location svelte-9kdo4s"),i(p,"class","weatherCurrent-data-date"),i(g,"class","weatherCurrent-data-kp svelte-9kdo4s"),i(D,"class","current-details svelte-9kdo4s"),i(a,"class","weatherCurrent-data svelte-9kdo4s"),i(t,"class","weatherCurrent-wrapper svelte-9kdo4s")},m(e,s){c(e,t,s),o(t,a),o(a,d),I&&I.m(d,null),o(a,u),o(a,p),j&&j.m(p,null),o(a,f),o(a,g),V[v].m(g,null),o(a,w),o(a,D),M&&M.m(D,null),y=!0},p(e,[t]){e[2].updating||!e[2].available||e[3].updating||e[4].updating?I&&(I.d(1),I=null):I?I.p(e,t):(I=ae(e),I.c(),I.m(d,null)),e[3].updating||e[4].updating?j&&(j.d(1),j=null):j?j.p(e,t):(j=re(e),j.c(),j.m(p,null));let a=v;v=T(e),v===a?V[v].p(e,t):(b(),k(V[a],1,1,(()=>{V[a]=null})),$(),_=V[v],_?_.p(e,t):(_=V[v]=O[v](e),_.c()),E(_,1),_.m(g,null)),e[4].updating||e[3].updating?M&&(M.d(1),M=null):M?M.p(e,t):(M=ue(e),M.c(),M.m(D,null))},i(e){y||(E(_),y=!0)},o(e){k(_),y=!1},d(e){e&&l(t),I&&I.d(),j&&j.d(),V[v].d(),M&&M.d()}}}function fe(e,t,a){let s,n,r;D(e,G,(e=>a(2,s=e))),D(e,R,(e=>a(3,n=e))),D(e,Q,(e=>a(4,r=e)));let l=new Date(0,0,0),i=0;return setInterval((function(){let e=p(R).updated,t=p(Q).updated,s=new Date;s-t>s-e?(a(0,l=t),a(1,i=s-t)):(a(0,l=e),a(1,i=s-e))}),500),[l,i,s,n,r]}Y(),G.subscribe((async function(e=null){if("undefined"==typeof window)return;if(null===e)return;if(e.updating)return;if(!e.available)return R.update((e=>Object.assign(Object.assign({},e),{available:!1}))),void te(R,!1);if(p(R).available&&Date.now()-p(R).updated<3e5)return;te(R,!0);let t=await fetch(`https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=${e.latitude}&lon=${e.longitude}`),a=await t.json(),s={clouds:null,temp:null};try{s.clouds=a.properties.timeseries[0].data.instant.details.cloud_area_fraction,s.temp=a.properties.timeseries[0].data.instant.details.air_temperature,a.properties.timeseries=a.properties.timeseries.map((e=>Object.assign(Object.assign({},e),{time:H(e.time)})))}catch(e){return void te(R,!1,!1)}R.update((e=>Object.assign(Object.assign({},e),{yr_data_raw:a,now:s,available:!0}))),te(R,!1)})),ee(),setInterval(Y,15e4),setInterval(ee,15e4),G.subscribe((e=>U("navigator_location",e))),R.subscribe((e=>U("earth_weather",e))),Q.subscribe((e=>U("space_weather",e)));class me extends e{constructor(e){super(),t(this,e,fe,he,a,{})}}function ge(e){let t,a;const o=e[1].default,d=V(o,e,e[0],null);return{c(){t=s("div"),d&&d.c(),this.h()},l(e){t=n(e,"DIV",{class:!0});var a=r(t);d&&d.l(a),a.forEach(l),this.h()},h(){i(t,"class","chip svelte-1jb0ny7")},m(e,s){c(e,t,s),d&&d.m(t,null),a=!0},p(e,[t]){d&&d.p&&(!a||1&t)&&T(d,o,e,e[0],a?q(o,e[0],t,null):M(e[0]),null)},i(e){a||(E(d,e),a=!0)},o(e){k(d,e),a=!1},d(e){e&&l(t),d&&d.d(e)}}}function ve(e,t,a){let{$$slots:s={},$$scope:n}=t;return e.$$set=e=>{"$$scope"in e&&a(0,n=e.$$scope)},[n,s]}class _e extends e{constructor(e){super(),t(this,e,ve,ge,a,{})}}function we(e){let t,a,u,p,f,b;return{c(){t=s("div"),a=s("div"),u=s("div"),p=h(),f=s("span"),b=g(e[1]),this.h()},l(s){t=n(s,"DIV",{class:!0,style:!0});var i=r(t);a=n(i,"DIV",{class:!0});var c=r(a);u=n(c,"DIV",{class:!0}),r(u).forEach(l),c.forEach(l),p=m(i),f=n(i,"SPAN",{class:!0});var o=r(f);b=v(o,e[1]),o.forEach(l),i.forEach(l),this.h()},h(){i(u,"class","bar svelte-1mo8cjf"),i(a,"class","bar-wrapper svelte-1mo8cjf"),i(f,"class","value svelte-1mo8cjf"),i(t,"class","wrapper svelte-1mo8cjf"),_(t,"--progress",100*e[0]+"%")},m(e,s){c(e,t,s),o(t,a),o(a,u),o(t,p),o(t,f),o(f,b)},p(e,[a]){2&a&&w(b,e[1]),1&a&&_(t,"--progress",100*e[0]+"%")},i:d,o:d,d(e){e&&l(t)}}}function be(e,t,a){let{percentage:s}=t,{value:n}=t;return e.$$set=e=>{"percentage"in e&&a(0,s=e.percentage),"value"in e&&a(1,n=e.value)},[s,n]}class ke extends e{constructor(e){super(),t(this,e,be,we,a,{percentage:0,value:1})}}function $e(e){let t,a,u,p,f,_,w,b,$,D,V,T,M;D=new ke({props:{percentage:e[0]/9,value:e[0]}});let q=e[5]&&function(e){let t,a,u,p,f,_,w,b,k,$,E,D,y=Math.round(e[3])+"",I=Math.round(e[4])+"";return{c(){t=s("div"),a=s("p"),u=s("i"),p=h(),f=g(y),_=g("°C"),w=h(),b=s("p"),k=s("i"),$=h(),E=g(I),D=g("%"),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);a=n(s,"P",{class:!0});var i=r(a);u=n(i,"I",{class:!0}),r(u).forEach(l),p=m(i),f=v(i,y),_=v(i,"°C"),i.forEach(l),w=m(s),b=n(s,"P",{class:!0});var c=r(b);k=n(c,"I",{class:!0}),r(k).forEach(l),$=m(c),E=v(c,I),D=v(c,"%"),c.forEach(l),s.forEach(l),this.h()},h(){i(u,"class","fas fa-thermometer-half svelte-m9qkku"),i(a,"class","svelte-m9qkku"),i(k,"class","fas fa-cloud svelte-m9qkku"),i(b,"class","svelte-m9qkku"),i(t,"class","svelte-m9qkku")},m(e,s){c(e,t,s),o(t,a),o(a,u),o(a,p),o(a,f),o(a,_),o(t,w),o(t,b),o(b,k),o(b,$),o(b,E),o(b,D)},p:d,d(e){e&&l(t)}}}(e);return{c(){t=s("div"),a=s("div"),u=s("h3"),p=g(e[2]),f=h(),_=s("p"),w=g(e[1]),b=h(),$=s("div"),y(D.$$.fragment),V=h(),T=s("div"),q&&q.c(),this.h()},l(s){t=n(s,"DIV",{class:!0});var i=r(t);a=n(i,"DIV",{class:!0});var c=r(a);u=n(c,"H3",{class:!0});var o=r(u);p=v(o,e[2]),o.forEach(l),f=m(c),_=n(c,"P",{class:!0});var d=r(_);w=v(d,e[1]),d.forEach(l),c.forEach(l),b=m(i),$=n(i,"DIV",{class:!0});var h=r($);I(D.$$.fragment,h),h.forEach(l),V=m(i),T=n(i,"DIV",{class:!0});var g=r(T);q&&q.l(g),g.forEach(l),i.forEach(l),this.h()},h(){i(u,"class","svelte-m9qkku"),i(_,"class","svelte-m9qkku"),i(a,"class","svelte-m9qkku"),i($,"class","KP svelte-m9qkku"),i(T,"class","data svelte-m9qkku"),i(t,"class","prediction-details svelte-m9qkku")},m(e,s){c(e,t,s),o(t,a),o(a,u),o(u,p),o(a,f),o(a,_),o(_,w),o(t,b),o(t,$),j(D,$,null),o(t,V),o(t,T),q&&q.m(T,null),M=!0},p(e,[t]){e[5]&&q.p(e,t)},i(e){M||(E(D.$$.fragment,e),M=!0)},o(e){k(D.$$.fragment,e),M=!1},d(e){e&&l(t),O(D),q&&q.d()}}}function Ee(e,t=2){let a=e;for(let s=0;s<t-e.length;s++)a="0"+a;return a}function De(e,t,a){let{prediction:s}=t;let n=s.kp,r=s.time.getDate()+". "+["January","February","March","April","May","June","July","August","September","October","November","December"][s.time.getMonth()],l=Ee(s.time.getHours().toString())+":"+Ee(s.time.getMinutes().toString()),i=s.temp,c=s.clouds,o=s.hasNOMETData;return e.$$set=e=>{"prediction"in e&&a(6,s=e.prediction)},[n,r,l,i,c,o,s]}class ye extends e{constructor(e){super(),t(this,e,De,$e,a,{prediction:6})}}function Ie(e,t,a){const s=e.slice();return s[5]=t[a],s[7]=a,s}function je(e){let t,a;return t=new ye({props:{prediction:e[5]}}),{c(){y(t.$$.fragment)},l(e){I(t.$$.fragment,e)},m(e,s){j(t,e,s),a=!0},p(e,a){const s={};1&a&&(s.prediction=e[5]),t.$set(s)},i(e){a||(E(t.$$.fragment,e),a=!0)},o(e){k(t.$$.fragment,e),a=!1},d(e){O(t,e)}}}function Oe(e){let t,a,o=e[0],d=[];for(let t=0;t<o.length;t+=1)d[t]=je(Ie(e,o,t));const u=e=>k(d[e],1,1,(()=>{d[e]=null}));return{c(){t=s("div");for(let e=0;e<d.length;e+=1)d[e].c();this.h()},l(e){t=n(e,"DIV",{class:!0});var a=r(t);for(let e=0;e<d.length;e+=1)d[e].l(a);a.forEach(l),this.h()},h(){i(t,"class","prediction-table svelte-1uc0m3l")},m(e,s){c(e,t,s);for(let e=0;e<d.length;e+=1)d[e].m(t,null);a=!0},p(e,[a]){if(1&a){let s;for(o=e[0],s=0;s<o.length;s+=1){const n=Ie(e,o,s);d[s]?(d[s].p(n,a),E(d[s],1)):(d[s]=je(n),d[s].c(),E(d[s],1),d[s].m(t,null))}for(b(),s=o.length;s<d.length;s+=1)u(s);$()}},i(e){if(!a){for(let e=0;e<o.length;e+=1)E(d[e]);a=!0}},o(e){d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)k(d[e]);a=!1},d(e){e&&l(t),x(d,e)}}}function Ve(e,t,a){let s,n,r;async function l(){if(n.updating||s.updating)return void a(0,r=null);let e=n.usnoaa_data_raw.geospace_pred_est_kp_1_hour.filter((e=>e.model_prediction_time>=new Date));a(0,r=e.map((e=>({time:e.model_prediction_time,kp:Math.round(e.k),temp:null,clouds:null,hasNOMETData:s.available})))),s.available&&r.forEach(((e,t)=>{let n,l,i=new Date(0,0,0),c=!0;s.yr_data_raw.properties.timeseries.forEach(((t,a)=>{let s=new Date(t.time);if(Math.abs(s.getTime()-e.time.getTime())<Math.abs(i.getTime()-e.time.getTime())){if(Math.abs(s.getTime()-e.time.getTime())>18e6)return void(c=!1);i=s,n=t.data.instant.details.air_temperature,l=t.data.instant.details.cloud_area_fraction}})),a(0,r[t]=Object.assign(Object.assign({},r[t]),{temp:n,clouds:l,hasNOMETData:c}),r)}))}return D(e,R,(e=>a(1,s=e))),D(e,Q,(e=>a(2,n=e))),Q.subscribe(l),R.subscribe(l),[r]}class Te extends e{constructor(e){super(),t(this,e,Ve,Oe,a,{})}}function Me(e){let t,a,o;return a=new _e({props:{$$slots:{default:[qe]},$$scope:{ctx:e}}}),{c(){t=s("div"),y(a.$$.fragment),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);I(a.$$.fragment,s),s.forEach(l),this.h()},h(){i(t,"class","svelte-m9qkku")},m(e,s){c(e,t,s),j(a,t,null),o=!0},p(e,t){const s={};257&t&&(s.$$scope={dirty:t,ctx:e}),a.$set(s)},i(e){o||(E(a.$$.fragment,e),o=!0)},o(e){k(a.$$.fragment,e),o=!1},d(e){e&&l(t),O(a)}}}function qe(e){let t,a=e[0].observed+"";return{c(){t=g(a)},l(e){t=v(e,a)},m(e,a){c(e,t,a)},p(e,s){1&s&&a!==(a=e[0].observed+"")&&w(t,a)},d(e){e&&l(t)}}}function xe(e){let t,a,u,p,f,_,w,D,V,T,M,q,x,P,S="predicted"!=e[0].observed&&Me(e);M=new ke({props:{percentage:e[1]/9,value:e[1]}});let N=e[6]&&function(e){let t,a,u,p,f,_,w,b,k,$,E,D,y=Math.round(e[4])+"",I=Math.round(e[5])+"";return{c(){t=s("div"),a=s("p"),u=s("i"),p=h(),f=g(y),_=g("°C"),w=h(),b=s("p"),k=s("i"),$=h(),E=g(I),D=g("%"),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);a=n(s,"P",{class:!0});var i=r(a);u=n(i,"I",{class:!0}),r(u).forEach(l),p=m(i),f=v(i,y),_=v(i,"°C"),i.forEach(l),w=m(s),b=n(s,"P",{class:!0});var c=r(b);k=n(c,"I",{class:!0}),r(k).forEach(l),$=m(c),E=v(c,I),D=v(c,"%"),c.forEach(l),s.forEach(l),this.h()},h(){i(u,"class","fas fa-thermometer-half svelte-m9qkku"),i(a,"class","svelte-m9qkku"),i(k,"class","fas fa-cloud svelte-m9qkku"),i(b,"class","svelte-m9qkku"),i(t,"class","svelte-m9qkku")},m(e,s){c(e,t,s),o(t,a),o(a,u),o(a,p),o(a,f),o(a,_),o(t,w),o(t,b),o(b,k),o(b,$),o(b,E),o(b,D)},p:d,d(e){e&&l(t)}}}(e);return{c(){t=s("div"),a=s("div"),u=s("h3"),p=g(e[3]),f=h(),_=s("p"),w=g(e[2]),D=h(),S&&S.c(),V=h(),T=s("div"),y(M.$$.fragment),q=h(),x=s("div"),N&&N.c(),this.h()},l(s){t=n(s,"DIV",{class:!0});var i=r(t);a=n(i,"DIV",{class:!0});var c=r(a);u=n(c,"H3",{class:!0});var o=r(u);p=v(o,e[3]),o.forEach(l),f=m(c),_=n(c,"P",{class:!0});var d=r(_);w=v(d,e[2]),d.forEach(l),c.forEach(l),D=m(i),S&&S.l(i),V=m(i),T=n(i,"DIV",{class:!0});var h=r(T);I(M.$$.fragment,h),h.forEach(l),q=m(i),x=n(i,"DIV",{class:!0});var g=r(x);N&&N.l(g),g.forEach(l),i.forEach(l),this.h()},h(){i(u,"class","svelte-m9qkku"),i(_,"class","svelte-m9qkku"),i(a,"class","svelte-m9qkku"),i(T,"class","KP svelte-m9qkku"),i(x,"class","data svelte-m9qkku"),i(t,"class","prediction-details svelte-m9qkku")},m(e,s){c(e,t,s),o(t,a),o(a,u),o(u,p),o(a,f),o(a,_),o(_,w),o(t,D),S&&S.m(t,null),o(t,V),o(t,T),j(M,T,null),o(t,q),o(t,x),N&&N.m(x,null),P=!0},p(e,[a]){"predicted"!=e[0].observed?S?(S.p(e,a),1&a&&E(S,1)):(S=Me(e),S.c(),E(S,1),S.m(t,V)):S&&(b(),k(S,1,1,(()=>{S=null})),$()),e[6]&&N.p(e,a)},i(e){P||(E(S),E(M.$$.fragment,e),P=!0)},o(e){k(S),k(M.$$.fragment,e),P=!1},d(e){e&&l(t),S&&S.d(),O(M),N&&N.d()}}}function Pe(e,t=2){let a=e;for(let s=0;s<t-e.length;s++)a="0"+a;return a}function Se(e,t,a){let{prediction:s}=t;let n=s.kp,r=s.time.getDate()+". "+["January","February","March","April","May","June","July","August","September","October","November","December"][s.time.getMonth()],l=Pe(s.time.getHours().toString())+":"+Pe(s.time.getMinutes().toString()),i=s.temp,c=s.clouds,o=s.hasNOMETData;return e.$$set=e=>{"prediction"in e&&a(0,s=e.prediction)},[s,n,r,l,i,c,o]}class Ne extends e{constructor(e){super(),t(this,e,Se,xe,a,{prediction:0})}}function Ae(e,t,a){const s=e.slice();return s[5]=t[a],s[7]=a,s}function Ce(e){let t,a;return t=new Ne({props:{prediction:e[5]}}),{c(){y(t.$$.fragment)},l(e){I(t.$$.fragment,e)},m(e,s){j(t,e,s),a=!0},p(e,a){const s={};1&a&&(s.prediction=e[5]),t.$set(s)},i(e){a||(E(t.$$.fragment,e),a=!0)},o(e){k(t.$$.fragment,e),a=!1},d(e){O(t,e)}}}function Je(e){let t,a,o=e[0],d=[];for(let t=0;t<o.length;t+=1)d[t]=Ce(Ae(e,o,t));const u=e=>k(d[e],1,1,(()=>{d[e]=null}));return{c(){t=s("div");for(let e=0;e<d.length;e+=1)d[e].c();this.h()},l(e){t=n(e,"DIV",{class:!0});var a=r(t);for(let e=0;e<d.length;e+=1)d[e].l(a);a.forEach(l),this.h()},h(){i(t,"class","prediction-table svelte-1uc0m3l")},m(e,s){c(e,t,s);for(let e=0;e<d.length;e+=1)d[e].m(t,null);a=!0},p(e,[a]){if(1&a){let s;for(o=e[0],s=0;s<o.length;s+=1){const n=Ae(e,o,s);d[s]?(d[s].p(n,a),E(d[s],1)):(d[s]=Ce(n),d[s].c(),E(d[s],1),d[s].m(t,null))}for(b(),s=o.length;s<d.length;s+=1)u(s);$()}},i(e){if(!a){for(let e=0;e<o.length;e+=1)E(d[e]);a=!0}},o(e){d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)k(d[e]);a=!1},d(e){e&&l(t),x(d,e)}}}function Be(e,t,a){let s,n,r;async function l(){if(n.updating||s.updating)return void a(0,r=null);let e=n.usnoaa_data_raw.noaa_planetary_k_index_forecast.filter((e=>"observed"!==e.observed));a(0,r=e.map((e=>({time:e.time,kp:e.kp,observed:e.observed,temp:null,clouds:null,hasNOMETData:s.available})))),s.available&&r.forEach(((e,t)=>{let n,l,i=new Date(0,0,0);s.yr_data_raw.properties.timeseries.forEach(((t,a)=>{let s=new Date(t.time);Math.abs(s.getTime()-e.time.getTime())<Math.abs(i.getTime()-e.time.getTime())&&(i=s,n=t.data.instant.details.air_temperature,l=t.data.instant.details.cloud_area_fraction)})),a(0,r[t]=Object.assign(Object.assign({},r[t]),{temp:n,clouds:l}),r)}))}return D(e,R,(e=>a(1,s=e))),D(e,Q,(e=>a(2,n=e))),Q.subscribe(l),R.subscribe(l),[r]}class He extends e{constructor(e){super(),t(this,e,Be,Je,a,{})}}function Ke(e){let t,a,d,u,p,f,_,w,b,$;return _=new ke({props:{percentage:e[0]/9,value:e[0]}}),{c(){t=s("div"),a=s("div"),d=s("h3"),u=g(e[1]),p=h(),f=s("div"),y(_.$$.fragment),w=h(),b=s("div"),this.h()},l(s){t=n(s,"DIV",{class:!0});var i=r(t);a=n(i,"DIV",{class:!0});var c=r(a);d=n(c,"H3",{class:!0});var o=r(d);u=v(o,e[1]),o.forEach(l),c.forEach(l),p=m(i),f=n(i,"DIV",{class:!0});var h=r(f);I(_.$$.fragment,h),h.forEach(l),w=m(i),b=n(i,"DIV",{class:!0}),r(b).forEach(l),i.forEach(l),this.h()},h(){i(d,"class","svelte-m9qkku"),i(a,"class","svelte-m9qkku"),i(f,"class","KP svelte-m9qkku"),i(b,"class","data svelte-m9qkku"),i(t,"class","prediction-details svelte-m9qkku")},m(e,s){c(e,t,s),o(t,a),o(a,d),o(d,u),o(t,p),o(t,f),j(_,f,null),o(t,w),o(t,b),$=!0},p(e,[t]){},i(e){$||(E(_.$$.fragment,e),$=!0)},o(e){k(_.$$.fragment,e),$=!1},d(e){e&&l(t),O(_)}}}function ze(e,t=2){let a=e;for(let s=0;s<t-e.length;s++)a="0"+a;return a}function Fe(e,t,a){let{prediction:s}=t;let n=s.kp,r=s.time.getDate()+". "+["January","February","March","April","May","June","July","August","September","October","November","December"][s.time.getMonth()];ze(s.time.getHours().toString()),ze(s.time.getMinutes().toString());let l=s.temp,i=s.clouds;return e.$$set=e=>{"prediction"in e&&a(4,s=e.prediction)},[n,r,l,i,s]}class Ze extends e{constructor(e){super(),t(this,e,Fe,Ke,a,{prediction:4})}}function Le(e,t,a){const s=e.slice();return s[5]=t[a],s[7]=a,s}function Ge(e){let t,a;return t=new Ze({props:{prediction:e[5]}}),{c(){y(t.$$.fragment)},l(e){I(t.$$.fragment,e)},m(e,s){j(t,e,s),a=!0},p(e,a){const s={};1&a&&(s.prediction=e[5]),t.$set(s)},i(e){a||(E(t.$$.fragment,e),a=!0)},o(e){k(t.$$.fragment,e),a=!1},d(e){O(t,e)}}}function Re(e){let t,a,o=e[0],d=[];for(let t=0;t<o.length;t+=1)d[t]=Ge(Le(e,o,t));const u=e=>k(d[e],1,1,(()=>{d[e]=null}));return{c(){t=s("div");for(let e=0;e<d.length;e+=1)d[e].c();this.h()},l(e){t=n(e,"DIV",{class:!0});var a=r(t);for(let e=0;e<d.length;e+=1)d[e].l(a);a.forEach(l),this.h()},h(){i(t,"class","prediction-table svelte-1uc0m3l")},m(e,s){c(e,t,s);for(let e=0;e<d.length;e+=1)d[e].m(t,null);a=!0},p(e,[a]){if(1&a){let s;for(o=e[0],s=0;s<o.length;s+=1){const n=Le(e,o,s);d[s]?(d[s].p(n,a),E(d[s],1)):(d[s]=Ge(n),d[s].c(),E(d[s],1),d[s].m(t,null))}for(b(),s=o.length;s<d.length;s+=1)u(s);$()}},i(e){if(!a){for(let e=0;e<o.length;e+=1)E(d[e]);a=!0}},o(e){d=d.filter(Boolean);for(let e=0;e<d.length;e+=1)k(d[e]);a=!1},d(e){e&&l(t),x(d,e)}}}function Qe(e,t,a){let s,n,r;async function l(){if(n.updating||s.updating)return void a(0,r=null);let e=n.usnoaa_data_raw.outlook_27_day.filter((e=>e.time>=new Date));a(0,r=e.map((e=>({time:e.time,kp:e.kindex,temp:null,clouds:null,hasNOMETData:s.available})))),s.available&&r.forEach(((e,t)=>{let n,l,i=new Date(0,0,0),c=!0;s.yr_data_raw.properties.timeseries.forEach(((t,a)=>{let s=new Date(t.time);if(Math.abs(s.getTime()-e.time.getTime())<Math.abs(i.getTime()-e.time.getTime())){if(Math.abs(s.getTime()-e.time.getTime())>864e5)return void(c=!1);i=s,n=t.data.instant.details.air_temperature,l=t.data.instant.details.cloud_area_fraction}})),a(0,r[t]=Object.assign(Object.assign({},r[t]),{temp:n,clouds:l,hasNOMETData:c}),r)}))}return D(e,R,(e=>a(1,s=e))),D(e,Q,(e=>a(2,n=e))),Q.subscribe(l),R.subscribe(l),[r]}class Ue extends e{constructor(e){super(),t(this,e,Qe,Re,a,{})}}function We(e){let t,a,u,p,f;return{c(){t=s("div"),a=s("i"),u=h(),p=s("p"),f=g("No prediction data"),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);a=n(s,"I",{class:!0}),r(a).forEach(l),u=m(s),p=n(s,"P",{});var i=r(p);f=v(i,"No prediction data"),i.forEach(l),s.forEach(l),this.h()},h(){i(a,"class","fas fa-7x fa-exclamation-triangle"),i(t,"class","no-data svelte-11gsg4a")},m(e,s){c(e,t,s),o(t,a),o(t,u),o(t,p),o(p,f)},p:d,i:d,o:d,d(e){e&&l(t)}}}function Xe(e){let t,a,d,u,p,_,w,D,V,T,M,q,x,A,C,J,B,H,K;var z=e[0];return z&&(C=new z({})),{c(){t=s("div"),a=s("h2"),d=g("Forecast"),u=h(),p=s("div"),_=s("div"),w=g("hour"),D=h(),V=s("div"),T=g("3 day"),M=h(),q=s("div"),x=g("Longterm"),A=h(),C&&y(C.$$.fragment),J=f(),this.h()},l(e){t=n(e,"DIV",{class:!0});var s=r(t);a=n(s,"H2",{class:!0});var i=r(a);d=v(i,"Forecast"),i.forEach(l),u=m(s),p=n(s,"DIV",{class:!0});var c=r(p);_=n(c,"DIV",{class:!0});var o=r(_);w=v(o,"hour"),o.forEach(l),D=m(c),V=n(c,"DIV",{class:!0});var h=r(V);T=v(h,"3 day"),h.forEach(l),M=m(c),q=n(c,"DIV",{class:!0});var g=r(q);x=v(g,"Longterm"),g.forEach(l),c.forEach(l),s.forEach(l),A=m(e),C&&I(C.$$.fragment,e),J=f(),this.h()},h(){i(a,"class","svelte-11gsg4a"),i(_,"class","svelte-11gsg4a"),P(_,"selected",e[0]==Te),i(V,"class","svelte-11gsg4a"),P(V,"selected",e[0]==He),i(q,"class","svelte-11gsg4a"),P(q,"selected",e[0]==Ue),i(p,"class","version-picker svelte-11gsg4a"),i(t,"class","header svelte-11gsg4a")},m(s,n){c(s,t,n),o(t,a),o(a,d),o(t,u),o(t,p),o(p,_),o(_,w),o(p,D),o(p,V),o(V,T),o(p,M),o(p,q),o(q,x),c(s,A,n),C&&j(C,s,n),c(s,J,n),B=!0,H||(K=[S(_,"click",e[3]),S(V,"click",e[4]),S(q,"click",e[5])],H=!0)},p(e,t){if(1&t&&P(_,"selected",e[0]==Te),1&t&&P(V,"selected",e[0]==He),1&t&&P(q,"selected",e[0]==Ue),z!==(z=e[0])){if(C){b();const e=C;k(e.$$.fragment,1,0,(()=>{O(e,1)})),$()}z?(C=new z({}),y(C.$$.fragment),E(C.$$.fragment,1),j(C,J.parentNode,J)):C=null}},i(e){B||(C&&E(C.$$.fragment,e),B=!0)},o(e){C&&k(C.$$.fragment,e),B=!1},d(e){e&&l(t),e&&l(A),e&&l(J),C&&O(C,e),H=!1,N(K)}}}function Ye(e){let t,a,o,d;const u=[Xe,We],p=[];function h(e,t){return e[1].updating||e[2].updating?1:0}return a=h(e),o=p[a]=u[a](e),{c(){t=s("div"),o.c(),this.h()},l(e){t=n(e,"DIV",{class:!0});var a=r(t);o.l(a),a.forEach(l),this.h()},h(){i(t,"class","drawer svelte-11gsg4a")},m(e,s){c(e,t,s),p[a].m(t,null),d=!0},p(e,[s]){let n=a;a=h(e),a===n?p[a].p(e,s):(b(),k(p[n],1,1,(()=>{p[n]=null})),$(),o=p[a],o?o.p(e,s):(o=p[a]=u[a](e),o.c()),E(o,1),o.m(t,null))},i(e){d||(E(o),d=!0)},o(e){k(o),d=!1},d(e){e&&l(t),p[a].d()}}}function et(e,t,a){let s,n;D(e,R,(e=>a(1,s=e))),D(e,Q,(e=>a(2,n=e)));let r=He;return[r,s,n,()=>a(0,r=Te),()=>a(0,r=He),()=>a(0,r=Ue)]}class tt extends e{constructor(e){super(),t(this,e,et,Ye,a,{})}}function at(e){let t,a,u,p,f,g;return u=new me({}),f=new tt({}),{c(){t=h(),a=s("div"),y(u.$$.fragment),p=h(),y(f.$$.fragment),this.h()},l(e){A('[data-svelte="svelte-1q3846k"]',document.head).forEach(l),t=m(e),a=n(e,"DIV",{class:!0});var s=r(a);I(u.$$.fragment,s),p=m(s),I(f.$$.fragment,s),s.forEach(l),this.h()},h(){document.title="Aurora data",i(a,"class","homescreen svelte-pf4p6y")},m(e,s){c(e,t,s),c(e,a,s),j(u,a,null),o(a,p),j(f,a,null),g=!0},p:d,i(e){g||(E(u.$$.fragment,e),E(f.$$.fragment,e),g=!0)},o(e){k(u.$$.fragment,e),k(f.$$.fragment,e),g=!1},d(e){e&&l(t),e&&l(a),O(u),O(f)}}}class st extends e{constructor(e){super(),t(this,e,null,at,a,{})}}export{st as default};