diff --git a/_app/assets/pages/__layout.svelte-382a475d.css b/_app/assets/pages/__layout.svelte-382a475d.css new file mode 100644 index 00000000..890698dc --- /dev/null +++ b/_app/assets/pages/__layout.svelte-382a475d.css @@ -0,0 +1 @@ +/*! tailwindcss v2.2.2 | MIT License | https://tailwindcss.com*//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-webkit-text-size-adjust:100%;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],button{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*,:after,:before{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.m-2{margin:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.-mt-2{margin-top:-.5rem}.mr-2{margin-right:.5rem}.-mb-4{margin-bottom:-1rem}.block{display:block}.flex{display:flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.h-56{height:14rem}.h-full{height:100%}.h-screen{height:100vh}.w-24{width:6rem}.w-28{width:7rem}.w-auto{width:auto}.w-full{width:100%}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-grow{flex-grow:1}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-white{--tw-border-opacity:1;border-color:rgba(255,255,255,var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgba(156,163,175,var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity:1;border-color:rgba(99,102,241,var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity:1;background-color:rgba(167,243,208,var(--tw-bg-opacity))}.bg-indigo-400{--tw-bg-opacity:1;background-color:rgba(129,140,248,var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgba(99,102,241,var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity:1;background-color:rgba(252,165,165,var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity:1;background-color:rgba(110,231,183,var(--tw-bg-opacity))}.hover\:bg-indigo-600:hover{--tw-bg-opacity:1;background-color:rgba(79,70,229,var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgba(67,56,202,var(--tw-bg-opacity))}.fill-current{fill:currentColor}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.pt-4{padding-top:1rem}.text-center{text-align:center}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.font-thin{font-weight:100}.font-semibold{font-weight:600}.font-bold{font-weight:700}.leading-normal{line-height:1.5}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}*,:after,:before{--tw-shadow:0 0 #0000}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}*,:after,:before{--tw-ring-inset:var(--tw-empty, );/*!*//*!*/--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.filter{--tw-blur:var(--tw-empty, );/*!*//*!*/--tw-brightness:var(--tw-empty, );/*!*//*!*/--tw-contrast:var(--tw-empty, );/*!*//*!*/--tw-grayscale:var(--tw-empty, );/*!*//*!*/--tw-hue-rotate:var(--tw-empty, );/*!*//*!*/--tw-invert:var(--tw-empty, );/*!*//*!*/--tw-saturate:var(--tw-empty, );/*!*//*!*/--tw-sepia:var(--tw-empty, );/*!*//*!*/--tw-drop-shadow:var(--tw-empty, );/*!*//*!*/filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-btn{border-bottom-width:2px;border-color:transparent;display:block}.nav-btn:hover{--tw-border-opacity:1;border-color:rgba(255,255,255,var(--tw-border-opacity))}.nav-btn{padding:.75rem 0}@media (min-width:1024px){.nav-btn{padding:.5rem}}.btn{background-color:rgba(99,102,241,var(--tw-bg-opacity));border-radius:.25rem}.btn,.btn:hover{--tw-bg-opacity:1}.btn:hover{background-color:rgba(67,56,202,var(--tw-bg-opacity))}.btn{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);padding-left:1rem;padding-right:1rem}.action-btn{--tw-bg-opacity:1;background-color:rgba(129,140,248,var(--tw-bg-opacity));border-radius:.25rem;flex:1 1 auto}.action-btn:hover{--tw-bg-opacity:1;background-color:rgba(99,102,241,var(--tw-bg-opacity))}.action-btn{--tw-text-opacity:1;--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgba(255,255,255,var(--tw-text-opacity));padding:.5rem}@media (min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-auto{width:auto}.lg\:items-center{align-items:center}.lg\:pt-0{padding-top:0}} \ No newline at end of file diff --git a/_app/pages/__layout.svelte-2ab08147.js b/_app/pages/__layout.svelte-2ab08147.js new file mode 100644 index 00000000..470be62d --- /dev/null +++ b/_app/pages/__layout.svelte-2ab08147.js @@ -0,0 +1 @@ +import{S as s,i as e,s as r,D as o,e as a,c,a as t,d as n,b as i,f as l,E as u,v as h,r as p,z as d}from"../chunks/vendor-ad39e53d.js";import{b as f}from"../chunks/paths-45dac81d.js";function $(s){let e,r;const d=s[1].default,f=o(d,s,s[0],null);return{c(){e=a("main"),f&&f.c(),this.h()},l(s){e=c(s,"MAIN",{class:!0});var r=t(e);f&&f.l(r),r.forEach(n),this.h()},h(){i(e,"class","h-screen")},m(s,o){l(s,e,o),f&&f.m(e,null),r=!0},p(s,[e]){f&&f.p&&(!r||1&e)&&u(f,d,s,s[0],e,null,null)},i(s){r||(h(f,s),r=!0)},o(s){p(f,s),r=!1},d(s){s&&n(e),f&&f.d(s)}}}function v(s,e,r){let{$$slots:o={},$$scope:a}=e;return d((()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(`${f}/service-worker.js`,{scope:`${f}/`}).then((function(s){console.log("Registration successful, scope is:",s.scope)})).catch((function(s){console.log("Service worker registration failed, error:",s)}))})),s.$$set=s=>{"$$scope"in s&&r(0,a=s.$$scope)},[a,o]}export default class extends s{constructor(s){super(),e(this,s,v,$,r,{})}} diff --git a/_app/start-8a056348.js b/_app/start-8a056348.js new file mode 100644 index 00000000..8250fa5a --- /dev/null +++ b/_app/start-8a056348.js @@ -0,0 +1 @@ +var t=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,n=(e,r,s)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,i=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&n(t,r,e[r]);if(s)for(var r of s(e))o.call(e,r)&&n(t,r,e[r]);return t};import{S as l,i as c,s as u,e as h,c as d,a as p,d as f,b as g,f as m,t as _,g as y,h as b,j as v,k as $,l as w,m as x,n as E,o as q,p as R,q as S,r as L,u as k,v as j,w as O,x as U,y as A,z as P,A as T,B as I,C as N}from"./chunks/vendor-ad39e53d.js";import{_ as C}from"./chunks/preload-helper-9f12a5fd.js";import{i as D}from"./chunks/singletons-bb9012b7.js";import{s as V}from"./chunks/paths-45dac81d.js";function B(t){let e,r,s;const a=[t[2]||{}];var o=t[0][1];function n(t){let e={$$slots:{default:[M]},$$scope:{ctx:t}};for(let r=0;r{O(t,1)})),k()}o?(e=new o(n(t)),v(e.$$.fragment),j(e.$$.fragment,1),q(e,r.parentNode,r)):e=null}else o&&e.$set(i)},i(t){s||(e&&j(e.$$.fragment,t),s=!0)},o(t){e&&L(e.$$.fragment,t),s=!1},d(t){t&&f(r),e&&O(e,t)}}}function K(t){let e,r,s;const a=[t[3]||{}];var o=t[0][2];function n(t){let e={};for(let r=0;r{O(t,1)})),k()}o?(e=new o(n()),v(e.$$.fragment),j(e.$$.fragment,1),q(e,r.parentNode,r)):e=null}else o&&e.$set(i)},i(t){s||(e&&j(e.$$.fragment,t),s=!0)},o(t){e&&L(e.$$.fragment,t),s=!1},d(t){t&&f(r),e&&O(e,t)}}}function M(t){let e,r,s=t[0][2]&&K(t);return{c(){s&&s.c(),e=w()},l(t){s&&s.l(t),e=w()},m(t,a){s&&s.m(t,a),m(t,e,a),r=!0},p(t,r){t[0][2]?s?(s.p(t,r),1&r&&j(s,1)):(s=K(t),s.c(),j(s,1),s.m(e.parentNode,e)):s&&(I(),L(s,1,1,(()=>{s=null})),k())},i(t){r||(j(s),r=!0)},o(t){L(s),r=!1},d(t){s&&s.d(t),t&&f(e)}}}function W(t){let e,r,s=t[0][1]&&B(t);return{c(){s&&s.c(),e=w()},l(t){s&&s.l(t),e=w()},m(t,a){s&&s.m(t,a),m(t,e,a),r=!0},p(t,r){t[0][1]?s?(s.p(t,r),1&r&&j(s,1)):(s=B(t),s.c(),j(s,1),s.m(e.parentNode,e)):s&&(I(),L(s,1,1,(()=>{s=null})),k())},i(t){r||(j(s),r=!0)},o(t){L(s),r=!1},d(t){s&&s.d(t),t&&f(e)}}}function Y(t){let e,r=t[5]&&z(t);return{c(){e=h("div"),r&&r.c(),this.h()},l(t){e=d(t,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,class:!0});var s=p(e);r&&r.l(s),s.forEach(f),this.h()},h(){g(e,"id","svelte-announcer"),g(e,"aria-live","assertive"),g(e,"aria-atomic","true"),g(e,"class","svelte-1pdgbjn")},m(t,s){m(t,e,s),r&&r.m(e,null)},p(t,s){t[5]?r?r.p(t,s):(r=z(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(t){t&&f(e),r&&r.d()}}}function z(t){let e;return{c(){e=_(t[6])},l(r){e=y(r,t[6])},m(t,r){m(t,e,r)},p(t,r){64&r&&b(e,t[6])},d(t){t&&f(e)}}}function G(t){let e,r,s,a;const o=[t[1]||{}];var n=t[0][0];function i(t){let e={$$slots:{default:[W]},$$scope:{ctx:t}};for(let r=0;r{O(t,1)})),k()}n?(e=new n(i(t)),v(e.$$.fragment),j(e.$$.fragment,1),q(e,r.parentNode,r)):e=null}else n&&e.$set(c);t[4]?l?l.p(t,a):(l=Y(t),l.c(),l.m(s.parentNode,s)):l&&(l.d(1),l=null)},i(t){a||(e&&j(e.$$.fragment,t),a=!0)},o(t){e&&L(e.$$.fragment,t),a=!1},d(t){e&&O(e,t),t&&f(r),l&&l.d(t),t&&f(s)}}}function J(t,e,r){let{stores:s}=e,{page:a}=e,{components:o}=e,{props_0:n=null}=e,{props_1:i=null}=e,{props_2:l=null}=e;U("__svelte__",s),A(s.page.notify);let c=!1,u=!1,h=null;return P((()=>{const t=s.page.subscribe((()=>{c&&(r(5,u=!0),r(6,h=document.title||"untitled page"))}));return r(4,c=!0),t})),t.$$set=t=>{"stores"in t&&r(7,s=t.stores),"page"in t&&r(8,a=t.page),"components"in t&&r(0,o=t.components),"props_0"in t&&r(1,n=t.props_0),"props_1"in t&&r(2,i=t.props_1),"props_2"in t&&r(3,l=t.props_2)},t.$$.update=()=>{384&t.$$.dirty&&s.page.set(a)},[o,n,i,l,c,u,h,s,a]}class X extends l{constructor(t){super(),c(this,t,J,G,u,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const F=[()=>C((()=>import("./pages/__layout.svelte-2ab08147.js")),["/mermaid-live-editor/_app/pages/__layout.svelte-2ab08147.js","/mermaid-live-editor/_app/assets/pages/__layout.svelte-382a475d.css","/mermaid-live-editor/_app/chunks/vendor-ad39e53d.js","/mermaid-live-editor/_app/chunks/paths-45dac81d.js"]),()=>C((()=>import("./error.svelte-2e144dbf.js")),["/mermaid-live-editor/_app/error.svelte-2e144dbf.js","/mermaid-live-editor/_app/chunks/vendor-ad39e53d.js"]),()=>C((()=>import("./pages/index.svelte-16f09926.js")),["/mermaid-live-editor/_app/pages/index.svelte-16f09926.js","/mermaid-live-editor/_app/chunks/vendor-ad39e53d.js","/mermaid-live-editor/_app/chunks/singletons-bb9012b7.js","/mermaid-live-editor/_app/chunks/paths-45dac81d.js"]),()=>C((()=>import("./pages/edit.svelte-107bb3e8.js")),["/mermaid-live-editor/_app/pages/edit.svelte-107bb3e8.js","/mermaid-live-editor/_app/assets/pages/edit.svelte-05f3059c.css","/mermaid-live-editor/_app/chunks/vendor-ad39e53d.js","/mermaid-live-editor/_app/chunks/util-c5c67db9.js","/mermaid-live-editor/_app/assets/util-2375eead.css","/mermaid-live-editor/_app/chunks/preload-helper-9f12a5fd.js","/mermaid-live-editor/_app/chunks/paths-45dac81d.js"]),()=>C((()=>import("./pages/view.svelte-8af2260b.js")),["/mermaid-live-editor/_app/pages/view.svelte-8af2260b.js","/mermaid-live-editor/_app/chunks/vendor-ad39e53d.js","/mermaid-live-editor/_app/chunks/util-c5c67db9.js","/mermaid-live-editor/_app/assets/util-2375eead.css","/mermaid-live-editor/_app/chunks/preload-helper-9f12a5fd.js"])],H=[[/^\/$/,[F[0],F[2]],[F[1]]],[/^\/manifest\.json$/],[/^\/edit\/?$/,[F[0],F[3]],[F[1]]],[/^\/view\/?$/,[F[0],F[4]],[F[1]]]],Q=[F[0](),F[1]()];function Z(){return{x:pageXOffset,y:pageYOffset}}function tt(t){for(;t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;return t}class et{constructor({base:t,routes:e,trailing_slash:r}){this.base=t,this.routes=e,this.trailing_slash=r}init(t){let s;this.renderer=t,t.router=this,this.enabled=!0,"scrollRestoration"in history&&(history.scrollRestoration="manual"),addEventListener("beforeunload",(()=>{history.scrollRestoration="auto"})),addEventListener("load",(()=>{history.scrollRestoration="manual"})),addEventListener("scroll",(()=>{clearTimeout(s),s=setTimeout((()=>{const t=(s=i({},history.state||{}),a={"sveltekit:scroll":Z()},e(s,r(a)));var s,a;history.replaceState(t,document.title,window.location.href)}),50)}));const a=t=>{const e=tt(t.target);e&&e.href&&e.hasAttribute("sveltekit:prefetch")&&this.prefetch(new URL(e.href))};let o;addEventListener("touchstart",a),addEventListener("mousemove",(t=>{clearTimeout(o),o=setTimeout((()=>{a(t)}),20)})),addEventListener("click",(t=>{var e;if(!this.enabled)return;if(t.button||1!==t.which)return;if(t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;if(t.defaultPrevented)return;const r=tt(t.target);if(!r)return;if(!r.href)return;const s="object"==typeof r.href&&"SVGAnimatedString"===r.href.constructor.name,a=String(s?r.href.baseVal:r.href);if(a===location.href)return void(location.hash||t.preventDefault());const o=null==(e=r.getAttribute("rel"))?void 0:e.split(/\s+/);if(r.hasAttribute("download")||o&&o.includes("external"))return;if(s?r.target.baseVal:r.target)return;const n=new URL(a);if(!this.owns(n))return;const i=r.hasAttribute("sveltekit:noscroll");history.pushState({},"",n.href),this._navigate(n,i?Z():null,[],n.hash),t.preventDefault()})),addEventListener("popstate",(t=>{if(t.state&&this.enabled){const e=new URL(location.href);this._navigate(e,t.state["sveltekit:scroll"],[])}})),document.body.setAttribute("tabindex","-1"),history.replaceState(history.state||{},"",location.href)}owns(t){return t.origin===location.origin&&t.pathname.startsWith(this.base)}parse(t){if(this.owns(t)){const e=decodeURIComponent(t.pathname.slice(this.base.length)||"/"),r=this.routes.filter((([t])=>t.test(e))),s=new URLSearchParams(t.search);return{id:`${e}?${s}`,routes:r,path:e,query:s}}}async goto(t,{noscroll:e=!1,replaceState:r=!1}={},s){const a=new URL(t,function(t){let e=t.baseURI;if(!e){const r=t.getElementsByTagName("base");e=r.length?r[0].href:t.URL}return e}(document));return this.enabled&&this.owns(a)?(history[r?"replaceState":"pushState"]({},"",t),this._navigate(a,e?Z():null,s,a.hash)):(location.href=a.href,new Promise((()=>{})))}enable(){this.enabled=!0}disable(){this.enabled=!1}async prefetch(t){const e=this.parse(t);if(!e)throw new Error("Attempted to prefetch a URL that does not belong to this app");return this.renderer.load(e)}async _navigate(t,e,r,s){const a=this.parse(t);if(!a)throw new Error("Attempted to navigate to a URL that does not belong to this app");if("/"!==a.path){const t=a.path.endsWith("/");(t&&"never"===this.trailing_slash||!t&&"always"===this.trailing_slash&&!a.path.split("/").pop().includes("."))&&(a.path=t?a.path.slice(0,-1):a.path+"/",history.replaceState({},"",`${a.path}${location.search}`))}this.renderer.notify({path:a.path,query:a.query}),await this.renderer.update(a,r,!1),document.body.focus();const o=s&&document.getElementById(s.slice(1));e?scrollTo(e.x,e.y):o?scrollTo(0,o.getBoundingClientRect().top+scrollY):scrollTo(0,0)}}function rt(t){const e=N(t);let r=!0;return{notify:function(){r=!0,e.update((t=>t))},set:function(t){r=!1,e.set(t)},subscribe:function(t){let s;return e.subscribe((e=>{(void 0===s||r&&e!==s)&&t(s=e)}))}}}function st(t,e){let r=`script[type="svelte-data"][url="${"string"==typeof t?t:t.url}"]`;e&&"string"==typeof e.body&&(r+=`[body="${function(t){let e=5381,r=t.length;if("string"==typeof t)for(;r;)e=33*e^t.charCodeAt(--r);else for(;r;)e=33*e^t[--r];return(e>>>0).toString(36)}(e.body)}"]`);const n=document.querySelector(r);if(n){const t=JSON.parse(n.textContent),{body:e}=t,r=((t,e)=>{var r={};for(var n in t)a.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&s)for(var n of s(t))e.indexOf(n)<0&&o.call(t,n)&&(r[n]=t[n]);return r})(t,["body"]);return Promise.resolve(new Response(e,r))}return fetch(t,e)}class at{constructor({Root:t,fallback:e,target:r,session:s,host:a}){this.Root=t,this.fallback=e,this.host=a,this.router=null,this.target=r,this.started=!1,this.session_id=1,this.invalid=new Set,this.invalidating=null,this.current={page:null,session_id:null,branch:[]},this.cache=new Map,this.loading={id:null,promise:null},this.stores={page:rt({}),navigating:N(null),session:N(s)},this.$session=null,this.root=null;let o=!1;this.stores.session.subscribe((async t=>{if(this.$session=t,!o)return;this.session_id+=1;const e=this.router.parse(new URL(location.href));this.update(e,[],!0)})),o=!0}async start({status:t,error:e,nodes:r,page:s}){const a=[];let o,n,l,c={};try{for(let o=0;o10||e.includes(t.path)))return void(this.router?this.router.goto(a.redirect,{replaceState:!0},[...e,t.path]):location.href=new URL(a.redirect,location.href).href);a=await this._load_error({status:500,error:new Error("Redirect loop"),path:t.path,query:t.query})}a.reload?location.reload():this.started?(this.current=a.state,this.root.$set(a.props),this.stores.navigating.set(null),await 0):this._init(a),dispatchEvent(new CustomEvent("sveltekit:navigation-end")),this.loading.promise=null,this.loading.id=null;const o=a.state.branch[a.state.branch.length-1];o&&!1===o.module.router?this.router.disable():this.router.enable()}load(t){return this.loading.promise=this._get_navigation_result(t,!1),this.loading.id=t.id,this.loading.promise}invalidate(t){return this.invalid.add(t),this.invalidating||(this.invalidating=Promise.resolve().then((async()=>{const t=this.router.parse(new URL(location.href));await this.update(t,[],!0),this.invalidating=null}))),this.invalidating}_init(t){this.current=t.state;const e=document.querySelector("style[data-svelte]");e&&e.remove(),this.root=new this.Root({target:this.target,props:i({stores:this.stores},t.props),hydrate:!0}),this.started=!0}async _get_navigation_result(t,e){if(this.loading.id===t.id)return this.loading.promise;for(let r=0;rt())),a+=1}const o=await this._load({route:s,path:t.path,query:t.query},e);if(o)return o}return await this._load_error({status:404,error:new Error(`Not found: ${t.path}`),path:t.path,query:t.query})}async _get_navigation_result_from_branch({page:t,branch:e}){const r=e.filter(Boolean),s={state:{page:t,branch:e,session_id:this.session_id},props:{components:r.map((t=>t.module.default))}};for(let n=0;n{this.cache.get(e)===s&&this.cache.delete(e),i(),clearTimeout(n)},n=setTimeout(a,1e3*o),i=this.stores.session.subscribe((()=>{r&&a()}));r=!0,this.cache.set(e,s)}return s}async _load_node({status:t,error:e,module:r,page:s,context:a}){const o={module:r,uses:{params:new Set,path:!1,query:!1,session:!1,context:!1,dependencies:[]},loaded:null,context:a},n={};for(const i in s.params)Object.defineProperty(n,i,{get:()=>(o.uses.params.add(i),s.params[i]),enumerable:!0});const l=this.$session;if(r.load){const{started:c}=this,u={page:{host:s.host,params:n,get path(){return o.uses.path=!0,s.path},get query(){return o.uses.query=!0,s.query}},get session(){return o.uses.session=!0,l},get context(){return o.uses.context=!0,i({},a)},fetch(t,e){const r="string"==typeof t?t:t.url,{href:a}=new URL(r,new URL(s.path,document.baseURI));return o.uses.dependencies.push(a),c?fetch(t,e):st(t,e)}};e&&(u.status=t,u.error=e);const h=await r.load.call(null,u);if(!h)return;o.loaded=function(t){if(t.error){const e="string"==typeof t.error?new Error(t.error):t.error,r=t.status;return e instanceof Error?!r||r<400||r>599?(console.warn('"error" returned from load() without a valid status code — defaulting to 500'),{status:500,error:e}):{status:r,error:e}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof e}"`)}}if(t.redirect){if(!t.status||3!==Math.floor(t.status/100))return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if("string"!=typeof t.redirect)return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}return t}(h),o.loaded.context&&(o.context=o.loaded.context)}return o}async _load({route:t,path:e,query:r},s){const a=`${e}?${r}`;if(!s&&this.cache.has(a))return this.cache.get(a);const[o,n,l,c]=t,u=c?c(o.exec(e)):{},h=this.current.page&&{path:e!==this.current.page.path,params:Object.keys(u).filter((t=>this.current.page.params[t]!==u[t])),query:r.toString()!==this.current.page.query.toString(),session:this.session_id!==this.current.session_id},d={host:this.host,path:e,query:r,params:u},p=[];let f={},g=!1,m=200,_=null;n.forEach((t=>t()));t:for(let b=0;br.uses.params.has(t)))||h.query&&r.uses.query||h.session&&r.uses.session||r.uses.dependencies.some((t=>this.invalid.has(t)))||g&&r.uses.context){t=await this._load_node({module:e,page:d,context:f});const r=b===n.length-1;if(t&&t.loaded){if(t.loaded.error&&(m=t.loaded.status,_=t.loaded.error),t.loaded.redirect)return{redirect:t.loaded.redirect};t.loaded.context&&(g=!0)}else if(r&&e.load)return}else t=r}catch(y){m=500,_=y}if(_){for(;b--;)if(l[b]){let t,e,r=b;for(;!(e=p[r]);)r-=1;try{if(t=await this._load_node({status:m,error:_,module:await l[b](),page:d,context:e.context}),t.loaded.error)continue;p.push(t);break t}catch(y){continue}}return await this._load_error({status:m,error:_,path:e,query:r})}t&&t.loaded&&t.loaded.context&&(f=i(i({},f),t.loaded.context)),p.push(t)}return await this._get_navigation_result_from_branch({page:d,branch:p})}async _load_error({status:t,error:e,path:r,query:s}){const a={host:this.host,path:r,query:s,params:{}},o=await this._load_node({module:await this.fallback[0],page:a,context:{}}),n=[o,await this._load_node({status:t,error:e,module:await this.fallback[1],page:a,context:o&&o.loaded&&o.loaded.context})];return await this._get_navigation_result_from_branch({page:a,branch:n})}}async function ot({paths:t,target:e,session:r,host:s,route:a,spa:o,trailing_slash:n,hydrate:i}){const l=a&&new et({base:t.base,routes:H,trailing_slash:n}),c=new at({Root:X,fallback:Q,target:e,session:r,host:s});D(l),V(t),i&&await c.start(i),a&&l.init(c),o&&l.goto(location.href,{replaceState:!0},[]),dispatchEvent(new CustomEvent("sveltekit:start"))}export{ot as start}; diff --git a/edit/index.html b/edit/index.html index c192101d..5ab05c97 100644 --- a/edit/index.html +++ b/edit/index.html @@ -26,31 +26,27 @@ > @@ -59,7 +55,7 @@ - + @@ -67,7 +63,7 @@ @@ -59,7 +55,7 @@ - + @@ -67,7 +63,7 @@ @@ -59,7 +55,7 @@ - + @@ -67,7 +63,7 @@