diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ec3bb32178ed79bb0537737e017b1f598c12eb37 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +node_modules +/.svelte-kit +/package +.env +.env.* +!.env.example +.vercel +.output diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000000000000000000000000000000000..b6f27f135954640c8cc5bfd7b8c9922ca6eb2aad --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/README.md b/README.md index 5f8f38caf0a76d9dec8c02a30cf0f0a4c1f513b5..77f4c28e405e8401db79ecfe38d2ef8e87259079 100644 --- a/README.md +++ b/README.md @@ -5,32 +5,44 @@ colorFrom: purple colorTo: yellow sdk: static pinned: false +app_file: build/index.html --- -# Configuration +# create-svelte -`title`: _string_ -Display title for the Space +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte); -`emoji`: _string_ -Space emoji (emoji-only character allowed) +## Creating a project -`colorFrom`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) +If you're seeing this, you've probably already done this step. Congrats! -`colorTo`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) +```bash +# create a new project in the current directory +npm init svelte@next -`sdk`: _string_ -Can be either `gradio`, `streamlit`, or `static` +# create a new project in my-app +npm init svelte@next my-app +``` -`sdk_version` : _string_ -Only applicable for `streamlit` SDK. -See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions. +> Note: the `@next` is temporary -`app_file`: _string_ -Path to your main application file (which contains either `gradio` or `streamlit` Python code, or `static` html code). -Path is relative to the root of the repository. +## Developing -`pinned`: _boolean_ -Whether the Space stays on top of your list. +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then: + +```bash +npm run build +``` + +> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production. diff --git a/build/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff b/build/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff new file mode 100644 index 0000000000000000000000000000000000000000..df8f3b061344cfdef326d7a2ed9dda548d229983 Binary files /dev/null and b/build/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff differ diff --git a/build/_app/assets/fira-mono-cyrillic-400-normal-046b609f.woff2 b/build/_app/assets/fira-mono-cyrillic-400-normal-046b609f.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..6fe7e1450a5ff333319ca1e5003ecae3463bcf3f Binary files /dev/null and b/build/_app/assets/fira-mono-cyrillic-400-normal-046b609f.woff2 differ diff --git a/build/_app/assets/fira-mono-cyrillic-ext-400-normal-b3140dd3.woff2 b/build/_app/assets/fira-mono-cyrillic-ext-400-normal-b3140dd3.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..c02724caaa1395c999078eca86fd803628e43bcd Binary files /dev/null and b/build/_app/assets/fira-mono-cyrillic-ext-400-normal-b3140dd3.woff2 differ diff --git a/build/_app/assets/fira-mono-greek-400-normal-1f8b3a07.woff2 b/build/_app/assets/fira-mono-greek-400-normal-1f8b3a07.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..22e58d9a223c3f8a230d7f540aa20b0fde45b4bd Binary files /dev/null and b/build/_app/assets/fira-mono-greek-400-normal-1f8b3a07.woff2 differ diff --git a/build/_app/assets/fira-mono-greek-ext-400-normal-8659ae46.woff2 b/build/_app/assets/fira-mono-greek-ext-400-normal-8659ae46.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..d474c4565fd9dddacc3b84678294a26d13a55610 Binary files /dev/null and b/build/_app/assets/fira-mono-greek-ext-400-normal-8659ae46.woff2 differ diff --git a/build/_app/assets/fira-mono-latin-400-normal-a2f9dbe8.woff2 b/build/_app/assets/fira-mono-latin-400-normal-a2f9dbe8.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..93eeae93bb60daac55bce528b8d0af012bc4f79f Binary files /dev/null and b/build/_app/assets/fira-mono-latin-400-normal-a2f9dbe8.woff2 differ diff --git a/build/_app/assets/fira-mono-latin-ext-400-normal-b6331a25.woff2 b/build/_app/assets/fira-mono-latin-ext-400-normal-b6331a25.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..3093902e5129aa6acd83bdb69e82c9b445436c5a Binary files /dev/null and b/build/_app/assets/fira-mono-latin-ext-400-normal-b6331a25.woff2 differ diff --git a/build/_app/assets/pages/__layout.svelte-a7861b78.css b/build/_app/assets/pages/__layout.svelte-a7861b78.css new file mode 100644 index 0000000000000000000000000000000000000000..bfb2317a7934f2fc98e1a9f24ef328660f5ad8d6 --- /dev/null +++ b/build/_app/assets/pages/__layout.svelte-a7861b78.css @@ -0,0 +1 @@ +header.svelte-t2wq17.svelte-t2wq17{display:flex;justify-content:space-between}.corner.svelte-t2wq17.svelte-t2wq17{width:3em;height:3em}.corner.svelte-t2wq17 a.svelte-t2wq17{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.corner.svelte-t2wq17 img.svelte-t2wq17{width:2em;height:2em;object-fit:contain}nav.svelte-t2wq17.svelte-t2wq17{display:flex;justify-content:center;--background:rgba(255, 255, 255, .7)}svg.svelte-t2wq17.svelte-t2wq17{width:2em;height:3em;display:block}path.svelte-t2wq17.svelte-t2wq17{fill:var(--background)}ul.svelte-t2wq17.svelte-t2wq17{position:relative;padding:0;margin:0;height:3em;display:flex;justify-content:center;align-items:center;list-style:none;background:var(--background);background-size:contain}li.svelte-t2wq17.svelte-t2wq17{position:relative;height:100%}li.active.svelte-t2wq17.svelte-t2wq17:before{--size:6px;content:"";width:0;height:0;position:absolute;top:0;left:calc(50% - var(--size));border:var(--size) solid transparent;border-top:var(--size) solid var(--accent-color)}nav.svelte-t2wq17 a.svelte-t2wq17{display:flex;height:100%;align-items:center;padding:0 1em;color:var(--heading-color);font-weight:700;font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;text-decoration:none;transition:color .2s linear}a.svelte-t2wq17.svelte-t2wq17:hover{color:var(--accent-color)}@font-face{font-family:Fira Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/_app/assets/fira-mono-cyrillic-ext-400-normal-b3140dd3.woff2) format("woff2"),url(/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Fira Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/_app/assets/fira-mono-cyrillic-400-normal-046b609f.woff2) format("woff2"),url(/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff) format("woff");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Fira Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/_app/assets/fira-mono-greek-ext-400-normal-8659ae46.woff2) format("woff2"),url(/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff) format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:Fira Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/_app/assets/fira-mono-greek-400-normal-1f8b3a07.woff2) format("woff2"),url(/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff) format("woff");unicode-range:U+0370-03FF}@font-face{font-family:Fira Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/_app/assets/fira-mono-latin-ext-400-normal-b6331a25.woff2) format("woff2"),url(/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff) format("woff");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/_app/assets/fira-mono-latin-400-normal-a2f9dbe8.woff2) format("woff2"),url(/_app/assets/fira-mono-all-400-normal-0d19eb5d.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{font-family:Arial,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;--font-mono: "Fira Mono", monospace;--pure-white: #ffffff;--primary-color: #b9c6d2;--secondary-color: #d0dde9;--tertiary-color: #edf0f8;--accent-color: #ff3e00;--heading-color: rgba(0, 0, 0, .7);--text-color: #444444;--background-without-opacity: rgba(255, 255, 255, .7);--column-width: 42rem;--column-margin-top: 4rem}body{min-height:100vh;margin:0;background-color:var(--primary-color);background:linear-gradient(180deg,var(--primary-color) 0%,var(--secondary-color) 10.45%,var(--tertiary-color) 41.35%)}body:before{content:"";width:80vw;height:100vh;position:absolute;top:0;left:10vw;z-index:-1;background:radial-gradient(50% 50% at 50% 50%,var(--pure-white) 0%,rgba(255,255,255,0) 100%);opacity:.05}#svelte{min-height:100vh;display:flex;flex-direction:column}h1,h2,p{font-weight:400;color:var(--heading-color)}p{line-height:1.5}a{color:var(--accent-color);text-decoration:none}a:hover{text-decoration:underline}h1{font-size:2rem;text-align:center}h2{font-size:1rem}pre{font-size:16px;font-family:var(--font-mono);background-color:#ffffff73;border-radius:3px;box-shadow:2px 2px 6px #ffffff40;padding:.5em;overflow-x:auto;color:var(--text-color)}input,button{font-size:inherit;font-family:inherit}button:focus:not(:focus-visible){outline:none}@media (min-width: 720px){h1{font-size:2.4rem}}main.svelte-1izrdc8.svelte-1izrdc8{flex:1;display:flex;flex-direction:column;padding:1rem;width:100%;max-width:1024px;margin:0 auto;box-sizing:border-box}footer.svelte-1izrdc8.svelte-1izrdc8{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:40px}footer.svelte-1izrdc8 a.svelte-1izrdc8{font-weight:700}@media (min-width: 480px){footer.svelte-1izrdc8.svelte-1izrdc8{padding:40px 0}} diff --git a/build/_app/assets/pages/about.svelte-bf4528fa.css b/build/_app/assets/pages/about.svelte-bf4528fa.css new file mode 100644 index 0000000000000000000000000000000000000000..823e10556dacad14379d685701acdc36b5c9b855 --- /dev/null +++ b/build/_app/assets/pages/about.svelte-bf4528fa.css @@ -0,0 +1 @@ +.content.svelte-cf77e8{width:100%;max-width:var(--column-width);margin:var(--column-margin-top) auto 0 auto} diff --git a/build/_app/assets/pages/index.svelte-c63fe1c6.css b/build/_app/assets/pages/index.svelte-c63fe1c6.css new file mode 100644 index 0000000000000000000000000000000000000000..1b45f8a7fb99f4f657a11c0ea30eac9ee8ba1cf1 --- /dev/null +++ b/build/_app/assets/pages/index.svelte-c63fe1c6.css @@ -0,0 +1 @@ +.counter.svelte-139m1ow.svelte-139m1ow{display:flex;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);margin:1rem 0}.counter.svelte-139m1ow button.svelte-139m1ow{width:2em;padding:0;display:flex;align-items:center;justify-content:center;border:0;background-color:transparent;color:var(--text-color);font-size:2rem}.counter.svelte-139m1ow button.svelte-139m1ow:hover{background-color:var(--secondary-color)}svg.svelte-139m1ow.svelte-139m1ow{width:25%;height:25%}path.svelte-139m1ow.svelte-139m1ow{vector-effect:non-scaling-stroke;stroke-width:2px;stroke:var(--text-color)}.counter-viewport.svelte-139m1ow.svelte-139m1ow{width:8em;height:4em;overflow:hidden;text-align:center;position:relative}.counter-viewport.svelte-139m1ow strong.svelte-139m1ow{position:absolute;display:flex;width:100%;height:100%;font-weight:400;color:var(--accent-color);font-size:4rem;align-items:center;justify-content:center}.counter-digits.svelte-139m1ow.svelte-139m1ow{position:absolute;width:100%;height:100%}section.svelte-mjk9ig.svelte-mjk9ig{display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}h1.svelte-mjk9ig.svelte-mjk9ig{width:100%}.welcome.svelte-mjk9ig.svelte-mjk9ig{position:relative;width:100%;height:0;padding:0 0 24.16992%}.welcome.svelte-mjk9ig img.svelte-mjk9ig{position:absolute;width:100%;height:100%;top:0;display:block} diff --git a/build/_app/assets/pages/todos/index.svelte-784042c1.css b/build/_app/assets/pages/todos/index.svelte-784042c1.css new file mode 100644 index 0000000000000000000000000000000000000000..65cc0a13975e091eb172c5ee1cfc6ca80f4c064b --- /dev/null +++ b/build/_app/assets/pages/todos/index.svelte-784042c1.css @@ -0,0 +1 @@ +.todos.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{width:100%;max-width:var(--column-width);margin:var(--column-margin-top) auto 0 auto;line-height:1}.new.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{margin:0 0 .5rem}input.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{border:1px solid transparent}input.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd:focus-visible{box-shadow:inset 1px 1px 6px #0000001a;border:1px solid #ff3e00!important;outline:none}.new.svelte-dmxqmd input.svelte-dmxqmd.svelte-dmxqmd{font-size:28px;width:100%;padding:.5em 1em .3em;box-sizing:border-box;background:rgba(255,255,255,.05);border-radius:8px;text-align:center}.todo.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{display:grid;grid-template-columns:2rem 1fr 2rem;grid-gap:.5rem;align-items:center;margin:0 0 .5rem;padding:.5rem;background-color:#fff;border-radius:8px;filter:drop-shadow(2px 4px 6px rgba(0,0,0,.1));transform:translate(-1px,-1px);transition:filter .2s,transform .2s}.done.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{transform:none;opacity:.4;filter:drop-shadow(0px 0px 1px rgba(0,0,0,.1))}form.text.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{position:relative;display:flex;align-items:center;flex:1}.todo.svelte-dmxqmd input.svelte-dmxqmd.svelte-dmxqmd{flex:1;padding:.5em 2em .5em .8em;border-radius:3px}.todo.svelte-dmxqmd button.svelte-dmxqmd.svelte-dmxqmd{width:2em;height:2em;border:none;background-color:transparent;background-position:50% 50%;background-repeat:no-repeat}button.toggle.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{border:1px solid rgba(0,0,0,.2);border-radius:50%;box-sizing:border-box;background-size:1em auto}.done.svelte-dmxqmd .toggle.svelte-dmxqmd.svelte-dmxqmd{background-image:url("data:image/svg+xml,%3Csvg width='22' height='16' viewBox='0 0 22 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.5 1.5L7.4375 14.5L1.5 8.5909' stroke='%23676778' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}.delete.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{background-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 5V22H19.5V5H4.5Z' fill='%23676778' stroke='%23676778' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M10 10V16.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14 10V16.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M2 5H22' stroke='%23676778' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 5L9.6445 2H14.3885L16 5H8Z' fill='%23676778' stroke='%23676778' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E%0A");opacity:.2}.delete.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd:hover,.delete.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd:focus{transition:opacity .2s;opacity:1}.save.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd{position:absolute;right:0;opacity:0;background-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.5 2H3.5C2.67158 2 2 2.67157 2 3.5V20.5C2 21.3284 2.67158 22 3.5 22H20.5C21.3284 22 22 21.3284 22 20.5V3.5C22 2.67157 21.3284 2 20.5 2Z' fill='%23676778' stroke='%23676778' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M17 2V11H7.5V2H17Z' fill='white' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M13.5 5.5V7.5' stroke='%23676778' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M5.99844 2H18.4992' stroke='%23676778' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E%0A")}.todo.svelte-dmxqmd input.svelte-dmxqmd:focus+.save.svelte-dmxqmd,.save.svelte-dmxqmd.svelte-dmxqmd.svelte-dmxqmd:focus{transition:opacity .2s;opacity:1} diff --git a/build/_app/assets/start-61d1577b.css b/build/_app/assets/start-61d1577b.css new file mode 100644 index 0000000000000000000000000000000000000000..97adda08e6e77dc1b0d68b099be72d002e7dc6e5 --- /dev/null +++ b/build/_app/assets/start-61d1577b.css @@ -0,0 +1 @@ +#svelte-announcer.svelte-1j55zn5{position:absolute;left:0;top:0;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap;width:1px;height:1px} diff --git a/build/_app/assets/svelte-logo-87df40b8.svg b/build/_app/assets/svelte-logo-87df40b8.svg new file mode 100644 index 0000000000000000000000000000000000000000..49492a83cc2fb3cdc02d42936c415735d446b5b5 --- /dev/null +++ b/build/_app/assets/svelte-logo-87df40b8.svg @@ -0,0 +1 @@ +svelte-logo \ No newline at end of file diff --git a/build/_app/chunks/vendor-d68c61c2.js b/build/_app/chunks/vendor-d68c61c2.js new file mode 100644 index 0000000000000000000000000000000000000000..8c3b1011dabbf4eb1ccfb55ecb7cad69818aa64b --- /dev/null +++ b/build/_app/chunks/vendor-d68c61c2.js @@ -0,0 +1,7 @@ +function x(){}const tt=t=>t;function bt(t,e){for(const n in e)t[n]=e[n];return t}function et(t){return t()}function nt(){return Object.create(null)}function C(t){t.forEach(et)}function B(t){return typeof t=="function"}function wt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let D;function Ut(t,e){return D||(D=document.createElement("a")),D.href=e,t===D.href}function xt(t){return Object.keys(t).length===0}function $t(t,...e){if(t==null)return x;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Vt(t,e,n){t.$$.on_destroy.push($t(e,n))}function Xt(t,e,n,r){if(t){const i=st(t,e,n,r);return t[0](i)}}function st(t,e,n,r){return t[1]&&r?bt(n.ctx.slice(),t[1](r(e))):n.ctx}function Yt(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const l=[],s=Math.max(e.dirty.length,i.length);for(let c=0;c32){const e=[],n=t.ctx.length/32;for(let r=0;rwindow.performance.now():()=>Date.now(),G=it?t=>requestAnimationFrame(t):x;const A=new Set;function rt(t){A.forEach(e=>{e.c(t)||(A.delete(e),e.f())}),A.size!==0&&G(rt)}function J(t){let e;return A.size===0&&G(rt),{promise:new Promise(n=>{A.add(e={c:t,f:n})}),abort(){A.delete(e)}}}let z=!1;function kt(){z=!0}function Et(){z=!1}function St(t,e,n,r){for(;t>1);n(i)<=r?t=i+1:e=i}return t}function Ct(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const o=[];for(let a=0;a0&&e[n[i]].claim_order<=a?i+1:St(1,i,f=>e[n[f]].claim_order,a))-1;r[o]=n[_]+1;const u=_+1;n[u]=o,i=Math.max(u,i)}const l=[],s=[];let c=e.length-1;for(let o=n[i]+1;o!=0;o=r[o-1]){for(l.push(e[o-1]);c>=o;c--)s.push(e[c]);c--}for(;c>=0;c--)s.push(e[c]);l.reverse(),s.sort((o,a)=>o.claim_order-a.claim_order);for(let o=0,a=0;o=l[a].claim_order;)a++;const _=at.removeEventListener(e,n,r)}function oe(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Rt(t){return Array.from(t.childNodes)}function Ot(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function lt(t,e,n,r,i=!1){Ot(t);const l=(()=>{for(let s=t.claim_info.last_index;s=0;s--){const c=t[s];if(e(c)){const o=n(c);return o===void 0?t.splice(s,1):t[s]=o,i?o===void 0&&t.claim_info.last_index--:t.claim_info.last_index=s,c}}return r()})();return l.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,l}function at(t,e,n,r){return lt(t,i=>i.nodeName===e,i=>{const l=[];for(let s=0;si.removeAttribute(s))},()=>r(e))}function ce(t,e,n){return at(t,e,n,ct)}function le(t,e,n){return at(t,e,n,qt)}function Bt(t,e){return lt(t,n=>n.nodeType===3,n=>{const r=""+e;if(n.data.startsWith(r)){if(n.data.length!==r.length)return n.splitText(r.length)}else n.data=r},()=>K(e),!0)}function ae(t){return Bt(t," ")}function fe(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function ue(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function de(t,e,n){t.classList[n?"add":"remove"](e)}function Dt(t,e,n=!1){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,!1,e),r}function _e(t,e=document.body){return Array.from(e.querySelectorAll(t))}const Q=new Set;let T=0;function Pt(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function U(t,e,n,r,i,l,s,c=0){const o=16.666/r;let a=`{ +`;for(let m=0;m<=1;m+=o){const p=e+(n-e)*l(m);a+=m*100+`%{${s(p,1-p)}} +`}const _=a+`100% {${s(n,1-n)}} +}`,u=`__svelte_${Pt(_)}_${c}`,f=ot(t);Q.add(f);const d=f.__svelte_stylesheet||(f.__svelte_stylesheet=Mt(t).sheet),h=f.__svelte_rules||(f.__svelte_rules={});h[u]||(h[u]=!0,d.insertRule(`@keyframes ${u} ${_}`,d.cssRules.length));const y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${u} ${r}ms linear ${i}ms 1 both`,T+=1,u}function ft(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),i=n.length-r.length;i&&(t.style.animation=r.join(", "),T-=i,T||zt())}function zt(){G(()=>{T||(Q.forEach(t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}}),Q.clear())})}function he(t,e,n,r){if(!e)return x;const i=t.getBoundingClientRect();if(e.left===i.left&&e.right===i.right&&e.top===i.top&&e.bottom===i.bottom)return x;const{delay:l=0,duration:s=300,easing:c=tt,start:o=P()+l,end:a=o+s,tick:_=x,css:u}=n(t,{from:e,to:i},r);let f=!0,d=!1,h;function y(){u&&(h=U(t,0,1,s,l,c,u)),l||(d=!0)}function m(){u&&ft(t,h),f=!1}return J(p=>{if(!d&&p>=o&&(d=!0),d&&p>=a&&(_(1,0),m()),!f)return!1;if(d){const w=p-o,b=0+1*c(w/s);_(b,1-b)}return!0}),y(),_(0,1),m}function me(t){const e=getComputedStyle(t);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:n,height:r}=e,i=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=r,Tt(t,i)}}function Tt(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const r=getComputedStyle(t),i=r.transform==="none"?"":r.transform;t.style.transform=`${i} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}let N;function v(t){N=t}function L(){if(!N)throw new Error("Function called outside component initialization");return N}function pe(t){L().$$.on_mount.push(t)}function ye(t){L().$$.after_update.push(t)}function ge(t,e){L().$$.context.set(t,e)}function be(t){return L().$$.context.get(t)}const q=[],ut=[],F=[],dt=[],_t=Promise.resolve();let V=!1;function ht(){V||(V=!0,_t.then(mt))}function we(){return ht(),_t}function H(t){F.push(t)}const X=new Set;let I=0;function mt(){const t=N;do{for(;I{R=null})),R}function Y(t,e,n){t.dispatchEvent(Dt(`${e?"intro":"outro"}${n}`))}const W=new Set;let E;function xe(){E={r:0,c:[],p:E}}function $e(){E.r||C(E.c),E=E.p}function pt(t,e){t&&t.i&&(W.delete(t),t.i(e))}function Ht(t,e,n,r){if(t&&t.o){if(W.has(t))return;W.add(t),E.c.push(()=>{W.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}}const It={duration:0};function ke(t,e,n,r){let i=e(t,n),l=r?0:1,s=null,c=null,o=null;function a(){o&&ft(t,o)}function _(f,d){const h=f.b-l;return d*=Math.abs(h),{a:l,b:f.b,d:h,duration:d,start:f.start,end:f.start+d,group:f.group}}function u(f){const{delay:d=0,duration:h=300,easing:y=tt,tick:m=x,css:p}=i||It,w={start:P()+d,b:f};f||(w.group=E,E.r+=1),s||c?c=w:(p&&(a(),o=U(t,l,f,h,d,y,p)),f&&m(0,1),s=_(w,h),H(()=>Y(t,f,"start")),J(b=>{if(c&&b>c.start&&(s=_(c,h),c=null,Y(t,s.b,"start"),p&&(a(),o=U(t,l,s.b,s.duration,0,y,i.css))),s){if(b>=s.end)m(l=s.b,1-l),Y(t,s.b,"end"),c||(s.b?a():--s.group.r||C(s.group.c)),s=null;else if(b>=s.start){const S=b-s.start;l=s.a+s.d*y(S/s.duration),m(l,1-l)}}return!!(s||c)}))}return{run(f){B(i)?Ft().then(()=>{i=i(),u(f)}):u(f)},end(){a(),s=c=null}}}function Wt(t,e){Ht(t,1,1,()=>{e.delete(t.key)})}function Ee(t,e){t.f(),Wt(t,e)}function Se(t,e,n,r,i,l,s,c,o,a,_,u){let f=t.length,d=l.length,h=f;const y={};for(;h--;)y[t[h].key]=h;const m=[],p=new Map,w=new Map;for(h=d;h--;){const g=u(i,l,h),$=n(g);let k=s.get($);k?r&&k.p(g,e):(k=a($,g),k.c()),p.set($,m[h]=k),$ in y&&w.set($,Math.abs(h-y[$]))}const b=new Set,S=new Set;function j(g){pt(g,1),g.m(c,_),s.set(g.key,g),_=g.first,d--}for(;f&&d;){const g=m[d-1],$=t[f-1],k=g.key,O=$.key;g===$?(_=g.first,f--,d--):p.has(O)?!s.has(k)||b.has(k)?j(g):S.has(O)?f--:w.get(k)>w.get(O)?(S.add(k),j(g)):(b.add(O),f--):(o($,s),f--)}for(;f--;){const g=t[f];p.has(g.key)||o(g,s)}for(;d;)j(m[d-1]);return m}function Ce(t,e){const n={},r={},i={$$scope:1};let l=t.length;for(;l--;){const s=t[l],c=e[l];if(c){for(const o in s)o in c||(r[o]=1);for(const o in c)i[o]||(n[o]=c[o],i[o]=1);t[l]=c}else for(const o in s)i[o]=1}for(const s in r)s in n||(n[s]=void 0);return n}function Ae(t){return typeof t=="object"&&t!==null?t:{}}function Me(t){t&&t.c()}function je(t,e){t&&t.l(e)}function Gt(t,e,n,r){const{fragment:i,on_mount:l,on_destroy:s,after_update:c}=t.$$;i&&i.m(e,n),r||H(()=>{const o=l.map(et).filter(B);s?s.push(...o):C(o),t.$$.on_mount=[]}),c.forEach(H)}function Jt(t,e){const n=t.$$;n.fragment!==null&&(C(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Kt(t,e){t.$$.dirty[0]===-1&&(q.push(t),ht(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const h=d.length?d[0]:f;return a.ctx&&i(a.ctx[u],a.ctx[u]=h)&&(!a.skip_bound&&a.bound[u]&&a.bound[u](h),_&&Kt(t,u)),f}):[],a.update(),_=!0,C(a.before_update),a.fragment=r?r(a.ctx):!1,e.target){if(e.hydrate){kt();const u=Rt(e.target);a.fragment&&a.fragment.l(u),u.forEach(vt)}else a.fragment&&a.fragment.c();e.intro&&pt(t.$$.fragment),Gt(t,e.target,e.anchor,e.customElement),Et(),mt()}v(o)}class ve{$destroy(){Jt(this,1),this.$destroy=x}$on(e,n){const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!xt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const M=[];function Qt(t,e=x){let n;const r=new Set;function i(c){if(wt(t,c)&&(t=c,n)){const o=!M.length;for(const a of r)a[1](),M.push(a,t);if(o){for(let a=0;a{r.delete(a),r.size===0&&(n(),n=null)}}return{set:i,update:l,subscribe:s}}function yt(t){const e=t-1;return e*e*e+1}function gt(t){return Object.prototype.toString.call(t)==="[object Date]"}function Z(t,e,n,r){if(typeof n=="number"||gt(n)){const i=r-n,l=(n-e)/(t.dt||1/60),s=t.opts.stiffness*i,c=t.opts.damping*l,o=(s-c)*t.inv_mass,a=(l+o)*t.dt;return Math.abs(a)Z(t,e[l],n[l],r[l]));if(typeof n=="object"){const i={};for(const l in n)i[l]=Z(t,e[l],n[l],r[l]);return i}else throw new Error(`Cannot spring ${typeof n} values`)}}function qe(t,e={}){const n=Qt(t),{stiffness:r=.15,damping:i=.8,precision:l=.01}=e;let s,c,o,a=t,_=t,u=1,f=0,d=!1;function h(m,p={}){_=m;const w=o={};if(t==null||p.hard||y.stiffness>=1&&y.damping>=1)return d=!0,s=P(),a=m,n.set(t=_),Promise.resolve();if(p.soft){const b=p.soft===!0?.5:+p.soft;f=1/(b*60),u=0}return c||(s=P(),d=!1,c=J(b=>{if(d)return d=!1,c=null,!1;u=Math.min(u+f,1);const S={inv_mass:u,opts:y,settled:!0,dt:(b-s)*60/1e3},j=Z(S,a,t,_);return s=b,a=t,n.set(t=j),S.settled&&(c=null),!S.settled})),new Promise(b=>{c.promise.then(()=>{w===o&&b()})})}const y={set:h,update:(m,p)=>h(m(_,t),p),subscribe:n.subscribe,stiffness:r,damping:i,precision:l};return y}function Re(t,{delay:e=0,duration:n=400,easing:r=yt,start:i=0,opacity:l=0}={}){const s=getComputedStyle(t),c=+s.opacity,o=s.transform==="none"?"":s.transform,a=1-i,_=c*(1-l);return{delay:e,duration:n,easing:r,css:(u,f)=>` + transform: ${o} scale(${1-a*f}); + opacity: ${c-_*f} + `}}function Oe(t,{from:e,to:n},r={}){const i=getComputedStyle(t),l=i.transform==="none"?"":i.transform,[s,c]=i.transformOrigin.split(" ").map(parseFloat),o=e.left+e.width*s/n.width-(n.left+s),a=e.top+e.height*c/n.height-(n.top+c),{delay:_=0,duration:u=d=>Math.sqrt(d)*120,easing:f=yt}=r;return{delay:_,duration:B(u)?u(Math.sqrt(o*o+a*a)):u,easing:f,css:(d,h)=>{const y=h*o,m=h*a,p=d+h*e.width/n.width,w=d+h*e.height/n.height;return`transform: ${l} translate(${y}px, ${m}px) scale(${p}, ${w});`}}}export{H as $,Jt as A,bt as B,Qt as C,we as D,be as E,qt as F,le as G,Ut as H,de as I,Nt as J,x as K,Vt as L,Xt as M,Zt as N,te as O,Yt as P,ue as Q,re as R,ve as S,C as T,qe as U,_e as V,ee as W,B as X,me as Y,Tt as Z,he as _,Rt as a,ke as a0,Se as a1,Oe as a2,Re as a3,Ee as a4,oe as b,ce as c,vt as d,ct as e,ne as f,Bt as g,fe as h,Ne as i,se as j,ie as k,ae as l,xe as m,Ht as n,$e as o,pt as p,ge as q,ye as r,wt as s,K as t,pe as u,Me as v,je as w,Gt as x,Ce as y,Ae as z}; diff --git a/build/_app/error.svelte-97b7e85d.js b/build/_app/error.svelte-97b7e85d.js new file mode 100644 index 0000000000000000000000000000000000000000..80274fd0c5398dea8bc221c31e4b6a7530e6629a --- /dev/null +++ b/build/_app/error.svelte-97b7e85d.js @@ -0,0 +1 @@ +import{S as K,i as w,s as y,e as d,t as v,c as E,a as b,g as P,d as n,f as u,J as R,h as j,j as N,k as q,l as S,K as C}from"./chunks/vendor-d68c61c2.js";function H(r){let f,t=r[1].frame+"",a;return{c(){f=d("pre"),a=v(t)},l(l){f=E(l,"PRE",{});var s=b(f);a=P(s,t),s.forEach(n)},m(l,s){u(l,f,s),R(f,a)},p(l,s){s&2&&t!==(t=l[1].frame+"")&&j(a,t)},d(l){l&&n(f)}}}function J(r){let f,t=r[1].stack+"",a;return{c(){f=d("pre"),a=v(t)},l(l){f=E(l,"PRE",{});var s=b(f);a=P(s,t),s.forEach(n)},m(l,s){u(l,f,s),R(f,a)},p(l,s){s&2&&t!==(t=l[1].stack+"")&&j(a,t)},d(l){l&&n(f)}}}function z(r){let f,t,a,l,s=r[1].message+"",c,k,m,p,i=r[1].frame&&H(r),o=r[1].stack&&J(r);return{c(){f=d("h1"),t=v(r[0]),a=N(),l=d("pre"),c=v(s),k=N(),i&&i.c(),m=N(),o&&o.c(),p=q()},l(e){f=E(e,"H1",{});var _=b(f);t=P(_,r[0]),_.forEach(n),a=S(e),l=E(e,"PRE",{});var h=b(l);c=P(h,s),h.forEach(n),k=S(e),i&&i.l(e),m=S(e),o&&o.l(e),p=q()},m(e,_){u(e,f,_),R(f,t),u(e,a,_),u(e,l,_),R(l,c),u(e,k,_),i&&i.m(e,_),u(e,m,_),o&&o.m(e,_),u(e,p,_)},p(e,[_]){_&1&&j(t,e[0]),_&2&&s!==(s=e[1].message+"")&&j(c,s),e[1].frame?i?i.p(e,_):(i=H(e),i.c(),i.m(m.parentNode,m)):i&&(i.d(1),i=null),e[1].stack?o?o.p(e,_):(o=J(e),o.c(),o.m(p.parentNode,p)):o&&(o.d(1),o=null)},i:C,o:C,d(e){e&&n(f),e&&n(a),e&&n(l),e&&n(k),i&&i.d(e),e&&n(m),o&&o.d(e),e&&n(p)}}}function D({error:r,status:f}){return{props:{error:r,status:f}}}function A(r,f,t){let{status:a}=f,{error:l}=f;return r.$$set=s=>{"status"in s&&t(0,a=s.status),"error"in s&&t(1,l=s.error)},[a,l]}class F extends K{constructor(f){super();w(this,f,A,z,y,{status:0,error:1})}}export{F as default,D as load}; diff --git a/build/_app/manifest.json b/build/_app/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..ae9948e8bd5e881feaa0b6f0199330c4ab4eb9a7 --- /dev/null +++ b/build/_app/manifest.json @@ -0,0 +1,90 @@ +{ + ".svelte-kit/build/runtime/internal/start.js": { + "file": "start-39c66b50.js", + "src": ".svelte-kit/build/runtime/internal/start.js", + "isEntry": true, + "imports": [ + "_vendor-d68c61c2.js" + ], + "dynamicImports": [ + "src/routes/__layout.svelte", + ".svelte-kit/build/components/error.svelte", + "src/routes/index.svelte", + "src/routes/about.svelte", + "src/routes/todos/index.svelte" + ], + "css": [ + "assets/start-61d1577b.css" + ] + }, + "src/routes/__layout.svelte": { + "file": "pages/__layout.svelte-2dd96704.js", + "src": "src/routes/__layout.svelte", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_vendor-d68c61c2.js" + ], + "css": [ + "assets/pages/__layout.svelte-a7861b78.css" + ], + "assets": [ + "assets/svelte-logo-87df40b8.svg", + "assets/fira-mono-cyrillic-ext-400-normal-b3140dd3.woff2", + "assets/fira-mono-all-400-normal-0d19eb5d.woff", + "assets/fira-mono-cyrillic-400-normal-046b609f.woff2", + "assets/fira-mono-greek-ext-400-normal-8659ae46.woff2", + "assets/fira-mono-greek-400-normal-1f8b3a07.woff2", + "assets/fira-mono-latin-ext-400-normal-b6331a25.woff2", + "assets/fira-mono-latin-400-normal-a2f9dbe8.woff2" + ] + }, + ".svelte-kit/build/components/error.svelte": { + "file": "error.svelte-97b7e85d.js", + "src": ".svelte-kit/build/components/error.svelte", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_vendor-d68c61c2.js" + ] + }, + "src/routes/index.svelte": { + "file": "pages/index.svelte-934bb81d.js", + "src": "src/routes/index.svelte", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_vendor-d68c61c2.js" + ], + "css": [ + "assets/pages/index.svelte-c63fe1c6.css" + ] + }, + "src/routes/about.svelte": { + "file": "pages/about.svelte-a7982a52.js", + "src": "src/routes/about.svelte", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_vendor-d68c61c2.js" + ], + "css": [ + "assets/pages/about.svelte-bf4528fa.css" + ] + }, + "src/routes/todos/index.svelte": { + "file": "pages/todos/index.svelte-82693d56.js", + "src": "src/routes/todos/index.svelte", + "isEntry": true, + "isDynamicEntry": true, + "imports": [ + "_vendor-d68c61c2.js" + ], + "css": [ + "assets/pages/todos/index.svelte-784042c1.css" + ] + }, + "_vendor-d68c61c2.js": { + "file": "chunks/vendor-d68c61c2.js" + } +} \ No newline at end of file diff --git a/build/_app/pages/__layout.svelte-2dd96704.js b/build/_app/pages/__layout.svelte-2dd96704.js new file mode 100644 index 0000000000000000000000000000000000000000..bc78470ce453a4f001c13787d374750928a92d43 --- /dev/null +++ b/build/_app/pages/__layout.svelte-2dd96704.js @@ -0,0 +1 @@ +import{E as ne,S as se,i as ae,s as le,e as u,j as y,F as V,t as z,c as f,a as c,d as l,l as H,G as j,g as D,H as ve,b as e,I as N,f as T,J as s,K as re,L as ue,M as fe,v as _e,w as de,x as he,N as pe,O as me,P as ge,p as oe,n as ie,A as be}from"../chunks/vendor-d68c61c2.js";const Ee=()=>{const o=ne("__svelte__");return{page:{subscribe:o.page.subscribe},navigating:{subscribe:o.navigating.subscribe},get preloading(){return console.error("stores.preloading is deprecated; use stores.navigating instead"),{subscribe:o.navigating.subscribe}},session:o.session}},we={subscribe(o){return Ee().page.subscribe(o)}};var $e="/_app/assets/svelte-logo-87df40b8.svg";function qe(o){let a,d,i,n,m,w,p,_,q,S,v,b,r,t,h,$,g,M,x,A,L,F,G,I,B,P,O;return{c(){a=u("header"),d=u("div"),i=u("a"),n=u("img"),w=y(),p=u("nav"),_=V("svg"),q=V("path"),S=y(),v=u("ul"),b=u("li"),r=u("a"),t=z("Home"),h=y(),$=u("li"),g=u("a"),M=z("About"),x=y(),A=u("li"),L=u("a"),F=z("Todos"),G=y(),I=V("svg"),B=V("path"),P=y(),O=u("div"),this.h()},l(k){a=f(k,"HEADER",{class:!0});var E=c(a);d=f(E,"DIV",{class:!0});var R=c(d);i=f(R,"A",{href:!0,class:!0});var Z=c(i);n=f(Z,"IMG",{src:!0,alt:!0,class:!0}),Z.forEach(l),R.forEach(l),w=H(E),p=f(E,"NAV",{class:!0});var C=c(p);_=j(C,"svg",{viewBox:!0,"aria-hidden":!0,class:!0});var J=c(_);q=j(J,"path",{d:!0,class:!0}),c(q).forEach(l),J.forEach(l),S=H(C),v=f(C,"UL",{class:!0});var K=c(v);b=f(K,"LI",{class:!0});var U=c(b);r=f(U,"A",{"sveltekit:prefetch":!0,href:!0,class:!0});var Q=c(r);t=D(Q,"Home"),Q.forEach(l),U.forEach(l),h=H(K),$=f(K,"LI",{class:!0});var W=c($);g=f(W,"A",{"sveltekit:prefetch":!0,href:!0,class:!0});var X=c(g);M=D(X,"About"),X.forEach(l),W.forEach(l),x=H(K),A=f(K,"LI",{class:!0});var Y=c(A);L=f(Y,"A",{"sveltekit:prefetch":!0,href:!0,class:!0});var ee=c(L);F=D(ee,"Todos"),ee.forEach(l),Y.forEach(l),K.forEach(l),G=H(C),I=j(C,"svg",{viewBox:!0,"aria-hidden":!0,class:!0});var te=c(I);B=j(te,"path",{d:!0,class:!0}),c(B).forEach(l),te.forEach(l),C.forEach(l),P=H(E),O=f(E,"DIV",{class:!0});var ce=c(O);ce.forEach(l),E.forEach(l),this.h()},h(){ve(n.src,m=$e)||e(n,"src",m),e(n,"alt","SvelteKit"),e(n,"class","svelte-t2wq17"),e(i,"href","https://kit.svelte.dev"),e(i,"class","svelte-t2wq17"),e(d,"class","corner svelte-t2wq17"),e(q,"d","M0,0 L1,2 C1.5,3 1.5,3 2,3 L2,0 Z"),e(q,"class","svelte-t2wq17"),e(_,"viewBox","0 0 2 3"),e(_,"aria-hidden","true"),e(_,"class","svelte-t2wq17"),e(r,"sveltekit:prefetch",""),e(r,"href","/"),e(r,"class","svelte-t2wq17"),e(b,"class","svelte-t2wq17"),N(b,"active",o[0].url.pathname==="/"),e(g,"sveltekit:prefetch",""),e(g,"href","/about"),e(g,"class","svelte-t2wq17"),e($,"class","svelte-t2wq17"),N($,"active",o[0].url.pathname==="/about"),e(L,"sveltekit:prefetch",""),e(L,"href","/todos"),e(L,"class","svelte-t2wq17"),e(A,"class","svelte-t2wq17"),N(A,"active",o[0].url.pathname==="/todos"),e(v,"class","svelte-t2wq17"),e(B,"d","M0,0 L0,3 C0.5,3 0.5,3 1,2 L2,0 Z"),e(B,"class","svelte-t2wq17"),e(I,"viewBox","0 0 2 3"),e(I,"aria-hidden","true"),e(I,"class","svelte-t2wq17"),e(p,"class","svelte-t2wq17"),e(O,"class","corner svelte-t2wq17"),e(a,"class","svelte-t2wq17")},m(k,E){T(k,a,E),s(a,d),s(d,i),s(i,n),s(a,w),s(a,p),s(p,_),s(_,q),s(p,S),s(p,v),s(v,b),s(b,r),s(r,t),s(v,h),s(v,$),s($,g),s(g,M),s(v,x),s(v,A),s(A,L),s(L,F),s(p,G),s(p,I),s(I,B),s(a,P),s(a,O)},p(k,[E]){E&1&&N(b,"active",k[0].url.pathname==="/"),E&1&&N($,"active",k[0].url.pathname==="/about"),E&1&&N(A,"active",k[0].url.pathname==="/todos")},i:re,o:re,d(k){k&&l(a)}}}function ke(o,a,d){let i;return ue(o,we,n=>d(0,i=n)),[i]}class Ae extends se{constructor(a){super();ae(this,a,ke,qe,le,{})}}function Le(o){let a,d,i,n,m,w,p,_,q,S,v;a=new Ae({});const b=o[1].default,r=fe(b,o,o[0],null);return{c(){_e(a.$$.fragment),d=y(),i=u("main"),r&&r.c(),n=y(),m=u("footer"),w=u("p"),p=z("visit "),_=u("a"),q=z("kit.svelte.dev"),S=z(" to learn SvelteKit"),this.h()},l(t){de(a.$$.fragment,t),d=H(t),i=f(t,"MAIN",{class:!0});var h=c(i);r&&r.l(h),h.forEach(l),n=H(t),m=f(t,"FOOTER",{class:!0});var $=c(m);w=f($,"P",{});var g=c(w);p=D(g,"visit "),_=f(g,"A",{href:!0,class:!0});var M=c(_);q=D(M,"kit.svelte.dev"),M.forEach(l),S=D(g," to learn SvelteKit"),g.forEach(l),$.forEach(l),this.h()},h(){e(i,"class","svelte-1izrdc8"),e(_,"href","https://kit.svelte.dev"),e(_,"class","svelte-1izrdc8"),e(m,"class","svelte-1izrdc8")},m(t,h){he(a,t,h),T(t,d,h),T(t,i,h),r&&r.m(i,null),T(t,n,h),T(t,m,h),s(m,w),s(w,p),s(w,_),s(_,q),s(w,S),v=!0},p(t,[h]){r&&r.p&&(!v||h&1)&&pe(r,b,t,t[0],v?ge(b,t[0],h,null):me(t[0]),null)},i(t){v||(oe(a.$$.fragment,t),oe(r,t),v=!0)},o(t){ie(a.$$.fragment,t),ie(r,t),v=!1},d(t){be(a,t),t&&l(d),t&&l(i),r&&r.d(t),t&&l(n),t&&l(m)}}}function Ie(o,a,d){let{$$slots:i={},$$scope:n}=a;return o.$$set=m=>{"$$scope"in m&&d(0,n=m.$$scope)},[n,i]}class He extends se{constructor(a){super();ae(this,a,Ie,Le,le,{})}}export{He as default}; diff --git a/build/_app/pages/about.svelte-a7982a52.js b/build/_app/pages/about.svelte-a7982a52.js new file mode 100644 index 0000000000000000000000000000000000000000..a265226f1bb56330a1e1f4fac3c0d16943305124 --- /dev/null +++ b/build/_app/pages/about.svelte-a7982a52.js @@ -0,0 +1,9 @@ +import{S as F,i as G,s as N,j as _,e as i,t as o,V as Q,d as a,l as m,c as r,a as d,g as s,b as B,f as R,J as t,K as L}from"../chunks/vendor-d68c61c2.js";const U=!0,W=!1;function X(z){let h,e,f,b,E,p,S,u,k,x,A,g,J,K,y,O,P,c,D,v,H,j;return{c(){h=_(),e=i("div"),f=i("h1"),b=o("About this app"),E=_(),p=i("p"),S=o("This is a "),u=i("a"),k=o("SvelteKit"),x=o(` app. You can make your own by typing the + following into your command line and following the prompts:`),A=_(),g=i("pre"),J=o("npm init svelte@next"),K=_(),y=i("p"),O=o(`The page you're looking at is purely static HTML, with no client-side interactivity needed. + Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening + the devtools network panel and reloading.`),P=_(),c=i("p"),D=o("The "),v=i("a"),H=o("TODOs"),j=o(` page illustrates SvelteKit's data loading and form handling. Try using + it with JavaScript disabled!`),this.h()},l(l){Q('[data-svelte="svelte-1ine71f"]',document.head).forEach(a),h=m(l),e=r(l,"DIV",{class:!0});var n=d(e);f=r(n,"H1",{});var M=d(f);b=s(M,"About this app"),M.forEach(a),E=m(n),p=r(n,"P",{});var w=d(p);S=s(w,"This is a "),u=r(w,"A",{href:!0});var V=d(u);k=s(V,"SvelteKit"),V.forEach(a),x=s(w,` app. You can make your own by typing the + following into your command line and following the prompts:`),w.forEach(a),A=m(n),g=r(n,"PRE",{});var Y=d(g);J=s(Y,"npm init svelte@next"),Y.forEach(a),K=m(n),y=r(n,"P",{});var C=d(y);O=s(C,`The page you're looking at is purely static HTML, with no client-side interactivity needed. + Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening + the devtools network panel and reloading.`),C.forEach(a),P=m(n),c=r(n,"P",{});var T=d(c);D=s(T,"The "),v=r(T,"A",{href:!0});var I=d(v);H=s(I,"TODOs"),I.forEach(a),j=s(T,` page illustrates SvelteKit's data loading and form handling. Try using + it with JavaScript disabled!`),T.forEach(a),n.forEach(a),this.h()},h(){document.title="About",B(u,"href","https://kit.svelte.dev"),B(v,"href","/todos"),B(e,"class","content svelte-cf77e8")},m(l,q){R(l,h,q),R(l,e,q),t(e,f),t(f,b),t(e,E),t(e,p),t(p,S),t(p,u),t(u,k),t(p,x),t(e,A),t(e,g),t(g,J),t(e,K),t(e,y),t(y,O),t(e,P),t(e,c),t(c,D),t(c,v),t(v,H),t(c,j)},p:L,i:L,o:L,d(l){l&&a(h),l&&a(e)}}}const $=W,tt=U,et=!0;class at extends F{constructor(h){super();G(this,h,null,X,N,{})}}export{at as default,$ as hydrate,et as prerender,tt as router}; diff --git a/build/_app/pages/index.svelte-934bb81d.js b/build/_app/pages/index.svelte-934bb81d.js new file mode 100644 index 0000000000000000000000000000000000000000..ce5c8489f8a6db273683345d1a6b261370037c2d --- /dev/null +++ b/build/_app/pages/index.svelte-934bb81d.js @@ -0,0 +1,5 @@ +import{S as J,i as P,s as Q,e as _,F as V,j,t as $,c as m,a as i,G as H,d as o,l as C,g as D,b as t,Q as L,f as q,J as e,R as W,h as z,K,T as X,U as Y,L as Z,v as ee,V as te,w as se,H as ae,x as re,p as le,n as oe,A as ne}from"../chunks/vendor-d68c61c2.js";function ce(f){let s,a,l,c,u,d,v,n,E=Math.floor(f[1]+1)+"",I,R,b,k=Math.floor(f[1])+"",w,B,p,g,T,y,O;return{c(){s=_("div"),a=_("button"),l=V("svg"),c=V("path"),u=j(),d=_("div"),v=_("div"),n=_("strong"),I=$(E),R=j(),b=_("strong"),w=$(k),B=j(),p=_("button"),g=V("svg"),T=V("path"),this.h()},l(r){s=m(r,"DIV",{class:!0});var h=i(s);a=m(h,"BUTTON",{"aria-label":!0,class:!0});var S=i(a);l=H(S,"svg",{"aria-hidden":!0,viewBox:!0,class:!0});var M=i(l);c=H(M,"path",{d:!0,class:!0}),i(c).forEach(o),M.forEach(o),S.forEach(o),u=C(h),d=m(h,"DIV",{class:!0});var G=i(d);v=m(G,"DIV",{class:!0,style:!0});var x=i(v);n=m(x,"STRONG",{style:!0,"aria-hidden":!0,class:!0});var N=i(n);I=D(N,E),N.forEach(o),R=C(x),b=m(x,"STRONG",{class:!0});var U=i(b);w=D(U,k),U.forEach(o),x.forEach(o),G.forEach(o),B=C(h),p=m(h,"BUTTON",{"aria-label":!0,class:!0});var A=i(p);g=H(A,"svg",{"aria-hidden":!0,viewBox:!0,class:!0});var F=i(g);T=H(F,"path",{d:!0,class:!0}),i(T).forEach(o),F.forEach(o),A.forEach(o),h.forEach(o),this.h()},h(){t(c,"d","M0,0.5 L1,0.5"),t(c,"class","svelte-139m1ow"),t(l,"aria-hidden","true"),t(l,"viewBox","0 0 1 1"),t(l,"class","svelte-139m1ow"),t(a,"aria-label","Decrease the counter by one"),t(a,"class","svelte-139m1ow"),L(n,"top","-100%"),t(n,"aria-hidden","true"),t(n,"class","svelte-139m1ow"),t(b,"class","svelte-139m1ow"),t(v,"class","counter-digits svelte-139m1ow"),L(v,"transform","translate(0, "+100*f[2]+"%)"),t(d,"class","counter-viewport svelte-139m1ow"),t(T,"d","M0,0.5 L1,0.5 M0.5,0 L0.5,1"),t(T,"class","svelte-139m1ow"),t(g,"aria-hidden","true"),t(g,"viewBox","0 0 1 1"),t(g,"class","svelte-139m1ow"),t(p,"aria-label","Increase the counter by one"),t(p,"class","svelte-139m1ow"),t(s,"class","counter svelte-139m1ow")},m(r,h){q(r,s,h),e(s,a),e(a,l),e(l,c),e(s,u),e(s,d),e(d,v),e(v,n),e(n,I),e(v,R),e(v,b),e(b,w),e(s,B),e(s,p),e(p,g),e(g,T),y||(O=[W(a,"click",f[4]),W(p,"click",f[5])],y=!0)},p(r,[h]){h&2&&E!==(E=Math.floor(r[1]+1)+"")&&z(I,E),h&2&&k!==(k=Math.floor(r[1])+"")&&z(w,k),h&4&&L(v,"transform","translate(0, "+100*r[2]+"%)")},i:K,o:K,d(r){r&&o(s),y=!1,X(O)}}}function ie(f,s){return(f%s+s)%s}function ue(f,s,a){let l,c,u=0;const d=Y();Z(f,d,E=>a(1,c=E));const v=()=>a(0,u-=1),n=()=>a(0,u+=1);return f.$$.update=()=>{f.$$.dirty&1&&d.set(u),f.$$.dirty&2&&a(2,l=ie(c,1))},[u,c,l,d,v,n]}class de extends J{constructor(s){super();P(this,s,ue,ce,Q,{})}}function ve(f){let s,a,l,c,u,d,v,n,E,I,R,b,k,w,B,p,g,T,y,O;return y=new de({}),{c(){s=j(),a=_("section"),l=_("h1"),c=_("div"),u=_("picture"),d=_("source"),v=j(),n=_("img"),I=$(` + + to your new`),R=_("br"),b=$("SvelteKit app"),k=j(),w=_("h2"),B=$("try editing "),p=_("strong"),g=$("src/routes/index.svelte"),T=j(),ee(y.$$.fragment),this.h()},l(r){te('[data-svelte="svelte-1anpopb"]',document.head).forEach(o),s=C(r),a=m(r,"SECTION",{class:!0});var S=i(a);l=m(S,"H1",{class:!0});var M=i(l);c=m(M,"DIV",{class:!0});var G=i(c);u=m(G,"PICTURE",{});var x=i(u);d=m(x,"SOURCE",{srcset:!0,type:!0}),v=C(x),n=m(x,"IMG",{src:!0,alt:!0,class:!0}),x.forEach(o),G.forEach(o),I=D(M,` + + to your new`),R=m(M,"BR",{}),b=D(M,"SvelteKit app"),M.forEach(o),k=C(S),w=m(S,"H2",{});var N=i(w);B=D(N,"try editing "),p=m(N,"STRONG",{});var U=i(p);g=D(U,"src/routes/index.svelte"),U.forEach(o),N.forEach(o),T=C(S),se(y.$$.fragment,S),S.forEach(o),this.h()},h(){document.title="Home",t(d,"srcset","svelte-welcome.webp"),t(d,"type","image/webp"),ae(n.src,E="svelte-welcome.png")||t(n,"src",E),t(n,"alt","Welcome"),t(n,"class","svelte-mjk9ig"),t(c,"class","welcome svelte-mjk9ig"),t(l,"class","svelte-mjk9ig"),t(a,"class","svelte-mjk9ig")},m(r,h){q(r,s,h),q(r,a,h),e(a,l),e(l,c),e(c,u),e(u,d),e(u,v),e(u,n),e(l,I),e(l,R),e(l,b),e(a,k),e(a,w),e(w,B),e(w,p),e(p,g),e(a,T),re(y,a,null),O=!0},p:K,i(r){O||(le(y.$$.fragment,r),O=!0)},o(r){oe(y.$$.fragment,r),O=!1},d(r){r&&o(s),r&&o(a),ne(y)}}}const _e=!0;class me extends J{constructor(s){super();P(this,s,null,ve,Q,{})}}export{me as default,_e as prerender}; diff --git a/build/_app/pages/todos/index.svelte-82693d56.js b/build/_app/pages/todos/index.svelte-82693d56.js new file mode 100644 index 0000000000000000000000000000000000000000..c380dd29a1887ec4a38189e5ea61cf1748202e74 --- /dev/null +++ b/build/_app/pages/todos/index.svelte-82693d56.js @@ -0,0 +1 @@ +import{S as ae,i as oe,s as ne,e as E,j as D,c as T,a as y,l as F,d as k,b as n,I as Q,f as K,J as f,W as V,X as W,Y as le,Z as se,_ as re,$ as ie,a0 as x,T as de,t as ue,V as ce,g as _e,a1 as fe,o as he,p as me,n as pe,a2 as ve,a3 as $,m as be,a4 as ge,K as ke}from"../../chunks/vendor-d68c61c2.js";function C(d,{pending:t,error:e,result:a}){let h;async function j(m){const c=h={};m.preventDefault();const v=new FormData(d);t&&t(v,d);try{const r=await fetch(d.action,{method:d.method,headers:{accept:"application/json"},body:v});if(c!==h)return;r.ok?a(r,d):e?e(r,null,d):console.error(await r.text())}catch(r){if(e)e(null,r,d);else throw r}}return d.addEventListener("submit",j),{destroy(){d.removeEventListener("submit",j)}}}function ee(d,t,e){const a=d.slice();return a[6]=t[e],a[7]=t,a[8]=e,a}function te(d,t){let e,a,h,j,m,c,v,r,o,p,_,b,I,M,O,s,i,l,q,R,N,B,L,U,A,H=ke,w,J,X;function Y(...g){return t[3](t[6],t[7],t[8],...g)}function Z(){return t[4](t[6],t[7],t[8])}function z(){return t[5](t[6])}return{key:d,first:null,c(){e=E("div"),a=E("form"),h=E("input"),m=D(),c=E("button"),p=D(),_=E("form"),b=E("input"),M=D(),O=E("button"),i=D(),l=E("form"),q=E("button"),L=D(),this.h()},l(g){e=T(g,"DIV",{class:!0});var u=y(e);a=T(u,"FORM",{action:!0,method:!0});var P=y(a);h=T(P,"INPUT",{type:!0,name:!0,class:!0}),m=F(P),c=T(P,"BUTTON",{class:!0,"aria-label":!0}),y(c).forEach(k),P.forEach(k),p=F(u),_=T(u,"FORM",{class:!0,action:!0,method:!0});var S=y(_);b=T(S,"INPUT",{"aria-label":!0,type:!0,name:!0,class:!0}),M=F(S),O=T(S,"BUTTON",{class:!0,"aria-label":!0}),y(O).forEach(k),S.forEach(k),i=F(u),l=T(u,"FORM",{action:!0,method:!0});var G=y(l);q=T(G,"BUTTON",{class:!0,"aria-label":!0}),y(q).forEach(k),G.forEach(k),L=F(u),u.forEach(k),this.h()},h(){n(h,"type","hidden"),n(h,"name","done"),h.value=j=t[6].done?"":"true",n(h,"class","svelte-dmxqmd"),n(c,"class","toggle svelte-dmxqmd"),n(c,"aria-label",v="Mark todo as "+(t[6].done?"not done":"done")),n(a,"action",r="/todos/"+t[6].uid+".json?_method=patch"),n(a,"method","post"),n(b,"aria-label","Edit todo"),n(b,"type","text"),n(b,"name","text"),b.value=I=t[6].text,n(b,"class","svelte-dmxqmd"),n(O,"class","save svelte-dmxqmd"),n(O,"aria-label","Save todo"),n(_,"class","text svelte-dmxqmd"),n(_,"action",s="/todos/"+t[6].uid+".json?_method=patch"),n(_,"method","post"),n(q,"class","delete svelte-dmxqmd"),n(q,"aria-label","Delete todo"),q.disabled=R=t[6].pending_delete,n(l,"action",N="/todos/"+t[6].uid+".json?_method=delete"),n(l,"method","post"),n(e,"class","todo svelte-dmxqmd"),Q(e,"done",t[6].done),this.first=e},m(g,u){K(g,e,u),f(e,a),f(a,h),f(a,m),f(a,c),f(e,p),f(e,_),f(_,b),f(_,M),f(_,O),f(e,i),f(e,l),f(l,q),f(e,L),w=!0,J||(X=[V(o=C.call(null,a,{pending:Y,result:t[1]})),V(C.call(null,_,{result:t[1]})),V(B=C.call(null,l,{pending:Z,result:z}))],J=!0)},p(g,u){t=g,(!w||u&1&&j!==(j=t[6].done?"":"true"))&&(h.value=j),(!w||u&1&&v!==(v="Mark todo as "+(t[6].done?"not done":"done")))&&n(c,"aria-label",v),(!w||u&1&&r!==(r="/todos/"+t[6].uid+".json?_method=patch"))&&n(a,"action",r),o&&W(o.update)&&u&1&&o.update.call(null,{pending:Y,result:t[1]}),(!w||u&1&&I!==(I=t[6].text)&&b.value!==I)&&(b.value=I),(!w||u&1&&s!==(s="/todos/"+t[6].uid+".json?_method=patch"))&&n(_,"action",s),(!w||u&1&&R!==(R=t[6].pending_delete))&&(q.disabled=R),(!w||u&1&&N!==(N="/todos/"+t[6].uid+".json?_method=delete"))&&n(l,"action",N),B&&W(B.update)&&u&1&&B.update.call(null,{pending:Z,result:z}),u&1&&Q(e,"done",t[6].done)},r(){A=e.getBoundingClientRect()},f(){le(e),H(),se(e,A)},a(){H(),H=re(e,A,ve,{duration:200})},i(g){w||(g&&ie(()=>{U||(U=x(e,$,{start:.7},!0)),U.run(1)}),w=!0)},o(g){g&&(U||(U=x(e,$,{start:.7},!1)),U.run(0)),w=!1},d(g){g&&k(e),g&&U&&U.end(),J=!1,de(X)}}}function je(d){let t,e,a,h,j,m,c,v,r,o=[],p=new Map,_,b,I,M=d[0];const O=s=>s[6].uid;for(let s=0;s{const t=await d("/todos.json");if(t.ok)return{props:{todos:await t.json()}};const{message:e}=await t.json();return{error:new Error(e)}};function Ee(d,t,e){let{todos:a}=t;async function h(r){const o=await r.json();e(0,a=a.map(p=>p.uid===o.uid?o:p))}const j=async(r,o)=>{const p=await r.json();e(0,a=[...a,p]),o.reset()},m=(r,o,p,_)=>{e(0,o[p].done=!!_.get("done"),a)},c=(r,o,p)=>e(0,o[p].pending_delete=!0,a),v=r=>{e(0,a=a.filter(o=>o.uid!==r.uid))};return d.$$set=r=>{"todos"in r&&e(0,a=r.todos)},[a,h,j,m,c,v]}class we extends ae{constructor(t){super();oe(this,t,Ee,je,ne,{todos:0})}}export{we as default,qe as load}; diff --git a/build/_app/start-39c66b50.js b/build/_app/start-39c66b50.js new file mode 100644 index 0000000000000000000000000000000000000000..dd5609e6b675edbd508184a317edbc0dd337dad4 --- /dev/null +++ b/build/_app/start-39c66b50.js @@ -0,0 +1 @@ +var ne=Object.defineProperty,ie=Object.defineProperties;var ae=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=(n,e,t)=>e in n?ne(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,A=(n,e)=>{for(var t in e||(e={}))J.call(e,t)&&M(n,t,e[t]);if(B)for(var t of B(e))G.call(e,t)&&M(n,t,e[t]);return n},Y=(n,e)=>ie(n,ae(e));var X=(n,e)=>{var t={};for(var r in n)J.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&B)for(var r of B(n))e.indexOf(r)<0&&G.call(n,r)&&(t[r]=n[r]);return t};import{S as oe,i as le,s as ce,e as fe,c as ue,a as he,d as y,b as K,f as k,t as de,g as _e,h as pe,j as me,k as m,l as ge,m as T,n as g,o as j,p as w,q as we,r as be,u as ve,v as E,w as O,x as R,y as C,z as I,A as L,B as V,C as W,D as F}from"./chunks/vendor-d68c61c2.js";function ye(n){let e,t,r;const l=[n[1]||{}];var i=n[0][0];function a(s){let o={};for(let c=0;c{L(f,1)}),j()}i?(e=new i(a()),E(e.$$.fragment),w(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else i&&e.$set(c)},i(s){r||(e&&w(e.$$.fragment,s),r=!0)},o(s){e&&g(e.$$.fragment,s),r=!1},d(s){s&&y(t),e&&L(e,s)}}}function $e(n){let e,t,r;const l=[n[1]||{}];var i=n[0][0];function a(s){let o={$$slots:{default:[Le]},$$scope:{ctx:s}};for(let c=0;c{L(f,1)}),j()}i?(e=new i(a(s)),E(e.$$.fragment),w(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else i&&e.$set(c)},i(s){r||(e&&w(e.$$.fragment,s),r=!0)},o(s){e&&g(e.$$.fragment,s),r=!1},d(s){s&&y(t),e&&L(e,s)}}}function ke(n){let e,t,r;const l=[n[2]||{}];var i=n[0][1];function a(s){let o={};for(let c=0;c{L(f,1)}),j()}i?(e=new i(a()),E(e.$$.fragment),w(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else i&&e.$set(c)},i(s){r||(e&&w(e.$$.fragment,s),r=!0)},o(s){e&&g(e.$$.fragment,s),r=!1},d(s){s&&y(t),e&&L(e,s)}}}function Ee(n){let e,t,r;const l=[n[2]||{}];var i=n[0][1];function a(s){let o={$$slots:{default:[Re]},$$scope:{ctx:s}};for(let c=0;c{L(f,1)}),j()}i?(e=new i(a(s)),E(e.$$.fragment),w(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else i&&e.$set(c)},i(s){r||(e&&w(e.$$.fragment,s),r=!0)},o(s){e&&g(e.$$.fragment,s),r=!1},d(s){s&&y(t),e&&L(e,s)}}}function Re(n){let e,t,r;const l=[n[3]||{}];var i=n[0][2];function a(s){let o={};for(let c=0;c{L(f,1)}),j()}i?(e=new i(a()),E(e.$$.fragment),w(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else i&&e.$set(c)},i(s){r||(e&&w(e.$$.fragment,s),r=!0)},o(s){e&&g(e.$$.fragment,s),r=!1},d(s){s&&y(t),e&&L(e,s)}}}function Le(n){let e,t,r,l;const i=[Ee,ke],a=[];function s(o,c){return o[0][2]?0:1}return e=s(n),t=a[e]=i[e](n),{c(){t.c(),r=m()},l(o){t.l(o),r=m()},m(o,c){a[e].m(o,c),k(o,r,c),l=!0},p(o,c){let f=e;e=s(o),e===f?a[e].p(o,c):(T(),g(a[f],1,1,()=>{a[f]=null}),j(),t=a[e],t?t.p(o,c):(t=a[e]=i[e](o),t.c()),w(t,1),t.m(r.parentNode,r))},i(o){l||(w(t),l=!0)},o(o){g(t),l=!1},d(o){a[e].d(o),o&&y(r)}}}function H(n){let e,t=n[5]&&Q(n);return{c(){e=fe("div"),t&&t.c(),this.h()},l(r){e=ue(r,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,class:!0});var l=he(e);t&&t.l(l),l.forEach(y),this.h()},h(){K(e,"id","svelte-announcer"),K(e,"aria-live","assertive"),K(e,"aria-atomic","true"),K(e,"class","svelte-1j55zn5")},m(r,l){k(r,e,l),t&&t.m(e,null)},p(r,l){r[5]?t?t.p(r,l):(t=Q(r),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(r){r&&y(e),t&&t.d()}}}function Q(n){let e;return{c(){e=de(n[6])},l(t){e=_e(t,n[6])},m(t,r){k(t,e,r)},p(t,r){r&64&&pe(e,t[6])},d(t){t&&y(e)}}}function Se(n){let e,t,r,l,i;const a=[$e,ye],s=[];function o(f,h){return f[0][1]?0:1}e=o(n),t=s[e]=a[e](n);let c=n[4]&&H(n);return{c(){t.c(),r=me(),c&&c.c(),l=m()},l(f){t.l(f),r=ge(f),c&&c.l(f),l=m()},m(f,h){s[e].m(f,h),k(f,r,h),c&&c.m(f,h),k(f,l,h),i=!0},p(f,[h]){let u=e;e=o(f),e===u?s[e].p(f,h):(T(),g(s[u],1,1,()=>{s[u]=null}),j(),t=s[e],t?t.p(f,h):(t=s[e]=a[e](f),t.c()),w(t,1),t.m(r.parentNode,r)),f[4]?c?c.p(f,h):(c=H(f),c.c(),c.m(l.parentNode,l)):c&&(c.d(1),c=null)},i(f){i||(w(t),i=!0)},o(f){g(t),i=!1},d(f){s[e].d(f),f&&y(r),c&&c.d(f),f&&y(l)}}}function Ue(n,e,t){let{stores:r}=e,{page:l}=e,{components:i}=e,{props_0:a=null}=e,{props_1:s=null}=e,{props_2:o=null}=e;we("__svelte__",r),be(r.page.notify);let c=!1,f=!1,h=null;return ve(()=>{const u=r.page.subscribe(()=>{c&&(t(5,f=!0),t(6,h=document.title||"untitled page"))});return t(4,c=!0),u}),n.$$set=u=>{"stores"in u&&t(7,r=u.stores),"page"in u&&t(8,l=u.page),"components"in u&&t(0,i=u.components),"props_0"in u&&t(1,a=u.props_0),"props_1"in u&&t(2,s=u.props_1),"props_2"in u&&t(3,o=u.props_2)},n.$$.update=()=>{n.$$.dirty&384&&r.page.set(l)},[i,a,s,o,c,f,h,r,l]}class Ae extends oe{constructor(e){super();le(this,e,Ue,Se,ce,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const Pe="modulepreload",Z={},Te="/_app/",D=function(e,t){return!t||t.length===0?e():Promise.all(t.map(r=>{if(r=`${Te}${r}`,r in Z)return;Z[r]=!0;const l=r.endsWith(".css"),i=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${i}`))return;const a=document.createElement("link");if(a.rel=l?"stylesheet":Pe,l||(a.as="script",a.crossOrigin=""),a.href=r,document.head.appendChild(a),l)return new Promise((s,o)=>{a.addEventListener("load",s),a.addEventListener("error",o)})})).then(()=>e())},$=[()=>D(()=>import("./pages/__layout.svelte-2dd96704.js"),["pages/__layout.svelte-2dd96704.js","assets/pages/__layout.svelte-a7861b78.css","chunks/vendor-d68c61c2.js"]),()=>D(()=>import("./error.svelte-97b7e85d.js"),["error.svelte-97b7e85d.js","chunks/vendor-d68c61c2.js"]),()=>D(()=>import("./pages/index.svelte-934bb81d.js"),["pages/index.svelte-934bb81d.js","assets/pages/index.svelte-c63fe1c6.css","chunks/vendor-d68c61c2.js"]),()=>D(()=>import("./pages/about.svelte-a7982a52.js"),["pages/about.svelte-a7982a52.js","assets/pages/about.svelte-bf4528fa.css","chunks/vendor-d68c61c2.js"]),()=>D(()=>import("./pages/todos/index.svelte-82693d56.js"),["pages/todos/index.svelte-82693d56.js","assets/pages/todos/index.svelte-784042c1.css","chunks/vendor-d68c61c2.js"])],je=[[/^\/$/,[$[0],$[2]],[$[1]]],[/^\/about\/?$/,[$[0],$[3]],[$[1]]],,[/^\/todos\/?$/,[$[0],$[4]],[$[1]]]],Ne=[$[0](),$[1]()];function Oe(n){let e=n.baseURI;if(!e){const t=n.getElementsByTagName("base");e=t.length?t[0].href:n.URL}return e}let x="";function Ce(n){x=n.base,n.assets}function z(){return{x:pageXOffset,y:pageYOffset}}function ee(n){return n.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function te(n){return n instanceof SVGAElement?new URL(n.href.baseVal,document.baseURI):new URL(n.href)}class Ie{constructor({base:e,routes:t,trailing_slash:r,renderer:l}){this.base=e,this.routes=t,this.trailing_slash=r,this.navigating=0,this.renderer=l,l.router=this,this.enabled=!0,document.body.setAttribute("tabindex","-1"),history.replaceState(history.state||{},"",location.href)}init_listeners(){"scrollRestoration"in history&&(history.scrollRestoration="manual"),addEventListener("beforeunload",()=>{history.scrollRestoration="auto"}),addEventListener("load",()=>{history.scrollRestoration="manual"});let e;addEventListener("scroll",()=>{clearTimeout(e),e=setTimeout(()=>{const i=Y(A({},history.state||{}),{"sveltekit:scroll":z()});history.replaceState(i,document.title,window.location.href)},200)});const t=i=>{const a=ee(i);a&&a.href&&a.hasAttribute("sveltekit:prefetch")&&this.prefetch(te(a))};let r;const l=i=>{clearTimeout(r),r=setTimeout(()=>{var a;(a=i.target)==null||a.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",t),addEventListener("mousemove",l),addEventListener("sveltekit:trigger_prefetch",t),addEventListener("click",i=>{if(!this.enabled||i.button||i.which!==1||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.defaultPrevented)return;const a=ee(i);if(!a||!a.href)return;const s=te(a);if(s.toString()===location.href){location.hash||i.preventDefault();return}const c=(a.getAttribute("rel")||"").split(/\s+/);if(a.hasAttribute("download")||c&&c.includes("external")||(a instanceof SVGAElement?a.target.baseVal:a.target)||!this.owns(s))return;if(s.href.split("#")[0]===location.href.split("#")[0]){setTimeout(()=>history.pushState({},"",s.href));return}history.pushState({},"",s.href);const f=a.hasAttribute("sveltekit:noscroll");this._navigate(s,f?z():null,!1,[],s.hash),i.preventDefault()}),addEventListener("popstate",i=>{if(i.state&&this.enabled){const a=new URL(location.href);this._navigate(a,i.state["sveltekit:scroll"],!1,[])}})}owns(e){return e.origin===location.origin&&e.pathname.startsWith(this.base)}parse(e){if(this.owns(e)){const t=decodeURI(e.pathname.slice(this.base.length)||"/");return{id:e.pathname+e.search,routes:this.routes.filter(([r])=>r.test(t)),url:e,path:t}}}async goto(e,{noscroll:t=!1,replaceState:r=!1,keepfocus:l=!1,state:i={}}={},a){const s=new URL(e,Oe(document));return this.enabled&&this.owns(s)?(history[r?"replaceState":"pushState"](i,"",e),this._navigate(s,t?z():null,l,a,s.hash)):(location.href=s.href,new Promise(()=>{}))}enable(){this.enabled=!0}disable(){this.enabled=!1}async prefetch(e){const t=this.parse(e);if(!t)throw new Error("Attempted to prefetch a URL that does not belong to this app");return this.renderer.load(t)}async _navigate(e,t,r,l,i){const a=this.parse(e);if(!a)throw new Error("Attempted to navigate to a URL that does not belong to this app");this.navigating||dispatchEvent(new CustomEvent("sveltekit:navigation-start")),this.navigating++;let{pathname:s}=e;this.trailing_slash==="never"?s!=="/"&&s.endsWith("/")&&(s=s.slice(0,-1)):this.trailing_slash==="always"&&!e.pathname.split("/").pop().includes(".")&&!s.endsWith("/")&&(s+="/"),a.url=new URL(e.origin+s+e.search+e.hash),history.replaceState({},"",a.url),await this.renderer.handle_navigation(a,l,!1,{hash:i,scroll:t,keepfocus:r}),this.navigating--,this.navigating||dispatchEvent(new CustomEvent("sveltekit:navigation-end"))}}function se(n){return n instanceof Error||n&&n.name&&n.message?n:new Error(JSON.stringify(n))}function Ve(n){let e=5381,t=n.length;if(typeof n=="string")for(;t;)e=e*33^n.charCodeAt(--t);else for(;t;)e=e*33^n[--t];return(e>>>0).toString(36)}function De(n){const e=n.status&&n.status>=400&&n.status<=599&&!n.redirect;if(n.error||e){const t=n.status;if(!n.error&&e)return{status:t||500,error:new Error};const r=typeof n.error=="string"?new Error(n.error):n.error;return r instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:r}):{status:t,error:r}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof r}"`)}}if(n.redirect){if(!n.status||Math.floor(n.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof n.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(n.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return n}function re(n){const e=W(n);let t=!0;function r(){t=!0,e.update(a=>a)}function l(a){t=!1,e.set(a)}function i(a){let s;return e.subscribe(o=>{(s===void 0||t&&o!==s)&&a(s=o)})}return{notify:r,set:l,subscribe:i}}function qe(n,e){const t=typeof n=="string"?n:n.url;let r=`script[data-type="svelte-data"][data-url=${JSON.stringify(t)}]`;e&&typeof e.body=="string"&&(r+=`[data-body="${Ve(e.body)}"]`);const l=document.querySelector(r);if(l&&l.textContent){const i=JSON.parse(l.textContent),{body:a}=i,s=X(i,["body"]);return Promise.resolve(new Response(a,s))}return fetch(n,e)}class Be{constructor({Root:e,fallback:t,target:r,session:l}){this.Root=e,this.fallback=t,this.router,this.target=r,this.started=!1,this.session_id=1,this.invalid=new Set,this.invalidating=null,this.autoscroll=!0,this.updating=!1,this.current={url:null,session_id:0,branch:[]},this.cache=new Map,this.loading={id:null,promise:null},this.stores={url:re({}),page:re({}),navigating:W(null),session:W(l)},this.$session=null,this.root=null;let i=!1;this.stores.session.subscribe(async a=>{if(this.$session=a,!i||!this.router)return;this.session_id+=1;const s=this.router.parse(new URL(location.href));s&&this.update(s,[],!0)}),i=!0}disable_scroll_handling(){(this.updating||!this.started)&&(this.autoscroll=!1)}async start({status:e,error:t,nodes:r,url:l,params:i}){const a=[];let s={},o,c;try{for(let f=0;f10||t.includes(e.url.pathname))a=await this._load_error({status:500,error:new Error("Redirect loop"),url:e.url});else{this.router?this.router.goto(a.redirect,{replaceState:!0},[...t,e.url.pathname]):location.href=new URL(a.redirect,location.href).href;return}if(this.updating=!0,this.started?(this.current=a.state,this.root.$set(a.props),this.stores.navigating.set(null)):this._init(a),l){const{hash:c,scroll:f,keepfocus:h}=l;if(h||((o=getSelection())==null||o.removeAllRanges(),document.body.focus()),await F(),this.autoscroll){const u=c&&document.getElementById(c.slice(1));f?scrollTo(f.x,f.y):u?u.scrollIntoView():scrollTo(0,0)}}else await F();if(this.loading.promise=null,this.loading.id=null,this.autoscroll=!0,this.updating=!1,!this.router)return;const s=a.state.branch[a.state.branch.length-1];s&&s.module.router===!1?this.router.disable():this.router.enable()}load(e){return this.loading.promise=this._get_navigation_result(e,!1),this.loading.id=e.id,this.loading.promise}invalidate(e){return this.invalid.add(e),this.invalidating||(this.invalidating=Promise.resolve().then(async()=>{const t=this.router&&this.router.parse(new URL(location.href));t&&await this.update(t,[],!0),this.invalidating=null})),this.invalidating}_init(e){this.current=e.state;const t=document.querySelector("style[data-svelte]");t&&t.remove(),this.root=new this.Root({target:this.target,props:A({stores:this.stores},e.props),hydrate:!0}),this.started=!0}async _get_navigation_result(e,t){if(this.loading.id===e.id&&this.loading.promise)return this.loading.promise;for(let r=0;ro()),i+=1;else break}const a=await this._load({route:l,info:e},t);if(a)return a}return await this._load_error({status:404,error:new Error(`Not found: ${e.url.pathname}`),url:e.url})}async _get_navigation_result_from_branch({url:e,params:t,branch:r,status:l,error:i}){const a=r.filter(Boolean),s=a.find(h=>h.loaded&&h.loaded.redirect),o={redirect:s&&s.loaded?s.loaded.redirect:void 0,state:{url:e,params:t,branch:r,session_id:this.session_id},props:{components:a.map(h=>h.module.default)}};for(let h=0;h{Object.defineProperty(o.props.page,u,{get:()=>{throw new Error(`$page.${u} has been replaced by $page.url.${p}`)}})};h("origin","origin"),h("path","pathname"),h("query","searchParams")}const c=a[a.length-1],f=c.loaded&&c.loaded.maxage;if(f){const h=e.pathname+e.search;let u=!1;const p=()=>{this.cache.get(h)===o&&this.cache.delete(h),S(),clearTimeout(P)},P=setTimeout(p,f*1e3),S=this.stores.session.subscribe(()=>{u&&p()});u=!0,this.cache.set(h,o)}return o}async _load_node({status:e,error:t,module:r,url:l,params:i,stuff:a}){const s={module:r,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:[]},loaded:null,stuff:a},o={};for(const f in i)Object.defineProperty(o,f,{get(){return s.uses.params.add(f),i[f]},enumerable:!0});const c=this.$session;if(r.load){const{started:f}=this,h={params:o,get url(){return s.uses.url=!0,l},get session(){return s.uses.session=!0,c},get stuff(){return s.uses.stuff=!0,A({},a)},fetch(p,P){const S=typeof p=="string"?p:p.url,{href:U}=new URL(S,l);return s.uses.dependencies.push(U),f?fetch(p,P):qe(p,P)}};t&&(h.status=e,h.error=t);const u=await r.load.call(null,h);if(!u)return;s.loaded=De(u),s.loaded.stuff&&(s.stuff=s.loaded.stuff)}return s}async _load({route:e,info:{url:t,path:r}},l){const i=t.pathname+t.search;if(!l){const d=this.cache.get(i);if(d)return d}const[a,s,o,c]=e,f=c?c(a.exec(r)):{},h=this.current.url&&{url:i!==this.current.url.pathname+this.current.url.search,params:Object.keys(f).filter(d=>this.current.params[d]!==f[d]),session:this.session_id!==this.current.session_id};let u=[],p={},P=!1,S=200,U;s.forEach(d=>d());e:for(let d=0;dv.uses.params.has(N))||h.session&&v.uses.session||v.uses.dependencies.some(N=>this.invalid.has(N))||P&&v.uses.stuff){_=await this._load_node({module:b,url:t,params:f,stuff:p});const N=d===s.length-1;if(_&&_.loaded){if(_.loaded.error&&(S=_.loaded.status,U=_.loaded.error),_.loaded.redirect)return{redirect:_.loaded.redirect,props:{},state:this.current};_.loaded.stuff&&(P=!0)}else if(N&&b.load)return}else _=v}catch(b){S=500,U=se(b)}if(U){for(;d--;)if(o[d]){let b,v,q=d;for(;!(v=u[q]);)q-=1;try{if(b=await this._load_node({status:S,error:U,module:await o[d](),url:t,params:f,stuff:v.stuff}),b&&b.loaded&&b.loaded.error)continue;u=u.slice(0,q+1).concat(b);break e}catch{continue}}return await this._load_error({status:S,error:U,url:t})}else _&&_.loaded&&_.loaded.stuff&&(p=A(A({},p),_.loaded.stuff)),u.push(_)}return await this._get_navigation_result_from_branch({url:t,params:f,branch:u,status:S,error:U})}async _load_error({status:e,error:t,url:r}){const l={},i=await this._load_node({module:await this.fallback[0],url:r,params:l,stuff:{}}),a=[i,await this._load_node({status:e,error:t,module:await this.fallback[1],url:r,params:l,stuff:i&&i.loaded&&i.loaded.stuff||{}})];return await this._get_navigation_result_from_branch({url:r,params:l,branch:a,status:e,error:t})}}async function ze({paths:n,target:e,session:t,route:r,spa:l,trailing_slash:i,hydrate:a}){const s=new Be({Root:Ae,fallback:Ne,target:e,session:t}),o=r?new Ie({base:n.base,routes:je,trailing_slash:i,renderer:s}):null;Ce(n),a&&await s.start(a),o&&(l&&o.goto(location.href,{replaceState:!0},[]),o.init_listeners()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{ze as start}; diff --git a/build/about/index.html b/build/about/index.html new file mode 100644 index 0000000000000000000000000000000000000000..ce0140584b368f21e560cdd96c717fe679bdb01c --- /dev/null +++ b/build/about/index.html @@ -0,0 +1,59 @@ + + + + + + + + About + + + + + + + + + + +
+ + +
SvelteKit
+ + + +
+
+ +
+ +

