{"version":3,"file":"start.a25e4d08.js","sources":["../../../../../../node_modules/@sveltejs/kit/src/utils/url.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/hash.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/fetcher.js","../../../../../../node_modules/@sveltejs/kit/src/utils/routing.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/parse.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/session-storage.js","../../../../../../node_modules/devalue/src/constants.js","../../../../../../node_modules/devalue/src/parse.js","../../../../../../node_modules/@sveltejs/kit/src/utils/array.js","../../../../../../node_modules/@sveltejs/kit/src/utils/exports.js","../../../../../../node_modules/@sveltejs/kit/src/utils/promises.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/shared.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/client.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/start.js"],"sourcesContent":["import { BROWSER } from 'esm-env';\n\n/**\n * Matches a URI scheme. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1\n * @type {RegExp}\n */\nexport const SCHEME = /^[a-z][a-z\\d+\\-.]+:/i;\n\nconst absolute = /^([a-z]+:)?\\/?\\//;\n\n/**\n * @param {string} base\n * @param {string} path\n */\nexport function resolve(base, path) {\n\tif (SCHEME.test(path)) return path;\n\tif (path[0] === '#') return base + path;\n\n\tconst base_match = absolute.exec(base);\n\tconst path_match = absolute.exec(path);\n\n\tif (!base_match) {\n\t\tthrow new Error(`bad base path: \"${base}\"`);\n\t}\n\n\tconst baseparts = path_match ? [] : base.slice(base_match[0].length).split('/');\n\tconst pathparts = path_match ? path.slice(path_match[0].length).split('/') : path.split('/');\n\n\tbaseparts.pop();\n\n\tfor (let i = 0; i < pathparts.length; i += 1) {\n\t\tconst part = pathparts[i];\n\t\tif (part === '.') continue;\n\t\telse if (part === '..') baseparts.pop();\n\t\telse baseparts.push(part);\n\t}\n\n\tconst prefix = (path_match && path_match[0]) || (base_match && base_match[0]) || '';\n\n\treturn `${prefix}${baseparts.join('/')}`;\n}\n\n/** @param {string} path */\nexport function is_root_relative(path) {\n\treturn path[0] === '/' && path[1] !== '/';\n}\n\n/**\n * @param {string} path\n * @param {import('types').TrailingSlash} trailing_slash\n */\nexport function normalize_path(path, trailing_slash) {\n\tif (path === '/' || trailing_slash === 'ignore') return path;\n\n\tif (trailing_slash === 'never') {\n\t\treturn path.endsWith('/') ? path.slice(0, -1) : path;\n\t} else if (trailing_slash === 'always' && !path.endsWith('/')) {\n\t\treturn path + '/';\n\t}\n\n\treturn path;\n}\n\n/**\n * Decode pathname excluding %25 to prevent further double decoding of params\n * @param {string} pathname\n */\nexport function decode_pathname(pathname) {\n\treturn pathname.split('%25').map(decodeURI).join('%25');\n}\n\n/** @param {Record} params */\nexport function decode_params(params) {\n\tfor (const key in params) {\n\t\t// input has already been decoded by decodeURI\n\t\t// now handle the rest\n\t\tparams[key] = decodeURIComponent(params[key]);\n\t}\n\n\treturn params;\n}\n\n/**\n * The error when a URL is malformed is not very helpful, so we augment it with the URI\n * @param {string} uri\n */\nexport function decode_uri(uri) {\n\ttry {\n\t\treturn decodeURI(uri);\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\te.message = `Failed to decode URI: ${uri}\\n` + e.message;\n\t\t}\n\t\tthrow e;\n\t}\n}\n\n/**\n * URL properties that could change during the lifetime of the page,\n * which excludes things like `origin`\n */\nconst tracked_url_properties = /** @type {const} */ ([\n\t'href',\n\t'pathname',\n\t'search',\n\t'searchParams',\n\t'toString',\n\t'toJSON'\n]);\n\n/**\n * @param {URL} url\n * @param {() => void} callback\n */\nexport function make_trackable(url, callback) {\n\tconst tracked = new URL(url);\n\n\tfor (const property of tracked_url_properties) {\n\t\tObject.defineProperty(tracked, property, {\n\t\t\tget() {\n\t\t\t\tcallback();\n\t\t\t\treturn url[property];\n\t\t\t},\n\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n\n\tif (!BROWSER) {\n\t\t// @ts-ignore\n\t\ttracked[Symbol.for('nodejs.util.inspect.custom')] = (depth, opts, inspect) => {\n\t\t\treturn inspect(url, opts);\n\t\t};\n\t}\n\n\tdisable_hash(tracked);\n\n\treturn tracked;\n}\n\n/**\n * Disallow access to `url.hash` on the server and in `load`\n * @param {URL} url\n */\nexport function disable_hash(url) {\n\tallow_nodejs_console_log(url);\n\n\tObject.defineProperty(url, 'hash', {\n\t\tget() {\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead'\n\t\t\t);\n\t\t}\n\t});\n}\n\n/**\n * Disallow access to `url.search` and `url.searchParams` during prerendering\n * @param {URL} url\n */\nexport function disable_search(url) {\n\tallow_nodejs_console_log(url);\n\n\tfor (const property of ['search', 'searchParams']) {\n\t\tObject.defineProperty(url, property, {\n\t\t\tget() {\n\t\t\t\tthrow new Error(`Cannot access url.${property} on a page with prerendering enabled`);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/**\n * Allow URL to be console logged, bypassing disabled properties.\n * @param {URL} url\n */\nfunction allow_nodejs_console_log(url) {\n\tif (!BROWSER) {\n\t\t// @ts-ignore\n\t\turl[Symbol.for('nodejs.util.inspect.custom')] = (depth, opts, inspect) => {\n\t\t\treturn inspect(new URL(url), opts);\n\t\t};\n\t}\n}\n\nconst DATA_SUFFIX = '/__data.json';\n\n/** @param {string} pathname */\nexport function has_data_suffix(pathname) {\n\treturn pathname.endsWith(DATA_SUFFIX);\n}\n\n/** @param {string} pathname */\nexport function add_data_suffix(pathname) {\n\treturn pathname.replace(/\\/$/, '') + DATA_SUFFIX;\n}\n\n/** @param {string} pathname */\nexport function strip_data_suffix(pathname) {\n\treturn pathname.slice(0, -DATA_SUFFIX.length);\n}\n","/**\n * Hash using djb2\n * @param {import('types').StrictBody[]} values\n */\nexport function hash(...values) {\n\tlet hash = 5381;\n\n\tfor (const value of values) {\n\t\tif (typeof value === 'string') {\n\t\t\tlet i = value.length;\n\t\t\twhile (i) hash = (hash * 33) ^ value.charCodeAt(--i);\n\t\t} else if (ArrayBuffer.isView(value)) {\n\t\t\tconst buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\n\t\t\tlet i = buffer.length;\n\t\t\twhile (i) hash = (hash * 33) ^ buffer[--i];\n\t\t} else {\n\t\t\tthrow new TypeError('value must be a string or TypedArray');\n\t\t}\n\t}\n\n\treturn (hash >>> 0).toString(36);\n}\n","import { DEV } from 'esm-env';\nimport { hash } from '../hash.js';\n\nlet loading = 0;\n\nexport const native_fetch = window.fetch;\n\nexport function lock_fetch() {\n\tloading += 1;\n}\n\nexport function unlock_fetch() {\n\tloading -= 1;\n}\n\nif (DEV) {\n\tlet can_inspect_stack_trace = false;\n\n\tconst check_stack_trace = async () => {\n\t\tconst stack = /** @type {string} */ (new Error().stack);\n\t\tcan_inspect_stack_trace = stack.includes('check_stack_trace');\n\t};\n\n\tcheck_stack_trace();\n\n\twindow.fetch = (input, init) => {\n\t\t// Check if fetch was called via load_node. the lock method only checks if it was called at the\n\t\t// same time, but not necessarily if it was called from `load`.\n\t\t// We use just the filename as the method name sometimes does not appear on the CI.\n\t\tconst url = input instanceof Request ? input.url : input.toString();\n\t\tconst stack_array = /** @type {string} */ (new Error().stack).split('\\n');\n\t\t// We need to do a cutoff because Safari and Firefox maintain the stack\n\t\t// across events and for example traces a `fetch` call triggered from a button\n\t\t// back to the creation of the event listener and the element creation itself,\n\t\t// where at some point client.js will show up, leading to false positives.\n\t\tconst cutoff = stack_array.findIndex((a) => a.includes('load@') || a.includes('at load'));\n\t\tconst stack = stack_array.slice(0, cutoff + 2).join('\\n');\n\n\t\tconst heuristic = can_inspect_stack_trace\n\t\t\t? stack.includes('src/runtime/client/client.js')\n\t\t\t: loading;\n\t\tif (heuristic) {\n\t\t\tconsole.warn(\n\t\t\t\t`Loading ${url} using \\`window.fetch\\`. For best results, use the \\`fetch\\` that is passed to your \\`load\\` function: https://kit.svelte.dev/docs/load#making-fetch-requests`\n\t\t\t);\n\t\t}\n\n\t\tconst method = input instanceof Request ? input.method : init?.method || 'GET';\n\n\t\tif (method !== 'GET') {\n\t\t\tcache.delete(build_selector(input));\n\t\t}\n\n\t\treturn native_fetch(input, init);\n\t};\n} else {\n\twindow.fetch = (input, init) => {\n\t\tconst method = input instanceof Request ? input.method : init?.method || 'GET';\n\n\t\tif (method !== 'GET') {\n\t\t\tcache.delete(build_selector(input));\n\t\t}\n\n\t\treturn native_fetch(input, init);\n\t};\n}\n\nconst cache = new Map();\n\n/**\n * Should be called on the initial run of load functions that hydrate the page.\n * Saves any requests with cache-control max-age to the cache.\n * @param {URL | string} resource\n * @param {RequestInit} [opts]\n */\nexport function initial_fetch(resource, opts) {\n\tconst selector = build_selector(resource, opts);\n\n\tconst script = document.querySelector(selector);\n\tif (script?.textContent) {\n\t\tconst { body, ...init } = JSON.parse(script.textContent);\n\n\t\tconst ttl = script.getAttribute('data-ttl');\n\t\tif (ttl) cache.set(selector, { body, init, ttl: 1000 * Number(ttl) });\n\n\t\treturn Promise.resolve(new Response(body, init));\n\t}\n\n\treturn native_fetch(resource, opts);\n}\n\n/**\n * Tries to get the response from the cache, if max-age allows it, else does a fetch.\n * @param {URL | string} resource\n * @param {string} resolved\n * @param {RequestInit} [opts]\n */\nexport function subsequent_fetch(resource, resolved, opts) {\n\tif (cache.size > 0) {\n\t\tconst selector = build_selector(resource, opts);\n\t\tconst cached = cache.get(selector);\n\t\tif (cached) {\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value\n\t\t\tif (\n\t\t\t\tperformance.now() < cached.ttl &&\n\t\t\t\t['default', 'force-cache', 'only-if-cached', undefined].includes(opts?.cache)\n\t\t\t) {\n\t\t\t\treturn new Response(cached.body, cached.init);\n\t\t\t}\n\n\t\t\tcache.delete(selector);\n\t\t}\n\t}\n\n\treturn native_fetch(resolved, opts);\n}\n\n/**\n * Build the cache key for a given request\n * @param {URL | RequestInfo} resource\n * @param {RequestInit} [opts]\n */\nfunction build_selector(resource, opts) {\n\tconst url = JSON.stringify(resource instanceof Request ? resource.url : resource);\n\n\tlet selector = `script[data-sveltekit-fetched][data-url=${url}]`;\n\n\tif (opts?.headers || opts?.body) {\n\t\t/** @type {import('types').StrictBody[]} */\n\t\tconst values = [];\n\n\t\tif (opts.headers) {\n\t\t\tvalues.push([...new Headers(opts.headers)].join(','));\n\t\t}\n\n\t\tif (opts.body && (typeof opts.body === 'string' || ArrayBuffer.isView(opts.body))) {\n\t\t\tvalues.push(opts.body);\n\t\t}\n\n\t\tselector += `[data-hash=\"${hash(...values)}\"]`;\n\t}\n\n\treturn selector;\n}\n","const param_pattern = /^(\\[)?(\\.\\.\\.)?(\\w+)(?:=(\\w+))?(\\])?$/;\n\n/**\n * Creates the regex pattern, extracts parameter names, and generates types for a route\n * @param {string} id\n */\nexport function parse_route_id(id) {\n\t/** @type {import('types').RouteParam[]} */\n\tconst params = [];\n\n\tconst pattern =\n\t\tid === '/'\n\t\t\t? /^\\/$/\n\t\t\t: new RegExp(\n\t\t\t\t\t`^${get_route_segments(id)\n\t\t\t\t\t\t.map((segment) => {\n\t\t\t\t\t\t\t// special case — /[...rest]/ could contain zero segments\n\t\t\t\t\t\t\tconst rest_match = /^\\[\\.\\.\\.(\\w+)(?:=(\\w+))?\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (rest_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: rest_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: rest_match[2],\n\t\t\t\t\t\t\t\t\toptional: false,\n\t\t\t\t\t\t\t\t\trest: true,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/(.*))?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// special case — /[[optional]]/ could contain zero segments\n\t\t\t\t\t\t\tconst optional_match = /^\\[\\[(\\w+)(?:=(\\w+))?\\]\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (optional_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: optional_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: optional_match[2],\n\t\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\t\trest: false,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/([^/]+))?';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!segment) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst parts = segment.split(/\\[(.+?)\\](?!\\])/);\n\t\t\t\t\t\t\tconst result = parts\n\t\t\t\t\t\t\t\t.map((content, i) => {\n\t\t\t\t\t\t\t\t\tif (i % 2) {\n\t\t\t\t\t\t\t\t\t\tif (content.startsWith('x+')) {\n\t\t\t\t\t\t\t\t\t\t\treturn escape(String.fromCharCode(parseInt(content.slice(2), 16)));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (content.startsWith('u+')) {\n\t\t\t\t\t\t\t\t\t\t\treturn escape(\n\t\t\t\t\t\t\t\t\t\t\t\tString.fromCharCode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t...content\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.slice(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.split('-')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map((code) => parseInt(code, 16))\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconst match = param_pattern.exec(content);\n\t\t\t\t\t\t\t\t\t\tif (!match) {\n\t\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t\t`Invalid param: ${content}. Params and matcher names can only have underscores and alphanumeric characters.`\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconst [, is_optional, is_rest, name, matcher] = match;\n\t\t\t\t\t\t\t\t\t\t// It's assumed that the following invalid route id cases are already checked\n\t\t\t\t\t\t\t\t\t\t// - unbalanced brackets\n\t\t\t\t\t\t\t\t\t\t// - optional param following rest param\n\n\t\t\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\tmatcher,\n\t\t\t\t\t\t\t\t\t\t\toptional: !!is_optional,\n\t\t\t\t\t\t\t\t\t\t\trest: !!is_rest,\n\t\t\t\t\t\t\t\t\t\t\tchained: is_rest ? i === 1 && parts[0] === '' : false\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\treturn is_rest ? '(.*?)' : is_optional ? '([^/]*)?' : '([^/]+?)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn escape(content);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.join('');\n\n\t\t\t\t\t\t\treturn '/' + result;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join('')}/?$`\n\t\t\t );\n\n\treturn { pattern, params };\n}\n\nconst optional_param_regex = /\\/\\[\\[\\w+?(?:=\\w+)?\\]\\]/;\n\n/**\n * Removes optional params from a route ID.\n * @param {string} id\n * @returns The route id with optional params removed\n */\nexport function remove_optional_params(id) {\n\treturn id.replace(optional_param_regex, '');\n}\n\n/**\n * Returns `false` for `(group)` segments\n * @param {string} segment\n */\nfunction affects_path(segment) {\n\treturn !/^\\([^)]+\\)$/.test(segment);\n}\n\n/**\n * Splits a route id into its segments, removing segments that\n * don't affect the path (i.e. groups). The root route is represented by `/`\n * and will be returned as `['']`.\n * @param {string} route\n * @returns string[]\n */\nexport function get_route_segments(route) {\n\treturn route.slice(1).split('/').filter(affects_path);\n}\n\n/**\n * @param {RegExpMatchArray} match\n * @param {import('types').RouteParam[]} params\n * @param {Record} matchers\n */\nexport function exec(match, params, matchers) {\n\t/** @type {Record} */\n\tconst result = {};\n\n\tconst values = match.slice(1);\n\n\tlet buffered = 0;\n\n\tfor (let i = 0; i < params.length; i += 1) {\n\t\tconst param = params[i];\n\t\tlet value = values[i - buffered];\n\n\t\t// in the `[[a=b]]/.../[...rest]` case, if one or more optional parameters\n\t\t// weren't matched, roll the skipped values into the rest\n\t\tif (param.chained && param.rest && buffered) {\n\t\t\tvalue = values\n\t\t\t\t.slice(i - buffered, i + 1)\n\t\t\t\t.filter((s) => s)\n\t\t\t\t.join('/');\n\n\t\t\tbuffered = 0;\n\t\t}\n\n\t\t// if `value` is undefined, it means this is an optional or rest parameter\n\t\tif (value === undefined) {\n\t\t\tif (param.rest) result[param.name] = '';\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!param.matcher || matchers[param.matcher](value)) {\n\t\t\tresult[param.name] = value;\n\n\t\t\t// Now that the params match, reset the buffer if the next param isn't the [...rest]\n\t\t\t// and the next value is defined, otherwise the buffer will cause us to skip values\n\t\t\tconst next_param = params[i + 1];\n\t\t\tconst next_value = values[i + 1];\n\t\t\tif (next_param && !next_param.rest && next_param.optional && next_value && param.chained) {\n\t\t\t\tbuffered = 0;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\t// in the `/[[a=b]]/...` case, if the value didn't satisfy the matcher,\n\t\t// keep track of the number of skipped optional parameters and continue\n\t\tif (param.optional && param.chained) {\n\t\t\tbuffered++;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// otherwise, if the matcher returns `false`, the route did not match\n\t\treturn;\n\t}\n\n\tif (buffered) return;\n\treturn result;\n}\n\n/** @param {string} str */\nfunction escape(str) {\n\treturn (\n\t\tstr\n\t\t\t.normalize()\n\t\t\t// escape [ and ] before escaping other characters, since they are used in the replacements\n\t\t\t.replace(/[[\\]]/g, '\\\\$&')\n\t\t\t// replace %, /, ? and # with their encoded versions because decode_pathname leaves them untouched\n\t\t\t.replace(/%/g, '%25')\n\t\t\t.replace(/\\//g, '%2[Ff]')\n\t\t\t.replace(/\\?/g, '%3[Ff]')\n\t\t\t.replace(/#/g, '%23')\n\t\t\t// escape characters that have special meaning in regex\n\t\t\t.replace(/[.*+?^${}()|\\\\]/g, '\\\\$&')\n\t);\n}\n","import { exec, parse_route_id } from '../../utils/routing.js';\n\n/**\n * @param {import('./types').SvelteKitApp} app\n * @returns {import('types').CSRRoute[]}\n */\nexport function parse({ nodes, server_loads, dictionary, matchers }) {\n\tconst layouts_with_server_load = new Set(server_loads);\n\n\treturn Object.entries(dictionary).map(([id, [leaf, layouts, errors]]) => {\n\t\tconst { pattern, params } = parse_route_id(id);\n\n\t\tconst route = {\n\t\t\tid,\n\t\t\t/** @param {string} path */\n\t\t\texec: (path) => {\n\t\t\t\tconst match = pattern.exec(path);\n\t\t\t\tif (match) return exec(match, params, matchers);\n\t\t\t},\n\t\t\terrors: [1, ...(errors || [])].map((n) => nodes[n]),\n\t\t\tlayouts: [0, ...(layouts || [])].map(create_layout_loader),\n\t\t\tleaf: create_leaf_loader(leaf)\n\t\t};\n\n\t\t// bit of a hack, but ensures that layout/error node lists are the same\n\t\t// length, without which the wrong data will be applied if the route\n\t\t// manifest looks like `[[a, b], [c,], d]`\n\t\troute.errors.length = route.layouts.length = Math.max(\n\t\t\troute.errors.length,\n\t\t\troute.layouts.length\n\t\t);\n\n\t\treturn route;\n\t});\n\n\t/**\n\t * @param {number} id\n\t * @returns {[boolean, import('types').CSRPageNodeLoader]}\n\t */\n\tfunction create_leaf_loader(id) {\n\t\t// whether or not the route uses the server data is\n\t\t// encoded using the ones' complement, to save space\n\t\tconst uses_server_data = id < 0;\n\t\tif (uses_server_data) id = ~id;\n\t\treturn [uses_server_data, nodes[id]];\n\t}\n\n\t/**\n\t * @param {number | undefined} id\n\t * @returns {[boolean, import('types').CSRPageNodeLoader] | undefined}\n\t */\n\tfunction create_layout_loader(id) {\n\t\t// whether or not the layout uses the server data is\n\t\t// encoded in the layouts array, to save space\n\t\treturn id === undefined ? id : [layouts_with_server_load.has(id), nodes[id]];\n\t}\n}\n","/**\n * Read a value from `sessionStorage`\n * @param {string} key\n */\nexport function get(key) {\n\ttry {\n\t\treturn JSON.parse(sessionStorage[key]);\n\t} catch {\n\t\t// do nothing\n\t}\n}\n\n/**\n * Write a value to `sessionStorage`\n * @param {string} key\n * @param {any} value\n */\nexport function set(key, value) {\n\tconst json = JSON.stringify(value);\n\ttry {\n\t\tsessionStorage[key] = json;\n\t} catch {\n\t\t// do nothing\n\t}\n}\n","export const UNDEFINED = -1;\nexport const HOLE = -2;\nexport const NAN = -3;\nexport const POSITIVE_INFINITY = -4;\nexport const NEGATIVE_INFINITY = -5;\nexport const NEGATIVE_ZERO = -6;\n","import {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tUNDEFINED\n} from './constants.js';\n\n/**\n * Revive a value serialized with `devalue.stringify`\n * @param {string} serialized\n * @param {Record any>} [revivers]\n */\nexport function parse(serialized, revivers) {\n\treturn unflatten(JSON.parse(serialized), revivers);\n}\n\n/**\n * Revive a value flattened with `devalue.stringify`\n * @param {number | any[]} parsed\n * @param {Record any>} [revivers]\n */\nexport function unflatten(parsed, revivers) {\n\tif (typeof parsed === 'number') return hydrate(parsed, true);\n\n\tif (!Array.isArray(parsed) || parsed.length === 0) {\n\t\tthrow new Error('Invalid input');\n\t}\n\n\tconst values = /** @type {any[]} */ (parsed);\n\n\tconst hydrated = Array(values.length);\n\n\t/**\n\t * @param {number} index\n\t * @returns {any}\n\t */\n\tfunction hydrate(index, standalone = false) {\n\t\tif (index === UNDEFINED) return undefined;\n\t\tif (index === NAN) return NaN;\n\t\tif (index === POSITIVE_INFINITY) return Infinity;\n\t\tif (index === NEGATIVE_INFINITY) return -Infinity;\n\t\tif (index === NEGATIVE_ZERO) return -0;\n\n\t\tif (standalone) throw new Error(`Invalid input`);\n\n\t\tif (index in hydrated) return hydrated[index];\n\n\t\tconst value = values[index];\n\n\t\tif (!value || typeof value !== 'object') {\n\t\t\thydrated[index] = value;\n\t\t} else if (Array.isArray(value)) {\n\t\t\tif (typeof value[0] === 'string') {\n\t\t\t\tconst type = value[0];\n\n\t\t\t\tconst reviver = revivers?.[type];\n\t\t\t\tif (reviver) {\n\t\t\t\t\treturn (hydrated[index] = reviver(hydrate(value[1])));\n\t\t\t\t}\n\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'Date':\n\t\t\t\t\t\thydrated[index] = new Date(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Set':\n\t\t\t\t\t\tconst set = new Set();\n\t\t\t\t\t\thydrated[index] = set;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 1) {\n\t\t\t\t\t\t\tset.add(hydrate(value[i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Map':\n\t\t\t\t\t\tconst map = new Map();\n\t\t\t\t\t\thydrated[index] = map;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tmap.set(hydrate(value[i]), hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'RegExp':\n\t\t\t\t\t\thydrated[index] = new RegExp(value[1], value[2]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Object':\n\t\t\t\t\t\thydrated[index] = Object(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'BigInt':\n\t\t\t\t\t\thydrated[index] = BigInt(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\tconst obj = Object.create(null);\n\t\t\t\t\t\thydrated[index] = obj;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tobj[value[i]] = hydrate(value[i + 1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Error(`Unknown type ${type}`);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst array = new Array(value.length);\n\t\t\t\thydrated[index] = array;\n\n\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\tconst n = value[i];\n\t\t\t\t\tif (n === HOLE) continue;\n\n\t\t\t\t\tarray[i] = hydrate(n);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t/** @type {Record} */\n\t\t\tconst object = {};\n\t\t\thydrated[index] = object;\n\n\t\t\tfor (const key in value) {\n\t\t\t\tconst n = value[key];\n\t\t\t\tobject[key] = hydrate(n);\n\t\t\t}\n\t\t}\n\n\t\treturn hydrated[index];\n\t}\n\n\treturn hydrate(0);\n}\n","/**\n * Removes nullish values from an array.\n *\n * @template T\n * @param {Array} arr\n */\nexport function compact(arr) {\n\treturn arr.filter(/** @returns {val is NonNullable} */ (val) => val != null);\n}\n","/**\n * @param {Set} expected\n */\nfunction validator(expected) {\n\t/**\n\t * @param {any} module\n\t * @param {string} [file]\n\t */\n\tfunction validate(module, file) {\n\t\tif (!module) return;\n\n\t\tfor (const key in module) {\n\t\t\tif (key[0] === '_' || expected.has(key)) continue; // key is valid in this module\n\n\t\t\tconst values = [...expected.values()];\n\n\t\t\tconst hint =\n\t\t\t\thint_for_supported_files(key, file?.slice(file.lastIndexOf('.'))) ??\n\t\t\t\t`valid exports are ${values.join(', ')}, or anything with a '_' prefix`;\n\n\t\t\tthrow new Error(`Invalid export '${key}'${file ? ` in ${file}` : ''} (${hint})`);\n\t\t}\n\t}\n\n\treturn validate;\n}\n\n/**\n * @param {string} key\n * @param {string} ext\n * @returns {string | void}\n */\nfunction hint_for_supported_files(key, ext = '.js') {\n\tconst supported_files = [];\n\n\tif (valid_layout_exports.has(key)) {\n\t\tsupported_files.push(`+layout${ext}`);\n\t}\n\n\tif (valid_page_exports.has(key)) {\n\t\tsupported_files.push(`+page${ext}`);\n\t}\n\n\tif (valid_layout_server_exports.has(key)) {\n\t\tsupported_files.push(`+layout.server${ext}`);\n\t}\n\n\tif (valid_page_server_exports.has(key)) {\n\t\tsupported_files.push(`+page.server${ext}`);\n\t}\n\n\tif (valid_server_exports.has(key)) {\n\t\tsupported_files.push(`+server${ext}`);\n\t}\n\n\tif (supported_files.length > 0) {\n\t\treturn `'${key}' is a valid export in ${supported_files.slice(0, -1).join(', ')}${\n\t\t\tsupported_files.length > 1 ? ' or ' : ''\n\t\t}${supported_files.at(-1)}`;\n\t}\n}\n\nconst valid_layout_exports = new Set([\n\t'load',\n\t'prerender',\n\t'csr',\n\t'ssr',\n\t'trailingSlash',\n\t'config'\n]);\nconst valid_page_exports = new Set([...valid_layout_exports, 'entries']);\nconst valid_layout_server_exports = new Set([...valid_layout_exports]);\nconst valid_page_server_exports = new Set([...valid_layout_server_exports, 'actions', 'entries']);\nconst valid_server_exports = new Set([\n\t'GET',\n\t'POST',\n\t'PATCH',\n\t'PUT',\n\t'DELETE',\n\t'OPTIONS',\n\t'HEAD',\n\t'fallback',\n\t'prerender',\n\t'trailingSlash',\n\t'config',\n\t'entries'\n]);\n\nexport const validate_layout_exports = validator(valid_layout_exports);\nexport const validate_page_exports = validator(valid_page_exports);\nexport const validate_layout_server_exports = validator(valid_layout_server_exports);\nexport const validate_page_server_exports = validator(valid_page_server_exports);\nexport const validate_server_exports = validator(valid_server_exports);\n","/**\n * Given an object, return a new object where all top level values are awaited\n *\n * @param {Record} object\n * @returns {Promise>}\n */\nexport async function unwrap_promises(object) {\n\tfor (const key in object) {\n\t\tif (typeof object[key]?.then === 'function') {\n\t\t\treturn Object.fromEntries(\n\t\t\t\tawait Promise.all(Object.entries(object).map(async ([key, value]) => [key, await value]))\n\t\t\t);\n\t\t}\n\t}\n\n\treturn object;\n}\n","/**\n * @param {string} route_id\n * @param {string} dep\n */\nexport function validate_depends(route_id, dep) {\n\tconst match = /^(moz-icon|view-source|jar):/.exec(dep);\n\tif (match) {\n\t\tconsole.warn(\n\t\t\t`${route_id}: Calling \\`depends('${dep}')\\` will throw an error in Firefox because \\`${match[1]}\\` is a special URI scheme`\n\t\t);\n\t}\n}\n\nexport const INVALIDATED_PARAM = 'x-sveltekit-invalidated';\n\nexport const TRAILING_SLASH_PARAM = 'x-sveltekit-trailing-slash';\n","import { DEV } from 'esm-env';\nimport { onMount, tick } from 'svelte';\nimport {\n\tadd_data_suffix,\n\tdecode_params,\n\tdecode_pathname,\n\tmake_trackable,\n\tnormalize_path\n} from '../../utils/url.js';\nimport {\n\tinitial_fetch,\n\tlock_fetch,\n\tnative_fetch,\n\tsubsequent_fetch,\n\tunlock_fetch\n} from './fetcher.js';\nimport { parse } from './parse.js';\nimport * as storage from './session-storage.js';\nimport {\n\tfind_anchor,\n\tget_base_uri,\n\tget_link_info,\n\tget_router_options,\n\tis_external_url,\n\tscroll_state\n} from './utils.js';\n\nimport { base } from '__sveltekit/paths';\nimport * as devalue from 'devalue';\nimport { compact } from '../../utils/array.js';\nimport { validate_page_exports } from '../../utils/exports.js';\nimport { unwrap_promises } from '../../utils/promises.js';\nimport { HttpError, Redirect } from '../control.js';\nimport { INVALIDATED_PARAM, TRAILING_SLASH_PARAM, validate_depends } from '../shared.js';\nimport { INDEX_KEY, PRELOAD_PRIORITIES, SCROLL_KEY, SNAPSHOT_KEY } from './constants.js';\nimport { stores } from './singletons.js';\n\nlet errored = false;\n\n// We track the scroll position associated with each history entry in sessionStorage,\n// rather than on history.state itself, because when navigation is driven by\n// popstate it's too late to update the scroll position associated with the\n// state we're navigating from\n\n/** @typedef {{ x: number, y: number }} ScrollPosition */\n/** @type {Record} */\nconst scroll_positions = storage.get(SCROLL_KEY) ?? {};\n\n/** @type {Record} */\nconst snapshots = storage.get(SNAPSHOT_KEY) ?? {};\n\n/** @param {number} index */\nfunction update_scroll_positions(index) {\n\tscroll_positions[index] = scroll_state();\n}\n\n/**\n * @param {import('./types').SvelteKitApp} app\n * @param {HTMLElement} target\n * @returns {import('./types').Client}\n */\nexport function create_client(app, target) {\n\tconst routes = parse(app);\n\n\tconst default_layout_loader = app.nodes[0];\n\tconst default_error_loader = app.nodes[1];\n\n\t// we import the root layout/error nodes eagerly, so that\n\t// connectivity errors after initialisation don't nuke the app\n\tdefault_layout_loader();\n\tdefault_error_loader();\n\n\tconst container = __SVELTEKIT_EMBEDDED__ ? target : document.documentElement;\n\t/** @type {Array<((url: URL) => boolean)>} */\n\tconst invalidated = [];\n\n\t/**\n\t * An array of the `+layout.svelte` and `+page.svelte` component instances\n\t * that currently live on the page — used for capturing and restoring snapshots.\n\t * It's updated/manipulated through `bind:this` in `Root.svelte`.\n\t * @type {import('svelte').SvelteComponent[]}\n\t */\n\tconst components = [];\n\n\t/** @type {{id: string, promise: Promise} | null} */\n\tlet load_cache = null;\n\n\tconst callbacks = {\n\t\t/** @type {Array<(navigation: import('@sveltejs/kit').BeforeNavigate) => void>} */\n\t\tbefore_navigate: [],\n\n\t\t/** @type {Array<(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>>} */\n\t\ton_navigate: [],\n\n\t\t/** @type {Array<(navigation: import('@sveltejs/kit').AfterNavigate) => void>} */\n\t\tafter_navigate: []\n\t};\n\n\t/** @type {import('./types').NavigationState} */\n\tlet current = {\n\t\tbranch: [],\n\t\terror: null,\n\t\t// @ts-ignore - we need the initial value to be null\n\t\turl: null\n\t};\n\n\t/** this being true means we SSR'd */\n\tlet hydrated = false;\n\tlet started = false;\n\tlet autoscroll = true;\n\tlet updating = false;\n\tlet navigating = false;\n\tlet hash_navigating = false;\n\n\tlet force_invalidation = false;\n\n\t/** @type {import('svelte').SvelteComponent} */\n\tlet root;\n\n\t// keeping track of the history index in order to prevent popstate navigation events if needed\n\tlet current_history_index = history.state?.[INDEX_KEY];\n\n\tif (!current_history_index) {\n\t\t// we use Date.now() as an offset so that cross-document navigations\n\t\t// within the app don't result in data loss\n\t\tcurrent_history_index = Date.now();\n\n\t\t// create initial history entry, so we can return here\n\t\thistory.replaceState(\n\t\t\t{ ...history.state, [INDEX_KEY]: current_history_index },\n\t\t\t'',\n\t\t\tlocation.href\n\t\t);\n\t}\n\n\t// if we reload the page, or Cmd-Shift-T back to it,\n\t// recover scroll position\n\tconst scroll = scroll_positions[current_history_index];\n\tif (scroll) {\n\t\thistory.scrollRestoration = 'manual';\n\t\tscrollTo(scroll.x, scroll.y);\n\t}\n\n\t/** @type {import('@sveltejs/kit').Page} */\n\tlet page;\n\n\t/** @type {{}} */\n\tlet token;\n\n\t/** @type {Promise | null} */\n\tlet pending_invalidate;\n\n\tasync function invalidate() {\n\t\t// Accept all invalidations as they come, don't swallow any while another invalidation\n\t\t// is running because subsequent invalidations may make earlier ones outdated,\n\t\t// but batch multiple synchronous invalidations.\n\t\tpending_invalidate = pending_invalidate || Promise.resolve();\n\t\tawait pending_invalidate;\n\t\tif (!pending_invalidate) return;\n\t\tpending_invalidate = null;\n\n\t\tconst url = new URL(location.href);\n\t\tconst intent = get_navigation_intent(url, true);\n\t\t// Clear preload, it might be affected by the invalidation.\n\t\t// Also solves an edge case where a preload is triggered, the navigation for it\n\t\t// was then triggered and is still running while the invalidation kicks in,\n\t\t// at which point the invalidation should take over and \"win\".\n\t\tload_cache = null;\n\n\t\tconst nav_token = (token = {});\n\t\tconst navigation_result = intent && (await load_route(intent));\n\t\tif (nav_token !== token) return;\n\n\t\tif (navigation_result) {\n\t\t\tif (navigation_result.type === 'redirect') {\n\t\t\t\treturn goto(new URL(navigation_result.location, url).href, {}, [url.pathname], nav_token);\n\t\t\t} else {\n\t\t\t\tif (navigation_result.props.page !== undefined) {\n\t\t\t\t\tpage = navigation_result.props.page;\n\t\t\t\t}\n\t\t\t\troot.$set(navigation_result.props);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @param {number} index */\n\tfunction capture_snapshot(index) {\n\t\tif (components.some((c) => c?.snapshot)) {\n\t\t\tsnapshots[index] = components.map((c) => c?.snapshot?.capture());\n\t\t}\n\t}\n\n\t/** @param {number} index */\n\tfunction restore_snapshot(index) {\n\t\tsnapshots[index]?.forEach((value, i) => {\n\t\t\tcomponents[i]?.snapshot?.restore(value);\n\t\t});\n\t}\n\n\tfunction persist_state() {\n\t\tupdate_scroll_positions(current_history_index);\n\t\tstorage.set(SCROLL_KEY, scroll_positions);\n\n\t\tcapture_snapshot(current_history_index);\n\t\tstorage.set(SNAPSHOT_KEY, snapshots);\n\t}\n\n\t/**\n\t * @param {string | URL} url\n\t * @param {{ noScroll?: boolean; replaceState?: boolean; keepFocus?: boolean; state?: any; invalidateAll?: boolean }} opts\n\t * @param {string[]} redirect_chain\n\t * @param {{}} [nav_token]\n\t */\n\tasync function goto(\n\t\turl,\n\t\t{\n\t\t\tnoScroll = false,\n\t\t\treplaceState = false,\n\t\t\tkeepFocus = false,\n\t\t\tstate = {},\n\t\t\tinvalidateAll = false\n\t\t},\n\t\tredirect_chain,\n\t\tnav_token\n\t) {\n\t\tif (typeof url === 'string') {\n\t\t\turl = new URL(url, get_base_uri(document));\n\t\t}\n\n\t\treturn navigate({\n\t\t\turl,\n\t\t\tscroll: noScroll ? scroll_state() : null,\n\t\t\tkeepfocus: keepFocus,\n\t\t\tredirect_chain,\n\t\t\tdetails: {\n\t\t\t\tstate,\n\t\t\t\treplaceState\n\t\t\t},\n\t\t\tnav_token,\n\t\t\taccepted: () => {\n\t\t\t\tif (invalidateAll) {\n\t\t\t\t\tforce_invalidation = true;\n\t\t\t\t}\n\t\t\t},\n\t\t\tblocked: () => {},\n\t\t\ttype: 'goto'\n\t\t});\n\t}\n\n\t/** @param {import('./types').NavigationIntent} intent */\n\tasync function preload_data(intent) {\n\t\tload_cache = {\n\t\t\tid: intent.id,\n\t\t\tpromise: load_route(intent).then((result) => {\n\t\t\t\tif (result.type === 'loaded' && result.state.error) {\n\t\t\t\t\t// Don't cache errors, because they might be transient\n\t\t\t\t\tload_cache = null;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t})\n\t\t};\n\n\t\treturn load_cache.promise;\n\t}\n\n\t/** @param {...string} pathnames */\n\tasync function preload_code(...pathnames) {\n\t\tconst matching = routes.filter((route) => pathnames.some((pathname) => route.exec(pathname)));\n\n\t\tconst promises = matching.map((r) => {\n\t\t\treturn Promise.all([...r.layouts, r.leaf].map((load) => load?.[1]()));\n\t\t});\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/** @param {import('./types').NavigationFinished} result */\n\tfunction initialize(result) {\n\t\tif (DEV && result.state.error && document.querySelector('vite-error-overlay')) return;\n\n\t\tcurrent = result.state;\n\n\t\tconst style = document.querySelector('style[data-sveltekit]');\n\t\tif (style) style.remove();\n\n\t\tpage = /** @type {import('@sveltejs/kit').Page} */ (result.props.page);\n\n\t\troot = new app.root({\n\t\t\ttarget,\n\t\t\tprops: { ...result.props, stores, components },\n\t\t\thydrate: true\n\t\t});\n\n\t\trestore_snapshot(current_history_index);\n\n\t\t/** @type {import('@sveltejs/kit').AfterNavigate} */\n\t\tconst navigation = {\n\t\t\tfrom: null,\n\t\t\tto: {\n\t\t\t\tparams: current.params,\n\t\t\t\troute: { id: current.route?.id ?? null },\n\t\t\t\turl: new URL(location.href)\n\t\t\t},\n\t\t\twillUnload: false,\n\t\t\ttype: 'enter',\n\t\t\tcomplete: Promise.resolve()\n\t\t};\n\t\tcallbacks.after_navigate.forEach((fn) => fn(navigation));\n\n\t\tstarted = true;\n\t}\n\n\t/**\n\t *\n\t * @param {{\n\t * url: URL;\n\t * params: Record;\n\t * branch: Array;\n\t * status: number;\n\t * error: App.Error | null;\n\t * route: import('types').CSRRoute | null;\n\t * form?: Record | null;\n\t * }} opts\n\t */\n\tasync function get_navigation_result_from_branch({\n\t\turl,\n\t\tparams,\n\t\tbranch,\n\t\tstatus,\n\t\terror,\n\t\troute,\n\t\tform\n\t}) {\n\t\t/** @type {import('types').TrailingSlash} */\n\t\tlet slash = 'never';\n\t\tfor (const node of branch) {\n\t\t\tif (node?.slash !== undefined) slash = node.slash;\n\t\t}\n\t\turl.pathname = normalize_path(url.pathname, slash);\n\t\t// eslint-disable-next-line\n\t\turl.search = url.search; // turn `/?` into `/`\n\n\t\t/** @type {import('./types').NavigationFinished} */\n\t\tconst result = {\n\t\t\ttype: 'loaded',\n\t\t\tstate: {\n\t\t\t\turl,\n\t\t\t\tparams,\n\t\t\t\tbranch,\n\t\t\t\terror,\n\t\t\t\troute\n\t\t\t},\n\t\t\tprops: {\n\t\t\t\t// @ts-ignore Somehow it's getting SvelteComponent and SvelteComponentDev mixed up\n\t\t\t\tconstructors: compact(branch).map((branch_node) => branch_node.node.component)\n\t\t\t}\n\t\t};\n\n\t\tif (form !== undefined) {\n\t\t\tresult.props.form = form;\n\t\t}\n\n\t\tlet data = {};\n\t\tlet data_changed = !page;\n\n\t\tlet p = 0;\n\n\t\tfor (let i = 0; i < Math.max(branch.length, current.branch.length); i += 1) {\n\t\t\tconst node = branch[i];\n\t\t\tconst prev = current.branch[i];\n\n\t\t\tif (node?.data !== prev?.data) data_changed = true;\n\t\t\tif (!node) continue;\n\n\t\t\tdata = { ...data, ...node.data };\n\n\t\t\t// Only set props if the node actually updated. This prevents needless rerenders.\n\t\t\tif (data_changed) {\n\t\t\t\tresult.props[`data_${p}`] = data;\n\t\t\t}\n\n\t\t\tp += 1;\n\t\t}\n\n\t\tconst page_changed =\n\t\t\t!current.url ||\n\t\t\turl.href !== current.url.href ||\n\t\t\tcurrent.error !== error ||\n\t\t\t(form !== undefined && form !== page.form) ||\n\t\t\tdata_changed;\n\n\t\tif (page_changed) {\n\t\t\tresult.props.page = {\n\t\t\t\terror,\n\t\t\t\tparams,\n\t\t\t\troute: {\n\t\t\t\t\tid: route?.id ?? null\n\t\t\t\t},\n\t\t\t\tstatus,\n\t\t\t\turl: new URL(url),\n\t\t\t\tform: form ?? null,\n\t\t\t\t// The whole page store is updated, but this way the object reference stays the same\n\t\t\t\tdata: data_changed ? data : page.data\n\t\t\t};\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Call the load function of the given node, if it exists.\n\t * If `server_data` is passed, this is treated as the initial run and the page endpoint is not requested.\n\t *\n\t * @param {{\n\t * loader: import('types').CSRPageNodeLoader;\n\t * \t parent: () => Promise>;\n\t * url: URL;\n\t * params: Record;\n\t * route: { id: string | null };\n\t * \t server_data_node: import('./types').DataNode | null;\n\t * }} options\n\t * @returns {Promise}\n\t */\n\tasync function load_node({ loader, parent, url, params, route, server_data_node }) {\n\t\t/** @type {Record | null} */\n\t\tlet data = null;\n\n\t\t/** @type {import('types').Uses} */\n\t\tconst uses = {\n\t\t\tdependencies: new Set(),\n\t\t\tparams: new Set(),\n\t\t\tparent: false,\n\t\t\troute: false,\n\t\t\turl: false\n\t\t};\n\n\t\tconst node = await loader();\n\n\t\tif (DEV) {\n\t\t\tvalidate_page_exports(node.universal);\n\t\t}\n\n\t\tif (node.universal?.load) {\n\t\t\t/** @param {string[]} deps */\n\t\t\tfunction depends(...deps) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tif (DEV) validate_depends(/** @type {string} */ (route.id), dep);\n\n\t\t\t\t\tconst { href } = new URL(dep, url);\n\t\t\t\t\tuses.dependencies.add(href);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** @type {import('@sveltejs/kit').LoadEvent} */\n\t\t\tconst load_input = {\n\t\t\t\troute: new Proxy(route, {\n\t\t\t\t\tget: (target, key) => {\n\t\t\t\t\t\tuses.route = true;\n\t\t\t\t\t\treturn target[/** @type {'id'} */ (key)];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tparams: new Proxy(params, {\n\t\t\t\t\tget: (target, key) => {\n\t\t\t\t\t\tuses.params.add(/** @type {string} */ (key));\n\t\t\t\t\t\treturn target[/** @type {string} */ (key)];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tdata: server_data_node?.data ?? null,\n\t\t\t\turl: make_trackable(url, () => {\n\t\t\t\t\tuses.url = true;\n\t\t\t\t}),\n\t\t\t\tasync fetch(resource, init) {\n\t\t\t\t\t/** @type {URL | string} */\n\t\t\t\t\tlet requested;\n\n\t\t\t\t\tif (resource instanceof Request) {\n\t\t\t\t\t\trequested = resource.url;\n\n\t\t\t\t\t\t// we're not allowed to modify the received `Request` object, so in order\n\t\t\t\t\t\t// to fixup relative urls we create a new equivalent `init` object instead\n\t\t\t\t\t\tinit = {\n\t\t\t\t\t\t\t// the request body must be consumed in memory until browsers\n\t\t\t\t\t\t\t// implement streaming request bodies and/or the body getter\n\t\t\t\t\t\t\tbody:\n\t\t\t\t\t\t\t\tresource.method === 'GET' || resource.method === 'HEAD'\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: await resource.blob(),\n\t\t\t\t\t\t\tcache: resource.cache,\n\t\t\t\t\t\t\tcredentials: resource.credentials,\n\t\t\t\t\t\t\theaders: resource.headers,\n\t\t\t\t\t\t\tintegrity: resource.integrity,\n\t\t\t\t\t\t\tkeepalive: resource.keepalive,\n\t\t\t\t\t\t\tmethod: resource.method,\n\t\t\t\t\t\t\tmode: resource.mode,\n\t\t\t\t\t\t\tredirect: resource.redirect,\n\t\t\t\t\t\t\treferrer: resource.referrer,\n\t\t\t\t\t\t\treferrerPolicy: resource.referrerPolicy,\n\t\t\t\t\t\t\tsignal: resource.signal,\n\t\t\t\t\t\t\t...init\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequested = resource;\n\t\t\t\t\t}\n\n\t\t\t\t\t// we must fixup relative urls so they are resolved from the target page\n\t\t\t\t\tconst resolved = new URL(requested, url);\n\t\t\t\t\tdepends(resolved.href);\n\n\t\t\t\t\t// match ssr serialized data url, which is important to find cached responses\n\t\t\t\t\tif (resolved.origin === url.origin) {\n\t\t\t\t\t\trequested = resolved.href.slice(url.origin.length);\n\t\t\t\t\t}\n\n\t\t\t\t\t// prerendered pages may be served from any origin, so `initial_fetch` urls shouldn't be resolved\n\t\t\t\t\treturn started\n\t\t\t\t\t\t? subsequent_fetch(requested, resolved.href, init)\n\t\t\t\t\t\t: initial_fetch(requested, init);\n\t\t\t\t},\n\t\t\t\tsetHeaders: () => {}, // noop\n\t\t\t\tdepends,\n\t\t\t\tparent() {\n\t\t\t\t\tuses.parent = true;\n\t\t\t\t\treturn parent();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (DEV) {\n\t\t\t\ttry {\n\t\t\t\t\tlock_fetch();\n\t\t\t\t\tdata = (await node.universal.load.call(null, load_input)) ?? null;\n\t\t\t\t\tif (data != null && Object.getPrototypeOf(data) !== Object.prototype) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`a load function related to route '${route.id}' returned ${\n\t\t\t\t\t\t\t\ttypeof data !== 'object'\n\t\t\t\t\t\t\t\t\t? `a ${typeof data}`\n\t\t\t\t\t\t\t\t\t: data instanceof Response\n\t\t\t\t\t\t\t\t\t? 'a Response object'\n\t\t\t\t\t\t\t\t\t: Array.isArray(data)\n\t\t\t\t\t\t\t\t\t? 'an array'\n\t\t\t\t\t\t\t\t\t: 'a non-plain object'\n\t\t\t\t\t\t\t}, but must return a plain object at the top level (i.e. \\`return {...}\\`)`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tunlock_fetch();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata = (await node.universal.load.call(null, load_input)) ?? null;\n\t\t\t}\n\t\t\tdata = data ? await unwrap_promises(data) : null;\n\t\t}\n\n\t\treturn {\n\t\t\tnode,\n\t\t\tloader,\n\t\t\tserver: server_data_node,\n\t\t\tuniversal: node.universal?.load ? { type: 'data', data, uses } : null,\n\t\t\tdata: data ?? server_data_node?.data ?? null,\n\t\t\tslash: node.universal?.trailingSlash ?? server_data_node?.slash\n\t\t};\n\t}\n\n\t/**\n\t * @param {boolean} parent_changed\n\t * @param {boolean} route_changed\n\t * @param {boolean} url_changed\n\t * @param {import('types').Uses | undefined} uses\n\t * @param {Record} params\n\t */\n\tfunction has_changed(parent_changed, route_changed, url_changed, uses, params) {\n\t\tif (force_invalidation) return true;\n\n\t\tif (!uses) return false;\n\n\t\tif (uses.parent && parent_changed) return true;\n\t\tif (uses.route && route_changed) return true;\n\t\tif (uses.url && url_changed) return true;\n\n\t\tfor (const param of uses.params) {\n\t\t\tif (params[param] !== current.params[param]) return true;\n\t\t}\n\n\t\tfor (const href of uses.dependencies) {\n\t\t\tif (invalidated.some((fn) => fn(new URL(href)))) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * @param {import('types').ServerDataNode | import('types').ServerDataSkippedNode | null} node\n\t * @param {import('./types').DataNode | null} [previous]\n\t * @returns {import('./types').DataNode | null}\n\t */\n\tfunction create_data_node(node, previous) {\n\t\tif (node?.type === 'data') return node;\n\t\tif (node?.type === 'skip') return previous ?? null;\n\t\treturn null;\n\t}\n\n\t/**\n\t * @param {import('./types').NavigationIntent} intent\n\t * @returns {Promise}\n\t */\n\tasync function load_route({ id, invalidating, url, params, route }) {\n\t\tif (load_cache?.id === id) {\n\t\t\treturn load_cache.promise;\n\t\t}\n\n\t\tconst { errors, layouts, leaf } = route;\n\n\t\tconst loaders = [...layouts, leaf];\n\n\t\t// preload modules to avoid waterfall, but handle rejections\n\t\t// so they don't get reported to Sentry et al (we don't need\n\t\t// to act on the failures at this point)\n\t\terrors.forEach((loader) => loader?.().catch(() => {}));\n\t\tloaders.forEach((loader) => loader?.[1]().catch(() => {}));\n\n\t\t/** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */\n\t\tlet server_data = null;\n\n\t\tconst url_changed = current.url ? id !== current.url.pathname + current.url.search : false;\n\t\tconst route_changed = current.route ? route.id !== current.route.id : false;\n\n\t\tlet parent_invalid = false;\n\t\tconst invalid_server_nodes = loaders.map((loader, i) => {\n\t\t\tconst previous = current.branch[i];\n\n\t\t\tconst invalid =\n\t\t\t\t!!loader?.[0] &&\n\t\t\t\t(previous?.loader !== loader[1] ||\n\t\t\t\t\thas_changed(parent_invalid, route_changed, url_changed, previous.server?.uses, params));\n\n\t\t\tif (invalid) {\n\t\t\t\t// For the next one\n\t\t\t\tparent_invalid = true;\n\t\t\t}\n\n\t\t\treturn invalid;\n\t\t});\n\n\t\tif (invalid_server_nodes.some(Boolean)) {\n\t\t\ttry {\n\t\t\t\tserver_data = await load_data(url, invalid_server_nodes);\n\t\t\t} catch (error) {\n\t\t\t\treturn load_root_error_page({\n\t\t\t\t\tstatus: error instanceof HttpError ? error.status : 500,\n\t\t\t\t\terror: await handle_error(error, { url, params, route: { id: route.id } }),\n\t\t\t\t\turl,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (server_data.type === 'redirect') {\n\t\t\t\treturn server_data;\n\t\t\t}\n\t\t}\n\n\t\tconst server_data_nodes = server_data?.nodes;\n\n\t\tlet parent_changed = false;\n\n\t\tconst branch_promises = loaders.map(async (loader, i) => {\n\t\t\tif (!loader) return;\n\n\t\t\t/** @type {import('./types').BranchNode | undefined} */\n\t\t\tconst previous = current.branch[i];\n\n\t\t\tconst server_data_node = server_data_nodes?.[i];\n\n\t\t\t// re-use data from previous load if it's still valid\n\t\t\tconst valid =\n\t\t\t\t(!server_data_node || server_data_node.type === 'skip') &&\n\t\t\t\tloader[1] === previous?.loader &&\n\t\t\t\t!has_changed(parent_changed, route_changed, url_changed, previous.universal?.uses, params);\n\t\t\tif (valid) return previous;\n\n\t\t\tparent_changed = true;\n\n\t\t\tif (server_data_node?.type === 'error') {\n\t\t\t\t// rethrow and catch below\n\t\t\t\tthrow server_data_node;\n\t\t\t}\n\n\t\t\treturn load_node({\n\t\t\t\tloader: loader[1],\n\t\t\t\turl,\n\t\t\t\tparams,\n\t\t\t\troute,\n\t\t\t\tparent: async () => {\n\t\t\t\t\tconst data = {};\n\t\t\t\t\tfor (let j = 0; j < i; j += 1) {\n\t\t\t\t\t\tObject.assign(data, (await branch_promises[j])?.data);\n\t\t\t\t\t}\n\t\t\t\t\treturn data;\n\t\t\t\t},\n\t\t\t\tserver_data_node: create_data_node(\n\t\t\t\t\t// server_data_node is undefined if it wasn't reloaded from the server;\n\t\t\t\t\t// and if current loader uses server data, we want to reuse previous data.\n\t\t\t\t\tserver_data_node === undefined && loader[0] ? { type: 'skip' } : server_data_node ?? null,\n\t\t\t\t\tloader[0] ? previous?.server : undefined\n\t\t\t\t)\n\t\t\t});\n\t\t});\n\n\t\t// if we don't do this, rejections will be unhandled\n\t\tfor (const p of branch_promises) p.catch(() => {});\n\n\t\t/** @type {Array} */\n\t\tconst branch = [];\n\n\t\tfor (let i = 0; i < loaders.length; i += 1) {\n\t\t\tif (loaders[i]) {\n\t\t\t\ttry {\n\t\t\t\t\tbranch.push(await branch_promises[i]);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (err instanceof Redirect) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttype: 'redirect',\n\t\t\t\t\t\t\tlocation: err.location\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tlet status = 500;\n\t\t\t\t\t/** @type {App.Error} */\n\t\t\t\t\tlet error;\n\n\t\t\t\t\tif (server_data_nodes?.includes(/** @type {import('types').ServerErrorNode} */ (err))) {\n\t\t\t\t\t\t// this is the server error rethrown above, reconstruct but don't invoke\n\t\t\t\t\t\t// the client error handler; it should've already been handled on the server\n\t\t\t\t\t\tstatus = /** @type {import('types').ServerErrorNode} */ (err).status ?? status;\n\t\t\t\t\t\terror = /** @type {import('types').ServerErrorNode} */ (err).error;\n\t\t\t\t\t} else if (err instanceof HttpError) {\n\t\t\t\t\t\tstatus = err.status;\n\t\t\t\t\t\terror = err.body;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Referenced node could have been removed due to redeploy, check\n\t\t\t\t\t\tconst updated = await stores.updated.check();\n\t\t\t\t\t\tif (updated) {\n\t\t\t\t\t\t\treturn await native_navigation(url);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\terror = await handle_error(err, { params, url, route: { id: route.id } });\n\t\t\t\t\t}\n\n\t\t\t\t\tconst error_load = await load_nearest_error_page(i, branch, errors);\n\t\t\t\t\tif (error_load) {\n\t\t\t\t\t\treturn await get_navigation_result_from_branch({\n\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\tparams,\n\t\t\t\t\t\t\tbranch: branch.slice(0, error_load.idx).concat(error_load.node),\n\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\troute\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we get here, it's because the root `load` function failed,\n\t\t\t\t\t\t// and we need to fall back to the server\n\t\t\t\t\t\treturn await server_fallback(url, { id: route.id }, error, status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// push an empty slot so we can rewind past gaps to the\n\t\t\t\t// layout that corresponds with an +error.svelte page\n\t\t\t\tbranch.push(undefined);\n\t\t\t}\n\t\t}\n\n\t\treturn await get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch,\n\t\t\tstatus: 200,\n\t\t\terror: null,\n\t\t\troute,\n\t\t\t// Reset `form` on navigation, but not invalidation\n\t\t\tform: invalidating ? undefined : null\n\t\t});\n\t}\n\n\t/**\n\t * @param {number} i Start index to backtrack from\n\t * @param {Array} branch Branch to backtrack\n\t * @param {Array} errors All error pages for this branch\n\t * @returns {Promise<{idx: number; node: import('./types').BranchNode} | undefined>}\n\t */\n\tasync function load_nearest_error_page(i, branch, errors) {\n\t\twhile (i--) {\n\t\t\tif (errors[i]) {\n\t\t\t\tlet j = i;\n\t\t\t\twhile (!branch[j]) j -= 1;\n\t\t\t\ttry {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tidx: j + 1,\n\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\tnode: await /** @type {import('types').CSRPageNodeLoader } */ (errors[i])(),\n\t\t\t\t\t\t\tloader: /** @type {import('types').CSRPageNodeLoader } */ (errors[i]),\n\t\t\t\t\t\t\tdata: {},\n\t\t\t\t\t\t\tserver: null,\n\t\t\t\t\t\t\tuniversal: null\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @param {{\n\t * status: number;\n\t * error: App.Error;\n\t * url: URL;\n\t * route: { id: string | null }\n\t * }} opts\n\t * @returns {Promise}\n\t */\n\tasync function load_root_error_page({ status, error, url, route }) {\n\t\t/** @type {Record} */\n\t\tconst params = {}; // error page does not have params\n\n\t\t/** @type {import('types').ServerDataNode | null} */\n\t\tlet server_data_node = null;\n\n\t\tconst default_layout_has_server_load = app.server_loads[0] === 0;\n\n\t\tif (default_layout_has_server_load) {\n\t\t\t// TODO post-https://github.com/sveltejs/kit/discussions/6124 we can use\n\t\t\t// existing root layout data\n\t\t\ttry {\n\t\t\t\tconst server_data = await load_data(url, [true]);\n\n\t\t\t\tif (\n\t\t\t\t\tserver_data.type !== 'data' ||\n\t\t\t\t\t(server_data.nodes[0] && server_data.nodes[0].type !== 'data')\n\t\t\t\t) {\n\t\t\t\t\tthrow 0;\n\t\t\t\t}\n\n\t\t\t\tserver_data_node = server_data.nodes[0] ?? null;\n\t\t\t} catch {\n\t\t\t\t// at this point we have no choice but to fall back to the server, if it wouldn't\n\t\t\t\t// bring us right back here, turning this into an endless loop\n\t\t\t\tif (url.origin !== location.origin || url.pathname !== location.pathname || hydrated) {\n\t\t\t\t\tawait native_navigation(url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst root_layout = await load_node({\n\t\t\tloader: default_layout_loader,\n\t\t\turl,\n\t\t\tparams,\n\t\t\troute,\n\t\t\tparent: () => Promise.resolve({}),\n\t\t\tserver_data_node: create_data_node(server_data_node)\n\t\t});\n\n\t\t/** @type {import('./types').BranchNode} */\n\t\tconst root_error = {\n\t\t\tnode: await default_error_loader(),\n\t\t\tloader: default_error_loader,\n\t\t\tuniversal: null,\n\t\t\tserver: null,\n\t\t\tdata: null\n\t\t};\n\n\t\treturn await get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch: [root_layout, root_error],\n\t\t\tstatus,\n\t\t\terror,\n\t\t\troute: null\n\t\t});\n\t}\n\n\t/**\n\t * @param {URL} url\n\t * @param {boolean} invalidating\n\t */\n\tfunction get_navigation_intent(url, invalidating) {\n\t\tif (is_external_url(url, base)) return;\n\n\t\tconst path = get_url_path(url);\n\n\t\tfor (const route of routes) {\n\t\t\tconst params = route.exec(path);\n\n\t\t\tif (params) {\n\t\t\t\tconst id = url.pathname + url.search;\n\t\t\t\t/** @type {import('./types').NavigationIntent} */\n\t\t\t\tconst intent = { id, invalidating, route, params: decode_params(params), url };\n\t\t\t\treturn intent;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @param {URL} url */\n\tfunction get_url_path(url) {\n\t\treturn decode_pathname(url.pathname.slice(base.length) || '/');\n\t}\n\n\t/**\n\t * @param {{\n\t * url: URL;\n\t * type: import('@sveltejs/kit').Navigation[\"type\"];\n\t * intent?: import('./types').NavigationIntent;\n\t * delta?: number;\n\t * }} opts\n\t */\n\tfunction before_navigate({ url, type, intent, delta }) {\n\t\tlet should_block = false;\n\n\t\tconst nav = create_navigation(current, intent, url, type);\n\n\t\tif (delta !== undefined) {\n\t\t\tnav.navigation.delta = delta;\n\t\t}\n\n\t\tconst cancellable = {\n\t\t\t...nav.navigation,\n\t\t\tcancel: () => {\n\t\t\t\tshould_block = true;\n\t\t\t\tnav.reject(new Error('navigation was cancelled'));\n\t\t\t}\n\t\t};\n\n\t\tif (!navigating) {\n\t\t\t// Don't run the event during redirects\n\t\t\tcallbacks.before_navigate.forEach((fn) => fn(cancellable));\n\t\t}\n\n\t\treturn should_block ? null : nav;\n\t}\n\n\t/**\n\t * @param {{\n\t * url: URL;\n\t * scroll: { x: number, y: number } | null;\n\t * keepfocus: boolean;\n\t * redirect_chain: string[];\n\t * details: {\n\t * replaceState: boolean;\n\t * state: any;\n\t * } | null;\n\t * type: import('@sveltejs/kit').Navigation[\"type\"];\n\t * delta?: number;\n\t * nav_token?: {};\n\t * accepted: () => void;\n\t * blocked: () => void;\n\t * }} opts\n\t */\n\tasync function navigate({\n\t\turl,\n\t\tscroll,\n\t\tkeepfocus,\n\t\tredirect_chain,\n\t\tdetails,\n\t\ttype,\n\t\tdelta,\n\t\tnav_token = {},\n\t\taccepted,\n\t\tblocked\n\t}) {\n\t\tconst intent = get_navigation_intent(url, false);\n\t\tconst nav = before_navigate({ url, type, delta, intent });\n\n\t\tif (!nav) {\n\t\t\tblocked();\n\t\t\treturn;\n\t\t}\n\n\t\t// store this before calling `accepted()`, which may change the index\n\t\tconst previous_history_index = current_history_index;\n\n\t\taccepted();\n\n\t\tnavigating = true;\n\n\t\tif (started) {\n\t\t\tstores.navigating.set(nav.navigation);\n\t\t}\n\n\t\ttoken = nav_token;\n\t\tlet navigation_result = intent && (await load_route(intent));\n\n\t\tif (!navigation_result) {\n\t\t\tif (is_external_url(url, base)) {\n\t\t\t\treturn await native_navigation(url);\n\t\t\t}\n\t\t\tnavigation_result = await server_fallback(\n\t\t\t\turl,\n\t\t\t\t{ id: null },\n\t\t\t\tawait handle_error(new Error(`Not found: ${url.pathname}`), {\n\t\t\t\t\turl,\n\t\t\t\t\tparams: {},\n\t\t\t\t\troute: { id: null }\n\t\t\t\t}),\n\t\t\t\t404\n\t\t\t);\n\t\t}\n\n\t\t// if this is an internal navigation intent, use the normalized\n\t\t// URL for the rest of the function\n\t\turl = intent?.url || url;\n\n\t\t// abort if user navigated during update\n\t\tif (token !== nav_token) {\n\t\t\tnav.reject(new Error('navigation was aborted'));\n\t\t\treturn false;\n\t\t}\n\n\t\tif (navigation_result.type === 'redirect') {\n\t\t\tif (redirect_chain.length > 10 || redirect_chain.includes(url.pathname)) {\n\t\t\t\tnavigation_result = await load_root_error_page({\n\t\t\t\t\tstatus: 500,\n\t\t\t\t\terror: await handle_error(new Error('Redirect loop'), {\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams: {},\n\t\t\t\t\t\troute: { id: null }\n\t\t\t\t\t}),\n\t\t\t\t\turl,\n\t\t\t\t\troute: { id: null }\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgoto(\n\t\t\t\t\tnew URL(navigation_result.location, url).href,\n\t\t\t\t\t{},\n\t\t\t\t\t[...redirect_chain, url.pathname],\n\t\t\t\t\tnav_token\n\t\t\t\t);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (/** @type {number} */ (navigation_result.props.page?.status) >= 400) {\n\t\t\tconst updated = await stores.updated.check();\n\t\t\tif (updated) {\n\t\t\t\tawait native_navigation(url);\n\t\t\t}\n\t\t}\n\n\t\t// reset invalidation only after a finished navigation. If there are redirects or\n\t\t// additional invalidations, they should get the same invalidation treatment\n\t\tinvalidated.length = 0;\n\t\tforce_invalidation = false;\n\n\t\tupdating = true;\n\n\t\tupdate_scroll_positions(previous_history_index);\n\t\tcapture_snapshot(previous_history_index);\n\n\t\t// ensure the url pathname matches the page's trailing slash option\n\t\tif (\n\t\t\tnavigation_result.props.page?.url &&\n\t\t\tnavigation_result.props.page.url.pathname !== url.pathname\n\t\t) {\n\t\t\turl.pathname = navigation_result.props.page?.url.pathname;\n\t\t}\n\n\t\tif (details) {\n\t\t\tconst change = details.replaceState ? 0 : 1;\n\t\t\tdetails.state[INDEX_KEY] = current_history_index += change;\n\t\t\thistory[details.replaceState ? 'replaceState' : 'pushState'](details.state, '', url);\n\n\t\t\tif (!details.replaceState) {\n\t\t\t\t// if we navigated back, then pushed a new state, we can\n\t\t\t\t// release memory by pruning the scroll/snapshot lookup\n\t\t\t\tlet i = current_history_index + 1;\n\t\t\t\twhile (snapshots[i] || scroll_positions[i]) {\n\t\t\t\t\tdelete snapshots[i];\n\t\t\t\t\tdelete scroll_positions[i];\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// reset preload synchronously after the history state has been set to avoid race conditions\n\t\tload_cache = null;\n\n\t\tif (started) {\n\t\t\tcurrent = navigation_result.state;\n\n\t\t\t// reset url before updating page store\n\t\t\tif (navigation_result.props.page) {\n\t\t\t\tnavigation_result.props.page.url = url;\n\t\t\t}\n\n\t\t\tconst after_navigate = (\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tcallbacks.on_navigate.map((fn) =>\n\t\t\t\t\t\tfn(/** @type {import('@sveltejs/kit').OnNavigate} */ (nav.navigation))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t).filter((value) => typeof value === 'function');\n\n\t\t\tif (after_navigate.length > 0) {\n\t\t\t\tfunction cleanup() {\n\t\t\t\t\tcallbacks.after_navigate = callbacks.after_navigate.filter(\n\t\t\t\t\t\t// @ts-ignore\n\t\t\t\t\t\t(fn) => !after_navigate.includes(fn)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tafter_navigate.push(cleanup);\n\n\t\t\t\t// @ts-ignore\n\t\t\t\tcallbacks.after_navigate.push(...after_navigate);\n\t\t\t}\n\n\t\t\troot.$set(navigation_result.props);\n\t\t} else {\n\t\t\tinitialize(navigation_result);\n\t\t}\n\n\t\tconst { activeElement } = document;\n\n\t\t// need to render the DOM before we can scroll to the rendered elements and do focus management\n\t\tawait tick();\n\n\t\t// we reset scroll before dealing with focus, to avoid a flash of unscrolled content\n\t\tif (autoscroll) {\n\t\t\tconst deep_linked =\n\t\t\t\turl.hash && document.getElementById(decodeURIComponent(url.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\tconst changed_focus =\n\t\t\t// reset focus only if any manual focus management didn't override it\n\t\t\tdocument.activeElement !== activeElement &&\n\t\t\t// also refocus when activeElement is body already because the\n\t\t\t// focus event might not have been fired on it yet\n\t\t\tdocument.activeElement !== document.body;\n\n\t\tif (!keepfocus && !changed_focus) {\n\t\t\treset_focus();\n\t\t}\n\n\t\tautoscroll = true;\n\n\t\tif (navigation_result.props.page) {\n\t\t\tpage = navigation_result.props.page;\n\t\t}\n\n\t\tnavigating = false;\n\n\t\tif (type === 'popstate') {\n\t\t\trestore_snapshot(current_history_index);\n\t\t}\n\n\t\tnav.fulfil(undefined);\n\n\t\tcallbacks.after_navigate.forEach((fn) =>\n\t\t\tfn(/** @type {import('@sveltejs/kit').AfterNavigate} */ (nav.navigation))\n\t\t);\n\t\tstores.navigating.set(null);\n\n\t\tupdating = false;\n\t}\n\n\t/**\n\t * Does a full page reload if it wouldn't result in an endless loop in the SPA case\n\t * @param {URL} url\n\t * @param {{ id: string | null }} route\n\t * @param {App.Error} error\n\t * @param {number} status\n\t * @returns {Promise}\n\t */\n\tasync function server_fallback(url, route, error, status) {\n\t\tif (url.origin === location.origin && url.pathname === location.pathname && !hydrated) {\n\t\t\t// We would reload the same page we're currently on, which isn't hydrated,\n\t\t\t// which means no SSR, which means we would end up in an endless loop\n\t\t\treturn await load_root_error_page({\n\t\t\t\tstatus,\n\t\t\t\terror,\n\t\t\t\turl,\n\t\t\t\troute\n\t\t\t});\n\t\t}\n\n\t\tif (DEV && status !== 404) {\n\t\t\tconsole.error(\n\t\t\t\t'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)'\n\t\t\t);\n\n\t\t\tdebugger; // eslint-disable-line\n\t\t}\n\n\t\treturn await native_navigation(url);\n\t}\n\n\t/**\n\t * Loads `href` the old-fashioned way, with a full page reload.\n\t * Returns a `Promise` that never resolves (to prevent any\n\t * subsequent work, e.g. history manipulation, from happening)\n\t * @param {URL} url\n\t */\n\tfunction native_navigation(url) {\n\t\tlocation.href = url.href;\n\t\treturn new Promise(() => {});\n\t}\n\n\tif (import.meta.hot) {\n\t\timport.meta.hot.on('vite:beforeUpdate', () => {\n\t\t\tif (current.error) location.reload();\n\t\t});\n\t}\n\n\tfunction setup_preload() {\n\t\t/** @type {NodeJS.Timeout} */\n\t\tlet mousemove_timeout;\n\n\t\tcontainer.addEventListener('mousemove', (event) => {\n\t\t\tconst target = /** @type {Element} */ (event.target);\n\n\t\t\tclearTimeout(mousemove_timeout);\n\t\t\tmousemove_timeout = setTimeout(() => {\n\t\t\t\tpreload(target, 2);\n\t\t\t}, 20);\n\t\t});\n\n\t\t/** @param {Event} event */\n\t\tfunction tap(event) {\n\t\t\tpreload(/** @type {Element} */ (event.composedPath()[0]), 1);\n\t\t}\n\n\t\tcontainer.addEventListener('mousedown', tap);\n\t\tcontainer.addEventListener('touchstart', tap, { passive: true });\n\n\t\tconst observer = new IntersectionObserver(\n\t\t\t(entries) => {\n\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tpreload_code(\n\t\t\t\t\t\t\tget_url_path(new URL(/** @type {HTMLAnchorElement} */ (entry.target).href))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tobserver.unobserve(entry.target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ threshold: 0 }\n\t\t);\n\n\t\t/**\n\t\t * @param {Element} element\n\t\t * @param {number} priority\n\t\t */\n\t\tfunction preload(element, priority) {\n\t\t\tconst a = find_anchor(element, container);\n\t\t\tif (!a) return;\n\n\t\t\tconst { url, external, download } = get_link_info(a, base);\n\t\t\tif (external || download) return;\n\n\t\t\tconst options = get_router_options(a);\n\n\t\t\tif (!options.reload) {\n\t\t\t\tif (priority <= options.preload_data) {\n\t\t\t\t\tconst intent = get_navigation_intent(/** @type {URL} */ (url), false);\n\t\t\t\t\tif (intent) {\n\t\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\t\tpreload_data(intent).then((result) => {\n\t\t\t\t\t\t\t\tif (result.type === 'loaded' && result.state.error) {\n\t\t\t\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\t\t\t`Preloading data for ${intent.url.pathname} failed with the following error: ${result.state.error.message}\\n` +\n\t\t\t\t\t\t\t\t\t\t\t'If this error is transient, you can ignore it. Otherwise, consider disabling preloading for this route. ' +\n\t\t\t\t\t\t\t\t\t\t\t'This route was preloaded due to a data-sveltekit-preload-data attribute. ' +\n\t\t\t\t\t\t\t\t\t\t\t'See https://kit.svelte.dev/docs/link-options for more info'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpreload_data(intent);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (priority <= options.preload_code) {\n\t\t\t\t\tpreload_code(get_url_path(/** @type {URL} */ (url)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction after_navigate() {\n\t\t\tobserver.disconnect();\n\n\t\t\tfor (const a of container.querySelectorAll('a')) {\n\t\t\t\tconst { url, external, download } = get_link_info(a, base);\n\t\t\t\tif (external || download) continue;\n\n\t\t\t\tconst options = get_router_options(a);\n\t\t\t\tif (options.reload) continue;\n\n\t\t\t\tif (options.preload_code === PRELOAD_PRIORITIES.viewport) {\n\t\t\t\t\tobserver.observe(a);\n\t\t\t\t}\n\n\t\t\t\tif (options.preload_code === PRELOAD_PRIORITIES.eager) {\n\t\t\t\t\tpreload_code(get_url_path(/** @type {URL} */ (url)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcallbacks.after_navigate.push(after_navigate);\n\t\tafter_navigate();\n\t}\n\n\t/**\n\t * @param {unknown} error\n\t * @param {import('@sveltejs/kit').NavigationEvent} event\n\t * @returns {import('types').MaybePromise}\n\t */\n\tfunction handle_error(error, event) {\n\t\tif (error instanceof HttpError) {\n\t\t\treturn error.body;\n\t\t}\n\n\t\tif (DEV) {\n\t\t\terrored = true;\n\t\t\tconsole.warn('The next HMR update will cause the page to reload');\n\t\t}\n\n\t\treturn (\n\t\t\tapp.hooks.handleError({ error, event }) ??\n\t\t\t/** @type {any} */ ({ message: event.route.id != null ? 'Internal Error' : 'Not Found' })\n\t\t);\n\t}\n\n\treturn {\n\t\tafter_navigate: (fn) => {\n\t\t\tonMount(() => {\n\t\t\t\tcallbacks.after_navigate.push(fn);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tconst i = callbacks.after_navigate.indexOf(fn);\n\t\t\t\t\tcallbacks.after_navigate.splice(i, 1);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tbefore_navigate: (fn) => {\n\t\t\tonMount(() => {\n\t\t\t\tcallbacks.before_navigate.push(fn);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tconst i = callbacks.before_navigate.indexOf(fn);\n\t\t\t\t\tcallbacks.before_navigate.splice(i, 1);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\ton_navigate: (fn) => {\n\t\t\tonMount(() => {\n\t\t\t\tcallbacks.on_navigate.push(fn);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tconst i = callbacks.on_navigate.indexOf(fn);\n\t\t\t\t\tcallbacks.on_navigate.splice(i, 1);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tdisable_scroll_handling: () => {\n\t\t\tif (DEV && started && !updating) {\n\t\t\t\tthrow new Error('Can only disable scroll handling during navigation');\n\t\t\t}\n\n\t\t\tif (updating || !started) {\n\t\t\t\tautoscroll = false;\n\t\t\t}\n\t\t},\n\n\t\tgoto: (href, opts = {}) => {\n\t\t\treturn goto(href, opts, []);\n\t\t},\n\n\t\tinvalidate: (resource) => {\n\t\t\tif (typeof resource === 'function') {\n\t\t\t\tinvalidated.push(resource);\n\t\t\t} else {\n\t\t\t\tconst { href } = new URL(resource, location.href);\n\t\t\t\tinvalidated.push((url) => url.href === href);\n\t\t\t}\n\n\t\t\treturn invalidate();\n\t\t},\n\n\t\tinvalidate_all: () => {\n\t\t\tforce_invalidation = true;\n\t\t\treturn invalidate();\n\t\t},\n\n\t\tpreload_data: async (href) => {\n\t\t\tconst url = new URL(href, get_base_uri(document));\n\t\t\tconst intent = get_navigation_intent(url, false);\n\n\t\t\tif (!intent) {\n\t\t\t\tthrow new Error(`Attempted to preload a URL that does not belong to this app: ${url}`);\n\t\t\t}\n\n\t\t\tawait preload_data(intent);\n\t\t},\n\n\t\tpreload_code,\n\n\t\tapply_action: async (result) => {\n\t\t\tif (result.type === 'error') {\n\t\t\t\tconst url = new URL(location.href);\n\n\t\t\t\tconst { branch, route } = current;\n\t\t\t\tif (!route) return;\n\n\t\t\t\tconst error_load = await load_nearest_error_page(\n\t\t\t\t\tcurrent.branch.length,\n\t\t\t\t\tbranch,\n\t\t\t\t\troute.errors\n\t\t\t\t);\n\t\t\t\tif (error_load) {\n\t\t\t\t\tconst navigation_result = await get_navigation_result_from_branch({\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams: current.params,\n\t\t\t\t\t\tbranch: branch.slice(0, error_load.idx).concat(error_load.node),\n\t\t\t\t\t\tstatus: result.status ?? 500,\n\t\t\t\t\t\terror: result.error,\n\t\t\t\t\t\troute\n\t\t\t\t\t});\n\n\t\t\t\t\tcurrent = navigation_result.state;\n\n\t\t\t\t\troot.$set(navigation_result.props);\n\n\t\t\t\t\ttick().then(reset_focus);\n\t\t\t\t}\n\t\t\t} else if (result.type === 'redirect') {\n\t\t\t\tgoto(result.location, { invalidateAll: true }, []);\n\t\t\t} else {\n\t\t\t\t/** @type {Record} */\n\t\t\t\troot.$set({\n\t\t\t\t\t// this brings Svelte's view of the world in line with SvelteKit's\n\t\t\t\t\t// after use:enhance reset the form....\n\t\t\t\t\tform: null,\n\t\t\t\t\tpage: { ...page, form: result.data, status: result.status }\n\t\t\t\t});\n\n\t\t\t\t// ...so that setting the `form` prop takes effect and isn't ignored\n\t\t\t\tawait tick();\n\t\t\t\troot.$set({ form: result.data });\n\n\t\t\t\tif (result.type === 'success') {\n\t\t\t\t\treset_focus();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_start_router: () => {\n\t\t\thistory.scrollRestoration = 'manual';\n\n\t\t\t// Adopted from Nuxt.js\n\t\t\t// Reset scrollRestoration to auto when leaving page, allowing page reload\n\t\t\t// and back-navigation from other pages to use the browser to restore the\n\t\t\t// scrolling position.\n\t\t\taddEventListener('beforeunload', (e) => {\n\t\t\t\tlet should_block = false;\n\n\t\t\t\tpersist_state();\n\n\t\t\t\tif (!navigating) {\n\t\t\t\t\tconst nav = create_navigation(current, undefined, null, 'leave');\n\n\t\t\t\t\t// If we're navigating, beforeNavigate was already called. If we end up in here during navigation,\n\t\t\t\t\t// it's due to an external or full-page-reload link, for which we don't want to call the hook again.\n\t\t\t\t\t/** @type {import('@sveltejs/kit').BeforeNavigate} */\n\t\t\t\t\tconst navigation = {\n\t\t\t\t\t\t...nav.navigation,\n\t\t\t\t\t\tcancel: () => {\n\t\t\t\t\t\t\tshould_block = true;\n\t\t\t\t\t\t\tnav.reject(new Error('navigation was cancelled'));\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tcallbacks.before_navigate.forEach((fn) => fn(navigation));\n\t\t\t\t}\n\n\t\t\t\tif (should_block) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.returnValue = '';\n\t\t\t\t} else {\n\t\t\t\t\thistory.scrollRestoration = 'auto';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taddEventListener('visibilitychange', () => {\n\t\t\t\tif (document.visibilityState === 'hidden') {\n\t\t\t\t\tpersist_state();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// @ts-expect-error this isn't supported everywhere yet\n\t\t\tif (!navigator.connection?.saveData) {\n\t\t\t\tsetup_preload();\n\t\t\t}\n\n\t\t\t/** @param {MouseEvent} event */\n\t\t\tcontainer.addEventListener('click', (event) => {\n\t\t\t\t// Adapted from https://github.com/visionmedia/page.js\n\t\t\t\t// MIT license https://github.com/visionmedia/page.js#license\n\t\t\t\tif (event.button || event.which !== 1) return;\n\t\t\t\tif (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n\t\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t\tconst a = find_anchor(/** @type {Element} */ (event.composedPath()[0]), container);\n\t\t\t\tif (!a) return;\n\n\t\t\t\tconst { url, external, target, download } = get_link_info(a, base);\n\t\t\t\tif (!url) return;\n\n\t\t\t\t// bail out before `beforeNavigate` if link opens in a different tab\n\t\t\t\tif (target === '_parent' || target === '_top') {\n\t\t\t\t\tif (window.parent !== window) return;\n\t\t\t\t} else if (target && target !== '_self') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst options = get_router_options(a);\n\t\t\t\tconst is_svg_a_element = a instanceof SVGAElement;\n\n\t\t\t\t// Ignore URL protocols that differ to the current one and are not http(s) (e.g. `mailto:`, `tel:`, `myapp:`, etc.)\n\t\t\t\t// This may be wrong when the protocol is x: and the link goes to y:.. which should be treated as an external\n\t\t\t\t// navigation, but it's not clear how to handle that case and it's not likely to come up in practice.\n\t\t\t\t// MEMO: Without this condition, firefox will open mailer twice.\n\t\t\t\t// See:\n\t\t\t\t// - https://github.com/sveltejs/kit/issues/4045\n\t\t\t\t// - https://github.com/sveltejs/kit/issues/5725\n\t\t\t\t// - https://github.com/sveltejs/kit/issues/6496\n\t\t\t\tif (\n\t\t\t\t\t!is_svg_a_element &&\n\t\t\t\t\turl.protocol !== location.protocol &&\n\t\t\t\t\t!(url.protocol === 'https:' || url.protocol === 'http:')\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tif (download) return;\n\n\t\t\t\t// Ignore the following but fire beforeNavigate\n\t\t\t\tif (external || options.reload) {\n\t\t\t\t\tif (before_navigate({ url, type: 'link' })) {\n\t\t\t\t\t\t// set `navigating` to `true` to prevent `beforeNavigate` callbacks\n\t\t\t\t\t\t// being called when the page unloads\n\t\t\t\t\t\tnavigating = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check if new url only differs by hash and use the browser default behavior in that case\n\t\t\t\t// This will ensure the `hashchange` event is fired\n\t\t\t\t// Removing the hash does a full page navigation in the browser, so make sure a hash is present\n\t\t\t\tconst [nonhash, hash] = url.href.split('#');\n\t\t\t\tif (hash !== undefined && nonhash === location.href.split('#')[0]) {\n\t\t\t\t\t// If we are trying to navigate to the same hash, we should only\n\t\t\t\t\t// attempt to scroll to that element and avoid any history changes.\n\t\t\t\t\t// Otherwise, this can cause Firefox to incorrectly assign a null\n\t\t\t\t\t// history state value without any signal that we can detect.\n\t\t\t\t\tif (current.url.hash === url.hash) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\ta.ownerDocument.getElementById(hash)?.scrollIntoView();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// set this flag to distinguish between navigations triggered by\n\t\t\t\t\t// clicking a hash link and those triggered by popstate\n\t\t\t\t\thash_navigating = true;\n\n\t\t\t\t\tupdate_scroll_positions(current_history_index);\n\n\t\t\t\t\tupdate_url(url);\n\n\t\t\t\t\tif (!options.replace_state) return;\n\n\t\t\t\t\t// hashchange event shouldn't occur if the router is replacing state.\n\t\t\t\t\thash_navigating = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tnavigate({\n\t\t\t\t\turl,\n\t\t\t\t\tscroll: options.noscroll ? scroll_state() : null,\n\t\t\t\t\tkeepfocus: options.keep_focus ?? false,\n\t\t\t\t\tredirect_chain: [],\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\tstate: {},\n\t\t\t\t\t\treplaceState: options.replace_state ?? url.href === location.href\n\t\t\t\t\t},\n\t\t\t\t\taccepted: () => event.preventDefault(),\n\t\t\t\t\tblocked: () => event.preventDefault(),\n\t\t\t\t\ttype: 'link'\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tcontainer.addEventListener('submit', (event) => {\n\t\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t\tconst form = /** @type {HTMLFormElement} */ (\n\t\t\t\t\tHTMLFormElement.prototype.cloneNode.call(event.target)\n\t\t\t\t);\n\n\t\t\t\tconst submitter = /** @type {HTMLButtonElement | HTMLInputElement | null} */ (\n\t\t\t\t\tevent.submitter\n\t\t\t\t);\n\n\t\t\t\tconst method = submitter?.formMethod || form.method;\n\n\t\t\t\tif (method !== 'get') return;\n\n\t\t\t\tconst url = new URL(\n\t\t\t\t\t(submitter?.hasAttribute('formaction') && submitter?.formAction) || form.action\n\t\t\t\t);\n\n\t\t\t\tif (is_external_url(url, base)) return;\n\n\t\t\t\tconst event_form = /** @type {HTMLFormElement} */ (event.target);\n\n\t\t\t\tconst { keep_focus, noscroll, reload, replace_state } = get_router_options(event_form);\n\t\t\t\tif (reload) return;\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\tconst data = new FormData(event_form);\n\n\t\t\t\tconst submitter_name = submitter?.getAttribute('name');\n\t\t\t\tif (submitter_name) {\n\t\t\t\t\tdata.append(submitter_name, submitter?.getAttribute('value') ?? '');\n\t\t\t\t}\n\n\t\t\t\t// @ts-expect-error `URLSearchParams(fd)` is kosher, but typescript doesn't know that\n\t\t\t\turl.search = new URLSearchParams(data).toString();\n\n\t\t\t\tnavigate({\n\t\t\t\t\turl,\n\t\t\t\t\tscroll: noscroll ? scroll_state() : null,\n\t\t\t\t\tkeepfocus: keep_focus ?? false,\n\t\t\t\t\tredirect_chain: [],\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\tstate: {},\n\t\t\t\t\t\treplaceState: replace_state ?? url.href === location.href\n\t\t\t\t\t},\n\t\t\t\t\tnav_token: {},\n\t\t\t\t\taccepted: () => {},\n\t\t\t\t\tblocked: () => {},\n\t\t\t\t\ttype: 'form'\n\t\t\t\t});\n\t\t\t});\n\n\t\t\taddEventListener('popstate', async (event) => {\n\t\t\t\tif (event.state?.[INDEX_KEY]) {\n\t\t\t\t\t// if a popstate-driven navigation is cancelled, we need to counteract it\n\t\t\t\t\t// with history.go, which means we end up back here, hence this check\n\t\t\t\t\tif (event.state[INDEX_KEY] === current_history_index) return;\n\n\t\t\t\t\tconst scroll = scroll_positions[event.state[INDEX_KEY]];\n\n\t\t\t\t\t// if the only change is the hash, we don't need to do anything...\n\t\t\t\t\tif (current.url.href.split('#')[0] === location.href.split('#')[0]) {\n\t\t\t\t\t\t// ...except handle scroll\n\t\t\t\t\t\tscroll_positions[current_history_index] = scroll_state();\n\t\t\t\t\t\tcurrent_history_index = event.state[INDEX_KEY];\n\t\t\t\t\t\tscrollTo(scroll.x, scroll.y);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst delta = event.state[INDEX_KEY] - current_history_index;\n\n\t\t\t\t\tawait navigate({\n\t\t\t\t\t\turl: new URL(location.href),\n\t\t\t\t\t\tscroll,\n\t\t\t\t\t\tkeepfocus: false,\n\t\t\t\t\t\tredirect_chain: [],\n\t\t\t\t\t\tdetails: null,\n\t\t\t\t\t\taccepted: () => {\n\t\t\t\t\t\t\tcurrent_history_index = event.state[INDEX_KEY];\n\t\t\t\t\t\t},\n\t\t\t\t\t\tblocked: () => {\n\t\t\t\t\t\t\thistory.go(-delta);\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: 'popstate',\n\t\t\t\t\t\tdelta\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// since popstate event is also emitted when an anchor referencing the same\n\t\t\t\t\t// document is clicked, we have to check that the router isn't already handling\n\t\t\t\t\t// the navigation. otherwise we would be updating the page store twice.\n\t\t\t\t\tif (!hash_navigating) {\n\t\t\t\t\t\tconst url = new URL(location.href);\n\t\t\t\t\t\tupdate_url(url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taddEventListener('hashchange', () => {\n\t\t\t\t// if the hashchange happened as a result of clicking on a link,\n\t\t\t\t// we need to update history, otherwise we have to leave it alone\n\t\t\t\tif (hash_navigating) {\n\t\t\t\t\thash_navigating = false;\n\t\t\t\t\thistory.replaceState(\n\t\t\t\t\t\t{ ...history.state, [INDEX_KEY]: ++current_history_index },\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tlocation.href\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// fix link[rel=icon], because browsers will occasionally try to load relative\n\t\t\t// URLs after a pushState/replaceState, resulting in a 404 — see\n\t\t\t// https://github.com/sveltejs/kit/issues/3748#issuecomment-1125980897\n\t\t\tfor (const link of document.querySelectorAll('link')) {\n\t\t\t\tif (link.rel === 'icon') link.href = link.href; // eslint-disable-line\n\t\t\t}\n\n\t\t\taddEventListener('pageshow', (event) => {\n\t\t\t\t// If the user navigates to another site and then uses the back button and\n\t\t\t\t// bfcache hits, we need to set navigating to null, the site doesn't know\n\t\t\t\t// the navigation away from it was successful.\n\t\t\t\t// Info about bfcache here: https://web.dev/bfcache\n\t\t\t\tif (event.persisted) {\n\t\t\t\t\tstores.navigating.set(null);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t/**\n\t\t\t * @param {URL} url\n\t\t\t */\n\t\t\tfunction update_url(url) {\n\t\t\t\tcurrent.url = url;\n\t\t\t\tstores.page.set({ ...page, url });\n\t\t\t\tstores.page.notify();\n\t\t\t}\n\t\t},\n\n\t\t_hydrate: async ({\n\t\t\tstatus = 200,\n\t\t\terror,\n\t\t\tnode_ids,\n\t\t\tparams,\n\t\t\troute,\n\t\t\tdata: server_data_nodes,\n\t\t\tform\n\t\t}) => {\n\t\t\thydrated = true;\n\n\t\t\tconst url = new URL(location.href);\n\n\t\t\tif (!__SVELTEKIT_EMBEDDED__) {\n\t\t\t\t// See https://github.com/sveltejs/kit/pull/4935#issuecomment-1328093358 for one motivation\n\t\t\t\t// of determining the params on the client side.\n\t\t\t\t({ params = {}, route = { id: null } } = get_navigation_intent(url, false) || {});\n\t\t\t}\n\n\t\t\t/** @type {import('./types').NavigationFinished | undefined} */\n\t\t\tlet result;\n\n\t\t\ttry {\n\t\t\t\tconst branch_promises = node_ids.map(async (n, i) => {\n\t\t\t\t\tconst server_data_node = server_data_nodes[i];\n\t\t\t\t\t// Type isn't completely accurate, we still need to deserialize uses\n\t\t\t\t\tif (server_data_node?.uses) {\n\t\t\t\t\t\tserver_data_node.uses = deserialize_uses(server_data_node.uses);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn load_node({\n\t\t\t\t\t\tloader: app.nodes[n],\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams,\n\t\t\t\t\t\troute,\n\t\t\t\t\t\tparent: async () => {\n\t\t\t\t\t\t\tconst data = {};\n\t\t\t\t\t\t\tfor (let j = 0; j < i; j += 1) {\n\t\t\t\t\t\t\t\tObject.assign(data, (await branch_promises[j]).data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn data;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tserver_data_node: create_data_node(server_data_node)\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t/** @type {Array} */\n\t\t\t\tconst branch = await Promise.all(branch_promises);\n\n\t\t\t\tconst parsed_route = routes.find(({ id }) => id === route.id);\n\n\t\t\t\t// server-side will have compacted the branch, reinstate empty slots\n\t\t\t\t// so that error boundaries can be lined up correctly\n\t\t\t\tif (parsed_route) {\n\t\t\t\t\tconst layouts = parsed_route.layouts;\n\t\t\t\t\tfor (let i = 0; i < layouts.length; i++) {\n\t\t\t\t\t\tif (!layouts[i]) {\n\t\t\t\t\t\t\tbranch.splice(i, 0, undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresult = await get_navigation_result_from_branch({\n\t\t\t\t\turl,\n\t\t\t\t\tparams,\n\t\t\t\t\tbranch,\n\t\t\t\t\tstatus,\n\t\t\t\t\terror,\n\t\t\t\t\tform,\n\t\t\t\t\troute: parsed_route ?? null\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Redirect) {\n\t\t\t\t\t// this is a real edge case — `load` would need to return\n\t\t\t\t\t// a redirect but only in the browser\n\t\t\t\t\tawait native_navigation(new URL(error.location, location.href));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresult = await load_root_error_page({\n\t\t\t\t\tstatus: error instanceof HttpError ? error.status : 500,\n\t\t\t\t\terror: await handle_error(error, { url, params, route }),\n\t\t\t\t\turl,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tinitialize(result);\n\t\t}\n\t};\n}\n\n/**\n * @param {URL} url\n * @param {boolean[]} invalid\n * @returns {Promise}\n */\nasync function load_data(url, invalid) {\n\tconst data_url = new URL(url);\n\tdata_url.pathname = add_data_suffix(url.pathname);\n\tif (url.pathname.endsWith('/')) {\n\t\tdata_url.searchParams.append(TRAILING_SLASH_PARAM, '1');\n\t}\n\tif (DEV && url.searchParams.has(INVALIDATED_PARAM)) {\n\t\tthrow new Error(`Cannot used reserved query parameter \"${INVALIDATED_PARAM}\"`);\n\t}\n\tdata_url.searchParams.append(INVALIDATED_PARAM, invalid.map((i) => (i ? '1' : '0')).join(''));\n\n\tconst res = await native_fetch(data_url.href);\n\n\tif (!res.ok) {\n\t\t// error message is a JSON-stringified string which devalue can't handle at the top level\n\t\t// turn it into a HttpError to not call handleError on the client again (was already handled on the server)\n\t\tthrow new HttpError(res.status, await res.json());\n\t}\n\n\t// TODO: fix eslint error\n\t// eslint-disable-next-line\n\treturn new Promise(async (resolve) => {\n\t\t/**\n\t\t * Map of deferred promises that will be resolved by a subsequent chunk of data\n\t\t * @type {Map}\n\t\t */\n\t\tconst deferreds = new Map();\n\t\tconst reader = /** @type {ReadableStream} */ (res.body).getReader();\n\t\tconst decoder = new TextDecoder();\n\n\t\t/**\n\t\t * @param {any} data\n\t\t */\n\t\tfunction deserialize(data) {\n\t\t\treturn devalue.unflatten(data, {\n\t\t\t\tPromise: (id) => {\n\t\t\t\t\treturn new Promise((fulfil, reject) => {\n\t\t\t\t\t\tdeferreds.set(id, { fulfil, reject });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet text = '';\n\n\t\twhile (true) {\n\t\t\t// Format follows ndjson (each line is a JSON object) or regular JSON spec\n\t\t\tconst { done, value } = await reader.read();\n\t\t\tif (done && !text) break;\n\n\t\t\ttext += !value && text ? '\\n' : decoder.decode(value); // no value -> final chunk -> add a new line to trigger the last parse\n\n\t\t\twhile (true) {\n\t\t\t\tconst split = text.indexOf('\\n');\n\t\t\t\tif (split === -1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tconst node = JSON.parse(text.slice(0, split));\n\t\t\t\ttext = text.slice(split + 1);\n\n\t\t\t\tif (node.type === 'redirect') {\n\t\t\t\t\treturn resolve(node);\n\t\t\t\t}\n\n\t\t\t\tif (node.type === 'data') {\n\t\t\t\t\t// This is the first (and possibly only, if no pending promises) chunk\n\t\t\t\t\tnode.nodes?.forEach((/** @type {any} */ node) => {\n\t\t\t\t\t\tif (node?.type === 'data') {\n\t\t\t\t\t\t\tnode.uses = deserialize_uses(node.uses);\n\t\t\t\t\t\t\tnode.data = deserialize(node.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tresolve(node);\n\t\t\t\t} else if (node.type === 'chunk') {\n\t\t\t\t\t// This is a subsequent chunk containing deferred data\n\t\t\t\t\tconst { id, data, error } = node;\n\t\t\t\t\tconst deferred = /** @type {import('types').Deferred} */ (deferreds.get(id));\n\t\t\t\t\tdeferreds.delete(id);\n\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tdeferred.reject(deserialize(error));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.fulfil(deserialize(data));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t// TODO edge case handling necessary? stream() read fails?\n}\n\n/**\n * @param {any} uses\n * @return {import('types').Uses}\n */\nfunction deserialize_uses(uses) {\n\treturn {\n\t\tdependencies: new Set(uses?.dependencies ?? []),\n\t\tparams: new Set(uses?.params ?? []),\n\t\tparent: !!uses?.parent,\n\t\troute: !!uses?.route,\n\t\turl: !!uses?.url\n\t};\n}\n\nfunction reset_focus() {\n\tconst autofocus = document.querySelector('[autofocus]');\n\tif (autofocus) {\n\t\t// @ts-ignore\n\t\tautofocus.focus();\n\t} else {\n\t\t// Reset page selection and focus\n\t\t// We try to mimic browsers' behaviour as closely as possible by targeting the\n\t\t// first scrollable region, but unfortunately it's not a perfect match — e.g.\n\t\t// shift-tabbing won't immediately cycle up from the end of the page on Chromium\n\t\t// See https://html.spec.whatwg.org/multipage/interaction.html#get-the-focusable-area\n\t\tconst root = document.body;\n\t\tconst tabindex = root.getAttribute('tabindex');\n\n\t\troot.tabIndex = -1;\n\t\t// @ts-expect-error\n\t\troot.focus({ preventScroll: true, focusVisible: false });\n\n\t\t// restore `tabindex` as to prevent `root` from stealing input from elements\n\t\tif (tabindex !== null) {\n\t\t\troot.setAttribute('tabindex', tabindex);\n\t\t} else {\n\t\t\troot.removeAttribute('tabindex');\n\t\t}\n\n\t\t// capture current selection, so we can compare the state after\n\t\t// snapshot restoration and afterNavigate callbacks have run\n\t\tconst selection = getSelection();\n\n\t\tif (selection && selection.type !== 'None') {\n\t\t\t/** @type {Range[]} */\n\t\t\tconst ranges = [];\n\n\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) {\n\t\t\t\tranges.push(selection.getRangeAt(i));\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (selection.rangeCount !== ranges.length) return;\n\n\t\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) {\n\t\t\t\t\tconst a = ranges[i];\n\t\t\t\t\tconst b = selection.getRangeAt(i);\n\n\t\t\t\t\t// we need to do a deep comparison rather than just `a !== b` because\n\t\t\t\t\t// Safari behaves differently to other browsers\n\t\t\t\t\tif (\n\t\t\t\t\t\ta.commonAncestorContainer !== b.commonAncestorContainer ||\n\t\t\t\t\t\ta.startContainer !== b.startContainer ||\n\t\t\t\t\t\ta.endContainer !== b.endContainer ||\n\t\t\t\t\t\ta.startOffset !== b.startOffset ||\n\t\t\t\t\t\ta.endOffset !== b.endOffset\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if the selection hasn't changed (as a result of an element being (auto)focused,\n\t\t\t\t// or a programmatic selection, we reset everything as part of the navigation)\n\t\t\t\t// fixes https://github.com/sveltejs/kit/issues/8439\n\t\t\t\tselection.removeAllRanges();\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./types').NavigationState} current\n * @param {import('./types').NavigationIntent | undefined} intent\n * @param {URL | null} url\n * @param {Exclude} type\n */\nfunction create_navigation(current, intent, url, type) {\n\t/** @type {(value: any) => void} */\n\tlet fulfil;\n\n\t/** @type {(error: any) => void} */\n\tlet reject;\n\n\tconst complete = new Promise((f, r) => {\n\t\tfulfil = f;\n\t\treject = r;\n\t});\n\n\t// Handle any errors off-chain so that it doesn't show up as an unhandled rejection\n\tcomplete.catch(() => {});\n\n\t/** @type {import('@sveltejs/kit').Navigation} */\n\tconst navigation = {\n\t\tfrom: {\n\t\t\tparams: current.params,\n\t\t\troute: { id: current.route?.id ?? null },\n\t\t\turl: current.url\n\t\t},\n\t\tto: url && {\n\t\t\tparams: intent?.params ?? null,\n\t\t\troute: { id: intent?.route?.id ?? null },\n\t\t\turl\n\t\t},\n\t\twillUnload: !intent,\n\t\ttype,\n\t\tcomplete\n\t};\n\n\treturn {\n\t\tnavigation,\n\t\t// @ts-expect-error\n\t\tfulfil,\n\t\t// @ts-expect-error\n\t\treject\n\t};\n}\n\nif (DEV) {\n\t// Nasty hack to silence harmless warnings the user can do nothing about\n\tconst console_warn = console.warn;\n\tconsole.warn = function warn(...args) {\n\t\tif (\n\t\t\targs.length === 1 &&\n\t\t\t/<(Layout|Page|Error)(_[\\w$]+)?> was created (with unknown|without expected) prop '(data|form)'/.test(\n\t\t\t\targs[0]\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconsole_warn(...args);\n\t};\n\n\tif (import.meta.hot) {\n\t\timport.meta.hot.on('vite:beforeUpdate', () => {\n\t\t\tif (errored) {\n\t\t\t\tlocation.reload();\n\t\t\t}\n\t\t});\n\t}\n}\n","import { DEV } from 'esm-env';\nimport { create_client } from './client.js';\nimport { init } from './singletons.js';\n\n/**\n * @param {import('./types').SvelteKitApp} app\n * @param {HTMLElement} target\n * @param {Parameters[0]} [hydrate]\n */\nexport async function start(app, target, hydrate) {\n\tif (DEV && target === document.body) {\n\t\tconsole.warn(\n\t\t\t'Placing %sveltekit.body% directly inside is not recommended, as your app may break for users who have certain browser extensions installed.\\n\\nConsider wrapping it in an element:\\n\\n
\\n %sveltekit.body%\\n
'\n\t\t);\n\t}\n\n\tconst client = create_client(app, target);\n\n\tinit({ client });\n\n\tif (hydrate) {\n\t\tawait client._hydrate(hydrate);\n\t} else {\n\t\tclient.goto(location.href, { replaceState: true });\n\t}\n\n\tclient._start_router();\n}\n"],"names":["normalize_path","path","trailing_slash","decode_pathname","pathname","decode_params","params","key","tracked_url_properties","make_trackable","url","callback","tracked","property","disable_hash","DATA_SUFFIX","add_data_suffix","hash","values","value","i","buffer","native_fetch","input","init","cache","build_selector","initial_fetch","resource","opts","selector","script","_a","body","__objRest","ttl","subsequent_fetch","resolved","cached","param_pattern","parse_route_id","id","get_route_segments","segment","rest_match","optional_match","parts","content","escape","code","match","is_optional","is_rest","name","matcher","affects_path","route","exec","matchers","result","buffered","param","s","next_param","next_value","str","parse","nodes","server_loads","dictionary","layouts_with_server_load","leaf","layouts","errors","pattern","n","create_layout_loader","create_leaf_loader","uses_server_data","get","e","set","json","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","unflatten","parsed","revivers","hydrate","hydrated","index","standalone","type","reviver","map","obj","array","object","compact","arr","val","valid_layout_exports","valid_layout_server_exports","unwrap_promises","__async","_0","INVALIDATED_PARAM","TRAILING_SLASH_PARAM","scroll_positions","storage.get","SCROLL_KEY","snapshots","SNAPSHOT_KEY","update_scroll_positions","scroll_state","create_client","app","target","routes","default_layout_loader","default_error_loader","container","invalidated","components","load_cache","callbacks","current","started","autoscroll","updating","navigating","hash_navigating","force_invalidation","root","current_history_index","INDEX_KEY","__spreadProps","__spreadValues","scroll","page","token","pending_invalidate","invalidate","intent","get_navigation_intent","nav_token","navigation_result","load_route","goto","capture_snapshot","c","restore_snapshot","_b","persist_state","storage.set","_1","_2","_3","noScroll","replaceState","keepFocus","state","invalidateAll","redirect_chain","get_base_uri","navigate","preload_data","preload_code","pathnames","promises","r","load","initialize","style","stores","navigation","fn","get_navigation_result_from_branch","branch","status","error","form","slash","node","branch_node","data","data_changed","p","prev","load_node","loader","parent","server_data_node","uses","depends","deps","dep","href","load_input","requested","_d","_e","_f","_h","_g","has_changed","parent_changed","route_changed","url_changed","create_data_node","previous","invalidating","loaders","server_data","parent_invalid","invalid_server_nodes","invalid","load_data","load_root_error_page","HttpError","handle_error","server_data_nodes","branch_promises","j","err","Redirect","native_navigation","error_load","load_nearest_error_page","server_fallback","root_layout","root_error","is_external_url","base","get_url_path","before_navigate","delta","should_block","nav","create_navigation","cancellable","keepfocus","details","accepted","blocked","previous_history_index","_c","change","after_navigate","cleanup","activeElement","tick","deep_linked","changed_focus","reset_focus","setup_preload","mousemove_timeout","event","preload","tap","observer","entries","entry","element","priority","a","find_anchor","external","download","get_link_info","options","get_router_options","PRELOAD_PRIORITIES","onMount","nonhash","update_url","submitter","event_form","keep_focus","noscroll","reload","replace_state","submitter_name","link","node_ids","deserialize_uses","parsed_route","data_url","res","resolve","deferreds","reader","decoder","deserialize","devalue.unflatten","fulfil","reject","text","done","split","deferred","autofocus","tabindex","selection","ranges","b","complete","f","start","client"],"mappings":"4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