import{S as at,i as rt,s as ot,a as it,e as j,c as st,b as F,g as Z,t as T,d as Q,f as D,h as C,j as lt,o as Oe,k as ct,l as ft,m as ut,n as Ee,p as z,q as dt,r as pt,u as ht,v as G,w as H,x as oe,y as K,z as M,A as de}from"./chunks/index-ca7dbb83.js";import{S as tt,I as J,g as ze,f as Je,a as ke,b as pe,s as X,i as We,c as he,P as Ye,d as mt,e as _t,h as gt}from"./chunks/singletons-3b2ed371.js";import{R as Xe,H as Ie}from"./chunks/control-f5b05b5f.js";function yt(r,e){return r==="/"||e==="ignore"?r:e==="never"?r.endsWith("/")?r.slice(0,-1):r:e==="always"&&!r.endsWith("/")?r+"/":r}function wt(r){return r.split("%25").map(decodeURI).join("%25")}function bt(r){for(const e in r)r[e]=decodeURIComponent(r[e]);return r}const vt=["href","pathname","search","searchParams","toString","toJSON"];function Et(r,e){const n=new URL(r);for(const o of vt){let a=n[o];Object.defineProperty(n,o,{get(){return e(),a},enumerable:!0,configurable:!0})}return kt(n),n}function kt(r){Object.defineProperty(r,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const $t="/__data.json";function Rt(r){return r.replace(/\/$/,"")+$t}function St(r){let e=5381;if(typeof r=="string"){let n=r.length;for(;n;)e=e*33^r.charCodeAt(--n)}else if(ArrayBuffer.isView(r)){const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);let o=n.length;for(;o;)e=e*33^n[--o]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const me=window.fetch;window.fetch=(r,e)=>((r instanceof Request?r.method:(e==null?void 0:e.method)||"GET")!=="GET"&&ae.delete(Ne(r)),me(r,e));const ae=new Map;function Lt(r,e){const n=Ne(r,e),o=document.querySelector(n);if(o!=null&&o.textContent){const{body:a,...d}=JSON.parse(o.textContent),t=o.getAttribute("data-ttl");return t&&ae.set(n,{body:a,init:d,ttl:1e3*Number(t)}),Promise.resolve(new Response(a,d))}return me(r,e)}function Ot(r,e,n){if(ae.size>0){const o=Ne(r,n),a=ae.get(o);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(o);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const d=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(o);if(d)return e.push({name:d[1],matcher:d[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!o)return;const t=o.split(/\[(.+?)\](?!\])/);return"/"+t.map((u,p)=>{if(p%2){if(u.startsWith("x+"))return $e(String.fromCharCode(parseInt(u.slice(2),16)));if(u.startsWith("u+"))return $e(String.fromCharCode(...u.slice(2).split("-").map(A=>parseInt(A,16))));const g=It.exec(u);if(!g)throw new Error(`Invalid param: ${u}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,w,P,$,q]=g;return e.push({name:$,matcher:q,optional:!!w,rest:!!P,chained:P?p===1&&t[0]==="":!1}),P?"(.*?)":w?"([^/]*)?":"([^/]+?)"}return $e(u)}).join("")}).join("")}/?$`),params:e}}function Pt(r){return!/^\([^)]+\)$/.test(r)}function Nt(r){return r.slice(1).split("/").filter(Pt)}function Ut(r,e,n){const o={},a=r.slice(1);let d="";for(let t=0;t=t;)a[p]=a[p-1],p-=1;continue}return}o[c.name]=u}}if(!d)return o}function $e(r){return r.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function jt(r,e,n,o){const a=new Set(e);return Object.entries(n).map(([c,[u,p,g]])=>{const{pattern:w,params:P}=At(c),$={id:c,exec:q=>{const A=w.exec(q);if(A)return Ut(A,P,o)},errors:[1,...g||[]].map(q=>r[q]),layouts:[0,...p||[]].map(t),leaf:d(u)};return $.errors.length=$.layouts.length=Math.max($.errors.length,$.layouts.length),$});function d(c){const u=c<0;return u&&(c=~c),[u,r[c]]}function t(c){return c===void 0?c:[a.has(c),r[c]]}}function Tt(r){let e,n,o;var a=r[0][0];function d(t){return{props:{data:t[2],form:t[1]}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=j()},l(t){e&&oe(e.$$.fragment,t),n=j()},m(t,c){e&&K(e,t,c),F(t,n,c),o=!0},p(t,c){const u={};if(c&4&&(u.data=t[2]),c&2&&(u.form=t[1]),a!==(a=t[0][0])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{M(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(u)},i(t){o||(e&&D(e.$$.fragment,t),o=!0)},o(t){e&&T(e.$$.fragment,t),o=!1},d(t){t&&C(n),e&&M(e,t)}}}function Dt(r){let e,n,o;var a=r[0][0];function d(t){return{props:{data:t[2],$$slots:{default:[Bt]},$$scope:{ctx:t}}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=j()},l(t){e&&oe(e.$$.fragment,t),n=j()},m(t,c){e&&K(e,t,c),F(t,n,c),o=!0},p(t,c){const u={};if(c&4&&(u.data=t[2]),c&1051&&(u.$$scope={dirty:c,ctx:t}),a!==(a=t[0][0])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{M(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(u)},i(t){o||(e&&D(e.$$.fragment,t),o=!0)},o(t){e&&T(e.$$.fragment,t),o=!1},d(t){t&&C(n),e&&M(e,t)}}}function Vt(r){let e,n,o;var a=r[0][1];function d(t){return{props:{data:t[3],form:t[1]}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=j()},l(t){e&&oe(e.$$.fragment,t),n=j()},m(t,c){e&&K(e,t,c),F(t,n,c),o=!0},p(t,c){const u={};if(c&8&&(u.data=t[3]),c&2&&(u.form=t[1]),a!==(a=t[0][1])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{M(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(u)},i(t){o||(e&&D(e.$$.fragment,t),o=!0)},o(t){e&&T(e.$$.fragment,t),o=!1},d(t){t&&C(n),e&&M(e,t)}}}function Ct(r){let e,n,o;var a=r[0][1];function d(t){return{props:{data:t[3],$$slots:{default:[qt]},$$scope:{ctx:t}}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=j()},l(t){e&&oe(e.$$.fragment,t),n=j()},m(t,c){e&&K(e,t,c),F(t,n,c),o=!0},p(t,c){const u={};if(c&8&&(u.data=t[3]),c&1043&&(u.$$scope={dirty:c,ctx:t}),a!==(a=t[0][1])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{M(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(u)},i(t){o||(e&&D(e.$$.fragment,t),o=!0)},o(t){e&&T(e.$$.fragment,t),o=!1},d(t){t&&C(n),e&&M(e,t)}}}function qt(r){let e,n,o;var a=r[0][2];function d(t){return{props:{data:t[4],form:t[1]}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=j()},l(t){e&&oe(e.$$.fragment,t),n=j()},m(t,c){e&&K(e,t,c),F(t,n,c),o=!0},p(t,c){const u={};if(c&16&&(u.data=t[4]),c&2&&(u.form=t[1]),a!==(a=t[0][2])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{M(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else a&&e.$set(u)},i(t){o||(e&&D(e.$$.fragment,t),o=!0)},o(t){e&&T(e.$$.fragment,t),o=!1},d(t){t&&C(n),e&&M(e,t)}}}function Bt(r){let e,n,o,a;const d=[Ct,Vt],t=[];function c(u,p){return u[0][2]?0:1}return e=c(r),n=t[e]=d[e](r),{c(){n.c(),o=j()},l(u){n.l(u),o=j()},m(u,p){t[e].m(u,p),F(u,o,p),a=!0},p(u,p){let g=e;e=c(u),e===g?t[e].p(u,p):(Z(),T(t[g],1,1,()=>{t[g]=null}),Q(),n=t[e],n?n.p(u,p):(n=t[e]=d[e](u),n.c()),D(n,1),n.m(o.parentNode,o))},i(u){a||(D(n),a=!0)},o(u){T(n),a=!1},d(u){t[e].d(u),u&&C(o)}}}function Ze(r){let e,n=r[6]&&Qe(r);return{c(){e=ct("div"),n&&n.c(),this.h()},l(o){e=ft(o,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var a=ut(e);n&&n.l(a),a.forEach(C),this.h()},h(){Ee(e,"id","svelte-announcer"),Ee(e,"aria-live","assertive"),Ee(e,"aria-atomic","true"),z(e,"position","absolute"),z(e,"left","0"),z(e,"top","0"),z(e,"clip","rect(0 0 0 0)"),z(e,"clip-path","inset(50%)"),z(e,"overflow","hidden"),z(e,"white-space","nowrap"),z(e,"width","1px"),z(e,"height","1px")},m(o,a){F(o,e,a),n&&n.m(e,null)},p(o,a){o[6]?n?n.p(o,a):(n=Qe(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(o){o&&C(e),n&&n.d()}}}function Qe(r){let e;return{c(){e=dt(r[7])},l(n){e=pt(n,r[7])},m(n,o){F(n,e,o)},p(n,o){o&128&&ht(e,n[7])},d(n){n&&C(e)}}}function Ft(r){let e,n,o,a,d;const t=[Dt,Tt],c=[];function u(g,w){return g[0][1]?0:1}e=u(r),n=c[e]=t[e](r);let p=r[5]&&Ze(r);return{c(){n.c(),o=it(),p&&p.c(),a=j()},l(g){n.l(g),o=st(g),p&&p.l(g),a=j()},m(g,w){c[e].m(g,w),F(g,o,w),p&&p.m(g,w),F(g,a,w),d=!0},p(g,[w]){let P=e;e=u(g),e===P?c[e].p(g,w):(Z(),T(c[P],1,1,()=>{c[P]=null}),Q(),n=c[e],n?n.p(g,w):(n=c[e]=t[e](g),n.c()),D(n,1),n.m(o.parentNode,o)),g[5]?p?p.p(g,w):(p=Ze(g),p.c(),p.m(a.parentNode,a)):p&&(p.d(1),p=null)},i(g){d||(D(n),d=!0)},o(g){T(n),d=!1},d(g){c[e].d(g),g&&C(o),p&&p.d(g),g&&C(a)}}}function Gt(r,e,n){let{stores:o}=e,{page:a}=e,{components:d}=e,{form:t}=e,{data_0:c=null}=e,{data_1:u=null}=e,{data_2:p=null}=e;lt(o.page.notify);let g=!1,w=!1,P=null;return Oe(()=>{const $=o.page.subscribe(()=>{g&&(n(6,w=!0),n(7,P=document.title||"untitled page"))});return n(5,g=!0),$}),r.$$set=$=>{"stores"in $&&n(8,o=$.stores),"page"in $&&n(9,a=$.page),"components"in $&&n(0,d=$.components),"form"in $&&n(1,t=$.form),"data_0"in $&&n(2,c=$.data_0),"data_1"in $&&n(3,u=$.data_1),"data_2"in $&&n(4,p=$.data_2)},r.$$.update=()=>{r.$$.dirty&768&&o.page.set(a)},[d,t,c,u,p,g,w,P,o,a]}class Ht extends at{constructor(e){super(),rt(this,e,Gt,Ft,ot,{stores:8,page:9,components:0,form:1,data_0:2,data_1:3,data_2:4})}}const Kt="modulepreload",Mt=function(r,e){return new URL(r,e).href},xe={},W=function(e,n,o){if(!n||n.length===0)return e();const a=document.getElementsByTagName("link");return Promise.all(n.map(d=>{if(d=Mt(d,o),d in xe)return;xe[d]=!0;const t=d.endsWith(".css"),c=t?'[rel="stylesheet"]':"";if(!!o)for(let g=a.length-1;g>=0;g--){const w=a[g];if(w.href===d&&(!t||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${c}`))return;const p=document.createElement("link");if(p.rel=t?"stylesheet":Kt,t||(p.as="script",p.crossOrigin=""),p.href=d,document.head.appendChild(p),t)return new Promise((g,w)=>{p.addEventListener("load",g),p.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${d}`)))})})).then(()=>e())},zt={},_e=[()=>W(()=>import("./chunks/0-e4fe737f.js"),["./chunks/0-e4fe737f.js","./components/pages/_layout.svelte-d55f7618.js","./chunks/index-ca7dbb83.js","./chunks/stores-1315f220.js","./chunks/singletons-3b2ed371.js","./assets/_layout-923563f8.css"],import.meta.url),()=>W(()=>import("./chunks/1-405702f0.js"),["./chunks/1-405702f0.js","./components/error.svelte-dc8cd56f.js","./chunks/index-ca7dbb83.js","./chunks/stores-1315f220.js","./chunks/singletons-3b2ed371.js"],import.meta.url),()=>W(()=>import("./chunks/2-0451906f.js"),["./chunks/2-0451906f.js","./chunks/_layout-40421f8f.js","./components/layout.svelte-c1320bf3.js","./chunks/index-ca7dbb83.js"],import.meta.url),()=>W(()=>import("./chunks/3-05fa82eb.js"),["./chunks/3-05fa82eb.js","./chunks/_page-f6db536a.js","./chunks/control-f5b05b5f.js","./components/pages/_page.svelte-823e3485.js","./chunks/index-ca7dbb83.js"],import.meta.url),()=>W(()=>import("./chunks/4-83dfea30.js"),["./chunks/4-83dfea30.js","./components/pages/_entry_/_page.svelte-1ed8b048.js","./chunks/index-ca7dbb83.js","./chunks/CollectionList-0b42a41d.js","./chunks/utils-ffef3488.js","./chunks/Footer-55f8b8b4.js","./chunks/TimelineHeatmap-03aaf4ba.js","./chunks/navigation-c9cf44c3.js","./chunks/singletons-3b2ed371.js","./chunks/stores-1315f220.js"],import.meta.url),()=>W(()=>import("./chunks/5-b4e99462.js"),["./chunks/5-b4e99462.js","./components/pages/_entry_/_type_/_page.svelte-bf451ef0.js","./chunks/index-ca7dbb83.js","./chunks/stores-1315f220.js","./chunks/singletons-3b2ed371.js","./chunks/Footer-55f8b8b4.js","./chunks/navigation-c9cf44c3.js","./chunks/utils-ffef3488.js","./chunks/EventTypeBadge-cdf2d9fb.js"],import.meta.url),()=>W(()=>import("./chunks/6-b24f033d.js"),["./chunks/6-b24f033d.js","./components/pages/_entry_/_type_/_slug_/_page.svelte-bd968d45.js","./chunks/index-ca7dbb83.js","./chunks/stores-1315f220.js","./chunks/singletons-3b2ed371.js","./chunks/CollectionList-0b42a41d.js","./chunks/utils-ffef3488.js","./chunks/Footer-55f8b8b4.js","./chunks/CalendarList-f28ca040.js","./chunks/EventTypeBadge-cdf2d9fb.js"],import.meta.url),()=>W(()=>import("./chunks/7-75f5690f.js"),["./chunks/7-75f5690f.js","./components/pages/_entry_/day/_date_/_page.svelte-8e22e526.js","./chunks/index-ca7dbb83.js","./chunks/stores-1315f220.js","./chunks/singletons-3b2ed371.js","./chunks/TimelineHeatmap-03aaf4ba.js","./chunks/navigation-c9cf44c3.js","./chunks/Footer-55f8b8b4.js","./chunks/CalendarList-f28ca040.js","./chunks/EventTypeBadge-cdf2d9fb.js"],import.meta.url),()=>W(()=>import("./chunks/8-bf025b67.js"),["./chunks/8-bf025b67.js","./components/pages/_entry_/schedule/_page.svelte-5fd6b770.js","./chunks/index-ca7dbb83.js","./chunks/stores-1315f220.js","./chunks/singletons-3b2ed371.js","./chunks/TimelineHeatmap-03aaf4ba.js","./chunks/navigation-c9cf44c3.js","./chunks/Footer-55f8b8b4.js","./chunks/CalendarList-f28ca040.js","./chunks/EventTypeBadge-cdf2d9fb.js"],import.meta.url)],Jt=[0],Wt={"/":[3],"/[entry]":[4,[2]],"/[entry]/day/[date]":[7,[2]],"/[entry]/schedule":[8,[2]],"/[entry]/[type]":[5,[2]],"/[entry]/[type]/[slug]":[6,[2]]},Yt={handleError:({error:r})=>{console.error(r)}};async function Xt(r){var e;for(const n in r)if(typeof((e=r[n])==null?void 0:e.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(r).map(async([o,a])=>[o,await a])));return r}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");const Zt=-1,Qt=-2,xt=-3,en=-4,tn=-5,nn=-6;function an(r){if(typeof r=="number")return o(r,!0);if(!Array.isArray(r)||r.length===0)throw new Error("Invalid input");const e=r,n=Array(e.length);function o(a,d=!1){if(a===Zt)return;if(a===xt)return NaN;if(a===en)return 1/0;if(a===tn)return-1/0;if(a===nn)return-0;if(d)throw new Error("Invalid input");if(a in n)return n[a];const t=e[a];if(!t||typeof t!="object")n[a]=t;else if(Array.isArray(t))if(typeof t[0]=="string")switch(t[0]){case"Date":n[a]=new Date(t[1]);break;case"Set":const u=new Set;n[a]=u;for(let w=1;w{h&&($=!0)},blocked:()=>{},type:"goto"})}async function Te(i){const s=ce(i,!1);if(!s)throw new Error(`Attempted to preload a URL that does not belong to this app: ${i}`);return a={id:s.id,promise:qe(s).then(f=>(f.type==="loaded"&&f.state.error&&(a=null),f))},a.promise}async function se(...i){const f=Re.filter(l=>i.some(m=>l.exec(m))).map(l=>Promise.all([...l.layouts,l.leaf].map(m=>m==null?void 0:m[1]())));await Promise.all(f)}async function De(i,s,f,l,m={},h){var b,v;Ue=m;let _=i&&await qe(i);if(_||(_=await Ge(s,{id:null},await ne(new Error(`Not found: ${s.pathname}`),{url:s,params:{},route:{id:null}}),404)),s=(i==null?void 0:i.url)||s,Ue!==m)return!1;if(_.type==="redirect")if(f.length>10||f.includes(s.pathname))_=await le({status:500,error:await ne(new Error("Redirect loop"),{url:s,params:{},route:{id:null}}),url:s,route:{id:null}});else return ye(new URL(_.location,s).href,{},[...f,s.pathname],m),!1;else((v=(b=_.props)==null?void 0:b.page)==null?void 0:v.status)>=400&&await X.updated.check()&&await ue(s);if(o.length=0,$=!1,g=!0,l&&l.details){const{details:y}=l,k=y.replaceState?0:1;y.state[J]=A+=k,history[y.replaceState?"replaceState":"pushState"](y.state,"",s)}if(a=null,u?(t=_.state,_.props.page&&(_.props.page.url=s),q.$set(_.props)):Ve(_),l){const{scroll:y,keepfocus:k}=l;if(k||Le(),await de(),p){const S=s.hash&&document.getElementById(s.hash.slice(1));y?scrollTo(y.x,y.y):S?S.scrollIntoView():scrollTo(0,0)}}else await de();p=!0,_.props.page&&(Y=_.props.page),h&&h(),g=!1}function Ve(i){var l;t=i.state;const s=document.querySelector("style[data-sveltekit]");s&&s.remove(),Y=i.props.page,q=new Ht({target:r,props:{...i.props,stores:X},hydrate:!0});const f={from:null,to:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter"};d.after_navigate.forEach(m=>m(f)),u=!0}async function ee({url:i,params:s,branch:f,status:l,error:m,route:h,form:_}){const b=f.filter(Boolean);let v="never";for(const L of f)(L==null?void 0:L.slash)!==void 0&&(v=L.slash);i.pathname=yt(i.pathname,v),i.search=i.search;const y={type:"loaded",state:{url:i,params:s,branch:f,error:m,route:h},props:{components:b.map(L=>L.node.component)}};_!==void 0&&(y.props.form=_);let k={},S=!Y;for(let L=0;LU===E))&&(y.props[`data_${L}`]=k,S=S||Object.keys(E.data??{}).length>0)}return S||(S=Object.keys(Y.data).length!==Object.keys(k).length),(!t.url||i.href!==t.url.href||t.error!==m||_!==void 0||S)&&(y.props.page={error:m,params:s,route:{id:(h==null?void 0:h.id)??null},status:l,url:new URL(i),form:_??null,data:S?k:Y.data}),y}async function we({loader:i,parent:s,url:f,params:l,route:m,server_data_node:h}){var y,k,S;let _=null;const b={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1},v=await i();if((y=v.universal)!=null&&y.load){let B=function(...E){for(const U of E){const{href:V}=new URL(U,f);b.dependencies.add(V)}};const L={route:{get id(){return b.route=!0,m.id}},params:new Proxy(l,{get:(E,U)=>(b.params.add(U),E[U])}),data:(h==null?void 0:h.data)??null,url:Et(f,()=>{b.url=!0}),async fetch(E,U){let V;E instanceof Request?(V=E.url,U={body:E.method==="GET"||E.method==="HEAD"?void 0:await E.blob(),cache:E.cache,credentials:E.credentials,headers:E.headers,integrity:E.integrity,keepalive:E.keepalive,method:E.method,mode:E.mode,redirect:E.redirect,referrer:E.referrer,referrerPolicy:E.referrerPolicy,signal:E.signal,...U}):V=E;const R=new URL(V,f).href;return B(R),u?Ot(V,R,U):Lt(V,U)},setHeaders:()=>{},depends:B,parent(){return b.parent=!0,s()}};_=await v.universal.load.call(null,L)??null,_=_?await Xt(_):null}return{node:v,loader:i,server:h,universal:(k=v.universal)!=null&&k.load?{type:"data",data:_,uses:b}:null,data:_??(h==null?void 0:h.data)??null,slash:((S=v.universal)==null?void 0:S.trailingSlash)??(h==null?void 0:h.slash)}}function Ce(i,s,f,l,m){if($)return!0;if(!l)return!1;if(l.parent&&i||l.route&&s||l.url&&f)return!0;for(const h of l.params)if(m[h]!==t.params[h])return!0;for(const h of l.dependencies)if(o.some(_=>_(new URL(h))))return!0;return!1}function be(i,s){return(i==null?void 0:i.type)==="data"?{type:"data",data:i.data,uses:{dependencies:new Set(i.uses.dependencies??[]),params:new Set(i.uses.params??[]),parent:!!i.uses.parent,route:!!i.uses.route,url:!!i.uses.url},slash:i.slash}:(i==null?void 0:i.type)==="skip"?s??null:null}async function qe({id:i,invalidating:s,url:f,params:l,route:m}){if((a==null?void 0:a.id)===i)return a.promise;const{errors:h,layouts:_,leaf:b}=m,v=[..._,b];h.forEach(R=>R==null?void 0:R().catch(()=>{})),v.forEach(R=>R==null?void 0:R[1]().catch(()=>{}));let y=null;const k=t.url?i!==t.url.pathname+t.url.search:!1,S=t.route?i!==t.route.id:!1,B=v.reduce((R,I,N)=>{var te;const O=t.branch[N],x=!!(I!=null&&I[0])&&((O==null?void 0:O.loader)!==I[1]||Ce(R.some(Boolean),S,k,(te=O.server)==null?void 0:te.uses,l));return R.push(x),R},[]);if(B.some(Boolean)){try{y=await et(f,B)}catch(R){return le({status:500,error:await ne(R,{url:f,params:l,route:{id:m.id}}),url:f,route:m})}if(y.type==="redirect")return y}const L=y==null?void 0:y.nodes;let E=!1;const U=v.map(async(R,I)=>{var te;if(!R)return;const N=t.branch[I],O=L==null?void 0:L[I];if((!O||O.type==="skip")&&R[1]===(N==null?void 0:N.loader)&&!Ce(E,S,k,(te=N.universal)==null?void 0:te.uses,l))return N;if(E=!0,(O==null?void 0:O.type)==="error")throw O;return we({loader:R[1],url:f,params:l,route:m,parent:async()=>{var Me;const Ke={};for(let ve=0;ve{});const V=[];for(let R=0;RPromise.resolve({}),server_data_node:be(_)}),v={node:await Pe(),loader:Pe,universal:null,server:null,data:null};return await ee({url:f,params:m,branch:[b,v],status:i,error:s,route:null})}function ce(i,s){if(We(i,e))return;const f=wt(i.pathname.slice(e.length)||"/");for(const l of Re){const m=l.exec(f);if(m)return{id:i.pathname+i.search,invalidating:s,route:l,params:bt(m),url:i}}}function Fe({url:i,type:s,intent:f,delta:l}){var b,v;let m=!1;const h={from:{params:t.params,route:{id:((b=t.route)==null?void 0:b.id)??null},url:t.url},to:{params:(f==null?void 0:f.params)??null,route:{id:((v=f==null?void 0:f.route)==null?void 0:v.id)??null},url:i},willUnload:!f,type:s};l!==void 0&&(h.delta=l);const _={...h,cancel:()=>{m=!0}};return w||d.before_navigate.forEach(y=>y(_)),m?null:h}async function fe({url:i,scroll:s,keepfocus:f,redirect_chain:l,details:m,type:h,delta:_,nav_token:b,accepted:v,blocked:y}){const k=ce(i,!1),S=Fe({url:i,type:h,delta:_,intent:k});if(!S){y();return}Se(A),v(),w=!0,u&&X.navigating.set(S),await De(k,i,l,{scroll:s,keepfocus:f,details:m},b,()=>{w=!1,d.after_navigate.forEach(B=>B(S)),X.navigating.set(null)})}async function Ge(i,s,f,l){return i.origin===location.origin&&i.pathname===location.pathname&&!c?await le({status:l,error:f,url:i,route:s}):await ue(i)}function ue(i){return location.href=i.href,new Promise(()=>{})}function nt(){let i;n.addEventListener("mousemove",h=>{const _=h.target;clearTimeout(i),i=setTimeout(()=>{l(_,2)},20)});function s(h){l(h.composedPath()[0],1)}n.addEventListener("mousedown",s),n.addEventListener("touchstart",s,{passive:!0});const f=new IntersectionObserver(h=>{for(const _ of h)_.isIntersecting&&(se(new URL(_.target.href).pathname),f.unobserve(_.target))},{threshold:0});function l(h,_){const b=Je(h,n);if(!b)return;const{url:v,external:y}=ke(b,e);if(y)return;const k=pe(b);k.reload||(_<=k.preload_data?Te(v):_<=k.preload_code&&se(v.pathname))}function m(){f.disconnect();for(const h of n.querySelectorAll("a")){const{url:_,external:b}=ke(h,e);if(b)continue;const v=pe(h);v.reload||(v.preload_code===Ye.viewport&&f.observe(h),v.preload_code===Ye.eager&&se(_.pathname))}}d.after_navigate.push(m),m()}return{after_navigate:i=>{Oe(()=>(d.after_navigate.push(i),()=>{const s=d.after_navigate.indexOf(i);d.after_navigate.splice(s,1)}))},before_navigate:i=>{Oe(()=>(d.before_navigate.push(i),()=>{const s=d.before_navigate.indexOf(i);d.before_navigate.splice(s,1)}))},disable_scroll_handling:()=>{(g||!u)&&(p=!1)},goto:(i,s={})=>ye(i,s,[]),invalidate:i=>{if(typeof i=="function")o.push(i);else{const{href:s}=new URL(i,location.href);o.push(f=>f.href===s)}return je()},invalidateAll:()=>($=!0,je()),preload_data:async i=>{const s=new URL(i,ze(document));await Te(s)},preload_code:se,apply_action:async i=>{if(i.type==="error"){const s=new URL(location.href),{branch:f,route:l}=t;if(!l)return;const m=await Be(t.branch.length,f,l.errors);if(m){const h=await ee({url:s,params:t.params,branch:f.slice(0,m.idx).concat(m.node),status:i.status??500,error:i.error,route:l});t=h.state,q.$set(h.props),de().then(Le)}}else if(i.type==="redirect")ye(i.location,{invalidateAll:!0},[]);else{const s={form:i.data,page:{...Y,form:i.data,status:i.status}};q.$set(s),i.type==="success"&&de().then(Le)}},_start_router:()=>{var i;history.scrollRestoration="manual",addEventListener("beforeunload",s=>{var l;let f=!1;if(!w){const m={from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url},to:null,willUnload:!0,type:"leave",cancel:()=>f=!0};d.before_navigate.forEach(h=>h(m))}f?(s.preventDefault(),s.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){Se(A);try{sessionStorage[tt]=JSON.stringify(re)}catch{}}}),(i=navigator.connection)!=null&&i.saveData||nt(),n.addEventListener("click",s=>{if(s.button||s.which!==1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.defaultPrevented)return;const f=Je(s.composedPath()[0],n);if(!f)return;const{url:l,external:m,has:h}=ke(f,e),_=pe(f);if(!l||!(f instanceof SVGAElement)&&l.protocol!==location.protocol&&!(l.protocol==="https:"||l.protocol==="http:")||h.download)return;if(m||_.reload){Fe({url:l,type:"link"})||s.preventDefault(),w=!0;return}const[v,y]=l.href.split("#");if(y!==void 0&&v===location.href.split("#")[0]){P=!0,Se(A),t.url=l,X.page.set({...Y,url:l}),X.page.notify();return}fe({url:l,scroll:_.noscroll?he():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:l.href===location.href},accepted:()=>s.preventDefault(),blocked:()=>s.preventDefault(),type:"link"})}),n.addEventListener("submit",s=>{if(s.defaultPrevented)return;const f=HTMLFormElement.prototype.cloneNode.call(s.target),l=s.submitter;if(((l==null?void 0:l.formMethod)||f.method)!=="get")return;const h=new URL((l==null?void 0:l.hasAttribute("formaction"))&&(l==null?void 0:l.formAction)||f.action);if(We(h,e))return;const _=s.target,{noscroll:b,reload:v}=pe(_);if(v)return;s.preventDefault(),s.stopPropagation();const y=new FormData(_),k=l==null?void 0:l.getAttribute("name");k&&y.append(k,(l==null?void 0:l.getAttribute("value"))??""),h.search=new URLSearchParams(y).toString(),fe({url:h,scroll:b?he():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:!1},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",s=>{var f;if((f=s.state)!=null&&f[J]){if(s.state[J]===A)return;const l=s.state[J]-A;fe({url:new URL(location.href),scroll:re[s.state[J]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{A=s.state[J]},blocked:()=>{history.go(-l)},type:"popstate",delta:l})}}),addEventListener("hashchange",()=>{P&&(P=!1,history.replaceState({...history.state,[J]:++A},"",location.href))});for(const s of document.querySelectorAll("link"))s.rel==="icon"&&(s.href=s.href);addEventListener("pageshow",s=>{s.persisted&&X.navigating.set(null)})},_hydrate:async({status:i=200,error:s,node_ids:f,params:l,route:m,data:h,form:_})=>{c=!0;const b=new URL(location.href);({params:l={},route:m={id:null}}=ce(b,!1)||{});let v;try{const y=f.map(async(k,S)=>{const B=h[S];return we({loader:_e[k],url:b,params:l,route:m,parent:async()=>{const L={};for(let E=0;Ek===m.id)??null})}catch(y){if(y instanceof Xe){await ue(new URL(y.location,location.href));return}v=await le({status:y instanceof Ie?y.status:500,error:await ne(y,{url:b,params:l,route:m}),url:b,route:m})}Ve(v)}}}async function et(r,e){var d;const n=new URL(r);n.pathname=Rt(r.pathname),n.searchParams.append("x-sveltekit-invalidated",e.map(t=>t?"1":"").join("_"));const o=await me(n.href),a=await o.json();if(!o.ok)throw new Error(a);return(d=a.nodes)==null||d.forEach(t=>{(t==null?void 0:t.type)==="data"&&(t.data=an(t.data),t.uses={dependencies:new Set(t.uses.dependencies??[]),params:new Set(t.uses.params??[]),parent:!!t.uses.parent,route:!!t.uses.route,url:!!t.uses.url})}),a}function ne(r,e){return r instanceof Ie?r.body:Yt.handleError({error:r,event:e})??{message:e.route.id!=null?"Internal Error":"Not Found"}}function Le(){const r=document.querySelector("[autofocus]");if(r)r.focus();else{const e=document.body,n=e.getAttribute("tabindex");e.tabIndex=-1,e.focus({preventScroll:!0}),setTimeout(()=>{var o;(o=getSelection())==null||o.removeAllRanges()}),n!==null?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")}}async function cn({env:r,hydrate:e,paths:n,target:o,version:a}){mt(n),gt(a);const d=rn({target:o,base:n.base});_t({client:d}),e?await d._hydrate(e):d.goto(location.href,{replaceState:!0}),d._start_router()}export{cn as start};