diff --git a/playground/svelte.config.js b/playground/svelte.config.js index 62e8076..60574c2 100644 --- a/playground/svelte.config.js +++ b/playground/svelte.config.js @@ -15,6 +15,7 @@ const config = { paths: { base: "/_playground", + relative: true, }, }, }; diff --git a/server/playground/_app/immutable/chunks/Cdp_135K.js b/server/playground/_app/immutable/chunks/Cdp_135K.js deleted file mode 100644 index 8861ffe..0000000 --- a/server/playground/_app/immutable/chunks/Cdp_135K.js +++ /dev/null @@ -1,3 +0,0 @@ -import{w as Ae,o as je,c as _t}from"./FG3YJaZx.js";import{a as yt,b as I}from"./D5JtIcv_.js";import{aZ as U,g as L,V as P,aY as $e}from"./DPMvo626.js";class ce{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const At=new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&Y.delete(Te(e)),Rt(e,t));const Y=new Map;function Tt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function It(e,t,n){if(Y.size>0){const r=Te(e,n),a=Y.get(r);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const d=Ut.exec(c),[,p,u,l,h]=d;return t.push({name:l,matcher:h,optional:!!p,rest:!!u,chained:u?f===1&&i[0]==="":!1}),u?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Pt)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;od).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&c.chained&&(i=0),!d&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,d]])=>{const{pattern:p,params:u}=Lt(o),l={id:o,exec:h=>{const w=p.exec(h);if(w)return Ct(w,u,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function We(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const Ot="1759702011444",Je="sveltekit:snapshot",ze="sveltekit:scroll",Xe="sveltekit:states",jt="sveltekit:pageurl",F="sveltekit:history",W="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},le=location.origin;function Ze(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function q(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const qe={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===le&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ee(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=q(o,"preload-code")),a===null&&(a=q(o,"preload-data")),t===null&&(t=q(o,"keepfocus")),n===null&&(n=q(o,"noscroll")),s===null&&(s=q(o,"reload")),i===null&&(i=q(o,"replacestate")),o=Qe(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:qe[r??"off"],preload_data:qe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Fe(e){const t=Ae(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function $t(){const{set:e,subscribe:t}=Ae(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${yt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ot;return i&&(e(!0),tt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==le||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Rn(e){}function Dt(e){const t=Ft(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Vt=-1,Bt=-2,Mt=-3,Gt=-4,Yt=-5,Ht=-6;function Kt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Vt)return;if(s===Mt)return NaN;if(s===Gt)return 1/0;if(s===Yt)return-1/0;if(s===Ht)return-0;if(i||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t?.[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let l=1;lt!=null)}const zt="x-sveltekit-invalidated",Xt="x-sveltekit-trailing-slash";function te(e){return e instanceof ce||e instanceof Re?e.status:500}function Zt(e){return e instanceof Re?e.text:"Internal Error"}let S,J,ye;const Qt=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());Qt?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(S=new class{#e=U({});get data(){return L(this.#e)}set data(t){P(this.#e,t)}#t=U(null);get form(){return L(this.#t)}set form(t){P(this.#t,t)}#n=U(null);get error(){return L(this.#n)}set error(t){P(this.#n,t)}#r=U({});get params(){return L(this.#r)}set params(t){P(this.#r,t)}#a=U({id:null});get route(){return L(this.#a)}set route(t){P(this.#a,t)}#o=U({});get state(){return L(this.#o)}set state(t){P(this.#o,t)}#s=U(-1);get status(){return L(this.#s)}set status(t){P(this.#s,t)}#i=U(new URL("https://example.com"));get url(){return L(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=U(null);get current(){return L(this.#e)}set current(t){P(this.#e,t)}},ye=new class{#e=U(!1);get current(){return L(this.#e)}set current(t){P(this.#e,t)}},tt.v=()=>ye.current=!0);function en(e){Object.assign(S,e)}const tn="/__data.json",nn=".html__data.json";function rn(e){return e.endsWith(".html")?e.replace(/\.html$/,nn):e.replace(/\/$/,"")+tn}const Ve={spanContext(){return an},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},an={traceId:"",spanId:"",traceFlags:0},{tick:on}=_t,sn=new Set(["icon","shortcut icon","apple-touch-icon"]),D=We(ze)??{},z=We(Je)??{},O={url:Fe({}),page:Fe({}),navigating:Ae(null),updated:$t()};function Ie(e){D[e]=fe()}function cn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function M(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(I||"/");e&&await e.update()}}function Be(){}let Ue,be,ne,x,ke,v;const re=[],ae=[];let C=null;const Q=new Map,at=new Set,ln=new Set,H=new Set;let y={branch:[],error:null,url:null},Le=!1,oe=!1,Me=!0,X=!1,G=!1,ot=!1,Pe=!1,st,A,T,$;const K=new Set,Ge=new Map;async function Ln(e,t,n){globalThis.__sveltekit_1q5735q?.data&&globalThis.__sveltekit_1q5735q.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Ue=Nt(e),x=document.documentElement,ke=t,be=e.nodes[0],ne=e.nodes[1],be(),ne(),A=history.state?.[F],T=history.state?.[W],A||(A=T=Date.now(),history.replaceState({...history.state,[F]:A,[W]:T},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await vn(ke,n)):(await V({type:"enter",url:Ze(v.hash?kn(new URL(location.href)):location.href),replace_state:!0}),a()),wn()}function fn(){re.length=0,Pe=!1}function it(e){ae.some(t=>t?.snapshot)&&(z[e]=ae.map(t=>t?.snapshot?.capture()))}function ct(e){z[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Ye(){Ie(A),De(ze,D),it(T),De(Je,z)}async function un(e,t,n,r){let a;t.invalidateAll&&(C=null),await V({type:"goto",url:Ze(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...Ge.keys()]),t.invalidate&&t.invalidate.forEach(yn)}}),t.invalidateAll&&$e().then($e).then(()=>{Ge.forEach(({resource:s},i)=>{a?.includes(i)&&s.refresh?.()})})}async function dn(e){if(e.id!==C?.id){const t={};K.add(t),C={id:e.id,token:t,promise:ut({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(C=null),n))}}return C.promise}async function we(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function lt(e,t,n){y=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(S,e.props.page),st=new v.root({target:t,props:{...e.props,stores:O,components:ae},hydrate:n,sync:!1}),ct(T),n){const a={from:null,to:{params:y.params,route:{id:y.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(s=>s(a))}oe=!0}function se({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(I&&(e.pathname===I||e.pathname===I+"/"))o="always";else for(const l of n)l?.slash!==void 0&&(o=l.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Jt(n).map(l=>l.node.component),page:Oe(S)}};i!==void 0&&(c.props.form=i);let f={},d=!S,p=0;for(let l=0;l(o&&(c.route=!0),u[l])}),params:new Proxy(r,{get:(u,l)=>(o&&c.params.add(l),u[l])}),data:s?.data??null,url:kt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,l){u instanceof Request&&(l={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...l});const{resolved:h,promise:w}=ft(u,l,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,p)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function ft(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=oe?It(r,a.href,t):Tt(r,t);return{resolved:a,promise:s}}function He(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==y.params[i])return!0;for(const i of a.dependencies)if(re.some(o=>o(new URL(i))))return!0;return!1}function Ce(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function hn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function Ke({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Oe(S),constructors:[]}}}async function ut({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(C?.id===e)return K.delete(C.token),C.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(_=>_?.().catch(()=>{})),f.forEach(_=>_?.[1]().catch(()=>{}));let d=null;const p=y.url?e!==ie(y.url):!1,u=y.route?a.id!==y.route.id:!1,l=hn(y.url,n);let h=!1;const w=f.map((_,g)=>{const b=y.branch[g],k=!!_?.[0]&&(b?.loader!==_[1]||He(h,u,p,l,b.server?.uses,r));return k&&(h=!0),k});if(w.some(Boolean)){try{d=await pt(n,w)}catch(_){const g=await B(_,{url:n,params:r,route:{id:e}});return K.has(s)?Ke({error:g,url:n,params:r,route:a}):de({status:te(_),error:g,url:n,route:a})}if(d.type==="redirect")return d}const E=d?.nodes;let m=!1;const N=f.map(async(_,g)=>{if(!_)return;const b=y.branch[g],k=E?.[g];if((!k||k.type==="skip")&&_[1]===b?.loader&&!He(m,u,p,l,b.universal?.uses,r))return b;if(m=!0,k?.type==="error")throw k;return xe({loader:_[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge{});const R=[];for(let _=0;_Promise.resolve({}),server_data_node:Ce(s)}),c={node:await ne(),loader:ne,universal:null,server:null,data:null};return se({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return un(new URL(o.location,location.href),{},0);throw o}}async function gn(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ft(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();Q.set(t,r),n=await r}catch{Q.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,I,v.hash)){const n=await gn(e);if(!n)return;const r=mn(n);for(const a of Ue){const s=a.exec(r);if(s)return{id:ie(e),invalidating:t,route:a,params:bt(s),url:e}}}}function mn(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(I.length))||"/"}function ie(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=Ne(y,n,e,t);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const o={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return X||at.forEach(c=>c(o)),s?null:i}async function V({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=Be,block:d=Be,event:p}){const u=$;$=c;const l=await he(t,!1),h=e==="enter"?Ne(y,l,t,e):dt({url:t,type:e,delta:n?.delta,intent:l,event:p});if(!h){d(),$===c&&($=u);return}const w=A,E=T;f(),X=!0,oe&&h.navigation.type!=="enter"&&O.navigating.set(J.current=h.navigation);let m=l&&await ut(l);if(!m){if(ue(t,I,v.hash))return await M(t,s);m=await ht(t,{id:null},await B(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=l?.url||t,$!==c)return h.reject(new Error("navigation aborted")),!1;if(m.type==="redirect"){if(o<20){await V({type:e,url:new URL(m.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:c}),h.fulfil(void 0);return}m=await de({status:500,error:await B(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else m.props.page.status>=400&&await O.updated.check()&&(await rt(),await M(t,s));if(fn(),Ie(w),it(E),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,b={[F]:A+=g,[W]:T+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,b,"",t),s||cn(A,T)}if(C=null,m.props.page.state=i,oe){const g=(await Promise.all(Array.from(ln,b=>b(h.navigation)))).filter(b=>typeof b=="function");if(g.length>0){let b=function(){g.forEach(k=>{H.delete(k)})};g.push(b),g.forEach(k=>{H.add(k)})}y=m.state,m.props.page&&(m.props.page.url=t),st.$set(m.props),en(m.props.page),ot=!0}else lt(m,ke,!1);const{activeElement:N}=document;await on();const R=n?n.scroll:a?fe():null;if(Me){const g=t.hash&&document.getElementById(mt(t));R?scrollTo(R.x,R.y):g?g.scrollIntoView():scrollTo(0,0)}const _=document.activeElement!==N&&document.activeElement!==document.body;!r&&!_&&bn(t),Me=!0,m.props.page&&Object.assign(S,m.props.page),X=!1,e==="popstate"&&ct(T),h.fulfil(void 0),H.forEach(g=>g(h.navigation)),O.navigating.set(J.current=null)}async function ht(e,t,n,r,a){return e.origin===le&&e.pathname===location.pathname&&!Le?await de({status:r,error:n,url:e,route:t}):await M(e,a)}function _n(){let e,t,n;x.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(we(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const f=et(o,x),d=f===t&&c>=n;if(!f||d)return;const{url:p,external:u,download:l}=ve(f,I,v.hash);if(u||l)return;const h=ee(f),w=p&&ie(y.url)===ie(p);if(!(h.reload||w))if(c<=h.preload_data){t=f,n=j.tap;const E=await he(p,!1);if(!E)return;dn(E)}else c<=h.preload_code&&(t=f,n=c,we(p))}function i(){a.disconnect();for(const o of x.querySelectorAll("a")){const{url:c,external:f,download:d}=ve(o,I,v.hash);if(f||d)continue;const p=ee(o);p.reload||(p.preload_code===j.viewport&&a.observe(o),p.preload_code===j.eager&&we(c))}}H.add(i),i()}function B(e,t){if(e instanceof ce)return e.body;const n=te(e),r=Zt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function yn(e){if(typeof e=="function")re.push(e);else{const{href:t}=new URL(e,location.href);re.push(n=>n.href===t)}}function wn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ye(),!X){const r=Ne(y,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ye()}),navigator.connection?.saveData||_n(),x.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],x);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,I,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=ee(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=f===me(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,u]=y.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(G=!0,Ie(A),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await V({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),x.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,I,!1))return;const o=t.target,c=ee(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o,r);i.search=new URLSearchParams(f).toString(),V({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[F]){const n=t.state[F];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[jt]??location.href),i=t.state[W],o=y.url?me(location)===me(y.url):!1;if(i===T&&(ot||o)){a!==S.state&&(S.state=a),e(s),D[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await V({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,T=i},block:()=>{history.go(-f)},nav_token:$,event:t})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[F]:++A,[W]:T},"",location.href))});for(const t of document.querySelectorAll("link"))sn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&O.navigating.set(J.current=null)});function e(t){y.url=S.url=t,O.page.set(Oe(S)),O.page.notify()}}async function vn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Le=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Ue.find(({id:l})=>l===s.id);let p,u=!0;try{const l=r.map(async(w,E)=>{const m=o[E];return m?.uses&&(m.uses=gt(m.uses)),xe({loader:v.nodes[w],url:f,params:a,route:s,parent:async()=>{const N={};for(let R=0;Rs?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new ce(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader();function c(d){return Kt(d,{...v.decoders,Promise:p=>new Promise((u,l)=>{i.set(p,{fulfil:u,reject:l})})})}let f="";for(;;){const{done:d,value:p}=await o.read();if(d&&!f)break;for(f+=!p&&f?` -`:At.decode(p,{stream:!0});;){const u=f.indexOf(` -`);if(u===-1)break;const l=JSON.parse(f.slice(0,u));if(f=f.slice(u+1),l.type==="redirect")return s(l);if(l.type==="data")l.nodes?.forEach(h=>{h?.type==="data"&&(h.uses=gt(h.uses),h.data=c(h.data))}),s(l);else if(l.type==="chunk"){const{id:h,data:w,error:E}=l,m=i.get(h);i.delete(h),E?m.reject(c(E)):m.fulfil(c(w))}}}})}function gt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function bn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=mt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=fe();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s{if(r.rangeCount===a.length){for(let s=0;s{a=c,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function Oe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function kn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Ln as a,Rn as l,S as p,O as s}; diff --git a/server/playground/_app/immutable/chunks/D5JtIcv_.js b/server/playground/_app/immutable/chunks/D5JtIcv_.js deleted file mode 100644 index b842f63..0000000 --- a/server/playground/_app/immutable/chunks/D5JtIcv_.js +++ /dev/null @@ -1 +0,0 @@ -const s=globalThis.__sveltekit_1q5735q?.base??"/_playground",a=globalThis.__sveltekit_1q5735q?.assets??s??"";export{a,s as b}; diff --git a/server/playground/_app/immutable/chunks/dxIvkWjk.js b/server/playground/_app/immutable/chunks/dxIvkWjk.js new file mode 100644 index 0000000..1c127dc --- /dev/null +++ b/server/playground/_app/immutable/chunks/dxIvkWjk.js @@ -0,0 +1,3 @@ +import{w as Ae,o as je,c as _t}from"./FG3YJaZx.js";import{a as yt,b as I}from"./hQn2QWYg.js";import{aZ as U,g as L,V as P,aY as $e}from"./DPMvo626.js";class ce{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Re extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Et(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const At=new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&Y.delete(Te(e)),Rt(e,t));const Y=new Map;function Tt(e,t){const n=Te(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function It(e,t,n){if(Y.size>0){const r=Te(e,n),a=Y.get(r);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return _e(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return _e(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const d=Ut.exec(c),[,p,u,l,h]=d;return t.push({name:l,matcher:h,optional:!!p,rest:!!u,chained:u?f===1&&i[0]==="":!1}),u?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return _e(c)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Pt)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;od).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&c.chained&&(i=0),!d&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,d]])=>{const{pattern:p,params:u}=Lt(o),l={id:o,exec:h=>{const w=p.exec(h);if(w)return Ct(w,u,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function We(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const Ot="1759702072619",Je="sveltekit:snapshot",ze="sveltekit:scroll",Xe="sveltekit:states",jt="sveltekit:pageurl",V="sveltekit:history",W="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},le=location.origin;function Ze(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function fe(){return{x:pageXOffset,y:pageYOffset}}function F(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Fe={...j,"":j.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===le&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ee(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=F(o,"preload-code")),a===null&&(a=F(o,"preload-data")),t===null&&(t=F(o,"keepfocus")),n===null&&(n=F(o,"noscroll")),s===null&&(s=F(o,"reload")),i===null&&(i=F(o,"replacestate")),o=Qe(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Fe[r??"off"],preload_data:Fe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ve(e){const t=Ae(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function $t(){const{set:e,subscribe:t}=Ae(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${yt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ot;return i&&(e(!0),tt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==le||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Rn(e){}function Dt(e){const t=Vt(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Bt=-1,Mt=-2,qt=-3,Gt=-4,Yt=-5,Ht=-6;function Kt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Bt)return;if(s===qt)return NaN;if(s===Gt)return 1/0;if(s===Yt)return-1/0;if(s===Ht)return-0;if(i||typeof s!="number")throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t?.[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let l=1;lt!=null)}const zt="x-sveltekit-invalidated",Xt="x-sveltekit-trailing-slash";function te(e){return e instanceof ce||e instanceof Re?e.status:500}function Zt(e){return e instanceof Re?e.text:"Internal Error"}let S,J,ye;const Qt=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());Qt?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ye={current:!1}):(S=new class{#e=U({});get data(){return L(this.#e)}set data(t){P(this.#e,t)}#t=U(null);get form(){return L(this.#t)}set form(t){P(this.#t,t)}#n=U(null);get error(){return L(this.#n)}set error(t){P(this.#n,t)}#r=U({});get params(){return L(this.#r)}set params(t){P(this.#r,t)}#a=U({id:null});get route(){return L(this.#a)}set route(t){P(this.#a,t)}#o=U({});get state(){return L(this.#o)}set state(t){P(this.#o,t)}#s=U(-1);get status(){return L(this.#s)}set status(t){P(this.#s,t)}#i=U(new URL("https://example.com"));get url(){return L(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=U(null);get current(){return L(this.#e)}set current(t){P(this.#e,t)}},ye=new class{#e=U(!1);get current(){return L(this.#e)}set current(t){P(this.#e,t)}},tt.v=()=>ye.current=!0);function en(e){Object.assign(S,e)}const tn="/__data.json",nn=".html__data.json";function rn(e){return e.endsWith(".html")?e.replace(/\.html$/,nn):e.replace(/\/$/,"")+tn}const Be={spanContext(){return an},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},an={traceId:"",spanId:"",traceFlags:0},{tick:on}=_t,sn=new Set(["icon","shortcut icon","apple-touch-icon"]),D=We(ze)??{},z=We(Je)??{},O={url:Ve({}),page:Ve({}),navigating:Ae(null),updated:$t()};function Ie(e){D[e]=fe()}function cn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function rt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(I||"/");e&&await e.update()}}function Me(){}let Ue,be,ne,x,ke,v;const re=[],ae=[];let C=null;const Q=new Map,at=new Set,ln=new Set,H=new Set;let y={branch:[],error:null,url:null},Le=!1,oe=!1,qe=!0,X=!1,G=!1,ot=!1,Pe=!1,st,A,T,$;const K=new Set,Ge=new Map;async function Ln(e,t,n){globalThis.__sveltekit_l125dd?.data&&globalThis.__sveltekit_l125dd.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Ue=Nt(e),x=document.documentElement,ke=t,be=e.nodes[0],ne=e.nodes[1],be(),ne(),A=history.state?.[V],T=history.state?.[W],A||(A=T=Date.now(),history.replaceState({...history.state,[V]:A,[W]:T},""));const r=D[A];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await vn(ke,n)):(await B({type:"enter",url:Ze(v.hash?kn(new URL(location.href)):location.href),replace_state:!0}),a()),wn()}function fn(){re.length=0,Pe=!1}function it(e){ae.some(t=>t?.snapshot)&&(z[e]=ae.map(t=>t?.snapshot?.capture()))}function ct(e){z[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Ye(){Ie(A),De(ze,D),it(T),De(Je,z)}async function un(e,t,n,r){let a;t.invalidateAll&&(C=null),await B({type:"goto",url:Ze(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[...Ge.keys()]),t.invalidate&&t.invalidate.forEach(yn)}}),t.invalidateAll&&$e().then($e).then(()=>{Ge.forEach(({resource:s},i)=>{a?.includes(i)&&s.refresh?.()})})}async function dn(e){if(e.id!==C?.id){const t={};K.add(t),C={id:e.id,token:t,promise:ut({...e,preload:t}).then(n=>(K.delete(t),n.type==="loaded"&&n.state.error&&(C=null),n))}}return C.promise}async function we(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function lt(e,t,n){y=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(S,e.props.page),st=new v.root({target:t,props:{...e.props,stores:O,components:ae},hydrate:n,sync:!1}),ct(T),n){const a={from:null,to:{params:y.params,route:{id:y.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};H.forEach(s=>s(a))}oe=!0}function se({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(I&&(e.pathname===I||e.pathname===I+"/"))o="always";else for(const l of n)l?.slash!==void 0&&(o=l.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:Jt(n).map(l=>l.node.component),page:Oe(S)}};i!==void 0&&(c.props.form=i);let f={},d=!S,p=0;for(let l=0;l(o&&(c.route=!0),u[l])}),params:new Proxy(r,{get:(u,l)=>(o&&c.params.add(l),u[l])}),data:s?.data??null,url:kt(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,l){u instanceof Request&&(l={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...l});const{resolved:h,promise:w}=ft(u,l,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await f.universal.load.call(null,p)??null}return{node:f,loader:e,server:s,universal:f.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:f.universal?.trailingSlash??s?.slash}}function ft(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=oe?It(r,a.href,t):Tt(r,t);return{resolved:a,promise:s}}function He(e,t,n,r,a,s){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==y.params[i])return!0;for(const i of a.dependencies)if(re.some(o=>o(new URL(i))))return!0;return!1}function Ce(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function hn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function Ke({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Oe(S),constructors:[]}}}async function ut({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(C?.id===e)return K.delete(C.token),C.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(_=>_?.().catch(()=>{})),f.forEach(_=>_?.[1]().catch(()=>{}));let d=null;const p=y.url?e!==ie(y.url):!1,u=y.route?a.id!==y.route.id:!1,l=hn(y.url,n);let h=!1;const w=f.map((_,g)=>{const b=y.branch[g],k=!!_?.[0]&&(b?.loader!==_[1]||He(h,u,p,l,b.server?.uses,r));return k&&(h=!0),k});if(w.some(Boolean)){try{d=await pt(n,w)}catch(_){const g=await M(_,{url:n,params:r,route:{id:e}});return K.has(s)?Ke({error:g,url:n,params:r,route:a}):de({status:te(_),error:g,url:n,route:a})}if(d.type==="redirect")return d}const E=d?.nodes;let m=!1;const N=f.map(async(_,g)=>{if(!_)return;const b=y.branch[g],k=E?.[g];if((!k||k.type==="skip")&&_[1]===b?.loader&&!He(m,u,p,l,b.universal?.uses,r))return b;if(m=!0,k?.type==="error")throw k;return xe({loader:_[1],url:n,params:r,route:a,parent:async()=>{const pe={};for(let ge=0;ge{});const R=[];for(let _=0;_Promise.resolve({}),server_data_node:Ce(s)}),c={node:await ne(),loader:ne,universal:null,server:null,data:null};return se({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return un(new URL(o.location,location.href),{},0);throw o}}async function gn(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ft(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();Q.set(t,r),n=await r}catch{Q.delete(t);return}return n}async function he(e,t){if(e&&!ue(e,I,v.hash)){const n=await gn(e);if(!n)return;const r=mn(n);for(const a of Ue){const s=a.exec(r);if(s)return{id:ie(e),invalidating:t,route:a,params:bt(s),url:e}}}}function mn(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(I.length))||"/"}function ie(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a}){let s=!1;const i=Ne(y,n,e,t);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const o={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return X||at.forEach(c=>c(o)),s?null:i}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=Me,block:d=Me,event:p}){const u=$;$=c;const l=await he(t,!1),h=e==="enter"?Ne(y,l,t,e):dt({url:t,type:e,delta:n?.delta,intent:l,event:p});if(!h){d(),$===c&&($=u);return}const w=A,E=T;f(),X=!0,oe&&h.navigation.type!=="enter"&&O.navigating.set(J.current=h.navigation);let m=l&&await ut(l);if(!m){if(ue(t,I,v.hash))return await q(t,s);m=await ht(t,{id:null},await M(new Re(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=l?.url||t,$!==c)return h.reject(new Error("navigation aborted")),!1;if(m.type==="redirect"){if(o<20){await B({type:e,url:new URL(m.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:c}),h.fulfil(void 0);return}m=await de({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else m.props.page.status>=400&&await O.updated.check()&&(await rt(),await q(t,s));if(fn(),Ie(w),it(E),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,b={[V]:A+=g,[W]:T+=g,[Xe]:i};(s?history.replaceState:history.pushState).call(history,b,"",t),s||cn(A,T)}if(C=null,m.props.page.state=i,oe){const g=(await Promise.all(Array.from(ln,b=>b(h.navigation)))).filter(b=>typeof b=="function");if(g.length>0){let b=function(){g.forEach(k=>{H.delete(k)})};g.push(b),g.forEach(k=>{H.add(k)})}y=m.state,m.props.page&&(m.props.page.url=t),st.$set(m.props),en(m.props.page),ot=!0}else lt(m,ke,!1);const{activeElement:N}=document;await on();const R=n?n.scroll:a?fe():null;if(qe){const g=t.hash&&document.getElementById(mt(t));R?scrollTo(R.x,R.y):g?g.scrollIntoView():scrollTo(0,0)}const _=document.activeElement!==N&&document.activeElement!==document.body;!r&&!_&&bn(t),qe=!0,m.props.page&&Object.assign(S,m.props.page),X=!1,e==="popstate"&&ct(T),h.fulfil(void 0),H.forEach(g=>g(h.navigation)),O.navigating.set(J.current=null)}async function ht(e,t,n,r,a){return e.origin===le&&e.pathname===location.pathname&&!Le?await de({status:r,error:n,url:e,route:t}):await q(e,a)}function _n(){let e,t,n;x.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(we(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const f=et(o,x),d=f===t&&c>=n;if(!f||d)return;const{url:p,external:u,download:l}=ve(f,I,v.hash);if(u||l)return;const h=ee(f),w=p&&ie(y.url)===ie(p);if(!(h.reload||w))if(c<=h.preload_data){t=f,n=j.tap;const E=await he(p,!1);if(!E)return;dn(E)}else c<=h.preload_code&&(t=f,n=c,we(p))}function i(){a.disconnect();for(const o of x.querySelectorAll("a")){const{url:c,external:f,download:d}=ve(o,I,v.hash);if(f||d)continue;const p=ee(o);p.reload||(p.preload_code===j.viewport&&a.observe(o),p.preload_code===j.eager&&we(c))}}H.add(i),i()}function M(e,t){if(e instanceof ce)return e.body;const n=te(e),r=Zt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function yn(e){if(typeof e=="function")re.push(e);else{const{href:t}=new URL(e,location.href);re.push(n=>n.href===t)}}function wn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Ye(),!X){const r=Ne(y,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ye()}),navigator.connection?.saveData||_n(),x.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=et(t.composedPath()[0],x);if(!n)return;const{url:r,external:a,target:s,download:i}=ve(n,I,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=ee(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[f,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=f===me(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,u]=y.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const l=n.ownerDocument.getElementById(decodeURIComponent(d));l&&(l.scrollIntoView(),l.focus())}return}if(G=!0,Ie(A),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await B({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),x.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(i,I,!1))return;const o=t.target,c=ee(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(o,r);i.search=new URLSearchParams(f).toString(),B({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[V]){const n=t.state[V];if($={},n===A)return;const r=D[n],a=t.state[Xe]??{},s=new URL(t.state[jt]??location.href),i=t.state[W],o=y.url?me(location)===me(y.url):!1;if(i===T&&(ot||o)){a!==S.state&&(S.state=a),e(s),D[A]=fe(),r&&scrollTo(r.x,r.y),A=n;return}const f=n-A;await B({type:"popstate",url:s,popped:{state:a,scroll:r,delta:f},accept:()=>{A=n,T=i},block:()=>{history.go(-f)},nav_token:$,event:t})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[V]:++A,[W]:T},"",location.href))});for(const t of document.querySelectorAll("link"))sn.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&O.navigating.set(J.current=null)});function e(t){y.url=S.url=t,O.page.set(Oe(S)),O.page.notify()}}async function vn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Le=!0;const f=new URL(location.href);let d;({params:a={},route:s={id:null}}=await he(f,!1)||{}),d=Ue.find(({id:l})=>l===s.id);let p,u=!0;try{const l=r.map(async(w,E)=>{const m=o[E];return m?.uses&&(m.uses=gt(m.uses)),xe({loader:v.nodes[w],url:f,params:a,route:s,parent:async()=>{const N={};for(let R=0;Rs?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new ce(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader();function c(d){return Kt(d,{...v.decoders,Promise:p=>new Promise((u,l)=>{i.set(p,{fulfil:u,reject:l})})})}let f="";for(;;){const{done:d,value:p}=await o.read();if(d&&!f)break;for(f+=!p&&f?` +`:At.decode(p,{stream:!0});;){const u=f.indexOf(` +`);if(u===-1)break;const l=JSON.parse(f.slice(0,u));if(f=f.slice(u+1),l.type==="redirect")return s(l);if(l.type==="data")l.nodes?.forEach(h=>{h?.type==="data"&&(h.uses=gt(h.uses),h.data=c(h.data))}),s(l);else if(l.type==="chunk"){const{id:h,data:w,error:E}=l,m=i.get(h);i.delete(h),E?m.reject(c(E)):m.fulfil(c(w))}}}})}function gt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function bn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=mt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=fe();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s{if(r.rangeCount===a.length){for(let s=0;s{a=c,s=f});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function Oe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function kn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Ln as a,Rn as l,S as p,O as s}; diff --git a/server/playground/_app/immutable/chunks/hQn2QWYg.js b/server/playground/_app/immutable/chunks/hQn2QWYg.js new file mode 100644 index 0000000..d075726 --- /dev/null +++ b/server/playground/_app/immutable/chunks/hQn2QWYg.js @@ -0,0 +1 @@ +const s=globalThis.__sveltekit_l125dd?.base??"/_playground",a=globalThis.__sveltekit_l125dd?.assets??s??"";export{a,s as b}; diff --git a/server/playground/_app/immutable/entry/app.22rChsU-.js b/server/playground/_app/immutable/entry/app.CDYShOyR.js similarity index 93% rename from server/playground/_app/immutable/entry/app.22rChsU-.js rename to server/playground/_app/immutable/entry/app.CDYShOyR.js index 9c58039..3ee3c70 100644 --- a/server/playground/_app/immutable/entry/app.22rChsU-.js +++ b/server/playground/_app/immutable/entry/app.CDYShOyR.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Bd7C4o0p.js","../chunks/DsnmJJEf.js","../chunks/DPMvo626.js","../chunks/B-U_immA.js","../chunks/D5JtIcv_.js","../assets/0.z6k2NkFs.css","../nodes/1.DEM9p3Zw.js","../chunks/C2MkeDuv.js","../chunks/FG3YJaZx.js","../chunks/Cdp_135K.js","../nodes/2.C02anazN.js","../chunks/DM3e16Yp.js","../assets/2.DQ5mJGGf.css"])))=>i.map(i=>d[i]); -import{z as D,A as W,y as Y,E as z,G as B,I as J,J as I,K,N as Z,M as H,V as w,ab as Q,g as d,aS as X,W as $,R as ee,p as te,u as re,a as se,aZ as x,aY as ae,i as V,j as R,s as ne,k as P,l as oe,o as S,m as ce,n as ie,a_ as A,a$ as le,t as ue}from"../chunks/DPMvo626.js";import{h as fe,m as de,u as me,o as he,s as _e}from"../chunks/FG3YJaZx.js";import"../chunks/DsnmJJEf.js";import{p as C,i as O,b as L}from"../chunks/DM3e16Yp.js";function j(l,e,a){D&&W();var o=l,n,r,t=null,s=null;function m(){r&&(H(r),r=null),t&&(t.lastChild.remove(),o.before(t),t=null),r=s,s=null}Y(()=>{if(n!==(n=e())){var h=K();if(n){var c=o;h&&(t=document.createDocumentFragment(),t.append(c=B()),r&&I.skipped_effects.add(r)),s=J(()=>a(c,n))}h?I.add_callback(m):m()}},z),D&&(o=Z)}function ve(l){return class extends ge{constructor(e){super({component:l,...e})}}}class ge{#t;#e;constructor(e){var a=new Map,o=(r,t)=>{var s=ee(t,!1,!1);return a.set(r,s),s};const n=new Proxy({...e.props||{},$$events:{}},{get(r,t){return d(a.get(t)??o(t,Reflect.get(r,t)))},has(r,t){return t===Q?!0:(d(a.get(t)??o(t,Reflect.get(r,t))),Reflect.has(r,t))},set(r,t,s){return w(a.get(t)??o(t,s),s),Reflect.set(r,t,s)}});this.#e=(e.hydrate?fe:de)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&X(),this.#t=n.$$events;for(const r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||$(this,r,{get(){return this.#e[r]},set(t){this.#e[r]=t},enumerable:!0});this.#e.$set=r=>{Object.assign(n,r)},this.#e.$destroy=()=>{me(this.#e)}}$set(e){this.#e.$set(e)}$on(e,a){this.#t[e]=this.#t[e]||[];const o=(...n)=>a.call(this,...n);return this.#t[e].push(o),()=>{this.#t[e]=this.#t[e].filter(n=>n!==o)}}$destroy(){this.#e.$destroy()}}const ye="modulepreload",be=function(l,e){return new URL(l,e).href},M={},T=function(e,a,o){let n=Promise.resolve();if(a&&a.length>0){let h=function(c){return Promise.all(c.map(f=>Promise.resolve(f).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),m=s?.nonce||s?.getAttribute("nonce");n=h(a.map(c=>{if(c=be(c,o),c in M)return;M[c]=!0;const f=c.endsWith(".css"),_=f?'[rel="stylesheet"]':"";if(o)for(let v=t.length-1;v>=0;v--){const i=t[v];if(i.href===c&&(!f||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${_}`))return;const u=document.createElement("link");if(u.rel=f?"stylesheet":ye,f||(u.as="script"),u.crossOrigin="",u.href=c,m&&u.setAttribute("nonce",m),document.head.appendChild(u),f)return new Promise((v,i)=>{u.addEventListener("load",v),u.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return n.then(t=>{for(const s of t||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})},Oe={};var Ee=V('
'),Pe=V(" ",1);function pe(l,e){te(e,!0);let a=C(e,"components",23,()=>[]),o=C(e,"data_0",3,null),n=C(e,"data_1",3,null);re(()=>e.stores.page.set(e.page)),se(()=>{e.stores,e.page,e.constructors,a(),e.form,o(),n(),e.stores.page.notify()});let r=x(!1),t=x(!1),s=x(null);he(()=>{const i=e.stores.page.subscribe(()=>{d(r)&&(w(t,!0),ae().then(()=>{w(s,document.title||"untitled page",!0)}))});return w(r,!0),i});const m=A(()=>e.constructors[1]);var h=Pe(),c=R(h);{var f=i=>{const g=A(()=>e.constructors[0]);var y=S(),p=R(y);j(p,()=>d(g),(b,E)=>{L(E(b,{get data(){return o()},get form(){return e.form},get params(){return e.page.params},children:(k,we)=>{var N=S(),F=R(N);j(F,()=>d(m),(q,G)=>{L(G(q,{get data(){return n()},get form(){return e.form},get params(){return e.page.params}}),U=>a()[1]=U,()=>a()?.[1])}),P(k,N)},$$slots:{default:!0}}),k=>a()[0]=k,()=>a()?.[0])}),P(i,y)},_=i=>{const g=A(()=>e.constructors[0]);var y=S(),p=R(y);j(p,()=>d(g),(b,E)=>{L(E(b,{get data(){return o()},get form(){return e.form},get params(){return e.page.params}}),k=>a()[0]=k,()=>a()?.[0])}),P(i,y)};O(c,i=>{e.constructors[1]?i(f):i(_,!1)})}var u=ne(c,2);{var v=i=>{var g=Ee(),y=ce(g);{var p=b=>{var E=le();ue(()=>_e(E,d(s))),P(b,E)};O(y,b=>{d(t)&&b(p)})}ie(g),P(i,g)};O(u,i=>{d(r)&&i(v)})}P(l,h),oe()}const Le=ve(pe),je=[()=>T(()=>import("../nodes/0.Bd7C4o0p.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>T(()=>import("../nodes/1.DEM9p3Zw.js"),__vite__mapDeps([6,1,7,2,8,9,4]),import.meta.url),()=>T(()=>import("../nodes/2.C02anazN.js"),__vite__mapDeps([10,1,7,2,3,11,8,12]),import.meta.url)],Te=[],Ne={"/":[2]},ke={handleError:(({error:l})=>{console.error(l)}),reroute:(()=>{}),transport:{}},Re=Object.fromEntries(Object.entries(ke.transport).map(([l,e])=>[l,e.decode])),De=!1,Ie=(l,e)=>Re[l](e);export{Ie as decode,Re as decoders,Ne as dictionary,De as hash,ke as hooks,Oe as matchers,je as nodes,Le as root,Te as server_loads}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BnitFm9e.js","../chunks/DsnmJJEf.js","../chunks/DPMvo626.js","../chunks/B-U_immA.js","../chunks/hQn2QWYg.js","../assets/0.z6k2NkFs.css","../nodes/1.DOigNuzF.js","../chunks/C2MkeDuv.js","../chunks/FG3YJaZx.js","../chunks/dxIvkWjk.js","../nodes/2.C02anazN.js","../chunks/DM3e16Yp.js","../assets/2.DQ5mJGGf.css"])))=>i.map(i=>d[i]); +import{z as D,A as W,y as Y,E as z,G as B,I as J,J as I,K,N as Z,M as H,V as w,ab as Q,g as d,aS as X,W as $,R as ee,p as te,u as re,a as se,aZ as x,aY as ae,i as V,j as R,s as ne,k as P,l as oe,o as S,m as ce,n as ie,a_ as A,a$ as le,t as ue}from"../chunks/DPMvo626.js";import{h as fe,m as de,u as me,o as he,s as _e}from"../chunks/FG3YJaZx.js";import"../chunks/DsnmJJEf.js";import{p as C,i as O,b as L}from"../chunks/DM3e16Yp.js";function j(l,e,a){D&&W();var o=l,n,r,t=null,s=null;function m(){r&&(H(r),r=null),t&&(t.lastChild.remove(),o.before(t),t=null),r=s,s=null}Y(()=>{if(n!==(n=e())){var h=K();if(n){var c=o;h&&(t=document.createDocumentFragment(),t.append(c=B()),r&&I.skipped_effects.add(r)),s=J(()=>a(c,n))}h?I.add_callback(m):m()}},z),D&&(o=Z)}function ve(l){return class extends ge{constructor(e){super({component:l,...e})}}}class ge{#t;#e;constructor(e){var a=new Map,o=(r,t)=>{var s=ee(t,!1,!1);return a.set(r,s),s};const n=new Proxy({...e.props||{},$$events:{}},{get(r,t){return d(a.get(t)??o(t,Reflect.get(r,t)))},has(r,t){return t===Q?!0:(d(a.get(t)??o(t,Reflect.get(r,t))),Reflect.has(r,t))},set(r,t,s){return w(a.get(t)??o(t,s),s),Reflect.set(r,t,s)}});this.#e=(e.hydrate?fe:de)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&X(),this.#t=n.$$events;for(const r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||$(this,r,{get(){return this.#e[r]},set(t){this.#e[r]=t},enumerable:!0});this.#e.$set=r=>{Object.assign(n,r)},this.#e.$destroy=()=>{me(this.#e)}}$set(e){this.#e.$set(e)}$on(e,a){this.#t[e]=this.#t[e]||[];const o=(...n)=>a.call(this,...n);return this.#t[e].push(o),()=>{this.#t[e]=this.#t[e].filter(n=>n!==o)}}$destroy(){this.#e.$destroy()}}const ye="modulepreload",be=function(l,e){return new URL(l,e).href},M={},T=function(e,a,o){let n=Promise.resolve();if(a&&a.length>0){let h=function(c){return Promise.all(c.map(f=>Promise.resolve(f).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),m=s?.nonce||s?.getAttribute("nonce");n=h(a.map(c=>{if(c=be(c,o),c in M)return;M[c]=!0;const f=c.endsWith(".css"),_=f?'[rel="stylesheet"]':"";if(o)for(let v=t.length-1;v>=0;v--){const i=t[v];if(i.href===c&&(!f||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${_}`))return;const u=document.createElement("link");if(u.rel=f?"stylesheet":ye,f||(u.as="script"),u.crossOrigin="",u.href=c,m&&u.setAttribute("nonce",m),document.head.appendChild(u),f)return new Promise((v,i)=>{u.addEventListener("load",v),u.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return n.then(t=>{for(const s of t||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})},Oe={};var Ee=V('
'),Pe=V(" ",1);function pe(l,e){te(e,!0);let a=C(e,"components",23,()=>[]),o=C(e,"data_0",3,null),n=C(e,"data_1",3,null);re(()=>e.stores.page.set(e.page)),se(()=>{e.stores,e.page,e.constructors,a(),e.form,o(),n(),e.stores.page.notify()});let r=x(!1),t=x(!1),s=x(null);he(()=>{const i=e.stores.page.subscribe(()=>{d(r)&&(w(t,!0),ae().then(()=>{w(s,document.title||"untitled page",!0)}))});return w(r,!0),i});const m=A(()=>e.constructors[1]);var h=Pe(),c=R(h);{var f=i=>{const g=A(()=>e.constructors[0]);var y=S(),p=R(y);j(p,()=>d(g),(b,E)=>{L(E(b,{get data(){return o()},get form(){return e.form},get params(){return e.page.params},children:(k,we)=>{var N=S(),F=R(N);j(F,()=>d(m),(q,G)=>{L(G(q,{get data(){return n()},get form(){return e.form},get params(){return e.page.params}}),U=>a()[1]=U,()=>a()?.[1])}),P(k,N)},$$slots:{default:!0}}),k=>a()[0]=k,()=>a()?.[0])}),P(i,y)},_=i=>{const g=A(()=>e.constructors[0]);var y=S(),p=R(y);j(p,()=>d(g),(b,E)=>{L(E(b,{get data(){return o()},get form(){return e.form},get params(){return e.page.params}}),k=>a()[0]=k,()=>a()?.[0])}),P(i,y)};O(c,i=>{e.constructors[1]?i(f):i(_,!1)})}var u=ne(c,2);{var v=i=>{var g=Ee(),y=ce(g);{var p=b=>{var E=le();ue(()=>_e(E,d(s))),P(b,E)};O(y,b=>{d(t)&&b(p)})}ie(g),P(i,g)};O(u,i=>{d(r)&&i(v)})}P(l,h),oe()}const Le=ve(pe),je=[()=>T(()=>import("../nodes/0.BnitFm9e.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>T(()=>import("../nodes/1.DOigNuzF.js"),__vite__mapDeps([6,1,7,2,8,9,4]),import.meta.url),()=>T(()=>import("../nodes/2.C02anazN.js"),__vite__mapDeps([10,1,7,2,3,11,8,12]),import.meta.url)],Te=[],Ne={"/":[2]},ke={handleError:(({error:l})=>{console.error(l)}),reroute:(()=>{}),transport:{}},Re=Object.fromEntries(Object.entries(ke.transport).map(([l,e])=>[l,e.decode])),De=!1,Ie=(l,e)=>Re[l](e);export{Ie as decode,Re as decoders,Ne as dictionary,De as hash,ke as hooks,Oe as matchers,je as nodes,Le as root,Te as server_loads}; diff --git a/server/playground/_app/immutable/entry/start.BBOY07pG.js b/server/playground/_app/immutable/entry/start.BBOY07pG.js deleted file mode 100644 index c45e20e..0000000 --- a/server/playground/_app/immutable/entry/start.BBOY07pG.js +++ /dev/null @@ -1 +0,0 @@ -import{l as o,a as r}from"../chunks/Cdp_135K.js";export{o as load_css,r as start}; diff --git a/server/playground/_app/immutable/entry/start.Ctfk1ssR.js b/server/playground/_app/immutable/entry/start.Ctfk1ssR.js new file mode 100644 index 0000000..501cd5a --- /dev/null +++ b/server/playground/_app/immutable/entry/start.Ctfk1ssR.js @@ -0,0 +1 @@ +import{l as o,a as r}from"../chunks/dxIvkWjk.js";export{o as load_css,r as start}; diff --git a/server/playground/_app/immutable/nodes/0.Bd7C4o0p.js b/server/playground/_app/immutable/nodes/0.BnitFm9e.js similarity index 90% rename from server/playground/_app/immutable/nodes/0.Bd7C4o0p.js rename to server/playground/_app/immutable/nodes/0.BnitFm9e.js index a6142b3..2c8370d 100644 --- a/server/playground/_app/immutable/nodes/0.Bd7C4o0p.js +++ b/server/playground/_app/immutable/nodes/0.BnitFm9e.js @@ -1 +1 @@ -import"../chunks/DsnmJJEf.js";import{p as f,o as u,q as _,j as o,v as d,k as n,l as v,w as b,$ as h,s as g,t as y,x as j,i as k}from"../chunks/DPMvo626.js";import{s as i,f as w}from"../chunks/B-U_immA.js";import{a as x,b as M}from"../chunks/D5JtIcv_.js";function O(t){return(x||M)+t}const P=!0,A=Object.freeze(Object.defineProperty({__proto__:null,prerender:P},Symbol.toStringTag,{value:"Module"}));var S=b(k(' Marka Playground @@ -40,7 +40,7 @@ My favourite baguette recipe