About this app

+ +

This is a SvelteKit app. You can make your own by typing the + following into your command line and following the prompts: +

+ + +
npm init svelte@next
+ +

The page you're looking at is purely static HTML, with no client-side interactivity needed. + Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening + the devtools network panel and reloading. +

+ +

The TODOs page illustrates SvelteKit's data loading and form handling. Try using + it with JavaScript disabled! +

+
+ + + +
+ + diff --git a/build/favicon.png b/build/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 Binary files /dev/null and b/build/favicon.png differ diff --git a/build/index.html b/build/index.html new file mode 100644 index 0000000000000000000000000000000000000000..051fa27611d1431992a3f60686ad3b04c0ceba54 --- /dev/null +++ b/build/index.html @@ -0,0 +1,81 @@ + + + + + + + + Home + + + + + + + + + + + + + + +
+ + +
SvelteKit
+ + + +
+
+ +
+ +

+ Welcome
+ + to your new
SvelteKit app +

+ +

try editing src/routes/index.svelte

+ +
+ +
+ 0
+ + +
+
+ + + +
+ + diff --git a/build/robots.txt b/build/robots.txt new file mode 100644 index 0000000000000000000000000000000000000000..e9e57dc4d41b9b46e05112e9f45b7ea6ac0ba15e --- /dev/null +++ b/build/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/build/svelte-welcome.png b/build/svelte-welcome.png new file mode 100644 index 0000000000000000000000000000000000000000..fe7d2d6b50ce937a0c3cecaa9a3501dfe138b7c8 Binary files /dev/null and b/build/svelte-welcome.png differ diff --git a/build/svelte-welcome.webp b/build/svelte-welcome.webp new file mode 100644 index 0000000000000000000000000000000000000000..6ec1a28d63b49d9288d0bc3bf3a341eb4edf3318 Binary files /dev/null and b/build/svelte-welcome.webp differ diff --git a/build/todos.json b/build/todos.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/build/todos.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/build/todos/index.html b/build/todos/index.html new file mode 100644 index 0000000000000000000000000000000000000000..682dd67d846dd73be781ac7a3625b989eaaef057 --- /dev/null +++ b/build/todos/index.html @@ -0,0 +1,71 @@ + + + + + + + + Todos + + + + + + + + + + + + + + +
+ + +
SvelteKit
+ + + +
+
+ +
+ +

