diff options
author | jakobst1n <undefined> | 2022-04-27 00:51:36 +0200 |
---|---|---|
committer | jakobst1n <undefined> | 2022-04-27 00:51:36 +0200 |
commit | e2ff737bd6e39e2af6211fbcb9b10e6d6ec9e4f5 (patch) | |
tree | 5f56812e1d55e450ad2125e4017dbc61a015d5d0 /client/legacy/index.b1d86915.js | |
parent | 0b1940a71a3c1167408ed32078e79e45041e9e50 (diff) | |
download | Aurora-data-e2ff737bd6e39e2af6211fbcb9b10e6d6ec9e4f5.tar.gz Aurora-data-e2ff737bd6e39e2af6211fbcb9b10e6d6ec9e4f5.zip |
Updates
Diffstat (limited to 'client/legacy/index.b1d86915.js')
-rw-r--r-- | client/legacy/index.b1d86915.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/legacy/index.b1d86915.js b/client/legacy/index.b1d86915.js new file mode 100644 index 0000000..cdc803d --- /dev/null +++ b/client/legacy/index.b1d86915.js @@ -0,0 +1 @@ +import{_ as t,a as n,b as a,c as e,i as r,s as c,d as i,e as o,S as s,f as u,g as l,h as f,j as d,k as h,l as p,m as v,n as m,w as g,o as w,t as _,p as y,q as b,r as E,u as D,v as $,x as k,y as j,z as O,A as I,B as P,C as V,D as x,E as q,F as R,G as T,H as S,I as B}from"./client.652277bf.js";function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(e){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return a(this,r)}}function M(t){var n,a,e,r,c,i,o,s,g;return{c:function(){n=u("div"),a=u("div"),e=u("div"),r=u("div"),c=u("div"),i=u("div"),o=u("div"),s=u("div"),g=u("div"),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var u=f(n);a=l(u,"DIV",{class:!0}),f(a).forEach(d),e=l(u,"DIV",{class:!0}),f(e).forEach(d),r=l(u,"DIV",{class:!0}),f(r).forEach(d),c=l(u,"DIV",{class:!0}),f(c).forEach(d),i=l(u,"DIV",{class:!0}),f(i).forEach(d),o=l(u,"DIV",{class:!0}),f(o).forEach(d),s=l(u,"DIV",{class:!0}),f(s).forEach(d),g=l(u,"DIV",{class:!0}),f(g).forEach(d),u.forEach(d),this.h()},h:function(){h(a,"class","svelte-7k6qu0"),h(e,"class","svelte-7k6qu0"),h(r,"class","svelte-7k6qu0"),h(c,"class","svelte-7k6qu0"),h(i,"class","svelte-7k6qu0"),h(o,"class","svelte-7k6qu0"),h(s,"class","svelte-7k6qu0"),h(g,"class","svelte-7k6qu0"),h(n,"class","lds-roller svelte-7k6qu0")},m:function(t,u){p(t,n,u),v(n,a),v(n,e),v(n,r),v(n,c),v(n,i),v(n,o),v(n,s),v(n,g)},p:m,i:m,o:m,d:function(t){t&&d(n)}}}var N=function(n){t(u,s);var a=C(u);function u(t){var n;return e(this,u),n=a.call(this),r(i(n),t,null,M,c,{}),n}return o(u)}();const z={updated:!1,updating:!0},H=g(Object.assign(Object.assign({},z),{available:!1,longitude:null,latitude:null,city:null})),A=g(Object.assign(Object.assign({},z),{available:!1})),K=g(Object.assign({},z));function J(t,n=!1){let a=n?{}:{updated:new Date};t.update((t=>Object.assign(Object.assign(Object.assign({},t),a),{updating:n})))}function F(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(e){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return a(this,r)}}function L(t){var n,a,e,r,c=t[0].city+"";return{c:function(){n=u("i"),a=w(),e=u("h1"),r=_(c),this.h()},l:function(t){n=l(t,"I",{class:!0}),f(n).forEach(d),a=y(t),e=l(t,"H1",{class:!0});var i=f(e);r=b(i,c),i.forEach(d),this.h()},h:function(){h(n,"class","symbol fas fa-map-marker-alt svelte-9mqc59"),h(e,"class","svelte-9mqc59")},m:function(t,c){p(t,n,c),p(t,a,c),p(t,e,c),v(e,r)},p:function(t,n){1&n&&c!==(c=t[0].city+"")&&E(r,c)},d:function(t){t&&d(n),t&&d(a),t&&d(e)}}}function U(t){var n,a,e=t[1].updated.toLocaleString("no-NO",{dateStyle:"medium",timeStyle:"short"})+"";return{c:function(){n=u("p"),a=_(e)},l:function(t){n=l(t,"P",{});var r=f(n);a=b(r,e),r.forEach(d)},m:function(t,e){p(t,n,e),v(n,a)},p:function(t,n){2&n&&e!==(e=t[1].updated.toLocaleString("no-NO",{dateStyle:"medium",timeStyle:"short"})+"")&&E(a,e)},d:function(t){t&&d(n)}}}function Z(t){var n,a;return{c:function(){n=u("p"),a=_("There is more than 10 minutes difference between data updates")},l:function(t){n=l(t,"P",{});var e=f(n);a=b(e,"There is more than 10 minutes difference between data updates"),e.forEach(d)},m:function(t,e){p(t,n,e),v(n,a)},p:m,d:function(t){t&&d(n)}}}function G(t){return{c:m,l:m,m:m,p:m,d:m}}function Q(t){var n,a,e,r,c,i,o,s,g,D,$,k,j=t[2].now.kp+"",O=t[2].now.kp_max+"",I=t[2].now.kp_min+"";return{c:function(){n=u("h2"),a=_("KP "),e=_(j),r=w(),c=u("p"),i=u("span"),o=_("↑ KP "),s=_(O),g=w(),D=u("span"),$=_("↓ KP "),k=_(I),this.h()},l:function(t){n=l(t,"H2",{class:!0});var u=f(n);a=b(u,"KP "),e=b(u,j),u.forEach(d),r=y(t),c=l(t,"P",{});var h=f(c);i=l(h,"SPAN",{classname:!0});var p=f(i);o=b(p,"↑ KP "),s=b(p,O),p.forEach(d),g=y(h),D=l(h,"SPAN",{classname:!0});var v=f(D);$=b(v,"↓ KP "),k=b(v,I),v.forEach(d),h.forEach(d),this.h()},h:function(){h(n,"class","svelte-9mqc59"),h(i,"classname","pr-2"),h(D,"classname","pl-2")},m:function(t,u){p(t,n,u),v(n,a),v(n,e),p(t,r,u),p(t,c,u),v(c,i),v(i,o),v(i,s),v(c,g),v(c,D),v(D,$),v(D,k)},p:function(t,n){4&n&&j!==(j=t[2].now.kp+"")&&E(e,j),4&n&&O!==(O=t[2].now.kp_max+"")&&E(s,O),4&n&&I!==(I=t[2].now.kp_min+"")&&E(k,I)},i:m,o:m,d:function(t){t&&d(n),t&&d(r),t&&d(c)}}}function W(t){var n,a;return n=new N({}),{c:function(){V(n.$$.fragment)},l:function(t){x(n.$$.fragment,t)},m:function(t,e){q(n,t,e),a=!0},p:m,i:function(t){a||(I(n.$$.fragment,t),a=!0)},o:function(t){j(n.$$.fragment,t),a=!1},d:function(t){R(n,t)}}}function X(t){var n,a,e,r,c,i,o,s,m=t[2].now.bz+"",g=t[1].available&&Y(t);return{c:function(){n=u("div"),a=u("p"),e=_("BZ"),r=w(),c=u("p"),i=_(m),o=w(),g&&g.c(),s=D(),this.h()},l:function(t){n=l(t,"DIV",{});var u=f(n);a=l(u,"P",{class:!0});var h=f(a);e=b(h,"BZ"),h.forEach(d),r=y(u),c=l(u,"P",{class:!0});var p=f(c);i=b(p,m),p.forEach(d),u.forEach(d),o=y(t),g&&g.l(t),s=D(),this.h()},h:function(){h(a,"class","svelte-9mqc59"),h(c,"class","svelte-9mqc59")},m:function(t,u){p(t,n,u),v(n,a),v(a,e),v(n,r),v(n,c),v(c,i),p(t,o,u),g&&g.m(t,u),p(t,s,u)},p:function(t,n){4&n&&m!==(m=t[2].now.bz+"")&&E(i,m),t[1].available?g?g.p(t,n):((g=Y(t)).c(),g.m(s.parentNode,s)):g&&(g.d(1),g=null)},d:function(t){t&&d(n),t&&d(o),g&&g.d(t),t&&d(s)}}}function Y(t){var n,a,e,r,c,i,o,s,m,g,D,$,k,j,O,I=t[1].now.temp+"",P=t[1].now.clouds+"";return{c:function(){n=u("div"),a=u("p"),e=_("Temp"),r=w(),c=u("p"),i=_(I),o=_("°C"),s=w(),m=u("div"),g=u("p"),D=_("Clouds"),$=w(),k=u("p"),j=_(P),O=_("%"),this.h()},l:function(t){n=l(t,"DIV",{});var u=f(n);a=l(u,"P",{class:!0});var h=f(a);e=b(h,"Temp"),h.forEach(d),r=y(u),c=l(u,"P",{class:!0});var p=f(c);i=b(p,I),o=b(p,"°C"),p.forEach(d),u.forEach(d),s=y(t),m=l(t,"DIV",{});var v=f(m);g=l(v,"P",{class:!0});var w=f(g);D=b(w,"Clouds"),w.forEach(d),$=y(v),k=l(v,"P",{class:!0});var _=f(k);j=b(_,P),O=b(_,"%"),_.forEach(d),v.forEach(d),this.h()},h:function(){h(a,"class","svelte-9mqc59"),h(c,"class","svelte-9mqc59"),h(g,"class","svelte-9mqc59"),h(k,"class","svelte-9mqc59")},m:function(t,u){p(t,n,u),v(n,a),v(a,e),v(n,r),v(n,c),v(c,i),v(c,o),p(t,s,u),p(t,m,u),v(m,g),v(g,D),v(m,$),v(m,k),v(k,j),v(k,O)},p:function(t,n){2&n&&I!==(I=t[1].now.temp+"")&&E(i,I),2&n&&P!==(P=t[1].now.clouds+"")&&E(j,P)},d:function(t){t&&d(n),t&&d(s),t&&d(m)}}}function tt(t){var n,a,e,r,c,i,o,s,m,g,_,b,E,D=!t[0].updating&&t[0].available&&L(t);function P(t,n){return 6&n&&(i=null),t[1].updating||t[2].updating?G:(null==i&&(i=!!(Math.abs(t[1].updated-t[2].updated)>6e5)),i?Z:U)}var V=P(t,-1),x=V(t),q=[W,Q],R=[];function T(t,n){return t[2].updating||t[1].updating?0:1}m=T(t),g=R[m]=q[m](t);var S=!t[2].updating&&!t[1].updating&&X(t);return{c:function(){n=u("div"),a=u("div"),e=u("div"),D&&D.c(),r=w(),c=u("div"),x.c(),o=w(),s=u("div"),g.c(),_=w(),b=u("div"),S&&S.c(),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var i=f(n);a=l(i,"DIV",{class:!0});var u=f(a);e=l(u,"DIV",{class:!0});var h=f(e);D&&D.l(h),h.forEach(d),r=y(u),c=l(u,"DIV",{class:!0});var p=f(c);x.l(p),p.forEach(d),o=y(u),s=l(u,"DIV",{class:!0});var v=f(s);g.l(v),v.forEach(d),_=y(u),b=l(u,"DIV",{class:!0});var m=f(b);S&&S.l(m),m.forEach(d),u.forEach(d),i.forEach(d),this.h()},h:function(){h(e,"class","weatherCurrent-data-location svelte-9mqc59"),h(c,"class","weatherCurrent-data-date"),h(s,"class","weatherCurrent-data-kp svelte-9mqc59"),h(b,"class","current-details svelte-9mqc59"),h(a,"class","weatherCurrent-data svelte-9mqc59"),h(n,"class","weatherCurrent-wrapper svelte-9mqc59")},m:function(t,i){p(t,n,i),v(n,a),v(a,e),D&&D.m(e,null),v(a,r),v(a,c),x.m(c,null),v(a,o),v(a,s),R[m].m(s,null),v(a,_),v(a,b),S&&S.m(b,null),E=!0},p:function(t,n){var a=$(n,1)[0];!t[0].updating&&t[0].available?D?D.p(t,a):((D=L(t)).c(),D.m(e,null)):D&&(D.d(1),D=null),V===(V=P(t,a))&&x?x.p(t,a):(x.d(1),(x=V(t))&&(x.c(),x.m(c,null)));var r=m;(m=T(t))===r?R[m].p(t,a):(k(),j(R[r],1,1,(function(){R[r]=null})),O(),(g=R[m])?g.p(t,a):(g=R[m]=q[m](t)).c(),I(g,1),g.m(s,null)),t[2].updating||t[1].updating?S&&(S.d(1),S=null):S?S.p(t,a):((S=X(t)).c(),S.m(b,null))},i:function(t){E||(I(g),E=!0)},o:function(t){j(g),E=!1},d:function(t){t&&d(n),D&&D.d(),x.d(),R[m].d(),S&&S.d()}}}function nt(t,n,a){var e,r,c;return P(t,H,(function(t){return a(0,e=t)})),P(t,A,(function(t){return a(1,r=t)})),P(t,K,(function(t){return a(2,c=t)})),[e,r,c]}!async function(){if("undefined"==typeof window)return;let t;J(H,!0);try{t=await async function(){return new Promise(((t,n)=>{"undefined"!=typeof navigator?navigator.geolocation.getCurrentPosition((n=>{t({longitude:n.coords.longitude,latitude:n.coords.latitude})}),(t=>{n(t)})):n(Error())}))}()}catch(t){return console.log(t),H.update((t=>Object.assign(Object.assign({},t),{available:!1,city:null,longitude:null,latitude:null}))),void J(H,!1)}let n=await fetch(`https://geocode.xyz/${t.latitude},${t.longitude}?geoit=json`),a=await n.json();H.update((n=>Object.assign(Object.assign(Object.assign({},n),{available:!0,city:a.city}),t))),J(H,!1)}(),H.subscribe((async function(t=null){if("undefined"==typeof window)return;if(null===t)return;if(t.updating)return;if(!t.available)return A.update((t=>Object.assign(Object.assign({},t),{available:!1}))),void J(A,!1);J(A,!0);let n=await fetch(`https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=${t.latitude}&lon=${t.longitude}`),a=await n.json(),e={clouds:null,temp:null};try{e.clouds=a.properties.timeseries[0].data.instant.details.cloud_area_fraction,e.temp=a.properties.timeseries[0].data.instant.details.air_temperature,a.properties.timeseries=a.properties.timeseries.map((t=>Object.assign(Object.assign({},t),{time:new Date(t.time)})))}catch(t){}A.update((t=>Object.assign(Object.assign({},t),{yr_data_raw:a,now:e,available:!0}))),J(A,!1)})),async function(){if("undefined"==typeof window)return;J(K,!0);let t=await async function(){let t={now:{bz:"-",kp:"-",kp_min:"-",kp_max:"-"},usnoaa_data_raw:{solar_wind_mag_field:!1,noaa_planetary_k_index_forecast:!1}},n=await fetch("https://services.swpc.noaa.gov/products/summary/solar-wind-mag-field.json");t.usnoaa_data_raw.solar_wind_mag_field=await n.json(),t.usnoaa_data_raw.solar_wind_mag_field.TimeStamp=new Date(t.usnoaa_data_raw.solar_wind_mag_field.TimeStamp+" UTC"),t.now.bz=t.usnoaa_data_raw.solar_wind_mag_field.Bz,n=await fetch("https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json"),t.usnoaa_data_raw.noaa_planetary_k_index_forecast=await n.json(),t.usnoaa_data_raw.noaa_planetary_k_index_forecast.shift();let a=new Date,e=new Date(0,0,0),r=1e3,c=0;return t.usnoaa_data_raw.noaa_planetary_k_index_forecast.forEach(((n,i)=>{n[1]>c&&(c=n[1]),n[1]<r&&(r=n[1]);let o=new Date(n[0]+" UTC");Math.abs(o.getTime()-a.getTime())<Math.abs(e.getTime()-a.getTime())&&(e=o,t.now.kp=n[1]),t.usnoaa_data_raw.noaa_planetary_k_index_forecast[i]={time:o,kp:n[1],observed:n[2]}})),t.now.kp_min=r.toString(),t.now.kp_max=c.toString(),t}();K.update((n=>Object.assign(Object.assign({},n),t))),J(K,!1)}();var at=function(n){t(u,s);var a=F(u);function u(t){var n;return e(this,u),n=a.call(this),r(i(n),t,nt,tt,c,{}),n}return o(u)}();function et(t,n,a,e,r,c,i){try{var o=t[c](i),s=o.value}catch(t){return void a(t)}o.done?n(s):Promise.resolve(s).then(e,r)}function rt(t){return function(){var n=this,a=arguments;return new Promise((function(e,r){var c=t.apply(n,a);function i(t){et(c,e,r,i,o,"next",t)}function o(t){et(c,e,r,i,o,"throw",t)}i(void 0)}))}}function ct(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(e){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return a(this,r)}}function it(t){var n,a,e,r,c,i,o,s,g,E,D,k,j=t[5]&&function(t){var n,a,e,r,c,i,o,s,g,E,D,$;return{c:function(){n=u("div"),a=u("p"),e=u("i"),r=w(),c=_(t[3]),i=_("°C"),o=w(),s=u("p"),g=u("i"),E=w(),D=_(t[4]),$=_("%"),this.h()},l:function(u){n=l(u,"DIV",{});var h=f(n);a=l(h,"P",{});var p=f(a);e=l(p,"I",{class:!0}),f(e).forEach(d),r=y(p),c=b(p,t[3]),i=b(p,"°C"),p.forEach(d),o=y(h),s=l(h,"P",{});var v=f(s);g=l(v,"I",{class:!0}),f(g).forEach(d),E=y(v),D=b(v,t[4]),$=b(v,"%"),v.forEach(d),h.forEach(d),this.h()},h:function(){h(e,"class","fas fa-thermometer-half"),h(g,"class","fas fa-cloud")},m:function(t,u){p(t,n,u),v(n,a),v(a,e),v(a,r),v(a,c),v(a,i),v(n,o),v(n,s),v(s,g),v(s,E),v(s,D),v(s,$)},p:m,d:function(t){t&&d(n)}}}(t);return{c:function(){n=u("div"),a=u("div"),e=u("h3"),r=_(t[2]),c=w(),i=u("p"),o=_(t[1]),s=w(),g=u("div"),E=u("h2"),D=_(t[0]),k=w(),j&&j.c(),this.h()},l:function(u){n=l(u,"DIV",{class:!0});var h=f(n);a=l(h,"DIV",{});var p=f(a);e=l(p,"H3",{class:!0});var v=f(e);r=b(v,t[2]),v.forEach(d),c=y(p),i=l(p,"P",{});var m=f(i);o=b(m,t[1]),m.forEach(d),p.forEach(d),s=y(h),g=l(h,"DIV",{class:!0});var w=f(g);E=l(w,"H2",{class:!0});var _=f(E);D=b(_,t[0]),_.forEach(d),k=y(w),j&&j.l(w),w.forEach(d),h.forEach(d),this.h()},h:function(){h(e,"class","svelte-u548p6"),h(E,"class","svelte-u548p6"),h(g,"class","data svelte-u548p6"),h(n,"class","prediction-details svelte-u548p6")},m:function(t,u){p(t,n,u),v(n,a),v(a,e),v(e,r),v(a,c),v(a,i),v(i,o),v(n,s),v(n,g),v(g,E),v(E,D),v(g,k),j&&j.m(g,null)},p:function(t,n){var a=$(n,1)[0];t[5]&&j.p(t,a)},i:m,o:m,d:function(t){t&&d(n),j&&j.d()}}}function ot(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,a=t,e=0;e<n-t.length;e++)a="0"+a;return a}function st(t,n,a){var e=n.prediction,r=e.kp,c=e.time.getDate()+". "+["January","February","March","April","May","June","July","August","September","October","November","December"][e.time.getMonth()],i=ot(e.time.getHours().toString())+":"+ot(e.time.getMinutes().toString()),o=e.temp,s=e.clouds,u=e.hasNOMETData;return t.$$set=function(t){"prediction"in t&&a(6,e=t.prediction)},[r,c,i,o,s,u,e]}var ut=function(n){t(u,s);var a=ct(u);function u(t){var n;return e(this,u),n=a.call(this),r(i(n),t,st,it,c,{prediction:6}),n}return o(u)}();function lt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(e){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return a(this,r)}}function ft(t,n,a){var e=t.slice();return e[5]=n[a],e[7]=a,e}function dt(t){var n,a,e,r,c;return{c:function(){n=u("div"),a=u("i"),e=w(),r=u("p"),c=_("No prediction data"),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var i=f(n);a=l(i,"I",{class:!0}),f(a).forEach(d),e=y(i),r=l(i,"P",{});var o=f(r);c=b(o,"No prediction data"),o.forEach(d),i.forEach(d),this.h()},h:function(){h(a,"class","fas fa-7x fa-exclamation-triangle"),h(n,"class","no-data svelte-1romtap")},m:function(t,i){p(t,n,i),v(n,a),v(n,e),v(n,r),v(r,c)},p:m,i:m,o:m,d:function(t){t&&d(n)}}}function ht(t){for(var n,a,e,r,c,i,o=t[0],s=[],m=0;m<o.length;m+=1)s[m]=pt(ft(t,o,m));var g=function(t){return j(s[t],1,1,(function(){s[t]=null}))};return{c:function(){n=u("div"),a=u("h2"),e=_("Predicted"),r=w(),c=u("div");for(var t=0;t<s.length;t+=1)s[t].c();this.h()},l:function(t){n=l(t,"DIV",{classname:!0});var i=f(n);a=l(i,"H2",{class:!0});var o=f(a);e=b(o,"Predicted"),o.forEach(d),i.forEach(d),r=y(t),c=l(t,"DIV",{class:!0});for(var u=f(c),h=0;h<s.length;h+=1)s[h].l(u);u.forEach(d),this.h()},h:function(){h(a,"class","svelte-1romtap"),h(n,"classname","flex flex-row justify-between items-top"),h(c,"class","prediction-table svelte-1romtap")},m:function(t,o){p(t,n,o),v(n,a),v(a,e),p(t,r,o),p(t,c,o);for(var u=0;u<s.length;u+=1)s[u].m(c,null);i=!0},p:function(t,n){if(1&n){var a;for(o=t[0],a=0;a<o.length;a+=1){var e=ft(t,o,a);s[a]?(s[a].p(e,n),I(s[a],1)):(s[a]=pt(e),s[a].c(),I(s[a],1),s[a].m(c,null))}for(k(),a=o.length;a<s.length;a+=1)g(a);O()}},i:function(t){if(!i){for(var n=0;n<o.length;n+=1)I(s[n]);i=!0}},o:function(t){s=s.filter(Boolean);for(var n=0;n<s.length;n+=1)j(s[n]);i=!1},d:function(t){t&&d(n),t&&d(r),t&&d(c),S(s,t)}}}function pt(t){var n,a;return n=new ut({props:{prediction:t[5]}}),{c:function(){V(n.$$.fragment)},l:function(t){x(n.$$.fragment,t)},m:function(t,e){q(n,t,e),a=!0},p:function(t,a){var e={};1&a&&(e.prediction=t[5]),n.$set(e)},i:function(t){a||(I(n.$$.fragment,t),a=!0)},o:function(t){j(n.$$.fragment,t),a=!1},d:function(t){R(n,t)}}}function vt(t){var n,a,e,r,c=[ht,dt],i=[];function o(t,n){return t[0]?0:1}return a=o(t),e=i[a]=c[a](t),{c:function(){n=u("div"),e.c(),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var a=f(n);e.l(a),a.forEach(d),this.h()},h:function(){h(n,"class","predicted-weather svelte-1romtap")},m:function(t,e){p(t,n,e),i[a].m(n,null),r=!0},p:function(t,r){var s=$(r,1)[0],u=a;(a=o(t))===u?i[a].p(t,s):(k(),j(i[u],1,1,(function(){i[u]=null})),O(),(e=i[a])?e.p(t,s):(e=i[a]=c[a](t)).c(),I(e,1),e.m(n,null))},i:function(t){r||(I(e),r=!0)},o:function(t){j(e),r=!1},d:function(t){t&&d(n),i[a].d()}}}function mt(t,n,a){var e,r,c;function i(){return o.apply(this,arguments)}function o(){return(o=rt(T.mark((function t(){return T.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r.updating&&!e.updating){t.next=3;break}return a(0,c=null),t.abrupt("return");case 3:a(0,c=r.usnoaa_data_raw.noaa_planetary_k_index_forecast.map((function(t){return{time:t.time,kp:t.kp,temp:null,clouds:null,hasNOMETData:e.available}}))),e.available&&c.forEach((function(t,n){var r,i,o=new Date(0,0,0);e.yr_data_raw.properties.timeseries.forEach((function(n,a){var e=new Date(n.time);Math.abs(e.getTime()-t.time.getTime())<Math.abs(o.getTime()-t.time.getTime())&&(o=e,r=n.data.instant.details.air_temperature,i=n.data.instant.details.cloud_area_fraction)})),a(0,c[n]=Object.assign(Object.assign({},c[n]),{temp:r,clouds:i}),c)}));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return P(t,A,(function(t){return a(1,e=t)})),P(t,K,(function(t){return a(2,r=t)})),K.subscribe(i),A.subscribe(i),[c]}var gt=function(n){t(u,s);var a=lt(u);function u(t){var n;return e(this,u),n=a.call(this),r(i(n),t,mt,vt,c,{}),n}return o(u)}();function wt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(e){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return a(this,r)}}function _t(t){var n,a,e,r,c,i;return e=new at({}),c=new gt({}),{c:function(){n=w(),a=u("div"),V(e.$$.fragment),r=w(),V(c.$$.fragment),this.h()},l:function(t){B('[data-svelte="svelte-1q3846k"]',document.head).forEach(d),n=y(t),a=l(t,"DIV",{class:!0});var i=f(a);x(e.$$.fragment,i),r=y(i),x(c.$$.fragment,i),i.forEach(d),this.h()},h:function(){document.title="Aurora data",h(a,"class","homescreen svelte-pf4p6y")},m:function(t,o){p(t,n,o),p(t,a,o),q(e,a,null),v(a,r),q(c,a,null),i=!0},p:m,i:function(t){i||(I(e.$$.fragment,t),I(c.$$.fragment,t),i=!0)},o:function(t){j(e.$$.fragment,t),j(c.$$.fragment,t),i=!1},d:function(t){t&&d(n),t&&d(a),R(e),R(c)}}}var yt=function(n){t(u,s);var a=wt(u);function u(t){var n;return e(this,u),n=a.call(this),r(i(n),t,null,_t,c,{}),n}return o(u)}();export{yt as default}; |