{"version":3,"file":"start-3d56f583.js","sources":["../../../build/generated/root.svelte","../../../../vite/preload-helper","../../../build/generated/manifest.js","../../../build/runtime/chunks/utils.js","../../../build/runtime/paths.js","../../../build/runtime/internal/start.js"],"sourcesContent":["\n\n\n\n\t{#if components[1]}\n\t\t\n\t\t\t{#if components[2]}\n\t\t\t\t\n\t\t\t{/if}\n\t\t\n\t{/if}\n\n\n{#if mounted}\n\t
\n\t\t{#if navigated}\n\t\t\t{title}\n\t\t{/if}\n\t
\n{/if}\n\n","const scriptRel = 'modulepreload';const seen = {};const base = '/_app/';export const __vitePreload = function preload(baseModule, deps) {\n // @ts-ignore\n if (!__VITE_IS_MODERN__ || !deps || deps.length === 0) {\n return baseModule();\n }\n return Promise.all(deps.map((dep) => {\n // @ts-ignore\n dep = `${base}${dep}`;\n // @ts-ignore\n if (dep in seen)\n return;\n // @ts-ignore\n seen[dep] = true;\n const isCss = dep.endsWith('.css');\n const cssSelector = isCss ? '[rel=\"stylesheet\"]' : '';\n // @ts-ignore check if the file is already preloaded by SSR markup\n if (document.querySelector(`link[href=\"${dep}\"]${cssSelector}`)) {\n return;\n }\n // @ts-ignore\n const link = document.createElement('link');\n // @ts-ignore\n link.rel = isCss ? 'stylesheet' : scriptRel;\n if (!isCss) {\n link.as = 'script';\n link.crossOrigin = '';\n }\n link.href = dep;\n // @ts-ignore\n document.head.appendChild(link);\n if (isCss) {\n return new Promise((res, rej) => {\n link.addEventListener('load', res);\n link.addEventListener('error', rej);\n });\n }\n })).then(() => baseModule());\n}","const c = [\n\t() => import(\"..\\\\..\\\\..\\\\frontend\\\\player.z-tv.tv\\\\src\\\\routes\\\\__layout.svelte\"),\n\t() => import(\"..\\\\..\\\\..\\\\frontend\\\\player.z-tv.tv\\\\src\\\\routes\\\\__error.svelte\"),\n\t() => import(\"..\\\\..\\\\..\\\\frontend\\\\player.z-tv.tv\\\\src\\\\routes\\\\index.svelte\")\n];\n\nconst d = decodeURIComponent;\n\nexport const routes = [\n\t// frontend/player.z-tv.tv/src/routes/index.svelte\n\t[/^\\/$/, [c[0], c[2]], [c[1]]]\n];\n\n// we import the root layout/error components eagerly, so that\n// connectivity errors after initialisation don't nuke the app\nexport const fallback = [c[0](), c[1]()];","/** @param {HTMLDocument} doc */\nfunction get_base_uri(doc) {\n\tlet baseURI = doc.baseURI;\n\n\tif (!baseURI) {\n\t\tconst baseTags = doc.getElementsByTagName('base');\n\t\tbaseURI = baseTags.length ? baseTags[0].href : doc.URL;\n\t}\n\n\treturn baseURI;\n}\n\nexport { get_base_uri as g };\n","/** @type {string} */\nlet base = '';\n\n/** @type {string} */\nlet assets = '';\n\n/** @param {{ base: string, assets: string }} paths */\nfunction set_paths(paths) {\n\tbase = paths.base;\n\tassets = paths.assets || base;\n}\n\nexport { assets, base, set_paths };\n","import Root from '../../generated/root.svelte';\nimport { fallback, routes } from '../../generated/manifest.js';\nimport { g as get_base_uri } from '../chunks/utils.js';\nimport { writable } from 'svelte/store';\nimport { init } from './singletons.js';\nimport { set_paths } from '../paths.js';\n\nfunction scroll_state() {\n\treturn {\n\t\tx: pageXOffset,\n\t\ty: pageYOffset\n\t};\n}\n\n/**\n * @param {Node | null} node\n * @returns {HTMLAnchorElement | SVGAElement | null}\n */\nfunction find_anchor(node) {\n\twhile (node && node.nodeName.toUpperCase() !== 'A') node = node.parentNode; // SVG elements have a lowercase name\n\treturn /** @type {HTMLAnchorElement | SVGAElement} */ (node);\n}\n\n/**\n * @param {HTMLAnchorElement | SVGAElement} node\n * @returns {URL}\n */\nfunction get_href(node) {\n\treturn node instanceof SVGAElement\n\t\t? new URL(node.href.baseVal, document.baseURI)\n\t\t: new URL(node.href);\n}\n\nclass Router {\n\t/**\n\t * @param {{\n\t * base: string;\n\t * routes: import('types/internal').CSRRoute[];\n\t * trailing_slash: import('types/internal').TrailingSlash;\n\t * renderer: import('./renderer').Renderer\n\t * }} opts\n\t */\n\tconstructor({ base, routes, trailing_slash, renderer }) {\n\t\tthis.base = base;\n\t\tthis.routes = routes;\n\t\tthis.trailing_slash = trailing_slash;\n\n\t\t/** @type {import('./renderer').Renderer} */\n\t\tthis.renderer = renderer;\n\t\trenderer.router = this;\n\n\t\tthis.enabled = true;\n\n\t\t// make it possible to reset focus\n\t\tdocument.body.setAttribute('tabindex', '-1');\n\n\t\t// create initial history entry, so we can return here\n\t\thistory.replaceState(history.state || {}, '', location.href);\n\t}\n\n\tinit_listeners() {\n\t\tif ('scrollRestoration' in history) {\n\t\t\thistory.scrollRestoration = 'manual';\n\t\t}\n\n\t\t// Adopted from Nuxt.js\n\t\t// Reset scrollRestoration to auto when leaving page, allowing page reload\n\t\t// and back-navigation from other pages to use the browser to restore the\n\t\t// scrolling position.\n\t\taddEventListener('beforeunload', () => {\n\t\t\thistory.scrollRestoration = 'auto';\n\t\t});\n\n\t\t// Setting scrollRestoration to manual again when returning to this page.\n\t\taddEventListener('load', () => {\n\t\t\thistory.scrollRestoration = 'manual';\n\t\t});\n\n\t\t// There's no API to capture the scroll location right before the user\n\t\t// hits the back/forward button, so we listen for scroll events\n\n\t\t/** @type {NodeJS.Timeout} */\n\t\tlet scroll_timer;\n\t\taddEventListener('scroll', () => {\n\t\t\tclearTimeout(scroll_timer);\n\t\t\tscroll_timer = setTimeout(() => {\n\t\t\t\t// Store the scroll location in the history\n\t\t\t\t// This will persist even if we navigate away from the site and come back\n\t\t\t\tconst new_state = {\n\t\t\t\t\t...(history.state || {}),\n\t\t\t\t\t'sveltekit:scroll': scroll_state()\n\t\t\t\t};\n\t\t\t\thistory.replaceState(new_state, document.title, window.location.href);\n\t\t\t}, 50);\n\t\t});\n\n\t\t/** @param {MouseEvent|TouchEvent} event */\n\t\tconst trigger_prefetch = (event) => {\n\t\t\tconst a = find_anchor(/** @type {Node} */ (event.target));\n\t\t\tif (a && a.href && a.hasAttribute('sveltekit:prefetch')) {\n\t\t\t\tthis.prefetch(get_href(a));\n\t\t\t}\n\t\t};\n\n\t\t/** @type {NodeJS.Timeout} */\n\t\tlet mousemove_timeout;\n\n\t\t/** @param {MouseEvent|TouchEvent} event */\n\t\tconst handle_mousemove = (event) => {\n\t\t\tclearTimeout(mousemove_timeout);\n\t\t\tmousemove_timeout = setTimeout(() => {\n\t\t\t\ttrigger_prefetch(event);\n\t\t\t}, 20);\n\t\t};\n\n\t\taddEventListener('touchstart', trigger_prefetch);\n\t\taddEventListener('mousemove', handle_mousemove);\n\n\t\t/** @param {MouseEvent} event */\n\t\taddEventListener('click', (event) => {\n\t\t\tif (!this.enabled) return;\n\n\t\t\t// Adapted from https://github.com/visionmedia/page.js\n\t\t\t// MIT license https://github.com/visionmedia/page.js#license\n\t\t\tif (event.button || event.which !== 1) return;\n\t\t\tif (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n\t\t\tif (event.defaultPrevented) return;\n\n\t\t\tconst a = find_anchor(/** @type {Node} */ (event.target));\n\t\t\tif (!a) return;\n\n\t\t\tif (!a.href) return;\n\n\t\t\tconst url = get_href(a);\n\t\t\tif (url.toString() === location.href) {\n\t\t\t\tif (!location.hash) event.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Ignore if tag has\n\t\t\t// 1. 'download' attribute\n\t\t\t// 2. 'rel' attribute includes external\n\t\t\tconst rel = (a.getAttribute('rel') || '').split(/\\s+/);\n\n\t\t\tif (a.hasAttribute('download') || (rel && rel.includes('external'))) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Ignore if has a target\n\t\t\tif (a instanceof SVGAElement ? a.target.baseVal : a.target) return;\n\n\t\t\tif (!this.owns(url)) return;\n\n\t\t\tconst noscroll = a.hasAttribute('sveltekit:noscroll');\n\n\t\t\thistory.pushState({}, '', url.href);\n\t\t\tthis._navigate(url, noscroll ? scroll_state() : null, false, [], url.hash);\n\t\t\tevent.preventDefault();\n\t\t});\n\n\t\taddEventListener('popstate', (event) => {\n\t\t\tif (event.state && this.enabled) {\n\t\t\t\tconst url = new URL(location.href);\n\t\t\t\tthis._navigate(url, event.state['sveltekit:scroll'], false, []);\n\t\t\t}\n\t\t});\n\t}\n\n\t/** @param {URL} url */\n\towns(url) {\n\t\treturn url.origin === location.origin && url.pathname.startsWith(this.base);\n\t}\n\n\t/**\n\t * @param {URL} url\n\t * @returns {import('./types').NavigationInfo | undefined}\n\t */\n\tparse(url) {\n\t\tif (this.owns(url)) {\n\t\t\tconst path = url.pathname.slice(this.base.length) || '/';\n\n\t\t\tconst decoded_path = decodeURI(path);\n\t\t\tconst routes = this.routes.filter(([pattern]) => pattern.test(decoded_path));\n\n\t\t\tconst query = new URLSearchParams(url.search);\n\t\t\tconst id = `${path}?${query}`;\n\n\t\t\treturn { id, routes, path, decoded_path, query };\n\t\t}\n\t}\n\n\t/**\n\t * @typedef {Parameters} GotoParams\n\t *\n\t * @param {GotoParams[0]} href\n\t * @param {GotoParams[1]} opts\n\t * @param {string[]} chain\n\t */\n\tasync goto(\n\t\thref,\n\t\t{ noscroll = false, replaceState = false, keepfocus = false, state = {} } = {},\n\t\tchain\n\t) {\n\t\tconst url = new URL(href, get_base_uri(document));\n\n\t\tif (this.enabled && this.owns(url)) {\n\t\t\thistory[replaceState ? 'replaceState' : 'pushState'](state, '', href);\n\t\t\treturn this._navigate(url, noscroll ? scroll_state() : null, keepfocus, chain, url.hash);\n\t\t}\n\n\t\tlocation.href = url.href;\n\t\treturn new Promise(() => {\n\t\t\t/* never resolves */\n\t\t});\n\t}\n\n\tenable() {\n\t\tthis.enabled = true;\n\t}\n\n\tdisable() {\n\t\tthis.enabled = false;\n\t}\n\n\t/**\n\t * @param {URL} url\n\t * @returns {Promise}\n\t */\n\tasync prefetch(url) {\n\t\tconst info = this.parse(url);\n\n\t\tif (!info) {\n\t\t\tthrow new Error('Attempted to prefetch a URL that does not belong to this app');\n\t\t}\n\n\t\treturn this.renderer.load(info);\n\t}\n\n\t/**\n\t * @param {URL} url\n\t * @param {{ x: number, y: number }?} scroll\n\t * @param {boolean} keepfocus\n\t * @param {string[]} chain\n\t * @param {string} [hash]\n\t */\n\tasync _navigate(url, scroll, keepfocus, chain, hash) {\n\t\tconst info = this.parse(url);\n\n\t\tif (!info) {\n\t\t\tthrow new Error('Attempted to navigate to a URL that does not belong to this app');\n\t\t}\n\n\t\t// remove trailing slashes\n\t\tif (info.path !== '/') {\n\t\t\tconst has_trailing_slash = info.path.endsWith('/');\n\n\t\t\tconst incorrect =\n\t\t\t\t(has_trailing_slash && this.trailing_slash === 'never') ||\n\t\t\t\t(!has_trailing_slash &&\n\t\t\t\t\tthis.trailing_slash === 'always' &&\n\t\t\t\t\t!(info.path.split('/').pop() || '').includes('.'));\n\n\t\t\tif (incorrect) {\n\t\t\t\tinfo.path = has_trailing_slash ? info.path.slice(0, -1) : info.path + '/';\n\t\t\t\thistory.replaceState({}, '', `${this.base}${info.path}${location.search}`);\n\t\t\t}\n\t\t}\n\n\t\tthis.renderer.notify({\n\t\t\tpath: info.path,\n\t\t\tquery: info.query\n\t\t});\n\n\t\tawait this.renderer.update(info, chain, false, { hash, scroll, keepfocus });\n\t}\n}\n\n/**\n * @param {unknown} err\n * @return {Error}\n */\nfunction coalesce_to_error(err) {\n\treturn err instanceof Error ||\n\t\t(err && /** @type {any} */ (err).name && /** @type {any} */ (err).message)\n\t\t? /** @type {Error} */ (err)\n\t\t: new Error(JSON.stringify(err));\n}\n\n/**\n * Hash using djb2\n * @param {import('types/hooks').StrictBody} value\n */\nfunction hash(value) {\n\tlet hash = 5381;\n\tlet i = value.length;\n\n\tif (typeof value === 'string') {\n\t\twhile (i) hash = (hash * 33) ^ value.charCodeAt(--i);\n\t} else {\n\t\twhile (i) hash = (hash * 33) ^ value[--i];\n\t}\n\n\treturn (hash >>> 0).toString(36);\n}\n\n/**\n * @param {import('types/page').LoadOutput} loaded\n * @returns {import('types/internal').NormalizedLoadOutput}\n */\nfunction normalize(loaded) {\n\tconst has_error_status =\n\t\tloaded.status && loaded.status >= 400 && loaded.status <= 599 && !loaded.redirect;\n\tif (loaded.error || has_error_status) {\n\t\tconst status = loaded.status;\n\n\t\tif (!loaded.error && has_error_status) {\n\t\t\treturn {\n\t\t\t\tstatus: status || 500,\n\t\t\t\terror: new Error()\n\t\t\t};\n\t\t}\n\n\t\tconst error = typeof loaded.error === 'string' ? new Error(loaded.error) : loaded.error;\n\n\t\tif (!(error instanceof Error)) {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error(\n\t\t\t\t\t`\"error\" property returned from load() must be a string or instance of Error, received type \"${typeof error}\"`\n\t\t\t\t)\n\t\t\t};\n\t\t}\n\n\t\tif (!status || status < 400 || status > 599) {\n\t\t\tconsole.warn('\"error\" returned from load() without a valid status code — defaulting to 500');\n\t\t\treturn { status: 500, error };\n\t\t}\n\n\t\treturn { status, error };\n\t}\n\n\tif (loaded.redirect) {\n\t\tif (!loaded.status || Math.floor(loaded.status / 100) !== 3) {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error(\n\t\t\t\t\t'\"redirect\" property returned from load() must be accompanied by a 3xx status code'\n\t\t\t\t)\n\t\t\t};\n\t\t}\n\n\t\tif (typeof loaded.redirect !== 'string') {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error('\"redirect\" property returned from load() must be a string')\n\t\t\t};\n\t\t}\n\t}\n\n\t// TODO remove before 1.0\n\tif (/** @type {any} */ (loaded).context) {\n\t\tthrow new Error(\n\t\t\t'You are returning \"context\" from a load function. ' +\n\t\t\t\t'\"context\" was renamed to \"stuff\", please adjust your code accordingly.'\n\t\t);\n\t}\n\n\treturn /** @type {import('types/internal').NormalizedLoadOutput} */ (loaded);\n}\n\n/**\n * @typedef {import('types/internal').CSRComponent} CSRComponent\n *\n * @typedef {Partial} Page\n * @typedef {{ from: Page; to: Page }} Navigating\n */\n\n/** @param {any} value */\nfunction page_store(value) {\n\tconst store = writable(value);\n\tlet ready = true;\n\n\tfunction notify() {\n\t\tready = true;\n\t\tstore.update((val) => val);\n\t}\n\n\t/** @param {any} new_value */\n\tfunction set(new_value) {\n\t\tready = false;\n\t\tstore.set(new_value);\n\t}\n\n\t/** @param {(value: any) => void} run */\n\tfunction subscribe(run) {\n\t\t/** @type {any} */\n\t\tlet old_value;\n\t\treturn store.subscribe((new_value) => {\n\t\t\tif (old_value === undefined || (ready && new_value !== old_value)) {\n\t\t\t\trun((old_value = new_value));\n\t\t\t}\n\t\t});\n\t}\n\n\treturn { notify, set, subscribe };\n}\n\n/**\n * @param {RequestInfo} resource\n * @param {RequestInit} [opts]\n */\nfunction initial_fetch(resource, opts) {\n\tconst url = typeof resource === 'string' ? resource : resource.url;\n\n\tlet selector = `script[data-type=\"svelte-data\"][data-url=${JSON.stringify(url)}]`;\n\n\tif (opts && typeof opts.body === 'string') {\n\t\tselector += `[data-body=\"${hash(opts.body)}\"]`;\n\t}\n\n\tconst script = document.querySelector(selector);\n\tif (script && script.textContent) {\n\t\tconst { body, ...init } = JSON.parse(script.textContent);\n\t\treturn Promise.resolve(new Response(body, init));\n\t}\n\n\treturn fetch(resource, opts);\n}\n\nclass Renderer {\n\t/**\n\t * @param {{\n\t * Root: CSRComponent;\n\t * fallback: [CSRComponent, CSRComponent];\n\t * target: Node;\n\t * session: any;\n\t * host: string;\n\t * }} opts\n\t */\n\tconstructor({ Root, fallback, target, session, host }) {\n\t\tthis.Root = Root;\n\t\tthis.fallback = fallback;\n\t\tthis.host = host;\n\n\t\t/** @type {import('./router').Router | undefined} */\n\t\tthis.router;\n\n\t\tthis.target = target;\n\n\t\tthis.started = false;\n\n\t\tthis.session_id = 1;\n\t\tthis.invalid = new Set();\n\t\tthis.invalidating = null;\n\n\t\t/** @type {import('./types').NavigationState} */\n\t\tthis.current = {\n\t\t\t// @ts-ignore - we need the initial value to be null\n\t\t\tpage: null,\n\t\t\tsession_id: 0,\n\t\t\tbranch: []\n\t\t};\n\n\t\t/** @type {Map} */\n\t\tthis.cache = new Map();\n\n\t\t/** @type {{id: string | null, promise: Promise | null}} */\n\t\tthis.loading = {\n\t\t\tid: null,\n\t\t\tpromise: null\n\t\t};\n\n\t\tthis.stores = {\n\t\t\tpage: page_store({}),\n\t\t\tnavigating: writable(/** @type {Navigating | null} */ (null)),\n\t\t\tsession: writable(session)\n\t\t};\n\n\t\tthis.$session = null;\n\n\t\tthis.root = null;\n\n\t\tlet ready = false;\n\t\tthis.stores.session.subscribe(async (value) => {\n\t\t\tthis.$session = value;\n\n\t\t\tif (!ready || !this.router) return;\n\t\t\tthis.session_id += 1;\n\n\t\t\tconst info = this.router.parse(new URL(location.href));\n\t\t\tif (info) this.update(info, [], true);\n\t\t});\n\t\tready = true;\n\t}\n\n\t/**\n\t * @param {{\n\t * status: number;\n\t * error: Error;\n\t * nodes: Array>;\n\t * page: import('types/page').Page;\n\t * }} selected\n\t */\n\tasync start({ status, error, nodes, page }) {\n\t\t/** @type {Array} */\n\t\tconst branch = [];\n\n\t\t/** @type {Record} */\n\t\tlet stuff = {};\n\n\t\t/** @type {import('./types').NavigationResult | undefined} */\n\t\tlet result;\n\n\t\tlet error_args;\n\n\t\ttry {\n\t\t\tfor (let i = 0; i < nodes.length; i += 1) {\n\t\t\t\tconst is_leaf = i === nodes.length - 1;\n\n\t\t\t\tconst node = await this._load_node({\n\t\t\t\t\tmodule: await nodes[i],\n\t\t\t\t\tpage,\n\t\t\t\t\tstuff,\n\t\t\t\t\tstatus: is_leaf ? status : undefined,\n\t\t\t\t\terror: is_leaf ? error : undefined\n\t\t\t\t});\n\n\t\t\t\tbranch.push(node);\n\n\t\t\t\tif (node && node.loaded) {\n\t\t\t\t\tif (node.loaded.error) {\n\t\t\t\t\t\tif (error) throw node.loaded.error;\n\t\t\t\t\t\terror_args = {\n\t\t\t\t\t\t\tstatus: node.loaded.status,\n\t\t\t\t\t\t\terror: node.loaded.error,\n\t\t\t\t\t\t\tpath: page.path,\n\t\t\t\t\t\t\tquery: page.query\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if (node.loaded.stuff) {\n\t\t\t\t\t\tstuff = {\n\t\t\t\t\t\t\t...stuff,\n\t\t\t\t\t\t\t...node.loaded.stuff\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult = error_args\n\t\t\t\t? await this._load_error(error_args)\n\t\t\t\t: await this._get_navigation_result_from_branch({ page, branch });\n\t\t} catch (e) {\n\t\t\tif (error) throw e;\n\n\t\t\tresult = await this._load_error({\n\t\t\t\tstatus: 500,\n\t\t\t\terror: coalesce_to_error(e),\n\t\t\t\tpath: page.path,\n\t\t\t\tquery: page.query\n\t\t\t});\n\t\t}\n\n\t\tif (result.redirect) {\n\t\t\t// this is a real edge case — `load` would need to return\n\t\t\t// a redirect but only in the browser\n\t\t\tlocation.href = new URL(result.redirect, location.href).href;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._init(result);\n\t}\n\n\t/** @param {{ path: string, query: URLSearchParams }} destination */\n\tnotify({ path, query }) {\n\t\tdispatchEvent(new CustomEvent('sveltekit:navigation-start'));\n\n\t\tif (this.started) {\n\t\t\tthis.stores.navigating.set({\n\t\t\t\tfrom: {\n\t\t\t\t\tpath: this.current.page.path,\n\t\t\t\t\tquery: this.current.page.query\n\t\t\t\t},\n\t\t\t\tto: {\n\t\t\t\t\tpath,\n\t\t\t\t\tquery\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * @param {import('./types').NavigationInfo} info\n\t * @param {string[]} chain\n\t * @param {boolean} no_cache\n\t * @param {{hash?: string, scroll: { x: number, y: number } | null, keepfocus: boolean}} [opts]\n\t */\n\tasync update(info, chain, no_cache, opts) {\n\t\tconst token = (this.token = {});\n\t\tlet navigation_result = await this._get_navigation_result(info, no_cache);\n\n\t\t// abort if user navigated during update\n\t\tif (token !== this.token) return;\n\n\t\tthis.invalid.clear();\n\n\t\tif (navigation_result.redirect) {\n\t\t\tif (chain.length > 10 || chain.includes(info.path)) {\n\t\t\t\tnavigation_result = await this._load_error({\n\t\t\t\t\tstatus: 500,\n\t\t\t\t\terror: new Error('Redirect loop'),\n\t\t\t\t\tpath: info.path,\n\t\t\t\t\tquery: info.query\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (this.router) {\n\t\t\t\t\tthis.router.goto(navigation_result.redirect, { replaceState: true }, [\n\t\t\t\t\t\t...chain,\n\t\t\t\t\t\tinfo.path\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\tlocation.href = new URL(navigation_result.redirect, location.href).href;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (navigation_result.reload) {\n\t\t\tlocation.reload();\n\t\t} else if (this.started) {\n\t\t\tthis.current = navigation_result.state;\n\n\t\t\tthis.root.$set(navigation_result.props);\n\t\t\tthis.stores.navigating.set(null);\n\t\t} else {\n\t\t\tthis._init(navigation_result);\n\t\t}\n\n\t\tif (opts) {\n\t\t\tconst { hash, scroll, keepfocus } = opts;\n\n\t\t\tif (!keepfocus) {\n\t\t\t\tdocument.body.focus();\n\t\t\t}\n\n\t\t\tconst deep_linked = hash && document.getElementById(hash.slice(1));\n\t\t\tif (scroll) {\n\t\t\t\tscrollTo(scroll.x, scroll.y);\n\t\t\t} else if (deep_linked) {\n\t\t\t\t// Here we use `scrollIntoView` on the element instead of `scrollTo`\n\t\t\t\t// because it natively supports the `scroll-margin` and `scroll-behavior`\n\t\t\t\t// CSS properties.\n\t\t\t\tdeep_linked.scrollIntoView();\n\t\t\t} else {\n\t\t\t\tscrollTo(0, 0);\n\t\t\t}\n\t\t}\n\n\t\tawait 0;\n\t\tdispatchEvent(new CustomEvent('sveltekit:navigation-end'));\n\t\tthis.loading.promise = null;\n\t\tthis.loading.id = null;\n\n\t\tif (!this.router) return;\n\t\tconst leaf_node = navigation_result.state.branch[navigation_result.state.branch.length - 1];\n\t\tif (leaf_node && leaf_node.module.router === false) {\n\t\t\tthis.router.disable();\n\t\t} else {\n\t\t\tthis.router.enable();\n\t\t}\n\t}\n\n\t/**\n\t * @param {import('./types').NavigationInfo} info\n\t * @returns {Promise}\n\t */\n\tload(info) {\n\t\tthis.loading.promise = this._get_navigation_result(info, false);\n\t\tthis.loading.id = info.id;\n\n\t\treturn this.loading.promise;\n\t}\n\n\t/** @param {string} href */\n\tinvalidate(href) {\n\t\tthis.invalid.add(href);\n\n\t\tif (!this.invalidating) {\n\t\t\tthis.invalidating = Promise.resolve().then(async () => {\n\t\t\t\tconst info = this.router && this.router.parse(new URL(location.href));\n\t\t\t\tif (info) await this.update(info, [], true);\n\n\t\t\t\tthis.invalidating = null;\n\t\t\t});\n\t\t}\n\n\t\treturn this.invalidating;\n\t}\n\n\t/** @param {import('./types').NavigationResult} result */\n\t_init(result) {\n\t\tthis.current = result.state;\n\n\t\tconst style = document.querySelector('style[data-svelte]');\n\t\tif (style) style.remove();\n\n\t\tthis.root = new this.Root({\n\t\t\ttarget: this.target,\n\t\t\tprops: {\n\t\t\t\tstores: this.stores,\n\t\t\t\t...result.props\n\t\t\t},\n\t\t\thydrate: true\n\t\t});\n\n\t\tthis.started = true;\n\t}\n\n\t/**\n\t * @param {import('./types').NavigationInfo} info\n\t * @param {boolean} no_cache\n\t * @returns {Promise}\n\t */\n\tasync _get_navigation_result(info, no_cache) {\n\t\tif (this.loading.id === info.id && this.loading.promise) {\n\t\t\treturn this.loading.promise;\n\t\t}\n\n\t\tfor (let i = 0; i < info.routes.length; i += 1) {\n\t\t\tconst route = info.routes[i];\n\n\t\t\t// check if endpoint route\n\t\t\tif (route.length === 1) {\n\t\t\t\treturn { reload: true, props: {}, state: this.current };\n\t\t\t}\n\n\t\t\t// load code for subsequent routes immediately, if they are as\n\t\t\t// likely to match the current path/query as the current one\n\t\t\tlet j = i + 1;\n\t\t\twhile (j < info.routes.length) {\n\t\t\t\tconst next = info.routes[j];\n\t\t\t\tif (next[0].toString() === route[0].toString()) {\n\t\t\t\t\t// if it's a page route\n\t\t\t\t\tif (next.length !== 1) {\n\t\t\t\t\t\tnext[1].forEach((loader) => loader());\n\t\t\t\t\t}\n\t\t\t\t\tj += 1;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst result = await this._load(\n\t\t\t\t{\n\t\t\t\t\troute,\n\t\t\t\t\tinfo\n\t\t\t\t},\n\t\t\t\tno_cache\n\t\t\t);\n\t\t\tif (result) return result;\n\t\t}\n\n\t\treturn await this._load_error({\n\t\t\tstatus: 404,\n\t\t\terror: new Error(`Not found: ${info.path}`),\n\t\t\tpath: info.path,\n\t\t\tquery: info.query\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param {{\n\t * page: import('types/page').Page;\n\t * branch: Array\n\t * }} opts\n\t */\n\tasync _get_navigation_result_from_branch({ page, branch }) {\n\t\tconst filtered = /** @type {import('./types').BranchNode[] } */ (branch.filter(Boolean));\n\t\tconst redirect = filtered.find((f) => f.loaded && f.loaded.redirect);\n\n\t\t/** @type {import('./types').NavigationResult} */\n\t\tconst result = {\n\t\t\tredirect: redirect && redirect.loaded ? redirect.loaded.redirect : undefined,\n\t\t\tstate: {\n\t\t\t\tpage,\n\t\t\t\tbranch,\n\t\t\t\tsession_id: this.session_id\n\t\t\t},\n\t\t\tprops: {\n\t\t\t\tcomponents: filtered.map((node) => node.module.default)\n\t\t\t}\n\t\t};\n\n\t\tfor (let i = 0; i < filtered.length; i += 1) {\n\t\t\tconst loaded = filtered[i].loaded;\n\t\t\tresult.props[`props_${i}`] = loaded ? await loaded.props : null;\n\t\t}\n\n\t\tif (\n\t\t\t!this.current.page ||\n\t\t\tpage.path !== this.current.page.path ||\n\t\t\tpage.query.toString() !== this.current.page.query.toString()\n\t\t) {\n\t\t\tresult.props.page = page;\n\t\t}\n\n\t\tconst leaf = filtered[filtered.length - 1];\n\t\tconst maxage = leaf.loaded && leaf.loaded.maxage;\n\n\t\tif (maxage) {\n\t\t\tconst key = `${page.path}?${page.query}`;\n\t\t\tlet ready = false;\n\n\t\t\tconst clear = () => {\n\t\t\t\tif (this.cache.get(key) === result) {\n\t\t\t\t\tthis.cache.delete(key);\n\t\t\t\t}\n\n\t\t\t\tunsubscribe();\n\t\t\t\tclearTimeout(timeout);\n\t\t\t};\n\n\t\t\tconst timeout = setTimeout(clear, maxage * 1000);\n\n\t\t\tconst unsubscribe = this.stores.session.subscribe(() => {\n\t\t\t\tif (ready) clear();\n\t\t\t});\n\n\t\t\tready = true;\n\n\t\t\tthis.cache.set(key, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * @param {{\n\t * status?: number;\n\t * error?: Error;\n\t * module: CSRComponent;\n\t * page: import('types/page').Page;\n\t * stuff: Record;\n\t * }} options\n\t * @returns\n\t */\n\tasync _load_node({ status, error, module, page, stuff }) {\n\t\t/** @type {import('./types').BranchNode} */\n\t\tconst node = {\n\t\t\tmodule,\n\t\t\tuses: {\n\t\t\t\tparams: new Set(),\n\t\t\t\tpath: false,\n\t\t\t\tquery: false,\n\t\t\t\tsession: false,\n\t\t\t\tstuff: false,\n\t\t\t\tdependencies: []\n\t\t\t},\n\t\t\tloaded: null,\n\t\t\tstuff\n\t\t};\n\n\t\t/** @type {Record} */\n\t\tconst params = {};\n\t\tfor (const key in page.params) {\n\t\t\tObject.defineProperty(params, key, {\n\t\t\t\tget() {\n\t\t\t\t\tnode.uses.params.add(key);\n\t\t\t\t\treturn page.params[key];\n\t\t\t\t},\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t}\n\n\t\tconst session = this.$session;\n\n\t\tif (module.load) {\n\t\t\tconst { started } = this;\n\n\t\t\t/** @type {import('types/page').LoadInput | import('types/page').ErrorLoadInput} */\n\t\t\tconst load_input = {\n\t\t\t\tpage: {\n\t\t\t\t\thost: page.host,\n\t\t\t\t\tparams,\n\t\t\t\t\tget path() {\n\t\t\t\t\t\tnode.uses.path = true;\n\t\t\t\t\t\treturn page.path;\n\t\t\t\t\t},\n\t\t\t\t\tget query() {\n\t\t\t\t\t\tnode.uses.query = true;\n\t\t\t\t\t\treturn page.query;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tget session() {\n\t\t\t\t\tnode.uses.session = true;\n\t\t\t\t\treturn session;\n\t\t\t\t},\n\t\t\t\tget stuff() {\n\t\t\t\t\tnode.uses.stuff = true;\n\t\t\t\t\treturn { ...stuff };\n\t\t\t\t},\n\t\t\t\tfetch(resource, info) {\n\t\t\t\t\tconst url = typeof resource === 'string' ? resource : resource.url;\n\t\t\t\t\tconst { href } = new URL(url, new URL(page.path, document.baseURI));\n\t\t\t\t\tnode.uses.dependencies.push(href);\n\n\t\t\t\t\treturn started ? fetch(resource, info) : initial_fetch(resource, info);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (error) {\n\t\t\t\t/** @type {import('types/page').ErrorLoadInput} */ (load_input).status = status;\n\t\t\t\t/** @type {import('types/page').ErrorLoadInput} */ (load_input).error = error;\n\t\t\t}\n\n\t\t\tconst loaded = await module.load.call(null, load_input);\n\n\t\t\t// if the page component returns nothing from load, fall through\n\t\t\tif (!loaded) return;\n\n\t\t\tnode.loaded = normalize(loaded);\n\t\t\tif (node.loaded.stuff) node.stuff = node.loaded.stuff;\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * @param {import('./types').NavigationCandidate} selected\n\t * @param {boolean} no_cache\n\t * @returns {Promise} undefined if fallthrough\n\t */\n\tasync _load({ route, info: { path, decoded_path, query } }, no_cache) {\n\t\tconst key = `${decoded_path}?${query}`;\n\n\t\tif (!no_cache) {\n\t\t\tconst cached = this.cache.get(key);\n\t\t\tif (cached) return cached;\n\t\t}\n\n\t\tconst [pattern, a, b, get_params] = route;\n\t\tconst params = get_params\n\t\t\t? // the pattern is for the route which we've already matched to this path\n\t\t\t get_params(/** @type {RegExpExecArray} */ (pattern.exec(decoded_path)))\n\t\t\t: {};\n\n\t\tconst changed = this.current.page && {\n\t\t\tpath: path !== this.current.page.path,\n\t\t\tparams: Object.keys(params).filter((key) => this.current.page.params[key] !== params[key]),\n\t\t\tquery: query.toString() !== this.current.page.query.toString(),\n\t\t\tsession: this.session_id !== this.current.session_id\n\t\t};\n\n\t\t/** @type {import('types/page').Page} */\n\t\tconst page = { host: this.host, path, query, params };\n\n\t\t/** @type {Array} */\n\t\tlet branch = [];\n\n\t\t/** @type {Record} */\n\t\tlet stuff = {};\n\t\tlet stuff_changed = false;\n\n\t\t/** @type {number | undefined} */\n\t\tlet status = 200;\n\n\t\t/** @type {Error | undefined} */\n\t\tlet error;\n\n\t\t// preload modules\n\t\ta.forEach((loader) => loader());\n\n\t\tload: for (let i = 0; i < a.length; i += 1) {\n\t\t\t/** @type {import('./types').BranchNode | undefined} */\n\t\t\tlet node;\n\n\t\t\ttry {\n\t\t\t\tif (!a[i]) continue;\n\n\t\t\t\tconst module = await a[i]();\n\t\t\t\tconst previous = this.current.branch[i];\n\n\t\t\t\tconst changed_since_last_render =\n\t\t\t\t\t!previous ||\n\t\t\t\t\tmodule !== previous.module ||\n\t\t\t\t\t(changed.path && previous.uses.path) ||\n\t\t\t\t\tchanged.params.some((param) => previous.uses.params.has(param)) ||\n\t\t\t\t\t(changed.query && previous.uses.query) ||\n\t\t\t\t\t(changed.session && previous.uses.session) ||\n\t\t\t\t\tprevious.uses.dependencies.some((dep) => this.invalid.has(dep)) ||\n\t\t\t\t\t(stuff_changed && previous.uses.stuff);\n\n\t\t\t\tif (changed_since_last_render) {\n\t\t\t\t\tnode = await this._load_node({\n\t\t\t\t\t\tmodule,\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\tstuff\n\t\t\t\t\t});\n\n\t\t\t\t\tconst is_leaf = i === a.length - 1;\n\n\t\t\t\t\tif (node && node.loaded) {\n\t\t\t\t\t\tif (node.loaded.error) {\n\t\t\t\t\t\t\tstatus = node.loaded.status;\n\t\t\t\t\t\t\terror = node.loaded.error;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.loaded.redirect) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tredirect: node.loaded.redirect,\n\t\t\t\t\t\t\t\tprops: {},\n\t\t\t\t\t\t\t\tstate: this.current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.loaded.stuff) {\n\t\t\t\t\t\t\tstuff_changed = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (is_leaf && module.load) {\n\t\t\t\t\t\t// if the leaf node has a `load` function\n\t\t\t\t\t\t// that returns nothing, fall through\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnode = previous;\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tstatus = 500;\n\t\t\t\terror = coalesce_to_error(e);\n\t\t\t}\n\n\t\t\tif (error) {\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (b[i]) {\n\t\t\t\t\t\tlet error_loaded;\n\n\t\t\t\t\t\t/** @type {import('./types').BranchNode | undefined} */\n\t\t\t\t\t\tlet node_loaded;\n\t\t\t\t\t\tlet j = i;\n\t\t\t\t\t\twhile (!(node_loaded = branch[j])) {\n\t\t\t\t\t\t\tj -= 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\terror_loaded = await this._load_node({\n\t\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\t\tmodule: await b[i](),\n\t\t\t\t\t\t\t\tpage,\n\t\t\t\t\t\t\t\tstuff: node_loaded.stuff\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (error_loaded && error_loaded.loaded && error_loaded.loaded.error) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbranch = branch.slice(0, j + 1).concat(error_loaded);\n\t\t\t\t\t\t\tbreak load;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn await this._load_error({\n\t\t\t\t\tstatus,\n\t\t\t\t\terror,\n\t\t\t\t\tpath,\n\t\t\t\t\tquery\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (node && node.loaded && node.loaded.stuff) {\n\t\t\t\t\tstuff = {\n\t\t\t\t\t\t...stuff,\n\t\t\t\t\t\t...node.loaded.stuff\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tbranch.push(node);\n\t\t\t}\n\t\t}\n\n\t\treturn await this._get_navigation_result_from_branch({ page, branch });\n\t}\n\n\t/**\n\t * @param {{\n\t * status?: number;\n\t * error: Error;\n\t * path: string;\n\t * query: URLSearchParams\n\t * }} opts\n\t */\n\tasync _load_error({ status, error, path, query }) {\n\t\tconst page = {\n\t\t\thost: this.host,\n\t\t\tpath,\n\t\t\tquery,\n\t\t\tparams: {}\n\t\t};\n\n\t\tconst node = await this._load_node({\n\t\t\tmodule: await this.fallback[0],\n\t\t\tpage,\n\t\t\tstuff: {}\n\t\t});\n\n\t\tconst branch = [\n\t\t\tnode,\n\t\t\tawait this._load_node({\n\t\t\t\tstatus,\n\t\t\t\terror,\n\t\t\t\tmodule: await this.fallback[1],\n\t\t\t\tpage,\n\t\t\t\tstuff: (node && node.loaded && node.loaded.stuff) || {}\n\t\t\t})\n\t\t];\n\n\t\treturn await this._get_navigation_result_from_branch({ page, branch });\n\t}\n}\n\n// @ts-expect-error - value will be replaced on build step\n\n/**\n * @param {{\n * paths: {\n * assets: string;\n * base: string;\n * },\n * target: Node;\n * session: any;\n * host: string;\n * route: boolean;\n * spa: boolean;\n * trailing_slash: import('types/internal').TrailingSlash;\n * hydrate: {\n * status: number;\n * error: Error;\n * nodes: Array>;\n * page: import('types/page').Page;\n * };\n * }} opts\n */\nasync function start({ paths, target, session, host, route, spa, trailing_slash, hydrate }) {\n\tif (import.meta.env.DEV && !target) {\n\t\tthrow new Error('Missing target element. See https://kit.svelte.dev/docs#configuration-target');\n\t}\n\n\tconst renderer = new Renderer({\n\t\tRoot,\n\t\tfallback,\n\t\ttarget,\n\t\tsession,\n\t\thost\n\t});\n\n\tconst router = route\n\t\t? new Router({\n\t\t\t\tbase: paths.base,\n\t\t\t\troutes,\n\t\t\t\ttrailing_slash,\n\t\t\t\trenderer\n\t\t })\n\t\t: null;\n\n\tinit(router);\n\tset_paths(paths);\n\n\tif (hydrate) await renderer.start(hydrate);\n\tif (router) {\n\t\tif (spa) router.goto(location.href, { replaceState: true }, []);\n\t\trouter.init_listeners();\n\t}\n\n\tdispatchEvent(new CustomEvent('sveltekit:start'));\n}\n\nexport { start };\n"],"names":["base"],"mappings":"+3BAqC8C,gBAApB,KAAW,gRAAS,4DAApB,KAAW,oSAEW,gBAApB,KAAW,yOAAS,yBAApB,KAAW,2RAD/B,KAAW,mGAAX,KAAW,iMAFb,KAAW,mGAAX,KAAW,8LAWV,oSADN,gCACM,6HACH,mBAAA,0CAAA,0DAbwC,gBAApB,KAAW,iJAU9B,wMAVuC,4DAApB,KAAW,kKAU9B,gNAxCO,aACA,WAEA,iBACA,UAAU,SACV,UAAU,SACV,UAAU,QAErB,GAAW,aAAc,GAGzB,GAAY,EAAO,KAAK,WAEpB,GAAU,GACV,EAAY,GACZ,EAAQ,KAEZ,oBACO,GAAc,EAAO,KAAK,eAC3B,QACH,EAAY,QACZ,EAAQ,SAAS,OAAS,+BAI5B,EAAU,IACH,gPAhBL,EAAO,KAAK,IAAI,qJCfpB,KAAM,IAAY,gBAAsB,GAAO,GAASA,GAAO,SAAsB,EAAgB,SAAiB,EAAY,EAAM,CAEpI,MAAI,AAAuB,CAAC,GAAQ,EAAK,SAAW,EACzC,IAEJ,QAAQ,IAAI,EAAK,IAAI,AAAC,GAAQ,CAIjC,GAFA,EAAM,GAAGA,KAAO,IAEZ,IAAO,IACP,OAEJ,GAAK,GAAO,GACZ,KAAM,GAAQ,EAAI,SAAS,QACrB,EAAc,EAAQ,qBAAuB,GAEnD,GAAI,SAAS,cAAc,cAAc,MAAQ,KAC7C,OAGJ,KAAM,GAAO,SAAS,cAAc,QAUpC,GARA,EAAK,IA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