import{S as ot,i as st,s as it,a as lt,e as U,c as ct,b as B,g as Z,t as T,d as Q,f as D,h as q,j as ft,o as Pe,k as ut,l as dt,m as pt,n as $e,p as M,q as ht,r as mt,u as _t,v as G,w as H,x as oe,y as J,z as K,A as de}from"./chunks/index-d3ab9ad3.js";import{S as rt,I as z,g as We,f as Ye,a as Re,b as pe,s as X,i as Xe,c as _e,P as Ze,d as gt,e as wt,h as yt}from"./chunks/singletons-2f87aac3.js";import{R as Qe,H as Ae}from"./chunks/control-f5b05b5f.js";function bt(r,e){return r==="/"||e==="ignore"?r:e==="never"?r.endsWith("/")?r.slice(0,-1):r:e==="always"&&!r.endsWith("/")?r+"/":r}function vt(r){return r.split("%25").map(decodeURI).join("%25")}function Et(r){for(const e in r)r[e]=decodeURIComponent(r[e]);return r}const kt=["href","pathname","search","searchParams","toString","toJSON"];function $t(r,e){const n=new URL(r);for(const o of kt){let a=n[o];Object.defineProperty(n,o,{get(){return e(),a},enumerable:!0,configurable:!0})}return Rt(n),n}function Rt(r){Object.defineProperty(r,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const St="/__data.json";function Ot(r){return r.replace(/\/$/,"")+St}function It(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 ge=window.fetch;window.fetch=(r,e)=>((r instanceof Request?r.method:(e==null?void 0:e.method)||"GET")!=="GET"&&re.delete(Ue(r)),ge(r,e));const re=new Map;function Lt(r,e){const n=Ue(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&&re.set(n,{body:a,init:d,ttl:1e3*Number(t)}),Promise.resolve(new Response(a,d))}return ge(r,e)}function Pt(r,e,n){if(re.size>0){const o=Ue(r,n),a=re.get(o);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);re.delete(o)}}return ge(e,n)}function Ue(r,e){let o=`script[data-sveltekit-fetched][data-url=${JSON.stringify(r instanceof Request?r.url:r)}]`;return(e==null?void 0:e.body)&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&(o+=`[data-hash="${It(e.body)}"]`),o}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function jt(r){const e=[];return{pattern:r==="/"?/^\/$/:new RegExp(`^${Ut(r).map(o=>{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 Se(String.fromCharCode(parseInt(u.slice(2),16)));if(u.startsWith("u+"))return Se(String.fromCharCode(...u.slice(2).split("-").map(P=>parseInt(P,16))));const g=At.exec(u);if(!g)throw new Error(`Invalid param: ${u}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,y,j,k,C]=g;return e.push({name:k,matcher:C,optional:!!y,rest:!!j,chained:j?p===1&&t[0]==="":!1}),j?"(.*?)":y?"([^/]*)?":"([^/]+?)"}return Se(u)}).join("")}).join("")}/?$`),params:e}}function Nt(r){return!/^\([^)]+\)$/.test(r)}function Ut(r){return r.slice(1).split("/").filter(Nt)}function Tt(r,e,n){const o={},a=r.slice(1);let d="";for(let t=0;t<e.length;t+=1){const f=e[t];let u=a[t];if(f.chained&&f.rest&&d&&(u=u?d+"/"+u:d),d="",u===void 0)f.rest&&(o[f.name]="");else{if(f.matcher&&!n[f.matcher](u)){if(f.optional&&f.chained){let p=a.indexOf(void 0,t);if(p===-1){const g=e[t+1];if((g==null?void 0:g.rest)&&g.chained)d=u;else return}for(;p>=t;)a[p]=a[p-1],p-=1;continue}return}o[f.name]=u}}if(!d)return o}function Se(r){return r.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Dt(r,e,n,o){const a=new Set(e);return Object.entries(n).map(([f,[u,p,g]])=>{const{pattern:y,params:j}=jt(f),k={id:f,exec:C=>{const P=y.exec(C);if(P)return Tt(P,j,o)},errors:[1,...g||[]].map(C=>r[C]),layouts:[0,...p||[]].map(t),leaf:d(u)};return k.errors.length=k.layouts.length=Math.max(k.errors.length,k.layouts.length),k});function d(f){const u=f<0;return u&&(f=~f),[u,r[f]]}function t(f){return f===void 0?f:[a.has(f),r[f]]}}function Vt(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=U()},l(t){e&&oe(e.$$.fragment,t),n=U()},m(t,f){e&&J(e,t,f),B(t,n,f),o=!0},p(t,f){const u={};if(f&4&&(u.data=t[2]),f&2&&(u.form=t[1]),a!==(a=t[0][0])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{K(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),J(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&&q(n),e&&K(e,t)}}}function qt(r){let e,n,o;var a=r[0][0];function d(t){return{props:{data:t[2],$$slots:{default:[Gt]},$$scope:{ctx:t}}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=U()},l(t){e&&oe(e.$$.fragment,t),n=U()},m(t,f){e&&J(e,t,f),B(t,n,f),o=!0},p(t,f){const u={};if(f&4&&(u.data=t[2]),f&1051&&(u.$$scope={dirty:f,ctx:t}),a!==(a=t[0][0])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{K(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),J(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&&q(n),e&&K(e,t)}}}function Ct(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=U()},l(t){e&&oe(e.$$.fragment,t),n=U()},m(t,f){e&&J(e,t,f),B(t,n,f),o=!0},p(t,f){const u={};if(f&8&&(u.data=t[3]),f&2&&(u.form=t[1]),a!==(a=t[0][1])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{K(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),J(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&&q(n),e&&K(e,t)}}}function Ft(r){let e,n,o;var a=r[0][1];function d(t){return{props:{data:t[3],$$slots:{default:[Bt]},$$scope:{ctx:t}}}}return a&&(e=G(a,d(r))),{c(){e&&H(e.$$.fragment),n=U()},l(t){e&&oe(e.$$.fragment,t),n=U()},m(t,f){e&&J(e,t,f),B(t,n,f),o=!0},p(t,f){const u={};if(f&8&&(u.data=t[3]),f&1043&&(u.$$scope={dirty:f,ctx:t}),a!==(a=t[0][1])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{K(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),J(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&&q(n),e&&K(e,t)}}}function Bt(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=U()},l(t){e&&oe(e.$$.fragment,t),n=U()},m(t,f){e&&J(e,t,f),B(t,n,f),o=!0},p(t,f){const u={};if(f&16&&(u.data=t[4]),f&2&&(u.form=t[1]),a!==(a=t[0][2])){if(e){Z();const p=e;T(p.$$.fragment,1,0,()=>{K(p,1)}),Q()}a?(e=G(a,d(t)),H(e.$$.fragment),D(e.$$.fragment,1),J(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&&q(n),e&&K(e,t)}}}function Gt(r){let e,n,o,a;const d=[Ft,Ct],t=[];function f(u,p){return u[0][2]?0:1}return e=f(r),n=t[e]=d[e](r),{c(){n.c(),o=U()},l(u){n.l(u),o=U()},m(u,p){t[e].m(u,p),B(u,o,p),a=!0},p(u,p){let g=e;e=f(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&&q(o)}}}function xe(r){let e,n=r[6]&&et(r);return{c(){e=ut("div"),n&&n.c(),this.h()},l(o){e=dt(o,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var a=pt(e);n&&n.l(a),a.forEach(q),this.h()},h(){$e(e,"id","svelte-announcer"),$e(e,"aria-live","assertive"),$e(e,"aria-atomic","true"),M(e,"position","absolute"),M(e,"left","0"),M(e,"top","0"),M(e,"clip","rect(0 0 0 0)"),M(e,"clip-path","inset(50%)"),M(e,"overflow","hidden"),M(e,"white-space","nowrap"),M(e,"width","1px"),M(e,"height","1px")},m(o,a){B(o,e,a),n&&n.m(e,null)},p(o,a){o[6]?n?n.p(o,a):(n=et(o),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(o){o&&q(e),n&&n.d()}}}function et(r){let e;return{c(){e=ht(r[7])},l(n){e=mt(n,r[7])},m(n,o){B(n,e,o)},p(n,o){o&128&&_t(e,n[7])},d(n){n&&q(e)}}}function Ht(r){let e,n,o,a,d;const t=[qt,Vt],f=[];function u(g,y){return g[0][1]?0:1}e=u(r),n=f[e]=t[e](r);let p=r[5]&&xe(r);return{c(){n.c(),o=lt(),p&&p.c(),a=U()},l(g){n.l(g),o=ct(g),p&&p.l(g),a=U()},m(g,y){f[e].m(g,y),B(g,o,y),p&&p.m(g,y),B(g,a,y),d=!0},p(g,[y]){let j=e;e=u(g),e===j?f[e].p(g,y):(Z(),T(f[j],1,1,()=>{f[j]=null}),Q(),n=f[e],n?n.p(g,y):(n=f[e]=t[e](g),n.c()),D(n,1),n.m(o.parentNode,o)),g[5]?p?p.p(g,y):(p=xe(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){f[e].d(g),g&&q(o),p&&p.d(g),g&&q(a)}}}function Jt(r,e,n){let{stores:o}=e,{page:a}=e,{components:d}=e,{form:t}=e,{data_0:f=null}=e,{data_1:u=null}=e,{data_2:p=null}=e;ft(o.page.notify);let g=!1,y=!1,j=null;return Pe(()=>{const k=o.page.subscribe(()=>{g&&(n(6,y=!0),n(7,j=document.title||"untitled page"))});return n(5,g=!0),k}),r.$$set=k=>{"stores"in k&&n(8,o=k.stores),"page"in k&&n(9,a=k.page),"components"in k&&n(0,d=k.components),"form"in k&&n(1,t=k.form),"data_0"in k&&n(2,f=k.data_0),"data_1"in k&&n(3,u=k.data_1),"data_2"in k&&n(4,p=k.data_2)},r.$$.update=()=>{r.$$.dirty&768&&o.page.set(a)},[d,t,f,u,p,g,y,j,o,a]}class Kt extends ot{constructor(e){super(),st(this,e,Jt,Ht,it,{stores:8,page:9,components:0,form:1,data_0:2,data_1:3,data_2:4})}}const Mt="modulepreload",zt=function(r,e){return new URL(r,e).href},tt={},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=zt(d,o),d in tt)return;tt[d]=!0;const t=d.endsWith(".css"),f=t?'[rel="stylesheet"]':"";if(!!o)for(let g=a.length-1;g>=0;g--){const y=a[g];if(y.href===d&&(!t||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${f}`))return;const p=document.createElement("link");if(p.rel=t?"stylesheet":Mt,t||(p.as="script",p.crossOrigin=""),p.href=d,document.head.appendChild(p),t)return new Promise((g,y)=>{p.addEventListener("load",g),p.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${d}`)))})})).then(()=>e())},Wt={},we=[()=>W(()=>import("./chunks/0-f3778743.js"),["./chunks/0-f3778743.js","./chunks/_layout-da46b06b.js","./components/pages/_layout.svelte-e61e621b.js","./chunks/index-d3ab9ad3.js","./chunks/stores-f8006670.js","./chunks/singletons-2f87aac3.js","./chunks/navigation-4db42a0b.js","./assets/navigation-137c4840.css","./chunks/SearchResults-94f55e08.js","./assets/SearchResults-fb8f4adf.css","./assets/_layout-03cc144b.css","./assets/Section-c7611c26.css"],import.meta.url),()=>W(()=>import("./chunks/1-125162df.js"),["./chunks/1-125162df.js","./components/pages/_error.svelte-b80781d3.js","./chunks/index-d3ab9ad3.js","./chunks/stores-f8006670.js","./chunks/singletons-2f87aac3.js","./assets/_error-0d7b58de.css"],import.meta.url),()=>W(()=>import("./chunks/2-826eb613.js"),["./chunks/2-826eb613.js","./components/pages/docs/_layout.svelte-63c02b18.js","./chunks/index-d3ab9ad3.js","./chunks/stores-f8006670.js","./chunks/singletons-2f87aac3.js","./assets/_layout-0b4928f5.css"],import.meta.url),()=>W(()=>import("./chunks/3-eff784df.js"),["./chunks/3-eff784df.js","./chunks/_page-2b4e02d7.js","./components/pages/_page.svelte-58ea14df.js","./chunks/index-d3ab9ad3.js","./assets/_page-7da624ad.css","./assets/Section-c7611c26.css"],import.meta.url),()=>W(()=>import("./chunks/4-cc36f75b.js"),["./chunks/4-cc36f75b.js","./chunks/_page-03bbdf70.js","./chunks/control-f5b05b5f.js"],import.meta.url),()=>W(()=>import("./chunks/5-6f3a63d0.js"),["./chunks/5-6f3a63d0.js","./components/pages/docs/_slug_/_page.svelte-b28cfcf6.js","./chunks/index-d3ab9ad3.js","./chunks/stores-f8006670.js","./chunks/singletons-2f87aac3.js","./chunks/navigation-4db42a0b.js","./assets/navigation-137c4840.css","./chunks/hovers-2ef16240.js","./assets/hovers-7cc24a08.css","./assets/_page-b054ce5e.css","./assets/Section-c7611c26.css"],import.meta.url),()=>W(()=>import("./chunks/6-30c46e89.js"),["./chunks/6-30c46e89.js","./components/pages/faq/_page.svelte-d37c8ad1.js","./chunks/index-d3ab9ad3.js","./chunks/hovers-2ef16240.js","./assets/hovers-7cc24a08.css","./assets/_page-d5a74bfa.css"],import.meta.url),()=>W(()=>import("./chunks/7-471ec06f.js"),["./chunks/7-471ec06f.js","./chunks/_page-4039aba4.js","./components/pages/search/_page.svelte-408d757d.js","./chunks/index-d3ab9ad3.js","./chunks/SearchResults-94f55e08.js","./assets/SearchResults-fb8f4adf.css","./assets/_page-0f278f49.css"],import.meta.url)],Yt=[2],Xt={"/":[3],"/docs":[4,[2]],"/docs/[slug]":[-6,[2]],"/faq":[-7],"/search":[-8]},Zt={handleError:({error:r})=>{console.error(r)}};async function Qt(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 xt=-1,en=-2,tn=-3,nn=-4,rn=-5,an=-6;function on(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===xt)return;if(a===tn)return NaN;if(a===nn)return 1/0;if(a===rn)return-1/0;if(a===an)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 y=1;y<t.length;y+=1)u.add(o(t[y]));break;case"Map":const p=new Map;n[a]=p;for(let y=1;y<t.length;y+=2)p.set(o(t[y]),o(t[y+1]));break;case"RegExp":n[a]=new RegExp(t[1],t[2]);break;case"Object":n[a]=Object(t[1]);break;case"BigInt":n[a]=BigInt(t[1]);break;case"null":const g=Object.create(null);n[a]=g;for(let y=1;y<t.length;y+=2)g[t[y]]=o(t[y+1]);break}else{const f=new Array(t.length);n[a]=f;for(let u=0;u<t.length;u+=1){const p=t[u];p!==en&&(f[u]=o(p))}}else{const f={};n[a]=f;for(const u in t){const p=t[u];f[u]=o(p)}}return n[a]}return o(0)}const Oe=Dt(we,Yt,Xt,Wt),je=we[0],Ne=we[1];je();Ne();let ae={};try{ae=JSON.parse(sessionStorage[rt])}catch{}function Ie(r){ae[r]=_e()}function sn({target:r,base:e}){var Ke;const n=document.documentElement,o=[];let a=null;const d={before_navigate:[],after_navigate:[]};let t={branch:[],error:null,url:null},f=!1,u=!1,p=!0,g=!1,y=!1,j=!1,k=!1,C,P=(Ke=history.state)==null?void 0:Ke[z];P||(P=Date.now(),history.replaceState({...history.state,[z]:P},"",location.href));const ye=ae[P];ye&&(history.scrollRestoration="manual",scrollTo(ye.x,ye.y));let Y,Te,se;async function De(){se=se||Promise.resolve(),await se,se=null;const s=new URL(location.href),i=ce(s,!0);a=null,await qe(i,s,[])}async function be(s,{noScroll:i=!1,replaceState:c=!1,keepFocus:l=!1,state:m={},invalidateAll:h=!1},_,v){return typeof s=="string"&&(s=new URL(s,We(document))),fe({url:s,scroll:i?_e():null,keepfocus:l,redirect_chain:_,details:{state:m,replaceState:c},nav_token:v,accepted:()=>{h&&(k=!0)},blocked:()=>{},type:"goto"})}async function Ve(s){const i=ce(s,!1);if(!i)throw new Error(`Attempted to preload a URL that does not belong to this app: ${s}`);return a={id:i.id,promise:Be(i).then(c=>(c.type==="loaded"&&c.state.error&&(a=null),c))},a.promise}async function ie(...s){const c=Oe.filter(l=>s.some(m=>l.exec(m))).map(l=>Promise.all([...l.layouts,l.leaf].map(m=>m==null?void 0:m[1]())));await Promise.all(c)}async function qe(s,i,c,l,m={},h){var v,b;Te=m;let _=s&&await Be(s);if(_||(_=await Je(i,{id:null},await ne(new Error(`Not found: ${i.pathname}`),{url:i,params:{},route:{id:null}}),404)),i=(s==null?void 0:s.url)||i,Te!==m)return!1;if(_.type==="redirect")if(c.length>10||c.includes(i.pathname))_=await le({status:500,error:await ne(new Error("Redirect loop"),{url:i,params:{},route:{id:null}}),url:i,route:{id:null}});else return be(new URL(_.location,i).href,{},[...c,i.pathname],m),!1;else((b=(v=_.props)==null?void 0:v.page)==null?void 0:b.status)>=400&&await X.updated.check()&&await ue(i);if(o.length=0,k=!1,g=!0,l&&l.details){const{details:w}=l,S=w.replaceState?0:1;w.state[z]=P+=S,history[w.replaceState?"replaceState":"pushState"](w.state,"",i)}if(a=null,u){t=_.state,_.props.page&&(_.props.page.url=i);const w=me();C.$set(_.props),w()}else Ce(_);if(l){const{scroll:w,keepfocus:S}=l;if(S||Le(),await de(),p){const O=i.hash&&document.getElementById(i.hash.slice(1));w?scrollTo(w.x,w.y):O?O.scrollIntoView():scrollTo(0,0)}}else await de();p=!0,_.props.page&&(Y=_.props.page),h&&h(),g=!1}function Ce(s){var m;t=s.state;const i=document.querySelector("style[data-sveltekit]");i&&i.remove(),Y=s.props.page;const c=me();C=new Kt({target:r,props:{...s.props,stores:X},hydrate:!0}),c();const l={from:null,to:he("to",{params:t.params,route:{id:((m=t.route)==null?void 0:m.id)??null},url:new URL(location.href)}),willUnload:!1,type:"enter"};d.after_navigate.forEach(h=>h(l)),u=!0}async function ee({url:s,params:i,branch:c,status:l,error:m,route:h,form:_}){const v=c.filter(Boolean);let b="never";for(const R of c)(R==null?void 0:R.slash)!==void 0&&(b=R.slash);s.pathname=bt(s.pathname,b),s.search=s.search;const w={type:"loaded",state:{url:s,params:i,branch:c,error:m,route:h},props:{components:v.map(R=>R.node.component)}};_!==void 0&&(w.props.form=_);let S={},O=!Y;for(let R=0;R<v.length;R+=1){const E=v[R];S={...S,...E.data},(O||!t.branch.some(A=>A===E))&&(w.props[`data_${R}`]=S,O=O||Object.keys(E.data??{}).length>0)}if(O||(O=Object.keys(Y.data).length!==Object.keys(S).length),!t.url||s.href!==t.url.href||t.error!==m||_!==void 0||O){w.props.page={error:m,params:i,route:h,status:l,url:new URL(s),form:_??null,data:O?S:Y.data},Object.defineProperty(w.props.page,"routeId",{get(){throw new Error("$page.routeId has been replaced by $page.route.id")},enumerable:!1});const R=(E,A)=>{Object.defineProperty(w.props.page,E,{get:()=>{throw new Error(`$page.${E} has been replaced by $page.url.${A}`)}})};R("origin","origin"),R("path","pathname"),R("query","searchParams")}return w}async function ve({loader:s,parent:i,url:c,params:l,route:m,server_data_node:h}){var w,S,O;let _=null;const v={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1},b=await s();if((w=b.shared)!=null&&w.load){let F=function(...E){for(const A of E){const{href:V}=new URL(A,c);v.dependencies.add(V)}};const R={route:{get id(){return v.route=!0,m.id}},params:new Proxy(l,{get:(E,A)=>(v.params.add(A),E[A])}),data:(h==null?void 0:h.data)??null,url:$t(c,()=>{v.url=!0}),async fetch(E,A){let V;E instanceof Request?(V=E.url,A={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,...A}):V=E;const $=new URL(V,c).href;return F($),u?Pt(V,$,A):Lt(V,A)},setHeaders:()=>{},depends:F,parent(){return v.parent=!0,i()}};Object.defineProperties(R,{props:{get(){throw new Error("@migration task: Replace `props` with `data` stuff https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292693")},enumerable:!1},session:{get(){throw new Error("session is no longer available. See https://github.com/sveltejs/kit/discussions/5883")},enumerable:!1},stuff:{get(){throw new Error("@migration task: Remove stuff https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292693")},enumerable:!1},routeId:{get(){throw new Error("routeId has been replaced by route.id")},enumerable:!1}}),_=await b.shared.load.call(null,R)??null,_=_?await Qt(_):null}return{node:b,loader:s,server:h,shared:(S=b.shared)!=null&&S.load?{type:"data",data:_,uses:v}:null,data:_??(h==null?void 0:h.data)??null,slash:((O=b.shared)==null?void 0:O.trailingSlash)??(h==null?void 0:h.slash)}}function Fe(s,i,c,l,m){if(k)return!0;if(!l)return!1;if(l.parent&&s||l.route&&i||l.url&&c)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 Ee(s,i){return(s==null?void 0:s.type)==="data"?{type:"data",data:s.data,uses:{dependencies:new Set(s.uses.dependencies??[]),params:new Set(s.uses.params??[]),parent:!!s.uses.parent,route:!!s.uses.route,url:!!s.uses.url},slash:s.slash}:(s==null?void 0:s.type)==="skip"?i??null:null}async function Be({id:s,invalidating:i,url:c,params:l,route:m}){if((a==null?void 0:a.id)===s)return a.promise;const{errors:h,layouts:_,leaf:v}=m,b=[..._,v];h.forEach($=>$==null?void 0:$().catch(()=>{})),b.forEach($=>$==null?void 0:$[1]().catch(()=>{}));let w=null;const S=t.url?s!==t.url.pathname+t.url.search:!1,O=t.route?s!==t.route.id:!1,F=b.reduce(($,L,N)=>{var te;const I=t.branch[N],x=!!(L!=null&&L[0])&&((I==null?void 0:I.loader)!==L[1]||Fe($.some(Boolean),O,S,(te=I.server)==null?void 0:te.uses,l));return $.push(x),$},[]);if(F.some(Boolean)){try{w=await nt(c,F)}catch($){return le({status:500,error:await ne($,{url:c,params:l,route:{id:m.id}}),url:c,route:m})}if(w.type==="redirect")return w}const R=w==null?void 0:w.nodes;let E=!1;const A=b.map(async($,L)=>{var te;if(!$)return;const N=t.branch[L],I=R==null?void 0:R[L];if((!I||I.type==="skip")&&$[1]===(N==null?void 0:N.loader)&&!Fe(E,O,S,(te=N.shared)==null?void 0:te.uses,l))return N;if(E=!0,(I==null?void 0:I.type)==="error")throw I;return ve({loader:$[1],url:c,params:l,route:m,parent:async()=>{var ze;const Me={};for(let ke=0;ke<L;ke+=1)Object.assign(Me,(ze=await A[ke])==null?void 0:ze.data);return Me},server_data_node:Ee(I===void 0&&$[0]?{type:"skip"}:I??null,N==null?void 0:N.server)})});for(const $ of A)$.catch(()=>{});const V=[];for(let $=0;$<b.length;$+=1)if(b[$])try{V.push(await A[$])}catch(L){if(L instanceof Qe)return{type:"redirect",location:L.location};let N=500,I;R!=null&&R.includes(L)?(N=L.status??N,I=L.error):L instanceof Ae?(N=L.status,I=L.body):I=await ne(L,{params:l,url:c,route:{id:m.id}});const x=await Ge($,V,h);return x?await ee({url:c,params:l,branch:V.slice(0,x.idx).concat(x.node),status:N,error:I,route:m}):await Je(c,{id:m.id},I,N)}else V.push(void 0);return await ee({url:c,params:l,branch:V,status:200,error:null,route:m,form:i?void 0:null})}async function Ge(s,i,c){for(;s--;)if(c[s]){let l=s;for(;!i[l];)l-=1;try{return{idx:l+1,node:{node:await c[s](),loader:c[s],data:{},server:null,shared:null}}}catch{continue}}}async function le({status:s,error:i,url:c,route:l}){const m={},h=await je();let _=null;if(h.server)try{const w=await nt(c,[!0]);if(w.type!=="data"||w.nodes[0]&&w.nodes[0].type!=="data")throw 0;_=w.nodes[0]??null}catch{(c.origin!==location.origin||c.pathname!==location.pathname||f)&&await ue(c)}const v=await ve({loader:je,url:c,params:m,route:l,parent:()=>Promise.resolve({}),server_data_node:Ee(_)}),b={node:await Ne(),loader:Ne,shared:null,server:null,data:null};return await ee({url:c,params:m,branch:[v,b],status:s,error:i,route:null})}function ce(s,i){if(Xe(s,e))return;const c=vt(s.pathname.slice(e.length)||"/");for(const l of Oe){const m=l.exec(c);if(m)return{id:s.pathname+s.search,invalidating:i,route:l,params:Et(m),url:s}}}function He({url:s,type:i,intent:c,delta:l}){var v,b;let m=!1;const h={from:he("from",{params:t.params,route:{id:((v=t.route)==null?void 0:v.id)??null},url:t.url}),to:he("to",{params:(c==null?void 0:c.params)??null,route:{id:((b=c==null?void 0:c.route)==null?void 0:b.id)??null},url:s}),willUnload:!c,type:i};l!==void 0&&(h.delta=l);const _={...h,cancel:()=>{m=!0}};return y||d.before_navigate.forEach(w=>w(_)),m?null:h}async function fe({url:s,scroll:i,keepfocus:c,redirect_chain:l,details:m,type:h,delta:_,nav_token:v,accepted:b,blocked:w}){const S=ce(s,!1),O=He({url:s,type:h,delta:_,intent:S});if(!O){w();return}Ie(P),b(),y=!0,u&&X.navigating.set(O),await qe(S,s,l,{scroll:i,keepfocus:c,details:m},v,()=>{y=!1,d.after_navigate.forEach(F=>F(O)),X.navigating.set(null)})}async function Je(s,i,c,l){return s.origin===location.origin&&s.pathname===location.pathname&&!f?await le({status:l,error:c,url:s,route:i}):await ue(s)}function ue(s){return location.href=s.href,new Promise(()=>{})}function at(){let s;n.addEventListener("mousemove",h=>{const _=h.target;clearTimeout(s),s=setTimeout(()=>{l(_,2)},20)});function i(h){l(h.composedPath()[0],1)}n.addEventListener("mousedown",i),n.addEventListener("touchstart",i,{passive:!0});const c=new IntersectionObserver(h=>{for(const _ of h)_.isIntersecting&&(ie(new URL(_.target.href).pathname),c.unobserve(_.target))},{threshold:0});function l(h,_){const v=Ye(h,n);if(!v)return;const{url:b,external:w}=Re(v,e);if(w)return;const S=pe(v);S.reload||(_<=S.preload_data?Ve(b):_<=S.preload_code&&ie(b.pathname))}function m(){c.disconnect();for(const h of n.querySelectorAll("a")){const{url:_,external:v}=Re(h,e);if(v)continue;const b=pe(h);b.reload||(b.preload_code===Ze.viewport&&c.observe(h),b.preload_code===Ze.eager&&ie(_.pathname))}}d.after_navigate.push(m),m()}return{after_navigate:s=>{Pe(()=>(d.after_navigate.push(s),()=>{const i=d.after_navigate.indexOf(s);d.after_navigate.splice(i,1)}))},before_navigate:s=>{Pe(()=>(d.before_navigate.push(s),()=>{const i=d.before_navigate.indexOf(s);d.before_navigate.splice(i,1)}))},disable_scroll_handling:()=>{(g||!u)&&(p=!1)},goto:(s,i={})=>{if("keepfocus"in i&&!("keepFocus"in i))throw new Error("`keepfocus` has been renamed to `keepFocus` (note the difference in casing)");if("noscroll"in i&&!("noScroll"in i))throw new Error("`noscroll` has been renamed to `noScroll` (note the difference in casing)");return be(s,i,[])},invalidate:s=>{if(s===void 0)throw new Error("`invalidate()` (with no arguments) has been replaced by `invalidateAll()`");if(typeof s=="function")o.push(s);else{const{href:i}=new URL(s,location.href);o.push(c=>c.href===i)}return De()},invalidateAll:()=>(k=!0,De()),preload_data:async s=>{const i=new URL(s,We(document));await Ve(i)},preload_code:ie,apply_action:async s=>{if(s.type==="error"){const i=new URL(location.href),{branch:c,route:l}=t;if(!l)return;const m=await Ge(t.branch.length,c,l.errors);if(m){const h=await ee({url:i,params:t.params,branch:c.slice(0,m.idx).concat(m.node),status:s.status??500,error:s.error,route:l});t=h.state;const _=me();C.$set(h.props),_(),de().then(Le)}}else if(s.type==="redirect")be(s.location,{invalidateAll:!0},[]);else{const i={form:s.data,page:{...Y,form:s.data,status:s.status}},c=me();C.$set(i),c(),s.type==="success"&&de().then(Le)}},_start_router:()=>{var s;history.scrollRestoration="manual",addEventListener("beforeunload",i=>{var l;let c=!1;if(!y){const m={from:he("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:()=>c=!0};d.before_navigate.forEach(h=>h(m))}c?(i.preventDefault(),i.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){Ie(P);try{sessionStorage[rt]=JSON.stringify(ae)}catch{}}}),(s=navigator.connection)!=null&&s.saveData||at(),n.addEventListener("click",i=>{if(i.button||i.which!==1||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.defaultPrevented)return;const c=Ye(i.composedPath()[0],n);if(!c)return;const{url:l,external:m,has:h}=Re(c,e),_=pe(c);if(!l||!(c instanceof SVGAElement)&&l.protocol!==location.protocol&&!(l.protocol==="https:"||l.protocol==="http:")||h.download)return;if(m||_.reload){He({url:l,type:"link"})||i.preventDefault(),y=!0;return}const[b,w]=l.href.split("#");if(w!==void 0&&b===location.href.split("#")[0]){j=!0,Ie(P),t.url=l,X.page.set({...Y,url:l}),X.page.notify();return}fe({url:l,scroll:_.noscroll?_e():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:l.href===location.href},accepted:()=>i.preventDefault(),blocked:()=>i.preventDefault(),type:"link"})}),n.addEventListener("submit",i=>{var b;if(i.defaultPrevented)return;const c=HTMLFormElement.prototype.cloneNode.call(i.target),l=i.submitter;if(((l==null?void 0:l.formMethod)||c.method)!=="get")return;const h=new URL(((b=i.submitter)==null?void 0:b.hasAttribute("formaction"))&&(l==null?void 0:l.formAction)||c.action);if(Xe(h,e))return;const{noscroll:_,reload:v}=pe(i.target);v||(i.preventDefault(),i.stopPropagation(),h.search=new URLSearchParams(new FormData(i.target)).toString(),fe({url:h,scroll:_?_e():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:!1},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"}))}),addEventListener("popstate",i=>{var c;if((c=i.state)!=null&&c[z]){if(i.state[z]===P)return;const l=i.state[z]-P;fe({url:new URL(location.href),scroll:ae[i.state[z]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{P=i.state[z]},blocked:()=>{history.go(-l)},type:"popstate",delta:l})}}),addEventListener("hashchange",()=>{j&&(j=!1,history.replaceState({...history.state,[z]:++P},"",location.href))});for(const i of document.querySelectorAll("link"))i.rel==="icon"&&(i.href=i.href);addEventListener("pageshow",i=>{i.persisted&&X.navigating.set(null)})},_hydrate:async({status:s=200,error:i,node_ids:c,params:l,route:m,data:h,form:_})=>{f=!0;const v=new URL(location.href);({params:l={},route:m={id:null}}=ce(v,!1)||{});let b;try{const w=c.map(async(S,O)=>{const F=h[O];return ve({loader:we[S],url:v,params:l,route:m,parent:async()=>{const R={};for(let E=0;E<O;E+=1)Object.assign(R,(await w[E]).data);return R},server_data_node:Ee(F)})});b=await ee({url:v,params:l,branch:await Promise.all(w),status:s,error:i,form:_,route:Oe.find(({id:S})=>S===m.id)??null})}catch(w){if(w instanceof Qe){await ue(new URL(w.location,location.href));return}b=await le({status:w instanceof Ae?w.status:500,error:await ne(w,{url:v,params:l,route:m}),url:v,route:m})}Ce(b)}}}async function nt(r,e){var d;const n=new URL(r);n.pathname=Ot(r.pathname),n.searchParams.append("x-sveltekit-invalidated",e.map(t=>t?"1":"").join("_"));const o=await ge(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=on(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 Ae?r.body:Zt.handleError({error:r,event:e})??{message:e.route.id!=null?"Internal Error":"Not Found"}}const ln=["hash","href","host","hostname","origin","pathname","port","protocol","search","searchParams","toString","toJSON"];function he(r,e){for(const n of ln)Object.defineProperty(e,n,{get(){throw new Error(`The navigation shape changed - ${r}.${n} should now be ${r}.url.${n}`)},enumerable:!1});return Object.defineProperty(e,"routeId",{get(){throw new Error(`The navigation shape changed - ${r}.routeId should now be ${r}.route.id`)},enumerable:!1}),e}function me(){return()=>{}}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 dn({env:r,hydrate:e,paths:n,target:o,version:a}){gt(n),yt(a);const d=sn({target:o,base:n.base});wt({client:d}),e?await d._hydrate(e):d.goto(location.href,{replaceState:!0}),d._start_router()}export{dn as start};
