diff options
Diffstat (limited to 'client/legacy/index.d028e5b4.js')
-rw-r--r-- | client/legacy/index.d028e5b4.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/legacy/index.d028e5b4.js b/client/legacy/index.d028e5b4.js new file mode 100644 index 0000000..9ea9dcb --- /dev/null +++ b/client/legacy/index.d028e5b4.js @@ -0,0 +1 @@ +import{_ as t,a as n,b as e,c as r,i as a,s as c,d as o,S as s,e as i,f as u,t as f,g as l,h,j as v,k as p,l as d,m,n as y,o as g,p as E,q as w,r as x,u as D,v as P,w as b,x as $,y as I,z as R,A as V,B as z,C as A,D as C,E as N,F as j,G as S}from"./client.b8e806fc.js";function k(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var a,c=n(t);if(r){var o=n(this).constructor;a=Reflect.construct(c,arguments,o)}else a=c.apply(this,arguments);return e(this,a)}}function M(t){var n,e,r,a,c,o,s,D,P,b,$,I,R,V,z,A,C,N,j,S,k,M,T,H,J,K,B,O,q,F,Z,G,L,Q,U,W,X,Y,tt,nt,et,rt,at,ct,ot,st,it,ut;return{c:function(){n=i("div"),e=i("div"),r=i("div"),a=i("i"),c=u(),o=i("h1"),s=f(_),D=u(),P=i("div"),b=i("p"),$=f(t[0]),I=u(),R=i("div"),V=i("h2"),z=f("KP "),A=f(t[1]),C=u(),N=i("p"),j=i("span"),S=f("↑ KP "),k=f(t[3]),M=u(),T=i("span"),H=f("↓ KP "),J=f(t[2]),K=u(),B=i("div"),O=i("div"),q=i("p"),F=f("BZ"),Z=u(),G=i("p"),L=f(t[4]),Q=u(),U=i("div"),W=i("p"),X=f("Probability"),Y=u(),tt=i("p"),nt=f("10%"),et=u(),rt=i("div"),at=i("p"),ct=f("Clouds"),ot=u(),st=i("p"),it=f(t[5]),ut=f("%"),this.h()},l:function(i){n=l(i,"DIV",{class:!0});var u=h(n);e=l(u,"DIV",{class:!0});var f=h(e);r=l(f,"DIV",{class:!0});var m=h(r);a=l(m,"I",{class:!0}),h(a).forEach(v),c=p(m),o=l(m,"H1",{class:!0});var y=h(o);s=d(y,_),y.forEach(v),m.forEach(v),D=p(f),P=l(f,"DIV",{class:!0});var g=h(P);b=l(g,"P",{});var E=h(b);$=d(E,t[0]),E.forEach(v),g.forEach(v),I=p(f),R=l(f,"DIV",{class:!0});var w=h(R);V=l(w,"H2",{class:!0});var x=h(V);z=d(x,"KP "),A=d(x,t[1]),x.forEach(v),C=p(w),N=l(w,"P",{});var ft=h(N);j=l(ft,"SPAN",{className:!0});var lt=h(j);S=d(lt,"↑ KP "),k=d(lt,t[3]),lt.forEach(v),M=p(ft),T=l(ft,"SPAN",{className:!0});var ht=h(T);H=d(ht,"↓ KP "),J=d(ht,t[2]),ht.forEach(v),ft.forEach(v),w.forEach(v),K=p(f),B=l(f,"DIV",{class:!0});var vt=h(B);O=l(vt,"DIV",{});var pt=h(O);q=l(pt,"P",{class:!0});var dt=h(q);F=d(dt,"BZ"),dt.forEach(v),Z=p(pt),G=l(pt,"P",{class:!0});var mt=h(G);L=d(mt,t[4]),mt.forEach(v),pt.forEach(v),Q=p(vt),U=l(vt,"DIV",{});var yt=h(U);W=l(yt,"P",{class:!0});var gt=h(W);X=d(gt,"Probability"),gt.forEach(v),Y=p(yt),tt=l(yt,"P",{class:!0});var Et=h(tt);nt=d(Et,"10%"),Et.forEach(v),yt.forEach(v),et=p(vt),rt=l(vt,"DIV",{});var wt=h(rt);at=l(wt,"P",{class:!0});var xt=h(at);ct=d(xt,"Clouds"),xt.forEach(v),ot=p(wt),st=l(wt,"P",{class:!0});var Dt=h(st);it=d(Dt,t[5]),ut=d(Dt,"%"),Dt.forEach(v),wt.forEach(v),vt.forEach(v),f.forEach(v),u.forEach(v),this.h()},h:function(){m(a,"class","symbol fas fa-map-marker-alt svelte-1y77zx4"),m(o,"class","svelte-1y77zx4"),m(r,"class","weatherCurrent-data-location svelte-1y77zx4"),m(P,"class","weatherCurrent-data-date"),m(V,"class","svelte-1y77zx4"),m(j,"classname","pr-2"),m(T,"classname","pl-2"),m(R,"class","weatherCurrent-data-kp svelte-1y77zx4"),m(q,"class","svelte-1y77zx4"),m(G,"class","svelte-1y77zx4"),m(W,"class","svelte-1y77zx4"),m(tt,"class","svelte-1y77zx4"),m(at,"class","svelte-1y77zx4"),m(st,"class","svelte-1y77zx4"),m(B,"class","current-details svelte-1y77zx4"),m(e,"class","weatherCurrent-data svelte-1y77zx4"),m(n,"class","weatherCurrent-wrapper svelte-1y77zx4")},m:function(t,i){y(t,n,i),g(n,e),g(e,r),g(r,a),g(r,c),g(r,o),g(o,s),g(e,D),g(e,P),g(P,b),g(b,$),g(e,I),g(e,R),g(R,V),g(V,z),g(V,A),g(R,C),g(R,N),g(N,j),g(j,S),g(j,k),g(N,M),g(N,T),g(T,H),g(T,J),g(e,K),g(e,B),g(B,O),g(O,q),g(q,F),g(O,Z),g(O,G),g(G,L),g(B,Q),g(B,U),g(U,W),g(W,X),g(U,Y),g(U,tt),g(tt,nt),g(B,et),g(B,rt),g(rt,at),g(at,ct),g(rt,ot),g(rt,st),g(st,it),g(st,ut)},p:function(t,n){var e=E(n,1)[0];1&e&&w($,t[0]),2&e&&w(A,t[1]),8&e&&w(k,t[3]),4&e&&w(J,t[2]),16&e&&w(L,t[4]),32&e&&w(it,t[5])},i:x,o:x,d:function(t){t&&v(n)}}}var _="The earth";function T(t,n,e){var r,a,c=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(a,c){function o(t){try{i(r.next(t))}catch(t){c(t)}}function s(t){try{i(r.throw(t))}catch(t){c(t)}}function i(t){var n;t.done?a(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,s)}i((r=r.apply(t,n||[])).next())}))},o=["January","February","March","April","May","June","July","August","September","October","November","December"],s=(Array(),"-"),i="-",u="-",f="-",l="-",h="-";function v(t){r=t.coords.longitude,a=t.coords.latitude,function(t,n){c(this,void 0,void 0,P.mark((function r(){var a,c,v,p,d,m;return P.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch("https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=".concat(n,"&lon=").concat(t)).then((function(t){return t.json()}));case 2:return a=r.sent,e(5,h=a.properties.timeseries[0].data.instant.details.cloud_area_fraction),r.t0=e,r.next=7,fetch("https://services.swpc.noaa.gov/products/summary/solar-wind-mag-field.json").then((function(t){return t.json()}));case 7:return r.t1=l=r.sent.Bz,(0,r.t0)(4,r.t1),r.next=11,fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json").then((function(t){return t.json()}));case 11:(c=r.sent).shift(),v=new Date,p=new Date(0,0,0),d=1e3,m=0,c.forEach((function(t,n){t[1]>m&&(m=t[1]),t[1]<d&&(d=t[1]);var r=new Date(t[0]);Math.abs(r.getTime()-v.getTime())<Math.abs(p.getTime()-v.getTime())&&(p=r,e(1,i=t[1]))})),e(2,u=d.toString()),e(3,f=m.toString()),e(0,s=v.getDay()+". "+o[v.getMonth()]+" "+v.getHours()+":"+v.getMinutes());case 21:case"end":return r.stop()}}),r)})))}(r,a)}function p(t){d()}function d(){r=28.283333,a=-15.416667}return D((function(){navigator.geolocation?navigator.geolocation.getCurrentPosition(v,p):d()})),[s,i,u,f,l,h]}var H=function(n){t(i,s);var e=k(i);function i(t){var n;return r(this,i),n=e.call(this),a(o(n),t,T,M,c,{}),n}return i}();function J(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var a,c=n(t);if(r){var o=n(this).constructor;a=Reflect.construct(c,arguments,o)}else a=c.apply(this,arguments);return e(this,a)}}function K(t){var n,e,r,a,c,o,s,E,w,D,P,b,$,I,R,V,z,A,C,N,j,S,k,M;return{c:function(){n=i("div"),e=i("div"),r=i("h3"),a=f(t[2]),c=u(),o=i("p"),s=f(t[1]),E=u(),w=i("div"),D=i("h2"),P=f(t[0]),b=u(),$=i("div"),I=i("p"),R=i("i"),V=u(),z=f(t[3]),A=f("°C"),C=u(),N=i("p"),j=i("i"),S=u(),k=f(t[4]),M=f("%"),this.h()},l:function(i){n=l(i,"DIV",{class:!0});var u=h(n);e=l(u,"DIV",{});var f=h(e);r=l(f,"H3",{class:!0});var m=h(r);a=d(m,t[2]),m.forEach(v),c=p(f),o=l(f,"P",{});var y=h(o);s=d(y,t[1]),y.forEach(v),f.forEach(v),E=p(u),w=l(u,"DIV",{class:!0});var g=h(w);D=l(g,"H2",{class:!0});var x=h(D);P=d(x,t[0]),x.forEach(v),b=p(g),$=l(g,"DIV",{});var _=h($);I=l(_,"P",{});var T=h(I);R=l(T,"I",{class:!0}),h(R).forEach(v),V=p(T),z=d(T,t[3]),A=d(T,"°C"),T.forEach(v),C=p(_),N=l(_,"P",{});var H=h(N);j=l(H,"I",{class:!0}),h(j).forEach(v),S=p(H),k=d(H,t[4]),M=d(H,"%"),H.forEach(v),_.forEach(v),g.forEach(v),u.forEach(v),this.h()},h:function(){m(r,"class","svelte-u548p6"),m(D,"class","svelte-u548p6"),m(R,"class","fas fa-thermometer-half"),m(j,"class","fas fa-cloud"),m(w,"class","data svelte-u548p6"),m(n,"class","prediction-details svelte-u548p6")},m:function(t,i){y(t,n,i),g(n,e),g(e,r),g(r,a),g(e,c),g(e,o),g(o,s),g(n,E),g(n,w),g(w,D),g(D,P),g(w,b),g(w,$),g($,I),g(I,R),g(I,V),g(I,z),g(I,A),g($,C),g($,N),g(N,j),g(N,S),g(N,k),g(N,M)},p:x,i:x,o:x,d:function(t){t&&v(n)}}}function B(t,n,e){var r=n.prediction,a=r.kp,c=r.time.split(" "),o=Number(c[0].split("-")[2])+". "+["January","February","March","April","May","June","July","August","September","October","November","December"][Number(c[0].split("-")[1])],s=c[1].substring(0,5),i=r.temp,u=r.clouds;return t.$$set=function(t){"prediction"in t&&e(5,r=t.prediction)},[a,o,s,i,u,r]}var O=function(n){t(i,s);var e=J(i);function i(t){var n;return r(this,i),n=e.call(this),a(o(n),t,B,K,c,{prediction:5}),n}return i}();function q(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var a,c=n(t);if(r){var o=n(this).constructor;a=Reflect.construct(c,arguments,o)}else a=c.apply(this,arguments);return e(this,a)}}function F(t,n,e){var r=t.slice();return r[18]=n[e],r[20]=e,r}function Z(t){var n;return{c:function(){n=f("Cannot connect to NOAA")},l:function(t){n=d(t,"Cannot connect to NOAA")},m:function(t,e){y(t,n,e)},p:x,i:x,o:x,d:function(t){t&&v(n)}}}function G(t){for(var n,e,r=t[0],a=[],c=0;c<r.length;c+=1)a[c]=L(F(t,r,c));var o=function(t){return $(a[t],1,1,(function(){a[t]=null}))};return{c:function(){for(var t=0;t<a.length;t+=1)a[t].c();n=N()},l:function(t){for(var e=0;e<a.length;e+=1)a[e].l(t);n=N()},m:function(t,r){for(var c=0;c<a.length;c+=1)a[c].m(t,r);y(t,n,r),e=!0},p:function(t,e){if(1&e){var c;for(r=t[0],c=0;c<r.length;c+=1){var s=F(t,r,c);a[c]?(a[c].p(s,e),R(a[c],1)):(a[c]=L(s),a[c].c(),R(a[c],1),a[c].m(n.parentNode,n))}for(b(),c=r.length;c<a.length;c+=1)o(c);I()}},i:function(t){if(!e){for(var n=0;n<r.length;n+=1)R(a[n]);e=!0}},o:function(t){a=a.filter(Boolean);for(var n=0;n<a.length;n+=1)$(a[n]);e=!1},d:function(t){j(a,t),t&&v(n)}}}function L(t){var n,e;return n=new O({props:{prediction:t[18]}}),{c:function(){V(n.$$.fragment)},l:function(t){z(n.$$.fragment,t)},m:function(t,r){A(n,t,r),e=!0},p:function(t,e){var r={};1&e&&(r.prediction=t[18]),n.$set(r)},i:function(t){e||(R(n.$$.fragment,t),e=!0)},o:function(t){$(n.$$.fragment,t),e=!1},d:function(t){C(n,t)}}}function Q(t){var n,e,r,a,c,o,s,w,x,D=[G,Z],P=[];function V(t,n){return t[0]?0:1}return s=V(t),w=P[s]=D[s](t),{c:function(){n=i("div"),e=i("div"),r=i("h2"),a=f("Predicted"),c=u(),o=i("div"),w.c(),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var s=h(n);e=l(s,"DIV",{className:!0});var i=h(e);r=l(i,"H2",{class:!0});var u=h(r);a=d(u,"Predicted"),u.forEach(v),i.forEach(v),c=p(s),o=l(s,"DIV",{class:!0});var f=h(o);w.l(f),f.forEach(v),s.forEach(v),this.h()},h:function(){m(r,"class","svelte-mcdoaa"),m(e,"classname","flex flex-row justify-between items-top"),m(o,"class","prediction-table svelte-mcdoaa"),m(n,"class","predicted-weather svelte-mcdoaa")},m:function(t,i){y(t,n,i),g(n,e),g(e,r),g(r,a),g(n,c),g(n,o),P[s].m(o,null),x=!0},p:function(t,n){var e=E(n,1)[0],r=s;(s=V(t))===r?P[s].p(t,e):(b(),$(P[r],1,1,(function(){P[r]=null})),I(),(w=P[s])||(w=P[s]=D[s](t)).c(),R(w,1),w.m(o,null))},i:function(t){x||(R(w),x=!0)},o:function(t){$(w),x=!1},d:function(t){t&&v(n),P[s].d()}}}function U(t,n,e){var r,a,c,o=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(a,c){function o(t){try{i(r.next(t))}catch(t){c(t)}}function s(t){try{i(r.throw(t))}catch(t){c(t)}}function i(t){var n;t.done?a(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(o,s)}i((r=r.apply(t,n||[])).next())}))};Array();function s(t){a=t.coords.longitude,c=t.coords.latitude,function(t,n){o(this,void 0,void 0,P.mark((function a(){var c,o,s;return P.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,fetch("https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=".concat(n,"&lon=").concat(t)).then((function(t){return t.json()}));case 2:return c=a.sent,a.next=5,fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json").then((function(t){return t.json()}));case 5:(o=a.sent).shift(),s=[],o.forEach((function(t,n){if("observed"!=t[2]){var e,r,a=new Date(t[0]),o=new Date(0,0,0);c.properties.timeseries.forEach((function(t,n){var c=new Date(t.time);Math.abs(c.getTime()-a.getTime())<Math.abs(o.getTime()-a.getTime())&&(o=c,e=t.data.instant.details.air_temperature,r=t.data.instant.details.cloud_area_fraction)})),s.push({time:t[0],kp:t[1],temp:e,clouds:r})}})),e(0,r=s);case 10:case"end":return a.stop()}}),a)})))}(a,c)}function i(t){u()}function u(){a=28.283333,c=-15.416667}return D((function(){navigator.geolocation?navigator.geolocation.getCurrentPosition(s,i):u()})),[r]}var W=function(n){t(i,s);var e=q(i);function i(t){var n;return r(this,i),n=e.call(this),a(o(n),t,U,Q,c,{}),n}return i}();function X(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var a,c=n(t);if(r){var o=n(this).constructor;a=Reflect.construct(c,arguments,o)}else a=c.apply(this,arguments);return e(this,a)}}function Y(t){var n,e,r,a,c,o;return r=new H({}),c=new W({}),{c:function(){n=u(),e=i("div"),V(r.$$.fragment),a=u(),V(c.$$.fragment),this.h()},l:function(t){S('[data-svelte="svelte-1q3846k"]',document.head).forEach(v),n=p(t),e=l(t,"DIV",{class:!0});var o=h(e);z(r.$$.fragment,o),a=p(o),z(c.$$.fragment,o),o.forEach(v),this.h()},h:function(){document.title="Aurora data",m(e,"class","homescreen svelte-yqnwm7")},m:function(t,s){y(t,n,s),y(t,e,s),A(r,e,null),g(e,a),A(c,e,null),o=!0},p:x,i:function(t){o||(R(r.$$.fragment,t),R(c.$$.fragment,t),o=!0)},o:function(t){$(r.$$.fragment,t),$(c.$$.fragment,t),o=!1},d:function(t){t&&v(n),t&&v(e),C(r),C(c)}}}var tt=function(n){t(i,s);var e=X(i);function i(t){var n;return r(this,i),n=e.call(this),a(o(n),t,null,Y,c,{}),n}return i}();export default tt; |