diff --git a/.svelte-kit/generated/client-optimized/app.js b/.svelte-kit/generated/client-optimized/app.js new file mode 100644 index 0000000..b0d1237 --- /dev/null +++ b/.svelte-kit/generated/client-optimized/app.js @@ -0,0 +1,28 @@ +export { matchers } from './matchers.js'; + +export const nodes = [ + () => import('./nodes/0'), + () => import('./nodes/1'), + () => import('./nodes/2') +]; + +export const server_loads = []; + +export const dictionary = { + "/": [2] + }; + +export const hooks = { + handleError: (({ error }) => { console.error(error) }), + + reroute: (() => {}), + transport: {} +}; + +export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode])); + +export const hash = false; + +export const decode = (type, value) => decoders[type](value); + +export { default as root } from '../root.js'; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/matchers.js b/.svelte-kit/generated/client-optimized/matchers.js new file mode 100644 index 0000000..f6bd30a --- /dev/null +++ b/.svelte-kit/generated/client-optimized/matchers.js @@ -0,0 +1 @@ +export const matchers = {}; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/nodes/0.js b/.svelte-kit/generated/client-optimized/nodes/0.js new file mode 100644 index 0000000..f02ab1d --- /dev/null +++ b/.svelte-kit/generated/client-optimized/nodes/0.js @@ -0,0 +1 @@ +export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/nodes/1.js b/.svelte-kit/generated/client-optimized/nodes/1.js new file mode 100644 index 0000000..bf58bad --- /dev/null +++ b/.svelte-kit/generated/client-optimized/nodes/1.js @@ -0,0 +1 @@ +export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/nodes/2.js b/.svelte-kit/generated/client-optimized/nodes/2.js new file mode 100644 index 0000000..1cb4f85 --- /dev/null +++ b/.svelte-kit/generated/client-optimized/nodes/2.js @@ -0,0 +1 @@ +export { default as component } from "../../../../src/routes/+page.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/server/internal.js b/.svelte-kit/generated/server/internal.js index 03a3760..9687de8 100644 --- a/.svelte-kit/generated/server/internal.js +++ b/.svelte-kit/generated/server/internal.js @@ -21,7 +21,7 @@ export const options = { app: ({ head, body, assets, nonce, env }) => "\n\n \n \n \n \n \n \n
" + body + "
\n \n\n\n", error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" }, - version_hash: "km843b" + version_hash: "1d3uu3c" }; export async function get_hooks() { diff --git a/.svelte-kit/output/client/.vite/manifest.json b/.svelte-kit/output/client/.vite/manifest.json new file mode 100644 index 0000000..f86bab8 --- /dev/null +++ b/.svelte-kit/output/client/.vite/manifest.json @@ -0,0 +1,115 @@ +{ + ".svelte-kit/generated/client-optimized/app.js": { + "file": "_app/immutable/entry/app.BQgSTnW6.js", + "name": "entry/app", + "src": ".svelte-kit/generated/client-optimized/app.js", + "isEntry": true, + "imports": [ + "_w9TiaPO3.js", + "_Dp6gZg7-.js", + "_Zxz7OfLJ.js", + "_B3yT6szo.js" + ], + "dynamicImports": [ + ".svelte-kit/generated/client-optimized/nodes/0.js", + ".svelte-kit/generated/client-optimized/nodes/1.js", + ".svelte-kit/generated/client-optimized/nodes/2.js" + ] + }, + ".svelte-kit/generated/client-optimized/nodes/0.js": { + "file": "_app/immutable/nodes/0.pSvET1Gs.js", + "name": "nodes/0", + "src": ".svelte-kit/generated/client-optimized/nodes/0.js", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_Zxz7OfLJ.js", + "_w9TiaPO3.js" + ] + }, + ".svelte-kit/generated/client-optimized/nodes/1.js": { + "file": "_app/immutable/nodes/1.CHdn8i-6.js", + "name": "nodes/1", + "src": ".svelte-kit/generated/client-optimized/nodes/1.js", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_Zxz7OfLJ.js", + "_CZFlbmy6.js", + "_w9TiaPO3.js", + "_Dp6gZg7-.js", + "_BHfX2tkW.js" + ] + }, + ".svelte-kit/generated/client-optimized/nodes/2.js": { + "file": "_app/immutable/nodes/2.Bd-zYXpb.js", + "name": "nodes/2", + "src": ".svelte-kit/generated/client-optimized/nodes/2.js", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_Zxz7OfLJ.js", + "_CZFlbmy6.js", + "_w9TiaPO3.js", + "_CEUsAAFn.js" + ] + }, + "_B3yT6szo.js": { + "file": "_app/immutable/chunks/B3yT6szo.js", + "name": "index-client", + "imports": [ + "_w9TiaPO3.js" + ] + }, + "_BHfX2tkW.js": { + "file": "_app/immutable/chunks/BHfX2tkW.js", + "name": "entry", + "imports": [ + "_w9TiaPO3.js", + "_B3yT6szo.js" + ] + }, + "_CEUsAAFn.js": { + "file": "_app/immutable/chunks/CEUsAAFn.js", + "name": "svelte-head", + "imports": [ + "_w9TiaPO3.js" + ] + }, + "_CZFlbmy6.js": { + "file": "_app/immutable/chunks/CZFlbmy6.js", + "name": "legacy", + "imports": [ + "_w9TiaPO3.js" + ] + }, + "_Dp6gZg7-.js": { + "file": "_app/immutable/chunks/Dp6gZg7-.js", + "name": "render", + "imports": [ + "_w9TiaPO3.js", + "_CEUsAAFn.js", + "_Zxz7OfLJ.js" + ] + }, + "_Zxz7OfLJ.js": { + "file": "_app/immutable/chunks/Zxz7OfLJ.js", + "name": "disclose-version", + "imports": [ + "_w9TiaPO3.js" + ] + }, + "_w9TiaPO3.js": { + "file": "_app/immutable/chunks/w9TiaPO3.js", + "name": "runtime" + }, + "node_modules/@sveltejs/kit/src/runtime/client/entry.js": { + "file": "_app/immutable/entry/start.XpYumUTw.js", + "name": "entry/start", + "src": "node_modules/@sveltejs/kit/src/runtime/client/entry.js", + "isEntry": true, + "imports": [ + "_BHfX2tkW.js" + ] + } +} \ No newline at end of file diff --git a/.svelte-kit/output/client/_app/immutable/chunks/B3yT6szo.js b/.svelte-kit/output/client/_app/immutable/chunks/B3yT6szo.js new file mode 100644 index 0000000..465078e --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/B3yT6szo.js @@ -0,0 +1 @@ +import{m as t,o,u as c,p as u}from"./w9TiaPO3.js";function l(n){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function r(n){t===null&&l(),o&&t.l!==null?a(t).m.push(n):c(()=>{const e=u(n);if(typeof e=="function")return e})}function a(n){var e=n.l;return e.u??(e.u={a:[],b:[],m:[]})}export{r as o}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/BHfX2tkW.js b/.svelte-kit/output/client/_app/immutable/chunks/BHfX2tkW.js new file mode 100644 index 0000000..b8666d2 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/BHfX2tkW.js @@ -0,0 +1,3 @@ +var Je=e=>{throw TypeError(e)};var Nt=(e,t,n)=>t.has(e)||Je("Cannot "+n);var k=(e,t,n)=>(Nt(e,t,"read from private field"),n?n.call(e):t.get(e)),P=(e,t,n)=>t.has(e)?Je("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{n as Ie,O as jt,av as C,X as O,a7 as N,au as $t}from"./w9TiaPO3.js";import{o as Xe}from"./B3yT6szo.js";const B=[];function Ne(e,t=Ie){let n=null;const r=new Set;function a(o){if(jt(e,o)&&(e=o,n)){const c=!B.length;for(const l of r)l[1](),B.push(l,e);if(c){for(let l=0;l{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}new URL("sveltekit-internal://");function Dt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Ft(e){return e.split("%25").map(decodeURI).join("%25")}function Vt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function Ue({href:e}){return e.split("#")[0]}function Bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function qt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Gt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(je(e)),Mt(e,t));const Y=new Map;function Ht(e,t){const n=je(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Gt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Kt(e,t,n){if(Y.size>0){const r=je(e,n),a=Y.get(r);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Le(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Le(String.fromCharCode(...c.slice(2).split("-").map(h=>parseInt(h,16))));const u=Wt.exec(c),[,p,y,f,m]=u;return t.push({name:f,matcher:m,optional:!!p,rest:!!y,chained:y?l===1&&i[0]==="":!1}),y?"(.*?)":p?"([^/]*)?":"([^/]+?)"}return Le(c)}).join("")}).join("")}/?$`),params:t}}function zt(e){return!/^\([^)]+\)$/.test(e)}function Jt(e){return e.slice(1).split("/").filter(zt)}function Xt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;ou).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const u=t[o+1],p=a[o+1];u&&!u.rest&&u.optional&&p&&c.chained&&(i=0),!u&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Le(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Zt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,u]])=>{const{pattern:p,params:y}=Yt(o),f={id:o,exec:m=>{const h=p.exec(m);if(h)return Xt(h,y,r)},errors:[1,...u||[]].map(m=>e[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function dt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ze(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}var it;const x=((it=globalThis.__sveltekit_ym1mk4)==null?void 0:it.base)??"";var ct;const Qt=((ct=globalThis.__sveltekit_ym1mk4)==null?void 0:ct.assets)??x,en="1741895723022",ht="sveltekit:snapshot",pt="sveltekit:scroll",gt="sveltekit:states",tn="sveltekit:pageurl",G="sveltekit:history",X="sveltekit:navigation",de={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ue=location.origin;function mt(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function $e(){return{x:pageXOffset,y:pageYOffset}}function q(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Qe={...de,"":de.hover};function yt(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function wt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=yt(e)}}function Pe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||be(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ue&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function he(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=q(o,"preload-code")),a===null&&(a=q(o,"preload-data")),t===null&&(t=q(o,"keepfocus")),n===null&&(n=q(o,"noscroll")),s===null&&(s=q(o,"reload")),i===null&&(i=q(o,"replacestate")),o=yt(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Qe[r??"off"],preload_data:Qe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function et(e){const t=Ne(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const _t={v:()=>{}};function nn(){const{set:e,subscribe:t}=Ne(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Qt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==en;return i&&(e(!0),_t.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function be(e,t,n){return e.origin!==ue||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Bn(e){}function tt(e){const t=an(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const on=-1,sn=-2,cn=-3,ln=-4,fn=-5,un=-6;function dn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===on)return;if(s===cn)return NaN;if(s===ln)return 1/0;if(s===fn)return-1/0;if(s===un)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t==null?void 0:t[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const u=new Set;r[s]=u;for(let f=1;ft!=null)}class ke{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class De{constructor(t,n){this.status=t,this.location=n}}class Fe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}const gn="x-sveltekit-invalidated",mn="x-sveltekit-trailing-slash";function pe(e){return e instanceof ke||e instanceof Fe?e.status:500}function yn(e){return e instanceof Fe?e.text:"Internal Error"}let U,Z,Te;const wn=Xe.toString().includes("$$")||/function \w+\(\) \{\}/.test(Xe.toString());var te,ne,re,ae,oe,se,ie,ce,lt,le,ft,fe,ut;wn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},Z={current:null},Te={current:!1}):(U=new(lt=class{constructor(){P(this,te,C({}));P(this,ne,C(null));P(this,re,C(null));P(this,ae,C({}));P(this,oe,C({id:null}));P(this,se,C({}));P(this,ie,C(-1));P(this,ce,C(new URL("https://example.com")))}get data(){return O(k(this,te))}set data(t){N(k(this,te),t)}get form(){return O(k(this,ne))}set form(t){N(k(this,ne),t)}get error(){return O(k(this,re))}set error(t){N(k(this,re),t)}get params(){return O(k(this,ae))}set params(t){N(k(this,ae),t)}get route(){return O(k(this,oe))}set route(t){N(k(this,oe),t)}get state(){return O(k(this,se))}set state(t){N(k(this,se),t)}get status(){return O(k(this,ie))}set status(t){N(k(this,ie),t)}get url(){return O(k(this,ce))}set url(t){N(k(this,ce),t)}},te=new WeakMap,ne=new WeakMap,re=new WeakMap,ae=new WeakMap,oe=new WeakMap,se=new WeakMap,ie=new WeakMap,ce=new WeakMap,lt),Z=new(ft=class{constructor(){P(this,le,C(null))}get current(){return O(k(this,le))}set current(t){N(k(this,le),t)}},le=new WeakMap,ft),Te=new(ut=class{constructor(){P(this,fe,C(!1))}get current(){return O(k(this,fe))}set current(t){N(k(this,fe),t)}},fe=new WeakMap,ut),_t.v=()=>Te.current=!0);function _n(e){Object.assign(U,e)}const vn="/__data.json",bn=".html__data.json";function kn(e){return e.endsWith(".html")?e.replace(/\.html$/,bn):e.replace(/\/$/,"")+vn}const An=new Set(["icon","shortcut icon","apple-touch-icon"]),V=dt(pt)??{},Q=dt(ht)??{},$={url:et({}),page:et({}),navigating:Ne(null),updated:nn()};function Ve(e){V[e]=$e()}function Sn(e,t){let n=e+1;for(;V[n];)delete V[n],n+=1;for(n=t+1;Q[n];)delete Q[n],n+=1}function H(e){return location.href=e.href,new Promise(()=>{})}async function bt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function nt(){}let Be,Ce,ge,j,Oe,A;const me=[],ye=[];let L=null;const kt=new Set,En=new Set,z=new Set;let v={branch:[],error:null,url:null},qe=!1,we=!1,rt=!0,ee=!1,K=!1,At=!1,Ge=!1,St,R,T,F;const J=new Set;async function Hn(e,t,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),A=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),Be=Zt(e),j=document.documentElement,Oe=t,Ce=e.nodes[0],ge=e.nodes[1],Ce(),ge(),R=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[X],R||(R=T=Date.now(),history.replaceState({...history.state,[G]:R,[X]:T},""));const r=V[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await jn(Oe,n):await Cn(A.hash?Ot(new URL(location.href)):location.href,{replaceState:!0}),Nn()}function Rn(){me.length=0,Ge=!1}function Et(e){ye.some(t=>t==null?void 0:t.snapshot)&&(Q[e]=ye.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function Rt(e){var t;(t=Q[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=ye[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function at(){Ve(R),Ze(pt,V),Et(T),Ze(ht,Q)}async function Me(e,t,n,r){return W({type:"goto",url:mt(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ge=!0),t.invalidate&&t.invalidate.forEach(On)}})}async function In(e){if(e.id!==(L==null?void 0:L.id)){const t={};J.add(t),L={id:e.id,token:t,promise:Ut({...e,preload:t}).then(n=>(J.delete(t),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function xe(e){var n;const t=(n=await Se(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].map(r=>r==null?void 0:r[1]()))}function It(e,t,n){var s;v=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,e.props.page),St=new A.root({target:t,props:{...e.props,stores:$,components:ye},hydrate:n,sync:!1}),Rt(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};z.forEach(i=>i(a)),we=!0}function _e({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);e.pathname=Dt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:pn(n).map(f=>f.node.component),page:We(U)}};i!==void 0&&(c.props.form=i);let l={},u=!U,p=0;for(let f=0;f(o&&(c.route=!0),h[d])}),params:new Proxy(r,{get:(h,d)=>(o&&c.params.add(d),h[d])}),data:(s==null?void 0:s.data)??null,url:Bt(n,()=>{o&&(c.url=!0)},h=>{o&&c.search_params.add(h)},A.hash),async fetch(h,d){let w;h instanceof Request?(w=h.url,d={body:h.method==="GET"||h.method==="HEAD"?void 0:await h.blob(),cache:h.cache,credentials:h.credentials,headers:[...h.headers].length?h.headers:void 0,integrity:h.integrity,keepalive:h.keepalive,method:h.method,mode:h.mode,redirect:h.redirect,referrer:h.referrer,referrerPolicy:h.referrerPolicy,signal:h.signal,...d}):w=h;const S=new URL(w,n);return o&&f(S.href),S.origin===n.origin&&(w=S.href.slice(n.origin.length)),we?Kt(w,S.href,d):Ht(w,d)},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),t()},untrack(h){o=!1;try{return h()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:e,server:s,universal:(p=l.universal)!=null&&p.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=l.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function ot(e,t,n,r,a,s){if(Ge)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(me.some(o=>o(new URL(i))))return!0;return!1}function Ke(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function Un(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function st({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:We(U),constructors:[]}}}async function Ut({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===e)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let u=null;const p=v.url?e!==ve(v.url):!1,y=v.route?a.id!==v.route.id:!1,f=Un(v.url,n);let m=!1;const h=l.map((g,_)=>{var D;const b=v.branch[_],E=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||ot(m,y,p,f,(D=b.server)==null?void 0:D.uses,r));return E&&(m=!0),E});if(h.some(Boolean)){try{u=await xt(n,h)}catch(g){const _=await M(g,{url:n,params:r,route:{id:e}});return J.has(s)?st({error:_,url:n,params:r,route:a}):Ae({status:pe(g),error:_,url:n,route:a})}if(u.type==="redirect")return u}const d=u==null?void 0:u.nodes;let w=!1;const S=l.map(async(g,_)=>{var Ee;if(!g)return;const b=v.branch[_],E=d==null?void 0:d[_];if((!E||E.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!ot(w,y,p,f,(Ee=b.universal)==null?void 0:Ee.uses,r))return b;if(w=!0,(E==null?void 0:E.type)==="error")throw E;return He({loader:g[1],url:n,params:r,route:a,parent:async()=>{var ze;const Ye={};for(let Re=0;Re<_;Re+=1)Object.assign(Ye,(ze=await S[Re])==null?void 0:ze.data);return Ye},server_data_node:Ke(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of S)g.catch(()=>{});const I=[];for(let g=0;gPromise.resolve({}),server_data_node:Ke(s)}),c={node:await ge(),loader:ge,universal:null,server:null,data:null};return _e({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof De)return Me(new URL(o.location,location.href),{},0);throw o}}function Tn(e){let t;try{if(t=A.hooks.reroute({url:new URL(e)})??e,typeof t=="string"){const n=new URL(e);A.hash?n.hash=t:n.pathname=t,t=n}}catch{return}return t}async function Se(e,t){if(e&&!be(e,x,A.hash)){const n=Tn(e);if(!n)return;const r=xn(n);for(const a of Be){const s=a.exec(r);if(s)return{id:ve(e),invalidating:t,route:a,params:Vt(s),url:e}}}}function xn(e){return Ft(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ve(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function Lt({url:e,type:t,intent:n,delta:r}){let a=!1;const s=Ct(v,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return ee||kt.forEach(o=>o(i)),a?null:s}async function W({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=nt,block:u=nt}){const p=F;F=c;const y=await Se(t,!1),f=Lt({url:t,type:e,delta:n==null?void 0:n.delta,intent:y});if(!f){u(),F===c&&(F=p);return}const m=R,h=T;l(),ee=!0,we&&$.navigating.set(Z.current=f.navigation);let d=y&&await Ut(y);if(!d){if(be(t,x,A.hash))return await H(t);d=await Tt(t,{id:null},await M(new Fe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=(y==null?void 0:y.url)||t,F!==c)return f.reject(new Error("navigation aborted")),!1;if(d.type==="redirect")if(o>=20)d=await Ae({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Me(new URL(d.location,t).href,{},o+1,c),!1;else d.props.page.status>=400&&await $.updated.check()&&(await bt(),await H(t));if(Rn(),Ve(m),Et(h),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,_={[G]:R+=g,[X]:T+=g,[gt]:i};(s?history.replaceState:history.pushState).call(history,_,"",t),s||Sn(R,T)}if(L=null,d.props.page.state=i,we){v=d.state,d.props.page&&(d.props.page.url=t);const g=(await Promise.all(Array.from(En,_=>_(f.navigation)))).filter(_=>typeof _=="function");if(g.length>0){let _=function(){g.forEach(b=>{z.delete(b)})};g.push(_),g.forEach(b=>{z.add(b)})}St.$set(d.props),_n(d.props.page),At=!0}else It(d,Oe,!1);const{activeElement:w}=document;await $t();const S=n?n.scroll:a?$e():null;if(rt){const g=t.hash&&document.getElementById(decodeURIComponent(A.hash?t.hash.split("#")[2]??"":t.hash.slice(1)));S?scrollTo(S.x,S.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==w&&document.activeElement!==document.body;!r&&!I&&$n(),rt=!0,d.props.page&&Object.assign(U,d.props.page),ee=!1,e==="popstate"&&Rt(T),f.fulfil(void 0),z.forEach(g=>g(f.navigation)),$.navigating.set(Z.current=null)}async function Tt(e,t,n,r){return e.origin===ue&&e.pathname===location.pathname&&!qe?await Ae({status:r,error:n,url:e,route:t}):await H(e)}function Pn(){let e,t;j.addEventListener("mousemove",i=>{const o=i.target;clearTimeout(e),e=setTimeout(()=>{a(o,2)},20)});function n(i){i.defaultPrevented||a(i.composedPath()[0],1)}j.addEventListener("mousedown",n),j.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(xe(new URL(o.target.href)),r.unobserve(o.target))},{threshold:0});async function a(i,o){const c=wt(i,j);if(!c||c===t)return;const{url:l,external:u,download:p}=Pe(c,x,A.hash);if(u||p)return;const y=he(c),f=l&&ve(v.url)===ve(l);if(!y.reload&&!f)if(o<=y.preload_data){t=c;const m=await Se(l,!1);m&&In(m)}else o<=y.preload_code&&(t=c,xe(l))}function s(){r.disconnect();for(const i of j.querySelectorAll("a")){const{url:o,external:c,download:l}=Pe(i,x,A.hash);if(c||l)continue;const u=he(i);u.reload||(u.preload_code===de.viewport&&r.observe(i),u.preload_code===de.eager&&xe(o))}}z.add(s),s()}function M(e,t){if(e instanceof ke)return e.body;const n=pe(e),r=yn(e);return A.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Cn(e,t={}){return e=new URL(mt(e)),e.origin!==ue?Promise.reject(new Error("goto: invalid URL")):Me(e,t,0)}function On(e){if(typeof e=="function")me.push(e);else{const{href:t}=new URL(e,location.href);me.push(n=>n.href===t)}}function Nn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(at(),!ee){const a=Ct(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};kt.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&at()}),(t=navigator.connection)!=null&&t.saveData||Pn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=wt(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Pe(r,x,A.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=he(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[u,p]=(A.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=u===Ue(location);if(s||c.reload&&(!y||!p)){Lt({url:a,type:"link"})?ee=!0:n.preventDefault();return}if(p!==void 0&&y){const[,f]=v.url.href.split("#");if(f===p){if(n.preventDefault(),p===""||p==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(p));m&&(m.scrollIntoView(),m.focus())}return}if(K=!0,Ve(R),e(a),!c.replace_state)return;K=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await W({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(be(o,x,!1))return;const c=n.target,l=he(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const u=new FormData(c),p=a==null?void 0:a.getAttribute("name");p&&u.append(p,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(u).toString(),W({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if(F={},a===R)return;const s=V[a],i=n.state[gt]??{},o=new URL(n.state[tn]??location.href),c=n.state[X],l=v.url?Ue(location)===Ue(v.url):!1;if(c===T&&(At||l)){i!==U.state&&(U.state=i),e(o),V[R]=$e(),s&&scrollTo(s.x,s.y),R=a;return}const p=a-R;await W({type:"popstate",url:o,popped:{state:i,scroll:s,delta:p},accept:()=>{R=a,T=c},block:()=>{history.go(-p)},nav_token:F})}else if(!K){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{K?(K=!1,history.replaceState({...history.state,[G]:++R,[X]:T},"",location.href)):A.hash&&v.url.hash===location.hash&&W({type:"goto",url:Ot(v.url)})});for(const n of document.querySelectorAll("link"))An.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Z.current=null)});function e(n){v.url=U.url=n,$.page.set(We(U)),$.page.notify()}}async function jn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){qe=!0;const l=new URL(location.href);let u;({params:a={},route:s={id:null}}=await Se(l,!1)||{}),u=Be.find(({id:f})=>f===s.id);let p,y=!0;try{const f=r.map(async(h,d)=>{const w=o[d];return w!=null&&w.uses&&(w.uses=Pt(w.uses)),He({loader:A.nodes[h],url:l,params:a,route:s,parent:async()=>{const S={};for(let I=0;Ii?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new ke(a.status,i)}return new Promise(async i=>{var y;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function u(f){return dn(f,{...A.decoders,Promise:m=>new Promise((h,d)=>{o.set(m,{fulfil:h,reject:d})})})}let p="";for(;;){const{done:f,value:m}=await c.read();if(f&&!p)break;for(p+=!m&&p?` +`:l.decode(m,{stream:!0});;){const h=p.indexOf(` +`);if(h===-1)break;const d=JSON.parse(p.slice(0,h));if(p=p.slice(h+1),d.type==="redirect")return i(d);if(d.type==="data")(y=d.nodes)==null||y.forEach(w=>{(w==null?void 0:w.type)==="data"&&(w.uses=Pt(w.uses),w.data=u(w.data))}),i(d);else if(d.type==="chunk"){const{id:w,data:S,error:I}=d,g=o.get(w);o.delete(w),I?g.reject(u(I)):g.fulfil(u(S))}}}})}function Pt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function $n(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const t=document.body,n=t.getAttribute("tabindex");t.tabIndex=-1,t.focus({preventScroll:!0,focusVisible:!1}),n!==null?t.setAttribute("tabindex",n):t.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s{if(r.rangeCount===a.length){for(let s=0;s{a=u,s=p});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((l=t==null?void 0:t.route)==null?void 0:l.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function We(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Ot(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}export{Hn as a,Bn as l,U as p,$ as s,Te as u}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/CEUsAAFn.js b/.svelte-kit/output/client/_app/immutable/chunks/CEUsAAFn.js new file mode 100644 index 0000000..418931e --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/CEUsAAFn.js @@ -0,0 +1 @@ +import{c as _,b as o,H as f,h as a,a as c,g as d,s as i,d as s,f as r,i as u}from"./w9TiaPO3.js";let e;function g(){e=void 0}function p(h){let t=null,l=a;var n;if(a){for(t=r,e===void 0&&(e=u(document.head));e!==null&&(e.nodeType!==8||e.data!==c);)e=d(e);e===null?i(!1):e=s(d(e))}a||(n=document.head.appendChild(_()));try{o(()=>h(n),f)}finally{l&&(i(!0),e=r,s(t))}}export{p as h,g as r}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/CZFlbmy6.js b/.svelte-kit/output/client/_app/immutable/chunks/CZFlbmy6.js new file mode 100644 index 0000000..25c6719 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/CZFlbmy6.js @@ -0,0 +1 @@ +import{e}from"./w9TiaPO3.js";e(); diff --git a/.svelte-kit/output/client/_app/immutable/chunks/Dp6gZg7-.js b/.svelte-kit/output/client/_app/immutable/chunks/Dp6gZg7-.js new file mode 100644 index 0000000..9c43b27 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/Dp6gZg7-.js @@ -0,0 +1 @@ +import{q as C,r as R,t as A,v as H,w as M,x as I,y as b,i as P,a as Y,g as j,z as T,s as g,d as D,A as q,f as p,B,C as $,D as z,F,G,I as J,c as K,j as W,J as Q,h as E,K as U,m as X}from"./w9TiaPO3.js";import{r as Z}from"./CEUsAAFn.js";import{b as x}from"./Zxz7OfLJ.js";const rr=["touchstart","touchmove"];function er(r){return rr.includes(r)}const tr=new Set,O=new Set;function m(r){var N;var e=this,s=e.ownerDocument,c=r.type,o=((N=r.composedPath)==null?void 0:N.call(r))||[],t=o[0]||r.target,d=0,_=r.__root;if(_){var u=o.indexOf(_);if(u!==-1&&(e===document||e===window)){r.__root=e;return}var h=o.indexOf(e);if(h===-1)return;u<=h&&(d=u)}if(t=o[d]||r.target,t!==e){C(r,"currentTarget",{configurable:!0,get(){return t||s}});var w=M,i=I;R(null),A(null);try{for(var a,n=[];t!==null;){var f=t.assignedSlot||t.parentNode||t.host||null;try{var l=t["__"+c];if(l!==void 0&&!t.disabled)if(H(l)){var[V,...k]=l;V.apply(t,[r,...k])}else l.call(t,r)}catch(y){a?n.push(y):a=y}if(r.cancelBubble||f===e||f===null)break;t=f}if(a){for(let y of n)queueMicrotask(()=>{throw y});throw a}}finally{r.__root=e,delete r.currentTarget,R(w),A(i)}}}function or(r,e){var s=e==null?"":typeof e=="object"?e+"":e;s!==(r.__t??(r.__t=r.nodeValue))&&(r.__t=s,r.nodeValue=s==null?"":s+"")}function ar(r,e){return L(r,e)}function fr(r,e){b(),e.intro=e.intro??!1;const s=e.target,c=E,o=p;try{for(var t=P(s);t&&(t.nodeType!==8||t.data!==Y);)t=j(t);if(!t)throw T;g(!0),D(t),q();const d=L(r,{...e,anchor:t});if(p===null||p.nodeType!==8||p.data!==B)throw $(),T;return g(!1),d}catch(d){if(d===T)return e.recover===!1&&z(),b(),F(s),g(!1),ar(r,e);throw d}finally{g(c),D(o),Z()}}const v=new Map;function L(r,{target:e,anchor:s,props:c={},events:o,context:t,intro:d=!0}){b();var _=new Set,u=i=>{for(var a=0;a{var i=s??e.appendChild(K());return W(()=>{if(t){Q({});var a=X;a.c=t}o&&(c.$$events=o),E&&x(i,null),h=r(i,c)||{},E&&(I.nodes_end=p),t&&U()}),()=>{var f;for(var a of _){e.removeEventListener(a,m);var n=v.get(a);--n===0?(document.removeEventListener(a,m),v.delete(a)):v.set(a,n)}O.delete(u),i!==s&&((f=i.parentNode)==null||f.removeChild(i))}});return S.set(h,w),h}let S=new WeakMap;function dr(r,e){const s=S.get(r);return s?(S.delete(r),s(e)):Promise.resolve()}export{fr as h,ar as m,or as s,dr as u}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/Zxz7OfLJ.js b/.svelte-kit/output/client/_app/immutable/chunks/Zxz7OfLJ.js new file mode 100644 index 0000000..aaa53aa --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/Zxz7OfLJ.js @@ -0,0 +1 @@ +import{c as i,i as f,x as u,a0 as v,a1 as p,h as s,f as o,A as h,d as E}from"./w9TiaPO3.js";function T(n){var t=document.createElement("template");return t.innerHTML=n,t.content}function r(n,t){var e=u;e.nodes_start===null&&(e.nodes_start=n,e.nodes_end=t)}function w(n,t){var e=(t&v)!==0,_=(t&p)!==0,a,c=!n.startsWith("");return()=>{if(s)return r(o,null),o;a===void 0&&(a=T(c?n:""+n),e||(a=f(a)));var d=_?document.importNode(a,!0):a.cloneNode(!0);if(e){var m=f(d),l=d.lastChild;r(m,l)}else r(d,d);return d}}function x(n=""){if(!s){var t=i(n+"");return r(t,t),t}var e=o;return e.nodeType!==3&&(e.before(e=i()),E(e)),r(e,e),e}function M(){if(s)return r(o,null),o;var n=document.createDocumentFragment(),t=document.createComment(""),e=i();return n.append(t,e),r(t,e),n}function N(n,t){if(s){u.nodes_end=o,h();return}n!==null&&n.before(t)}const g="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(g);export{N as a,r as b,M as c,x as d,w as t}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/w9TiaPO3.js b/.svelte-kit/output/client/_app/immutable/chunks/w9TiaPO3.js new file mode 100644 index 0000000..3193262 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/chunks/w9TiaPO3.js @@ -0,0 +1 @@ +var Fn=Array.isArray,zt=Array.prototype.indexOf,qn=Array.from,Ln=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,Jt=Object.getOwnPropertyDescriptors,Yn=Object.prototype,Mn=Array.prototype,Qt=Object.getPrototypeOf;const jn=()=>{};function Un(t){return t()}function Xt(t){for(var n=0;nnew Promise(e=>{r.outro?Tn(n,()=>{I(n),e(void 0)}):(I(n),e(void 0))})}function Ct(t){return Y(mt,t,!1)}function En(t){return Y(B,t,!0)}function xr(t,n=[],r=It){const e=n.map(r);return mn(()=>t(...e.map(bn)))}function mn(t,n=0){return Y(B|ot|n,t,!0)}function Ar(t,n=!0){return Y(B|R,t,!0,n)}function Ft(t){var n=t.teardown;if(n!==null){const r=_t,e=u;Et(!0),J(null);try{n.call(null)}finally{Et(r),J(e)}}}function qt(t,n=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var e=r.next;I(r,n),r=e}}function gn(t){for(var n=t.first;n!==null;){var r=n.next;(n.f&R)===0&&I(n),n=r}}function I(t,n=!0){var r=!1;if((n||(t.f&nn)!==0)&&t.nodes_start!==null){for(var e=t.nodes_start,l=t.nodes_end;e!==null;){var s=e===l?null:N(e);e.remove(),e=s}r=!0}qt(t,n&&!r),H(t,0),m(t,L);var a=t.transitions;if(a!==null)for(const y of a)y.stop();Ft(t);var _=t.parent;_!==null&&_.first!==null&&Lt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Lt(t){var n=t.parent,r=t.prev,e=t.next;r!==null&&(r.next=e),e!==null&&(e.prev=r),n!==null&&(n.first===t&&(n.first=e),n.last===t&&(n.last=r))}function Tn(t,n){var r=[];Yt(t,r,!0),xn(r,()=>{I(t),n&&n()})}function xn(t,n){var r=t.length;if(r>0){var e=()=>--r||n();for(var l of t)l.out(e)}else n()}function Yt(t,n,r){if((t.f&F)===0){if(t.f^=F,t.transitions!==null)for(const a of t.transitions)(a.is_global||r)&&n.push(a);for(var e=t.first;e!==null;){var l=e.next,s=(e.f>)!==0||(e.f&R)!==0;Yt(e,n,s?r:!1),e=l}}}function Rr(t){Mt(t,!0)}function Mt(t,n){if((t.f&F)!==0){t.f^=F,(t.f&v)===0&&(t.f^=v),$(t)&&(m(t,k),et(t));for(var r=t.first;r!==null;){var e=r.next,l=(r.f>)!==0||(r.f&R)!==0;Mt(r,l?n:!1),r=e}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||n)&&s.in()}}let z=!1,at=[];function jt(){z=!1;const t=at.slice();at=[],Xt(t)}function kr(t){z||(z=!0,queueMicrotask(jt)),at.push(t)}function An(){z&&jt()}const Ut=0,Rn=1;let G=!1,K=Ut,j=!1,U=null,b=!1,_t=!1;function wt(t){b=t}function Et(t){_t=t}let D=[],C=0;let u=null,A=!1;function J(t){u=t}let f=null;function Q(t){f=t}let g=null;function kn(t){g=t}let p=null,d=0,x=null;function Dn(t){x=t}let Ht=1,X=0,S=!1;function Bt(){return++Ht}function $(t){var c;var n=t.f;if((n&k)!==0)return!0;if((n&q)!==0){var r=t.deps,e=(n&T)!==0;if(r!==null){var l,s,a=(n&W)!==0,_=e&&f!==null&&!S,y=r.length;if(a||_){for(l=0;lt.wv)return!0}(!e||f!==null&&!S)&&m(t,v)}return!1}function Sn(t,n){for(var r=n;r!==null;){if((r.f&Z)!==0)try{r.fn(t);return}catch{r.f^=Z}r=r.parent}throw G=!1,t}function On(t){return(t.f&L)===0&&(t.parent===null||(t.parent.f&Z)===0)}function rt(t,n,r,e){if(G){if(r===null&&(G=!1),On(n))throw t;return}r!==null&&(G=!0);{Sn(t,n);return}}function Vt(t,n,r=0){var e=t.reactions;if(e!==null)for(var l=0;l0)for(h.length=d+p.length,o=0;o1e3){C=0;try{an()}catch(t){if(U!==null)rt(t,U,null);else throw t}}C++}function Kt(t){var n=t.length;if(n!==0){Gt();var r=b;b=!0;try{for(var e=0;e1001)return;const t=D;D=[],Kt(t),j||(C=0,U=null)}function et(t){K===Ut&&(j||(j=!0,queueMicrotask(Pn))),U=t;for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if((r&(V|R))!==0){if((r&v)===0)return;n.f^=v}}D.push(n)}function Zt(t,n){var r=t.first,e=[];t:for(;r!==null;){var l=r.f,s=(l&R)!==0,a=s&&(l&v)!==0,_=r.next;if(!a&&(l&F)===0)if((l&B)!==0){if(s)r.f^=v;else{var y=u;try{u=r,$(r)&&ct(r)}catch(o){rt(o,r,null,r.ctx)}finally{u=y}}var c=r.first;if(c!==null){r=c;continue}}else(l&mt)!==0&&e.push(r);if(_===null){let o=r.parent;for(;o!==null;){if(t===o)break t;var P=o.next;if(P!==null){r=P;continue t}o=o.parent}}r=_}for(var h=0;h0||l.length>0)&&Wt(),C=0,U=null,e}finally{K=n,D=r}}async function Dr(){await Promise.resolve(),Wt()}function bn(t){var n=t.f,r=(n&w)!==0;if(r&&(n&L)!==0){var e=Nt(t);return yn(t),e}if(u!==null&&!A){g!==null&&g.includes(t)&&un();var l=u.deps;t.rvi.map(i=>d[i]); +var re=t=>{throw TypeError(t)};var ae=(t,e,s)=>e.has(t)||re("Cannot "+s);var P=(t,e,s)=>(ae(t,e,"read from private field"),s?s.call(t):e.get(t)),K=(t,e,s)=>e.has(t)?re("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),Z=(t,e,s,d)=>(ae(t,e,"write to private field"),d?d.call(t,s):e.set(t,s),s);import{a2 as j,a3 as ye,a4 as be,a5 as L,a6 as Ee,a7 as w,a8 as R,Q as M,X as y,x as $,a9 as Pe,aa as Re,v as we,h as B,A as oe,b as de,E as _e,ab as Se,ac as Oe,d as Ie,s as ne,ad as se,j as p,ae as ee,f as ve,L as Ae,M as Te,p as te,af as xe,ag as Le,ah as De,ai as Ce,aj as Ne,ak as ke,al as qe,t as ie,am as je,o as Be,an as Ue,ao as Fe,ap as he,Z as U,aq as Ve,ar as me,as as Ye,at as Me,q as Ke,J as Ze,V as Ge,u as He,au as ze,l as V,K as Je,av as G,R as Qe,S as We,U as Xe,_ as $e}from"../chunks/w9TiaPO3.js";import{h as pe,m as et,u as tt,s as rt}from"../chunks/Dp6gZg7-.js";import{a as N,t as ge,c as H,d as at}from"../chunks/Zxz7OfLJ.js";import{o as nt}from"../chunks/B3yT6szo.js";function D(t,e=null,s){if(typeof t!="object"||t===null||j in t)return t;const d=Re(t);if(d!==ye&&d!==be)return t;var a=new Map,c=we(t),f=L(0);c&&a.set("length",L(t.length));var i;return new Proxy(t,{defineProperty(l,r,n){(!("value"in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Ee();var o=a.get(r);return o===void 0?(o=L(n.value),a.set(r,o)):w(o,D(n.value,i)),!0},deleteProperty(l,r){var n=a.get(r);if(n===void 0)r in l&&a.set(r,L(R));else{if(c&&typeof r=="string"){var o=a.get("length"),u=Number(r);Number.isInteger(u)&&u=O.v&&w(O,I+1)}fe(f)}return!0},ownKeys(l){y(f);var r=Reflect.ownKeys(l).filter(u=>{var _=a.get(u);return _===void 0||_.v!==R});for(var[n,o]of a)o.v!==R&&!(n in l)&&r.push(n);return r},setPrototypeOf(){Pe()}})}function fe(t,e=1){w(t,t.v+e)}function z(t,e,s=!1){B&&oe();var d=t,a=null,c=null,f=R,i=s?_e:0,l=!1;const r=(o,u=!0)=>{l=!0,n(u,o)},n=(o,u)=>{if(f===(f=o))return;let _=!1;if(B){const h=d.data===Se;!!f===h&&(d=Oe(),Ie(d),ne(!1),_=!0)}f?(a?se(a):u&&(a=p(()=>u(d))),c&&ee(c,()=>{c=null})):(c?se(c):u&&(c=p(()=>u(d))),a&&ee(a,()=>{a=null})),_&&ne(!0)};de(()=>{l=!1,e(r),l||n(null,null)},i),B&&(d=ve)}function J(t,e,s){B&&oe();var d=t,a,c;de(()=>{a!==(a=e())&&(c&&(ee(c),c=null),a&&(c=p(()=>s(d,a))))},_e),B&&(d=ve)}function ue(t,e){return t===e||(t==null?void 0:t[j])===e}function Q(t={},e,s,d){return Ae(()=>{var a,c;return Te(()=>{a=c,c=[],te(()=>{t!==s(...c)&&(e(t,...c),a&&ue(s(...a),t)&&e(null,...a))})}),()=>{xe(()=>{c&&ue(s(...c),t)&&e(null,...c)})}}),t}let Y=!1;function st(t){var e=Y;try{return Y=!1,[t(),Y]}finally{Y=e}}function le(t){for(var e=$,s=$;e!==null&&(e.f&(ke|qe))===0;)e=e.parent;try{return ie(e),t()}finally{ie(s)}}function W(t,e,s,d){var k;var a=(s&je)!==0,c=!Be||(s&Ue)!==0,f=(s&Fe)!==0,i=(s&Ye)!==0,l=!1,r;f?[r,l]=st(()=>t[e]):r=t[e];var n=j in t||he in t,o=f&&(((k=M(t,e))==null?void 0:k.set)??(n&&e in t&&(g=>t[e]=g)))||void 0,u=d,_=!0,h=!1,v=()=>(h=!0,_&&(_=!1,i?u=te(d):u=d),u);r===void 0&&d!==void 0&&(o&&c&&Le(),r=v(),o&&o(r));var m;if(c)m=()=>{var g=t[e];return g===void 0?v():(_=!0,h=!1,g)};else{var O=le(()=>(a?U:Ve)(()=>t[e]));O.f|=De,m=()=>{var g=y(O);return g!==void 0&&(u=void 0),g===void 0?u:g}}if((s&Ce)===0)return m;if(o){var I=t.$$legacy;return function(g,x){return arguments.length>0?((!c||!x||I||l)&&o(x?m():g),g):m()}}var E=!1,A=!1,b=me(r),C=le(()=>U(()=>{var g=m(),x=y(b);return E?(E=!1,A=!0,x):(A=!1,b.v=g)}));return a||(C.equals=Ne),function(g,x){if(arguments.length>0){const q=x?y(C):c&&f?D(g):g;return C.equals(q)||(E=!0,w(b,q),h&&u!==void 0&&(u=q),te(()=>y(C))),g}return y(C)}}function it(t){return class extends ft{constructor(e){super({component:t,...e})}}}var T,S;class ft{constructor(e){K(this,T);K(this,S);var c;var s=new Map,d=(f,i)=>{var l=me(i);return s.set(f,l),l};const a=new Proxy({...e.props||{},$$events:{}},{get(f,i){return y(s.get(i)??d(i,Reflect.get(f,i)))},has(f,i){return i===he?!0:(y(s.get(i)??d(i,Reflect.get(f,i))),Reflect.has(f,i))},set(f,i,l){return w(s.get(i)??d(i,l),l),Reflect.set(f,i,l)}});Z(this,S,(e.hydrate?pe:et)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((c=e==null?void 0:e.props)!=null&&c.$$host)||e.sync===!1)&&Me(),Z(this,T,a.$$events);for(const f of Object.keys(P(this,S)))f==="$set"||f==="$destroy"||f==="$on"||Ke(this,f,{get(){return P(this,S)[f]},set(i){P(this,S)[f]=i},enumerable:!0});P(this,S).$set=f=>{Object.assign(a,f)},P(this,S).$destroy=()=>{tt(P(this,S))}}$set(e){P(this,S).$set(e)}$on(e,s){P(this,T)[e]=P(this,T)[e]||[];const d=(...a)=>s.call(this,...a);return P(this,T)[e].push(d),()=>{P(this,T)[e]=P(this,T)[e].filter(a=>a!==d)}}$destroy(){P(this,S).$destroy()}}T=new WeakMap,S=new WeakMap;const ut="modulepreload",lt=function(t,e){return new URL(t,e).href},ce={},X=function(e,s,d){let a=Promise.resolve();if(s&&s.length>0){const f=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));a=Promise.allSettled(s.map(r=>{if(r=lt(r,d),r in ce)return;ce[r]=!0;const n=r.endsWith(".css"),o=n?'[rel="stylesheet"]':"";if(!!d)for(let h=f.length-1;h>=0;h--){const v=f[h];if(v.href===r&&(!n||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${o}`))return;const _=document.createElement("link");if(_.rel=n?"stylesheet":ut,n||(_.as="script"),_.crossOrigin="",_.href=r,l&&_.setAttribute("nonce",l),document.head.appendChild(_),n)return new Promise((h,v)=>{_.addEventListener("load",h),_.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${r}`)))})}))}function c(f){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=f,window.dispatchEvent(i),!i.defaultPrevented)throw f}return a.then(f=>{for(const i of f||[])i.status==="rejected"&&c(i.reason);return e().catch(c)})},Et={};var ct=ge('
'),ot=ge(" ",1);function dt(t,e){Ze(e,!0);let s=W(e,"components",23,()=>[]),d=W(e,"data_0",3,null),a=W(e,"data_1",3,null);Ge(()=>e.stores.page.set(e.page)),He(()=>{e.stores,e.page,e.constructors,s(),e.form,d(),a(),e.stores.page.notify()});let c=G(!1),f=G(!1),i=G(null);nt(()=>{const v=e.stores.page.subscribe(()=>{y(c)&&(w(f,!0),ze().then(()=>{w(i,D(document.title||"untitled page"))}))});return w(c,!0),v});const l=U(()=>e.constructors[1]);var r=ot(),n=V(r);{var o=v=>{var m=H();const O=U(()=>e.constructors[0]);var I=V(m);J(I,()=>y(O),(E,A)=>{Q(A(E,{get data(){return d()},get form(){return e.form},children:(b,C)=>{var k=H(),g=V(k);J(g,()=>y(l),(x,q)=>{Q(q(x,{get data(){return a()},get form(){return e.form}}),F=>s()[1]=F,()=>{var F;return(F=s())==null?void 0:F[1]})}),N(b,k)},$$slots:{default:!0}}),b=>s()[0]=b,()=>{var b;return(b=s())==null?void 0:b[0]})}),N(v,m)},u=v=>{var m=H();const O=U(()=>e.constructors[0]);var I=V(m);J(I,()=>y(O),(E,A)=>{Q(A(E,{get data(){return d()},get form(){return e.form}}),b=>s()[0]=b,()=>{var b;return(b=s())==null?void 0:b[0]})}),N(v,m)};z(n,v=>{e.constructors[1]?v(o):v(u,!1)})}var _=Qe(n,2);{var h=v=>{var m=ct(),O=We(m);{var I=E=>{var A=at();$e(()=>rt(A,y(i))),N(E,A)};z(O,E=>{y(f)&&E(I)})}Xe(m),N(v,m)};z(_,v=>{y(c)&&v(h)})}N(t,r),Je()}const Pt=it(dt),Rt=[()=>X(()=>import("../nodes/0.pSvET1Gs.js"),__vite__mapDeps([0,1,2]),import.meta.url),()=>X(()=>import("../nodes/1.CHdn8i-6.js"),__vite__mapDeps([3,1,2,4,5,6,7,8]),import.meta.url),()=>X(()=>import("../nodes/2.Bd-zYXpb.js"),__vite__mapDeps([9,1,2,4,6]),import.meta.url)],wt=[],St={"/":[2]},_t={handleError:({error:t})=>{console.error(t)},reroute:()=>{},transport:{}},vt=Object.fromEntries(Object.entries(_t.transport).map(([t,e])=>[t,e.decode])),Ot=!1,It=(t,e)=>vt[t](e);export{It as decode,vt as decoders,St as dictionary,Ot as hash,_t as hooks,Et as matchers,Rt as nodes,Pt as root,wt as server_loads}; diff --git a/.svelte-kit/output/client/_app/immutable/entry/start.XpYumUTw.js b/.svelte-kit/output/client/_app/immutable/entry/start.XpYumUTw.js new file mode 100644 index 0000000..9807353 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/entry/start.XpYumUTw.js @@ -0,0 +1 @@ +import{l as o,a as r}from"../chunks/BHfX2tkW.js";export{o as load_css,r as start}; diff --git a/.svelte-kit/output/client/_app/immutable/nodes/0.pSvET1Gs.js b/.svelte-kit/output/client/_app/immutable/nodes/0.pSvET1Gs.js new file mode 100644 index 0000000..a766251 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/nodes/0.pSvET1Gs.js @@ -0,0 +1 @@ +import{c as s,a as f}from"../chunks/Zxz7OfLJ.js";import{b as i,E as p,j as c,n as d,k as m,h,f as l,l as u}from"../chunks/w9TiaPO3.js";function v(t,e,...a){var n=t,o=d,r;i(()=>{o!==(o=e())&&(r&&(m(r),r=null),r=c(()=>o(n,...a)))},p),h&&(n=l)}function E(t,e){var a=s(),n=u(a);v(n,()=>e.children),f(t,a)}export{E as component}; diff --git a/.svelte-kit/output/client/_app/immutable/nodes/1.CHdn8i-6.js b/.svelte-kit/output/client/_app/immutable/nodes/1.CHdn8i-6.js new file mode 100644 index 0000000..395481f --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/nodes/1.CHdn8i-6.js @@ -0,0 +1 @@ +import{a as b,t as k}from"../chunks/Zxz7OfLJ.js";import"../chunks/CZFlbmy6.js";import{V as x,u as i,m as $,p as y,W as l,X as v,Y as E,N as J,Z as K,J as N,l as R,_ as S,K as U,S as m,U as g,R as V}from"../chunks/w9TiaPO3.js";import{s as d}from"../chunks/Dp6gZg7-.js";import{u as W,s as X,p as s}from"../chunks/BHfX2tkW.js";function Y(n=!1){const e=$,t=e.l.u;if(!t)return;let a=()=>J(e.s);if(n){let o=0,r={};const p=K(()=>{let u=!1;const c=e.s;for(const f in c)c[f]!==r[f]&&(r[f]=c[f],u=!0);return u&&o++,o});a=()=>v(p)}t.b.length&&x(()=>{_(e,a),l(t.b)}),i(()=>{const o=y(()=>t.m.map(E));return()=>{for(const r of o)typeof r=="function"&&r()}}),t.a.length&&i(()=>{_(e,a),l(t.a)})}function _(n,e){if(n.l.s)for(const t of n.l.s)v(t);e()}const Z={get data(){return s.data},get error(){return s.error},get form(){return s.form},get params(){return s.params},get route(){return s.route},get state(){return s.state},get status(){return s.status},get url(){return s.url}};X.updated.check;const h=Z;var j=k("

",1);function C(n,e){N(e,!1),Y();var t=j(),a=R(t),o=m(a,!0);g(a);var r=V(a,2),p=m(r,!0);g(r),S(()=>{var u;d(o,h.status),d(p,(u=h.error)==null?void 0:u.message)}),b(n,t),U()}export{C as component}; diff --git a/.svelte-kit/output/client/_app/immutable/nodes/2.Bd-zYXpb.js b/.svelte-kit/output/client/_app/immutable/nodes/2.Bd-zYXpb.js new file mode 100644 index 0000000..dc15697 --- /dev/null +++ b/.svelte-kit/output/client/_app/immutable/nodes/2.Bd-zYXpb.js @@ -0,0 +1 @@ +import{a as w,t as b}from"../chunks/Zxz7OfLJ.js";import"../chunks/CZFlbmy6.js";import{L as I,p as k,M as T,N as S,O as x,P as A,Q as M,J as P,l as j,K as C,$ as O,R as L,S as N,T as f,U as R}from"../chunks/w9TiaPO3.js";import{h as D}from"../chunks/CEUsAAFn.js";function H(r,i,t){I(()=>{var e=k(()=>i(r,t==null?void 0:t())||{});if(e!=null&&e.update){var n=!1,h={};T(()=>{var a=t();S(a),n&&x(h,a)&&(h=a,e.update(a))}),n=!0}if(e!=null&&e.destroy)return()=>e.destroy()})}function U(r,i,t){var e=M(r,i);e&&e.set&&(r[i]=t,A(()=>{r[i]=null}))}var _=b(`

Hey! My name is

An experienced full stack developer, cybersecurity enthusiast, and Co-Op Computer Science Student at the University of Toronto active in CTFs, hackathons, programming competitions, and indie developer of the soon-to-be-released game Subterstrike

This site is still being ported! More of my projects are listed on my resume

Subterstrike Game Development

I am currently developing an underground-submarine openworld multiplayer physics inspired game. As a gamer and enjoyer of large, rich maps and depth to gameplay, I would really like to say thats what I started out trying to create. Instead, the story goes that I had this random idea for terrain manipulation. Games like Minecraft and Terraria use squares and cubes, which just feels boring in my opinion. I thought I could do something much more visceral As a sort of tech-demo/proof of concept I programmed a shape that could be modified by boolean geomerty operations, mainly union and subtract with a second polygon. This led to a very interesting, but quickly boring "game" to hop around in. However, since I could drill through and place prettymuch any shape I wanted to, it felt like I could "fly" through the land, much like a submarine "flies" through water.

I implemented some modularly built vehicles with use of graphs theory and object oriented programming, and terrain generation using cellular noise. The reason I used cellular noise is because if you look at the lines between cells, they form a network without dead ends. Then by applying an algorithm using a density function on depth I am able to fine tune the width and density of the caves without impacting their interconnectedness. By using this method chunks can generate completely independant of their neighbor, which is optimal.

"Multiplayer is the hardest part of game dev, maybe release that later" I have been told by a lot of people. However, as a hobby-server configurer and network security nerd, I thought I could take it on. I was right, however as a network security nerd I have more layers of firewalls than I do braincells. Every single time I have an issue with networking, its a firewall. Once I found which ports were blocked, yes multiplayer was easy.

The result? I could fly drilling vehicles through terrain, pop out of the ground or into random caves, mine materials, play hide and seek with friends, and even orbit the planet. One of the things important to me in this game was accurate phyiscs: thrust, torque, gravity, mass, all the fun stuff. While I am a physics minor, I am more importantly a heavy player of physics and rocket science games such as Kerbal Space Program. I was able to glide through AP physics simply because it just part of the games world, it included everything we would learn in the classroom. Realistic phyiscs also added to the depth of gameplay I was looking for.

After some formal computer science education, I discovered new ways to more efficiently implement many of the algorithms I had initially generated and rewrote them ...multiple times. Currently everything runs buttery smooth and framerates are high due to efficienct caching of unloaded chunks, multithreaded chunk generation, gpu accelerated compute shaders to modify chunk density, enhanced use of object oriented programing and graph algorithms to build massive modular vehicles, authoritative server networking to disable hackers, and other performance tweaks.

So this sounds amazing, wheres the game? Well, a game needs graphics, audio, a sound track. As much as I'd love to release it now, its unplayable for these reasons along with a few minor implementations left such as NPC's and reworking the tech tree. Currently I am contracting a graphical artist and sound designer. Alpha tests have been a lot of fun, and investors have appeared. The finish line is close.

Servers & Networking

Open source and networking hobbies led me to depoly a set of interconnected Linux servers:

  • NGINX Reverse Proxy

    This server is the internets access to all of my other servers, and the glue holding them together. Using IPTables traffic is forwarded from specified ports onto private servers connected to it.

  • Lightweight Server

    Running on Raspberry Pi, this servers main job is to run Subterstrike servers, Minecraft servers, other game servers, and this website you're looking at.

  • AI Server

    A powerful computer with an RX 6950 XT GPU runs my local AI servers such as Stable Diffusion image generation, Ollama and Open-WebUI LLMs. As this is also my primary devices it contains a file server.

Work Experience

  • Software Developer

    Parkside Pool needed to automate their systems, and I had already worked as the head lifeaurd and Director of Operations so I knew exactly what needed to be done. We needed to automate:

    1. Receiving swimming lesson applications and payments
    2. Design schedules based on many parameters include age, level, class size, siblings in adjacent classes, given availibility, and more soft requirements
    3. Send swimming lesson application confirmations

    Implementing the reception and confirmation of lessons was striaghtforward enough with a Flask site using Stripe for payments, and Firebase service for sending confirmation emails. The difficult part was building the schedule, which is a form of the Nurse Scheduling Problem. As there were at max a few hundred students per schedule, I solved this using a recursive algorithm and scoring system to choose the best generated option.

Volunteering

I volunteer within the Computer Science, Mathematics, and Statistics department at the University of Toronto as a Computer Science Ambassador to help cultivate interest in the Mathematical Sciences in high school students, as well as providing direction for first year students within the programs.

`,1);function G(r,i){P(i,!1);function t(a,d){let c=d,u=0,o=0,l="";const m=()=>{a.innerHTML="​"+l},y=s=>{setTimeout(()=>{m()},s)},p=()=>{const s=c[u],v=s[o]===" "?25:30;o{o>0?(l=l.slice(0,--o),setTimeout(g,20)):(u=(u+1)%c.length,l="",setTimeout(p,1250)),m()};return setTimeout(p,250),{onDestroy(){},update(s){c=s}}}var e=_();D(a=>{O.title="Jeremy Janella | Computer Scientist"});var n=j(e),h=L(N(n),2);return H(h,(a,d)=>t==null?void 0:t(a,d),()=>["Jeremy Janella"]),f(4),R(n),f(8),w(r,e),U(i,"animateTyping",t),C({animateTyping:t})}export{G as component}; diff --git a/.svelte-kit/output/client/_app/version.json b/.svelte-kit/output/client/_app/version.json new file mode 100644 index 0000000..c75ea0b --- /dev/null +++ b/.svelte-kit/output/client/_app/version.json @@ -0,0 +1 @@ +{"version":"1741895723022"} \ No newline at end of file diff --git a/.svelte-kit/output/client/favicon.png b/.svelte-kit/output/client/favicon.png new file mode 100644 index 0000000..825b9e6 Binary files /dev/null and b/.svelte-kit/output/client/favicon.png differ diff --git a/.svelte-kit/output/server/.vite/manifest.json b/.svelte-kit/output/server/.vite/manifest.json new file mode 100644 index 0000000..596b261 --- /dev/null +++ b/.svelte-kit/output/server/.vite/manifest.json @@ -0,0 +1,70 @@ +{ + ".svelte-kit/generated/server/internal.js": { + "file": "internal.js", + "name": "internal", + "src": ".svelte-kit/generated/server/internal.js", + "isEntry": true, + "imports": [ + "_internal.js" + ] + }, + "_equality.js": { + "file": "chunks/equality.js", + "name": "equality" + }, + "_exports.js": { + "file": "chunks/exports.js", + "name": "exports", + "imports": [ + "_equality.js" + ] + }, + "_index.js": { + "file": "chunks/index.js", + "name": "index" + }, + "_internal.js": { + "file": "chunks/internal.js", + "name": "internal", + "imports": [ + "_equality.js", + "_index.js" + ] + }, + "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte": { + "file": "entries/fallbacks/error.svelte.js", + "name": "entries/fallbacks/error.svelte", + "src": "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte", + "isEntry": true, + "imports": [ + "_index.js", + "_equality.js", + "_exports.js" + ] + }, + "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte": { + "file": "entries/fallbacks/layout.svelte.js", + "name": "entries/fallbacks/layout.svelte", + "src": "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte", + "isEntry": true + }, + "node_modules/@sveltejs/kit/src/runtime/server/index.js": { + "file": "index.js", + "name": "index", + "src": "node_modules/@sveltejs/kit/src/runtime/server/index.js", + "isEntry": true, + "imports": [ + "_internal.js", + "_exports.js" + ] + }, + "src/routes/+page.svelte": { + "file": "entries/pages/_page.svelte.js", + "name": "entries/pages/_page.svelte", + "src": "src/routes/+page.svelte", + "isEntry": true, + "imports": [ + "_index.js" + ] + } +} \ No newline at end of file diff --git a/.svelte-kit/output/server/chunks/equality.js b/.svelte-kit/output/server/chunks/equality.js new file mode 100644 index 0000000..f297d53 --- /dev/null +++ b/.svelte-kit/output/server/chunks/equality.js @@ -0,0 +1,27 @@ +var is_array = Array.isArray; +var index_of = Array.prototype.indexOf; +var array_from = Array.from; +var define_property = Object.defineProperty; +var get_descriptor = Object.getOwnPropertyDescriptor; +const noop = () => { +}; +function equals(value) { + return value === this.v; +} +function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function"; +} +function safe_equals(value) { + return !safe_not_equal(value, this.v); +} +export { + is_array as a, + array_from as b, + safe_not_equal as c, + define_property as d, + equals as e, + get_descriptor as g, + index_of as i, + noop as n, + safe_equals as s +}; diff --git a/.svelte-kit/output/server/chunks/exports.js b/.svelte-kit/output/server/chunks/exports.js new file mode 100644 index 0000000..8c39a4e --- /dev/null +++ b/.svelte-kit/output/server/chunks/exports.js @@ -0,0 +1,229 @@ +import { n as noop, c as safe_not_equal } from "./equality.js"; +import "clsx"; +const internal = new URL("sveltekit-internal://"); +function resolve(base, path) { + if (path[0] === "/" && path[1] === "/") return path; + let url = new URL(base, internal); + url = new URL(path, url); + return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href; +} +function normalize_path(path, trailing_slash) { + if (path === "/" || trailing_slash === "ignore") return path; + if (trailing_slash === "never") { + return path.endsWith("/") ? path.slice(0, -1) : path; + } else if (trailing_slash === "always" && !path.endsWith("/")) { + return path + "/"; + } + return path; +} +function decode_pathname(pathname) { + return pathname.split("%25").map(decodeURI).join("%25"); +} +function decode_params(params) { + for (const key in params) { + params[key] = decodeURIComponent(params[key]); + } + return params; +} +function make_trackable(url, callback, search_params_callback, allow_hash = false) { + const tracked = new URL(url); + Object.defineProperty(tracked, "searchParams", { + value: new Proxy(tracked.searchParams, { + get(obj, key) { + if (key === "get" || key === "getAll" || key === "has") { + return (param) => { + search_params_callback(param); + return obj[key](param); + }; + } + callback(); + const value = Reflect.get(obj, key); + return typeof value === "function" ? value.bind(obj) : value; + } + }), + enumerable: true, + configurable: true + }); + const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"]; + if (allow_hash) tracked_url_properties.push("hash"); + for (const property of tracked_url_properties) { + Object.defineProperty(tracked, property, { + get() { + callback(); + return url[property]; + }, + enumerable: true, + configurable: true + }); + } + { + tracked[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => { + return inspect(url, opts); + }; + tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => { + return inspect(url.searchParams, opts); + }; + } + if (!allow_hash) { + disable_hash(tracked); + } + return tracked; +} +function disable_hash(url) { + allow_nodejs_console_log(url); + Object.defineProperty(url, "hash", { + get() { + throw new Error( + "Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead" + ); + } + }); +} +function disable_search(url) { + allow_nodejs_console_log(url); + for (const property of ["search", "searchParams"]) { + Object.defineProperty(url, property, { + get() { + throw new Error(`Cannot access url.${property} on a page with prerendering enabled`); + } + }); + } +} +function allow_nodejs_console_log(url) { + { + url[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => { + return inspect(new URL(url), opts); + }; + } +} +const subscriber_queue = []; +function readable(value, start) { + return { + subscribe: writable(value, start).subscribe + }; +} +function writable(value, start = noop) { + let stop = null; + const subscribers = /* @__PURE__ */ new Set(); + function set(new_value) { + if (safe_not_equal(value, new_value)) { + value = new_value; + if (stop) { + const run_queue = !subscriber_queue.length; + for (const subscriber of subscribers) { + subscriber[1](); + subscriber_queue.push(subscriber, value); + } + if (run_queue) { + for (let i = 0; i < subscriber_queue.length; i += 2) { + subscriber_queue[i][0](subscriber_queue[i + 1]); + } + subscriber_queue.length = 0; + } + } + } + } + function update(fn) { + set(fn( + /** @type {T} */ + value + )); + } + function subscribe(run, invalidate = noop) { + const subscriber = [run, invalidate]; + subscribers.add(subscriber); + if (subscribers.size === 1) { + stop = start(set, update) || noop; + } + run( + /** @type {T} */ + value + ); + return () => { + subscribers.delete(subscriber); + if (subscribers.size === 0 && stop) { + stop(); + stop = null; + } + }; + } + return { set, update, subscribe }; +} +function validator(expected) { + function validate(module, file) { + if (!module) return; + for (const key in module) { + if (key[0] === "_" || expected.has(key)) continue; + const values = [...expected.values()]; + const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`; + throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`); + } + } + return validate; +} +function hint_for_supported_files(key, ext = ".js") { + const supported_files = []; + if (valid_layout_exports.has(key)) { + supported_files.push(`+layout${ext}`); + } + if (valid_page_exports.has(key)) { + supported_files.push(`+page${ext}`); + } + if (valid_layout_server_exports.has(key)) { + supported_files.push(`+layout.server${ext}`); + } + if (valid_page_server_exports.has(key)) { + supported_files.push(`+page.server${ext}`); + } + if (valid_server_exports.has(key)) { + supported_files.push(`+server${ext}`); + } + if (supported_files.length > 0) { + return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`; + } +} +const valid_layout_exports = /* @__PURE__ */ new Set([ + "load", + "prerender", + "csr", + "ssr", + "trailingSlash", + "config" +]); +const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]); +const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]); +const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]); +const valid_server_exports = /* @__PURE__ */ new Set([ + "GET", + "POST", + "PATCH", + "PUT", + "DELETE", + "OPTIONS", + "HEAD", + "fallback", + "prerender", + "trailingSlash", + "config", + "entries" +]); +const validate_layout_exports = validator(valid_layout_exports); +const validate_page_exports = validator(valid_page_exports); +const validate_layout_server_exports = validator(valid_layout_server_exports); +const validate_page_server_exports = validator(valid_page_server_exports); +const validate_server_exports = validator(valid_server_exports); +export { + decode_params as a, + resolve as b, + decode_pathname as c, + disable_search as d, + validate_layout_exports as e, + validate_page_server_exports as f, + validate_page_exports as g, + validate_server_exports as h, + make_trackable as m, + normalize_path as n, + readable as r, + validate_layout_server_exports as v, + writable as w +}; diff --git a/.svelte-kit/output/server/chunks/index.js b/.svelte-kit/output/server/chunks/index.js new file mode 100644 index 0000000..c7494b4 --- /dev/null +++ b/.svelte-kit/output/server/chunks/index.js @@ -0,0 +1,109 @@ +import "clsx"; +const HYDRATION_START = "["; +const HYDRATION_END = "]"; +const HYDRATION_ERROR = {}; +function lifecycle_outside_component(name) { + { + throw new Error(`https://svelte.dev/e/lifecycle_outside_component`); + } +} +var current_component = null; +function getContext(key) { + const context_map = get_or_init_context_map(); + const result = ( + /** @type {T} */ + context_map.get(key) + ); + return result; +} +function setContext(key, context) { + get_or_init_context_map().set(key, context); + return context; +} +function get_or_init_context_map(name) { + if (current_component === null) { + lifecycle_outside_component(); + } + return current_component.c ??= new Map(get_parent_context(current_component) || void 0); +} +function push(fn) { + current_component = { p: current_component, c: null, d: null }; +} +function pop() { + var component = ( + /** @type {Component} */ + current_component + ); + var ondestroy = component.d; + if (ondestroy) { + on_destroy.push(...ondestroy); + } + current_component = component.p; +} +function get_parent_context(component_context) { + let parent = component_context.p; + while (parent !== null) { + const context_map = parent.c; + if (context_map !== null) { + return context_map; + } + parent = parent.p; + } + return null; +} +const BLOCK_OPEN = ``; +const BLOCK_CLOSE = ``; +let on_destroy = []; +function render(component, options = {}) { + const payload = { out: "", css: /* @__PURE__ */ new Set(), head: { title: "", out: "" } }; + const prev_on_destroy = on_destroy; + on_destroy = []; + payload.out += BLOCK_OPEN; + if (options.context) { + push(); + current_component.c = options.context; + } + component(payload, options.props ?? {}, {}, {}); + if (options.context) { + pop(); + } + payload.out += BLOCK_CLOSE; + for (const cleanup of on_destroy) cleanup(); + on_destroy = prev_on_destroy; + let head2 = payload.head.out + payload.head.title; + for (const { hash, code } of payload.css) { + head2 += ``; + } + return { + head: head2, + html: payload.out, + body: payload.out + }; +} +function head(payload, fn) { + const head_payload = payload.head; + head_payload.out += BLOCK_OPEN; + fn(head_payload); + head_payload.out += BLOCK_CLOSE; +} +function bind_props(props_parent, props_now) { + for (const key in props_now) { + const initial_value = props_parent[key]; + const value = props_now[key]; + if (initial_value === void 0 && value !== void 0 && Object.getOwnPropertyDescriptor(props_parent, key)?.set) { + props_parent[key] = value; + } + } +} +export { + HYDRATION_ERROR as H, + HYDRATION_START as a, + HYDRATION_END as b, + pop as c, + bind_props as d, + getContext as g, + head as h, + push as p, + render as r, + setContext as s +}; diff --git a/.svelte-kit/output/server/chunks/internal.js b/.svelte-kit/output/server/chunks/internal.js new file mode 100644 index 0000000..b45f366 --- /dev/null +++ b/.svelte-kit/output/server/chunks/internal.js @@ -0,0 +1,1545 @@ +import { s as safe_equals, e as equals, g as get_descriptor, i as index_of, d as define_property, a as is_array, b as array_from } from "./equality.js"; +import { H as HYDRATION_ERROR, a as HYDRATION_START, b as HYDRATION_END, r as render, p as push$1, s as setContext, c as pop$1 } from "./index.js"; +import "clsx"; +const BROWSER = false; +let base = ""; +let assets = base; +const app_dir = "_app"; +const initial = { base, assets }; +function override(paths) { + base = paths.base; + assets = paths.assets; +} +function reset() { + base = initial.base; + assets = initial.assets; +} +function set_assets(path) { + assets = initial.assets = path; +} +let public_env = {}; +let safe_public_env = {}; +function set_private_env(environment) { +} +function set_public_env(environment) { + public_env = environment; +} +function set_safe_public_env(environment) { + safe_public_env = environment; +} +const DERIVED = 1 << 1; +const EFFECT = 1 << 2; +const RENDER_EFFECT = 1 << 3; +const BLOCK_EFFECT = 1 << 4; +const BRANCH_EFFECT = 1 << 5; +const ROOT_EFFECT = 1 << 6; +const BOUNDARY_EFFECT = 1 << 7; +const UNOWNED = 1 << 8; +const DISCONNECTED = 1 << 9; +const CLEAN = 1 << 10; +const DIRTY = 1 << 11; +const MAYBE_DIRTY = 1 << 12; +const INERT = 1 << 13; +const DESTROYED = 1 << 14; +const EFFECT_RAN = 1 << 15; +const EFFECT_TRANSPARENT = 1 << 16; +const HEAD_EFFECT = 1 << 19; +const EFFECT_HAS_DERIVED = 1 << 20; +const LEGACY_PROPS = Symbol("legacy props"); +function effect_update_depth_exceeded() { + { + throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`); + } +} +function hydration_failed() { + { + throw new Error(`https://svelte.dev/e/hydration_failed`); + } +} +function state_unsafe_local_read() { + { + throw new Error(`https://svelte.dev/e/state_unsafe_local_read`); + } +} +function state_unsafe_mutation() { + { + throw new Error(`https://svelte.dev/e/state_unsafe_mutation`); + } +} +let tracing_mode_flag = false; +function hydration_mismatch(location) { + { + console.warn(`https://svelte.dev/e/hydration_mismatch`); + } +} +let component_context = null; +function set_component_context(context) { + component_context = context; +} +function push(props, runes = false, fn) { + component_context = { + p: component_context, + c: null, + e: null, + m: false, + s: props, + x: null, + l: null + }; +} +function pop(component) { + const context_stack_item = component_context; + if (context_stack_item !== null) { + const component_effects = context_stack_item.e; + if (component_effects !== null) { + var previous_effect = active_effect; + var previous_reaction = active_reaction; + context_stack_item.e = null; + try { + for (var i = 0; i < component_effects.length; i++) { + var component_effect = component_effects[i]; + set_active_effect(component_effect.effect); + set_active_reaction(component_effect.reaction); + effect(component_effect.fn); + } + } finally { + set_active_effect(previous_effect); + set_active_reaction(previous_reaction); + } + } + component_context = context_stack_item.p; + context_stack_item.m = true; + } + return ( + /** @type {T} */ + {} + ); +} +function is_runes() { + return true; +} +function source(v, stack) { + var signal = { + f: 0, + // TODO ideally we could skip this altogether, but it causes type errors + v, + reactions: null, + equals, + rv: 0, + wv: 0 + }; + return signal; +} +// @__NO_SIDE_EFFECTS__ +function mutable_source(initial_value, immutable = false) { + const s = source(initial_value); + if (!immutable) { + s.equals = safe_equals; + } + return s; +} +function set(source2, value) { + if (active_reaction !== null && !untracking && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 && // If the source was created locally within the current derived, then + // we allow the mutation. + (derived_sources === null || !derived_sources.includes(source2))) { + state_unsafe_mutation(); + } + return internal_set(source2, value); +} +function internal_set(source2, value) { + if (!source2.equals(value)) { + source2.v; + source2.v = value; + source2.wv = increment_write_version(); + mark_reactions(source2, DIRTY); + if (active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) { + if (untracked_writes === null) { + set_untracked_writes([source2]); + } else { + untracked_writes.push(source2); + } + } + } + return value; +} +function mark_reactions(signal, status) { + var reactions = signal.reactions; + if (reactions === null) return; + var length = reactions.length; + for (var i = 0; i < length; i++) { + var reaction = reactions[i]; + var flags = reaction.f; + if ((flags & DIRTY) !== 0) continue; + set_signal_status(reaction, status); + if ((flags & (CLEAN | UNOWNED)) !== 0) { + if ((flags & DERIVED) !== 0) { + mark_reactions( + /** @type {Derived} */ + reaction, + MAYBE_DIRTY + ); + } else { + schedule_effect( + /** @type {Effect} */ + reaction + ); + } + } + } +} +let hydrating = false; +function set_hydrating(value) { + hydrating = value; +} +let hydrate_node; +function set_hydrate_node(node) { + if (node === null) { + hydration_mismatch(); + throw HYDRATION_ERROR; + } + return hydrate_node = node; +} +function hydrate_next() { + return set_hydrate_node( + /** @type {TemplateNode} */ + /* @__PURE__ */ get_next_sibling(hydrate_node) + ); +} +var $window; +var first_child_getter; +var next_sibling_getter; +function init_operations() { + if ($window !== void 0) { + return; + } + $window = window; + var element_prototype = Element.prototype; + var node_prototype = Node.prototype; + first_child_getter = get_descriptor(node_prototype, "firstChild").get; + next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get; + element_prototype.__click = void 0; + element_prototype.__className = ""; + element_prototype.__attributes = null; + element_prototype.__styles = null; + element_prototype.__e = void 0; + Text.prototype.__t = void 0; +} +function create_text(value = "") { + return document.createTextNode(value); +} +// @__NO_SIDE_EFFECTS__ +function get_first_child(node) { + return first_child_getter.call(node); +} +// @__NO_SIDE_EFFECTS__ +function get_next_sibling(node) { + return next_sibling_getter.call(node); +} +function clear_text_content(node) { + node.textContent = ""; +} +function destroy_derived_effects(derived) { + var effects = derived.effects; + if (effects !== null) { + derived.effects = null; + for (var i = 0; i < effects.length; i += 1) { + destroy_effect( + /** @type {Effect} */ + effects[i] + ); + } + } +} +function get_derived_parent_effect(derived) { + var parent = derived.parent; + while (parent !== null) { + if ((parent.f & DERIVED) === 0) { + return ( + /** @type {Effect} */ + parent + ); + } + parent = parent.parent; + } + return null; +} +function execute_derived(derived) { + var value; + var prev_active_effect = active_effect; + set_active_effect(get_derived_parent_effect(derived)); + { + try { + destroy_derived_effects(derived); + value = update_reaction(derived); + } finally { + set_active_effect(prev_active_effect); + } + } + return value; +} +function update_derived(derived) { + var value = execute_derived(derived); + var status = (skip_reaction || (derived.f & UNOWNED) !== 0) && derived.deps !== null ? MAYBE_DIRTY : CLEAN; + set_signal_status(derived, status); + if (!derived.equals(value)) { + derived.v = value; + derived.wv = increment_write_version(); + } +} +function destroy_derived(derived) { + destroy_derived_effects(derived); + remove_reactions(derived, 0); + set_signal_status(derived, DESTROYED); + derived.v = derived.deps = derived.ctx = derived.reactions = null; +} +function push_effect(effect2, parent_effect) { + var parent_last = parent_effect.last; + if (parent_last === null) { + parent_effect.last = parent_effect.first = effect2; + } else { + parent_last.next = effect2; + effect2.prev = parent_last; + parent_effect.last = effect2; + } +} +function create_effect(type, fn, sync, push2 = true) { + var is_root = (type & ROOT_EFFECT) !== 0; + var parent_effect = active_effect; + var effect2 = { + ctx: component_context, + deps: null, + nodes_start: null, + nodes_end: null, + f: type | DIRTY, + first: null, + fn, + last: null, + next: null, + parent: is_root ? null : parent_effect, + prev: null, + teardown: null, + transitions: null, + wv: 0 + }; + if (sync) { + var previously_flushing_effect = is_flushing_effect; + try { + set_is_flushing_effect(true); + update_effect(effect2); + effect2.f |= EFFECT_RAN; + } catch (e) { + destroy_effect(effect2); + throw e; + } finally { + set_is_flushing_effect(previously_flushing_effect); + } + } else if (fn !== null) { + schedule_effect(effect2); + } + var inert = sync && effect2.deps === null && effect2.first === null && effect2.nodes_start === null && effect2.teardown === null && (effect2.f & (EFFECT_HAS_DERIVED | BOUNDARY_EFFECT)) === 0; + if (!inert && !is_root && push2) { + if (parent_effect !== null) { + push_effect(effect2, parent_effect); + } + if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0) { + var derived = ( + /** @type {Derived} */ + active_reaction + ); + (derived.effects ??= []).push(effect2); + } + } + return effect2; +} +function component_root(fn) { + const effect2 = create_effect(ROOT_EFFECT, fn, true); + return (options2 = {}) => { + return new Promise((fulfil) => { + if (options2.outro) { + pause_effect(effect2, () => { + destroy_effect(effect2); + fulfil(void 0); + }); + } else { + destroy_effect(effect2); + fulfil(void 0); + } + }); + }; +} +function effect(fn) { + return create_effect(EFFECT, fn, false); +} +function branch(fn, push2 = true) { + return create_effect(RENDER_EFFECT | BRANCH_EFFECT, fn, true, push2); +} +function execute_effect_teardown(effect2) { + var teardown = effect2.teardown; + if (teardown !== null) { + const previous_reaction = active_reaction; + set_active_reaction(null); + try { + teardown.call(null); + } finally { + set_active_reaction(previous_reaction); + } + } +} +function destroy_effect_children(signal, remove_dom = false) { + var effect2 = signal.first; + signal.first = signal.last = null; + while (effect2 !== null) { + var next = effect2.next; + destroy_effect(effect2, remove_dom); + effect2 = next; + } +} +function destroy_block_effect_children(signal) { + var effect2 = signal.first; + while (effect2 !== null) { + var next = effect2.next; + if ((effect2.f & BRANCH_EFFECT) === 0) { + destroy_effect(effect2); + } + effect2 = next; + } +} +function destroy_effect(effect2, remove_dom = true) { + var removed = false; + if ((remove_dom || (effect2.f & HEAD_EFFECT) !== 0) && effect2.nodes_start !== null) { + var node = effect2.nodes_start; + var end = effect2.nodes_end; + while (node !== null) { + var next = node === end ? null : ( + /** @type {TemplateNode} */ + /* @__PURE__ */ get_next_sibling(node) + ); + node.remove(); + node = next; + } + removed = true; + } + destroy_effect_children(effect2, remove_dom && !removed); + remove_reactions(effect2, 0); + set_signal_status(effect2, DESTROYED); + var transitions = effect2.transitions; + if (transitions !== null) { + for (const transition of transitions) { + transition.stop(); + } + } + execute_effect_teardown(effect2); + var parent = effect2.parent; + if (parent !== null && parent.first !== null) { + unlink_effect(effect2); + } + effect2.next = effect2.prev = effect2.teardown = effect2.ctx = effect2.deps = effect2.fn = effect2.nodes_start = effect2.nodes_end = null; +} +function unlink_effect(effect2) { + var parent = effect2.parent; + var prev = effect2.prev; + var next = effect2.next; + if (prev !== null) prev.next = next; + if (next !== null) next.prev = prev; + if (parent !== null) { + if (parent.first === effect2) parent.first = next; + if (parent.last === effect2) parent.last = prev; + } +} +function pause_effect(effect2, callback) { + var transitions = []; + pause_children(effect2, transitions, true); + run_out_transitions(transitions, () => { + destroy_effect(effect2); + callback(); + }); +} +function run_out_transitions(transitions, fn) { + var remaining = transitions.length; + if (remaining > 0) { + var check = () => --remaining || fn(); + for (var transition of transitions) { + transition.out(check); + } + } else { + fn(); + } +} +function pause_children(effect2, transitions, local) { + if ((effect2.f & INERT) !== 0) return; + effect2.f ^= INERT; + if (effect2.transitions !== null) { + for (const transition of effect2.transitions) { + if (transition.is_global || local) { + transitions.push(transition); + } + } + } + var child = effect2.first; + while (child !== null) { + var sibling = child.next; + var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || (child.f & BRANCH_EFFECT) !== 0; + pause_children(child, transitions, transparent ? local : false); + child = sibling; + } +} +function flush_tasks() { +} +const FLUSH_MICROTASK = 0; +const FLUSH_SYNC = 1; +let is_throwing_error = false; +let scheduler_mode = FLUSH_MICROTASK; +let is_micro_task_queued = false; +let last_scheduled_effect = null; +let is_flushing_effect = false; +function set_is_flushing_effect(value) { + is_flushing_effect = value; +} +let queued_root_effects = []; +let flush_count = 0; +let dev_effect_stack = []; +let active_reaction = null; +let untracking = false; +function set_active_reaction(reaction) { + active_reaction = reaction; +} +let active_effect = null; +function set_active_effect(effect2) { + active_effect = effect2; +} +let derived_sources = null; +let new_deps = null; +let skipped_deps = 0; +let untracked_writes = null; +function set_untracked_writes(value) { + untracked_writes = value; +} +let write_version = 1; +let read_version = 0; +let skip_reaction = false; +function increment_write_version() { + return ++write_version; +} +function check_dirtiness(reaction) { + var flags = reaction.f; + if ((flags & DIRTY) !== 0) { + return true; + } + if ((flags & MAYBE_DIRTY) !== 0) { + var dependencies = reaction.deps; + var is_unowned = (flags & UNOWNED) !== 0; + if (dependencies !== null) { + var i; + var dependency; + var is_disconnected = (flags & DISCONNECTED) !== 0; + var is_unowned_connected = is_unowned && active_effect !== null && !skip_reaction; + var length = dependencies.length; + if (is_disconnected || is_unowned_connected) { + for (i = 0; i < length; i++) { + dependency = dependencies[i]; + if (is_disconnected || !dependency?.reactions?.includes(reaction)) { + (dependency.reactions ??= []).push(reaction); + } + } + if (is_disconnected) { + reaction.f ^= DISCONNECTED; + } + } + for (i = 0; i < length; i++) { + dependency = dependencies[i]; + if (check_dirtiness( + /** @type {Derived} */ + dependency + )) { + update_derived( + /** @type {Derived} */ + dependency + ); + } + if (dependency.wv > reaction.wv) { + return true; + } + } + } + if (!is_unowned || active_effect !== null && !skip_reaction) { + set_signal_status(reaction, CLEAN); + } + } + return false; +} +function propagate_error(error, effect2) { + var current = effect2; + while (current !== null) { + if ((current.f & BOUNDARY_EFFECT) !== 0) { + try { + current.fn(error); + return; + } catch { + current.f ^= BOUNDARY_EFFECT; + } + } + current = current.parent; + } + is_throwing_error = false; + throw error; +} +function should_rethrow_error(effect2) { + return (effect2.f & DESTROYED) === 0 && (effect2.parent === null || (effect2.parent.f & BOUNDARY_EFFECT) === 0); +} +function handle_error(error, effect2, previous_effect, component_context2) { + if (is_throwing_error) { + if (previous_effect === null) { + is_throwing_error = false; + } + if (should_rethrow_error(effect2)) { + throw error; + } + return; + } + if (previous_effect !== null) { + is_throwing_error = true; + } + { + propagate_error(error, effect2); + return; + } +} +function schedule_possible_effect_self_invalidation(signal, effect2, depth = 0) { + var reactions = signal.reactions; + if (reactions === null) return; + for (var i = 0; i < reactions.length; i++) { + var reaction = reactions[i]; + if ((reaction.f & DERIVED) !== 0) { + schedule_possible_effect_self_invalidation( + /** @type {Derived} */ + reaction, + effect2, + depth + 1 + ); + } else if (effect2 === reaction) { + if (depth === 0) { + set_signal_status(reaction, DIRTY); + } else if ((reaction.f & CLEAN) !== 0) { + set_signal_status(reaction, MAYBE_DIRTY); + } + schedule_effect( + /** @type {Effect} */ + reaction + ); + } + } +} +function update_reaction(reaction) { + var previous_deps = new_deps; + var previous_skipped_deps = skipped_deps; + var previous_untracked_writes = untracked_writes; + var previous_reaction = active_reaction; + var previous_skip_reaction = skip_reaction; + var prev_derived_sources = derived_sources; + var previous_component_context = component_context; + var previous_untracking = untracking; + var flags = reaction.f; + new_deps = /** @type {null | Value[]} */ + null; + skipped_deps = 0; + untracked_writes = null; + active_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null; + skip_reaction = (flags & UNOWNED) !== 0 && (!is_flushing_effect || // If we were previously not in a reactive context and we're reading an unowned derived + // that was created inside another reaction, then we don't fully know the real owner and thus + // we need to skip adding any reactions for this unowned + (previous_reaction === null || previous_untracking) && /** @type {Derived} */ + reaction.parent !== null); + derived_sources = null; + set_component_context(reaction.ctx); + untracking = false; + read_version++; + try { + var result = ( + /** @type {Function} */ + (0, reaction.fn)() + ); + var deps = reaction.deps; + if (new_deps !== null) { + var i; + remove_reactions(reaction, skipped_deps); + if (deps !== null && skipped_deps > 0) { + deps.length = skipped_deps + new_deps.length; + for (i = 0; i < new_deps.length; i++) { + deps[skipped_deps + i] = new_deps[i]; + } + } else { + reaction.deps = deps = new_deps; + } + if (!skip_reaction) { + for (i = skipped_deps; i < deps.length; i++) { + (deps[i].reactions ??= []).push(reaction); + } + } + } else if (deps !== null && skipped_deps < deps.length) { + remove_reactions(reaction, skipped_deps); + deps.length = skipped_deps; + } + if (is_runes() && untracked_writes !== null && (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0) { + for (i = 0; i < /** @type {Source[]} */ + untracked_writes.length; i++) { + schedule_possible_effect_self_invalidation( + untracked_writes[i], + /** @type {Effect} */ + reaction + ); + } + } + if (previous_reaction !== null) { + read_version++; + } + return result; + } finally { + new_deps = previous_deps; + skipped_deps = previous_skipped_deps; + untracked_writes = previous_untracked_writes; + active_reaction = previous_reaction; + skip_reaction = previous_skip_reaction; + derived_sources = prev_derived_sources; + set_component_context(previous_component_context); + untracking = previous_untracking; + } +} +function remove_reaction(signal, dependency) { + let reactions = dependency.reactions; + if (reactions !== null) { + var index = index_of.call(reactions, signal); + if (index !== -1) { + var new_length = reactions.length - 1; + if (new_length === 0) { + reactions = dependency.reactions = null; + } else { + reactions[index] = reactions[new_length]; + reactions.pop(); + } + } + } + if (reactions === null && (dependency.f & DERIVED) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear + // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps` + // allows us to skip the expensive work of disconnecting and immediately reconnecting it + (new_deps === null || !new_deps.includes(dependency))) { + set_signal_status(dependency, MAYBE_DIRTY); + if ((dependency.f & (UNOWNED | DISCONNECTED)) === 0) { + dependency.f ^= DISCONNECTED; + } + destroy_derived_effects( + /** @type {Derived} **/ + dependency + ); + remove_reactions( + /** @type {Derived} **/ + dependency, + 0 + ); + } +} +function remove_reactions(signal, start_index) { + var dependencies = signal.deps; + if (dependencies === null) return; + for (var i = start_index; i < dependencies.length; i++) { + remove_reaction(signal, dependencies[i]); + } +} +function update_effect(effect2) { + var flags = effect2.f; + if ((flags & DESTROYED) !== 0) { + return; + } + set_signal_status(effect2, CLEAN); + var previous_effect = active_effect; + var previous_component_context = component_context; + active_effect = effect2; + try { + if ((flags & BLOCK_EFFECT) !== 0) { + destroy_block_effect_children(effect2); + } else { + destroy_effect_children(effect2); + } + execute_effect_teardown(effect2); + var teardown = update_reaction(effect2); + effect2.teardown = typeof teardown === "function" ? teardown : null; + effect2.wv = write_version; + var deps = effect2.deps; + var dep; + if (BROWSER && tracing_mode_flag && (effect2.f & DIRTY) !== 0 && deps !== null) ; + if (BROWSER) ; + } catch (error) { + handle_error(error, effect2, previous_effect, previous_component_context || effect2.ctx); + } finally { + active_effect = previous_effect; + } +} +function infinite_loop_guard() { + if (flush_count > 1e3) { + flush_count = 0; + try { + effect_update_depth_exceeded(); + } catch (error) { + if (last_scheduled_effect !== null) { + { + handle_error(error, last_scheduled_effect, null); + } + } else { + throw error; + } + } + } + flush_count++; +} +function flush_queued_root_effects(root_effects) { + var length = root_effects.length; + if (length === 0) { + return; + } + infinite_loop_guard(); + var previously_flushing_effect = is_flushing_effect; + is_flushing_effect = true; + try { + for (var i = 0; i < length; i++) { + var effect2 = root_effects[i]; + if ((effect2.f & CLEAN) === 0) { + effect2.f ^= CLEAN; + } + var collected_effects = []; + process_effects(effect2, collected_effects); + flush_queued_effects(collected_effects); + } + } finally { + is_flushing_effect = previously_flushing_effect; + } +} +function flush_queued_effects(effects) { + var length = effects.length; + if (length === 0) return; + for (var i = 0; i < length; i++) { + var effect2 = effects[i]; + if ((effect2.f & (DESTROYED | INERT)) === 0) { + try { + if (check_dirtiness(effect2)) { + update_effect(effect2); + if (effect2.deps === null && effect2.first === null && effect2.nodes_start === null) { + if (effect2.teardown === null) { + unlink_effect(effect2); + } else { + effect2.fn = null; + } + } + } + } catch (error) { + handle_error(error, effect2, null, effect2.ctx); + } + } + } +} +function process_deferred() { + is_micro_task_queued = false; + if (flush_count > 1001) { + return; + } + const previous_queued_root_effects = queued_root_effects; + queued_root_effects = []; + flush_queued_root_effects(previous_queued_root_effects); + if (!is_micro_task_queued) { + flush_count = 0; + last_scheduled_effect = null; + } +} +function schedule_effect(signal) { + if (scheduler_mode === FLUSH_MICROTASK) { + if (!is_micro_task_queued) { + is_micro_task_queued = true; + queueMicrotask(process_deferred); + } + } + last_scheduled_effect = signal; + var effect2 = signal; + while (effect2.parent !== null) { + effect2 = effect2.parent; + var flags = effect2.f; + if ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) { + if ((flags & CLEAN) === 0) return; + effect2.f ^= CLEAN; + } + } + queued_root_effects.push(effect2); +} +function process_effects(effect2, collected_effects) { + var current_effect = effect2.first; + var effects = []; + main_loop: while (current_effect !== null) { + var flags = current_effect.f; + var is_branch = (flags & BRANCH_EFFECT) !== 0; + var is_skippable_branch = is_branch && (flags & CLEAN) !== 0; + var sibling = current_effect.next; + if (!is_skippable_branch && (flags & INERT) === 0) { + if ((flags & RENDER_EFFECT) !== 0) { + if (is_branch) { + current_effect.f ^= CLEAN; + } else { + var previous_active_reaction = active_reaction; + try { + active_reaction = current_effect; + if (check_dirtiness(current_effect)) { + update_effect(current_effect); + } + } catch (error) { + handle_error(error, current_effect, null, current_effect.ctx); + } finally { + active_reaction = previous_active_reaction; + } + } + var child = current_effect.first; + if (child !== null) { + current_effect = child; + continue; + } + } else if ((flags & EFFECT) !== 0) { + effects.push(current_effect); + } + } + if (sibling === null) { + let parent = current_effect.parent; + while (parent !== null) { + if (effect2 === parent) { + break main_loop; + } + var parent_sibling = parent.next; + if (parent_sibling !== null) { + current_effect = parent_sibling; + continue main_loop; + } + parent = parent.parent; + } + } + current_effect = sibling; + } + for (var i = 0; i < effects.length; i++) { + child = effects[i]; + collected_effects.push(child); + process_effects(child, collected_effects); + } +} +function flush_sync(fn) { + var previous_scheduler_mode = scheduler_mode; + var previous_queued_root_effects = queued_root_effects; + try { + infinite_loop_guard(); + const root_effects = []; + scheduler_mode = FLUSH_SYNC; + queued_root_effects = root_effects; + is_micro_task_queued = false; + flush_queued_root_effects(previous_queued_root_effects); + var result = fn?.(); + flush_tasks(); + if (queued_root_effects.length > 0 || root_effects.length > 0) { + flush_sync(); + } + flush_count = 0; + last_scheduled_effect = null; + if (BROWSER) ; + return result; + } finally { + scheduler_mode = previous_scheduler_mode; + queued_root_effects = previous_queued_root_effects; + } +} +function get(signal) { + var flags = signal.f; + var is_derived = (flags & DERIVED) !== 0; + if (is_derived && (flags & DESTROYED) !== 0) { + var value = execute_derived( + /** @type {Derived} */ + signal + ); + destroy_derived( + /** @type {Derived} */ + signal + ); + return value; + } + if (active_reaction !== null && !untracking) { + if (derived_sources !== null && derived_sources.includes(signal)) { + state_unsafe_local_read(); + } + var deps = active_reaction.deps; + if (signal.rv < read_version) { + signal.rv = read_version; + if (new_deps === null && deps !== null && deps[skipped_deps] === signal) { + skipped_deps++; + } else if (new_deps === null) { + new_deps = [signal]; + } else { + new_deps.push(signal); + } + } + } else if (is_derived && /** @type {Derived} */ + signal.deps === null && /** @type {Derived} */ + signal.effects === null) { + var derived = ( + /** @type {Derived} */ + signal + ); + var parent = derived.parent; + if (parent !== null && (parent.f & UNOWNED) === 0) { + derived.f ^= UNOWNED; + } + } + if (is_derived) { + derived = /** @type {Derived} */ + signal; + if (check_dirtiness(derived)) { + update_derived(derived); + } + } + return signal.v; +} +const STATUS_MASK = -7169; +function set_signal_status(signal, status) { + signal.f = signal.f & STATUS_MASK | status; +} +const PASSIVE_EVENTS = ["touchstart", "touchmove"]; +function is_passive_event(name) { + return PASSIVE_EVENTS.includes(name); +} +const all_registered_events = /* @__PURE__ */ new Set(); +const root_event_handles = /* @__PURE__ */ new Set(); +function handle_event_propagation(event) { + var handler_element = this; + var owner_document = ( + /** @type {Node} */ + handler_element.ownerDocument + ); + var event_name = event.type; + var path = event.composedPath?.() || []; + var current_target = ( + /** @type {null | Element} */ + path[0] || event.target + ); + var path_idx = 0; + var handled_at = event.__root; + if (handled_at) { + var at_idx = path.indexOf(handled_at); + if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */ + window)) { + event.__root = handler_element; + return; + } + var handler_idx = path.indexOf(handler_element); + if (handler_idx === -1) { + return; + } + if (at_idx <= handler_idx) { + path_idx = at_idx; + } + } + current_target = /** @type {Element} */ + path[path_idx] || event.target; + if (current_target === handler_element) return; + define_property(event, "currentTarget", { + configurable: true, + get() { + return current_target || owner_document; + } + }); + var previous_reaction = active_reaction; + var previous_effect = active_effect; + set_active_reaction(null); + set_active_effect(null); + try { + var throw_error; + var other_errors = []; + while (current_target !== null) { + var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */ + current_target.host || null; + try { + var delegated = current_target["__" + event_name]; + if (delegated !== void 0 && !/** @type {any} */ + current_target.disabled) { + if (is_array(delegated)) { + var [fn, ...data] = delegated; + fn.apply(current_target, [event, ...data]); + } else { + delegated.call(current_target, event); + } + } + } catch (error) { + if (throw_error) { + other_errors.push(error); + } else { + throw_error = error; + } + } + if (event.cancelBubble || parent_element === handler_element || parent_element === null) { + break; + } + current_target = parent_element; + } + if (throw_error) { + for (let error of other_errors) { + queueMicrotask(() => { + throw error; + }); + } + throw throw_error; + } + } finally { + event.__root = handler_element; + delete event.currentTarget; + set_active_reaction(previous_reaction); + set_active_effect(previous_effect); + } +} +function assign_nodes(start, end) { + var effect2 = ( + /** @type {Effect} */ + active_effect + ); + if (effect2.nodes_start === null) { + effect2.nodes_start = start; + effect2.nodes_end = end; + } +} +function mount(component, options2) { + return _mount(component, options2); +} +function hydrate(component, options2) { + init_operations(); + options2.intro = options2.intro ?? false; + const target = options2.target; + const was_hydrating = hydrating; + const previous_hydrate_node = hydrate_node; + try { + var anchor = ( + /** @type {TemplateNode} */ + /* @__PURE__ */ get_first_child(target) + ); + while (anchor && (anchor.nodeType !== 8 || /** @type {Comment} */ + anchor.data !== HYDRATION_START)) { + anchor = /** @type {TemplateNode} */ + /* @__PURE__ */ get_next_sibling(anchor); + } + if (!anchor) { + throw HYDRATION_ERROR; + } + set_hydrating(true); + set_hydrate_node( + /** @type {Comment} */ + anchor + ); + hydrate_next(); + const instance = _mount(component, { ...options2, anchor }); + if (hydrate_node === null || hydrate_node.nodeType !== 8 || /** @type {Comment} */ + hydrate_node.data !== HYDRATION_END) { + hydration_mismatch(); + throw HYDRATION_ERROR; + } + set_hydrating(false); + return ( + /** @type {Exports} */ + instance + ); + } catch (error) { + if (error === HYDRATION_ERROR) { + if (options2.recover === false) { + hydration_failed(); + } + init_operations(); + clear_text_content(target); + set_hydrating(false); + return mount(component, options2); + } + throw error; + } finally { + set_hydrating(was_hydrating); + set_hydrate_node(previous_hydrate_node); + } +} +const document_listeners = /* @__PURE__ */ new Map(); +function _mount(Component, { target, anchor, props = {}, events, context, intro = true }) { + init_operations(); + var registered_events = /* @__PURE__ */ new Set(); + var event_handle = (events2) => { + for (var i = 0; i < events2.length; i++) { + var event_name = events2[i]; + if (registered_events.has(event_name)) continue; + registered_events.add(event_name); + var passive = is_passive_event(event_name); + target.addEventListener(event_name, handle_event_propagation, { passive }); + var n = document_listeners.get(event_name); + if (n === void 0) { + document.addEventListener(event_name, handle_event_propagation, { passive }); + document_listeners.set(event_name, 1); + } else { + document_listeners.set(event_name, n + 1); + } + } + }; + event_handle(array_from(all_registered_events)); + root_event_handles.add(event_handle); + var component = void 0; + var unmount2 = component_root(() => { + var anchor_node = anchor ?? target.appendChild(create_text()); + branch(() => { + if (context) { + push({}); + var ctx = ( + /** @type {ComponentContext} */ + component_context + ); + ctx.c = context; + } + if (events) { + props.$$events = events; + } + if (hydrating) { + assign_nodes( + /** @type {TemplateNode} */ + anchor_node, + null + ); + } + component = Component(anchor_node, props) || {}; + if (hydrating) { + active_effect.nodes_end = hydrate_node; + } + if (context) { + pop(); + } + }); + return () => { + for (var event_name of registered_events) { + target.removeEventListener(event_name, handle_event_propagation); + var n = ( + /** @type {number} */ + document_listeners.get(event_name) + ); + if (--n === 0) { + document.removeEventListener(event_name, handle_event_propagation); + document_listeners.delete(event_name); + } else { + document_listeners.set(event_name, n); + } + } + root_event_handles.delete(event_handle); + if (anchor_node !== anchor) { + anchor_node.parentNode?.removeChild(anchor_node); + } + }; + }); + mounted_components.set(component, unmount2); + return component; +} +let mounted_components = /* @__PURE__ */ new WeakMap(); +function unmount(component, options2) { + const fn = mounted_components.get(component); + if (fn) { + mounted_components.delete(component); + return fn(options2); + } + return Promise.resolve(); +} +function asClassComponent$1(component) { + return class extends Svelte4Component { + /** @param {any} options */ + constructor(options2) { + super({ + component, + ...options2 + }); + } + }; +} +class Svelte4Component { + /** @type {any} */ + #events; + /** @type {Record} */ + #instance; + /** + * @param {ComponentConstructorOptions & { + * component: any; + * }} options + */ + constructor(options2) { + var sources = /* @__PURE__ */ new Map(); + var add_source = (key, value) => { + var s = /* @__PURE__ */ mutable_source(value); + sources.set(key, s); + return s; + }; + const props = new Proxy( + { ...options2.props || {}, $$events: {} }, + { + get(target, prop) { + return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); + }, + has(target, prop) { + if (prop === LEGACY_PROPS) return true; + get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); + return Reflect.has(target, prop); + }, + set(target, prop, value) { + set(sources.get(prop) ?? add_source(prop, value), value); + return Reflect.set(target, prop, value); + } + } + ); + this.#instance = (options2.hydrate ? hydrate : mount)(options2.component, { + target: options2.target, + anchor: options2.anchor, + props, + context: options2.context, + intro: options2.intro ?? false, + recover: options2.recover + }); + if (!options2?.props?.$$host || options2.sync === false) { + flush_sync(); + } + this.#events = props.$$events; + for (const key of Object.keys(this.#instance)) { + if (key === "$set" || key === "$destroy" || key === "$on") continue; + define_property(this, key, { + get() { + return this.#instance[key]; + }, + /** @param {any} value */ + set(value) { + this.#instance[key] = value; + }, + enumerable: true + }); + } + this.#instance.$set = /** @param {Record} next */ + (next) => { + Object.assign(props, next); + }; + this.#instance.$destroy = () => { + unmount(this.#instance); + }; + } + /** @param {Record} props */ + $set(props) { + this.#instance.$set(props); + } + /** + * @param {string} event + * @param {(...args: any[]) => any} callback + * @returns {any} + */ + $on(event, callback) { + this.#events[event] = this.#events[event] || []; + const cb = (...args) => callback.call(this, ...args); + this.#events[event].push(cb); + return () => { + this.#events[event] = this.#events[event].filter( + /** @param {any} fn */ + (fn) => fn !== cb + ); + }; + } + $destroy() { + this.#instance.$destroy(); + } +} +let read_implementation = null; +function set_read_implementation(fn) { + read_implementation = fn; +} +function set_manifest(_) { +} +function asClassComponent(component) { + const component_constructor = asClassComponent$1(component); + const _render = (props, { context } = {}) => { + const result = render(component, { props, context }); + return { + css: { code: "", map: null }, + head: result.head, + html: result.body + }; + }; + component_constructor.render = _render; + return component_constructor; +} +let prerendering = false; +function set_building() { +} +function set_prerendering() { + prerendering = true; +} +function Root($$payload, $$props) { + push$1(); + let { + stores, + page, + constructors, + components = [], + form, + data_0 = null, + data_1 = null + } = $$props; + { + setContext("__svelte__", stores); + } + { + stores.page.set(page); + } + const Pyramid_1 = constructors[1]; + if (constructors[1]) { + $$payload.out += ""; + const Pyramid_0 = constructors[0]; + $$payload.out += ``; + Pyramid_0($$payload, { + data: data_0, + form, + children: ($$payload2) => { + $$payload2.out += ``; + Pyramid_1($$payload2, { data: data_1, form }); + $$payload2.out += ``; + }, + $$slots: { default: true } + }); + $$payload.out += ``; + } else { + $$payload.out += ""; + const Pyramid_0 = constructors[0]; + $$payload.out += ``; + Pyramid_0($$payload, { data: data_0, form }); + $$payload.out += ``; + } + $$payload.out += ` `; + { + $$payload.out += ""; + } + $$payload.out += ``; + pop$1(); +} +const root = asClassComponent(Root); +const options = { + app_template_contains_nonce: false, + csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } }, + csrf_check_origin: true, + embedded: false, + env_public_prefix: "PUBLIC_", + env_private_prefix: "", + hash_routing: false, + hooks: null, + // added lazily, via `get_hooks` + preload_strategy: "modulepreload", + root, + service_worker: false, + templates: { + app: ({ head, body, assets: assets2, nonce, env }) => '\n\n \n \n \n \n \n \n
' + body + "
\n \n\n\n", + error: ({ status, message }) => '\n\n \n \n ' + message + ` + + + + +
+ ` + status + '\n
\n

' + message + "

\n
\n
\n \n\n" + }, + version_hash: "ym1mk4" +}; +async function get_hooks() { + let handle; + let handleFetch; + let handleError; + let init; + let reroute; + let transport; + return { + handle, + handleFetch, + handleError, + init, + reroute, + transport + }; +} +export { + BROWSER as B, + assets as a, + base as b, + app_dir as c, + read_implementation as d, + options as e, + set_private_env as f, + prerendering as g, + set_public_env as h, + get_hooks as i, + set_safe_public_env as j, + set_read_implementation as k, + set_assets as l, + set_building as m, + set_manifest as n, + override as o, + public_env as p, + set_prerendering as q, + reset as r, + safe_public_env as s +}; diff --git a/.svelte-kit/output/server/entries/fallbacks/error.svelte.js b/.svelte-kit/output/server/entries/fallbacks/error.svelte.js new file mode 100644 index 0000000..8829260 --- /dev/null +++ b/.svelte-kit/output/server/entries/fallbacks/error.svelte.js @@ -0,0 +1,132 @@ +import "clsx"; +import { g as getContext, c as pop, p as push } from "../../chunks/index.js"; +import { n as noop } from "../../chunks/equality.js"; +import { w as writable } from "../../chunks/exports.js"; +const CONTENT_REGEX = /[&<]/g; +function escape_html(value, is_attr) { + const str = String(value ?? ""); + const pattern = CONTENT_REGEX; + pattern.lastIndex = 0; + let escaped = ""; + let last = 0; + while (pattern.test(str)) { + const i = pattern.lastIndex - 1; + const ch = str[i]; + escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === '"' ? """ : "<"); + last = i + 1; + } + return escaped + str.substring(last); +} +const SNAPSHOT_KEY = "sveltekit:snapshot"; +const SCROLL_KEY = "sveltekit:scroll"; +function notifiable_store(value) { + const store = writable(value); + let ready = true; + function notify() { + ready = true; + store.update((val) => val); + } + function set(new_value) { + ready = false; + store.set(new_value); + } + function subscribe(run) { + let old_value; + return store.subscribe((new_value) => { + if (old_value === void 0 || ready && new_value !== old_value) { + run(old_value = new_value); + } + }); + } + return { notify, set, subscribe }; +} +function create_updated_store() { + const { set, subscribe } = writable(false); + { + return { + subscribe, + // eslint-disable-next-line @typescript-eslint/require-await + check: async () => false + }; + } +} +let updated; +const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString()); +if (is_legacy) { + ({ + data: {}, + form: null, + error: null, + params: {}, + route: { id: null }, + state: {}, + status: -1, + url: new URL("https://example.com") + }); + updated = { current: false }; +} else { + updated = new class Updated { + current = false; + }(); +} +function get(key, parse = JSON.parse) { + try { + return parse(sessionStorage[key]); + } catch { + } +} +get(SCROLL_KEY) ?? {}; +get(SNAPSHOT_KEY) ?? {}; +const stores = { + url: /* @__PURE__ */ notifiable_store({}), + page: /* @__PURE__ */ notifiable_store({}), + navigating: /* @__PURE__ */ writable( + /** @type {import('@sveltejs/kit').Navigation | null} */ + null + ), + updated: /* @__PURE__ */ create_updated_store() +}; +({ + get current() { + return updated.current; + }, + check: stores.updated.check +}); +function context() { + return getContext("__request__"); +} +const page$1 = { + get data() { + return context().page.data; + }, + get error() { + return context().page.error; + }, + get form() { + return context().page.form; + }, + get params() { + return context().page.params; + }, + get route() { + return context().page.route; + }, + get state() { + return context().page.state; + }, + get status() { + return context().page.status; + }, + get url() { + return context().page.url; + } +}; +const page = page$1; +function Error$1($$payload, $$props) { + push(); + $$payload.out += `

${escape_html(page.status)}

${escape_html(page.error?.message)}

`; + pop(); +} +export { + Error$1 as default +}; diff --git a/.svelte-kit/output/server/entries/fallbacks/layout.svelte.js b/.svelte-kit/output/server/entries/fallbacks/layout.svelte.js new file mode 100644 index 0000000..f3e50ef --- /dev/null +++ b/.svelte-kit/output/server/entries/fallbacks/layout.svelte.js @@ -0,0 +1,9 @@ +import "clsx"; +function Layout($$payload, $$props) { + let { children } = $$props; + children($$payload); + $$payload.out += ``; +} +export { + Layout as default +}; diff --git a/.svelte-kit/output/server/entries/pages/_page.svelte.js b/.svelte-kit/output/server/entries/pages/_page.svelte.js new file mode 100644 index 0000000..0606c6f --- /dev/null +++ b/.svelte-kit/output/server/entries/pages/_page.svelte.js @@ -0,0 +1,59 @@ +import { h as head, d as bind_props } from "../../chunks/index.js"; +function _page($$payload, $$props) { + function animateTyping(node, texts) { + let textsToType = texts; + let textsIndex = 0; + let charIndex = 0; + let currentText = ""; + const updateInnerHTML = () => { + node.innerHTML = "​" + currentText; + }; + const waitMsec = (delay) => { + setTimeout( + () => { + updateInnerHTML(); + }, + delay + ); + }; + const typeEffect = () => { + const currentString = textsToType[textsIndex]; + const delay = currentString[charIndex] === " " ? 25 : 30; + if (charIndex < currentString.length) { + currentText += currentString[charIndex++]; + setTimeout(typeEffect, delay); + } else { + waitMsec(3e3); + setTimeout(deleteEffect, 6e3); + } + updateInnerHTML(); + }; + const deleteEffect = () => { + if (charIndex > 0) { + currentText = currentText.slice(0, --charIndex); + setTimeout(deleteEffect, 20); + } else { + textsIndex = (textsIndex + 1) % textsToType.length; + currentText = ""; + setTimeout(typeEffect, 1250); + } + updateInnerHTML(); + }; + setTimeout(typeEffect, 250); + return { + onDestroy() { + }, + update(newTexts) { + textsToType = newTexts; + } + }; + } + head($$payload, ($$payload2) => { + $$payload2.title = `Jeremy Janella | Computer Scientist`; + }); + $$payload.out += `

Hey! My name is

An experienced full stack developer, cybersecurity enthusiast, and Co-Op Computer Science Student at the University of Toronto active in CTFs, hackathons, programming competitions, and indie developer of the soon-to-be-released game Subterstrike

This site is still being ported! More of my projects are listed on my resume

Subterstrike Game Development

I am currently developing an underground-submarine openworld multiplayer physics inspired game. As a gamer and enjoyer of large, rich maps and depth to gameplay, I would really like to say thats what I started out trying to create. Instead, the story goes that I had this random idea for terrain manipulation. Games like Minecraft and Terraria use squares and cubes, which just feels boring in my opinion. I thought I could do something much more visceral As a sort of tech-demo/proof of concept I programmed a shape that could be modified by boolean geomerty operations, mainly union and subtract with a second polygon. This led to a very interesting, but quickly boring "game" to hop around in. However, since I could drill through and place prettymuch any shape I wanted to, it felt like I could "fly" through the land, much like a submarine "flies" through water.

I implemented some modularly built vehicles with use of graphs theory and object oriented programming, and terrain generation using cellular noise. The reason I used cellular noise is because if you look at the lines between cells, they form a network without dead ends. Then by applying an algorithm using a density function on depth I am able to fine tune the width and density of the caves without impacting their interconnectedness. By using this method chunks can generate completely independant of their neighbor, which is optimal.

"Multiplayer is the hardest part of game dev, maybe release that later" I have been told by a lot of people. However, as a hobby-server configurer and network security nerd, I thought I could take it on. I was right, however as a network security nerd I have more layers of firewalls than I do braincells. Every single time I have an issue with networking, its a firewall. Once I found which ports were blocked, yes multiplayer was easy.

The result? I could fly drilling vehicles through terrain, pop out of the ground or into random caves, mine materials, play hide and seek with friends, and even orbit the planet. One of the things important to me in this game was accurate phyiscs: thrust, torque, gravity, mass, all the fun stuff. While I am a physics minor, I am more importantly a heavy player of physics and rocket science games such as Kerbal Space Program. I was able to glide through AP physics simply because it just part of the games world, it included everything we would learn in the classroom. Realistic phyiscs also added to the depth of gameplay I was looking for.

After some formal computer science education, I discovered new ways to more efficiently implement many of the algorithms I had initially generated and rewrote them ...multiple times. Currently everything runs buttery smooth and framerates are high due to efficienct caching of unloaded chunks, multithreaded chunk generation, gpu accelerated compute shaders to modify chunk density, enhanced use of object oriented programing and graph algorithms to build massive modular vehicles, authoritative server networking to disable hackers, and other performance tweaks.

So this sounds amazing, wheres the game? Well, a game needs graphics, audio, a sound track. As much as I'd love to release it now, its unplayable for these reasons along with a few minor implementations left such as NPC's and reworking the tech tree. Currently I am contracting a graphical artist and sound designer. Alpha tests have been a lot of fun, and investors have appeared. The finish line is close.

Servers & Networking

Open source and networking hobbies led me to depoly a set of interconnected Linux servers:

  • NGINX Reverse Proxy

    This server is the internets access to all of my other servers, and the glue holding them together. Using IPTables traffic is forwarded from specified ports onto private servers connected to it.

  • Lightweight Server

    Running on Raspberry Pi, this servers main job is to run Subterstrike servers, Minecraft servers, other game servers, and this website you're looking at.

  • AI Server

    A powerful computer with an RX 6950 XT GPU runs my local AI servers such as Stable Diffusion image generation, Ollama and Open-WebUI LLMs. As this is also my primary devices it contains a file server.

Work Experience

  • Software Developer

    Parkside Pool needed to automate their systems, and I had already worked as the head lifeaurd and Director of Operations so I knew exactly what needed to be done. We needed to automate:

    1. Receiving swimming lesson applications and payments
    2. Design schedules based on many parameters include age, level, class size, siblings in adjacent classes, given availibility, and more soft requirements
    3. Send swimming lesson application confirmations

    Implementing the reception and confirmation of lessons was striaghtforward enough with a Flask site using Stripe for payments, and Firebase service for sending confirmation emails. The difficult part was building the schedule, which is a form of the Nurse Scheduling Problem. As there were at max a few hundred students per schedule, I solved this using a recursive algorithm and scoring system to choose the best generated option.

Volunteering

I volunteer within the Computer Science, Mathematics, and Statistics department at the University of Toronto as a Computer Science Ambassador to help cultivate interest in the Mathematical Sciences in high school students, as well as providing direction for first year students within the programs.

`; + bind_props($$props, { animateTyping }); +} +export { + _page as default +}; diff --git a/.svelte-kit/output/server/index.js b/.svelte-kit/output/server/index.js new file mode 100644 index 0000000..f9bb5fa --- /dev/null +++ b/.svelte-kit/output/server/index.js @@ -0,0 +1,3144 @@ +import { a as assets, b as base, o as override, r as reset, c as app_dir, p as public_env, s as safe_public_env, B as BROWSER, d as read_implementation, e as options, f as set_private_env, g as prerendering, h as set_public_env, i as get_hooks, j as set_safe_public_env, k as set_read_implementation } from "./chunks/internal.js"; +import * as devalue from "devalue"; +import { m as make_trackable, d as disable_search, a as decode_params, w as writable, r as readable, n as normalize_path, b as resolve, c as decode_pathname, v as validate_layout_server_exports, e as validate_layout_exports, f as validate_page_server_exports, g as validate_page_exports, h as validate_server_exports } from "./chunks/exports.js"; +import { parse, serialize } from "cookie"; +import * as set_cookie_parser from "set-cookie-parser"; +const SVELTE_KIT_ASSETS = "/_svelte_kit_assets"; +const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]; +const PAGE_METHODS = ["GET", "POST", "HEAD"]; +function negotiate(accept, types) { + const parts = []; + accept.split(",").forEach((str, i) => { + const match = /([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str); + if (match) { + const [, type, subtype, q = "1"] = match; + parts.push({ type, subtype, q: +q, i }); + } + }); + parts.sort((a, b) => { + if (a.q !== b.q) { + return b.q - a.q; + } + if (a.subtype === "*" !== (b.subtype === "*")) { + return a.subtype === "*" ? 1 : -1; + } + if (a.type === "*" !== (b.type === "*")) { + return a.type === "*" ? 1 : -1; + } + return a.i - b.i; + }); + let accepted; + let min_priority = Infinity; + for (const mimetype of types) { + const [type, subtype] = mimetype.split("/"); + const priority = parts.findIndex( + (part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*") + ); + if (priority !== -1 && priority < min_priority) { + accepted = mimetype; + min_priority = priority; + } + } + return accepted; +} +function is_content_type(request, ...types) { + const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? ""; + return types.includes(type.toLowerCase()); +} +function is_form_content_type(request) { + return is_content_type( + request, + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain" + ); +} +class HttpError { + /** + * @param {number} status + * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body + */ + constructor(status, body2) { + this.status = status; + if (typeof body2 === "string") { + this.body = { message: body2 }; + } else if (body2) { + this.body = body2; + } else { + this.body = { message: `Error: ${status}` }; + } + } + toString() { + return JSON.stringify(this.body); + } +} +class Redirect { + /** + * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status + * @param {string} location + */ + constructor(status, location) { + this.status = status; + this.location = location; + } +} +class SvelteKitError extends Error { + /** + * @param {number} status + * @param {string} text + * @param {string} message + */ + constructor(status, text2, message) { + super(message); + this.status = status; + this.text = text2; + } +} +class ActionFailure { + /** + * @param {number} status + * @param {T} data + */ + constructor(status, data) { + this.status = status; + this.data = data; + } +} +function json(data, init2) { + const body2 = JSON.stringify(data); + const headers2 = new Headers(init2?.headers); + if (!headers2.has("content-length")) { + headers2.set("content-length", encoder$3.encode(body2).byteLength.toString()); + } + if (!headers2.has("content-type")) { + headers2.set("content-type", "application/json"); + } + return new Response(body2, { + ...init2, + headers: headers2 + }); +} +const encoder$3 = new TextEncoder(); +function text(body2, init2) { + const headers2 = new Headers(init2?.headers); + if (!headers2.has("content-length")) { + const encoded = encoder$3.encode(body2); + headers2.set("content-length", encoded.byteLength.toString()); + return new Response(encoded, { + ...init2, + headers: headers2 + }); + } + return new Response(body2, { + ...init2, + headers: headers2 + }); +} +function coalesce_to_error(err) { + return err instanceof Error || err && /** @type {any} */ + err.name && /** @type {any} */ + err.message ? ( + /** @type {Error} */ + err + ) : new Error(JSON.stringify(err)); +} +function normalize_error(error) { + return ( + /** @type {import('../runtime/control.js').Redirect | HttpError | SvelteKitError | Error} */ + error + ); +} +function get_status(error) { + return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500; +} +function get_message(error) { + return error instanceof SvelteKitError ? error.text : "Internal Error"; +} +const escape_html_attr_dict = { + "&": "&", + '"': """ + // Svelte also escapes < because the escape function could be called inside a `noscript` there + // https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c + // However, that doesn't apply in SvelteKit +}; +const escape_html_dict = { + "&": "&", + "<": "<" +}; +const surrogates = ( + // high surrogate without paired low surrogate + "[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]" +); +const escape_html_attr_regex = new RegExp( + `[${Object.keys(escape_html_attr_dict).join("")}]|` + surrogates, + "g" +); +const escape_html_regex = new RegExp( + `[${Object.keys(escape_html_dict).join("")}]|` + surrogates, + "g" +); +function escape_html(str, is_attr) { + const dict = is_attr ? escape_html_attr_dict : escape_html_dict; + const escaped_str = str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => { + if (match.length === 2) { + return match; + } + return dict[match] ?? `&#${match.charCodeAt(0)};`; + }); + return escaped_str; +} +function method_not_allowed(mod, method) { + return text(`${method} method not allowed`, { + status: 405, + headers: { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 + // "The server must generate an Allow header field in a 405 status code response" + allow: allowed_methods(mod).join(", ") + } + }); +} +function allowed_methods(mod) { + const allowed = ENDPOINT_METHODS.filter((method) => method in mod); + if ("GET" in mod || "HEAD" in mod) allowed.push("HEAD"); + return allowed; +} +function static_error_page(options2, status, message) { + let page = options2.templates.error({ status, message: escape_html(message) }); + return text(page, { + headers: { "content-type": "text/html; charset=utf-8" }, + status + }); +} +async function handle_fatal_error(event, options2, error) { + error = error instanceof HttpError ? error : coalesce_to_error(error); + const status = get_status(error); + const body2 = await handle_error_and_jsonify(event, options2, error); + const type = negotiate(event.request.headers.get("accept") || "text/html", [ + "application/json", + "text/html" + ]); + if (event.isDataRequest || type === "application/json") { + return json(body2, { + status + }); + } + return static_error_page(options2, status, body2.message); +} +async function handle_error_and_jsonify(event, options2, error) { + if (error instanceof HttpError) { + return error.body; + } + const status = get_status(error); + const message = get_message(error); + return await options2.hooks.handleError({ error, event, status, message }) ?? { message }; +} +function redirect_response(status, location) { + const response = new Response(void 0, { + status, + headers: { location } + }); + return response; +} +function clarify_devalue_error(event, error) { + if (error.path) { + return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (data${error.path})`; + } + if (error.path === "") { + return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`; + } + return error.message; +} +function stringify_uses(node) { + const uses = []; + if (node.uses && node.uses.dependencies.size > 0) { + uses.push(`"dependencies":${JSON.stringify(Array.from(node.uses.dependencies))}`); + } + if (node.uses && node.uses.search_params.size > 0) { + uses.push(`"search_params":${JSON.stringify(Array.from(node.uses.search_params))}`); + } + if (node.uses && node.uses.params.size > 0) { + uses.push(`"params":${JSON.stringify(Array.from(node.uses.params))}`); + } + if (node.uses?.parent) uses.push('"parent":1'); + if (node.uses?.route) uses.push('"route":1'); + if (node.uses?.url) uses.push('"url":1'); + return `"uses":{${uses.join(",")}}`; +} +async function render_endpoint(event, mod, state) { + const method = ( + /** @type {import('types').HttpMethod} */ + event.request.method + ); + let handler = mod[method] || mod.fallback; + if (method === "HEAD" && mod.GET && !mod.HEAD) { + handler = mod.GET; + } + if (!handler) { + return method_not_allowed(mod, method); + } + const prerender = mod.prerender ?? state.prerender_default; + if (prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) { + throw new Error("Cannot prerender endpoints that have mutative methods"); + } + if (state.prerendering && !prerender) { + if (state.depth > 0) { + throw new Error(`${event.route.id} is not prerenderable`); + } else { + return new Response(void 0, { status: 204 }); + } + } + try { + let response = await handler( + /** @type {import('@sveltejs/kit').RequestEvent>} */ + event + ); + if (!(response instanceof Response)) { + throw new Error( + `Invalid response from route ${event.url.pathname}: handler should return a Response object` + ); + } + if (state.prerendering) { + response = new Response(response.body, { + status: response.status, + statusText: response.statusText, + headers: new Headers(response.headers) + }); + response.headers.set("x-sveltekit-prerender", String(prerender)); + } + return response; + } catch (e) { + if (e instanceof Redirect) { + return new Response(void 0, { + status: e.status, + headers: { location: e.location } + }); + } + throw e; + } +} +function is_endpoint_request(event) { + const { method, headers: headers2 } = event.request; + if (ENDPOINT_METHODS.includes(method) && !PAGE_METHODS.includes(method)) { + return true; + } + if (method === "POST" && headers2.get("x-sveltekit-action") === "true") return false; + const accept = event.request.headers.get("accept") ?? "*/*"; + return negotiate(accept, ["*", "text/html"]) !== "text/html"; +} +function compact(arr) { + return arr.filter( + /** @returns {val is NonNullable} */ + (val) => val != null + ); +} +const DATA_SUFFIX = "/__data.json"; +const HTML_DATA_SUFFIX = ".html__data.json"; +function has_data_suffix(pathname) { + return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX); +} +function add_data_suffix(pathname) { + if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX); + return pathname.replace(/\/$/, "") + DATA_SUFFIX; +} +function strip_data_suffix(pathname) { + if (pathname.endsWith(HTML_DATA_SUFFIX)) { + return pathname.slice(0, -HTML_DATA_SUFFIX.length) + ".html"; + } + return pathname.slice(0, -DATA_SUFFIX.length); +} +const ROUTE_SUFFIX = "/__route.js"; +function has_resolution_suffix(pathname) { + return pathname.endsWith(ROUTE_SUFFIX); +} +function add_resolution_suffix(pathname) { + return pathname.replace(/\/$/, "") + ROUTE_SUFFIX; +} +function strip_resolution_suffix(pathname) { + return pathname.slice(0, -ROUTE_SUFFIX.length); +} +function is_action_json_request(event) { + const accept = negotiate(event.request.headers.get("accept") ?? "*/*", [ + "application/json", + "text/html" + ]); + return accept === "application/json" && event.request.method === "POST"; +} +async function handle_action_json_request(event, options2, server) { + const actions = server?.actions; + if (!actions) { + const no_actions_error = new SvelteKitError( + 405, + "Method Not Allowed", + `POST method not allowed. No form actions exist for ${"this page"}` + ); + return action_json( + { + type: "error", + error: await handle_error_and_jsonify(event, options2, no_actions_error) + }, + { + status: no_actions_error.status, + headers: { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 + // "The server must generate an Allow header field in a 405 status code response" + allow: "GET" + } + } + ); + } + check_named_default_separate(actions); + try { + const data = await call_action(event, actions); + if (false) ; + if (data instanceof ActionFailure) { + return action_json({ + type: "failure", + status: data.status, + // @ts-expect-error we assign a string to what is supposed to be an object. That's ok + // because we don't use the object outside, and this way we have better code navigation + // through knowing where the related interface is used. + data: stringify_action_response( + data.data, + /** @type {string} */ + event.route.id, + options2.hooks.transport + ) + }); + } else { + return action_json({ + type: "success", + status: data ? 200 : 204, + // @ts-expect-error see comment above + data: stringify_action_response( + data, + /** @type {string} */ + event.route.id, + options2.hooks.transport + ) + }); + } + } catch (e) { + const err = normalize_error(e); + if (err instanceof Redirect) { + return action_json_redirect(err); + } + return action_json( + { + type: "error", + error: await handle_error_and_jsonify(event, options2, check_incorrect_fail_use(err)) + }, + { + status: get_status(err) + } + ); + } +} +function check_incorrect_fail_use(error) { + return error instanceof ActionFailure ? new Error('Cannot "throw fail()". Use "return fail()"') : error; +} +function action_json_redirect(redirect) { + return action_json({ + type: "redirect", + status: redirect.status, + location: redirect.location + }); +} +function action_json(data, init2) { + return json(data, init2); +} +function is_action_request(event) { + return event.request.method === "POST"; +} +async function handle_action_request(event, server) { + const actions = server?.actions; + if (!actions) { + event.setHeaders({ + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 + // "The server must generate an Allow header field in a 405 status code response" + allow: "GET" + }); + return { + type: "error", + error: new SvelteKitError( + 405, + "Method Not Allowed", + `POST method not allowed. No form actions exist for ${"this page"}` + ) + }; + } + check_named_default_separate(actions); + try { + const data = await call_action(event, actions); + if (false) ; + if (data instanceof ActionFailure) { + return { + type: "failure", + status: data.status, + data: data.data + }; + } else { + return { + type: "success", + status: 200, + // @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission + data + }; + } + } catch (e) { + const err = normalize_error(e); + if (err instanceof Redirect) { + return { + type: "redirect", + status: err.status, + location: err.location + }; + } + return { + type: "error", + error: check_incorrect_fail_use(err) + }; + } +} +function check_named_default_separate(actions) { + if (actions.default && Object.keys(actions).length > 1) { + throw new Error( + "When using named actions, the default action cannot be used. See the docs for more info: https://svelte.dev/docs/kit/form-actions#named-actions" + ); + } +} +async function call_action(event, actions) { + const url = new URL(event.request.url); + let name = "default"; + for (const param of url.searchParams) { + if (param[0].startsWith("/")) { + name = param[0].slice(1); + if (name === "default") { + throw new Error('Cannot use reserved action name "default"'); + } + break; + } + } + const action = actions[name]; + if (!action) { + throw new SvelteKitError(404, "Not Found", `No action with name '${name}' found`); + } + if (!is_form_content_type(event.request)) { + throw new SvelteKitError( + 415, + "Unsupported Media Type", + `Form actions expect form-encoded data — received ${event.request.headers.get( + "content-type" + )}` + ); + } + return action(event); +} +function validate_action_return(data) { + if (data instanceof Redirect) { + throw new Error("Cannot `return redirect(...)` — use `redirect(...)` instead"); + } + if (data instanceof HttpError) { + throw new Error("Cannot `return error(...)` — use `error(...)` or `return fail(...)` instead"); + } +} +function uneval_action_response(data, route_id, transport) { + const replacer = (thing) => { + for (const key2 in transport) { + const encoded = transport[key2].encode(thing); + if (encoded) { + return `app.decode('${key2}', ${devalue.uneval(encoded, replacer)})`; + } + } + }; + return try_serialize(data, (value) => devalue.uneval(value, replacer), route_id); +} +function stringify_action_response(data, route_id, transport) { + const encoders = Object.fromEntries( + Object.entries(transport).map(([key2, value]) => [key2, value.encode]) + ); + return try_serialize(data, (value) => devalue.stringify(value, encoders), route_id); +} +function try_serialize(data, fn, route_id) { + try { + return fn(data); + } catch (e) { + const error = ( + /** @type {any} */ + e + ); + if (data instanceof Response) { + throw new Error( + `Data returned from action inside ${route_id} is not serializable. Form actions need to return plain objects or fail(). E.g. return { success: true } or return fail(400, { message: "invalid" });` + ); + } + if ("path" in error) { + let message = `Data returned from action inside ${route_id} is not serializable: ${error.message}`; + if (error.path !== "") message += ` (data.${error.path})`; + throw new Error(message); + } + throw error; + } +} +const INVALIDATED_PARAM = "x-sveltekit-invalidated"; +const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash"; +function b64_encode(buffer) { + if (globalThis.Buffer) { + return Buffer.from(buffer).toString("base64"); + } + const little_endian = new Uint8Array(new Uint16Array([1]).buffer)[0] > 0; + return btoa( + new TextDecoder(little_endian ? "utf-16le" : "utf-16be").decode( + new Uint16Array(new Uint8Array(buffer)) + ) + ); +} +function get_relative_path(from, to) { + const from_parts = from.split(/[/\\]/); + const to_parts = to.split(/[/\\]/); + from_parts.pop(); + while (from_parts[0] === to_parts[0]) { + from_parts.shift(); + to_parts.shift(); + } + let i = from_parts.length; + while (i--) from_parts[i] = ".."; + return from_parts.concat(to_parts).join("/"); +} +async function load_server_data({ event, state, node, parent }) { + if (!node?.server) return null; + let is_tracking = true; + const uses = { + dependencies: /* @__PURE__ */ new Set(), + params: /* @__PURE__ */ new Set(), + parent: false, + route: false, + url: false, + search_params: /* @__PURE__ */ new Set() + }; + const url = make_trackable( + event.url, + () => { + if (is_tracking) { + uses.url = true; + } + }, + (param) => { + if (is_tracking) { + uses.search_params.add(param); + } + } + ); + if (state.prerendering) { + disable_search(url); + } + const result = await node.server.load?.call(null, { + ...event, + fetch: (info, init2) => { + new URL(info instanceof Request ? info.url : info, event.url); + return event.fetch(info, init2); + }, + /** @param {string[]} deps */ + depends: (...deps) => { + for (const dep of deps) { + const { href } = new URL(dep, event.url); + uses.dependencies.add(href); + } + }, + params: new Proxy(event.params, { + get: (target, key2) => { + if (is_tracking) { + uses.params.add(key2); + } + return target[ + /** @type {string} */ + key2 + ]; + } + }), + parent: async () => { + if (is_tracking) { + uses.parent = true; + } + return parent(); + }, + route: new Proxy(event.route, { + get: (target, key2) => { + if (is_tracking) { + uses.route = true; + } + return target[ + /** @type {'id'} */ + key2 + ]; + } + }), + url, + untrack(fn) { + is_tracking = false; + try { + return fn(); + } finally { + is_tracking = true; + } + } + }); + return { + type: "data", + data: result ?? null, + uses, + slash: node.server.trailingSlash + }; +} +async function load_data({ + event, + fetched, + node, + parent, + server_data_promise, + state, + resolve_opts, + csr +}) { + const server_data_node = await server_data_promise; + if (!node?.universal?.load) { + return server_data_node?.data ?? null; + } + const result = await node.universal.load.call(null, { + url: event.url, + params: event.params, + data: server_data_node?.data ?? null, + route: event.route, + fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts), + setHeaders: event.setHeaders, + depends: () => { + }, + parent, + untrack: (fn) => fn() + }); + return result ?? null; +} +function create_universal_fetch(event, state, fetched, csr, resolve_opts) { + const universal_fetch = async (input, init2) => { + const cloned_body = input instanceof Request && input.body ? input.clone().body : null; + const cloned_headers = input instanceof Request && [...input.headers].length ? new Headers(input.headers) : init2?.headers; + let response = await event.fetch(input, init2); + const url = new URL(input instanceof Request ? input.url : input, event.url); + const same_origin = url.origin === event.url.origin; + let dependency; + if (same_origin) { + if (state.prerendering) { + dependency = { response, body: null }; + state.prerendering.dependencies.set(url.pathname, dependency); + } + } else if (url.protocol === "https:" || url.protocol === "http:") { + const mode = input instanceof Request ? input.mode : init2?.mode ?? "cors"; + if (mode === "no-cors") { + response = new Response("", { + status: response.status, + statusText: response.statusText, + headers: response.headers + }); + } else { + const acao = response.headers.get("access-control-allow-origin"); + if (!acao || acao !== event.url.origin && acao !== "*") { + throw new Error( + `CORS error: ${acao ? "Incorrect" : "No"} 'Access-Control-Allow-Origin' header is present on the requested resource` + ); + } + } + } + const proxy = new Proxy(response, { + get(response2, key2, _receiver) { + async function push_fetched(body2, is_b64) { + const status_number = Number(response2.status); + if (isNaN(status_number)) { + throw new Error( + `response.status is not a number. value: "${response2.status}" type: ${typeof response2.status}` + ); + } + fetched.push({ + url: same_origin ? url.href.slice(event.url.origin.length) : url.href, + method: event.request.method, + request_body: ( + /** @type {string | ArrayBufferView | undefined} */ + input instanceof Request && cloned_body ? await stream_to_string(cloned_body) : init2?.body + ), + request_headers: cloned_headers, + response_body: body2, + response: response2, + is_b64 + }); + } + if (key2 === "arrayBuffer") { + return async () => { + const buffer = await response2.arrayBuffer(); + if (dependency) { + dependency.body = new Uint8Array(buffer); + } + if (buffer instanceof ArrayBuffer) { + await push_fetched(b64_encode(buffer), true); + } + return buffer; + }; + } + async function text2() { + const body2 = await response2.text(); + if (!body2 || typeof body2 === "string") { + await push_fetched(body2, false); + } + if (dependency) { + dependency.body = body2; + } + return body2; + } + if (key2 === "text") { + return text2; + } + if (key2 === "json") { + return async () => { + return JSON.parse(await text2()); + }; + } + return Reflect.get(response2, key2, response2); + } + }); + if (csr) { + const get = response.headers.get; + response.headers.get = (key2) => { + const lower = key2.toLowerCase(); + const value = get.call(response.headers, lower); + if (value && !lower.startsWith("x-sveltekit-")) { + const included = resolve_opts.filterSerializedResponseHeaders(lower, value); + if (!included) { + throw new Error( + `Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#Server-hooks-handle (at ${event.route.id})` + ); + } + } + return value; + }; + } + return proxy; + }; + return (input, init2) => { + const response = universal_fetch(input, init2); + response.catch(() => { + }); + return response; + }; +} +async function stream_to_string(stream) { + let result = ""; + const reader = stream.getReader(); + const decoder = new TextDecoder(); + while (true) { + const { done, value } = await reader.read(); + if (done) { + break; + } + result += decoder.decode(value); + } + return result; +} +function hash(...values) { + let hash2 = 5381; + for (const value of values) { + if (typeof value === "string") { + let i = value.length; + while (i) hash2 = hash2 * 33 ^ value.charCodeAt(--i); + } else if (ArrayBuffer.isView(value)) { + const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength); + let i = buffer.length; + while (i) hash2 = hash2 * 33 ^ buffer[--i]; + } else { + throw new TypeError("value must be a string or TypedArray"); + } + } + return (hash2 >>> 0).toString(36); +} +const replacements = { + "<": "\\u003C", + "\u2028": "\\u2028", + "\u2029": "\\u2029" +}; +const pattern = new RegExp(`[${Object.keys(replacements).join("")}]`, "g"); +function serialize_data(fetched, filter, prerendering2 = false) { + const headers2 = {}; + let cache_control = null; + let age = null; + let varyAny = false; + for (const [key2, value] of fetched.response.headers) { + if (filter(key2, value)) { + headers2[key2] = value; + } + if (key2 === "cache-control") cache_control = value; + else if (key2 === "age") age = value; + else if (key2 === "vary" && value.trim() === "*") varyAny = true; + } + const payload = { + status: fetched.response.status, + statusText: fetched.response.statusText, + headers: headers2, + body: fetched.response_body + }; + const safe_payload = JSON.stringify(payload).replace(pattern, (match) => replacements[match]); + const attrs = [ + 'type="application/json"', + "data-sveltekit-fetched", + `data-url="${escape_html(fetched.url, true)}"` + ]; + if (fetched.is_b64) { + attrs.push("data-b64"); + } + if (fetched.request_headers || fetched.request_body) { + const values = []; + if (fetched.request_headers) { + values.push([...new Headers(fetched.request_headers)].join(",")); + } + if (fetched.request_body) { + values.push(fetched.request_body); + } + attrs.push(`data-hash="${hash(...values)}"`); + } + if (!prerendering2 && fetched.method === "GET" && cache_control && !varyAny) { + const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control); + if (match) { + const ttl = +match[1] - +(age ?? "0"); + attrs.push(`data-ttl="${ttl}"`); + } + } + return `