var he=Object.defineProperty,de=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var Z=(o,e,t)=>e in o?he(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,b=(o,e)=>{for(var t in e||(e={}))ee.call(e,t)&&Z(o,t,e[t]);if(B)for(var t of B(e))te.call(e,t)&&Z(o,t,e[t]);return o},W=(o,e)=>de(o,pe(e));var re=(o,e)=>{var t={};for(var i in o)ee.call(o,i)&&e.indexOf(i)<0&&(t[i]=o[i]);if(o!=null&&B)for(var i of B(o))e.indexOf(i)<0&&te.call(o,i)&&(t[i]=o[i]);return t};import{S as me,i as ge,s as ve,e as we,c as be,a as Ee,d as R,b as G,f as D,g as A,t as $e,h as ye,j as ke,k as Re,l as E,m as Le,n as x,o as $,p as U,q as y,r as Oe,u as Ae,v as F,w as P,x as C,y as T,z as j,A as q,B as V,C as z,D as Y,E as se}from"./chunks/vendor-hf-doc-builder.js";import{s as Pe,b as Te}from"./chunks/paths-hf-doc-builder.js";function Ve(o){let e,t,i;const l=[o[1]||{}];var n=o[0][0];function c(r){let a={};for(let u=0;u<l.length;u+=1)a=z(a,l[u]);return{props:a}}return n&&(e=new n(c())),{c(){e&&P(e.$$.fragment),t=E()},l(r){e&&C(e.$$.fragment,r),t=E()},m(r,a){e&&T(e,r,a),A(r,t,a),i=!0},p(r,a){const u=a&2?j(l,[q(r[1]||{})]):{};if(n!==(n=r[0][0])){if(e){x();const _=e;$(_.$$.fragment,1,0,()=>{V(_,1)}),U()}n?(e=new n(c()),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else n&&e.$set(u)},i(r){i||(e&&y(e.$$.fragment,r),i=!0)},o(r){e&&$(e.$$.fragment,r),i=!1},d(r){r&&R(t),e&&V(e,r)}}}function Ie(o){let e,t,i;const l=[o[1]||{}];var n=o[0][0];function c(r){let a={$$slots:{default:[Ue]},$$scope:{ctx:r}};for(let u=0;u<l.length;u+=1)a=z(a,l[u]);return{props:a}}return n&&(e=new n(c(o))),{c(){e&&P(e.$$.fragment),t=E()},l(r){e&&C(e.$$.fragment,r),t=E()},m(r,a){e&&T(e,r,a),A(r,t,a),i=!0},p(r,a){const u=a&2?j(l,[q(r[1]||{})]):{};if(a&525&&(u.$$scope={dirty:a,ctx:r}),n!==(n=r[0][0])){if(e){x();const _=e;$(_.$$.fragment,1,0,()=>{V(_,1)}),U()}n?(e=new n(c(r)),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else n&&e.$set(u)},i(r){i||(e&&y(e.$$.fragment,r),i=!0)},o(r){e&&$(e.$$.fragment,r),i=!1},d(r){r&&R(t),e&&V(e,r)}}}function De(o){let e,t,i;const l=[o[2]||{}];var n=o[0][1];function c(r){let a={};for(let u=0;u<l.length;u+=1)a=z(a,l[u]);return{props:a}}return n&&(e=new n(c())),{c(){e&&P(e.$$.fragment),t=E()},l(r){e&&C(e.$$.fragment,r),t=E()},m(r,a){e&&T(e,r,a),A(r,t,a),i=!0},p(r,a){const u=a&4?j(l,[q(r[2]||{})]):{};if(n!==(n=r[0][1])){if(e){x();const _=e;$(_.$$.fragment,1,0,()=>{V(_,1)}),U()}n?(e=new n(c()),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else n&&e.$set(u)},i(r){i||(e&&y(e.$$.fragment,r),i=!0)},o(r){e&&$(e.$$.fragment,r),i=!1},d(r){r&&R(t),e&&V(e,r)}}}function Se(o){let e,t,i;const l=[o[2]||{}];var n=o[0][1];function c(r){let a={$$slots:{default:[xe]},$$scope:{ctx:r}};for(let u=0;u<l.length;u+=1)a=z(a,l[u]);return{props:a}}return n&&(e=new n(c(o))),{c(){e&&P(e.$$.fragment),t=E()},l(r){e&&C(e.$$.fragment,r),t=E()},m(r,a){e&&T(e,r,a),A(r,t,a),i=!0},p(r,a){const u=a&4?j(l,[q(r[2]||{})]):{};if(a&521&&(u.$$scope={dirty:a,ctx:r}),n!==(n=r[0][1])){if(e){x();const _=e;$(_.$$.fragment,1,0,()=>{V(_,1)}),U()}n?(e=new n(c(r)),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else n&&e.$set(u)},i(r){i||(e&&y(e.$$.fragment,r),i=!0)},o(r){e&&$(e.$$.fragment,r),i=!1},d(r){r&&R(t),e&&V(e,r)}}}function xe(o){let e,t,i;const l=[o[3]||{}];var n=o[0][2];function c(r){let a={};for(let u=0;u<l.length;u+=1)a=z(a,l[u]);return{props:a}}return n&&(e=new n(c())),{c(){e&&P(e.$$.fragment),t=E()},l(r){e&&C(e.$$.fragment,r),t=E()},m(r,a){e&&T(e,r,a),A(r,t,a),i=!0},p(r,a){const u=a&8?j(l,[q(r[3]||{})]):{};if(n!==(n=r[0][2])){if(e){x();const _=e;$(_.$$.fragment,1,0,()=>{V(_,1)}),U()}n?(e=new n(c()),P(e.$$.fragment),y(e.$$.fragment,1),T(e,t.parentNode,t)):e=null}else n&&e.$set(u)},i(r){i||(e&&y(e.$$.fragment,r),i=!0)},o(r){e&&$(e.$$.fragment,r),i=!1},d(r){r&&R(t),e&&V(e,r)}}}function Ue(o){let e,t,i,l;const n=[Se,De],c=[];function r(a,u){return a[0][2]?0:1}return e=r(o),t=c[e]=n[e](o),{c(){t.c(),i=E()},l(a){t.l(a),i=E()},m(a,u){c[e].m(a,u),A(a,i,u),l=!0},p(a,u){let _=e;e=r(a),e===_?c[e].p(a,u):(x(),$(c[_],1,1,()=>{c[_]=null}),U(),t=c[e],t?t.p(a,u):(t=c[e]=n[e](a),t.c()),y(t,1),t.m(i.parentNode,i))},i(a){l||(y(t),l=!0)},o(a){$(t),l=!1},d(a){c[e].d(a),a&&R(i)}}}function ie(o){let e,t=o[5]&&ne(o);return{c(){e=we("div"),t&&t.c(),this.h()},l(i){e=be(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var l=Ee(e);t&&t.l(l),l.forEach(R),this.h()},h(){G(e,"id","svelte-announcer"),G(e,"aria-live","assertive"),G(e,"aria-atomic","true"),D(e,"position","absolute"),D(e,"left","0"),D(e,"top","0"),D(e,"clip","rect(0 0 0 0)"),D(e,"clip-path","inset(50%)"),D(e,"overflow","hidden"),D(e,"white-space","nowrap"),D(e,"width","1px"),D(e,"height","1px")},m(i,l){A(i,e,l),t&&t.m(e,null)},p(i,l){i[5]?t?t.p(i,l):(t=ne(i),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(i){i&&R(e),t&&t.d()}}}function ne(o){let e;return{c(){e=$e(o[6])},l(t){e=ye(t,o[6])},m(t,i){A(t,e,i)},p(t,i){i&64&&ke(e,t[6])},d(t){t&&R(e)}}}function Ne(o){let e,t,i,l,n;const c=[Ie,Ve],r=[];function a(_,d){return _[0][1]?0:1}e=a(o),t=r[e]=c[e](o);let u=o[4]&&ie(o);return{c(){t.c(),i=Re(),u&&u.c(),l=E()},l(_){t.l(_),i=Le(_),u&&u.l(_),l=E()},m(_,d){r[e].m(_,d),A(_,i,d),u&&u.m(_,d),A(_,l,d),n=!0},p(_,[d]){let f=e;e=a(_),e===f?r[e].p(_,d):(x(),$(r[f],1,1,()=>{r[f]=null}),U(),t=r[e],t?t.p(_,d):(t=r[e]=c[e](_),t.c()),y(t,1),t.m(i.parentNode,i)),_[4]?u?u.p(_,d):(u=ie(_),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},i(_){n||(y(t),n=!0)},o(_){$(t),n=!1},d(_){r[e].d(_),_&&R(i),u&&u.d(_),_&&R(l)}}}function Ce(o,e,t){let{stores:i}=e,{page:l}=e,{components:n}=e,{props_0:c=null}=e,{props_1:r=null}=e,{props_2:a=null}=e;Oe("__svelte__",i),Ae(i.page.notify);let u=!1,_=!1,d=null;return F(()=>{const f=i.page.subscribe(()=>{u&&(t(5,_=!0),t(6,d=document.title||"untitled page"))});return t(4,u=!0),f}),o.$$set=f=>{"stores"in f&&t(7,i=f.stores),"page"in f&&t(8,l=f.page),"components"in f&&t(0,n=f.components),"props_0"in f&&t(1,c=f.props_0),"props_1"in f&&t(2,r=f.props_1),"props_2"in f&&t(3,a=f.props_2)},o.$$.update=()=>{o.$$.dirty&384&&i.page.set(l)},[n,c,r,a,u,_,d,i,l]}class je extends me{constructor(e){super();ge(this,e,Ce,Ne,ve,{stores:7,page:8,components:0,props_0:1,props_1:2,props_2:3})}}const qe="modulepreload",ae={},ze="/docs/course/pr_362/ru/_app/",h=function(e,t){return!t||t.length===0?e():Promise.all(t.map(i=>{if(i=`${ze}${i}`,i in ae)return;ae[i]=!0;const l=i.endsWith(".css"),n=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${n}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":qe,l||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),l)return new Promise((r,a)=>{c.addEventListener("load",r),c.addEventListener("error",a)})})).then(()=>e())},s=[()=>h(()=>import("./pages/__layout.svelte-hf-doc-builder.js"),["pages/__layout.svelte-hf-doc-builder.js","assets/pages/__layout.svelte-hf-doc-builder.css","chunks/vendor-hf-doc-builder.js","chunks/paths-hf-doc-builder.js"]),()=>h(()=>import("./error.svelte-hf-doc-builder.js"),["error.svelte-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter0/1.mdx-hf-doc-builder.js"),["pages/chapter0/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/1.mdx-hf-doc-builder.js"),["pages/chapter1/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/2.mdx-hf-doc-builder.js"),["pages/chapter1/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/3.mdx-hf-doc-builder.js"),["pages/chapter1/3.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/4.mdx-hf-doc-builder.js"),["pages/chapter1/4.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/5.mdx-hf-doc-builder.js"),["pages/chapter1/5.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/6.mdx-hf-doc-builder.js"),["pages/chapter1/6.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/7.mdx-hf-doc-builder.js"),["pages/chapter1/7.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/8.mdx-hf-doc-builder.js"),["pages/chapter1/8.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter1/9.mdx-hf-doc-builder.js"),["pages/chapter1/9.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter2/1.mdx-hf-doc-builder.js"),["pages/chapter2/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter2/2.mdx-hf-doc-builder.js"),["pages/chapter2/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter2/3.mdx-hf-doc-builder.js"),["pages/chapter2/3.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter2/7.mdx-hf-doc-builder.js"),["pages/chapter2/7.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/3_tf.mdx-hf-doc-builder.js"),["pages/chapter3/3_tf.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/1.mdx-hf-doc-builder.js"),["pages/chapter3/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/2.mdx-hf-doc-builder.js"),["pages/chapter3/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/3.mdx-hf-doc-builder.js"),["pages/chapter3/3.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/4.mdx-hf-doc-builder.js"),["pages/chapter3/4.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/5.mdx-hf-doc-builder.js"),["pages/chapter3/5.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter3/6.mdx-hf-doc-builder.js"),["pages/chapter3/6.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/Question-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter4/1.mdx-hf-doc-builder.js"),["pages/chapter4/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter4/2.mdx-hf-doc-builder.js"),["pages/chapter4/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter4/3.mdx-hf-doc-builder.js"),["pages/chapter4/3.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter4/4.mdx-hf-doc-builder.js"),["pages/chapter4/4.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter4/5.mdx-hf-doc-builder.js"),["pages/chapter4/5.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter4/6.mdx-hf-doc-builder.js"),["pages/chapter4/6.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/Question-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/1.mdx-hf-doc-builder.js"),["pages/chapter5/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/2.mdx-hf-doc-builder.js"),["pages/chapter5/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/3.mdx-hf-doc-builder.js"),["pages/chapter5/3.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/4.mdx-hf-doc-builder.js"),["pages/chapter5/4.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/6.mdx-hf-doc-builder.js"),["pages/chapter5/6.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/7.mdx-hf-doc-builder.js"),["pages/chapter5/7.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter5/8.mdx-hf-doc-builder.js"),["pages/chapter5/8.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/Question-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter6/1.mdx-hf-doc-builder.js"),["pages/chapter6/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter6/2.mdx-hf-doc-builder.js"),["pages/chapter6/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/4_tf.mdx-hf-doc-builder.js"),["pages/chapter8/4_tf.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/1.mdx-hf-doc-builder.js"),["pages/chapter8/1.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/2.mdx-hf-doc-builder.js"),["pages/chapter8/2.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/3.mdx-hf-doc-builder.js"),["pages/chapter8/3.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/4.mdx-hf-doc-builder.js"),["pages/chapter8/4.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/FrameworkSwitchCourse-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/5.mdx-hf-doc-builder.js"),["pages/chapter8/5.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/Tip-hf-doc-builder.js","chunks/Youtube-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/6.mdx-hf-doc-builder.js"),["pages/chapter8/6.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js"]),()=>h(()=>import("./pages/chapter8/7.mdx-hf-doc-builder.js"),["pages/chapter8/7.mdx-hf-doc-builder.js","chunks/vendor-hf-doc-builder.js","chunks/IconCopyLink-hf-doc-builder.js","chunks/CodeBlock-hf-doc-builder.js","chunks/CourseFloatingBanner-hf-doc-builder.js","chunks/DocNotebookDropdown-hf-doc-builder.js","chunks/Question-hf-doc-builder.js"])],Je=[[/^\/chapter0\/1\/?$/,[s[0],s[2]],[s[1]]],[/^\/chapter1\/1\/?$/,[s[0],s[3]],[s[1]]],[/^\/chapter1\/2\/?$/,[s[0],s[4]],[s[1]]],[/^\/chapter1\/3\/?$/,[s[0],s[5]],[s[1]]],[/^\/chapter1\/4\/?$/,[s[0],s[6]],[s[1]]],[/^\/chapter1\/5\/?$/,[s[0],s[7]],[s[1]]],[/^\/chapter1\/6\/?$/,[s[0],s[8]],[s[1]]],[/^\/chapter1\/7\/?$/,[s[0],s[9]],[s[1]]],[/^\/chapter1\/8\/?$/,[s[0],s[10]],[s[1]]],[/^\/chapter1\/9\/?$/,[s[0],s[11]],[s[1]]],[/^\/chapter2\/1\/?$/,[s[0],s[12]],[s[1]]],[/^\/chapter2\/2\/?$/,[s[0],s[13]],[s[1]]],[/^\/chapter2\/3\/?$/,[s[0],s[14]],[s[1]]],[/^\/chapter2\/7\/?$/,[s[0],s[15]],[s[1]]],[/^\/chapter3\/3_tf\/?$/,[s[0],s[16]],[s[1]]],[/^\/chapter3\/1\/?$/,[s[0],s[17]],[s[1]]],[/^\/chapter3\/2\/?$/,[s[0],s[18]],[s[1]]],[/^\/chapter3\/3\/?$/,[s[0],s[19]],[s[1]]],[/^\/chapter3\/4\/?$/,[s[0],s[20]],[s[1]]],[/^\/chapter3\/5\/?$/,[s[0],s[21]],[s[1]]],[/^\/chapter3\/6\/?$/,[s[0],s[22]],[s[1]]],[/^\/chapter4\/1\/?$/,[s[0],s[23]],[s[1]]],[/^\/chapter4\/2\/?$/,[s[0],s[24]],[s[1]]],[/^\/chapter4\/3\/?$/,[s[0],s[25]],[s[1]]],[/^\/chapter4\/4\/?$/,[s[0],s[26]],[s[1]]],[/^\/chapter4\/5\/?$/,[s[0],s[27]],[s[1]]],[/^\/chapter4\/6\/?$/,[s[0],s[28]],[s[1]]],[/^\/chapter5\/1\/?$/,[s[0],s[29]],[s[1]]],[/^\/chapter5\/2\/?$/,[s[0],s[30]],[s[1]]],[/^\/chapter5\/3\/?$/,[s[0],s[31]],[s[1]]],[/^\/chapter5\/4\/?$/,[s[0],s[32]],[s[1]]],[/^\/chapter5\/6\/?$/,[s[0],s[33]],[s[1]]],[/^\/chapter5\/7\/?$/,[s[0],s[34]],[s[1]]],[/^\/chapter5\/8\/?$/,[s[0],s[35]],[s[1]]],[/^\/chapter6\/1\/?$/,[s[0],s[36]],[s[1]]],[/^\/chapter6\/2\/?$/,[s[0],s[37]],[s[1]]],[/^\/chapter8\/4_tf\/?$/,[s[0],s[38]],[s[1]]],[/^\/chapter8\/1\/?$/,[s[0],s[39]],[s[1]],null,1],[/^\/chapter8\/2\/?$/,[s[0],s[40]],[s[1]]],[/^\/chapter8\/3\/?$/,[s[0],s[41]],[s[1]]],[/^\/chapter8\/4\/?$/,[s[0],s[42]],[s[1]]],[/^\/chapter8\/5\/?$/,[s[0],s[43]],[s[1]]],[/^\/chapter8\/6\/?$/,[s[0],s[44]],[s[1]]],[/^\/chapter8\/7\/?$/,[s[0],s[45]],[s[1]]]],Ke=[s[0](),s[1]()];function Be(o){let e=o.baseURI;if(!e){const t=o.getElementsByTagName("base");e=t.length?t[0].href:o.URL}return e}function We(o,e){return o==="/"||e==="ignore"?o:e==="never"?o.endsWith("/")?o.slice(0,-1):o:e==="always"&&/\/[^./]+$/.test(o)?o+"/":o}const fe="sveltekit:scroll";let N={};try{N=JSON.parse(sessionStorage[fe])}catch{}function M(o){N[o]=X()}function X(){return{x:pageXOffset,y:pageYOffset}}function oe(o){return o.composedPath().find(t=>t instanceof Node&&t.nodeName.toUpperCase()==="A")}function le(o){return o instanceof SVGAElement?new URL(o.href.baseVal,document.baseURI):new URL(o.href)}class Ye{constructor({base:e,routes:t,trailing_slash:i,renderer:l}){var c,r;this.base=e,this.routes=t,this.trailing_slash=i,this.navigating=0,this.renderer=l,l.router=this,this.enabled=!0,this.initialized=!1,document.body.setAttribute("tabindex","-1"),this.current_history_index=(r=(c=history.state)==null?void 0:c["sveltekit:index"])!=null?r:0,this.current_history_index===0&&history.replaceState(W(b({},history.state),{"sveltekit:index":0}),"",location.href);const n=N[this.current_history_index];n&&scrollTo(n.x,n.y),this.hash_navigating=!1,this.callbacks={before_navigate:[],after_navigate:[]}}init_listeners(){history.scrollRestoration="manual",addEventListener("beforeunload",l=>{let n=!1;const c={from:this.renderer.current.url,to:null,cancel:()=>n=!0};this.callbacks.before_navigate.forEach(r=>r(c)),n?(l.preventDefault(),l.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){M(this.current_history_index);try{sessionStorage[fe]=JSON.stringify(N)}catch{}}});const e=l=>{const n=oe(l);n&&n.href&&n.hasAttribute("sveltekit:prefetch")&&this.prefetch(le(n))};let t;const i=l=>{clearTimeout(t),t=setTimeout(()=>{var n;(n=l.target)==null||n.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",e),addEventListener("mousemove",i),addEventListener("sveltekit:trigger_prefetch",e),addEventListener("click",l=>{if(!this.enabled||l.button||l.which!==1||l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.defaultPrevented)return;const n=oe(l);if(!n||!n.href)return;const c=n instanceof SVGAElement,r=le(n);if(r.toString()===location.href){location.hash||l.preventDefault();return}if(!c&&r.origin==="null")return;const u=(n.getAttribute("rel")||"").split(/\s+/);if(n.hasAttribute("download")||u&&u.includes("external")||(c?n.target.baseVal:n.target))return;const[_,d]=r.href.split("#");if(d!==void 0&&_===location.href.split("#")[0]){this.hash_navigating=!0,M(this.current_history_index),this.renderer.update_page_store(new URL(r.href));return}this._navigate({url:r,scroll:n.hasAttribute("sveltekit:noscroll")?X():null,keepfocus:!1,chain:[],details:{state:{},replaceState:!1},accepted:()=>l.preventDefault(),blocked:()=>l.preventDefault()})}),addEventListener("popstate",l=>{if(l.state&&this.enabled){if(l.state["sveltekit:index"]===this.current_history_index)return;this._navigate({url:new URL(location.href),scroll:N[l.state["sveltekit:index"]],keepfocus:!1,chain:[],details:null,accepted:()=>{this.current_history_index=l.state["sveltekit:index"]},blocked:()=>{const n=this.current_history_index-l.state["sveltekit:index"];history.go(n)}})}}),addEventListener("hashchange",()=>{this.hash_navigating&&(this.hash_navigating=!1,history.replaceState(W(b({},history.state),{"sveltekit:index":++this.current_history_index}),"",location.href))}),this.initialized=!0}owns(e){return e.origin===location.origin&&e.pathname.startsWith(this.base)}parse(e){if(this.owns(e)){const t=decodeURI(e.pathname.slice(this.base.length)||"/");return{id:e.pathname+e.search,routes:this.routes.filter(([i])=>i.test(t)),url:e,path:t,initial:!this.initialized}}}async goto(e,{noscroll:t=!1,replaceState:i=!1,keepfocus:l=!1,state:n={}}={},c){const r=new URL(e,Be(document));return this.enabled?this._navigate({url:r,scroll:t?X():null,keepfocus:l,chain:c,details:{state:n,replaceState:i},accepted:()=>{},blocked:()=>{}}):(location.href=r.href,new Promise(()=>{}))}enable(){this.enabled=!0}disable(){this.enabled=!1}async prefetch(e){const t=this.parse(e);if(!t)throw new Error("Attempted to prefetch a URL that does not belong to this app");return this.renderer.load(t)}after_navigate(e){F(()=>(this.callbacks.after_navigate.push(e),()=>{const t=this.callbacks.after_navigate.indexOf(e);this.callbacks.after_navigate.splice(t,1)}))}before_navigate(e){F(()=>(this.callbacks.before_navigate.push(e),()=>{const t=this.callbacks.before_navigate.indexOf(e);this.callbacks.before_navigate.splice(t,1)}))}async _navigate({url:e,scroll:t,keepfocus:i,chain:l,details:n,accepted:c,blocked:r}){const a=this.renderer.current.url;let u=!1;const _={from:a,to:e,cancel:()=>u=!0};if(this.callbacks.before_navigate.forEach(m=>m(_)),u){r();return}const d=this.parse(e);if(!d)return location.href=e.href,new Promise(()=>{});M(this.current_history_index),c(),this.navigating++;const f=We(e.pathname,this.trailing_slash);d.url=new URL(e.origin+f+e.search+e.hash);const p=this.navigating_token={};if(await this.renderer.handle_navigation(d,l,!1,{scroll:t,keepfocus:i}),this.navigating--,this.navigating_token===p){if(!this.navigating){const m={from:a,to:e};this.callbacks.after_navigate.forEach(I=>I(m))}if(n){const m=n.replaceState?0:1;n.state["sveltekit:index"]=this.current_history_index+=m,history[n.replaceState?"replaceState":"pushState"](n.state,"",d.url)}}}}function ce(o){return o instanceof Error||o&&o.name&&o.message?o:new Error(JSON.stringify(o))}function Ge(o){let e=5381,t=o.length;if(typeof o=="string")for(;t;)e=e*33^o.charCodeAt(--t);else for(;t;)e=e*33^o[--t];return(e>>>0).toString(36)}function ue(o){const e=o.status&&o.status>=400&&o.status<=599&&!o.redirect;if(o.error||e){const t=o.status;if(!o.error&&e)return{status:t||500,error:new Error};const i=typeof o.error=="string"?new Error(o.error):o.error;return i instanceof Error?!t||t<400||t>599?(console.warn('"error" returned from load() without a valid status code \u2014 defaulting to 500'),{status:500,error:i}):{status:t,error:i}:{status:500,error:new Error(`"error" property returned from load() must be a string or instance of Error, received type "${typeof i}"`)}}if(o.redirect){if(!o.status||Math.floor(o.status/100)!==3)return{status:500,error:new Error('"redirect" property returned from load() must be accompanied by a 3xx status code')};if(typeof o.redirect!="string")return{status:500,error:new Error('"redirect" property returned from load() must be a string')}}if(o.context)throw new Error('You are returning "context" from a load function. "context" was renamed to "stuff", please adjust your code accordingly.');return o}function _e(o){const e=Y(o);let t=!0;function i(){t=!0,e.update(c=>c)}function l(c){t=!1,e.set(c)}function n(c){let r;return e.subscribe(a=>{(r===void 0||t&&a!==r)&&c(r=a)})}return{notify:i,set:l,subscribe:n}}function Me(){const{set:o,subscribe:e}=Y(!1),t="1667566907230";let i;async function l(){clearTimeout(i);const c=await fetch(`${Te}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(c.ok){const{version:r}=await c.json(),a=r!==t;return a&&(o(!0),clearTimeout(i)),a}else throw new Error(`Version check failed: ${c.status}`)}return{subscribe:e,check:l}}function Fe(o,e){const t=typeof o=="string"?o:o.url;let i=`script[data-type="svelte-data"][data-url=${JSON.stringify(t)}]`;e&&typeof e.body=="string"&&(i+=`[data-body="${Ge(e.body)}"]`);const l=document.querySelector(i);if(l&&l.textContent){const n=JSON.parse(l.textContent),{body:c}=n,r=re(n,["body"]);return Promise.resolve(new Response(c,r))}return fetch(o,e)}class Xe{constructor({Root:e,fallback:t,target:i,session:l}){this.Root=e,this.fallback=t,this.router,this.target=i,this.started=!1,this.session_id=1,this.invalid=new Set,this.invalidating=null,this.autoscroll=!0,this.updating=!1,this.current={url:null,session_id:0,branch:[]},this.cache=new Map,this.loading={id:null,promise:null},this.stores={url:_e({}),page:_e({}),navigating:Y(null),session:Y(l),updated:Me()},this.$session=null,this.root=null;let n=!1;this.stores.session.subscribe(async c=>{if(this.$session=c,!n||!this.router)return;this.session_id+=1;const r=this.router.parse(new URL(location.href));r&&this.update(r,[],!0)}),n=!0}disable_scroll_handling(){(this.updating||!this.started)&&(this.autoscroll=!1)}async start({status:e,error:t,nodes:i,params:l}){const n=new URL(location.href),c=[];let r={},a,u;try{for(let _=0;_<i.length;_+=1){const d=_===i.length-1;let f;if(d){const m=document.querySelector('[data-type="svelte-props"]');m&&(f=JSON.parse(m.textContent))}const p=await this._load_node({module:await i[_],url:n,params:l,stuff:r,status:d?e:void 0,error:d?t:void 0,props:f});if(f&&(p.uses.dependencies.add(n.href),p.uses.url=!0),c.push(p),p&&p.loaded)if(p.loaded.error){if(t)throw p.loaded.error;u={status:p.loaded.status,error:p.loaded.error,url:n}}else p.loaded.stuff&&(r=b(b({},r),p.loaded.stuff))}a=u?await this._load_error(u):await this._get_navigation_result_from_branch({url:n,params:l,stuff:r,branch:c,status:e,error:t})}catch(_){if(t)throw _;a=await this._load_error({status:500,error:ce(_),url:n})}if(a.redirect){location.href=new URL(a.redirect,location.href).href;return}this._init(a)}async handle_navigation(e,t,i,l){this.started&&this.stores.navigating.set({from:this.current.url,to:e.url}),await this.update(e,t,i,l)}async update(e,t,i,l){var a,u,_;const n=this.token={};let c=await this._get_navigation_result(e,i);if(!c){location.href=e.url.href;return}if(n!==this.token)return;if(this.invalid.clear(),c.redirect)if(t.length>10||t.includes(e.url.pathname))c=await this._load_error({status:500,error:new Error("Redirect loop"),url:e.url});else{this.router?this.router.goto(new URL(c.redirect,e.url).href,{},[...t,e.url.pathname]):location.href=new URL(c.redirect,location.href).href;return}else if(((u=(a=c.props)==null?void 0:a.page)==null?void 0:u.status)>=400&&await this.stores.updated.check()){location.href=e.url.href;return}if(this.updating=!0,this.started?(this.current=c.state,this.root.$set(c.props),this.stores.navigating.set(null)):this._init(c),l){const{scroll:d,keepfocus:f}=l;if(f||((_=getSelection())==null||_.removeAllRanges(),document.body.focus()),await se(),this.autoscroll){const p=e.url.hash&&document.getElementById(e.url.hash.slice(1));d?scrollTo(d.x,d.y):p?p.scrollIntoView():scrollTo(0,0)}}else await se();if(this.loading.promise=null,this.loading.id=null,this.autoscroll=!0,this.updating=!1,c.props.page&&(this.page=c.props.page),!this.router)return;const r=c.state.branch[c.state.branch.length-1];r&&r.module.router===!1?this.router.disable():this.router.enable()}load(e){return this.loading.promise=this._get_navigation_result(e,!1),this.loading.id=e.id,this.loading.promise}invalidate(e){return this.invalid.add(e),this.invalidating||(this.invalidating=Promise.resolve().then(async()=>{const t=this.router&&this.router.parse(new URL(location.href));t&&await this.update(t,[],!0),this.invalidating=null})),this.invalidating}update_page_store(e){this.stores.page.set(W(b({},this.page),{url:e})),this.stores.page.notify()}_init(e){this.current=e.state;const t=document.querySelector("style[data-svelte]");if(t&&t.remove(),this.page=e.props.page,this.root=new this.Root({target:this.target,props:b({stores:this.stores},e.props),hydrate:!0}),this.started=!0,this.router){const i={from:null,to:new URL(location.href)};this.router.callbacks.after_navigate.forEach(l=>l(i))}}async _get_navigation_result(e,t){if(this.loading.id===e.id&&this.loading.promise)return this.loading.promise;for(let i=0;i<e.routes.length;i+=1){const l=e.routes[i];let n=i+1;for(;n<e.routes.length;){const r=e.routes[n];if(r[0].toString()===l[0].toString())r[1].forEach(a=>a()),n+=1;else break}const c=await this._load({route:l,info:e},t);if(c)return c}if(e.initial)return await this._load_error({status:404,error:new Error(`Not found: ${e.url.pathname}`),url:e.url})}async _get_navigation_result_from_branch({url:e,params:t,stuff:i,branch:l,status:n,error:c}){const r=l.filter(Boolean),a=r.find(f=>f.loaded&&f.loaded.redirect),u={redirect:a&&a.loaded?a.loaded.redirect:void 0,state:{url:e,params:t,branch:l,session_id:this.session_id},props:{components:r.map(f=>f.module.default)}};for(let f=0;f<r.length;f+=1){const p=r[f].loaded;u.props[`props_${f}`]=p?await p.props:null}if(!this.current.url||e.href!==this.current.url.href){u.props.page={url:e,params:t,status:n,error:c,stuff:i};const f=(p,m)=>{Object.defineProperty(u.props.page,p,{get:()=>{throw new Error(`$page.${p} has been replaced by $page.url.${m}`)}})};f("origin","origin"),f("path","pathname"),f("query","searchParams")}const _=r[r.length-1],d=_.loaded&&_.loaded.maxage;if(d){const f=e.pathname+e.search;let p=!1;const m=()=>{this.cache.get(f)===u&&this.cache.delete(f),L(),clearTimeout(I)},I=setTimeout(m,d*1e3),L=this.stores.session.subscribe(()=>{p&&m()});p=!0,this.cache.set(f,u)}return u}async _load_node({status:e,error:t,module:i,url:l,params:n,stuff:c,props:r}){const a={module:i,uses:{params:new Set,url:!1,session:!1,stuff:!1,dependencies:new Set},loaded:null,stuff:c};r&&a.uses.dependencies.add(l.href);const u={};for(const d in n)Object.defineProperty(u,d,{get(){return a.uses.params.add(d),n[d]},enumerable:!0});const _=this.$session;if(i.load){const{started:d}=this,f={params:u,props:r||{},get url(){return a.uses.url=!0,l},get session(){return a.uses.session=!0,_},get stuff(){return a.uses.stuff=!0,b({},c)},fetch(m,I){const L=typeof m=="string"?m:m.url,{href:O}=new URL(L,l);return a.uses.dependencies.add(O),d?fetch(m,I):Fe(m,I)}};t&&(f.status=e,f.error=t);const p=await i.load.call(null,f);if(!p)throw new Error("load function must return a value");a.loaded=ue(p),a.loaded.stuff&&(a.stuff=a.loaded.stuff)}else r&&(a.loaded=ue({props:r}));return a}async _load({route:e,info:{url:t,path:i}},l){const n=t.pathname+t.search;if(!l){const g=this.cache.get(n);if(g)return g}const[c,r,a,u,_]=e,d=u?u(c.exec(i)):{},f=this.current.url&&{url:n!==this.current.url.pathname+this.current.url.search,params:Object.keys(d).filter(g=>this.current.params[g]!==d[g]),session:this.session_id!==this.current.session_id};let p=[],m={},I=!1,L=200,O;r.forEach(g=>g());e:for(let g=0;g<r.length;g+=1){let v;try{if(!r[g])continue;const w=await r[g](),k=this.current.branch[g];if(!k||w!==k.module||f.url&&k.uses.url||f.params.some(S=>k.uses.params.has(S))||f.session&&k.uses.session||Array.from(k.uses.dependencies).some(S=>this.invalid.has(S))||I&&k.uses.stuff){let S={};const H=_&&g===r.length-1;if(H){const K=await fetch(`${t.pathname}${t.pathname.endsWith("/")?"":"/"}__data.json${t.search}`,{headers:{"x-sveltekit-load":"true"}});if(K.ok){const Q=K.headers.get("x-sveltekit-location");if(Q)return{redirect:Q,props:{},state:this.current};S=await K.json()}else L=K.status,O=new Error("Failed to load data")}if(O||(v=await this._load_node({module:w,url:t,params:d,props:S,stuff:m})),v&&(H&&(v.uses.url=!0),v.loaded)){if(v.loaded.fallthrough)return;if(v.loaded.error&&(L=v.loaded.status,O=v.loaded.error),v.loaded.redirect)return{redirect:v.loaded.redirect,props:{},state:this.current};v.loaded.stuff&&(I=!0)}}else v=k}catch(w){L=500,O=ce(w)}if(O){for(;g--;)if(a[g]){let w,k,J=g;for(;!(k=p[J]);)J-=1;try{if(w=await this._load_node({status:L,error:O,module:await a[g](),url:t,params:d,stuff:k.stuff}),w&&w.loaded&&w.loaded.error)continue;w&&w.loaded&&w.loaded.stuff&&(m=b(b({},m),w.loaded.stuff)),p=p.slice(0,J+1).concat(w);break e}catch{continue}}return await this._load_error({status:L,error:O,url:t})}else v&&v.loaded&&v.loaded.stuff&&(m=b(b({},m),v.loaded.stuff)),p.push(v)}return await this._get_navigation_result_from_branch({url:t,params:d,stuff:m,branch:p,status:L,error:O})}async _load_error({status:e,error:t,url:i}){var u,_;const l={},n=await this._load_node({module:await this.fallback[0],url:i,params:l,stuff:{}}),c=await this._load_node({status:e,error:t,module:await this.fallback[1],url:i,params:l,stuff:n&&n.loaded&&n.loaded.stuff||{}}),r=[n,c],a=b(b({},(u=n==null?void 0:n.loaded)==null?void 0:u.stuff),(_=c==null?void 0:c.loaded)==null?void 0:_.stuff);return await this._get_navigation_result_from_branch({url:i,params:l,stuff:a,branch:r,status:e,error:t})}}async function et({paths:o,target:e,session:t,route:i,spa:l,trailing_slash:n,hydrate:c}){const r=new Xe({Root:je,fallback:Ke,target:e,session:t}),a=i?new Ye({base:o.base,routes:Je,trailing_slash:n,renderer:r}):null;Pe(o),c&&await r.start(c),a&&(l&&a.goto(location.href,{replaceState:!0},[]),a.init_listeners()),dispatchEvent(new CustomEvent("sveltekit:start"))}export{et as start};
