2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
import{S as j,i as S,s as M,I as Y,e as p,k as _,t as I,c as u,a as w,d as b,m as C,h as q,b as m,g,J as l,j as E,l as v,K as N,L as D,M as A,q as L,o as R,N as x,v as T}from"../chunks/index-b06f7db9.js";import{b as y}from"../chunks/paths-396f020f.js";import{t as V,l as $}from"../chunks/state-28681db9.js";import{s as F,t as k}from"../chunks/theme-aa0835b3.js";import"../chunks/preload-helper-29d322af.js";function z(s){let a,n,i,c,d,e=s[0].message+"",r;return{c(){a=p("div"),n=p("div"),i=p("div"),c=_(),d=p("div"),r=I(e),this.h()},l(t){a=u(t,"DIV",{class:!0});var o=w(a);n=u(o,"DIV",{class:!0});var h=w(n);i=u(h,"DIV",{class:!0}),w(i).forEach(b),c=C(h),d=u(h,"DIV",{});var f=w(d);r=q(f,e),f.forEach(b),h.forEach(b),o.forEach(b),this.h()},h(){m(i,"class","loader mx-auto svelte-1ub1m40"),m(n,"class","text-indigo-100 text-4xl font-bold my-auto"),m(a,"class","w-screen h-screen z-50 absolute left-0 top-0 bg-gray-600 opacity-50 flex align-middle justify-center")},m(t,o){g(t,a,o),l(a,n),l(n,i),l(n,c),l(n,d),l(d,r)},p(t,o){o&1&&e!==(e=t[0].message+"")&&E(r,e)},d(t){t&&b(a)}}}function U(s){let a,n,i,c;const d=s[2].default,e=Y(d,s,s[1],null);let r=s[0].loading&&z(s);return{c(){a=p("main"),e&&e.c(),n=_(),r&&r.c(),i=v(),this.h()},l(t){a=u(t,"MAIN",{class:!0});var o=w(a);e&&e.l(o),o.forEach(b),n=C(t),r&&r.l(t),i=v(),this.h()},h(){m(a,"class","h-screen text-primary-content")},m(t,o){g(t,a,o),e&&e.m(a,null),g(t,n,o),r&&r.m(t,o),g(t,i,o),c=!0},p(t,[o]){e&&e.p&&(!c||o&2)&&N(e,d,t,t[1],c?A(d,t[1],o,null):D(t[1]),null),t[0].loading?r?r.p(t,o):(r=z(t),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null)},i(t){c||(L(e,t),c=!0)},o(t){R(e,t),c=!1},d(t){t&&b(a),e&&e.d(t),t&&b(n),r&&r.d(t),t&&b(i)}}}function X(s,a,n){let i,c;x(s,k,r=>n(3,i=r)),x(s,$,r=>n(0,c=r));let{$$slots:d={},$$scope:e}=a;return T(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(`${y}/service-worker.js`,{scope:`${y}/`}).then(function(t){console.log("Registration successful, scope is:",t.scope)}).catch(function(t){console.log("Service worker registration failed, error:",t)});const r=window.matchMedia("(prefers-color-scheme: dark)").matches;i.theme===void 0&&F(r?"dark":"light"),k.subscribe(({theme:t,isDark:o})=>{t&&(document.getElementsByTagName("html")[0].setAttribute("data-theme",t),V(o))})}),s.$$set=r=>{"$$scope"in r&&n(1,e=r.$$scope)},[c,e,d]}class G extends j{constructor(a){super(),S(this,a,X,U,M,{})}}export{G as default};
|