Todos

+ +
+ + +
+ + + +
+ + diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..3757b0e28f6fc6f18f97e3ff7352f1dd88c03120 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "$lib": ["src/lib"], + "$lib/*": ["src/lib/*"] + } + }, + "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000000000000000000000000000000000000..580384327ea2309fffc0aae5f70cb0d53fb6a6cb --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "sp-static-noconfig", + "version": "0.0.1", + "scripts": { + "dev": "svelte-kit dev", + "build": "svelte-kit build", + "package": "svelte-kit package", + "preview": "svelte-kit preview" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "next", + "@sveltejs/kit": "next", + "svelte": "^3.44.0" + }, + "type": "module", + "dependencies": { + "@fontsource/fira-mono": "^4.5.0", + "@lukeed/uuid": "^2.0.0", + "@sveltejs/adapter-static": "^1.0.0-next.24", + "cookie": "^0.4.1" + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f274d3445639a4a2942cc5569b2334455f11a7c9 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,472 @@ +lockfileVersion: 5.3 + +specifiers: + '@fontsource/fira-mono': ^4.5.0 + '@lukeed/uuid': ^2.0.0 + '@sveltejs/adapter-auto': next + '@sveltejs/adapter-static': ^1.0.0-next.24 + '@sveltejs/kit': next + cookie: ^0.4.1 + svelte: ^3.44.0 + +dependencies: + '@fontsource/fira-mono': 4.5.0 + '@lukeed/uuid': 2.0.0 + '@sveltejs/adapter-static': 1.0.0-next.24 + cookie: 0.4.1 + +devDependencies: + '@sveltejs/adapter-auto': 1.0.0-next.10 + '@sveltejs/kit': 1.0.0-next.218_svelte@3.45.0 + svelte: 3.45.0 + +packages: + + /@fontsource/fira-mono/4.5.0: + resolution: {integrity: sha512-KE+d3wmgq/YKM0BqgUF7p2yeBNi805Nfof1lC1wJ7E9i2EWoC363sGdKG+MQBVm+ei3GYZu+Bo8Xha1w1pkB7g==} + dev: false + + /@iarna/toml/2.2.5: + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} + dev: true + + /@lukeed/csprng/1.0.1: + resolution: {integrity: sha512-uSvJdwQU5nK+Vdf6zxcWAY2A8r7uqe+gePwLWzJ+fsQehq18pc0I2hJKwypZ2aLM90+Er9u1xn4iLJPZ+xlL4g==} + engines: {node: '>=8'} + dev: false + + /@lukeed/uuid/2.0.0: + resolution: {integrity: sha512-dUz8OmYvlY5A9wXaroHIMSPASpSYRLCqbPvxGSyHguhtTQIy24lC+EGxQlwv71AhRCO55WOtgwhzQLpw27JaJQ==} + engines: {node: '>=8'} + dependencies: + '@lukeed/csprng': 1.0.1 + dev: false + + /@rollup/pluginutils/4.1.2: + resolution: {integrity: sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==} + engines: {node: '>= 8.0.0'} + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + + /@sveltejs/adapter-auto/1.0.0-next.10: + resolution: {integrity: sha512-ETMhpg8bUtLpRAqGxuRmm7teRCdg8u8ANF6eC8R2QLSy1ylPP6RPPg8D5q6LiJavVG/kHMH8fj7vvfobpVfwFg==} + dependencies: + '@sveltejs/adapter-cloudflare': 1.0.0-next.7 + '@sveltejs/adapter-netlify': 1.0.0-next.38 + '@sveltejs/adapter-vercel': 1.0.0-next.36 + dev: true + + /@sveltejs/adapter-cloudflare/1.0.0-next.7: + resolution: {integrity: sha512-P2rq+Tdvv9IKX4SVrIRqgZ2DnjmpPjp/bhAISs6cgbMzc2AmLMCeN++DXAZAVWugIjF1freLmtXcCl3/0HByNg==} + dependencies: + esbuild: 0.13.15 + dev: true + + /@sveltejs/adapter-netlify/1.0.0-next.38: + resolution: {integrity: sha512-u0mCV3YOBakdeiIt4Sd7buiTACkzHpPuUoSkLjtmJ5PsbrvtFhFNKE4AARqI8nDoX1yjs6pUKlIX3IZDmEeM5A==} + dependencies: + '@iarna/toml': 2.2.5 + esbuild: 0.13.15 + tiny-glob: 0.2.9 + dev: true + + /@sveltejs/adapter-static/1.0.0-next.24: + resolution: {integrity: sha512-lMiwZrZumWRrTQxaj9pFs5oW0h/97spyDl1QjmnkNaA006WeqornoETt31WpU0Lz2/2uYNXvUBBcL1LGc9Vylg==} + dependencies: + tiny-glob: 0.2.9 + dev: false + + /@sveltejs/adapter-vercel/1.0.0-next.36: + resolution: {integrity: sha512-IpvxBb5n9k5l6nikwq8mCeBg0VtSqAt7AY/PSujwjGs5KqYx3CrVu/Cyj4b0dyCO2Yyt2dr2QjS/R2R42PRBeA==} + dependencies: + esbuild: 0.13.15 + dev: true + + /@sveltejs/kit/1.0.0-next.218_svelte@3.45.0: + resolution: {integrity: sha512-reimVgWaFq0qIvxkKnWE4nq35JFd6yQ6Lkge+o3WkX3hV8CAtrLbSAzFaEIUu5Ph09gJkl2PnqQa32WVDaeBZg==} + engines: {node: '>=14.13'} + hasBin: true + peerDependencies: + svelte: ^3.44.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 1.0.0-next.34_svelte@3.45.0+vite@2.7.10 + sade: 1.8.1 + svelte: 3.45.0 + vite: 2.7.10 + transitivePeerDependencies: + - diff-match-patch + - less + - sass + - stylus + - supports-color + dev: true + + /@sveltejs/vite-plugin-svelte/1.0.0-next.34_svelte@3.45.0+vite@2.7.10: + resolution: {integrity: sha512-qZH2jndijrdkvevgbO7OH3iQsviM5Kz7h5APiNP4yEMZTrwq9bifzYvco6BprwtPvLb5wYlRVFZUOdusY6AovQ==} + engines: {node: ^14.13.1 || >= 16} + peerDependencies: + diff-match-patch: ^1.0.5 + svelte: ^3.44.0 + vite: ^2.7.0 + peerDependenciesMeta: + diff-match-patch: + optional: true + dependencies: + '@rollup/pluginutils': 4.1.2 + debug: 4.3.3 + kleur: 4.1.4 + magic-string: 0.25.7 + require-relative: 0.8.7 + svelte: 3.45.0 + svelte-hmr: 0.14.9_svelte@3.45.0 + vite: 2.7.10 + transitivePeerDependencies: + - supports-color + dev: true + + /cookie/0.4.1: + resolution: {integrity: sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==} + engines: {node: '>= 0.6'} + dev: false + + /debug/4.3.3: + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /esbuild-android-arm64/0.13.15: + resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /esbuild-darwin-64/0.13.15: + resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /esbuild-darwin-arm64/0.13.15: + resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /esbuild-freebsd-64/0.13.15: + resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /esbuild-freebsd-arm64/0.13.15: + resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-32/0.13.15: + resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-64/0.13.15: + resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-arm/0.13.15: + resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-arm64/0.13.15: + resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-mips64le/0.13.15: + resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-ppc64le/0.13.15: + resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-netbsd-64/0.13.15: + resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /esbuild-openbsd-64/0.13.15: + resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /esbuild-sunos-64/0.13.15: + resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /esbuild-windows-32/0.13.15: + resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild-windows-64/0.13.15: + resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild-windows-arm64/0.13.15: + resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /esbuild/0.13.15: + resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==} + hasBin: true + requiresBuild: true + optionalDependencies: + esbuild-android-arm64: 0.13.15 + esbuild-darwin-64: 0.13.15 + esbuild-darwin-arm64: 0.13.15 + esbuild-freebsd-64: 0.13.15 + esbuild-freebsd-arm64: 0.13.15 + esbuild-linux-32: 0.13.15 + esbuild-linux-64: 0.13.15 + esbuild-linux-arm: 0.13.15 + esbuild-linux-arm64: 0.13.15 + esbuild-linux-mips64le: 0.13.15 + esbuild-linux-ppc64le: 0.13.15 + esbuild-netbsd-64: 0.13.15 + esbuild-openbsd-64: 0.13.15 + esbuild-sunos-64: 0.13.15 + esbuild-windows-32: 0.13.15 + esbuild-windows-64: 0.13.15 + esbuild-windows-arm64: 0.13.15 + dev: true + + /estree-walker/2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind/1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true + + /globalyzer/0.1.0: + resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + + /globrex/0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + + /has/1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: true + + /is-core-module/2.8.1: + resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} + dependencies: + has: 1.0.3 + dev: true + + /kleur/4.1.4: + resolution: {integrity: sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==} + engines: {node: '>=6'} + dev: true + + /magic-string/0.25.7: + resolution: {integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + + /mri/1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: true + + /ms/2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /nanoid/3.1.30: + resolution: {integrity: sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /path-parse/1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /postcss/8.4.5: + resolution: {integrity: sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.1.30 + picocolors: 1.0.0 + source-map-js: 1.0.1 + dev: true + + /require-relative/0.8.7: + resolution: {integrity: sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=} + dev: true + + /resolve/1.21.0: + resolution: {integrity: sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==} + hasBin: true + dependencies: + is-core-module: 2.8.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /rollup/2.63.0: + resolution: {integrity: sha512-nps0idjmD+NXl6OREfyYXMn/dar3WGcyKn+KBzPdaLecub3x/LrId0wUcthcr8oZUAcZAR8NKcfGGFlNgGL1kQ==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /sade/1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + dependencies: + mri: 1.2.0 + dev: true + + /source-map-js/1.0.1: + resolution: {integrity: sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==} + engines: {node: '>=0.10.0'} + dev: true + + /sourcemap-codec/1.4.8: + resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + dev: true + + /supports-preserve-symlinks-flag/1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /svelte-hmr/0.14.9_svelte@3.45.0: + resolution: {integrity: sha512-bKE9+4qb4sAnA+TKHiYurUl970rjA0XmlP9TEP7K/ncyWz3m81kA4HOgmlZK/7irGK7gzZlaPDI3cmf8fp/+tg==} + peerDependencies: + svelte: '>=3.19.0' + dependencies: + svelte: 3.45.0 + dev: true + + /svelte/3.45.0: + resolution: {integrity: sha512-6AWftH2eqqKLYH1HvKpuUWe8OfjflarhegN57P/Cqwc2Rb2F5oIdDtANU/jMscyZMzG0v6nTQox0siZR9cmRVQ==} + engines: {node: '>= 8'} + dev: true + + /tiny-glob/0.2.9: + resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} + dependencies: + globalyzer: 0.1.0 + globrex: 0.1.2 + + /vite/2.7.10: + resolution: {integrity: sha512-KEY96ntXUid1/xJihJbgmLZx7QSC2D4Tui0FdS0Old5OokYzFclcofhtxtjDdGOk/fFpPbHv9yw88+rB93Tb8w==} + engines: {node: '>=12.2.0'} + hasBin: true + peerDependencies: + less: '*' + sass: '*' + stylus: '*' + peerDependenciesMeta: + less: + optional: true + sass: + optional: true + stylus: + optional: true + dependencies: + esbuild: 0.13.15 + postcss: 8.4.5 + resolve: 1.21.0 + rollup: 2.63.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000000000000000000000000000000000000..77bf6af764d05b4adcf9c5eaca58d01c97164f06 --- /dev/null +++ b/src/app.css @@ -0,0 +1,107 @@ +@import '@fontsource/fira-mono'; + +:root { + font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, + Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + --font-mono: 'Fira Mono', monospace; + --pure-white: #ffffff; + --primary-color: #b9c6d2; + --secondary-color: #d0dde9; + --tertiary-color: #edf0f8; + --accent-color: #ff3e00; + --heading-color: rgba(0, 0, 0, 0.7); + --text-color: #444444; + --background-without-opacity: rgba(255, 255, 255, 0.7); + --column-width: 42rem; + --column-margin-top: 4rem; +} + +body { + min-height: 100vh; + margin: 0; + background-color: var(--primary-color); + background: linear-gradient( + 180deg, + var(--primary-color) 0%, + var(--secondary-color) 10.45%, + var(--tertiary-color) 41.35% + ); +} + +body::before { + content: ''; + width: 80vw; + height: 100vh; + position: absolute; + top: 0; + left: 10vw; + z-index: -1; + background: radial-gradient( + 50% 50% at 50% 50%, + var(--pure-white) 0%, + rgba(255, 255, 255, 0) 100% + ); + opacity: 0.05; +} + +#svelte { + min-height: 100vh; + display: flex; + flex-direction: column; +} + +h1, +h2, +p { + font-weight: 400; + color: var(--heading-color); +} + +p { + line-height: 1.5; +} + +a { + color: var(--accent-color); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +h1 { + font-size: 2rem; + text-align: center; +} + +h2 { + font-size: 1rem; +} + +pre { + font-size: 16px; + font-family: var(--font-mono); + background-color: rgba(255, 255, 255, 0.45); + border-radius: 3px; + box-shadow: 2px 2px 6px rgb(255 255 255 / 25%); + padding: 0.5em; + overflow-x: auto; + color: var(--text-color); +} + +input, +button { + font-size: inherit; + font-family: inherit; +} + +button:focus:not(:focus-visible) { + outline: none; +} + +@media (min-width: 720px) { + h1 { + font-size: 2.4rem; + } +} diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000000000000000000000000000000000000..e358db2e38fb563ab7e8191f3027ae445b8926b6 --- /dev/null +++ b/src/app.html @@ -0,0 +1,13 @@ + + + + + + + + %svelte.head% + + +
%svelte.body%
+ + diff --git a/src/global.d.ts b/src/global.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..63908c66cfd4acc4a5abbcc02180ca44c7e3787e --- /dev/null +++ b/src/global.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/hooks.js b/src/hooks.js new file mode 100644 index 0000000000000000000000000000000000000000..ba235846ea418577257497dcb59fb42ce9cf1ee4 --- /dev/null +++ b/src/hooks.js @@ -0,0 +1,26 @@ +import cookie from 'cookie'; +import { v4 as uuid } from '@lukeed/uuid'; + +export const handle = async ({ request, resolve }) => { + const cookies = cookie.parse(request.headers.cookie || ''); + request.locals.userid = cookies.userid || uuid(); + + // TODO https://github.com/sveltejs/kit/issues/1046 + const method = request.url.searchParams.get('_method'); + if (method) { + request.method = method.toUpperCase(); + } + + const response = await resolve(request); + + if (!cookies.userid) { + // if this is the first time the user has visited this app, + // set a cookie so that we recognise them when they return + response.headers['set-cookie'] = cookie.serialize('userid', request.locals.userid, { + path: '/', + httpOnly: true + }); + } + + return response; +}; diff --git a/src/lib/Counter.svelte b/src/lib/Counter.svelte new file mode 100644 index 0000000000000000000000000000000000000000..fa23c7c9016ce5aef6b23d0716610d5c4d5c4ee6 --- /dev/null +++ b/src/lib/Counter.svelte @@ -0,0 +1,97 @@ + + +
+ + +
+
+ + {Math.floor($displayed_count)} +
+
+ + +
+ + diff --git a/src/lib/form.js b/src/lib/form.js new file mode 100644 index 0000000000000000000000000000000000000000..df19d96ce16f47743644b6baf27b8f5758ca27ac --- /dev/null +++ b/src/lib/form.js @@ -0,0 +1,49 @@ +// this action (https://svelte.dev/tutorial/actions) allows us to +// progressively enhance a
that already works without JS +export function enhance(form, { pending, error, result }) { + let current_token; + + async function handle_submit(e) { + const token = (current_token = {}); + + e.preventDefault(); + + const body = new FormData(form); + + if (pending) pending(body, form); + + try { + const res = await fetch(form.action, { + method: form.method, + headers: { + accept: 'application/json' + }, + body + }); + + if (token !== current_token) return; + + if (res.ok) { + result(res, form); + } else if (error) { + error(res, null, form); + } else { + console.error(await res.text()); + } + } catch (e) { + if (error) { + error(null, e, form); + } else { + throw e; + } + } + } + + form.addEventListener('submit', handle_submit); + + return { + destroy() { + form.removeEventListener('submit', handle_submit); + } + }; +} diff --git a/src/lib/header/Header.svelte b/src/lib/header/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..93613826536d76f4ad69ee0cb2f3a449eae60381 --- /dev/null +++ b/src/lib/header/Header.svelte @@ -0,0 +1,124 @@ + + +
+
+ + SvelteKit + +
+ + + +
+ +
+
+ + diff --git a/src/lib/header/svelte-logo.svg b/src/lib/header/svelte-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..49492a83cc2fb3cdc02d42936c415735d446b5b5 --- /dev/null +++ b/src/lib/header/svelte-logo.svg @@ -0,0 +1 @@ +svelte-logo \ No newline at end of file diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte new file mode 100644 index 0000000000000000000000000000000000000000..51316ff08daf882ced7ab67b7b41559ff2885e28 --- /dev/null +++ b/src/routes/__layout.svelte @@ -0,0 +1,45 @@ + + +
+ +
+ +
+ + + + diff --git a/src/routes/about.svelte b/src/routes/about.svelte new file mode 100644 index 0000000000000000000000000000000000000000..569d3e177e748372ed5a5ef3a5cd1d2719edc6b2 --- /dev/null +++ b/src/routes/about.svelte @@ -0,0 +1,50 @@ + + + + About + + +
+

About this app

+ +

+ This is a SvelteKit app. You can make your own by typing the + following into your command line and following the prompts: +

+ + +
npm init svelte@next
+ +

+ The page you're looking at is purely static HTML, with no client-side interactivity needed. + Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening + the devtools network panel and reloading. +

+ +

+ The TODOs page illustrates SvelteKit's data loading and form handling. Try using + it with JavaScript disabled! +

+
+ + diff --git a/src/routes/index.svelte b/src/routes/index.svelte new file mode 100644 index 0000000000000000000000000000000000000000..1b2cea1aed6595ab09d44d6dc8f330dc42d547fb --- /dev/null +++ b/src/routes/index.svelte @@ -0,0 +1,59 @@ + + + + + + Home + + +
+

+
+ + + Welcome + +
+ + to your new
SvelteKit app +

+ +

+ try editing src/routes/index.svelte +

+ + +
+ + diff --git a/src/routes/todos/[uid].json.js b/src/routes/todos/[uid].json.js new file mode 100644 index 0000000000000000000000000000000000000000..4373f2031f1d9578b154c9a783600b2a1ebc5462 --- /dev/null +++ b/src/routes/todos/[uid].json.js @@ -0,0 +1,14 @@ +import { api } from './_api'; + +// PATCH /todos/:uid.json +export const patch = async (request) => { + return api(request, `todos/${request.locals.userid}/${request.params.uid}`, { + text: request.body.get('text'), + done: request.body.has('done') ? !!request.body.get('done') : undefined + }); +}; + +// DELETE /todos/:uid.json +export const del = async (request) => { + return api(request, `todos/${request.locals.userid}/${request.params.uid}`); +}; diff --git a/src/routes/todos/_api.js b/src/routes/todos/_api.js new file mode 100644 index 0000000000000000000000000000000000000000..9dc73addbc45ca09d64351f41151dc079b97ea86 --- /dev/null +++ b/src/routes/todos/_api.js @@ -0,0 +1,45 @@ +/* + This module is used by the /todos.json and /todos/[uid].json + endpoints to make calls to api.svelte.dev, which stores todos + for each user. The leading underscore indicates that this is + a private module, _not_ an endpoint — visiting /todos/_api + will net you a 404 response. + + (The data on the todo app will expire periodically; no + guarantees are made. Don't use it to organise your life.) +*/ + +const base = 'https://api.svelte.dev'; + +export async function api(request, resource, data) { + // user must have a cookie set + if (!request.locals.userid) { + return { status: 401 }; + } + + const res = await fetch(`${base}/${resource}`, { + method: request.method, + headers: { + 'content-type': 'application/json' + }, + body: data && JSON.stringify(data) + }); + + // if the request came from a submission, the browser's default + // behaviour is to show the URL corresponding to the form's "action" + // attribute. in those cases, we want to redirect them back to the + // /todos page, rather than showing the response + if (res.ok && request.method !== 'GET' && request.headers.accept !== 'application/json') { + return { + status: 303, + headers: { + location: '/todos' + } + }; + } + + return { + status: res.status, + body: await res.json() + }; +} diff --git a/src/routes/todos/index.json.js b/src/routes/todos/index.json.js new file mode 100644 index 0000000000000000000000000000000000000000..ae2df4e49c7f4919f8ae1bfcc047f9f89adff666 --- /dev/null +++ b/src/routes/todos/index.json.js @@ -0,0 +1,28 @@ +import { api } from './_api'; + +// GET /todos.json +export const get = async (request) => { + // request.locals.userid comes from src/hooks.js + const response = await api(request, `todos/${request.locals.userid}`); + + if (response.status === 404) { + // user hasn't created a todo list. + // start with an empty array + return { body: [] }; + } + + return response; +}; + +// POST /todos.json +export const post = async (request) => { + const response = await api(request, `todos/${request.locals.userid}`, { + // because index.svelte posts a FormData object, + // request.body is _also_ a (readonly) FormData + // object, which allows us to get form data + // with the `body.get(key)` method + text: request.body.get('text') + }); + + return response; +}; diff --git a/src/routes/todos/index.svelte b/src/routes/todos/index.svelte new file mode 100644 index 0000000000000000000000000000000000000000..bdf12afe579f3734a327f521fb42182e9e348f6a --- /dev/null +++ b/src/routes/todos/index.svelte @@ -0,0 +1,220 @@ + + + + + + Todos + + +
+

Todos

+ + { + const created = await res.json(); + todos = [...todos, created]; + + form.reset(); + } + }} + > + + + + {#each todos as todo (todo.uid)} +
+
{ + todo.done = !!data.get('done'); + }, + result: patch + }} + > + +
+ {/each} +
+ + diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..825b9e65af7c104cfb07089bb28659393b4f2097 Binary files /dev/null and b/static/favicon.png differ diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000000000000000000000000000000000000..e9e57dc4d41b9b46e05112e9f45b7ea6ac0ba15e --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/static/svelte-welcome.png b/static/svelte-welcome.png new file mode 100644 index 0000000000000000000000000000000000000000..fe7d2d6b50ce937a0c3cecaa9a3501dfe138b7c8 Binary files /dev/null and b/static/svelte-welcome.png differ diff --git a/static/svelte-welcome.webp b/static/svelte-welcome.webp new file mode 100644 index 0000000000000000000000000000000000000000..6ec1a28d63b49d9288d0bc3bf3a341eb4edf3318 Binary files /dev/null and b/static/svelte-welcome.webp differ diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000000000000000000000000000000000000..7687c3af3ca94a1e8ae1097e061c3afd3f3126e1 --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,13 @@ +import adapter from '@sveltejs/adapter-static'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + kit: { + adapter: adapter(), + + // hydrate the
element in src/app.html + target: '#svelte' + } +}; + +export default config;