diff --git a/.svelte-kit/ambient.d.ts b/.svelte-kit/ambient.d.ts deleted file mode 100644 index 7b3b726..0000000 --- a/.svelte-kit/ambient.d.ts +++ /dev/null @@ -1,462 +0,0 @@ - -// this file is generated — do not edit it - - -/// - -/** - * This module provides access to environment variables that are injected _statically_ into your bundle at build time and are limited to _private_ access. - * - * | | Runtime | Build time | - * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | - * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) | - * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) | - * - * Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination. - * - * **_Private_ access:** - * - * - This module cannot be imported into client-side code - * - This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured) - * - * For example, given the following build time environment: - * - * ```env - * ENVIRONMENT=production - * PUBLIC_BASE_URL=http://site.com - * ``` - * - * With the default `publicPrefix` and `privatePrefix`: - * - * ```ts - * import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/private'; - * - * console.log(ENVIRONMENT); // => "production" - * console.log(PUBLIC_BASE_URL); // => throws error during build - * ``` - * - * The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values. - */ -declare module '$env/static/private' { - export const ELECTRON_MIRROR: string; - export const GREP_COLOR: string; - export const AUTOJUMP_ERROR_PATH: string; - export const PYCHARM_VM_OPTIONS: string; - export const LDFLAGS: string; - export const STARSHIP_SHELL: string; - export const MANPATH: string; - export const WEBIDE_VM_OPTIONS: string; - export const LESS_TERMCAP_mb: string; - export const GHOSTTY_RESOURCES_DIR: string; - export const TERM_PROGRAM: string; - export const NODE: string; - export const LESS_TERMCAP_md: string; - export const FNM_LOGLEVEL: string; - export const ANDROID_HOME: string; - export const LESS_TERMCAP_me: string; - export const AUTOJUMP_SOURCED: string; - export const SHELL: string; - export const JETBRAINSCLIENT_VM_OPTIONS: string; - export const TERM: string; - export const FNM_NODE_DIST_MIRROR: string; - export const TMPDIR: string; - export const HOMEBREW_REPOSITORY: string; - export const CPPFLAGS: string; - export const VSCODE_PYTHON_AUTOACTIVATE_GUARD: string; - export const TERM_PROGRAM_VERSION: string; - export const ZDOTDIR: string; - export const HOMEBREW_AUTO_UPDATE_SECS: string; - export const MallocNanoZone: string; - export const LESS_TERMCAP_ue: string; - export const JDK_17_HOME: string; - export const npm_config_local_prefix: string; - export const PNPM_HOME: string; - export const LC_ALL: string; - export const GOPRIVATE: string; - export const BW_SESSION: string; - export const LOGNOTE_HOME: string; - export const FNM_COREPACK_ENABLED: string; - export const USER: string; - export const GM_QEMU_START_ARGS: string; - export const COMMAND_MODE: string; - export const GREP_COLORS: string; - export const CC_aarch64_unknown_linux_musl: string; - export const HOMEBREW_INSTALL_FROM_API: string; - export const SSH_AUTH_SOCK: string; - export const PHPSTORM_VM_OPTIONS: string; - export const VSCODE_PROFILE_INITIALIZED: string; - export const __CF_USER_TEXT_ENCODING: string; - export const PUB_HOSTED_URL: string; - export const PYTORCH_ENABLE_MPS_FALLBACK: string; - export const npm_execpath: string; - export const GOLAND_VM_OPTIONS: string; - export const APPCODE_VM_OPTIONS: string; - export const GO111MODULE: string; - export const LSCOLORS: string; - export const LESS_TERMCAP_us: string; - export const JDK_21_HOME: string; - export const FNM_VERSION_FILE_STRATEGY: string; - export const FNM_ARCH: string; - export const DEVECOSTUDIO_VM_OPTIONS: string; - export const CIVITAI_TOKEN: string; - export const PATH: string; - export const RUSTROVER_VM_OPTIONS: string; - export const GOPROXY: string; - export const npm_package_json: string; - export const _: string; - export const GHOSTTY_SHELL_FEATURES: string; - export const USER_ZDOTDIR: string; - export const __CFBundleIdentifier: string; - export const npm_command: string; - export const PWD: string; - export const JAVA_HOME: string; - export const FLUTTER_STORAGE_BASE_URL: string; - export const npm_lifecycle_event: string; - export const EDITOR: string; - export const RUSTFLAGS: string; - export const npm_package_name: string; - export const CLION_VM_OPTIONS: string; - export const IDEA_VM_OPTIONS: string; - export const LANG: string; - export const BUN_INSPECT_CONNECT_TO: string; - export const VSCODE_GIT_ASKPASS_EXTRA_ARGS: string; - export const XPC_FLAGS: string; - export const FNM_MULTISHELL_PATH: string; - export const WEBSTORM_VM_OPTIONS: string; - export const DATASPELL_VM_OPTIONS: string; - export const HTTPS_PROXY: string; - export const JDK_8_HOME: string; - export const npm_package_version: string; - export const XPC_SERVICE_NAME: string; - export const CXX_aarch64_unknown_linux_musl: string; - export const VSCODE_INJECTION: string; - export const HOME: string; - export const GOSUMDB: string; - export const SHLVL: string; - export const STUDIO_VM_OPTIONS: string; - export const GRADLE_USER_HOME: string; - export const VSCODE_GIT_ASKPASS_MAIN: string; - export const TERMINFO: string; - export const NPM_CONFIG_REGISTRY: string; - export const HOMEBREW_PREFIX: string; - export const FNM_DIR: string; - export const HTTP_PROXY: string; - export const LD_aarch64_unknown_linux_musl: string; - export const RUSTUP_DIST_SERVER: string; - export const STARSHIP_SESSION_KEY: string; - export const LOGNAME: string; - export const npm_lifecycle_script: string; - export const VSCODE_GIT_IPC_HANDLE: string; - export const LESS_TERMCAP_so: string; - export const XDG_DATA_DIRS: string; - export const GATEWAY_VM_OPTIONS: string; - export const HF_ENDPOINT: string; - export const GHOSTTY_BIN_DIR: string; - export const CODELLDB_LAUNCH_CONNECT_FILE: string; - export const BUN_INSTALL: string; - export const DATAGRIP_VM_OPTIONS: string; - export const GOPATH: string; - export const PKG_CONFIG_PATH: string; - export const npm_config_user_agent: string; - export const GDK_DEBUG: string; - export const JDK_11_HOME: string; - export const ANDROID_API: string; - export const FNM_RESOLVE_ENGINES: string; - export const VSCODE_GIT_ASKPASS_NODE: string; - export const GIT_ASKPASS: string; - export const HOMEBREW_CELLAR: string; - export const ANDROID_NDK_HOME: string; - export const INFOPATH: string; - export const JETBRAINS_CLIENT_VM_OPTIONS: string; - export const RIDER_VM_OPTIONS: string; - export const OSLogRateLimit: string; - export const HF_TOKEN: string; - export const RUBYMINE_VM_OPTIONS: string; - export const HOMEBREW_NO_ENV_HINTS: string; - export const RUSTUP_UPDATE_ROOT: string; - export const npm_node_execpath: string; - export const COLORTERM: string; - export const LESS_TERMCAP_se: string; -} - -/** - * This module provides access to environment variables that are injected _statically_ into your bundle at build time and are _publicly_ accessible. - * - * | | Runtime | Build time | - * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | - * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) | - * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) | - * - * Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination. - * - * **_Public_ access:** - * - * - This module _can_ be imported into client-side code - * - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included - * - * For example, given the following build time environment: - * - * ```env - * ENVIRONMENT=production - * PUBLIC_BASE_URL=http://site.com - * ``` - * - * With the default `publicPrefix` and `privatePrefix`: - * - * ```ts - * import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/public'; - * - * console.log(ENVIRONMENT); // => throws error during build - * console.log(PUBLIC_BASE_URL); // => "http://site.com" - * ``` - * - * The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values. - */ -declare module '$env/static/public' { - -} - -/** - * This module provides access to environment variables set _dynamically_ at runtime and that are limited to _private_ access. - * - * | | Runtime | Build time | - * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | - * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) | - * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) | - * - * Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`. - * - * **_Private_ access:** - * - * - This module cannot be imported into client-side code - * - This module includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured) - * - * > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. - * - * > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: - * > - * > ```env - * > MY_FEATURE_FLAG= - * > ``` - * > - * > You can override `.env` values from the command line like so: - * > - * > ```sh - * > MY_FEATURE_FLAG="enabled" npm run dev - * > ``` - * - * For example, given the following runtime environment: - * - * ```env - * ENVIRONMENT=production - * PUBLIC_BASE_URL=http://site.com - * ``` - * - * With the default `publicPrefix` and `privatePrefix`: - * - * ```ts - * import { env } from '$env/dynamic/private'; - * - * console.log(env.ENVIRONMENT); // => "production" - * console.log(env.PUBLIC_BASE_URL); // => undefined - * ``` - */ -declare module '$env/dynamic/private' { - export const env: { - ELECTRON_MIRROR: string; - GREP_COLOR: string; - AUTOJUMP_ERROR_PATH: string; - PYCHARM_VM_OPTIONS: string; - LDFLAGS: string; - STARSHIP_SHELL: string; - MANPATH: string; - WEBIDE_VM_OPTIONS: string; - LESS_TERMCAP_mb: string; - GHOSTTY_RESOURCES_DIR: string; - TERM_PROGRAM: string; - NODE: string; - LESS_TERMCAP_md: string; - FNM_LOGLEVEL: string; - ANDROID_HOME: string; - LESS_TERMCAP_me: string; - AUTOJUMP_SOURCED: string; - SHELL: string; - JETBRAINSCLIENT_VM_OPTIONS: string; - TERM: string; - FNM_NODE_DIST_MIRROR: string; - TMPDIR: string; - HOMEBREW_REPOSITORY: string; - CPPFLAGS: string; - VSCODE_PYTHON_AUTOACTIVATE_GUARD: string; - TERM_PROGRAM_VERSION: string; - ZDOTDIR: string; - HOMEBREW_AUTO_UPDATE_SECS: string; - MallocNanoZone: string; - LESS_TERMCAP_ue: string; - JDK_17_HOME: string; - npm_config_local_prefix: string; - PNPM_HOME: string; - LC_ALL: string; - GOPRIVATE: string; - BW_SESSION: string; - LOGNOTE_HOME: string; - FNM_COREPACK_ENABLED: string; - USER: string; - GM_QEMU_START_ARGS: string; - COMMAND_MODE: string; - GREP_COLORS: string; - CC_aarch64_unknown_linux_musl: string; - HOMEBREW_INSTALL_FROM_API: string; - SSH_AUTH_SOCK: string; - PHPSTORM_VM_OPTIONS: string; - VSCODE_PROFILE_INITIALIZED: string; - __CF_USER_TEXT_ENCODING: string; - PUB_HOSTED_URL: string; - PYTORCH_ENABLE_MPS_FALLBACK: string; - npm_execpath: string; - GOLAND_VM_OPTIONS: string; - APPCODE_VM_OPTIONS: string; - GO111MODULE: string; - LSCOLORS: string; - LESS_TERMCAP_us: string; - JDK_21_HOME: string; - FNM_VERSION_FILE_STRATEGY: string; - FNM_ARCH: string; - DEVECOSTUDIO_VM_OPTIONS: string; - CIVITAI_TOKEN: string; - PATH: string; - RUSTROVER_VM_OPTIONS: string; - GOPROXY: string; - npm_package_json: string; - _: string; - GHOSTTY_SHELL_FEATURES: string; - USER_ZDOTDIR: string; - __CFBundleIdentifier: string; - npm_command: string; - PWD: string; - JAVA_HOME: string; - FLUTTER_STORAGE_BASE_URL: string; - npm_lifecycle_event: string; - EDITOR: string; - RUSTFLAGS: string; - npm_package_name: string; - CLION_VM_OPTIONS: string; - IDEA_VM_OPTIONS: string; - LANG: string; - BUN_INSPECT_CONNECT_TO: string; - VSCODE_GIT_ASKPASS_EXTRA_ARGS: string; - XPC_FLAGS: string; - FNM_MULTISHELL_PATH: string; - WEBSTORM_VM_OPTIONS: string; - DATASPELL_VM_OPTIONS: string; - HTTPS_PROXY: string; - JDK_8_HOME: string; - npm_package_version: string; - XPC_SERVICE_NAME: string; - CXX_aarch64_unknown_linux_musl: string; - VSCODE_INJECTION: string; - HOME: string; - GOSUMDB: string; - SHLVL: string; - STUDIO_VM_OPTIONS: string; - GRADLE_USER_HOME: string; - VSCODE_GIT_ASKPASS_MAIN: string; - TERMINFO: string; - NPM_CONFIG_REGISTRY: string; - HOMEBREW_PREFIX: string; - FNM_DIR: string; - HTTP_PROXY: string; - LD_aarch64_unknown_linux_musl: string; - RUSTUP_DIST_SERVER: string; - STARSHIP_SESSION_KEY: string; - LOGNAME: string; - npm_lifecycle_script: string; - VSCODE_GIT_IPC_HANDLE: string; - LESS_TERMCAP_so: string; - XDG_DATA_DIRS: string; - GATEWAY_VM_OPTIONS: string; - HF_ENDPOINT: string; - GHOSTTY_BIN_DIR: string; - CODELLDB_LAUNCH_CONNECT_FILE: string; - BUN_INSTALL: string; - DATAGRIP_VM_OPTIONS: string; - GOPATH: string; - PKG_CONFIG_PATH: string; - npm_config_user_agent: string; - GDK_DEBUG: string; - JDK_11_HOME: string; - ANDROID_API: string; - FNM_RESOLVE_ENGINES: string; - VSCODE_GIT_ASKPASS_NODE: string; - GIT_ASKPASS: string; - HOMEBREW_CELLAR: string; - ANDROID_NDK_HOME: string; - INFOPATH: string; - JETBRAINS_CLIENT_VM_OPTIONS: string; - RIDER_VM_OPTIONS: string; - OSLogRateLimit: string; - HF_TOKEN: string; - RUBYMINE_VM_OPTIONS: string; - HOMEBREW_NO_ENV_HINTS: string; - RUSTUP_UPDATE_ROOT: string; - npm_node_execpath: string; - COLORTERM: string; - LESS_TERMCAP_se: string; - [key: `PUBLIC_${string}`]: undefined; - [key: `${string}`]: string | undefined; - } -} - -/** - * This module provides access to environment variables set _dynamically_ at runtime and that are _publicly_ accessible. - * - * | | Runtime | Build time | - * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | - * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) | - * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) | - * - * Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`. - * - * **_Public_ access:** - * - * - This module _can_ be imported into client-side code - * - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included - * - * > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. - * - * > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: - * > - * > ```env - * > MY_FEATURE_FLAG= - * > ``` - * > - * > You can override `.env` values from the command line like so: - * > - * > ```sh - * > MY_FEATURE_FLAG="enabled" npm run dev - * > ``` - * - * For example, given the following runtime environment: - * - * ```env - * ENVIRONMENT=production - * PUBLIC_BASE_URL=http://example.com - * ``` - * - * With the default `publicPrefix` and `privatePrefix`: - * - * ```ts - * import { env } from '$env/dynamic/public'; - * console.log(env.ENVIRONMENT); // => undefined, not public - * console.log(env.PUBLIC_BASE_URL); // => "http://example.com" - * ``` - * - * ``` - * - * ``` - */ -declare module '$env/dynamic/public' { - export const env: { - [key: `PUBLIC_${string}`]: string | undefined; - } -} diff --git a/.svelte-kit/generated/client-optimized/app.js b/.svelte-kit/generated/client-optimized/app.js deleted file mode 100644 index c3c7b78..0000000 --- a/.svelte-kit/generated/client-optimized/app.js +++ /dev/null @@ -1,29 +0,0 @@ -export { matchers } from './matchers.js'; - -export const nodes = [ - () => import('./nodes/0'), - () => import('./nodes/1'), - () => import('./nodes/2') -]; - -export const server_loads = []; - -export const dictionary = { - "/": [2] - }; - -export const hooks = { - handleError: (({ error }) => { console.error(error) }), - - reroute: (() => {}), - transport: {} -}; - -export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode])); -export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode])); - -export const hash = false; - -export const decode = (type, value) => decoders[type](value); - -export { default as root } from '../root.js'; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/matchers.js b/.svelte-kit/generated/client-optimized/matchers.js deleted file mode 100644 index f6bd30a..0000000 --- a/.svelte-kit/generated/client-optimized/matchers.js +++ /dev/null @@ -1 +0,0 @@ -export const matchers = {}; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/nodes/0.js b/.svelte-kit/generated/client-optimized/nodes/0.js deleted file mode 100644 index 9a2f020..0000000 --- a/.svelte-kit/generated/client-optimized/nodes/0.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as universal from "../../../../src/routes/+layout.ts"; -export { universal }; -export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/nodes/1.js b/.svelte-kit/generated/client-optimized/nodes/1.js deleted file mode 100644 index bf58bad..0000000 --- a/.svelte-kit/generated/client-optimized/nodes/1.js +++ /dev/null @@ -1 +0,0 @@ -export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client-optimized/nodes/2.js b/.svelte-kit/generated/client-optimized/nodes/2.js deleted file mode 100644 index 1cb4f85..0000000 --- a/.svelte-kit/generated/client-optimized/nodes/2.js +++ /dev/null @@ -1 +0,0 @@ -export { default as component } from "../../../../src/routes/+page.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client/app.js b/.svelte-kit/generated/client/app.js deleted file mode 100644 index c3c7b78..0000000 --- a/.svelte-kit/generated/client/app.js +++ /dev/null @@ -1,29 +0,0 @@ -export { matchers } from './matchers.js'; - -export const nodes = [ - () => import('./nodes/0'), - () => import('./nodes/1'), - () => import('./nodes/2') -]; - -export const server_loads = []; - -export const dictionary = { - "/": [2] - }; - -export const hooks = { - handleError: (({ error }) => { console.error(error) }), - - reroute: (() => {}), - transport: {} -}; - -export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode])); -export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode])); - -export const hash = false; - -export const decode = (type, value) => decoders[type](value); - -export { default as root } from '../root.js'; \ No newline at end of file diff --git a/.svelte-kit/generated/client/matchers.js b/.svelte-kit/generated/client/matchers.js deleted file mode 100644 index f6bd30a..0000000 --- a/.svelte-kit/generated/client/matchers.js +++ /dev/null @@ -1 +0,0 @@ -export const matchers = {}; \ No newline at end of file diff --git a/.svelte-kit/generated/client/nodes/0.js b/.svelte-kit/generated/client/nodes/0.js deleted file mode 100644 index 9a2f020..0000000 --- a/.svelte-kit/generated/client/nodes/0.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as universal from "../../../../src/routes/+layout.ts"; -export { universal }; -export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client/nodes/1.js b/.svelte-kit/generated/client/nodes/1.js deleted file mode 100644 index bf58bad..0000000 --- a/.svelte-kit/generated/client/nodes/1.js +++ /dev/null @@ -1 +0,0 @@ -export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/client/nodes/2.js b/.svelte-kit/generated/client/nodes/2.js deleted file mode 100644 index 1cb4f85..0000000 --- a/.svelte-kit/generated/client/nodes/2.js +++ /dev/null @@ -1 +0,0 @@ -export { default as component } from "../../../../src/routes/+page.svelte"; \ No newline at end of file diff --git a/.svelte-kit/generated/root.js b/.svelte-kit/generated/root.js deleted file mode 100644 index 4d1e892..0000000 --- a/.svelte-kit/generated/root.js +++ /dev/null @@ -1,3 +0,0 @@ -import { asClassComponent } from 'svelte/legacy'; -import Root from './root.svelte'; -export default asClassComponent(Root); \ No newline at end of file diff --git a/.svelte-kit/generated/root.svelte b/.svelte-kit/generated/root.svelte deleted file mode 100644 index 0795183..0000000 --- a/.svelte-kit/generated/root.svelte +++ /dev/null @@ -1,68 +0,0 @@ - - - - -{#if constructors[1]} - {@const Pyramid_0 = constructors[0]} - - - - - - -{:else} - {@const Pyramid_0 = constructors[0]} - - - -{/if} - -{#if mounted} -
- {#if navigated} - {title} - {/if} -
-{/if} \ No newline at end of file diff --git a/.svelte-kit/generated/server/internal.js b/.svelte-kit/generated/server/internal.js deleted file mode 100644 index 52fd907..0000000 --- a/.svelte-kit/generated/server/internal.js +++ /dev/null @@ -1,54 +0,0 @@ - -import root from '../root.js'; -import { set_building, set_prerendering } from '__sveltekit/environment'; -import { set_assets } from '$app/paths/internal/server'; -import { set_manifest, set_read_implementation } from '__sveltekit/server'; -import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js'; - -export const options = { - app_template_contains_nonce: false, - async: false, - csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}}, - csrf_check_origin: true, - csrf_trusted_origins: [], - embedded: false, - env_public_prefix: 'PUBLIC_', - env_private_prefix: '', - hash_routing: false, - hooks: null, // added lazily, via `get_hooks` - preload_strategy: "modulepreload", - root, - service_worker: false, - service_worker_options: undefined, - server_error_boundaries: false, - templates: { - app: ({ head, body, assets, nonce, env }) => "\n\n \n \n \n \n Tauri + SvelteKit + Typescript App\n " + head + "\n \n \n
" + body + "
\n \n\n", - error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" - }, - version_hash: "cow4e7" -}; - -export async function get_hooks() { - let handle; - let handleFetch; - let handleError; - let handleValidationError; - let init; - - - let reroute; - let transport; - - - return { - handle, - handleFetch, - handleError, - handleValidationError, - init, - reroute, - transport - }; -} - -export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation }; diff --git a/.svelte-kit/non-ambient.d.ts b/.svelte-kit/non-ambient.d.ts deleted file mode 100644 index 629b1e4..0000000 --- a/.svelte-kit/non-ambient.d.ts +++ /dev/null @@ -1,43 +0,0 @@ - -// this file is generated — do not edit it - - -declare module "svelte/elements" { - export interface HTMLAttributes { - 'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null; - 'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null; - 'data-sveltekit-preload-code'?: - | true - | '' - | 'eager' - | 'viewport' - | 'hover' - | 'tap' - | 'off' - | undefined - | null; - 'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null; - 'data-sveltekit-reload'?: true | '' | 'off' | undefined | null; - 'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null; - } -} - -export {}; - - -declare module "$app/types" { - type MatcherParam = M extends (param : string) => param is (infer U extends string) ? U : string; - - export interface AppTypes { - RouteId(): "/"; - RouteParams(): { - - }; - LayoutParams(): { - "/": Record - }; - Pathname(): "/"; - ResolvedPathname(): `${"" | `/${string}`}${ReturnType}`; - Asset(): "/favicon.png" | "/svelte.svg" | "/tauri.svg" | "/vite.svg" | string & {}; - } -} \ No newline at end of file diff --git a/.svelte-kit/output/client/.vite/manifest.json b/.svelte-kit/output/client/.vite/manifest.json deleted file mode 100644 index 4818083..0000000 --- a/.svelte-kit/output/client/.vite/manifest.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - ".svelte-kit/generated/client-optimized/app.js": { - "file": "_app/immutable/entry/app.CBndQoGT.js", - "name": "entry/app", - "src": ".svelte-kit/generated/client-optimized/app.js", - "isEntry": true, - "imports": [ - "_QnfpkG_Q.js", - "_E-DQD4vt.js", - "_VCsPq5MH.js", - "_V4GKpPu4.js", - "_L6H5smAl.js" - ], - "dynamicImports": [ - ".svelte-kit/generated/client-optimized/nodes/0.js", - ".svelte-kit/generated/client-optimized/nodes/1.js", - ".svelte-kit/generated/client-optimized/nodes/2.js" - ] - }, - ".svelte-kit/generated/client-optimized/nodes/0.js": { - "file": "_app/immutable/nodes/0.DCFqwZUk.js", - "name": "nodes/0", - "src": ".svelte-kit/generated/client-optimized/nodes/0.js", - "isEntry": true, - "isDynamicEntry": true, - "imports": [ - "_VCsPq5MH.js", - "_QnfpkG_Q.js", - "_L6H5smAl.js" - ] - }, - ".svelte-kit/generated/client-optimized/nodes/1.js": { - "file": "_app/immutable/nodes/1.Ck9HYfT_.js", - "name": "nodes/1", - "src": ".svelte-kit/generated/client-optimized/nodes/1.js", - "isEntry": true, - "isDynamicEntry": true, - "imports": [ - "_VCsPq5MH.js", - "_QnfpkG_Q.js", - "_E-DQD4vt.js", - "_BRJNrpWH.js" - ] - }, - ".svelte-kit/generated/client-optimized/nodes/2.js": { - "file": "_app/immutable/nodes/2.C6jgA3H7.js", - "name": "nodes/2", - "src": ".svelte-kit/generated/client-optimized/nodes/2.js", - "isEntry": true, - "isDynamicEntry": true, - "imports": [ - "_VCsPq5MH.js", - "_QnfpkG_Q.js", - "_E-DQD4vt.js" - ], - "css": [ - "_app/immutable/assets/2.COJFZ_SK.css" - ] - }, - "_BRJNrpWH.js": { - "file": "_app/immutable/chunks/BRJNrpWH.js", - "name": "entry", - "imports": [ - "_QnfpkG_Q.js", - "_V4GKpPu4.js" - ] - }, - "_E-DQD4vt.js": { - "file": "_app/immutable/chunks/E-DQD4vt.js", - "name": "render", - "imports": [ - "_QnfpkG_Q.js", - "_VCsPq5MH.js" - ] - }, - "_L6H5smAl.js": { - "file": "_app/immutable/chunks/L6H5smAl.js", - "name": "branches", - "imports": [ - "_QnfpkG_Q.js" - ] - }, - "_QnfpkG_Q.js": { - "file": "_app/immutable/chunks/QnfpkG_Q.js", - "name": "runtime" - }, - "_V4GKpPu4.js": { - "file": "_app/immutable/chunks/V4GKpPu4.js", - "name": "index-client", - "imports": [ - "_QnfpkG_Q.js" - ] - }, - "_VCsPq5MH.js": { - "file": "_app/immutable/chunks/VCsPq5MH.js", - "name": "disclose-version", - "imports": [ - "_QnfpkG_Q.js" - ] - }, - "node_modules/@sveltejs/kit/src/runtime/client/entry.js": { - "file": "_app/immutable/entry/start.DXEWCeTR.js", - "name": "entry/start", - "src": "node_modules/@sveltejs/kit/src/runtime/client/entry.js", - "isEntry": true, - "imports": [ - "_BRJNrpWH.js" - ] - } -} \ No newline at end of file diff --git a/.svelte-kit/output/client/_app/immutable/assets/2.COJFZ_SK.css b/.svelte-kit/output/client/_app/immutable/assets/2.COJFZ_SK.css deleted file mode 100644 index 680edb9..0000000 --- a/.svelte-kit/output/client/_app/immutable/assets/2.COJFZ_SK.css +++ /dev/null @@ -1 +0,0 @@ -.logo.vite.svelte-1uha8ag:hover{filter:drop-shadow(0 0 2em #747bff)}.logo.svelte-kit.svelte-1uha8ag:hover{filter:drop-shadow(0 0 2em #ff3e00)}:root{color:#0f0f0f;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;background-color:#f6f6f6;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:24px}.container.svelte-1uha8ag{text-align:center;flex-direction:column;justify-content:center;margin:0;padding-top:10vh;display:flex}.logo.svelte-1uha8ag{will-change:filter;height:6em;padding:1.5em;transition:all .75s}.logo.tauri.svelte-1uha8ag:hover{filter:drop-shadow(0 0 2em #24c8db)}.row.svelte-1uha8ag{justify-content:center;display:flex}a.svelte-1uha8ag{color:#646cff;-webkit-text-decoration:inherit;text-decoration:inherit;font-weight:500}a.svelte-1uha8ag:hover{color:#535bf2}h1.svelte-1uha8ag{text-align:center}input.svelte-1uha8ag,button.svelte-1uha8ag{color:#0f0f0f;background-color:#fff;border:1px solid #0000;border-radius:8px;padding:.6em 1.2em;font-family:inherit;font-size:1em;font-weight:500;transition:border-color .25s;box-shadow:0 2px 2px #0003}button.svelte-1uha8ag{cursor:pointer}button.svelte-1uha8ag:hover{border-color:#396cd8}button.svelte-1uha8ag:active{background-color:#e8e8e8;border-color:#396cd8}input.svelte-1uha8ag,button.svelte-1uha8ag{outline:none}#greet-input.svelte-1uha8ag{margin-right:5px}@media(prefers-color-scheme:dark){:root{color:#f6f6f6;background-color:#2f2f2f}a.svelte-1uha8ag:hover{color:#24c8db}input.svelte-1uha8ag,button.svelte-1uha8ag{color:#fff;background-color:#0f0f0f98}button.svelte-1uha8ag:active{background-color:#0f0f0f69}} diff --git a/.svelte-kit/output/client/_app/immutable/chunks/BRJNrpWH.js b/.svelte-kit/output/client/_app/immutable/chunks/BRJNrpWH.js deleted file mode 100644 index 2cc1096..0000000 --- a/.svelte-kit/output/client/_app/immutable/chunks/BRJNrpWH.js +++ /dev/null @@ -1 +0,0 @@ -var te=t=>{throw TypeError(t)};var je=(t,e,n)=>e.has(t)||te("Cannot "+n);var v=(t,e,n)=>(je(t,e,"read from private field"),n?n.call(t):e.get(t)),U=(t,e,n)=>e.has(t)?te("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{aP as Ut,aQ as Ne,av as T,C as I,au as O,at as mt,aR as qe}from"./QnfpkG_Q.js";import{o as ee}from"./V4GKpPu4.js";const K=[];function Dt(t,e=Ut){let n=null;const a=new Set;function r(o){if(Ne(t,o)&&(t=o,n)){const l=!K.length;for(const c of a)c[1](),K.push(c,t);if(l){for(let c=0;c{a.delete(c),a.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:s}}class Vt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Bt{constructor(e,n){this.status=e,this.location=n}}class Kt extends Error{constructor(e,n,a){super(a),this.status=e,this.text=n}}new URL("sveltekit-internal://");function De(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Ve(t){return t.split("%25").map(decodeURI).join("%25")}function Be(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Tt({href:t}){return t.split("#")[0]}function Ke(...t){let e=5381;for(const n of t)if(typeof n=="string"){let a=n.length;for(;a;)e=e*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)e=e*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function Me(t){const e=atob(t),n=new Uint8Array(e.length);for(let a=0;a((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&J.delete(Mt(t)),ze(t,e));const J=new Map;function Fe(t,e){const n=Mt(t,e),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...i}=JSON.parse(a.textContent);const s=a.getAttribute("data-ttl");return s&&J.set(n,{body:r,init:i,ttl:1e3*Number(s)}),a.getAttribute("data-b64")!==null&&(r=Me(r)),Promise.resolve(new Response(r,i))}return window.fetch(t,e)}function Ge(t,e,n){if(J.size>0){const a=Mt(t,n),r=J.get(a);if(r){if(performance.now(){const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return e.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(i)return e.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const s=a.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return It(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return It(String.fromCharCode(...l.slice(2).split("-").map(m=>parseInt(m,16))));const d=We.exec(l),[,u,w,p,f]=d;return e.push({name:p,matcher:f,optional:!!u,rest:!!w,chained:w?c===1&&s[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return It(l)}).join("")}).join("")}/?$`),params:e}}function He(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Je(t){return t.slice(1).split("/").filter(He)}function Xe(t,e,n){const a={},r=t.slice(1),i=r.filter(o=>o!==void 0);let s=0;for(let o=0;od).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){a[l.name]=c;const d=e[o+1],u=r[o+1];d&&!d.rest&&d.optional&&u&&l.chained&&(s=0),!d&&!u&&Object.keys(a).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return a}function It(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Qe({nodes:t,server_loads:e,dictionary:n,matchers:a}){const r=new Set(e);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:u,params:w}=Ye(o),p={id:o,exec:f=>{const m=u.exec(f);if(m)return Xe(m,w,a)},errors:[1,...d||[]].map(f=>t[f]),layouts:[0,...c||[]].map(s),leaf:i(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function i(o){const l=o<0;return l&&(o=~o),[l,t[o]]}function s(o){return o===void 0?o:[r.has(o),t[o]]}}function ge(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function ne(t,e,n=JSON.stringify){const a=n(e);try{sessionStorage[t]=a}catch{}}var fe;const A=((fe=globalThis.__sveltekit_1duwkc9)==null?void 0:fe.base)??"";var ue;const Ze=((ue=globalThis.__sveltekit_1duwkc9)==null?void 0:ue.assets)??A??"",tn="1774502804002",me="sveltekit:snapshot",_e="sveltekit:scroll",we="sveltekit:states",en="sveltekit:pageurl",z="sveltekit:history",Q="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},zt=location.origin;function ve(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function V(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const re={...q,"":q.hover};function ye(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function be(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ye(t)}}function $t(t,e,n){let a;try{if(a=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";a.hash=`#${o}${a.hash}`}}catch{}const r=t instanceof SVGAElement?t.target.baseVal:t.target,i=!a||!!r||Rt(a,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),s=(a==null?void 0:a.origin)===zt&&t.hasAttribute("download");return{url:a,external:i,target:r,download:s}}function _t(t){let e=null,n=null,a=null,r=null,i=null,s=null,o=t;for(;o&&o!==document.documentElement;)a===null&&(a=M(o,"preload-code")),r===null&&(r=M(o,"preload-data")),e===null&&(e=M(o,"keepfocus")),n===null&&(n=M(o,"noscroll")),i===null&&(i=M(o,"reload")),s===null&&(s=M(o,"replacestate")),o=ye(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:re[a??"off"],preload_data:re[r??"off"],keepfocus:l(e),noscroll:l(n),reload:l(i),replace_state:l(s)}}function ae(t){const e=Dt(t);let n=!0;function a(){n=!0,e.update(s=>s)}function r(s){n=!1,e.set(s)}function i(s){let o;return e.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:a,set:r,subscribe:i}}const ke={v:()=>{}};function nn(){const{set:t,subscribe:e}=Dt(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${Ze}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const s=(await r.json()).version!==tn;return s&&(t(!0),ke.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:e,check:a}}function Rt(t,e,n){return t.origin!==zt||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function On(t){}const Se=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Se];const rn=new Set([...Se]);[...rn];function an(t){return t.filter(e=>e!=null)}function Ft(t){return t instanceof Vt||t instanceof Kt?t.status:500}function on(t){return t instanceof Kt?t.text:"Internal Error"}let R,Z,Ot;const sn=ee.toString().includes("$$")||/function \w+\(\) \{\}/.test(ee.toString()),oe="a:";var at,ot,st,it,lt,ct,ft,ut,de,dt,he,ht,pe;sn?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(oe)},Z={current:null},Ot={current:!1}):(R=new(de=class{constructor(){U(this,at,T({}));U(this,ot,T(null));U(this,st,T(null));U(this,it,T({}));U(this,lt,T({id:null}));U(this,ct,T({}));U(this,ft,T(-1));U(this,ut,T(new URL(oe)))}get data(){return I(v(this,at))}set data(e){O(v(this,at),e)}get form(){return I(v(this,ot))}set form(e){O(v(this,ot),e)}get error(){return I(v(this,st))}set error(e){O(v(this,st),e)}get params(){return I(v(this,it))}set params(e){O(v(this,it),e)}get route(){return I(v(this,lt))}set route(e){O(v(this,lt),e)}get state(){return I(v(this,ct))}set state(e){O(v(this,ct),e)}get status(){return I(v(this,ft))}set status(e){O(v(this,ft),e)}get url(){return I(v(this,ut))}set url(e){O(v(this,ut),e)}},at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,ut=new WeakMap,de),Z=new(he=class{constructor(){U(this,dt,T(null))}get current(){return I(v(this,dt))}set current(e){O(v(this,dt),e)}},dt=new WeakMap,he),Ot=new(pe=class{constructor(){U(this,ht,T(!1))}get current(){return I(v(this,ht))}set current(e){O(v(this,ht),e)}},ht=new WeakMap,pe),ke.v=()=>Ot.current=!0);function ln(t){Object.assign(R,t)}const cn=new Set(["icon","shortcut icon","apple-touch-icon"]);let Y=null;const j=ge(_e)??{},tt=ge(me)??{},C={url:ae({}),page:ae({}),navigating:Dt(null),updated:nn()};function Gt(t){j[t]=V()}function fn(t,e){let n=t+1;for(;j[n];)delete j[n],n+=1;for(n=e+1;tt[n];)delete tt[n],n+=1}function et(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Ee(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(A||"/");t&&await t.update()}}function se(){}let Wt,Ct,wt,P,jt,S;const vt=[],yt=[];let y=null;function Nt(){var t;(t=y==null?void 0:y.fork)==null||t.then(e=>e==null?void 0:e.discard()),y=null}const gt=new Map,Re=new Set,un=new Set,X=new Set;let _={branch:[],error:null,url:null},xe=!1,bt=!1,ie=!0,nt=!1,H=!1,Le=!1,Yt=!1,Ae,k,L,D;const kt=new Set,le=new Map;async function jn(t,e,n){var i,s,o,l,c;(i=globalThis.__sveltekit_1duwkc9)!=null&&i.data&&globalThis.__sveltekit_1duwkc9.data,document.URL!==location.href&&(location.href=location.href),S=t,await((o=(s=t.hooks).init)==null?void 0:o.call(s)),Wt=Qe(t),P=document.documentElement,jt=e,Ct=t.nodes[0],wt=t.nodes[1],Ct(),wt(),k=(l=history.state)==null?void 0:l[z],L=(c=history.state)==null?void 0:c[Q],k||(k=L=Date.now(),history.replaceState({...history.state,[z]:k,[Q]:L},""));const a=j[k];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Rn(jt,n)):(await F({type:"enter",url:ve(S.hash?An(new URL(location.href)):location.href),replace_state:!0}),r()),En()}function dn(){vt.length=0,Yt=!1}function Ue(t){yt.some(e=>e==null?void 0:e.snapshot)&&(tt[t]=yt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Te(t){var e;(e=tt[t])==null||e.forEach((n,a)=>{var r,i;(i=(r=yt[a])==null?void 0:r.snapshot)==null||i.restore(n)})}function ce(){Gt(k),ne(_e,j),Ue(L),ne(me,tt)}async function hn(t,e,n,a){let r;e.invalidateAll&&Nt(),await F({type:"goto",url:ve(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:a,accept:()=>{e.invalidateAll&&(Yt=!0,r=[...le.keys()]),e.invalidate&&e.invalidate.forEach(Sn)}}),e.invalidateAll&&mt().then(mt).then(()=>{le.forEach(({resource:i},s)=>{var o;r!=null&&r.includes(s)&&((o=i.refresh)==null||o.call(i))})})}async function pn(t){if(t.id!==(y==null?void 0:y.id)){Nt();const e={};kt.add(e),y={id:t.id,token:e,promise:Oe({...t,preload:e}).then(n=>(kt.delete(e),n.type==="loaded"&&n.state.error&&Nt(),n)),fork:null}}return y.promise}async function Pt(t){var n;const e=(n=await xt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(a=>a[1]()))}async function Ie(t,e,n){var i;const a={params:_.params,route:{id:((i=_.route)==null?void 0:i.id)??null},url:new URL(location.href)};_={...t.state,nav:a};const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,t.props.page),Ae=new S.root({target:e,props:{...t.props,stores:C,components:yt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Te(L),n){const s={from:null,to:{...a,scroll:j[k]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};X.forEach(o=>o(s))}bt=!0}async function St({url:t,params:e,branch:n,errors:a,status:r,error:i,route:s,form:o}){let l="never";if(A&&(t.pathname===A||t.pathname===A+"/"))l="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(l=f.slash);t.pathname=De(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:i,route:s},props:{constructors:an(n).map(f=>f.node.component),page:Zt(R)}};o!==void 0&&(c.props.form=o);let d={},u=!R,w=0;for(let f=0;fo(new URL(s))))return!0;return!1}function Jt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function _n(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const a of n){const r=t.searchParams.getAll(a),i=e.searchParams.getAll(a);r.every(s=>i.includes(s))&&i.every(s=>r.includes(s))&&n.delete(a)}return n}function wn({error:t,url:e,route:n,params:a}){return{type:"loaded",state:{error:t,url:e,route:n,params:a,branch:[]},props:{page:Zt(R),constructors:[]}}}async function Oe({id:t,invalidating:e,url:n,params:a,route:r,preload:i}){if((y==null?void 0:y.id)===t)return kt.delete(y.token),y.promise;const{errors:s,layouts:o,leaf:l}=r,c=[...o,l];s.forEach(h=>h==null?void 0:h().catch(()=>{})),c.forEach(h=>h==null?void 0:h[1]().catch(()=>{}));const d=_.url?t!==Et(_.url):!1,u=_.route?r.id!==_.route.id:!1,w=_n(_.url,n);let p=!1;const f=c.map(async(h,g)=>{var $;if(!h)return;const b=_.branch[g];return h[1]===(b==null?void 0:b.loader)&&!mn(p,u,d,w,($=b.universal)==null?void 0:$.uses,a)?b:(p=!0,Ht({loader:h[1],url:n,params:a,route:r,parent:async()=>{var pt;const N={};for(let B=0;B{});const m=[];for(let h=0;hPromise.resolve({}),server_data_node:Jt(i)}),o={node:await wt(),loader:wt,universal:null,server:null,data:null};return St({url:n,params:r,branch:[s,o],status:t,error:e,errors:[],route:null})}catch(s){if(s instanceof Bt)return hn(new URL(s.location,location.href),{},0);throw s}}async function yn(t){const e=t.href;if(gt.has(e))return gt.get(e);let n;try{const a=(async()=>{let r=await S.hooks.reroute({url:new URL(t),fetch:async(i,s)=>gn(i,s,t).promise})??t;if(typeof r=="string"){const i=new URL(t);S.hash?i.hash=r:i.pathname=r,r=i}return r})();gt.set(e,a),n=await a}catch{gt.delete(e);return}return n}async function xt(t,e){if(t&&!Rt(t,A,S.hash)){const n=await yn(t);if(!n)return;const a=bn(n);for(const r of Wt){const i=r.exec(a);if(i)return{id:Et(t),invalidating:e,route:r,params:Be(i),url:t}}}}function bn(t){return Ve(S.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(A.length))||"/"}function Et(t){return(S.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Pe({url:t,type:e,intent:n,delta:a,event:r,scroll:i}){let s=!1;const o=Qt(_,n,t,e,i??null);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return nt||Re.forEach(c=>c(l)),s?null:o}async function F({type:t,url:e,popped:n,keepfocus:a,noscroll:r,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=se,block:d=se,event:u}){var B;const w=D;D=l;const p=await xt(e,!1),f=t==="enter"?Qt(_,p,e,t):Pe({url:e,type:t,delta:n==null?void 0:n.delta,intent:p,scroll:n==null?void 0:n.scroll,event:u});if(!f){d(),D===l&&(D=w);return}const m=k,h=L;c(),nt=!0,bt&&f.navigation.type!=="enter"&&C.navigating.set(Z.current=f.navigation);let g=p&&await Oe(p);if(!g){if(Rt(e,A,S.hash))return await et(e,i);g=await $e(e,{id:null},await rt(new Kt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,i)}if(e=(p==null?void 0:p.url)||e,D!==l)return f.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:t,url:new URL(g.location,e),popped:n,keepfocus:a,noscroll:r,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),f.fulfil(void 0);return}g=await Xt({status:500,error:await rt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else g.props.page.status>=400&&await C.updated.check()&&(await Ee(),await et(e,i));if(dn(),Gt(m),Ue(h),g.props.page.url.pathname!==e.pathname&&(e.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const E=i?0:1,G={[z]:k+=E,[Q]:L+=E,[we]:s};(i?history.replaceState:history.pushState).call(history,G,"",e),i||fn(k,L)}const b=p&&(y==null?void 0:y.id)===p.id?y.fork:null;y=null,g.props.page.state=s;let x;if(bt){const E=(await Promise.all(Array.from(un,W=>W(f.navigation)))).filter(W=>typeof W=="function");if(E.length>0){let W=function(){E.forEach(At=>{X.delete(At)})};E.push(W),E.forEach(At=>{X.add(At)})}const G=f.navigation.to;_={...g.state,nav:{params:G.params,route:G.route,url:G.url}},g.props.page&&(g.props.page.url=e);const Lt=b&&await b;Lt?x=Lt.commit():(Y=null,Ae.$set(g.props),Y&&Object.assign(g.props.page,Y),ln(g.props.page),x=(B=qe)==null?void 0:B()),Le=!0}else await Ie(g,jt,!1);const{activeElement:$}=document;await x,await mt(),await mt();let N=null;if(ie){const E=n?n.scroll:r?V():null;E?scrollTo(E.x,E.y):(N=e.hash&&document.getElementById(Ce(e)))?N.scrollIntoView():scrollTo(0,0)}const pt=document.activeElement!==$&&document.activeElement!==document.body;!a&&!pt&&Ln(e,!N),ie=!0,g.props.page&&(Y&&Object.assign(g.props.page,Y),Object.assign(R,g.props.page)),nt=!1,t==="popstate"&&Te(L),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=V()),X.forEach(E=>E(f.navigation)),C.navigating.set(Z.current=null)}async function $e(t,e,n,a,r){return t.origin===zt&&t.pathname===location.pathname&&!xe?await Xt({status:a,error:n,url:t,route:e}):await et(t,r)}function kn(){let t,e={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(t),t=setTimeout(()=>{i(l,q.hover)},20)});function a(o){o.defaultPrevented||i(o.composedPath()[0],q.tap)}P.addEventListener("mousedown",a),P.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(Pt(new URL(l.target.href)),r.unobserve(l.target))},{threshold:0});async function i(o,l){const c=be(o,P),d=c===e.element&&(c==null?void 0:c.href)===e.href&&l>=n;if(!c||d)return;const{url:u,external:w,download:p}=$t(c,A,S.hash);if(w||p)return;const f=_t(c),m=u&&Et(_.url)===Et(u);if(!(f.reload||m))if(l<=f.preload_data){e={element:c,href:c.href},n=q.tap;const h=await xt(u,!1);if(!h)return;pn(h)}else l<=f.preload_code&&(e={element:c,href:c.href},n=l,Pt(u))}function s(){r.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=$t(o,A,S.hash);if(c||d)continue;const u=_t(o);u.reload||(u.preload_code===q.viewport&&r.observe(o),u.preload_code===q.eager&&Pt(l))}}X.add(s),s()}function rt(t,e){if(t instanceof Vt)return t.body;const n=Ft(t),a=on(t);return S.hooks.handleError({error:t,event:e,status:n,message:a})??{message:a}}function Sn(t){if(typeof t=="function")vt.push(t);else{const{href:e}=new URL(t,location.href);vt.push(n=>n.href===e)}}function En(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(ce(),!nt){const r=Qt(_,void 0,null,"leave"),i={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Re.forEach(s=>s(i))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ce()}),(e=navigator.connection)!=null&&e.saveData||kn(),P.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=be(n.composedPath()[0],P);if(!a)return;const{url:r,external:i,target:s,download:o}=$t(a,A,S.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const l=_t(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[d,u]=(S.hash?r.hash.replace(/^#/,""):r.href).split("#"),w=d===Tt(location);if(i||l.reload&&(!w||!u)){Pe({url:r,type:"link",event:n})?nt=!0:n.preventDefault();return}if(u!==void 0&&w){const[,p]=_.url.href.split("#");if(p===u){if(n.preventDefault(),u===""||u==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const f=a.ownerDocument.getElementById(decodeURIComponent(u));f&&(f.scrollIntoView(),f.focus())}return}if(H=!0,Gt(k),t(r),!l.replace_state)return;H=!1}n.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await F({type:"link",url:r,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??r.href===location.href,event:n})}),P.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const o=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(Rt(o,A,!1))return;const l=n.target,c=_t(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(l,r);o.search=new URLSearchParams(d).toString(),F({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!qt){if((a=n.state)!=null&&a[z]){const r=n.state[z];if(D={},r===k)return;const i=j[r],s=n.state[we]??{},o=new URL(n.state[en]??location.href),l=n.state[Q],c=_.url?Tt(location)===Tt(_.url):!1;if(l===L&&(Le||c)){s!==R.state&&(R.state=s),t(o),j[k]=V(),i&&scrollTo(i.x,i.y),k=r;return}const u=r-k;await F({type:"popstate",url:o,popped:{state:s,scroll:i,delta:u},accept:()=>{k=r,L=l},block:()=>{history.go(-u)},nav_token:D,event:n})}else if(!H){const r=new URL(location.href);t(r),S.hash&&location.reload()}}}),addEventListener("hashchange",()=>{H&&(H=!1,history.replaceState({...history.state,[z]:++k,[Q]:L},"",location.href))});for(const n of document.querySelectorAll("link"))cn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&C.navigating.set(Z.current=null)});function t(n){_.url=R.url=n,C.page.set(Zt(R)),C.page.notify()}}async function Rn(t,{status:e=200,error:n,node_ids:a,params:r,route:i,server_route:s,data:o,form:l}){xe=!0;const c=new URL(location.href);let d;({params:r={},route:i={id:null}}=await xt(c,!1)||{}),d=Wt.find(({id:p})=>p===i.id);let u,w=!0;try{const p=a.map(async(m,h)=>{const g=o[h];return g!=null&&g.uses&&(g.uses=xn(g.uses)),Ht({loader:S.nodes[m],url:c,params:r,route:i,parent:async()=>{const b={};for(let x=0;x{const o=history.state;qt=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(o,"",t),e&&scrollTo(i,s),qt=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const i=[];for(let s=0;s{if(r.rangeCount===i.length){for(let s=0;s{i=u,s=w});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:V()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((d=e==null?void 0:e.route)==null?void 0:d.id)??null},url:n,scroll:r},willUnload:!e,type:a,complete:o},fulfil:i,reject:s}}function Zt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function An(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Ce(t){let e;if(S.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{jn as a,On as l,R as p,C as s}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/E-DQD4vt.js b/.svelte-kit/output/client/_app/immutable/chunks/E-DQD4vt.js deleted file mode 100644 index caa3670..0000000 --- a/.svelte-kit/output/client/_app/immutable/chunks/E-DQD4vt.js +++ /dev/null @@ -1,2 +0,0 @@ -var Oe=Object.defineProperty;var ce=t=>{throw TypeError(t)};var ke=(t,e,r)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var j=(t,e,r)=>ke(t,typeof e!="symbol"?e+"":e,r),re=(t,e,r)=>e.has(t)||ce("Cannot "+r);var s=(t,e,r)=>(re(t,e,"read from private field"),r?r.call(t):e.get(t)),c=(t,e,r)=>e.has(t)?ce("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),a=(t,e,r,n)=>(re(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),p=(t,e,r)=>(re(t,e,"access private method"),r);import{N as Fe,C as be,O as Le,g as Me,P as de,Q as V,S as me,e as L,h as M,n as Y,U as ue,i as Ce,v as He,V as Ie,W as _e,b as F,c as Ee,p as se,a as pe,m as Ye,X as xe,Y as Z,Z as G,_ as ge,$ as Pe,a0 as Ve,a1 as we,f as Te,a2 as We,d as ie,x as K,a3 as Be,a4 as $e,a5 as q,E as je,a6 as qe,a7 as ze,a8 as Je,a9 as Ue,aa as Qe,ab as Xe,ac as ne,o as Ze,ad as Se,ae as Ge,af as Ke,ag as ae,ah as z,ai as et,aj as tt,ak as rt,al as st,H as it,am as nt,an as at,J as ft}from"./QnfpkG_Q.js";import{b as ht}from"./VCsPq5MH.js";function ot(t){let e=0,r=me(0),n;return()=>{Fe()&&(be(r),Le(()=>(e===0&&(n=Me(()=>t(()=>de(r)))),e+=1,()=>{V(()=>{e-=1,e===0&&(n==null||n(),n=void 0,de(r))})})))}}var lt=je|qe;function ct(t,e,r,n){new dt(t,e,r,n)}var m,W,T,C,g,S,E,w,N,H,D,x,B,$,R,ee,o,Ne,Re,Ae,fe,Q,X,he;class dt{constructor(e,r,n,h){c(this,o);j(this,"parent");j(this,"is_pending",!1);j(this,"transform_error");c(this,m);c(this,W,M?L:null);c(this,T);c(this,C);c(this,g);c(this,S,null);c(this,E,null);c(this,w,null);c(this,N,null);c(this,H,0);c(this,D,0);c(this,x,!1);c(this,B,new Set);c(this,$,new Set);c(this,R,null);c(this,ee,ot(()=>(a(this,R,me(s(this,H))),()=>{a(this,R,null)})));var i;a(this,m,e),a(this,T,r),a(this,C,f=>{var u=Y;u.b=this,u.f|=ue,n(f)}),this.parent=Y.b,this.transform_error=h??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),a(this,g,Ce(()=>{if(M){const f=s(this,W);He();const u=f.data===Ie;if(f.data.startsWith(_e)){const d=JSON.parse(f.data.slice(_e.length));p(this,o,Re).call(this,d)}else u?p(this,o,Ae).call(this):p(this,o,Ne).call(this)}else p(this,o,fe).call(this)},lt)),M&&a(this,m,L)}defer_effect(e){xe(e,s(this,B),s(this,$))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(this,T).pending}update_pending_count(e,r){p(this,o,he).call(this,e,r),a(this,H,s(this,H)+e),!(!s(this,R)||s(this,x))&&(a(this,x,!0),V(()=>{a(this,x,!1),s(this,R)&&We(s(this,R),s(this,H))}))}get_effect_pending(){return s(this,ee).call(this),be(s(this,R))}error(e){var r=s(this,T).onerror;let n=s(this,T).failed;if(!r&&!n)throw e;s(this,S)&&(ie(s(this,S)),a(this,S,null)),s(this,E)&&(ie(s(this,E)),a(this,E,null)),s(this,w)&&(ie(s(this,w)),a(this,w,null)),M&&(K(s(this,W)),Be(),K($e()));var h=!1,i=!1;const f=()=>{if(h){Je();return}h=!0,i&&ze(),s(this,w)!==null&&se(s(this,w),()=>{a(this,w,null)}),p(this,o,X).call(this,()=>{p(this,o,fe).call(this)})},u=l=>{try{i=!0,r==null||r(l,f),i=!1}catch(d){q(d,s(this,g)&&s(this,g).parent)}n&&a(this,w,p(this,o,X).call(this,()=>{try{return F(()=>{var d=Y;d.b=this,d.f|=ue,n(s(this,m),()=>l,()=>f)})}catch(d){return q(d,s(this,g).parent),null}}))};V(()=>{var l;try{l=this.transform_error(e)}catch(d){q(d,s(this,g)&&s(this,g).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(u,d=>q(d,s(this,g)&&s(this,g).parent)):u(l)})}}m=new WeakMap,W=new WeakMap,T=new WeakMap,C=new WeakMap,g=new WeakMap,S=new WeakMap,E=new WeakMap,w=new WeakMap,N=new WeakMap,H=new WeakMap,D=new WeakMap,x=new WeakMap,B=new WeakMap,$=new WeakMap,R=new WeakMap,ee=new WeakMap,o=new WeakSet,Ne=function(){try{a(this,S,F(()=>s(this,C).call(this,s(this,m))))}catch(e){this.error(e)}},Re=function(e){const r=s(this,T).failed;r&&a(this,w,F(()=>{r(s(this,m),()=>e,()=>()=>{})}))},Ae=function(){const e=s(this,T).pending;e&&(this.is_pending=!0,a(this,E,F(()=>e(s(this,m)))),V(()=>{var r=a(this,N,document.createDocumentFragment()),n=Ee();r.append(n),a(this,S,p(this,o,X).call(this,()=>F(()=>s(this,C).call(this,n)))),s(this,D)===0&&(s(this,m).before(r),a(this,N,null),se(s(this,E),()=>{a(this,E,null)}),p(this,o,Q).call(this,pe))}))},fe=function(){try{if(this.is_pending=this.has_pending_snippet(),a(this,D,0),a(this,H,0),a(this,S,F(()=>{s(this,C).call(this,s(this,m))})),s(this,D)>0){var e=a(this,N,document.createDocumentFragment());Ye(s(this,S),e);const r=s(this,T).pending;a(this,E,F(()=>r(s(this,m))))}else p(this,o,Q).call(this,pe)}catch(r){this.error(r)}},Q=function(e){this.is_pending=!1,e.transfer_effects(s(this,B),s(this,$))},X=function(e){var r=Y,n=we,h=Te;Z(s(this,g)),G(s(this,g)),ge(s(this,g).ctx);try{return Pe.ensure(),e()}catch(i){return Ve(i),null}finally{Z(r),G(n),ge(h)}},he=function(e,r){var n;if(!this.has_pending_snippet()){this.parent&&p(n=this.parent,o,he).call(n,e,r);return}a(this,D,s(this,D)+e),s(this,D)===0&&(p(this,o,Q).call(this,r),s(this,E)&&se(s(this,E),()=>{a(this,E,null)}),s(this,N)&&(s(this,m).before(s(this,N)),a(this,N,null)))};const ut=["touchstart","touchmove"];function _t(t){return ut.includes(t)}const J=Symbol("events"),pt=new Set,ve=new Set;function gt(t,e,r,n={}){function h(i){if(n.capture||oe.call(e,i),!i.cancelBubble)return Qe(()=>r==null?void 0:r.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?V(()=>{e.addEventListener(t,h,n)}):e.addEventListener(t,h,n),h}function Et(t,e,r,n,h){var i={capture:n,passive:h},f=gt(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ue(()=>{e.removeEventListener(t,f,i)})}let ye=null;function oe(t){var O,b;var e=this,r=e.ownerDocument,n=t.type,h=((O=t.composedPath)==null?void 0:O.call(t))||[],i=h[0]||t.target;ye=t;var f=0,u=ye===t&&t[J];if(u){var l=h.indexOf(u);if(l!==-1&&(e===document||e===window)){t[J]=e;return}var d=h.indexOf(e);if(d===-1)return;l<=d&&(f=l)}if(i=h[f]||t.target,i!==e){Xe(t,"currentTarget",{configurable:!0,get(){return i||r}});var I=we,P=Y;G(null),Z(null);try{for(var A,v=[];i!==null;){var _=i.assignedSlot||i.parentNode||i.host||null;try{var y=(b=i[J])==null?void 0:b[n];y!=null&&(!i.disabled||t.target===i)&&y.call(i,t)}catch(k){A?v.push(k):A=k}if(t.cancelBubble||_===e||_===null)break;i=_}if(A){for(let k of v)queueMicrotask(()=>{throw k});throw A}}finally{t[J]=e,delete t.currentTarget,G(I),Z(P)}}}function wt(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=`${r}`)}function vt(t,e){return De(t,e)}function Tt(t,e){ne(),e.intro=e.intro??!1;const r=e.target,n=M,h=L;try{for(var i=Ze(r);i&&(i.nodeType!==Se||i.data!==Ge);)i=Ke(i);if(!i)throw ae;z(!0),K(i);const f=De(t,{...e,anchor:i});return z(!1),f}catch(f){if(f instanceof Error&&f.message.split(` -`).some(u=>u.startsWith("https://svelte.dev/e/")))throw f;return f!==ae&&console.warn("Failed to hydrate: ",f),e.recover===!1&&et(),ne(),tt(r),z(!1),vt(t,e)}finally{z(n),K(h)}}const U=new Map;function De(t,{target:e,anchor:r,props:n={},events:h,context:i,intro:f=!0,transformError:u}){ne();var l=void 0,d=rt(()=>{var I=r??e.appendChild(Ee());ct(I,{pending:()=>{}},v=>{it({});var _=Te;if(i&&(_.c=i),h&&(n.$$events=h),M&&ht(v,null),l=t(v,n)||{},M&&(Y.nodes.end=L,L===null||L.nodeType!==Se||L.data!==nt))throw at(),ae;ft()},u);var P=new Set,A=v=>{for(var _=0;_{var O;for(var v of P)for(const b of[e,document]){var _=U.get(b),y=_.get(v);--y==0?(b.removeEventListener(v,oe),_.delete(v),_.size===0&&U.delete(b)):_.set(v,y)}ve.delete(A),I!==r&&((O=I.parentNode)==null||O.removeChild(I))}});return le.set(l,d),l}let le=new WeakMap;function St(t,e){const r=le.get(t);return r?(le.delete(t),r(e)):Promise.resolve()}export{Et as e,Tt as h,vt as m,wt as s,St as u}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/L6H5smAl.js b/.svelte-kit/output/client/_app/immutable/chunks/L6H5smAl.js deleted file mode 100644 index bc22648..0000000 --- a/.svelte-kit/output/client/_app/immutable/chunks/L6H5smAl.js +++ /dev/null @@ -1 +0,0 @@ -var B=Object.defineProperty;var g=i=>{throw TypeError(i)};var D=(i,e,s)=>e in i?B(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s;var w=(i,e,s)=>D(i,typeof e!="symbol"?e+"":e,s),y=(i,e,s)=>e.has(i)||g("Cannot "+s);var t=(i,e,s)=>(y(i,e,"read from private field"),s?s.call(i):e.get(i)),l=(i,e,s)=>e.has(i)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,s),M=(i,e,s,a)=>(y(i,e,"write to private field"),a?a.call(i,s):e.set(i,s),s);import{r as F,d as k,p as C,c as x,b as A,a as S,h as j,e as q,m as z,s as E}from"./QnfpkG_Q.js";var h,n,r,u,p,_,v;class I{constructor(e,s=!0){w(this,"anchor");l(this,h,new Map);l(this,n,new Map);l(this,r,new Map);l(this,u,new Set);l(this,p,!0);l(this,_,e=>{if(t(this,h).has(e)){var s=t(this,h).get(e),a=t(this,n).get(s);if(a)F(a),t(this,u).delete(s);else{var c=t(this,r).get(s);c&&(t(this,n).set(s,c.effect),t(this,r).delete(s),c.fragment.lastChild.remove(),this.anchor.before(c.fragment),a=c.effect)}for(const[f,o]of t(this,h)){if(t(this,h).delete(f),f===e)break;const d=t(this,r).get(o);d&&(k(d.effect),t(this,r).delete(o))}for(const[f,o]of t(this,n)){if(f===s||t(this,u).has(f))continue;const d=()=>{if(Array.from(t(this,h).values()).includes(f)){var b=document.createDocumentFragment();z(o,b),b.append(x()),t(this,r).set(f,{effect:o,fragment:b})}else k(o);t(this,u).delete(f),t(this,n).delete(f)};t(this,p)||!a?(t(this,u).add(f),C(o,d,!1)):d()}}});l(this,v,e=>{t(this,h).delete(e);const s=Array.from(t(this,h).values());for(const[a,c]of t(this,r))s.includes(a)||(k(c.effect),t(this,r).delete(a))});this.anchor=e,M(this,p,s)}ensure(e,s){var a=S,c=E();if(s&&!t(this,n).has(e)&&!t(this,r).has(e))if(c){var f=document.createDocumentFragment(),o=x();f.append(o),t(this,r).set(e,{effect:A(()=>s(o)),fragment:f})}else t(this,n).set(e,A(()=>s(this.anchor)));if(t(this,h).set(a,e),c){for(const[d,m]of t(this,n))d===e?a.unskip_effect(m):a.skip_effect(m);for(const[d,m]of t(this,r))d===e?a.unskip_effect(m.effect):a.skip_effect(m.effect);a.oncommit(t(this,_)),a.ondiscard(t(this,v))}else j&&(this.anchor=q),t(this,_).call(this,a)}}h=new WeakMap,n=new WeakMap,r=new WeakMap,u=new WeakMap,p=new WeakMap,_=new WeakMap,v=new WeakMap;export{I as B}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/QnfpkG_Q.js b/.svelte-kit/output/client/_app/immutable/chunks/QnfpkG_Q.js deleted file mode 100644 index 39571ed..0000000 --- a/.svelte-kit/output/client/_app/immutable/chunks/QnfpkG_Q.js +++ /dev/null @@ -1 +0,0 @@ -var pt=Object.defineProperty;var Tn=e=>{throw TypeError(e)};var wt=(e,n,t)=>n in e?pt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var re=(e,n,t)=>wt(e,typeof n!="symbol"?n+"":n,t),Qe=(e,n,t)=>n.has(e)||Tn("Cannot "+t);var _=(e,n,t)=>(Qe(e,n,"read from private field"),t?t.call(e):n.get(e)),D=(e,n,t)=>n.has(e)?Tn("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),we=(e,n,t,r)=>(Qe(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),P=(e,n,t)=>(Qe(e,n,"access private method"),t);var yt=Array.isArray,gt=Array.prototype.indexOf,Te=Array.prototype.includes,_r=Array.from,vr=Object.defineProperty,De=Object.getOwnPropertyDescriptor,mt=Object.getOwnPropertyDescriptors,Et=Object.prototype,Tt=Array.prototype,Cn=Object.getPrototypeOf,bn=Object.isExtensible;const bt=()=>{};function dr(e){return e()}function At(e){for(var n=0;n{e=r,n=s});return{promise:t,resolve:e,reject:n}}const b=2,be=4,Fe=8,Fn=1<<24,ne=16,z=32,oe=64,St=128,F=512,E=1024,x=2048,G=4096,U=8192,B=16384,pe=32768,An=1<<25,ze=65536,Sn=1<<17,Rt=1<<18,je=1<<19,jn=1<<20,ce=65536,nn=1<<21,on=1<<22,Q=1<<23,Pe=Symbol("$state"),hr=Symbol("legacy props"),pr=Symbol(""),K=new class extends Error{constructor(){super(...arguments);re(this,"name","StaleReactionError");re(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var In;const yr=!!((In=globalThis.document)!=null&&In.contentType)&&globalThis.document.contentType.includes("xml"),Ze=3,Ln=8;function xt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ot(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kt(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nt(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Dt(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function gr(){throw new Error("https://svelte.dev/e/hydration_failed")}function mr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Pt(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function It(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ct(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Er(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Tr=1,br=2,Ar=4,Sr=8,Rr=16,xr=1,Or=2,Mt="[",Ft="[!",kr="[?",jt="]",cn={},A=Symbol(),Lt="http://www.w3.org/1999/xhtml";function _n(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Nr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let _e=!1;function Dr(e){_e=e}let T;function Ae(e){if(e===null)throw _n(),cn;return T=e}function Pr(){return Ae(te(T))}function Ir(e){if(_e){if(te(T)!==null)throw _n(),cn;T=e}}function Cr(e=1){if(_e){for(var n=e,t=T;n--;)t=te(t);T=t}}function Mr(e=!0){for(var n=0,t=T;;){if(t.nodeType===Ln){var r=t.data;if(r===jt){if(n===0)return t;n-=1}else(r===Mt||r===Ft||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(n+=1)}var s=te(t);e&&t.remove(),t=s}}function Fr(e){if(!e||e.nodeType!==Ln)throw _n(),cn;return e.data}function Yn(e){return e===this.v}function Yt(e,n){return e!=e?n==n:e!==n||e!==null&&typeof e=="object"||typeof e=="function"}function qn(e){return!Yt(e,this.v)}let Je=!1;function jr(){Je=!0}let R=null;function Ge(e){R=e}function Lr(e,n=!1,t){R={p:R,i:!1,c:null,e:null,s:e,x:null,r:w,l:Je&&!n?{s:null,u:null,$:[]}:null}}function Yr(e){var n=R,t=n.e;if(t!==null){n.e=null;for(var r of t)st(r)}return n.i=!0,R=n.p,{}}function Le(){return!Je||R!==null&&R.l===null}let le=[];function Hn(){var e=le;le=[],At(e)}function Rn(e){if(le.length===0&&!Ie){var n=le;queueMicrotask(()=>{n===le&&Hn()})}le.push(e)}function qt(){for(;le.length>0;)Hn()}function Ht(e){var n=w;if(n===null)return d.f|=Q,e;if((n.f&pe)===0&&(n.f&be)===0)throw e;Ve(e,n)}function Ve(e,n){for(;n!==null;){if((n.f&St)!==0){if((n.f&pe)===0)throw e;try{n.b.error(e);return}catch(t){e=t}}n=n.parent}throw e}const Ut=-7169;function g(e,n){e.f=e.f&Ut|n}function vn(e){(e.f&F)!==0||e.deps===null?g(e,E):g(e,G)}function Un(e){if(e!==null)for(const n of e)(n.f&b)===0||(n.f&ce)===0||(n.f^=ce,Un(n.deps))}function Bt(e,n,t){(e.f&x)!==0?n.add(e):(e.f&G)!==0&&t.add(e),Un(e.deps),g(e,E)}const Z=new Set;let p=null,S=null,tn=null,Ie=!1,We=!1,ye=null,qe=null;var xn=0;let zt=1;var ge,me,$,q,Me,C,fe,X,H,Ee,ae,m,He,Bn,Ue,rn,sn,zn;const Xe=class Xe{constructor(){D(this,m);re(this,"id",zt++);re(this,"current",new Map);re(this,"previous",new Map);D(this,ge,new Set);D(this,me,new Set);D(this,$,new Map);D(this,q,new Map);D(this,Me,null);D(this,C,[]);D(this,fe,new Set);D(this,X,new Set);D(this,H,new Map);re(this,"is_fork",!1);D(this,Ee,!1);D(this,ae,new Set)}skip_effect(n){_(this,H).has(n)||_(this,H).set(n,{d:[],m:[]})}unskip_effect(n){var t=_(this,H).get(n);if(t){_(this,H).delete(n);for(var r of t.d)g(r,x),this.schedule(r);for(r of t.m)g(r,G),this.schedule(r)}}capture(n,t,r=!1){t!==A&&!this.previous.has(n)&&this.previous.set(n,t),(n.f&Q)===0&&(this.current.set(n,[n.v,r]),S==null||S.set(n,n.v))}activate(){p=this}deactivate(){p=null,S=null}flush(){try{We=!0,p=this,P(this,m,Ue).call(this)}finally{xn=0,tn=null,ye=null,qe=null,We=!1,p=null,S=null,W.clear()}}discard(){for(const n of _(this,me))n(this);_(this,me).clear(),Z.delete(this)}increment(n,t){let r=_(this,$).get(t)??0;if(_(this,$).set(t,r+1),n){let s=_(this,q).get(t)??0;_(this,q).set(t,s+1)}}decrement(n,t,r){let s=_(this,$).get(t)??0;if(s===1?_(this,$).delete(t):_(this,$).set(t,s-1),n){let l=_(this,q).get(t)??0;l===1?_(this,q).delete(t):_(this,q).set(t,l-1)}_(this,Ee)||r||(we(this,Ee,!0),Rn(()=>{we(this,Ee,!1),this.flush()}))}transfer_effects(n,t){for(const r of n)_(this,fe).add(r);for(const r of t)_(this,X).add(r);n.clear(),t.clear()}oncommit(n){_(this,ge).add(n)}ondiscard(n){_(this,me).add(n)}settled(){return(_(this,Me)??we(this,Me,Mn())).promise}static ensure(){if(p===null){const n=p=new Xe;We||(Z.add(p),Ie||Rn(()=>{p===n&&n.flush()}))}return p}apply(){{S=null;return}}schedule(n){var s;if(tn=n,(s=n.b)!=null&&s.is_pending&&(n.f&(be|Fe|Fn))!==0&&(n.f&pe)===0){n.b.defer_effect(n);return}for(var t=n;t.parent!==null;){t=t.parent;var r=t.f;if(ye!==null&&t===w&&(d===null||(d.f&b)===0))return;if((r&(oe|z))!==0){if((r&E)===0)return;t.f^=E}}_(this,C).push(t)}};ge=new WeakMap,me=new WeakMap,$=new WeakMap,q=new WeakMap,Me=new WeakMap,C=new WeakMap,fe=new WeakMap,X=new WeakMap,H=new WeakMap,Ee=new WeakMap,ae=new WeakMap,m=new WeakSet,He=function(){return this.is_fork||_(this,q).size>0},Bn=function(){for(const r of _(this,ae))for(const s of _(r,q).keys()){for(var n=!1,t=s;t.parent!==null;){if(_(this,H).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Ue=function(){var a,f;if(xn++>1e3&&(Z.delete(this),Vt()),!P(this,m,He).call(this)){for(const i of _(this,fe))_(this,X).delete(i),g(i,x),this.schedule(i);for(const i of _(this,X))g(i,G),this.schedule(i)}const n=_(this,C);we(this,C,[]),this.apply();var t=ye=[],r=[],s=qe=[];for(const i of n)try{P(this,m,rn).call(this,i,t,r)}catch(c){throw $n(i),c}if(p=null,s.length>0){var l=Xe.ensure();for(const i of s)l.schedule(i)}if(ye=null,qe=null,P(this,m,He).call(this)||P(this,m,Bn).call(this)){P(this,m,sn).call(this,r),P(this,m,sn).call(this,t);for(const[i,c]of _(this,H))Kn(i,c)}else{_(this,$).size===0&&Z.delete(this),_(this,fe).clear(),_(this,X).clear();for(const i of _(this,ge))i(this);_(this,ge).clear(),On(r),On(t),(a=_(this,Me))==null||a.resolve()}var o=p;if(_(this,C).length>0){const i=o??(o=this);_(i,C).push(..._(this,C).filter(c=>!_(i,C).includes(c)))}o!==null&&(Z.add(o),P(f=o,m,Ue).call(f)),Z.has(this)||P(this,m,zn).call(this)},rn=function(n,t,r){n.f^=E;for(var s=n.first;s!==null;){var l=s.f,o=(l&(z|oe))!==0,a=o&&(l&E)!==0,f=a||(l&U)!==0||_(this,H).has(s);if(!f&&s.fn!==null){o?s.f^=E:(l&be)!==0?t.push(s):Ye(s)&&((l&ne)!==0&&_(this,X).add(s),Re(s));var i=s.first;if(i!==null){s=i;continue}}for(;s!==null;){var c=s.next;if(c!==null){s=c;break}s=s.parent}}},sn=function(n){for(var t=0;t!this.current.has(y));if(s.length===0)n&&u.discard();else if(t.length>0){u.activate();var l=new Set,o=new Map;for(var a of t)Gn(a,s,l,o);if(_(u,C).length>0){u.apply();for(var f of _(u,C))P(i=u,m,rn).call(i,f,[],[]);we(u,C,[])}u.deactivate()}}for(const u of Z)_(u,ae).has(this)&&(_(u,ae).delete(this),_(u,ae).size===0&&!P(c=u,m,He).call(c)&&(u.activate(),P(v=u,m,Ue).call(v)))};let ve=Xe;function Gt(e){var n=Ie;Ie=!0;try{for(var t;;){if(qt(),p===null)return t;p.flush()}}finally{Ie=n}}function Vt(){try{Dt()}catch(e){Ve(e,tn)}}let L=null;function On(e){var n=e.length;if(n!==0){for(var t=0;t0)){W.clear();for(const s of L){if((s.f&(B|U))!==0)continue;const l=[s];let o=s.parent;for(;o!==null;)L.has(o)&&(L.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const f=l[a];(f.f&(B|U))===0&&Re(f)}}L.clear()}}L=null}}function Gn(e,n,t,r){if(!t.has(e)&&(t.add(e),e.reactions!==null))for(const s of e.reactions){const l=s.f;(l&b)!==0?Gn(s,n,t,r):(l&(on|ne))!==0&&(l&x)===0&&Vn(s,n,r)&&(g(s,x),dn(s))}}function Vn(e,n,t){const r=t.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Te.call(n,s))return!0;if((s.f&b)!==0&&Vn(s,n,t))return t.set(s,!0),!0}return t.set(e,!1),!1}function dn(e){p.schedule(e)}function Kn(e,n){if(!((e.f&z)!==0&&(e.f&E)!==0)){(e.f&x)!==0?n.d.push(e):(e.f&G)!==0&&n.m.push(e),g(e,E);for(var t=e.first;t!==null;)Kn(t,n),t=t.next}}function $n(e){g(e,E);for(var n=e.first;n!==null;)$n(n),n=n.next}function Kt(e,n,t,r){const s=Le()?hn:Zt;var l=e.filter(u=>!u.settled);if(t.length===0&&l.length===0){r(n.map(s));return}var o=w,a=$t(),f=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(u=>u.promise)):null;function i(u){a();try{r(u)}catch(y){(o.f&B)===0&&Ve(y,o)}Ke()}if(t.length===0){f.then(()=>i(n.map(s)));return}var c=Xn();function v(){Promise.all(t.map(u=>Xt(u))).then(u=>i([...n.map(s),...u])).catch(u=>Ve(u,o)).finally(()=>c())}f?f.then(()=>{a(),v(),Ke()}):v()}function $t(){var e=w,n=d,t=R,r=p;return function(l=!0){Se(e),ee(n),Ge(t),l&&(e.f&B)===0&&(r==null||r.activate(),r==null||r.apply())}}function Ke(e=!0){Se(null),ee(null),Ge(null),e&&(p==null||p.deactivate())}function Xn(){var e=w,n=e.b,t=p,r=n.is_rendered();return n.update_pending_count(1,t),t.increment(r,e),(s=!1)=>{n.update_pending_count(-1,t),t.decrement(r,e,s)}}function hn(e){var n=b|x,t=d!==null&&(d.f&b)!==0?d:null;return w!==null&&(w.f|=je),{ctx:R,deps:null,effects:null,equals:Yn,f:n,fn:e,reactions:null,rv:0,v:A,wv:0,parent:t??w,ac:null}}function Xt(e,n,t){let r=w;r===null&&xt();var s=void 0,l=wn(A),o=!d,a=new Map;return lr(()=>{var y;var f=w,i=Mn();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).finally(Ke)}catch(h){i.reject(h),Ke()}var c=p;if(o){if((f.f&pe)!==0)var v=Xn();if(r.b.is_rendered())(y=a.get(c))==null||y.reject(K),a.delete(c);else{for(const h of a.values())h.reject(K);a.clear()}a.set(c,i)}const u=(h,N=void 0)=>{if(v){var O=N===K;v(O)}if(!(N===K||(f.f&B)!==0)){if(c.activate(),N)l.f|=Q,fn(l,N);else{(l.f&Q)!==0&&(l.f^=Q),fn(l,h);for(const[xe,Oe]of a){if(a.delete(xe),xe===c)break;Oe.reject(K)}}c.deactivate()}};i.promise.then(u,h=>u(null,h||"unknown"))}),sr(()=>{for(const f of a.values())f.reject(K)}),new Promise(f=>{function i(c){function v(){c===s?f(l):i(s)}c.then(v,v)}i(s)})}function qr(e){const n=hn(e);return ut(n),n}function Zt(e){const n=hn(e);return n.equals=qn,n}function Jt(e){var n=e.effects;if(n!==null){e.effects=null;for(var t=0;t0&&!Qn&&er()}return n}function er(){Qn=!1;for(const e of ln)(e.f&E)!==0&&g(e,G),Ye(e)&&Re(e);ln.clear()}function en(e){se(e,e.v+1)}function Wn(e,n,t){var r=e.reactions;if(r!==null)for(var s=Le(),l=r.length,o=0;o{if(ue===l)return a();var f=d,i=ue;ee(null),Pn(l);var c=a();return ee(f),Pn(i),c};return r&&t.set("length",J(e.length)),new Proxy(e,{defineProperty(a,f,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&Pt();var c=t.get(f);return c===void 0?o(()=>{var v=J(i.value);return t.set(f,v),v}):se(c,i.value,!0),!0},deleteProperty(a,f){var i=t.get(f);if(i===void 0){if(f in a){const c=o(()=>J(A));t.set(f,c),en(s)}}else se(i,A),en(s);return!0},get(a,f,i){var y;if(f===Pe)return e;var c=t.get(f),v=f in a;if(c===void 0&&(!v||(y=De(a,f))!=null&&y.writable)&&(c=o(()=>{var h=ke(v?a[f]:A),N=J(h);return N}),t.set(f,c)),c!==void 0){var u=Ne(c);return u===A?void 0:u}return Reflect.get(a,f,i)},getOwnPropertyDescriptor(a,f){var i=Reflect.getOwnPropertyDescriptor(a,f);if(i&&"value"in i){var c=t.get(f);c&&(i.value=Ne(c))}else if(i===void 0){var v=t.get(f),u=v==null?void 0:v.v;if(v!==void 0&&u!==A)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return i},has(a,f){var u;if(f===Pe)return!0;var i=t.get(f),c=i!==void 0&&i.v!==A||Reflect.has(a,f);if(i!==void 0||w!==null&&(!c||(u=De(a,f))!=null&&u.writable)){i===void 0&&(i=o(()=>{var y=c?ke(a[f]):A,h=J(y);return h}),t.set(f,i));var v=Ne(i);if(v===A)return!1}return c},set(a,f,i,c){var En;var v=t.get(f),u=f in a;if(r&&f==="length")for(var y=i;yJ(A)),t.set(y+"",h))}if(v===void 0)(!u||(En=De(a,f))!=null&&En.writable)&&(v=o(()=>J(void 0)),se(v,ke(i)),t.set(f,v));else{u=v.v!==A;var N=o(()=>ke(i));se(v,N)}var O=Reflect.getOwnPropertyDescriptor(a,f);if(O!=null&&O.set&&O.set.call(c,i),!u){if(r&&typeof f=="string"){var xe=t.get("length"),Oe=Number(f);Number.isInteger(Oe)&&Oe>=xe.v&&se(xe,Oe+1)}en(s)}return!0},ownKeys(a){Ne(s);var f=Reflect.ownKeys(a).filter(v=>{var u=t.get(v);return u===void 0||u.v!==A});for(var[i,c]of t)c.v!==A&&!(i in a)&&f.push(i);return f},setPrototypeOf(){It()}})}var kn,nr,et,nt;function Ur(){if(kn===void 0){kn=window,nr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,n=Node.prototype,t=Text.prototype;et=De(n,"firstChild").get,nt=De(n,"nextSibling").get,bn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),bn(t)&&(t.__t=void 0)}}function $e(e=""){return document.createTextNode(e)}function an(e){return et.call(e)}function te(e){return nt.call(e)}function Br(e,n){if(!_e)return an(e);var t=an(T);if(t===null)t=T.appendChild($e());else if(n&&t.nodeType!==Ze){var r=$e();return t==null||t.before(r),Ae(r),r}return n&&yn(t),Ae(t),t}function zr(e,n=!1){if(!_e){var t=an(e);return t instanceof Comment&&t.data===""?te(t):t}if(n){if((T==null?void 0:T.nodeType)!==Ze){var r=$e();return T==null||T.before(r),Ae(r),r}yn(T)}return T}function Gr(e,n=1,t=!1){let r=_e?T:e;for(var s;n--;)s=r,r=te(r);if(!_e)return r;if(t){if((r==null?void 0:r.nodeType)!==Ze){var l=$e();return r===null?s==null||s.after(l):r.before(l),Ae(l),l}yn(r)}return Ae(r),r}function Vr(e){e.textContent=""}function Kr(){return!1}function $r(e,n,t){return document.createElementNS(Lt,e,void 0)}function yn(e){if(e.nodeValue.length<65536)return;let n=e.nextSibling;for(;n!==null&&n.nodeType===Ze;)n.remove(),e.nodeValue+=n.nodeValue,n=e.nextSibling}let Nn=!1;function tr(){Nn||(Nn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var n;if(!e.defaultPrevented)for(const t of e.target.elements)(n=t.__on_r)==null||n.call(t)})},{capture:!0}))}function gn(e){var n=d,t=w;ee(null),Se(null);try{return e()}finally{ee(n),Se(t)}}function Xr(e,n,t,r=t){e.addEventListener(n,()=>gn(t));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),tr()}function tt(e){w===null&&(d===null&&Nt(),kt()),he&&Ot()}function rr(e,n){var t=n.last;t===null?n.last=n.first=e:(t.next=e,e.prev=t,n.last=e)}function V(e,n){var t=w;t!==null&&(t.f&U)!==0&&(e|=U);var r={ctx:R,deps:null,nodes:null,f:e|x|F,first:null,fn:n,last:null,next:null,parent:t,b:t&&t.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&be)!==0)ye!==null?ye.push(r):ve.ensure().schedule(r);else if(n!==null){try{Re(r)}catch(o){throw de(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&je)===0&&(s=s.first,(e&ne)!==0&&(e&ze)!==0&&s!==null&&(s.f|=ze))}if(s!==null&&(s.parent=t,t!==null&&rr(s,t),d!==null&&(d.f&b)!==0&&(e&oe)===0)){var l=d;(l.effects??(l.effects=[])).push(s)}return r}function rt(){return d!==null&&!Y}function sr(e){const n=V(Fe,null);return g(n,E),n.teardown=e,n}function Zr(e){tt();var n=w.f,t=!d&&(n&z)!==0&&(n&pe)===0;if(t){var r=R;(r.e??(r.e=[])).push(e)}else return st(e)}function st(e){return V(be|jn,e)}function Jr(e){return tt(),V(Fe|jn,e)}function Qr(e){ve.ensure();const n=V(oe|je,e);return(t={})=>new Promise(r=>{t.outro?ar(n,()=>{de(n),r(void 0)}):(de(n),r(void 0))})}function Wr(e){return V(be,e)}function lr(e){return V(on|je,e)}function es(e,n=0){return V(Fe|n,e)}function ns(e,n=[],t=[],r=[]){Kt(r,n,t,s=>{V(Fe,()=>e(...s.map(Ne)))})}function ts(e,n=0){var t=V(ne|n,e);return t}function rs(e){return V(z|je,e)}function lt(e){var n=e.teardown;if(n!==null){const t=he,r=d;Dn(!0),ee(null);try{n.call(null)}finally{Dn(t),ee(r)}}}function mn(e,n=!1){var t=e.first;for(e.first=e.last=null;t!==null;){const s=t.ac;s!==null&&gn(()=>{s.abort(K)});var r=t.next;(t.f&oe)!==0?t.parent=null:de(t,n),t=r}}function ir(e){for(var n=e.first;n!==null;){var t=n.next;(n.f&z)===0&&de(n),n=t}}function de(e,n=!0){var t=!1;(n||(e.f&Rt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(fr(e.nodes.start,e.nodes.end),t=!0),g(e,An),mn(e,n&&!t),Ce(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)l.stop();lt(e),e.f^=An,e.f|=B;var s=e.parent;s!==null&&s.first!==null&&it(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function fr(e,n){for(;e!==null;){var t=e===n?null:te(e);e.remove(),e=t}}function it(e){var n=e.parent,t=e.prev,r=e.next;t!==null&&(t.next=r),r!==null&&(r.prev=t),n!==null&&(n.first===e&&(n.first=r),n.last===e&&(n.last=t))}function ar(e,n,t=!0){var r=[];ft(e,r,!0);var s=()=>{t&&de(e),n&&n()},l=r.length;if(l>0){var o=()=>--l||s();for(var a of r)a.out(o)}else s()}function ft(e,n,t){if((e.f&U)===0){e.f^=U;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||t)&&n.push(a);for(var s=e.first;s!==null;){var l=s.next,o=(s.f&ze)!==0||(s.f&z)!==0&&(e.f&ne)!==0;ft(s,n,o?t:!1),s=l}}}function ss(e){at(e,!0)}function at(e,n){if((e.f&U)!==0){e.f^=U,(e.f&E)===0&&(g(e,x),ve.ensure().schedule(e));for(var t=e.first;t!==null;){var r=t.next,s=(t.f&ze)!==0||(t.f&z)!==0;at(t,s?n:!1),t=r}var l=e.nodes&&e.nodes.t;if(l!==null)for(const o of l)(o.is_global||n)&&o.in()}}function ls(e,n){if(e.nodes)for(var t=e.nodes.start,r=e.nodes.end;t!==null;){var s=t===r?null:te(t);n.append(t),t=s}}let Be=!1,he=!1;function Dn(e){he=e}let d=null,Y=!1;function ee(e){d=e}let w=null;function Se(e){w=e}let j=null;function ut(e){d!==null&&(j===null?j=[e]:j.push(e))}let k=null,I=0,M=null;function ur(e){M=e}let ot=1,ie=0,ue=ie;function Pn(e){ue=e}function ct(){return++ot}function Ye(e){var n=e.f;if((n&x)!==0)return!0;if(n&b&&(e.f&=~ce),(n&G)!==0){for(var t=e.deps,r=t.length,s=0;se.wv)return!0}(n&F)!==0&&S===null&&g(e,E)}return!1}function _t(e,n,t=!0){var r=e.reactions;if(r!==null&&!(j!==null&&Te.call(j,e)))for(var s=0;s{e.ac.abort(K)}),e.ac=null);try{e.f|=nn;var c=e.fn,v=c();e.f|=pe;var u=e.deps,y=p==null?void 0:p.is_fork;if(k!==null){var h;if(y||Ce(e,I),u!==null&&I>0)for(u.length=I+k.length,h=0;h{const e=u(n);if(typeof e=="function")return e})}function a(n){var e=n.l;return e.u??(e.u={a:[],b:[],m:[]})}export{i as o}; diff --git a/.svelte-kit/output/client/_app/immutable/chunks/VCsPq5MH.js b/.svelte-kit/output/client/_app/immutable/chunks/VCsPq5MH.js deleted file mode 100644 index 6231789..0000000 --- a/.svelte-kit/output/client/_app/immutable/chunks/VCsPq5MH.js +++ /dev/null @@ -1 +0,0 @@ -import{k as p,c as u,n as c,o as l,q as E,T as w,t as g,h as d,e as s,R as y,v as N,w as x,x as M,y as A}from"./QnfpkG_Q.js";var f;const i=((f=globalThis==null?void 0:globalThis.window)==null?void 0:f.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function L(t){return(i==null?void 0:i.createHTML(t))??t}function R(t){var r=p("template");return r.innerHTML=L(t.replaceAll("","")),r.content}function n(t,r){var e=c;e.nodes===null&&(e.nodes={start:t,end:r,a:null,t:null})}function P(t,r){var e=(r&w)!==0,m=(r&g)!==0,a,v=!t.startsWith("");return()=>{if(d)return n(s,null),s;a===void 0&&(a=R(v?t:""+t),e||(a=l(a)));var o=m||E?document.importNode(a,!0):a.cloneNode(!0);if(e){var T=l(o),h=o.lastChild;n(T,h)}else n(o,o);return o}}function C(t=""){if(!d){var r=u(t+"");return n(r,r),r}var e=s;return e.nodeType!==x?(e.before(e=u()),M(e)):A(e),n(e,e),e}function I(){if(d)return n(s,null),s;var t=document.createDocumentFragment(),r=document.createComment(""),e=u();return t.append(r,e),n(r,e),t}function D(t,r){if(d){var e=c;((e.f&y)===0||e.nodes.end===null)&&(e.nodes.end=s),N();return}t!==null&&t.before(r)}const b="5";var _;typeof window<"u"&&((_=window.__svelte??(window.__svelte={})).v??(_.v=new Set)).add(b);export{D as a,n as b,I as c,P as f,C as t}; diff --git a/.svelte-kit/output/client/_app/immutable/entry/app.CBndQoGT.js b/.svelte-kit/output/client/_app/immutable/entry/app.CBndQoGT.js deleted file mode 100644 index 9d4aae3..0000000 --- a/.svelte-kit/output/client/_app/immutable/entry/app.CBndQoGT.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DCFqwZUk.js","../chunks/VCsPq5MH.js","../chunks/QnfpkG_Q.js","../chunks/L6H5smAl.js","../nodes/1.Ck9HYfT_.js","../chunks/E-DQD4vt.js","../chunks/BRJNrpWH.js","../chunks/V4GKpPu4.js","../nodes/2.C6jgA3H7.js","../assets/2.COJFZ_SK.css"])))=>i.map(i=>d[i]); -var V=t=>{throw TypeError(t)};var J=(t,e,a)=>e.has(t)||V("Cannot "+a);var m=(t,e,a)=>(J(t,e,"read from private field"),a?a.call(t):e.get(t)),j=(t,e,a)=>e.has(t)?V("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),k=(t,e,a,c)=>(J(t,e,"write to private field"),c?c.call(t,a):e.set(t,a),a);import{h as D,v as Z,i as Q,E as X,aw as p,a4 as $,x as ee,ah as B,e as te,ae as de,f as _e,ax as ve,O as he,g as re,n as ae,ay as me,az as ne,aA as ge,aB as ye,aC as Ee,C as b,aD as be,au as A,aE as Pe,aF as Re,aG as Se,l as Oe,aH as we,aI as Ie,F as Ae,aJ as Te,aK as xe,aL as se,aM as Le,ab as De,aN as Be,H as Ce,z as je,u as ke,at as Ne,j as x,M as Ye,J as Me,av as N,K as Ue,L as Fe,I as qe,aO as Y}from"../chunks/QnfpkG_Q.js";import{h as ze,m as Ge,u as He,s as Ve}from"../chunks/E-DQD4vt.js";import{a as w,f as ie,c as M,t as Je}from"../chunks/VCsPq5MH.js";import{o as Ke}from"../chunks/V4GKpPu4.js";import{B as oe}from"../chunks/L6H5smAl.js";let L=!1;function We(t){var e=L;try{return L=!1,[t(),L]}finally{L=e}}function U(t,e,a=!1){var c;D&&(c=te,Z());var o=new oe(t),u=a?X:0;function n(r,s){if(D){var d=p(c);if(r!==parseInt(d.substring(1))){var i=$();ee(i),o.anchor=i,B(!1),o.ensure(r,s),B(!0);return}}o.ensure(r,s)}Q(()=>{var r=!1;e((s,d=0)=>{r=!0,n(d,s)}),r||n(-1,null)},u)}function F(t,e,a){var c;D&&(c=te,Z());var o=new oe(t);Q(()=>{var u=e()??null;if(D){var n=p(c),r=n===de,s=u!==null;if(r!==s){var d=$();ee(d),o.anchor=d,B(!1),o.ensure(u,u&&(i=>a(i,u))),B(!0);return}}o.ensure(u,u&&(i=>a(i,u)))},X)}function K(t,e){return t===e||(t==null?void 0:t[ne])===e}function q(t={},e,a,c){var o=_e.r,u=ae;return ve(()=>{var n,r;return he(()=>{n=r,r=[],re(()=>{t!==a(...r)&&(e(t,...r),n&&K(a(...n),t)&&e(null,...n))})}),()=>{let s=u;for(;s!==o&&s.parent!==null&&s.parent.f&me;)s=s.parent;const d=()=>{r&&K(a(...r),t)&&e(null,...r)},i=s.teardown;s.teardown=()=>{d(),i==null||i()}}}),t}function z(t,e,a,c){var R;var o=!Oe||(a&we)!==0,u=(a&Se)!==0,n=(a&xe)!==0,r=c,s=!0,d=()=>(s&&(s=!1,r=n?re(c):c),r);let i;if(u){var P=ne in t||se in t;i=((R=ge(t,e))==null?void 0:R.set)??(P&&e in t?f=>t[e]=f:void 0)}var g,I=!1;u?[g,I]=We(()=>t[e]):g=t[e],g===void 0&&c!==void 0&&(g=d(),i&&(o&&ye(),i(g)));var _;if(o?_=()=>{var f=t[e];return f===void 0?d():(s=!0,f)}:_=()=>{var f=t[e];return f!==void 0&&(r=void 0),f===void 0?r:f},o&&(a&Ee)===0)return _;if(i){var l=t.$$legacy;return(function(f,h){return arguments.length>0?((!o||!h||l||I)&&i(h?_():f),f):_()})}var v=!1,y=((a&Ie)!==0?Ae:Te)(()=>(v=!1,_()));u&&b(y);var O=ae;return(function(f,h){if(arguments.length>0){const C=h?b(y):o&&u?be(f):f;return A(y,C),v=!0,r!==void 0&&(r=C),f}return Pe&&v||(O.f&Re)!==0?y.v:b(y)})}function Ze(t){return class extends Qe{constructor(e){super({component:t,...e})}}}var S,E;class Qe{constructor(e){j(this,S);j(this,E);var u;var a=new Map,c=(n,r)=>{var s=Be(r,!1,!1);return a.set(n,s),s};const o=new Proxy({...e.props||{},$$events:{}},{get(n,r){return b(a.get(r)??c(r,Reflect.get(n,r)))},has(n,r){return r===se?!0:(b(a.get(r)??c(r,Reflect.get(n,r))),Reflect.has(n,r))},set(n,r,s){return A(a.get(r)??c(r,s),s),Reflect.set(n,r,s)}});k(this,E,(e.hydrate?ze:Ge)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),(!((u=e==null?void 0:e.props)!=null&&u.$$host)||e.sync===!1)&&Le(),k(this,S,o.$$events);for(const n of Object.keys(m(this,E)))n==="$set"||n==="$destroy"||n==="$on"||De(this,n,{get(){return m(this,E)[n]},set(r){m(this,E)[n]=r},enumerable:!0});m(this,E).$set=n=>{Object.assign(o,n)},m(this,E).$destroy=()=>{He(m(this,E))}}$set(e){m(this,E).$set(e)}$on(e,a){m(this,S)[e]=m(this,S)[e]||[];const c=(...o)=>a.call(this,...o);return m(this,S)[e].push(c),()=>{m(this,S)[e]=m(this,S)[e].filter(o=>o!==c)}}$destroy(){m(this,E).$destroy()}}S=new WeakMap,E=new WeakMap;const Xe="modulepreload",pe=function(t,e){return new URL(t,e).href},W={},G=function(e,a,c){let o=Promise.resolve();if(a&&a.length>0){let n=function(i){return Promise.all(i.map(P=>Promise.resolve(P).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};const r=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=n(a.map(i=>{if(i=pe(i,c),i in W)return;W[i]=!0;const P=i.endsWith(".css"),g=P?'[rel="stylesheet"]':"";if(!!c)for(let l=r.length-1;l>=0;l--){const v=r[l];if(v.href===i&&(!P||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${g}`))return;const _=document.createElement("link");if(_.rel=P?"stylesheet":Xe,P||(_.as="script"),_.crossOrigin="",_.href=i,d&&_.setAttribute("nonce",d),document.head.appendChild(_),P)return new Promise((l,v)=>{_.addEventListener("load",l),_.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${i}`)))})}))}function u(n){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=n,window.dispatchEvent(r),!r.defaultPrevented)throw n}return o.then(n=>{for(const r of n||[])r.status==="rejected"&&u(r.reason);return e().catch(u)})},ut={};var $e=ie('
'),et=ie(" ",1);function tt(t,e){Ce(e,!0);let a=z(e,"components",23,()=>[]),c=z(e,"data_0",3,null),o=z(e,"data_1",3,null);je(()=>e.stores.page.set(e.page)),ke(()=>{e.stores,e.page,e.constructors,a(),e.form,c(),o(),e.stores.page.notify()});let u=N(!1),n=N(!1),r=N(null);Ke(()=>{const l=e.stores.page.subscribe(()=>{b(u)&&(A(n,!0),Ne().then(()=>{A(r,document.title||"untitled page",!0)}))});return A(u,!0),l});const s=Y(()=>e.constructors[1]);var d=et(),i=x(d);{var P=l=>{const v=Y(()=>e.constructors[0]);var y=M(),O=x(y);F(O,()=>b(v),(R,f)=>{q(f(R,{get data(){return c()},get form(){return e.form},get params(){return e.page.params},children:(h,C)=>{var H=M(),ue=x(H);F(ue,()=>b(s),(fe,le)=>{q(le(fe,{get data(){return o()},get form(){return e.form},get params(){return e.page.params}}),T=>a()[1]=T,()=>{var T;return(T=a())==null?void 0:T[1]})}),w(h,H)},$$slots:{default:!0}}),h=>a()[0]=h,()=>{var h;return(h=a())==null?void 0:h[0]})}),w(l,y)},g=l=>{const v=Y(()=>e.constructors[0]);var y=M(),O=x(y);F(O,()=>b(v),(R,f)=>{q(f(R,{get data(){return c()},get form(){return e.form},get params(){return e.page.params}}),h=>a()[0]=h,()=>{var h;return(h=a())==null?void 0:h[0]})}),w(l,y)};U(i,l=>{e.constructors[1]?l(P):l(g,-1)})}var I=Ye(i,2);{var _=l=>{var v=$e(),y=Ue(v);{var O=R=>{var f=Je();qe(()=>Ve(f,b(r))),w(R,f)};U(y,R=>{b(n)&&R(O)})}Fe(v),w(l,v)};U(I,l=>{b(u)&&l(_)})}w(t,d),Me()}const ft=Ze(tt),lt=[()=>G(()=>import("../nodes/0.DCFqwZUk.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>G(()=>import("../nodes/1.Ck9HYfT_.js"),__vite__mapDeps([4,1,2,5,6,7]),import.meta.url),()=>G(()=>import("../nodes/2.C6jgA3H7.js"),__vite__mapDeps([8,1,2,5,9]),import.meta.url)],dt=[],_t={"/":[2]},ce={handleError:(({error:t})=>{console.error(t)}),reroute:(()=>{}),transport:{}},rt=Object.fromEntries(Object.entries(ce.transport).map(([t,e])=>[t,e.decode])),vt=Object.fromEntries(Object.entries(ce.transport).map(([t,e])=>[t,e.encode])),ht=!1,mt=(t,e)=>rt[t](e);export{mt as decode,rt as decoders,_t as dictionary,vt as encoders,ht as hash,ce as hooks,ut as matchers,lt as nodes,ft as root,dt as server_loads}; diff --git a/.svelte-kit/output/client/_app/immutable/entry/start.DXEWCeTR.js b/.svelte-kit/output/client/_app/immutable/entry/start.DXEWCeTR.js deleted file mode 100644 index 3c7a277..0000000 --- a/.svelte-kit/output/client/_app/immutable/entry/start.DXEWCeTR.js +++ /dev/null @@ -1 +0,0 @@ -import{l as o,a as r}from"../chunks/BRJNrpWH.js";export{o as load_css,r as start}; diff --git a/.svelte-kit/output/client/_app/immutable/nodes/0.DCFqwZUk.js b/.svelte-kit/output/client/_app/immutable/nodes/0.DCFqwZUk.js deleted file mode 100644 index 5f2bdce..0000000 --- a/.svelte-kit/output/client/_app/immutable/nodes/0.DCFqwZUk.js +++ /dev/null @@ -1 +0,0 @@ -import{c as s,a as c}from"../chunks/VCsPq5MH.js";import{i,E as l,j as p}from"../chunks/QnfpkG_Q.js";import{B as m}from"../chunks/L6H5smAl.js";function f(n,o,...e){var a=new m(n);i(()=>{const r=o()??null;a.ensure(r,r&&(t=>r(t,...e)))},l)}const u=!1,v=Object.freeze(Object.defineProperty({__proto__:null,ssr:u},Symbol.toStringTag,{value:"Module"}));function g(n,o){var e=s(),a=p(e);f(a,()=>o.children),c(n,e)}export{g as component,v as universal}; diff --git a/.svelte-kit/output/client/_app/immutable/nodes/1.Ck9HYfT_.js b/.svelte-kit/output/client/_app/immutable/nodes/1.Ck9HYfT_.js deleted file mode 100644 index da008bf..0000000 --- a/.svelte-kit/output/client/_app/immutable/nodes/1.Ck9HYfT_.js +++ /dev/null @@ -1 +0,0 @@ -import{a as b,f as k}from"../chunks/VCsPq5MH.js";import{f as x,z as y,u as i,g as $,A as l,B as j,C as v,D as z,F as A,G as B,H as C,j as D,I as E,J as F,K as u,L as m,M as G}from"../chunks/QnfpkG_Q.js";import{s as g}from"../chunks/E-DQD4vt.js";import{s as H,p as _}from"../chunks/BRJNrpWH.js";function I(a=!1){const t=x,e=t.l.u;if(!e)return;let r=()=>z(t.s);if(a){let o=0,s={};const c=A(()=>{let n=!1;const p=t.s;for(const f in p)p[f]!==s[f]&&(s[f]=p[f],n=!0);return n&&o++,o});r=()=>v(c)}e.b.length&&y(()=>{d(t,r),l(e.b)}),i(()=>{const o=$(()=>e.m.map(j));return()=>{for(const s of o)typeof s=="function"&&s()}}),e.a.length&&i(()=>{d(t,r),l(e.a)})}function d(a,t){if(a.l.s)for(const e of a.l.s)v(e);t()}B();const J={get error(){return _.error},get status(){return _.status}};H.updated.check;const h=J;var K=k("

",1);function N(a,t){C(t,!1),I();var e=K(),r=D(e),o=u(r,!0);m(r);var s=G(r,2),c=u(s,!0);m(s),E(()=>{var n;g(o,h.status),g(c,(n=h.error)==null?void 0:n.message)}),b(a,e),F()}export{N as component}; diff --git a/.svelte-kit/output/client/_app/immutable/nodes/2.C6jgA3H7.js b/.svelte-kit/output/client/_app/immutable/nodes/2.C6jgA3H7.js deleted file mode 100644 index d1de981..0000000 --- a/.svelte-kit/output/client/_app/immutable/nodes/2.C6jgA3H7.js +++ /dev/null @@ -1 +0,0 @@ -import{a as p,f as L}from"../chunks/VCsPq5MH.js";import{h as m,Q as T,ao as y,ap as A,aq as I,ar as M,as as N,a as c,at as w,g as K,O as x,H as C,I as H,C as f,J as O,K as _,M as S,a3 as R,L as d,au as k,av as b}from"../chunks/QnfpkG_Q.js";import{e as V,s as G}from"../chunks/E-DQD4vt.js";const U=Symbol("is custom element"),q=Symbol("is html"),D=M?"link":"LINK";function W(e){if(m){var a=!1,r=()=>{if(!a){if(a=!0,e.hasAttribute("value")){var l=e.value;E(e,"value",null),e.value=l}if(e.hasAttribute("checked")){var s=e.checked;E(e,"checked",null),e.checked=s}}};e.__on_r=r,T(r),y()}}function E(e,a,r,l){var s=B(e);m&&(s[a]=e.getAttribute(a),a==="src"||a==="srcset"||a==="href"&&e.nodeName===D)||s[a]!==(s[a]=r)&&(a==="loading"&&(e[A]=r),e.removeAttribute(a))}function B(e){return e.__attributes??(e.__attributes={[U]:e.nodeName.includes("-"),[q]:e.namespaceURI===I})}function J(e,a,r=a){var l=new WeakSet;N(e,"input",async s=>{var t=s?e.defaultValue:e.value;if(t=g(e)?h(t):t,r(t),c!==null&&l.add(c),await w(),t!==(t=a())){var o=e.selectionStart,v=e.selectionEnd,n=e.value.length;if(e.value=t??"",v!==null){var u=e.value.length;o===v&&v===n&&u>n?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=o,e.selectionEnd=Math.min(v,u))}}}),(m&&e.defaultValue!==e.value||K(a)==null&&e.value)&&(r(g(e)?h(e.value):e.value),c!==null&&l.add(c)),x(()=>{var s=a();if(e===document.activeElement){var t=c;if(l.has(t))return}g(e)&&s===h(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function g(e){var a=e.type;return a==="number"||a==="range"}function h(e){return e===""?null:+e}async function P(e,a={},r){return window.__TAURI_INTERNALS__.invoke(e,a,r)}var Q=L('

Welcome to Tauri + Svelte

Click on the Tauri, Vite, and SvelteKit logos to learn more.

');function z(e,a){C(a,!0);let r=b(""),l=b("");async function s(i){i.preventDefault(),k(l,await P("greet",{name:f(r)}),!0)}var t=Q(),o=S(_(t),6),v=_(o);W(v),R(2),d(o);var n=S(o,2),u=_(n,!0);d(n),d(t),H(()=>G(u,f(l))),V("submit",o,s),J(v,()=>f(r),i=>k(r,i)),p(e,t),O()}export{z as component}; diff --git a/.svelte-kit/output/client/_app/version.json b/.svelte-kit/output/client/_app/version.json deleted file mode 100644 index 2c18c87..0000000 --- a/.svelte-kit/output/client/_app/version.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"1774502804002"} \ No newline at end of file diff --git a/.svelte-kit/output/client/favicon.png b/.svelte-kit/output/client/favicon.png deleted file mode 100644 index 825b9e6..0000000 Binary files a/.svelte-kit/output/client/favicon.png and /dev/null differ diff --git a/.svelte-kit/output/client/svelte.svg b/.svelte-kit/output/client/svelte.svg deleted file mode 100644 index c5e0848..0000000 --- a/.svelte-kit/output/client/svelte.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/.svelte-kit/output/client/tauri.svg b/.svelte-kit/output/client/tauri.svg deleted file mode 100644 index 31b62c9..0000000 --- a/.svelte-kit/output/client/tauri.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/.svelte-kit/output/client/vite.svg b/.svelte-kit/output/client/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/.svelte-kit/output/client/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/.svelte-kit/output/prerendered/dependencies/_app/env.js b/.svelte-kit/output/prerendered/dependencies/_app/env.js deleted file mode 100644 index f5427da..0000000 --- a/.svelte-kit/output/prerendered/dependencies/_app/env.js +++ /dev/null @@ -1 +0,0 @@ -export const env={} \ No newline at end of file diff --git a/.svelte-kit/output/server/.vite/manifest.json b/.svelte-kit/output/server/.vite/manifest.json deleted file mode 100644 index 0959937..0000000 --- a/.svelte-kit/output/server/.vite/manifest.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - ".svelte-kit/generated/server/internal.js": { - "file": "internal.js", - "name": "internal", - "src": ".svelte-kit/generated/server/internal.js", - "isEntry": true, - "imports": [ - "_root.js", - "_environment.js", - "_internal.js" - ] - }, - "_attributes.js": { - "file": "chunks/attributes.js", - "name": "attributes" - }, - "_environment.js": { - "file": "chunks/environment.js", - "name": "environment" - }, - "_exports.js": { - "file": "chunks/exports.js", - "name": "exports", - "imports": [ - "_attributes.js", - "_root.js" - ] - }, - "_false.js": { - "file": "chunks/false.js", - "name": "false" - }, - "_internal.js": { - "file": "chunks/internal.js", - "name": "internal", - "imports": [ - "_root.js", - "_environment.js" - ] - }, - "_root.js": { - "file": "chunks/root.js", - "name": "root", - "imports": [ - "_false.js", - "_attributes.js" - ] - }, - "_shared.js": { - "file": "chunks/shared.js", - "name": "shared", - "imports": [ - "_utils.js" - ] - }, - "_utils.js": { - "file": "chunks/utils.js", - "name": "utils" - }, - "node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js": { - "file": "remote-entry.js", - "name": "remote-entry", - "src": "node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js", - "isEntry": true, - "imports": [ - "_shared.js", - "_false.js", - "_environment.js" - ] - }, - "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte": { - "file": "entries/fallbacks/error.svelte.js", - "name": "entries/fallbacks/error.svelte", - "src": "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte", - "isEntry": true, - "imports": [ - "_attributes.js", - "_exports.js", - "_root.js", - "_utils.js" - ] - }, - "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte": { - "file": "entries/fallbacks/layout.svelte.js", - "name": "entries/fallbacks/layout.svelte", - "src": "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/layout.svelte", - "isEntry": true - }, - "node_modules/@sveltejs/kit/src/runtime/server/index.js": { - "file": "index.js", - "name": "index", - "src": "node_modules/@sveltejs/kit/src/runtime/server/index.js", - "isEntry": true, - "imports": [ - "_false.js", - "_environment.js", - "_shared.js", - "_exports.js", - "_utils.js", - "_internal.js" - ] - }, - "src/routes/+layout.ts": { - "file": "entries/pages/_layout.ts.js", - "name": "entries/pages/_layout.ts", - "src": "src/routes/+layout.ts", - "isEntry": true - }, - "src/routes/+page.svelte": { - "file": "entries/pages/_page.svelte.js", - "name": "entries/pages/_page.svelte", - "src": "src/routes/+page.svelte", - "isEntry": true, - "imports": [ - "_attributes.js" - ], - "css": [ - "_app/immutable/assets/_page.COJFZ_SK.css" - ] - } -} \ No newline at end of file diff --git a/.svelte-kit/output/server/_app/immutable/assets/_page.COJFZ_SK.css b/.svelte-kit/output/server/_app/immutable/assets/_page.COJFZ_SK.css deleted file mode 100644 index 680edb9..0000000 --- a/.svelte-kit/output/server/_app/immutable/assets/_page.COJFZ_SK.css +++ /dev/null @@ -1 +0,0 @@ -.logo.vite.svelte-1uha8ag:hover{filter:drop-shadow(0 0 2em #747bff)}.logo.svelte-kit.svelte-1uha8ag:hover{filter:drop-shadow(0 0 2em #ff3e00)}:root{color:#0f0f0f;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;background-color:#f6f6f6;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:24px}.container.svelte-1uha8ag{text-align:center;flex-direction:column;justify-content:center;margin:0;padding-top:10vh;display:flex}.logo.svelte-1uha8ag{will-change:filter;height:6em;padding:1.5em;transition:all .75s}.logo.tauri.svelte-1uha8ag:hover{filter:drop-shadow(0 0 2em #24c8db)}.row.svelte-1uha8ag{justify-content:center;display:flex}a.svelte-1uha8ag{color:#646cff;-webkit-text-decoration:inherit;text-decoration:inherit;font-weight:500}a.svelte-1uha8ag:hover{color:#535bf2}h1.svelte-1uha8ag{text-align:center}input.svelte-1uha8ag,button.svelte-1uha8ag{color:#0f0f0f;background-color:#fff;border:1px solid #0000;border-radius:8px;padding:.6em 1.2em;font-family:inherit;font-size:1em;font-weight:500;transition:border-color .25s;box-shadow:0 2px 2px #0003}button.svelte-1uha8ag{cursor:pointer}button.svelte-1uha8ag:hover{border-color:#396cd8}button.svelte-1uha8ag:active{background-color:#e8e8e8;border-color:#396cd8}input.svelte-1uha8ag,button.svelte-1uha8ag{outline:none}#greet-input.svelte-1uha8ag{margin-right:5px}@media(prefers-color-scheme:dark){:root{color:#f6f6f6;background-color:#2f2f2f}a.svelte-1uha8ag:hover{color:#24c8db}input.svelte-1uha8ag,button.svelte-1uha8ag{color:#fff;background-color:#0f0f0f98}button.svelte-1uha8ag:active{background-color:#0f0f0f69}} diff --git a/.svelte-kit/output/server/chunks/attributes.js b/.svelte-kit/output/server/chunks/attributes.js deleted file mode 100644 index a40581c..0000000 --- a/.svelte-kit/output/server/chunks/attributes.js +++ /dev/null @@ -1,206 +0,0 @@ -import { clsx as clsx$1 } from "clsx"; -var is_array = Array.isArray; -var index_of = Array.prototype.indexOf; -var includes = Array.prototype.includes; -var array_from = Array.from; -var define_property = Object.defineProperty; -var get_descriptor = Object.getOwnPropertyDescriptor; -var object_prototype = Object.prototype; -var array_prototype = Array.prototype; -var get_prototype_of = Object.getPrototypeOf; -var is_extensible = Object.isExtensible; -var has_own_property = Object.prototype.hasOwnProperty; -const noop = () => { -}; -function run_all(arr) { - for (var i = 0; i < arr.length; i++) { - arr[i](); - } -} -function deferred() { - var resolve; - var reject; - var promise = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - return { promise, resolve, reject }; -} -const ATTR_REGEX = /[&"<]/g; -const CONTENT_REGEX = /[&<]/g; -function escape_html(value, is_attr) { - const str = String(value ?? ""); - const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX; - pattern.lastIndex = 0; - let escaped = ""; - let last = 0; - while (pattern.test(str)) { - const i = pattern.lastIndex - 1; - const ch = str[i]; - escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === '"' ? """ : "<"); - last = i + 1; - } - return escaped + str.substring(last); -} -const replacements = { - translate: /* @__PURE__ */ new Map([ - [true, "yes"], - [false, "no"] - ]) -}; -function attr(name, value, is_boolean = false) { - if (name === "hidden" && value !== "until-found") { - is_boolean = true; - } - if (value == null || !value && is_boolean) return ""; - const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value; - const assignment = is_boolean ? `=""` : `="${escape_html(normalized, true)}"`; - return ` ${name}${assignment}`; -} -function clsx(value) { - if (typeof value === "object") { - return clsx$1(value); - } else { - return value ?? ""; - } -} -const whitespace = [..." \n\r\f \v\uFEFF"]; -function to_class(value, hash, directives) { - var classname = value == null ? "" : "" + value; - if (hash) { - classname = classname ? classname + " " + hash : hash; - } - if (directives) { - for (var key of Object.keys(directives)) { - if (directives[key]) { - classname = classname ? classname + " " + key : key; - } else if (classname.length) { - var len = key.length; - var a = 0; - while ((a = classname.indexOf(key, a)) >= 0) { - var b = a + len; - if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) { - classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1); - } else { - a = b; - } - } - } - } - } - return classname === "" ? null : classname; -} -function append_styles(styles, important = false) { - var separator = important ? " !important;" : ";"; - var css = ""; - for (var key of Object.keys(styles)) { - var value = styles[key]; - if (value != null && value !== "") { - css += " " + key + ": " + value + separator; - } - } - return css; -} -function to_css_name(name) { - if (name[0] !== "-" || name[1] !== "-") { - return name.toLowerCase(); - } - return name; -} -function to_style(value, styles) { - if (styles) { - var new_style = ""; - var normal_styles; - var important_styles; - if (Array.isArray(styles)) { - normal_styles = styles[0]; - important_styles = styles[1]; - } else { - normal_styles = styles; - } - if (value) { - value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim(); - var in_str = false; - var in_apo = 0; - var in_comment = false; - var reserved_names = []; - if (normal_styles) { - reserved_names.push(...Object.keys(normal_styles).map(to_css_name)); - } - if (important_styles) { - reserved_names.push(...Object.keys(important_styles).map(to_css_name)); - } - var start_index = 0; - var name_index = -1; - const len = value.length; - for (var i = 0; i < len; i++) { - var c = value[i]; - if (in_comment) { - if (c === "/" && value[i - 1] === "*") { - in_comment = false; - } - } else if (in_str) { - if (in_str === c) { - in_str = false; - } - } else if (c === "/" && value[i + 1] === "*") { - in_comment = true; - } else if (c === '"' || c === "'") { - in_str = c; - } else if (c === "(") { - in_apo++; - } else if (c === ")") { - in_apo--; - } - if (!in_comment && in_str === false && in_apo === 0) { - if (c === ":" && name_index === -1) { - name_index = i; - } else if (c === ";" || i === len - 1) { - if (name_index !== -1) { - var name = to_css_name(value.substring(start_index, name_index).trim()); - if (!reserved_names.includes(name)) { - if (c !== ";") { - i++; - } - var property = value.substring(start_index, i).trim(); - new_style += " " + property + ";"; - } - } - start_index = i + 1; - name_index = -1; - } - } - } - } - if (normal_styles) { - new_style += append_styles(normal_styles); - } - if (important_styles) { - new_style += append_styles(important_styles, true); - } - new_style = new_style.trim(); - return new_style === "" ? null : new_style; - } - return value == null ? null : String(value); -} -export { - array_prototype as a, - get_prototype_of as b, - is_array as c, - deferred as d, - escape_html as e, - is_extensible as f, - get_descriptor as g, - index_of as h, - includes as i, - define_property as j, - array_from as k, - has_own_property as l, - clsx as m, - noop as n, - object_prototype as o, - to_class as p, - attr as q, - run_all as r, - to_style as t -}; diff --git a/.svelte-kit/output/server/chunks/environment.js b/.svelte-kit/output/server/chunks/environment.js deleted file mode 100644 index ad45c3c..0000000 --- a/.svelte-kit/output/server/chunks/environment.js +++ /dev/null @@ -1,34 +0,0 @@ -let base = ""; -let assets = base; -const app_dir = "_app"; -const relative = true; -const initial = { base, assets }; -function override(paths) { - base = paths.base; - assets = paths.assets; -} -function reset() { - base = initial.base; - assets = initial.assets; -} -function set_assets(path) { - assets = initial.assets = path; -} -let prerendering = false; -function set_building() { -} -function set_prerendering() { - prerendering = true; -} -export { - assets as a, - base as b, - app_dir as c, - reset as d, - set_building as e, - set_prerendering as f, - override as o, - prerendering as p, - relative as r, - set_assets as s -}; diff --git a/.svelte-kit/output/server/chunks/exports.js b/.svelte-kit/output/server/chunks/exports.js deleted file mode 100644 index aaeab73..0000000 --- a/.svelte-kit/output/server/chunks/exports.js +++ /dev/null @@ -1,231 +0,0 @@ -import { n as noop } from "./attributes.js"; -import { s as safe_not_equal } from "./root.js"; -const SCHEME = /^[a-z][a-z\d+\-.]+:/i; -const internal = new URL("sveltekit-internal://"); -function resolve(base, path) { - if (path[0] === "/" && path[1] === "/") return path; - let url = new URL(base, internal); - url = new URL(path, url); - return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href; -} -function normalize_path(path, trailing_slash) { - if (path === "/" || trailing_slash === "ignore") return path; - if (trailing_slash === "never") { - return path.endsWith("/") ? path.slice(0, -1) : path; - } else if (trailing_slash === "always" && !path.endsWith("/")) { - return path + "/"; - } - return path; -} -function decode_pathname(pathname) { - return pathname.split("%25").map(decodeURI).join("%25"); -} -function decode_params(params) { - for (const key in params) { - params[key] = decodeURIComponent(params[key]); - } - return params; -} -function make_trackable(url, callback, search_params_callback, allow_hash = false) { - const tracked = new URL(url); - Object.defineProperty(tracked, "searchParams", { - value: new Proxy(tracked.searchParams, { - get(obj, key) { - if (key === "get" || key === "getAll" || key === "has") { - return (param, ...rest) => { - search_params_callback(param); - return obj[key](param, ...rest); - }; - } - callback(); - const value = Reflect.get(obj, key); - return typeof value === "function" ? value.bind(obj) : value; - } - }), - enumerable: true, - configurable: true - }); - const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"]; - if (allow_hash) tracked_url_properties.push("hash"); - for (const property of tracked_url_properties) { - Object.defineProperty(tracked, property, { - get() { - callback(); - return url[property]; - }, - enumerable: true, - configurable: true - }); - } - { - tracked[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => { - return inspect(url, opts); - }; - tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => { - return inspect(url.searchParams, opts); - }; - } - if (!allow_hash) { - disable_hash(tracked); - } - return tracked; -} -function disable_hash(url) { - allow_nodejs_console_log(url); - Object.defineProperty(url, "hash", { - get() { - throw new Error( - "Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead" - ); - } - }); -} -function disable_search(url) { - allow_nodejs_console_log(url); - for (const property of ["search", "searchParams"]) { - Object.defineProperty(url, property, { - get() { - throw new Error(`Cannot access url.${property} on a page with prerendering enabled`); - } - }); - } -} -function allow_nodejs_console_log(url) { - { - url[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => { - return inspect(new URL(url), opts); - }; - } -} -const subscriber_queue = []; -function readable(value, start) { - return { - subscribe: writable(value, start).subscribe - }; -} -function writable(value, start = noop) { - let stop = null; - const subscribers = /* @__PURE__ */ new Set(); - function set(new_value) { - if (safe_not_equal(value, new_value)) { - value = new_value; - if (stop) { - const run_queue = !subscriber_queue.length; - for (const subscriber of subscribers) { - subscriber[1](); - subscriber_queue.push(subscriber, value); - } - if (run_queue) { - for (let i = 0; i < subscriber_queue.length; i += 2) { - subscriber_queue[i][0](subscriber_queue[i + 1]); - } - subscriber_queue.length = 0; - } - } - } - } - function update(fn) { - set(fn( - /** @type {T} */ - value - )); - } - function subscribe(run, invalidate = noop) { - const subscriber = [run, invalidate]; - subscribers.add(subscriber); - if (subscribers.size === 1) { - stop = start(set, update) || noop; - } - run( - /** @type {T} */ - value - ); - return () => { - subscribers.delete(subscriber); - if (subscribers.size === 0 && stop) { - stop(); - stop = null; - } - }; - } - return { set, update, subscribe }; -} -function validator(expected) { - function validate(module, file) { - if (!module) return; - for (const key in module) { - if (key[0] === "_" || expected.has(key)) continue; - const values = [...expected.values()]; - const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`; - throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`); - } - } - return validate; -} -function hint_for_supported_files(key, ext = ".js") { - const supported_files = []; - if (valid_layout_exports.has(key)) { - supported_files.push(`+layout${ext}`); - } - if (valid_page_exports.has(key)) { - supported_files.push(`+page${ext}`); - } - if (valid_layout_server_exports.has(key)) { - supported_files.push(`+layout.server${ext}`); - } - if (valid_page_server_exports.has(key)) { - supported_files.push(`+page.server${ext}`); - } - if (valid_server_exports.has(key)) { - supported_files.push(`+server${ext}`); - } - if (supported_files.length > 0) { - return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`; - } -} -const valid_layout_exports = /* @__PURE__ */ new Set([ - "load", - "prerender", - "csr", - "ssr", - "trailingSlash", - "config" -]); -const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]); -const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]); -const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]); -const valid_server_exports = /* @__PURE__ */ new Set([ - "GET", - "POST", - "PATCH", - "PUT", - "DELETE", - "OPTIONS", - "HEAD", - "fallback", - "prerender", - "trailingSlash", - "config", - "entries" -]); -const validate_layout_exports = validator(valid_layout_exports); -const validate_page_exports = validator(valid_page_exports); -const validate_layout_server_exports = validator(valid_layout_server_exports); -const validate_page_server_exports = validator(valid_page_server_exports); -const validate_server_exports = validator(valid_server_exports); -export { - SCHEME as S, - decode_params as a, - validate_layout_exports as b, - validate_page_server_exports as c, - disable_search as d, - validate_page_exports as e, - resolve as f, - decode_pathname as g, - validate_server_exports as h, - make_trackable as m, - normalize_path as n, - readable as r, - validate_layout_server_exports as v, - writable as w -}; diff --git a/.svelte-kit/output/server/chunks/false.js b/.svelte-kit/output/server/chunks/false.js deleted file mode 100644 index 85bc56d..0000000 --- a/.svelte-kit/output/server/chunks/false.js +++ /dev/null @@ -1,4 +0,0 @@ -const BROWSER = false; -export { - BROWSER as B -}; diff --git a/.svelte-kit/output/server/chunks/internal.js b/.svelte-kit/output/server/chunks/internal.js deleted file mode 100644 index 1e560ad..0000000 --- a/.svelte-kit/output/server/chunks/internal.js +++ /dev/null @@ -1,134 +0,0 @@ -import { r as root } from "./root.js"; -import "./environment.js"; -let public_env = {}; -function set_private_env(environment) { -} -function set_public_env(environment) { - public_env = environment; -} -let read_implementation = null; -function set_read_implementation(fn) { - read_implementation = fn; -} -function set_manifest(_) { -} -const options = { - app_template_contains_nonce: false, - async: false, - csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } }, - csrf_check_origin: true, - csrf_trusted_origins: [], - embedded: false, - env_public_prefix: "PUBLIC_", - env_private_prefix: "", - hash_routing: false, - hooks: null, - // added lazily, via `get_hooks` - preload_strategy: "modulepreload", - root, - service_worker: false, - service_worker_options: void 0, - server_error_boundaries: false, - templates: { - app: ({ head, body, assets, nonce, env }) => '\n\n \n \n \n \n Tauri + SvelteKit + Typescript App\n ' + head + '\n \n \n
' + body + "
\n \n\n", - error: ({ status, message }) => '\n\n \n \n ' + message + ` - - - - -
- ` + status + '\n
\n

' + message + "

\n
\n
\n \n\n" - }, - version_hash: "1duwkc9" -}; -async function get_hooks() { - let handle; - let handleFetch; - let handleError; - let handleValidationError; - let init; - let reroute; - let transport; - return { - handle, - handleFetch, - handleError, - handleValidationError, - init, - reroute, - transport - }; -} -export { - set_public_env as a, - set_read_implementation as b, - set_manifest as c, - get_hooks as g, - options as o, - public_env as p, - read_implementation as r, - set_private_env as s -}; diff --git a/.svelte-kit/output/server/chunks/root.js b/.svelte-kit/output/server/chunks/root.js deleted file mode 100644 index c4c8fe8..0000000 --- a/.svelte-kit/output/server/chunks/root.js +++ /dev/null @@ -1,3779 +0,0 @@ -import { B as BROWSER } from "./false.js"; -import { r as run_all, d as deferred, i as includes, n as noop, o as object_prototype, a as array_prototype, g as get_descriptor, b as get_prototype_of, c as is_array, f as is_extensible, h as index_of, j as define_property, k as array_from, e as escape_html, l as has_own_property, t as to_style, m as clsx, p as to_class, q as attr } from "./attributes.js"; -import * as devalue from "devalue"; -function equals(value) { - return value === this.v; -} -function safe_not_equal(a, b) { - return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function"; -} -function safe_equals(value) { - return !safe_not_equal(value, this.v); -} -const DERIVED = 1 << 1; -const EFFECT = 1 << 2; -const RENDER_EFFECT = 1 << 3; -const MANAGED_EFFECT = 1 << 24; -const BLOCK_EFFECT = 1 << 4; -const BRANCH_EFFECT = 1 << 5; -const ROOT_EFFECT = 1 << 6; -const BOUNDARY_EFFECT = 1 << 7; -const CONNECTED = 1 << 9; -const CLEAN = 1 << 10; -const DIRTY = 1 << 11; -const MAYBE_DIRTY = 1 << 12; -const INERT = 1 << 13; -const DESTROYED = 1 << 14; -const REACTION_RAN = 1 << 15; -const DESTROYING = 1 << 25; -const EFFECT_TRANSPARENT = 1 << 16; -const EAGER_EFFECT = 1 << 17; -const HEAD_EFFECT = 1 << 18; -const EFFECT_PRESERVED = 1 << 19; -const USER_EFFECT = 1 << 20; -const WAS_MARKED = 1 << 16; -const REACTION_IS_UPDATING = 1 << 21; -const ASYNC = 1 << 22; -const ERROR_VALUE = 1 << 23; -const STATE_SYMBOL = Symbol("$state"); -const LEGACY_PROPS = Symbol("legacy props"); -const STALE_REACTION = new class StaleReactionError extends Error { - name = "StaleReactionError"; - message = "The reaction that called `getAbortSignal()` was re-run or destroyed"; -}(); -const COMMENT_NODE = 8; -function lifecycle_outside_component(name) { - { - throw new Error(`https://svelte.dev/e/lifecycle_outside_component`); - } -} -function effect_update_depth_exceeded() { - { - throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`); - } -} -function hydration_failed() { - { - throw new Error(`https://svelte.dev/e/hydration_failed`); - } -} -function state_descriptors_fixed() { - { - throw new Error(`https://svelte.dev/e/state_descriptors_fixed`); - } -} -function state_prototype_fixed() { - { - throw new Error(`https://svelte.dev/e/state_prototype_fixed`); - } -} -function state_unsafe_mutation() { - { - throw new Error(`https://svelte.dev/e/state_unsafe_mutation`); - } -} -function svelte_boundary_reset_onerror() { - { - throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`); - } -} -const HYDRATION_START = "["; -const HYDRATION_START_ELSE = "[!"; -const HYDRATION_START_FAILED = "[?"; -const HYDRATION_END = "]"; -const HYDRATION_ERROR = {}; -const ELEMENT_IS_NAMESPACED = 1; -const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1; -const ELEMENT_IS_INPUT = 1 << 2; -const UNINITIALIZED = Symbol(); -function hydration_mismatch(location) { - { - console.warn(`https://svelte.dev/e/hydration_mismatch`); - } -} -function svelte_boundary_reset_noop() { - { - console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`); - } -} -let hydrating = false; -function set_hydrating(value) { - hydrating = value; -} -let hydrate_node; -function set_hydrate_node(node) { - if (node === null) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - return hydrate_node = node; -} -function hydrate_next() { - return set_hydrate_node(/* @__PURE__ */ get_next_sibling(hydrate_node)); -} -function next(count = 1) { - if (hydrating) { - var i = count; - var node = hydrate_node; - while (i--) { - node = /** @type {TemplateNode} */ - /* @__PURE__ */ get_next_sibling(node); - } - hydrate_node = node; - } -} -function skip_nodes(remove = true) { - var depth = 0; - var node = hydrate_node; - while (true) { - if (node.nodeType === COMMENT_NODE) { - var data = ( - /** @type {Comment} */ - node.data - ); - if (data === HYDRATION_END) { - if (depth === 0) return node; - depth -= 1; - } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE || // "[1", "[2", etc. for if blocks - data[0] === "[" && !isNaN(Number(data.slice(1)))) { - depth += 1; - } - } - var next2 = ( - /** @type {TemplateNode} */ - /* @__PURE__ */ get_next_sibling(node) - ); - if (remove) node.remove(); - node = next2; - } -} -let tracing_mode_flag = false; -let component_context = null; -function set_component_context(context) { - component_context = context; -} -function push$1(props, runes = false, fn) { - component_context = { - p: component_context, - i: false, - c: null, - e: null, - s: props, - x: null, - r: ( - /** @type {Effect} */ - active_effect - ), - l: null - }; -} -function pop$1(component) { - var context = ( - /** @type {ComponentContext} */ - component_context - ); - var effects = context.e; - if (effects !== null) { - context.e = null; - for (var fn of effects) { - create_user_effect(fn); - } - } - context.i = true; - component_context = context.p; - return ( - /** @type {T} */ - {} - ); -} -function is_runes() { - return true; -} -let micro_tasks = []; -function run_micro_tasks() { - var tasks = micro_tasks; - micro_tasks = []; - run_all(tasks); -} -function queue_micro_task(fn) { - if (micro_tasks.length === 0 && !is_flushing_sync) { - var tasks = micro_tasks; - queueMicrotask(() => { - if (tasks === micro_tasks) run_micro_tasks(); - }); - } - micro_tasks.push(fn); -} -function flush_tasks() { - while (micro_tasks.length > 0) { - run_micro_tasks(); - } -} -function handle_error(error) { - var effect = active_effect; - if (effect === null) { - active_reaction.f |= ERROR_VALUE; - return error; - } - if ((effect.f & REACTION_RAN) === 0 && (effect.f & EFFECT) === 0) { - throw error; - } - invoke_error_boundary(error, effect); -} -function invoke_error_boundary(error, effect) { - while (effect !== null) { - if ((effect.f & BOUNDARY_EFFECT) !== 0) { - if ((effect.f & REACTION_RAN) === 0) { - throw error; - } - try { - effect.b.error(error); - return; - } catch (e) { - error = e; - } - } - effect = effect.parent; - } - throw error; -} -const STATUS_MASK = -7169; -function set_signal_status(signal, status) { - signal.f = signal.f & STATUS_MASK | status; -} -function update_derived_status(derived2) { - if ((derived2.f & CONNECTED) !== 0 || derived2.deps === null) { - set_signal_status(derived2, CLEAN); - } else { - set_signal_status(derived2, MAYBE_DIRTY); - } -} -function clear_marked(deps) { - if (deps === null) return; - for (const dep of deps) { - if ((dep.f & DERIVED) === 0 || (dep.f & WAS_MARKED) === 0) { - continue; - } - dep.f ^= WAS_MARKED; - clear_marked( - /** @type {Derived} */ - dep.deps - ); - } -} -function defer_effect(effect, dirty_effects, maybe_dirty_effects) { - if ((effect.f & DIRTY) !== 0) { - dirty_effects.add(effect); - } else if ((effect.f & MAYBE_DIRTY) !== 0) { - maybe_dirty_effects.add(effect); - } - clear_marked(effect.deps); - set_signal_status(effect, CLEAN); -} -const batches = /* @__PURE__ */ new Set(); -let current_batch = null; -let batch_values = null; -let last_scheduled_effect = null; -let is_flushing_sync = false; -let is_processing = false; -let collected_effects = null; -let legacy_updates = null; -var flush_count = 0; -let uid = 1; -class Batch { - id = uid++; - /** - * The current values of any signals that are updated in this batch. - * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment) - * They keys of this map are identical to `this.#previous` - * @type {Map} - */ - current = /* @__PURE__ */ new Map(); - /** - * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place. - * They keys of this map are identical to `this.#current` - * @type {Map} - */ - previous = /* @__PURE__ */ new Map(); - /** - * When the batch is committed (and the DOM is updated), we need to remove old branches - * and append new ones by calling the functions added inside (if/each/key/etc) blocks - * @type {Set<(batch: Batch) => void>} - */ - #commit_callbacks = /* @__PURE__ */ new Set(); - /** - * If a fork is discarded, we need to destroy any effects that are no longer needed - * @type {Set<(batch: Batch) => void>} - */ - #discard_callbacks = /* @__PURE__ */ new Set(); - /** - * Async effects that are currently in flight - * @type {Map} - */ - #pending = /* @__PURE__ */ new Map(); - /** - * Async effects that are currently in flight, _not_ inside a pending boundary - * @type {Map} - */ - #blocking_pending = /* @__PURE__ */ new Map(); - /** - * A deferred that resolves when the batch is committed, used with `settled()` - * TODO replace with Promise.withResolvers once supported widely enough - * @type {{ promise: Promise, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null} - */ - #deferred = null; - /** - * The root effects that need to be flushed - * @type {Effect[]} - */ - #roots = []; - /** - * Deferred effects (which run after async work has completed) that are DIRTY - * @type {Set} - */ - #dirty_effects = /* @__PURE__ */ new Set(); - /** - * Deferred effects that are MAYBE_DIRTY - * @type {Set} - */ - #maybe_dirty_effects = /* @__PURE__ */ new Set(); - /** - * A map of branches that still exist, but will be destroyed when this batch - * is committed — we skip over these during `process`. - * The value contains child effects that were dirty/maybe_dirty before being reset, - * so they can be rescheduled if the branch survives. - * @type {Map} - */ - #skipped_branches = /* @__PURE__ */ new Map(); - is_fork = false; - #decrement_queued = false; - /** @type {Set} */ - #blockers = /* @__PURE__ */ new Set(); - #is_deferred() { - return this.is_fork || this.#blocking_pending.size > 0; - } - #is_blocked() { - for (const batch of this.#blockers) { - for (const effect of batch.#blocking_pending.keys()) { - var skipped = false; - var e = effect; - while (e.parent !== null) { - if (this.#skipped_branches.has(e)) { - skipped = true; - break; - } - e = e.parent; - } - if (!skipped) { - return true; - } - } - } - return false; - } - /** - * Add an effect to the #skipped_branches map and reset its children - * @param {Effect} effect - */ - skip_effect(effect) { - if (!this.#skipped_branches.has(effect)) { - this.#skipped_branches.set(effect, { d: [], m: [] }); - } - } - /** - * Remove an effect from the #skipped_branches map and reschedule - * any tracked dirty/maybe_dirty child effects - * @param {Effect} effect - */ - unskip_effect(effect) { - var tracked = this.#skipped_branches.get(effect); - if (tracked) { - this.#skipped_branches.delete(effect); - for (var e of tracked.d) { - set_signal_status(e, DIRTY); - this.schedule(e); - } - for (e of tracked.m) { - set_signal_status(e, MAYBE_DIRTY); - this.schedule(e); - } - } - } - #process() { - if (flush_count++ > 1e3) { - batches.delete(this); - infinite_loop_guard(); - } - if (!this.#is_deferred()) { - for (const e of this.#dirty_effects) { - this.#maybe_dirty_effects.delete(e); - set_signal_status(e, DIRTY); - this.schedule(e); - } - for (const e of this.#maybe_dirty_effects) { - set_signal_status(e, MAYBE_DIRTY); - this.schedule(e); - } - } - const roots = this.#roots; - this.#roots = []; - this.apply(); - var effects = collected_effects = []; - var render_effects = []; - var updates = legacy_updates = []; - for (const root2 of roots) { - try { - this.#traverse(root2, effects, render_effects); - } catch (e) { - reset_all(root2); - throw e; - } - } - current_batch = null; - if (updates.length > 0) { - var batch = Batch.ensure(); - for (const e of updates) { - batch.schedule(e); - } - } - collected_effects = null; - legacy_updates = null; - if (this.#is_deferred() || this.#is_blocked()) { - this.#defer_effects(render_effects); - this.#defer_effects(effects); - for (const [e, t] of this.#skipped_branches) { - reset_branch(e, t); - } - } else { - if (this.#pending.size === 0) { - batches.delete(this); - } - this.#dirty_effects.clear(); - this.#maybe_dirty_effects.clear(); - for (const fn of this.#commit_callbacks) fn(this); - this.#commit_callbacks.clear(); - flush_queued_effects(render_effects); - flush_queued_effects(effects); - this.#deferred?.resolve(); - } - var next_batch = ( - /** @type {Batch | null} */ - /** @type {unknown} */ - current_batch - ); - if (this.#roots.length > 0) { - const batch2 = next_batch ??= this; - batch2.#roots.push(...this.#roots.filter((r) => !batch2.#roots.includes(r))); - } - if (next_batch !== null) { - batches.add(next_batch); - next_batch.#process(); - } - if (!batches.has(this)) { - this.#commit(); - } - } - /** - * Traverse the effect tree, executing effects or stashing - * them for later execution as appropriate - * @param {Effect} root - * @param {Effect[]} effects - * @param {Effect[]} render_effects - */ - #traverse(root2, effects, render_effects) { - root2.f ^= CLEAN; - var effect = root2.first; - while (effect !== null) { - var flags2 = effect.f; - var is_branch = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0; - var is_skippable_branch = is_branch && (flags2 & CLEAN) !== 0; - var skip = is_skippable_branch || (flags2 & INERT) !== 0 || this.#skipped_branches.has(effect); - if (!skip && effect.fn !== null) { - if (is_branch) { - effect.f ^= CLEAN; - } else if ((flags2 & EFFECT) !== 0) { - effects.push(effect); - } else if (is_dirty(effect)) { - if ((flags2 & BLOCK_EFFECT) !== 0) this.#maybe_dirty_effects.add(effect); - update_effect(effect); - } - var child = effect.first; - if (child !== null) { - effect = child; - continue; - } - } - while (effect !== null) { - var next2 = effect.next; - if (next2 !== null) { - effect = next2; - break; - } - effect = effect.parent; - } - } - } - /** - * @param {Effect[]} effects - */ - #defer_effects(effects) { - for (var i = 0; i < effects.length; i += 1) { - defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects); - } - } - /** - * Associate a change to a given source with the current - * batch, noting its previous and current values - * @param {Value} source - * @param {any} old_value - * @param {boolean} [is_derived] - */ - capture(source2, old_value, is_derived = false) { - if (old_value !== UNINITIALIZED && !this.previous.has(source2)) { - this.previous.set(source2, old_value); - } - if ((source2.f & ERROR_VALUE) === 0) { - this.current.set(source2, [source2.v, is_derived]); - batch_values?.set(source2, source2.v); - } - } - activate() { - current_batch = this; - } - deactivate() { - current_batch = null; - batch_values = null; - } - flush() { - try { - is_processing = true; - current_batch = this; - this.#process(); - } finally { - flush_count = 0; - last_scheduled_effect = null; - collected_effects = null; - legacy_updates = null; - is_processing = false; - current_batch = null; - batch_values = null; - old_values.clear(); - } - } - discard() { - for (const fn of this.#discard_callbacks) fn(this); - this.#discard_callbacks.clear(); - batches.delete(this); - } - #commit() { - for (const batch of batches) { - var is_earlier = batch.id < this.id; - var sources = []; - for (const [source3, [value, is_derived]] of this.current) { - if (batch.current.has(source3)) { - var batch_value = ( - /** @type {[any, boolean]} */ - batch.current.get(source3)[0] - ); - if (is_earlier && value !== batch_value) { - batch.current.set(source3, [value, is_derived]); - } else { - continue; - } - } - sources.push(source3); - } - var others = [...batch.current.keys()].filter((s) => !this.current.has(s)); - if (others.length === 0) { - if (is_earlier) { - batch.discard(); - } - } else if (sources.length > 0) { - batch.activate(); - var marked = /* @__PURE__ */ new Set(); - var checked = /* @__PURE__ */ new Map(); - for (var source2 of sources) { - mark_effects(source2, others, marked, checked); - } - if (batch.#roots.length > 0) { - batch.apply(); - for (var root2 of batch.#roots) { - batch.#traverse(root2, [], []); - } - batch.#roots = []; - } - batch.deactivate(); - } - } - for (const batch of batches) { - if (batch.#blockers.has(this)) { - batch.#blockers.delete(this); - if (batch.#blockers.size === 0 && !batch.#is_deferred()) { - batch.activate(); - batch.#process(); - } - } - } - } - /** - * @param {boolean} blocking - * @param {Effect} effect - */ - increment(blocking, effect) { - let pending_count = this.#pending.get(effect) ?? 0; - this.#pending.set(effect, pending_count + 1); - if (blocking) { - let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0; - this.#blocking_pending.set(effect, blocking_pending_count + 1); - } - } - /** - * @param {boolean} blocking - * @param {Effect} effect - * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction) - */ - decrement(blocking, effect, skip) { - let pending_count = this.#pending.get(effect) ?? 0; - if (pending_count === 1) { - this.#pending.delete(effect); - } else { - this.#pending.set(effect, pending_count - 1); - } - if (blocking) { - let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0; - if (blocking_pending_count === 1) { - this.#blocking_pending.delete(effect); - } else { - this.#blocking_pending.set(effect, blocking_pending_count - 1); - } - } - if (this.#decrement_queued || skip) return; - this.#decrement_queued = true; - queue_micro_task(() => { - this.#decrement_queued = false; - this.flush(); - }); - } - /** - * @param {Set} dirty_effects - * @param {Set} maybe_dirty_effects - */ - transfer_effects(dirty_effects, maybe_dirty_effects) { - for (const e of dirty_effects) { - this.#dirty_effects.add(e); - } - for (const e of maybe_dirty_effects) { - this.#maybe_dirty_effects.add(e); - } - dirty_effects.clear(); - maybe_dirty_effects.clear(); - } - /** @param {(batch: Batch) => void} fn */ - oncommit(fn) { - this.#commit_callbacks.add(fn); - } - /** @param {(batch: Batch) => void} fn */ - ondiscard(fn) { - this.#discard_callbacks.add(fn); - } - settled() { - return (this.#deferred ??= deferred()).promise; - } - static ensure() { - if (current_batch === null) { - const batch = current_batch = new Batch(); - if (!is_processing) { - batches.add(current_batch); - if (!is_flushing_sync) { - queue_micro_task(() => { - if (current_batch !== batch) { - return; - } - batch.flush(); - }); - } - } - } - return current_batch; - } - apply() { - { - batch_values = null; - return; - } - } - /** - * - * @param {Effect} effect - */ - schedule(effect) { - last_scheduled_effect = effect; - if (effect.b?.is_pending && (effect.f & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0 && (effect.f & REACTION_RAN) === 0) { - effect.b.defer_effect(effect); - return; - } - var e = effect; - while (e.parent !== null) { - e = e.parent; - var flags2 = e.f; - if (collected_effects !== null && e === active_effect) { - if ((active_reaction === null || (active_reaction.f & DERIVED) === 0) && true) { - return; - } - } - if ((flags2 & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) { - if ((flags2 & CLEAN) === 0) { - return; - } - e.f ^= CLEAN; - } - } - this.#roots.push(e); - } -} -function flushSync(fn) { - var was_flushing_sync = is_flushing_sync; - is_flushing_sync = true; - try { - var result; - if (fn) ; - while (true) { - flush_tasks(); - if (current_batch === null) { - return ( - /** @type {T} */ - result - ); - } - current_batch.flush(); - } - } finally { - is_flushing_sync = was_flushing_sync; - } -} -function infinite_loop_guard() { - try { - effect_update_depth_exceeded(); - } catch (error) { - invoke_error_boundary(error, last_scheduled_effect); - } -} -let eager_block_effects = null; -function flush_queued_effects(effects) { - var length = effects.length; - if (length === 0) return; - var i = 0; - while (i < length) { - var effect = effects[i++]; - if ((effect.f & (DESTROYED | INERT)) === 0 && is_dirty(effect)) { - eager_block_effects = /* @__PURE__ */ new Set(); - update_effect(effect); - if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) { - unlink_effect(effect); - } - if (eager_block_effects?.size > 0) { - old_values.clear(); - for (const e of eager_block_effects) { - if ((e.f & (DESTROYED | INERT)) !== 0) continue; - const ordered_effects = [e]; - let ancestor = e.parent; - while (ancestor !== null) { - if (eager_block_effects.has(ancestor)) { - eager_block_effects.delete(ancestor); - ordered_effects.push(ancestor); - } - ancestor = ancestor.parent; - } - for (let j = ordered_effects.length - 1; j >= 0; j--) { - const e2 = ordered_effects[j]; - if ((e2.f & (DESTROYED | INERT)) !== 0) continue; - update_effect(e2); - } - } - eager_block_effects.clear(); - } - } - } - eager_block_effects = null; -} -function mark_effects(value, sources, marked, checked) { - if (marked.has(value)) return; - marked.add(value); - if (value.reactions !== null) { - for (const reaction of value.reactions) { - const flags2 = reaction.f; - if ((flags2 & DERIVED) !== 0) { - mark_effects( - /** @type {Derived} */ - reaction, - sources, - marked, - checked - ); - } else if ((flags2 & (ASYNC | BLOCK_EFFECT)) !== 0 && (flags2 & DIRTY) === 0 && depends_on(reaction, sources, checked)) { - set_signal_status(reaction, DIRTY); - schedule_effect( - /** @type {Effect} */ - reaction - ); - } - } - } -} -function depends_on(reaction, sources, checked) { - const depends = checked.get(reaction); - if (depends !== void 0) return depends; - if (reaction.deps !== null) { - for (const dep of reaction.deps) { - if (includes.call(sources, dep)) { - return true; - } - if ((dep.f & DERIVED) !== 0 && depends_on( - /** @type {Derived} */ - dep, - sources, - checked - )) { - checked.set( - /** @type {Derived} */ - dep, - true - ); - return true; - } - } - } - checked.set(reaction, false); - return false; -} -function schedule_effect(effect) { - current_batch.schedule(effect); -} -function reset_branch(effect, tracked) { - if ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) { - return; - } - if ((effect.f & DIRTY) !== 0) { - tracked.d.push(effect); - } else if ((effect.f & MAYBE_DIRTY) !== 0) { - tracked.m.push(effect); - } - set_signal_status(effect, CLEAN); - var e = effect.first; - while (e !== null) { - reset_branch(e, tracked); - e = e.next; - } -} -function reset_all(effect) { - set_signal_status(effect, CLEAN); - var e = effect.first; - while (e !== null) { - reset_all(e); - e = e.next; - } -} -function createSubscriber(start) { - let subscribers = 0; - let version = source(0); - let stop; - return () => { - if (effect_tracking()) { - get(version); - render_effect(() => { - if (subscribers === 0) { - stop = untrack(() => start(() => increment(version))); - } - subscribers += 1; - return () => { - queue_micro_task(() => { - subscribers -= 1; - if (subscribers === 0) { - stop?.(); - stop = void 0; - increment(version); - } - }); - }; - }); - } - }; -} -var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED; -function boundary(node, props, children, transform_error) { - new Boundary(node, props, children, transform_error); -} -class Boundary { - /** @type {Boundary | null} */ - parent; - is_pending = false; - /** - * API-level transformError transform function. Transforms errors before they reach the `failed` snippet. - * Inherited from parent boundary, or defaults to identity. - * @type {(error: unknown) => unknown} - */ - transform_error; - /** @type {TemplateNode} */ - #anchor; - /** @type {TemplateNode | null} */ - #hydrate_open = hydrating ? hydrate_node : null; - /** @type {BoundaryProps} */ - #props; - /** @type {((anchor: Node) => void)} */ - #children; - /** @type {Effect} */ - #effect; - /** @type {Effect | null} */ - #main_effect = null; - /** @type {Effect | null} */ - #pending_effect = null; - /** @type {Effect | null} */ - #failed_effect = null; - /** @type {DocumentFragment | null} */ - #offscreen_fragment = null; - #local_pending_count = 0; - #pending_count = 0; - #pending_count_update_queued = false; - /** @type {Set} */ - #dirty_effects = /* @__PURE__ */ new Set(); - /** @type {Set} */ - #maybe_dirty_effects = /* @__PURE__ */ new Set(); - /** - * A source containing the number of pending async deriveds/expressions. - * Only created if `$effect.pending()` is used inside the boundary, - * otherwise updating the source results in needless `Batch.ensure()` - * calls followed by no-op flushes - * @type {Source | null} - */ - #effect_pending = null; - #effect_pending_subscriber = createSubscriber(() => { - this.#effect_pending = source(this.#local_pending_count); - return () => { - this.#effect_pending = null; - }; - }); - /** - * @param {TemplateNode} node - * @param {BoundaryProps} props - * @param {((anchor: Node) => void)} children - * @param {((error: unknown) => unknown) | undefined} [transform_error] - */ - constructor(node, props, children, transform_error) { - this.#anchor = node; - this.#props = props; - this.#children = (anchor) => { - var effect = ( - /** @type {Effect} */ - active_effect - ); - effect.b = this; - effect.f |= BOUNDARY_EFFECT; - children(anchor); - }; - this.parent = /** @type {Effect} */ - active_effect.b; - this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e); - this.#effect = block(() => { - if (hydrating) { - const comment = ( - /** @type {Comment} */ - this.#hydrate_open - ); - hydrate_next(); - const server_rendered_pending = comment.data === HYDRATION_START_ELSE; - const server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED); - if (server_rendered_failed) { - const serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length)); - this.#hydrate_failed_content(serialized_error); - } else if (server_rendered_pending) { - this.#hydrate_pending_content(); - } else { - this.#hydrate_resolved_content(); - } - } else { - this.#render(); - } - }, flags); - if (hydrating) { - this.#anchor = hydrate_node; - } - } - #hydrate_resolved_content() { - try { - this.#main_effect = branch(() => this.#children(this.#anchor)); - } catch (error) { - this.error(error); - } - } - /** - * @param {unknown} error The deserialized error from the server's hydration comment - */ - #hydrate_failed_content(error) { - const failed = this.#props.failed; - if (!failed) return; - this.#failed_effect = branch(() => { - failed( - this.#anchor, - () => error, - () => () => { - } - ); - }); - } - #hydrate_pending_content() { - const pending = this.#props.pending; - if (!pending) return; - this.is_pending = true; - this.#pending_effect = branch(() => pending(this.#anchor)); - queue_micro_task(() => { - var fragment = this.#offscreen_fragment = document.createDocumentFragment(); - var anchor = create_text(); - fragment.append(anchor); - this.#main_effect = this.#run(() => { - return branch(() => this.#children(anchor)); - }); - if (this.#pending_count === 0) { - this.#anchor.before(fragment); - this.#offscreen_fragment = null; - pause_effect( - /** @type {Effect} */ - this.#pending_effect, - () => { - this.#pending_effect = null; - } - ); - this.#resolve( - /** @type {Batch} */ - current_batch - ); - } - }); - } - #render() { - try { - this.is_pending = this.has_pending_snippet(); - this.#pending_count = 0; - this.#local_pending_count = 0; - this.#main_effect = branch(() => { - this.#children(this.#anchor); - }); - if (this.#pending_count > 0) { - var fragment = this.#offscreen_fragment = document.createDocumentFragment(); - move_effect(this.#main_effect, fragment); - const pending = ( - /** @type {(anchor: Node) => void} */ - this.#props.pending - ); - this.#pending_effect = branch(() => pending(this.#anchor)); - } else { - this.#resolve( - /** @type {Batch} */ - current_batch - ); - } - } catch (error) { - this.error(error); - } - } - /** - * @param {Batch} batch - */ - #resolve(batch) { - this.is_pending = false; - batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects); - } - /** - * Defer an effect inside a pending boundary until the boundary resolves - * @param {Effect} effect - */ - defer_effect(effect) { - defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects); - } - /** - * Returns `false` if the effect exists inside a boundary whose pending snippet is shown - * @returns {boolean} - */ - is_rendered() { - return !this.is_pending && (!this.parent || this.parent.is_rendered()); - } - has_pending_snippet() { - return !!this.#props.pending; - } - /** - * @template T - * @param {() => T} fn - */ - #run(fn) { - var previous_effect = active_effect; - var previous_reaction = active_reaction; - var previous_ctx = component_context; - set_active_effect(this.#effect); - set_active_reaction(this.#effect); - set_component_context(this.#effect.ctx); - try { - Batch.ensure(); - return fn(); - } catch (e) { - handle_error(e); - return null; - } finally { - set_active_effect(previous_effect); - set_active_reaction(previous_reaction); - set_component_context(previous_ctx); - } - } - /** - * Updates the pending count associated with the currently visible pending snippet, - * if any, such that we can replace the snippet with content once work is done - * @param {1 | -1} d - * @param {Batch} batch - */ - #update_pending_count(d, batch) { - if (!this.has_pending_snippet()) { - if (this.parent) { - this.parent.#update_pending_count(d, batch); - } - return; - } - this.#pending_count += d; - if (this.#pending_count === 0) { - this.#resolve(batch); - if (this.#pending_effect) { - pause_effect(this.#pending_effect, () => { - this.#pending_effect = null; - }); - } - if (this.#offscreen_fragment) { - this.#anchor.before(this.#offscreen_fragment); - this.#offscreen_fragment = null; - } - } - } - /** - * Update the source that powers `$effect.pending()` inside this boundary, - * and controls when the current `pending` snippet (if any) is removed. - * Do not call from inside the class - * @param {1 | -1} d - * @param {Batch} batch - */ - update_pending_count(d, batch) { - this.#update_pending_count(d, batch); - this.#local_pending_count += d; - if (!this.#effect_pending || this.#pending_count_update_queued) return; - this.#pending_count_update_queued = true; - queue_micro_task(() => { - this.#pending_count_update_queued = false; - if (this.#effect_pending) { - internal_set(this.#effect_pending, this.#local_pending_count); - } - }); - } - get_effect_pending() { - this.#effect_pending_subscriber(); - return get( - /** @type {Source} */ - this.#effect_pending - ); - } - /** @param {unknown} error */ - error(error) { - var onerror = this.#props.onerror; - let failed = this.#props.failed; - if (!onerror && !failed) { - throw error; - } - if (this.#main_effect) { - destroy_effect(this.#main_effect); - this.#main_effect = null; - } - if (this.#pending_effect) { - destroy_effect(this.#pending_effect); - this.#pending_effect = null; - } - if (this.#failed_effect) { - destroy_effect(this.#failed_effect); - this.#failed_effect = null; - } - if (hydrating) { - set_hydrate_node( - /** @type {TemplateNode} */ - this.#hydrate_open - ); - next(); - set_hydrate_node(skip_nodes()); - } - var did_reset = false; - var calling_on_error = false; - const reset = () => { - if (did_reset) { - svelte_boundary_reset_noop(); - return; - } - did_reset = true; - if (calling_on_error) { - svelte_boundary_reset_onerror(); - } - if (this.#failed_effect !== null) { - pause_effect(this.#failed_effect, () => { - this.#failed_effect = null; - }); - } - this.#run(() => { - this.#render(); - }); - }; - const handle_error_result = (transformed_error) => { - try { - calling_on_error = true; - onerror?.(transformed_error, reset); - calling_on_error = false; - } catch (error2) { - invoke_error_boundary(error2, this.#effect && this.#effect.parent); - } - if (failed) { - this.#failed_effect = this.#run(() => { - try { - return branch(() => { - var effect = ( - /** @type {Effect} */ - active_effect - ); - effect.b = this; - effect.f |= BOUNDARY_EFFECT; - failed( - this.#anchor, - () => transformed_error, - () => reset - ); - }); - } catch (error2) { - invoke_error_boundary( - error2, - /** @type {Effect} */ - this.#effect.parent - ); - return null; - } - }); - } - }; - queue_micro_task(() => { - var result; - try { - result = this.transform_error(error); - } catch (e) { - invoke_error_boundary(e, this.#effect && this.#effect.parent); - return; - } - if (result !== null && typeof result === "object" && typeof /** @type {any} */ - result.then === "function") { - result.then( - handle_error_result, - /** @param {unknown} e */ - (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent) - ); - } else { - handle_error_result(result); - } - }); - } -} -function destroy_derived_effects(derived2) { - var effects = derived2.effects; - if (effects !== null) { - derived2.effects = null; - for (var i = 0; i < effects.length; i += 1) { - destroy_effect( - /** @type {Effect} */ - effects[i] - ); - } - } -} -function get_derived_parent_effect(derived2) { - var parent = derived2.parent; - while (parent !== null) { - if ((parent.f & DERIVED) === 0) { - return (parent.f & DESTROYED) === 0 ? ( - /** @type {Effect} */ - parent - ) : null; - } - parent = parent.parent; - } - return null; -} -function execute_derived(derived2) { - var value; - var prev_active_effect = active_effect; - set_active_effect(get_derived_parent_effect(derived2)); - { - try { - derived2.f &= ~WAS_MARKED; - destroy_derived_effects(derived2); - value = update_reaction(derived2); - } finally { - set_active_effect(prev_active_effect); - } - } - return value; -} -function update_derived(derived2) { - var old_value = derived2.v; - var value = execute_derived(derived2); - if (!derived2.equals(value)) { - derived2.wv = increment_write_version(); - if (!current_batch?.is_fork || derived2.deps === null) { - derived2.v = value; - current_batch?.capture(derived2, old_value, true); - if (derived2.deps === null) { - set_signal_status(derived2, CLEAN); - return; - } - } - } - if (is_destroying_effect) { - return; - } - if (batch_values !== null) { - if (effect_tracking() || current_batch?.is_fork) { - batch_values.set(derived2, value); - } - } else { - update_derived_status(derived2); - } -} -function freeze_derived_effects(derived2) { - if (derived2.effects === null) return; - for (const e of derived2.effects) { - if (e.teardown || e.ac) { - e.teardown?.(); - e.ac?.abort(STALE_REACTION); - e.teardown = noop; - e.ac = null; - remove_reactions(e, 0); - destroy_effect_children(e); - } - } -} -function unfreeze_derived_effects(derived2) { - if (derived2.effects === null) return; - for (const e of derived2.effects) { - if (e.teardown) { - update_effect(e); - } - } -} -let eager_effects = /* @__PURE__ */ new Set(); -const old_values = /* @__PURE__ */ new Map(); -let eager_effects_deferred = false; -function source(v, stack) { - var signal = { - f: 0, - // TODO ideally we could skip this altogether, but it causes type errors - v, - reactions: null, - equals, - rv: 0, - wv: 0 - }; - return signal; -} -// @__NO_SIDE_EFFECTS__ -function state(v, stack) { - const s = source(v); - push_reaction_value(s); - return s; -} -// @__NO_SIDE_EFFECTS__ -function mutable_source(initial_value, immutable = false, trackable = true) { - const s = source(initial_value); - if (!immutable) { - s.equals = safe_equals; - } - return s; -} -function set(source2, value, should_proxy = false) { - if (active_reaction !== null && // since we are untracking the function inside `$inspect.with` we need to add this check - // to ensure we error if state is set inside an inspect effect - (!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 && (current_sources === null || !includes.call(current_sources, source2))) { - state_unsafe_mutation(); - } - let new_value = should_proxy ? proxy(value) : value; - return internal_set(source2, new_value, legacy_updates); -} -function internal_set(source2, value, updated_during_traversal = null) { - if (!source2.equals(value)) { - var old_value = source2.v; - if (is_destroying_effect) { - old_values.set(source2, value); - } else { - old_values.set(source2, old_value); - } - source2.v = value; - var batch = Batch.ensure(); - batch.capture(source2, old_value); - if ((source2.f & DERIVED) !== 0) { - const derived2 = ( - /** @type {Derived} */ - source2 - ); - if ((source2.f & DIRTY) !== 0) { - execute_derived(derived2); - } - if (batch_values === null) { - update_derived_status(derived2); - } - } - source2.wv = increment_write_version(); - mark_reactions(source2, DIRTY, updated_during_traversal); - if (active_effect !== null && (active_effect.f & CLEAN) !== 0 && (active_effect.f & (BRANCH_EFFECT | ROOT_EFFECT)) === 0) { - if (untracked_writes === null) { - set_untracked_writes([source2]); - } else { - untracked_writes.push(source2); - } - } - if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) { - flush_eager_effects(); - } - } - return value; -} -function flush_eager_effects() { - eager_effects_deferred = false; - for (const effect of eager_effects) { - if ((effect.f & CLEAN) !== 0) { - set_signal_status(effect, MAYBE_DIRTY); - } - if (is_dirty(effect)) { - update_effect(effect); - } - } - eager_effects.clear(); -} -function increment(source2) { - set(source2, source2.v + 1); -} -function mark_reactions(signal, status, updated_during_traversal) { - var reactions = signal.reactions; - if (reactions === null) return; - var length = reactions.length; - for (var i = 0; i < length; i++) { - var reaction = reactions[i]; - var flags2 = reaction.f; - var not_dirty = (flags2 & DIRTY) === 0; - if (not_dirty) { - set_signal_status(reaction, status); - } - if ((flags2 & DERIVED) !== 0) { - var derived2 = ( - /** @type {Derived} */ - reaction - ); - batch_values?.delete(derived2); - if ((flags2 & WAS_MARKED) === 0) { - if (flags2 & CONNECTED) { - reaction.f |= WAS_MARKED; - } - mark_reactions(derived2, MAYBE_DIRTY, updated_during_traversal); - } - } else if (not_dirty) { - var effect = ( - /** @type {Effect} */ - reaction - ); - if ((flags2 & BLOCK_EFFECT) !== 0 && eager_block_effects !== null) { - eager_block_effects.add(effect); - } - if (updated_during_traversal !== null) { - updated_during_traversal.push(effect); - } else { - schedule_effect(effect); - } - } - } -} -function proxy(value) { - if (typeof value !== "object" || value === null || STATE_SYMBOL in value) { - return value; - } - const prototype = get_prototype_of(value); - if (prototype !== object_prototype && prototype !== array_prototype) { - return value; - } - var sources = /* @__PURE__ */ new Map(); - var is_proxied_array = is_array(value); - var version = /* @__PURE__ */ state(0); - var parent_version = update_version; - var with_parent = (fn) => { - if (update_version === parent_version) { - return fn(); - } - var reaction = active_reaction; - var version2 = update_version; - set_active_reaction(null); - set_update_version(parent_version); - var result = fn(); - set_active_reaction(reaction); - set_update_version(version2); - return result; - }; - if (is_proxied_array) { - sources.set("length", /* @__PURE__ */ state( - /** @type {any[]} */ - value.length - )); - } - return new Proxy( - /** @type {any} */ - value, - { - defineProperty(_, prop, descriptor) { - if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) { - state_descriptors_fixed(); - } - var s = sources.get(prop); - if (s === void 0) { - with_parent(() => { - var s2 = /* @__PURE__ */ state(descriptor.value); - sources.set(prop, s2); - return s2; - }); - } else { - set(s, descriptor.value, true); - } - return true; - }, - deleteProperty(target, prop) { - var s = sources.get(prop); - if (s === void 0) { - if (prop in target) { - const s2 = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED)); - sources.set(prop, s2); - increment(version); - } - } else { - set(s, UNINITIALIZED); - increment(version); - } - return true; - }, - get(target, prop, receiver) { - if (prop === STATE_SYMBOL) { - return value; - } - var s = sources.get(prop); - var exists = prop in target; - if (s === void 0 && (!exists || get_descriptor(target, prop)?.writable)) { - s = with_parent(() => { - var p = proxy(exists ? target[prop] : UNINITIALIZED); - var s2 = /* @__PURE__ */ state(p); - return s2; - }); - sources.set(prop, s); - } - if (s !== void 0) { - var v = get(s); - return v === UNINITIALIZED ? void 0 : v; - } - return Reflect.get(target, prop, receiver); - }, - getOwnPropertyDescriptor(target, prop) { - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop); - if (descriptor && "value" in descriptor) { - var s = sources.get(prop); - if (s) descriptor.value = get(s); - } else if (descriptor === void 0) { - var source2 = sources.get(prop); - var value2 = source2?.v; - if (source2 !== void 0 && value2 !== UNINITIALIZED) { - return { - enumerable: true, - configurable: true, - value: value2, - writable: true - }; - } - } - return descriptor; - }, - has(target, prop) { - if (prop === STATE_SYMBOL) { - return true; - } - var s = sources.get(prop); - var has = s !== void 0 && s.v !== UNINITIALIZED || Reflect.has(target, prop); - if (s !== void 0 || active_effect !== null && (!has || get_descriptor(target, prop)?.writable)) { - if (s === void 0) { - s = with_parent(() => { - var p = has ? proxy(target[prop]) : UNINITIALIZED; - var s2 = /* @__PURE__ */ state(p); - return s2; - }); - sources.set(prop, s); - } - var value2 = get(s); - if (value2 === UNINITIALIZED) { - return false; - } - } - return has; - }, - set(target, prop, value2, receiver) { - var s = sources.get(prop); - var has = prop in target; - if (is_proxied_array && prop === "length") { - for (var i = value2; i < /** @type {Source} */ - s.v; i += 1) { - var other_s = sources.get(i + ""); - if (other_s !== void 0) { - set(other_s, UNINITIALIZED); - } else if (i in target) { - other_s = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED)); - sources.set(i + "", other_s); - } - } - } - if (s === void 0) { - if (!has || get_descriptor(target, prop)?.writable) { - s = with_parent(() => /* @__PURE__ */ state(void 0)); - set(s, proxy(value2)); - sources.set(prop, s); - } - } else { - has = s.v !== UNINITIALIZED; - var p = with_parent(() => proxy(value2)); - set(s, p); - } - var descriptor = Reflect.getOwnPropertyDescriptor(target, prop); - if (descriptor?.set) { - descriptor.set.call(receiver, value2); - } - if (!has) { - if (is_proxied_array && typeof prop === "string") { - var ls = ( - /** @type {Source} */ - sources.get("length") - ); - var n = Number(prop); - if (Number.isInteger(n) && n >= ls.v) { - set(ls, n + 1); - } - } - increment(version); - } - return true; - }, - ownKeys(target) { - get(version); - var own_keys = Reflect.ownKeys(target).filter((key2) => { - var source3 = sources.get(key2); - return source3 === void 0 || source3.v !== UNINITIALIZED; - }); - for (var [key, source2] of sources) { - if (source2.v !== UNINITIALIZED && !(key in target)) { - own_keys.push(key); - } - } - return own_keys; - }, - setPrototypeOf() { - state_prototype_fixed(); - } - } - ); -} -var $window; -var first_child_getter; -var next_sibling_getter; -function init_operations() { - if ($window !== void 0) { - return; - } - $window = window; - var element_prototype = Element.prototype; - var node_prototype = Node.prototype; - var text_prototype = Text.prototype; - first_child_getter = get_descriptor(node_prototype, "firstChild").get; - next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get; - if (is_extensible(element_prototype)) { - element_prototype.__click = void 0; - element_prototype.__className = void 0; - element_prototype.__attributes = null; - element_prototype.__style = void 0; - element_prototype.__e = void 0; - } - if (is_extensible(text_prototype)) { - text_prototype.__t = void 0; - } -} -function create_text(value = "") { - return document.createTextNode(value); -} -// @__NO_SIDE_EFFECTS__ -function get_first_child(node) { - return ( - /** @type {TemplateNode | null} */ - first_child_getter.call(node) - ); -} -// @__NO_SIDE_EFFECTS__ -function get_next_sibling(node) { - return ( - /** @type {TemplateNode | null} */ - next_sibling_getter.call(node) - ); -} -function clear_text_content(node) { - node.textContent = ""; -} -function without_reactive_context(fn) { - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - return fn(); - } finally { - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } -} -function push_effect(effect, parent_effect) { - var parent_last = parent_effect.last; - if (parent_last === null) { - parent_effect.last = parent_effect.first = effect; - } else { - parent_last.next = effect; - effect.prev = parent_last; - parent_effect.last = effect; - } -} -function create_effect(type, fn) { - var parent = active_effect; - if (parent !== null && (parent.f & INERT) !== 0) { - type |= INERT; - } - var effect = { - ctx: component_context, - deps: null, - nodes: null, - f: type | DIRTY | CONNECTED, - first: null, - fn, - last: null, - next: null, - parent, - b: parent && parent.b, - prev: null, - teardown: null, - wv: 0, - ac: null - }; - var e = effect; - if ((type & EFFECT) !== 0) { - if (collected_effects !== null) { - collected_effects.push(effect); - } else { - Batch.ensure().schedule(effect); - } - } else if (fn !== null) { - try { - update_effect(effect); - } catch (e2) { - destroy_effect(effect); - throw e2; - } - if (e.deps === null && e.teardown === null && e.nodes === null && e.first === e.last && // either `null`, or a singular child - (e.f & EFFECT_PRESERVED) === 0) { - e = e.first; - if ((type & BLOCK_EFFECT) !== 0 && (type & EFFECT_TRANSPARENT) !== 0 && e !== null) { - e.f |= EFFECT_TRANSPARENT; - } - } - } - if (e !== null) { - e.parent = parent; - if (parent !== null) { - push_effect(e, parent); - } - if (active_reaction !== null && (active_reaction.f & DERIVED) !== 0 && (type & ROOT_EFFECT) === 0) { - var derived2 = ( - /** @type {Derived} */ - active_reaction - ); - (derived2.effects ??= []).push(e); - } - } - return effect; -} -function effect_tracking() { - return active_reaction !== null && !untracking; -} -function create_user_effect(fn) { - return create_effect(EFFECT | USER_EFFECT, fn); -} -function component_root(fn) { - Batch.ensure(); - const effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn); - return (options = {}) => { - return new Promise((fulfil) => { - if (options.outro) { - pause_effect(effect, () => { - destroy_effect(effect); - fulfil(void 0); - }); - } else { - destroy_effect(effect); - fulfil(void 0); - } - }); - }; -} -function render_effect(fn, flags2 = 0) { - return create_effect(RENDER_EFFECT | flags2, fn); -} -function block(fn, flags2 = 0) { - var effect = create_effect(BLOCK_EFFECT | flags2, fn); - return effect; -} -function branch(fn) { - return create_effect(BRANCH_EFFECT | EFFECT_PRESERVED, fn); -} -function execute_effect_teardown(effect) { - var teardown = effect.teardown; - if (teardown !== null) { - const previously_destroying_effect = is_destroying_effect; - const previous_reaction = active_reaction; - set_is_destroying_effect(true); - set_active_reaction(null); - try { - teardown.call(null); - } finally { - set_is_destroying_effect(previously_destroying_effect); - set_active_reaction(previous_reaction); - } - } -} -function destroy_effect_children(signal, remove_dom = false) { - var effect = signal.first; - signal.first = signal.last = null; - while (effect !== null) { - const controller2 = effect.ac; - if (controller2 !== null) { - without_reactive_context(() => { - controller2.abort(STALE_REACTION); - }); - } - var next2 = effect.next; - if ((effect.f & ROOT_EFFECT) !== 0) { - effect.parent = null; - } else { - destroy_effect(effect, remove_dom); - } - effect = next2; - } -} -function destroy_block_effect_children(signal) { - var effect = signal.first; - while (effect !== null) { - var next2 = effect.next; - if ((effect.f & BRANCH_EFFECT) === 0) { - destroy_effect(effect); - } - effect = next2; - } -} -function destroy_effect(effect, remove_dom = true) { - var removed = false; - if ((remove_dom || (effect.f & HEAD_EFFECT) !== 0) && effect.nodes !== null && effect.nodes.end !== null) { - remove_effect_dom( - effect.nodes.start, - /** @type {TemplateNode} */ - effect.nodes.end - ); - removed = true; - } - set_signal_status(effect, DESTROYING); - destroy_effect_children(effect, remove_dom && !removed); - remove_reactions(effect, 0); - var transitions = effect.nodes && effect.nodes.t; - if (transitions !== null) { - for (const transition of transitions) { - transition.stop(); - } - } - execute_effect_teardown(effect); - effect.f ^= DESTROYING; - effect.f |= DESTROYED; - var parent = effect.parent; - if (parent !== null && parent.first !== null) { - unlink_effect(effect); - } - effect.next = effect.prev = effect.teardown = effect.ctx = effect.deps = effect.fn = effect.nodes = effect.ac = effect.b = null; -} -function remove_effect_dom(node, end) { - while (node !== null) { - var next2 = node === end ? null : /* @__PURE__ */ get_next_sibling(node); - node.remove(); - node = next2; - } -} -function unlink_effect(effect) { - var parent = effect.parent; - var prev = effect.prev; - var next2 = effect.next; - if (prev !== null) prev.next = next2; - if (next2 !== null) next2.prev = prev; - if (parent !== null) { - if (parent.first === effect) parent.first = next2; - if (parent.last === effect) parent.last = prev; - } -} -function pause_effect(effect, callback, destroy = true) { - var transitions = []; - pause_children(effect, transitions, true); - var fn = () => { - if (destroy) destroy_effect(effect); - if (callback) callback(); - }; - var remaining = transitions.length; - if (remaining > 0) { - var check = () => --remaining || fn(); - for (var transition of transitions) { - transition.out(check); - } - } else { - fn(); - } -} -function pause_children(effect, transitions, local) { - if ((effect.f & INERT) !== 0) return; - effect.f ^= INERT; - var t = effect.nodes && effect.nodes.t; - if (t !== null) { - for (const transition of t) { - if (transition.is_global || local) { - transitions.push(transition); - } - } - } - var child = effect.first; - while (child !== null) { - var sibling = child.next; - var transparent = (child.f & EFFECT_TRANSPARENT) !== 0 || // If this is a branch effect without a block effect parent, - // it means the parent block effect was pruned. In that case, - // transparency information was transferred to the branch effect. - (child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0; - pause_children(child, transitions, transparent ? local : false); - child = sibling; - } -} -function move_effect(effect, fragment) { - if (!effect.nodes) return; - var node = effect.nodes.start; - var end = effect.nodes.end; - while (node !== null) { - var next2 = node === end ? null : /* @__PURE__ */ get_next_sibling(node); - fragment.append(node); - node = next2; - } -} -let is_updating_effect = false; -let is_destroying_effect = false; -function set_is_destroying_effect(value) { - is_destroying_effect = value; -} -let active_reaction = null; -let untracking = false; -function set_active_reaction(reaction) { - active_reaction = reaction; -} -let active_effect = null; -function set_active_effect(effect) { - active_effect = effect; -} -let current_sources = null; -function push_reaction_value(value) { - if (active_reaction !== null && true) { - if (current_sources === null) { - current_sources = [value]; - } else { - current_sources.push(value); - } - } -} -let new_deps = null; -let skipped_deps = 0; -let untracked_writes = null; -function set_untracked_writes(value) { - untracked_writes = value; -} -let write_version = 1; -let read_version = 0; -let update_version = read_version; -function set_update_version(value) { - update_version = value; -} -function increment_write_version() { - return ++write_version; -} -function is_dirty(reaction) { - var flags2 = reaction.f; - if ((flags2 & DIRTY) !== 0) { - return true; - } - if (flags2 & DERIVED) { - reaction.f &= ~WAS_MARKED; - } - if ((flags2 & MAYBE_DIRTY) !== 0) { - var dependencies = ( - /** @type {Value[]} */ - reaction.deps - ); - var length = dependencies.length; - for (var i = 0; i < length; i++) { - var dependency = dependencies[i]; - if (is_dirty( - /** @type {Derived} */ - dependency - )) { - update_derived( - /** @type {Derived} */ - dependency - ); - } - if (dependency.wv > reaction.wv) { - return true; - } - } - if ((flags2 & CONNECTED) !== 0 && // During time traveling we don't want to reset the status so that - // traversal of the graph in the other batches still happens - batch_values === null) { - set_signal_status(reaction, CLEAN); - } - } - return false; -} -function schedule_possible_effect_self_invalidation(signal, effect, root2 = true) { - var reactions = signal.reactions; - if (reactions === null) return; - if (current_sources !== null && includes.call(current_sources, signal)) { - return; - } - for (var i = 0; i < reactions.length; i++) { - var reaction = reactions[i]; - if ((reaction.f & DERIVED) !== 0) { - schedule_possible_effect_self_invalidation( - /** @type {Derived} */ - reaction, - effect, - false - ); - } else if (effect === reaction) { - if (root2) { - set_signal_status(reaction, DIRTY); - } else if ((reaction.f & CLEAN) !== 0) { - set_signal_status(reaction, MAYBE_DIRTY); - } - schedule_effect( - /** @type {Effect} */ - reaction - ); - } - } -} -function update_reaction(reaction) { - var previous_deps = new_deps; - var previous_skipped_deps = skipped_deps; - var previous_untracked_writes = untracked_writes; - var previous_reaction = active_reaction; - var previous_sources = current_sources; - var previous_component_context = component_context; - var previous_untracking = untracking; - var previous_update_version = update_version; - var flags2 = reaction.f; - new_deps = /** @type {null | Value[]} */ - null; - skipped_deps = 0; - untracked_writes = null; - active_reaction = (flags2 & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null; - current_sources = null; - set_component_context(reaction.ctx); - untracking = false; - update_version = ++read_version; - if (reaction.ac !== null) { - without_reactive_context(() => { - reaction.ac.abort(STALE_REACTION); - }); - reaction.ac = null; - } - try { - reaction.f |= REACTION_IS_UPDATING; - var fn = ( - /** @type {Function} */ - reaction.fn - ); - var result = fn(); - reaction.f |= REACTION_RAN; - var deps = reaction.deps; - var is_fork = current_batch?.is_fork; - if (new_deps !== null) { - var i; - if (!is_fork) { - remove_reactions(reaction, skipped_deps); - } - if (deps !== null && skipped_deps > 0) { - deps.length = skipped_deps + new_deps.length; - for (i = 0; i < new_deps.length; i++) { - deps[skipped_deps + i] = new_deps[i]; - } - } else { - reaction.deps = deps = new_deps; - } - if (effect_tracking() && (reaction.f & CONNECTED) !== 0) { - for (i = skipped_deps; i < deps.length; i++) { - (deps[i].reactions ??= []).push(reaction); - } - } - } else if (!is_fork && deps !== null && skipped_deps < deps.length) { - remove_reactions(reaction, skipped_deps); - deps.length = skipped_deps; - } - if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & (DERIVED | MAYBE_DIRTY | DIRTY)) === 0) { - for (i = 0; i < /** @type {Source[]} */ - untracked_writes.length; i++) { - schedule_possible_effect_self_invalidation( - untracked_writes[i], - /** @type {Effect} */ - reaction - ); - } - } - if (previous_reaction !== null && previous_reaction !== reaction) { - read_version++; - if (previous_reaction.deps !== null) { - for (let i2 = 0; i2 < previous_skipped_deps; i2 += 1) { - previous_reaction.deps[i2].rv = read_version; - } - } - if (previous_deps !== null) { - for (const dep of previous_deps) { - dep.rv = read_version; - } - } - if (untracked_writes !== null) { - if (previous_untracked_writes === null) { - previous_untracked_writes = untracked_writes; - } else { - previous_untracked_writes.push(.../** @type {Source[]} */ - untracked_writes); - } - } - } - if ((reaction.f & ERROR_VALUE) !== 0) { - reaction.f ^= ERROR_VALUE; - } - return result; - } catch (error) { - return handle_error(error); - } finally { - reaction.f ^= REACTION_IS_UPDATING; - new_deps = previous_deps; - skipped_deps = previous_skipped_deps; - untracked_writes = previous_untracked_writes; - active_reaction = previous_reaction; - current_sources = previous_sources; - set_component_context(previous_component_context); - untracking = previous_untracking; - update_version = previous_update_version; - } -} -function remove_reaction(signal, dependency) { - let reactions = dependency.reactions; - if (reactions !== null) { - var index = index_of.call(reactions, signal); - if (index !== -1) { - var new_length = reactions.length - 1; - if (new_length === 0) { - reactions = dependency.reactions = null; - } else { - reactions[index] = reactions[new_length]; - reactions.pop(); - } - } - } - if (reactions === null && (dependency.f & DERIVED) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear - // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps` - // allows us to skip the expensive work of disconnecting and immediately reconnecting it - (new_deps === null || !includes.call(new_deps, dependency))) { - var derived2 = ( - /** @type {Derived} */ - dependency - ); - if ((derived2.f & CONNECTED) !== 0) { - derived2.f ^= CONNECTED; - derived2.f &= ~WAS_MARKED; - } - update_derived_status(derived2); - freeze_derived_effects(derived2); - remove_reactions(derived2, 0); - } -} -function remove_reactions(signal, start_index) { - var dependencies = signal.deps; - if (dependencies === null) return; - for (var i = start_index; i < dependencies.length; i++) { - remove_reaction(signal, dependencies[i]); - } -} -function update_effect(effect) { - var flags2 = effect.f; - if ((flags2 & DESTROYED) !== 0) { - return; - } - set_signal_status(effect, CLEAN); - var previous_effect = active_effect; - var was_updating_effect = is_updating_effect; - active_effect = effect; - is_updating_effect = true; - try { - if ((flags2 & (BLOCK_EFFECT | MANAGED_EFFECT)) !== 0) { - destroy_block_effect_children(effect); - } else { - destroy_effect_children(effect); - } - execute_effect_teardown(effect); - var teardown = update_reaction(effect); - effect.teardown = typeof teardown === "function" ? teardown : null; - effect.wv = write_version; - var dep; - if (BROWSER && tracing_mode_flag && (effect.f & DIRTY) !== 0 && effect.deps !== null) ; - } finally { - is_updating_effect = was_updating_effect; - active_effect = previous_effect; - } -} -function get(signal) { - var flags2 = signal.f; - var is_derived = (flags2 & DERIVED) !== 0; - if (active_reaction !== null && !untracking) { - var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0; - if (!destroyed && (current_sources === null || !includes.call(current_sources, signal))) { - var deps = active_reaction.deps; - if ((active_reaction.f & REACTION_IS_UPDATING) !== 0) { - if (signal.rv < read_version) { - signal.rv = read_version; - if (new_deps === null && deps !== null && deps[skipped_deps] === signal) { - skipped_deps++; - } else if (new_deps === null) { - new_deps = [signal]; - } else { - new_deps.push(signal); - } - } - } else { - (active_reaction.deps ??= []).push(signal); - var reactions = signal.reactions; - if (reactions === null) { - signal.reactions = [active_reaction]; - } else if (!includes.call(reactions, active_reaction)) { - reactions.push(active_reaction); - } - } - } - } - if (is_destroying_effect && old_values.has(signal)) { - return old_values.get(signal); - } - if (is_derived) { - var derived2 = ( - /** @type {Derived} */ - signal - ); - if (is_destroying_effect) { - var value = derived2.v; - if ((derived2.f & CLEAN) === 0 && derived2.reactions !== null || depends_on_old_values(derived2)) { - value = execute_derived(derived2); - } - old_values.set(derived2, value); - return value; - } - var should_connect = (derived2.f & CONNECTED) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & CONNECTED) !== 0); - var is_new = (derived2.f & REACTION_RAN) === 0; - if (is_dirty(derived2)) { - if (should_connect) { - derived2.f |= CONNECTED; - } - update_derived(derived2); - } - if (should_connect && !is_new) { - unfreeze_derived_effects(derived2); - reconnect(derived2); - } - } - if (batch_values?.has(signal)) { - return batch_values.get(signal); - } - if ((signal.f & ERROR_VALUE) !== 0) { - throw signal.v; - } - return signal.v; -} -function reconnect(derived2) { - derived2.f |= CONNECTED; - if (derived2.deps === null) return; - for (const dep of derived2.deps) { - (dep.reactions ??= []).push(derived2); - if ((dep.f & DERIVED) !== 0 && (dep.f & CONNECTED) === 0) { - unfreeze_derived_effects( - /** @type {Derived} */ - dep - ); - reconnect( - /** @type {Derived} */ - dep - ); - } - } -} -function depends_on_old_values(derived2) { - if (derived2.v === UNINITIALIZED) return true; - if (derived2.deps === null) return false; - for (const dep of derived2.deps) { - if (old_values.has(dep)) { - return true; - } - if ((dep.f & DERIVED) !== 0 && depends_on_old_values( - /** @type {Derived} */ - dep - )) { - return true; - } - } - return false; -} -function untrack(fn) { - var previous_untracking = untracking; - try { - untracking = true; - return fn(); - } finally { - untracking = previous_untracking; - } -} -const event_symbol = Symbol("events"); -const all_registered_events = /* @__PURE__ */ new Set(); -const root_event_handles = /* @__PURE__ */ new Set(); -let last_propagated_event = null; -function handle_event_propagation(event) { - var handler_element = this; - var owner_document = ( - /** @type {Node} */ - handler_element.ownerDocument - ); - var event_name = event.type; - var path = event.composedPath?.() || []; - var current_target = ( - /** @type {null | Element} */ - path[0] || event.target - ); - last_propagated_event = event; - var path_idx = 0; - var handled_at = last_propagated_event === event && event[event_symbol]; - if (handled_at) { - var at_idx = path.indexOf(handled_at); - if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */ - window)) { - event[event_symbol] = handler_element; - return; - } - var handler_idx = path.indexOf(handler_element); - if (handler_idx === -1) { - return; - } - if (at_idx <= handler_idx) { - path_idx = at_idx; - } - } - current_target = /** @type {Element} */ - path[path_idx] || event.target; - if (current_target === handler_element) return; - define_property(event, "currentTarget", { - configurable: true, - get() { - return current_target || owner_document; - } - }); - var previous_reaction = active_reaction; - var previous_effect = active_effect; - set_active_reaction(null); - set_active_effect(null); - try { - var throw_error; - var other_errors = []; - while (current_target !== null) { - var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */ - current_target.host || null; - try { - var delegated = current_target[event_symbol]?.[event_name]; - if (delegated != null && (!/** @type {any} */ - current_target.disabled || // DOM could've been updated already by the time this is reached, so we check this as well - // -> the target could not have been disabled because it emits the event in the first place - event.target === current_target)) { - delegated.call(current_target, event); - } - } catch (error) { - if (throw_error) { - other_errors.push(error); - } else { - throw_error = error; - } - } - if (event.cancelBubble || parent_element === handler_element || parent_element === null) { - break; - } - current_target = parent_element; - } - if (throw_error) { - for (let error of other_errors) { - queueMicrotask(() => { - throw error; - }); - } - throw throw_error; - } - } finally { - event[event_symbol] = handler_element; - delete event.currentTarget; - set_active_reaction(previous_reaction); - set_active_effect(previous_effect); - } -} -function assign_nodes(start, end) { - var effect = ( - /** @type {Effect} */ - active_effect - ); - if (effect.nodes === null) { - effect.nodes = { start, end, a: null, t: null }; - } -} -const DOM_BOOLEAN_ATTRIBUTES = [ - "allowfullscreen", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "disabled", - "formnovalidate", - "indeterminate", - "inert", - "ismap", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "seamless", - "selected", - "webkitdirectory", - "defer", - "disablepictureinpicture", - "disableremoteplayback" -]; -function is_boolean_attribute(name) { - return DOM_BOOLEAN_ATTRIBUTES.includes(name); -} -const PASSIVE_EVENTS = ["touchstart", "touchmove"]; -function is_passive_event(name) { - return PASSIVE_EVENTS.includes(name); -} -function mount(component, options) { - return _mount(component, options); -} -function hydrate(component, options) { - init_operations(); - options.intro = options.intro ?? false; - const target = options.target; - const was_hydrating = hydrating; - const previous_hydrate_node = hydrate_node; - try { - var anchor = /* @__PURE__ */ get_first_child(target); - while (anchor && (anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ - anchor.data !== HYDRATION_START)) { - anchor = /* @__PURE__ */ get_next_sibling(anchor); - } - if (!anchor) { - throw HYDRATION_ERROR; - } - set_hydrating(true); - set_hydrate_node( - /** @type {Comment} */ - anchor - ); - const instance = _mount(component, { ...options, anchor }); - set_hydrating(false); - return ( - /** @type {Exports} */ - instance - ); - } catch (error) { - if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) { - throw error; - } - if (error !== HYDRATION_ERROR) { - console.warn("Failed to hydrate: ", error); - } - if (options.recover === false) { - hydration_failed(); - } - init_operations(); - clear_text_content(target); - set_hydrating(false); - return mount(component, options); - } finally { - set_hydrating(was_hydrating); - set_hydrate_node(previous_hydrate_node); - } -} -const listeners = /* @__PURE__ */ new Map(); -function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) { - init_operations(); - var component = void 0; - var unmount2 = component_root(() => { - var anchor_node = anchor ?? target.appendChild(create_text()); - boundary( - /** @type {TemplateNode} */ - anchor_node, - { - pending: () => { - } - }, - (anchor_node2) => { - push$1({}); - var ctx = ( - /** @type {ComponentContext} */ - component_context - ); - if (context) ctx.c = context; - if (events) { - props.$$events = events; - } - if (hydrating) { - assign_nodes( - /** @type {TemplateNode} */ - anchor_node2, - null - ); - } - component = Component(anchor_node2, props) || {}; - if (hydrating) { - active_effect.nodes.end = hydrate_node; - if (hydrate_node === null || hydrate_node.nodeType !== COMMENT_NODE || /** @type {Comment} */ - hydrate_node.data !== HYDRATION_END) { - hydration_mismatch(); - throw HYDRATION_ERROR; - } - } - pop$1(); - }, - transformError - ); - var registered_events = /* @__PURE__ */ new Set(); - var event_handle = (events2) => { - for (var i = 0; i < events2.length; i++) { - var event_name = events2[i]; - if (registered_events.has(event_name)) continue; - registered_events.add(event_name); - var passive = is_passive_event(event_name); - for (const node of [target, document]) { - var counts = listeners.get(node); - if (counts === void 0) { - counts = /* @__PURE__ */ new Map(); - listeners.set(node, counts); - } - var count = counts.get(event_name); - if (count === void 0) { - node.addEventListener(event_name, handle_event_propagation, { passive }); - counts.set(event_name, 1); - } else { - counts.set(event_name, count + 1); - } - } - } - }; - event_handle(array_from(all_registered_events)); - root_event_handles.add(event_handle); - return () => { - for (var event_name of registered_events) { - for (const node of [target, document]) { - var counts = ( - /** @type {Map} */ - listeners.get(node) - ); - var count = ( - /** @type {number} */ - counts.get(event_name) - ); - if (--count == 0) { - node.removeEventListener(event_name, handle_event_propagation); - counts.delete(event_name); - if (counts.size === 0) { - listeners.delete(node); - } - } else { - counts.set(event_name, count); - } - } - } - root_event_handles.delete(event_handle); - if (anchor_node !== anchor) { - anchor_node.parentNode?.removeChild(anchor_node); - } - }; - }); - mounted_components.set(component, unmount2); - return component; -} -let mounted_components = /* @__PURE__ */ new WeakMap(); -function unmount(component, options) { - const fn = mounted_components.get(component); - if (fn) { - mounted_components.delete(component); - return fn(options); - } - return Promise.resolve(); -} -function asClassComponent$1(component) { - return class extends Svelte4Component { - /** @param {any} options */ - constructor(options) { - super({ - component, - ...options - }); - } - }; -} -class Svelte4Component { - /** @type {any} */ - #events; - /** @type {Record} */ - #instance; - /** - * @param {ComponentConstructorOptions & { - * component: any; - * }} options - */ - constructor(options) { - var sources = /* @__PURE__ */ new Map(); - var add_source = (key, value) => { - var s = /* @__PURE__ */ mutable_source(value, false, false); - sources.set(key, s); - return s; - }; - const props = new Proxy( - { ...options.props || {}, $$events: {} }, - { - get(target, prop) { - return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); - }, - has(target, prop) { - if (prop === LEGACY_PROPS) return true; - get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop))); - return Reflect.has(target, prop); - }, - set(target, prop, value) { - set(sources.get(prop) ?? add_source(prop, value), value); - return Reflect.set(target, prop, value); - } - } - ); - this.#instance = (options.hydrate ? hydrate : mount)(options.component, { - target: options.target, - anchor: options.anchor, - props, - context: options.context, - intro: options.intro ?? false, - recover: options.recover, - transformError: options.transformError - }); - if (!options?.props?.$$host || options.sync === false) { - flushSync(); - } - this.#events = props.$$events; - for (const key of Object.keys(this.#instance)) { - if (key === "$set" || key === "$destroy" || key === "$on") continue; - define_property(this, key, { - get() { - return this.#instance[key]; - }, - /** @param {any} value */ - set(value) { - this.#instance[key] = value; - }, - enumerable: true - }); - } - this.#instance.$set = /** @param {Record} next */ - (next2) => { - Object.assign(props, next2); - }; - this.#instance.$destroy = () => { - unmount(this.#instance); - }; - } - /** @param {Record} props */ - $set(props) { - this.#instance.$set(props); - } - /** - * @param {string} event - * @param {(...args: any[]) => any} callback - * @returns {any} - */ - $on(event, callback) { - this.#events[event] = this.#events[event] || []; - const cb = (...args) => callback.call(this, ...args); - this.#events[event].push(cb); - return () => { - this.#events[event] = this.#events[event].filter( - /** @param {any} fn */ - (fn) => fn !== cb - ); - }; - } - $destroy() { - this.#instance.$destroy(); - } -} -const BLOCK_OPEN = ``; -const BLOCK_CLOSE = ``; -let controller = null; -function abort() { - controller?.abort(STALE_REACTION); - controller = null; -} -function await_invalid() { - const error = new Error(`await_invalid -Encountered asynchronous work while rendering synchronously. -https://svelte.dev/e/await_invalid`); - error.name = "Svelte error"; - throw error; -} -function invalid_csp() { - const error = new Error(`invalid_csp -\`csp.nonce\` was set while \`csp.hash\` was \`true\`. These options cannot be used simultaneously. -https://svelte.dev/e/invalid_csp`); - error.name = "Svelte error"; - throw error; -} -function server_context_required() { - const error = new Error(`server_context_required -Could not resolve \`render\` context. -https://svelte.dev/e/server_context_required`); - error.name = "Svelte error"; - throw error; -} -var ssr_context = null; -function set_ssr_context(v) { - ssr_context = v; -} -function getContext(key) { - const context_map = get_or_init_context_map(); - const result = ( - /** @type {T} */ - context_map.get(key) - ); - return result; -} -function setContext(key, context) { - get_or_init_context_map().set(key, context); - return context; -} -function get_or_init_context_map(name) { - if (ssr_context === null) { - lifecycle_outside_component(); - } - return ssr_context.c ??= new Map(get_parent_context(ssr_context) || void 0); -} -function push(fn) { - ssr_context = { p: ssr_context, c: null, r: null }; -} -function pop() { - ssr_context = /** @type {SSRContext} */ - ssr_context.p; -} -function get_parent_context(ssr_context2) { - let parent = ssr_context2.p; - while (parent !== null) { - const context_map = parent.c; - if (context_map !== null) { - return context_map; - } - parent = parent.p; - } - return null; -} -function unresolved_hydratable(key, stack) { - { - console.warn(`https://svelte.dev/e/unresolved_hydratable`); - } -} -function get_render_context() { - const store = als?.getStore(); - { - server_context_required(); - } - return store; -} -let als = null; -let text_encoder; -let crypto; -const obfuscated_import = (module_name) => import( - /* @vite-ignore */ - module_name -); -async function sha256(data) { - text_encoder ??= new TextEncoder(); - crypto ??= globalThis.crypto?.subtle?.digest ? globalThis.crypto : ( - // @ts-ignore - we don't install node types in the prod build - // don't use import('node:crypto') directly because static analysers will think we rely on node when we don't - (await obfuscated_import("node:crypto")).webcrypto - ); - const hash_buffer = await crypto.subtle.digest("SHA-256", text_encoder.encode(data)); - return base64_encode(hash_buffer); -} -function base64_encode(bytes) { - if (globalThis.Buffer) { - return globalThis.Buffer.from(bytes).toString("base64"); - } - let binary = ""; - for (let i = 0; i < bytes.length; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -} -class Renderer { - /** - * The contents of the renderer. - * @type {RendererItem[]} - */ - #out = []; - /** - * Any `onDestroy` callbacks registered during execution of this renderer. - * @type {(() => void)[] | undefined} - */ - #on_destroy = void 0; - /** - * Whether this renderer is a component body. - * @type {boolean} - */ - #is_component_body = false; - /** - * If set, this renderer is an error boundary. When async collection - * of the children fails, the failed snippet is rendered instead. - * @type {{ - * failed: (renderer: Renderer, error: unknown, reset: () => void) => void; - * transformError: (error: unknown) => unknown; - * context: SSRContext | null; - * } | null} - */ - #boundary = null; - /** - * The type of string content that this renderer is accumulating. - * @type {RendererType} - */ - type; - /** @type {Renderer | undefined} */ - #parent; - /** - * Asynchronous work associated with this renderer - * @type {Promise | undefined} - */ - promise = void 0; - /** - * State which is associated with the content tree as a whole. - * It will be re-exposed, uncopied, on all children. - * @type {SSRState} - * @readonly - */ - global; - /** - * State that is local to the branch it is declared in. - * It will be shallow-copied to all children. - * - * @type {{ select_value: string | undefined }} - */ - local; - /** - * @param {SSRState} global - * @param {Renderer | undefined} [parent] - */ - constructor(global, parent) { - this.#parent = parent; - this.global = global; - this.local = parent ? { ...parent.local } : { select_value: void 0 }; - this.type = parent ? parent.type : "body"; - } - /** - * @param {(renderer: Renderer) => void} fn - */ - head(fn) { - const head = new Renderer(this.global, this); - head.type = "head"; - this.#out.push(head); - head.child(fn); - } - /** - * @param {Array>} blockers - * @param {(renderer: Renderer) => void} fn - */ - async_block(blockers, fn) { - this.#out.push(BLOCK_OPEN); - this.async(blockers, fn); - this.#out.push(BLOCK_CLOSE); - } - /** - * @param {Array>} blockers - * @param {(renderer: Renderer) => void} fn - */ - async(blockers, fn) { - let callback = fn; - if (blockers.length > 0) { - const context = ssr_context; - callback = (renderer) => { - return Promise.all(blockers).then(() => { - const previous_context = ssr_context; - try { - set_ssr_context(context); - return fn(renderer); - } finally { - set_ssr_context(previous_context); - } - }); - }; - } - this.child(callback); - } - /** - * @param {Array<() => void>} thunks - */ - run(thunks) { - const context = ssr_context; - let promise = Promise.resolve(thunks[0]()); - const promises = [promise]; - for (const fn of thunks.slice(1)) { - promise = promise.then(() => { - const previous_context = ssr_context; - set_ssr_context(context); - try { - return fn(); - } finally { - set_ssr_context(previous_context); - } - }); - promises.push(promise); - } - promise.catch(noop); - this.promise = promise; - return promises; - } - /** - * @param {(renderer: Renderer) => MaybePromise} fn - */ - child_block(fn) { - this.#out.push(BLOCK_OPEN); - this.child(fn); - this.#out.push(BLOCK_CLOSE); - } - /** - * Create a child renderer. The child renderer inherits the state from the parent, - * but has its own content. - * @param {(renderer: Renderer) => MaybePromise} fn - */ - child(fn) { - const child = new Renderer(this.global, this); - this.#out.push(child); - const parent = ssr_context; - set_ssr_context({ - ...ssr_context, - p: parent, - c: null, - r: child - }); - const result = fn(child); - set_ssr_context(parent); - if (result instanceof Promise) { - result.catch(noop); - result.finally(() => set_ssr_context(null)).catch(noop); - if (child.global.mode === "sync") { - await_invalid(); - } - child.promise = result; - } - return child; - } - /** - * Render children inside an error boundary. If the children throw and the API-level - * `transformError` transform handles the error (doesn't re-throw), the `failed` snippet is - * rendered instead. Otherwise the error propagates. - * - * @param {{ failed?: (renderer: Renderer, error: unknown, reset: () => void) => void }} props - * @param {(renderer: Renderer) => MaybePromise} children_fn - */ - boundary(props, children_fn) { - const child = new Renderer(this.global, this); - this.#out.push(child); - const parent_context = ssr_context; - if (props.failed) { - child.#boundary = { - failed: props.failed, - transformError: this.global.transformError, - context: parent_context - }; - } - set_ssr_context({ - ...ssr_context, - p: parent_context, - c: null, - r: child - }); - try { - const result = children_fn(child); - set_ssr_context(parent_context); - if (result instanceof Promise) { - if (child.global.mode === "sync") { - await_invalid(); - } - result.catch(noop); - child.promise = result; - } - } catch (error) { - set_ssr_context(parent_context); - const failed_snippet = props.failed; - if (!failed_snippet) throw error; - const result = this.global.transformError(error); - child.#out.length = 0; - child.#boundary = null; - if (result instanceof Promise) { - if (this.global.mode === "sync") { - await_invalid(); - } - child.promise = /** @type {Promise} */ - result.then((transformed) => { - set_ssr_context(parent_context); - child.#out.push(Renderer.#serialize_failed_boundary(transformed)); - failed_snippet(child, transformed, noop); - child.#out.push(BLOCK_CLOSE); - }); - child.promise.catch(noop); - } else { - child.#out.push(Renderer.#serialize_failed_boundary(result)); - failed_snippet(child, result, noop); - child.#out.push(BLOCK_CLOSE); - } - } - } - /** - * Create a component renderer. The component renderer inherits the state from the parent, - * but has its own content. It is treated as an ordering boundary for ondestroy callbacks. - * @param {(renderer: Renderer) => MaybePromise} fn - * @param {Function} [component_fn] - * @returns {void} - */ - component(fn, component_fn) { - push(); - const child = this.child(fn); - child.#is_component_body = true; - pop(); - } - /** - * @param {Record} attrs - * @param {(renderer: Renderer) => void} fn - * @param {string | undefined} [css_hash] - * @param {Record | undefined} [classes] - * @param {Record | undefined} [styles] - * @param {number | undefined} [flags] - * @param {boolean | undefined} [is_rich] - * @returns {void} - */ - select(attrs, fn, css_hash, classes, styles, flags2, is_rich) { - const { value, ...select_attrs } = attrs; - this.push(``); - this.child((renderer) => { - renderer.local.select_value = value; - fn(renderer); - }); - this.push(`${is_rich ? "" : ""}`); - } - /** - * @param {Record} attrs - * @param {string | number | boolean | ((renderer: Renderer) => void)} body - * @param {string | undefined} [css_hash] - * @param {Record | undefined} [classes] - * @param {Record | undefined} [styles] - * @param {number | undefined} [flags] - * @param {boolean | undefined} [is_rich] - */ - option(attrs, body, css_hash, classes, styles, flags2, is_rich) { - this.#out.push(` { - if (has_own_property.call(attrs, "value")) { - value = attrs.value; - } - if (value === this.local.select_value) { - renderer.#out.push(' selected=""'); - } - renderer.#out.push(`>${body2}${is_rich ? "" : ""}`); - if (head) { - renderer.head((child) => child.push(head)); - } - }; - if (typeof body === "function") { - this.child((renderer) => { - const r = new Renderer(this.global, this); - body(r); - if (this.global.mode === "async") { - return r.#collect_content_async().then((content) => { - close(renderer, content.body.replaceAll("", ""), content); - }); - } else { - const content = r.#collect_content(); - close(renderer, content.body.replaceAll("", ""), content); - } - }); - } else { - close(this, body, { body: escape_html(body) }); - } - } - /** - * @param {(renderer: Renderer) => void} fn - */ - title(fn) { - const path = this.get_path(); - const close = (head) => { - this.global.set_title(head, path); - }; - this.child((renderer) => { - const r = new Renderer(renderer.global, renderer); - fn(r); - if (renderer.global.mode === "async") { - return r.#collect_content_async().then((content) => { - close(content.head); - }); - } else { - const content = r.#collect_content(); - close(content.head); - } - }); - } - /** - * @param {string | (() => Promise)} content - */ - push(content) { - if (typeof content === "function") { - this.child(async (renderer) => renderer.push(await content())); - } else { - this.#out.push(content); - } - } - /** - * @param {() => void} fn - */ - on_destroy(fn) { - (this.#on_destroy ??= []).push(fn); - } - /** - * @returns {number[]} - */ - get_path() { - return this.#parent ? [...this.#parent.get_path(), this.#parent.#out.indexOf(this)] : []; - } - /** - * @deprecated this is needed for legacy component bindings - */ - copy() { - const copy = new Renderer(this.global, this.#parent); - copy.#out = this.#out.map((item) => item instanceof Renderer ? item.copy() : item); - copy.promise = this.promise; - return copy; - } - /** - * @param {Renderer} other - * @deprecated this is needed for legacy component bindings - */ - subsume(other) { - if (this.global.mode !== other.global.mode) { - throw new Error( - "invariant: A renderer cannot switch modes. If you're seeing this, there's a compiler bug. File an issue!" - ); - } - this.local = other.local; - this.#out = other.#out.map((item) => { - if (item instanceof Renderer) { - item.subsume(item); - } - return item; - }); - this.promise = other.promise; - this.type = other.type; - } - get length() { - return this.#out.length; - } - /** - * Creates the hydration comment that marks the start of a failed boundary. - * The error is JSON-serialized and embedded inside an HTML comment for the client - * to parse during hydration. The JSON is escaped to prevent `-->` or ``; - } - /** - * Only available on the server and when compiling with the `server` option. - * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app. - * @template {Record} Props - * @param {Component} component - * @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp }} [options] - * @returns {RenderOutput} - */ - static render(component, options = {}) { - let sync; - const result = ( - /** @type {RenderOutput} */ - {} - ); - Object.defineProperties(result, { - html: { - get: () => { - return (sync ??= Renderer.#render(component, options)).body; - } - }, - head: { - get: () => { - return (sync ??= Renderer.#render(component, options)).head; - } - }, - body: { - get: () => { - return (sync ??= Renderer.#render(component, options)).body; - } - }, - hashes: { - value: { - script: "" - } - }, - then: { - value: ( - /** - * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function. - * - * @template TResult1 - * @template [TResult2=never] - * @param { (value: SyncRenderOutput) => TResult1 } onfulfilled - * @param { (reason: unknown) => TResult2 } onrejected - */ - (onfulfilled, onrejected) => { - { - const result2 = sync ??= Renderer.#render(component, options); - const user_result = onfulfilled({ - head: result2.head, - body: result2.body, - html: result2.body, - hashes: { script: [] } - }); - return Promise.resolve(user_result); - } - } - ) - } - }); - return result; - } - /** - * Collect all of the `onDestroy` callbacks registered during rendering. In an async context, this is only safe to call - * after awaiting `collect_async`. - * - * Child renderers are "porous" and don't affect execution order, but component body renderers - * create ordering boundaries. Within a renderer, callbacks run in order until hitting a component boundary. - * @returns {Iterable<() => void>} - */ - *#collect_on_destroy() { - for (const component of this.#traverse_components()) { - yield* component.#collect_ondestroy(); - } - } - /** - * Performs a depth-first search of renderers, yielding the deepest components first, then additional components as we backtrack up the tree. - * @returns {Iterable} - */ - *#traverse_components() { - for (const child of this.#out) { - if (typeof child !== "string") { - yield* child.#traverse_components(); - } - } - if (this.#is_component_body) { - yield this; - } - } - /** - * @returns {Iterable<() => void>} - */ - *#collect_ondestroy() { - if (this.#on_destroy) { - for (const fn of this.#on_destroy) { - yield fn; - } - } - for (const child of this.#out) { - if (child instanceof Renderer && !child.#is_component_body) { - yield* child.#collect_ondestroy(); - } - } - } - /** - * Render a component. Throws if any of the children are performing asynchronous work. - * - * @template {Record} Props - * @param {Component} component - * @param {{ props?: Omit; context?: Map; idPrefix?: string }} options - * @returns {AccumulatedContent} - */ - static #render(component, options) { - var previous_context = ssr_context; - try { - const renderer = Renderer.#open_render("sync", component, options); - const content = renderer.#collect_content(); - return Renderer.#close_render(content, renderer); - } finally { - abort(); - set_ssr_context(previous_context); - } - } - /** - * Render a component. - * - * @template {Record} Props - * @param {Component} component - * @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp }} options - * @returns {Promise} - */ - static async #render_async(component, options) { - const previous_context = ssr_context; - try { - const renderer = Renderer.#open_render("async", component, options); - const content = await renderer.#collect_content_async(); - const hydratables = await renderer.#collect_hydratables(); - if (hydratables !== null) { - content.head = hydratables + content.head; - } - return Renderer.#close_render(content, renderer); - } finally { - set_ssr_context(previous_context); - abort(); - } - } - /** - * Collect all of the code from the `out` array and return it as a string, or a promise resolving to a string. - * @param {AccumulatedContent} content - * @returns {AccumulatedContent} - */ - #collect_content(content = { head: "", body: "" }) { - for (const item of this.#out) { - if (typeof item === "string") { - content[this.type] += item; - } else if (item instanceof Renderer) { - item.#collect_content(content); - } - } - return content; - } - /** - * Collect all of the code from the `out` array and return it as a string. - * @param {AccumulatedContent} content - * @returns {Promise} - */ - async #collect_content_async(content = { head: "", body: "" }) { - await this.promise; - for (const item of this.#out) { - if (typeof item === "string") { - content[this.type] += item; - } else if (item instanceof Renderer) { - if (item.#boundary) { - const boundary_content = { head: "", body: "" }; - try { - await item.#collect_content_async(boundary_content); - content.head += boundary_content.head; - content.body += boundary_content.body; - } catch (error) { - const { context, failed, transformError } = item.#boundary; - set_ssr_context(context); - let transformed = await transformError(error); - const failed_renderer = new Renderer(item.global, item); - failed_renderer.type = item.type; - failed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed)); - failed(failed_renderer, transformed, noop); - failed_renderer.#out.push(BLOCK_CLOSE); - await failed_renderer.#collect_content_async(content); - } - } else { - await item.#collect_content_async(content); - } - } - } - return content; - } - async #collect_hydratables() { - const ctx = get_render_context().hydratable; - for (const [_, key] of ctx.unresolved_promises) { - unresolved_hydratable(key, ctx.lookup.get(key)?.stack ?? ""); - } - for (const comparison of ctx.comparisons) { - await comparison; - } - return await this.#hydratable_block(ctx); - } - /** - * @template {Record} Props - * @param {'sync' | 'async'} mode - * @param {import('svelte').Component} component - * @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options - * @returns {Renderer} - */ - static #open_render(mode, component, options) { - var previous_context = ssr_context; - try { - const renderer = new Renderer( - new SSRState( - mode, - options.idPrefix ? options.idPrefix + "-" : "", - options.csp, - options.transformError - ) - ); - const context = { p: null, c: options.context ?? null, r: renderer }; - set_ssr_context(context); - renderer.push(BLOCK_OPEN); - component(renderer, options.props ?? {}); - renderer.push(BLOCK_CLOSE); - return renderer; - } finally { - set_ssr_context(previous_context); - } - } - /** - * @param {AccumulatedContent} content - * @param {Renderer} renderer - * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }} - */ - static #close_render(content, renderer) { - for (const cleanup of renderer.#collect_on_destroy()) { - cleanup(); - } - let head = content.head + renderer.global.get_title(); - let body = content.body; - for (const { hash, code } of renderer.global.css) { - head += ``; - } - return { - head, - body, - hashes: { - script: renderer.global.csp.script_hashes - } - }; - } - /** - * @param {HydratableContext} ctx - */ - async #hydratable_block(ctx) { - if (ctx.lookup.size === 0) { - return null; - } - let entries = []; - let has_promises = false; - for (const [k, v] of ctx.lookup) { - if (v.promises) { - has_promises = true; - for (const p of v.promises) await p; - } - entries.push(`[${devalue.uneval(k)},${v.serialized}]`); - } - let prelude = `const h = (window.__svelte ??= {}).h ??= new Map();`; - if (has_promises) { - prelude = `const r = (v) => Promise.resolve(v); - ${prelude}`; - } - const body = ` - { - ${prelude} - - for (const [k, v] of [ - ${entries.join(",\n ")} - ]) { - h.set(k, v); - } - } - `; - let csp_attr = ""; - if (this.global.csp.nonce) { - csp_attr = ` nonce="${this.global.csp.nonce}"`; - } else if (this.global.csp.hash) { - const hash = await sha256(body); - this.global.csp.script_hashes.push(`sha256-${hash}`); - } - return ` - ${body}<\/script>`; - } -} -class SSRState { - /** @readonly @type {Csp & { script_hashes: Sha256Source[] }} */ - csp; - /** @readonly @type {'sync' | 'async'} */ - mode; - /** @readonly @type {() => string} */ - uid; - /** @readonly @type {Set<{ hash: string; code: string }>} */ - css = /* @__PURE__ */ new Set(); - /** - * `transformError` passed to `render`. Called when an error boundary catches an error. - * Throws by default if unset in `render`. - * @type {(error: unknown) => unknown} - */ - transformError; - /** @type {{ path: number[], value: string }} */ - #title = { path: [], value: "" }; - /** - * @param {'sync' | 'async'} mode - * @param {string} id_prefix - * @param {Csp} csp - * @param {((error: unknown) => unknown) | undefined} [transformError] - */ - constructor(mode, id_prefix = "", csp = { hash: false }, transformError) { - this.mode = mode; - this.csp = { ...csp, script_hashes: [] }; - this.transformError = transformError ?? ((error) => { - throw error; - }); - let uid2 = 1; - this.uid = () => `${id_prefix}s${uid2++}`; - } - get_title() { - return this.#title.value; - } - /** - * Performs a depth-first (lexicographic) comparison using the path. Rejects sets - * from earlier than or equal to the current value. - * @param {string} value - * @param {number[]} path - */ - set_title(value, path) { - const current = this.#title.path; - let i = 0; - let l = Math.min(path.length, current.length); - while (i < l && path[i] === current[i]) i += 1; - if (path[i] === void 0) return; - if (current[i] === void 0 || path[i] > current[i]) { - this.#title.path = path; - this.#title.value = value; - } - } -} -const INVALID_ATTR_NAME_CHAR_REGEX = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u; -function render(component, options = {}) { - if (options.csp?.hash && options.csp.nonce) { - invalid_csp(); - } - return Renderer.render( - /** @type {Component} */ - component, - options - ); -} -function attributes(attrs, css_hash, classes, styles, flags2 = 0) { - if (styles) { - attrs.style = to_style(attrs.style, styles); - } - if (attrs.class) { - attrs.class = clsx(attrs.class); - } - if (css_hash || classes) { - attrs.class = to_class(attrs.class, css_hash, classes); - } - let attr_str = ""; - let name; - const is_html = (flags2 & ELEMENT_IS_NAMESPACED) === 0; - const lowercase = (flags2 & ELEMENT_PRESERVE_ATTRIBUTE_CASE) === 0; - const is_input = (flags2 & ELEMENT_IS_INPUT) !== 0; - for (name of Object.keys(attrs)) { - if (typeof attrs[name] === "function") continue; - if (name[0] === "$" && name[1] === "$") continue; - if (INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue; - var value = attrs[name]; - var lower = name.toLowerCase(); - if (lowercase) name = lower; - if (lower.length > 2 && lower.startsWith("on")) continue; - if (is_input) { - if (name === "defaultvalue" || name === "defaultchecked") { - name = name === "defaultvalue" ? "value" : "checked"; - if (attrs[name]) continue; - } - } - attr_str += attr(name, value, is_html && is_boolean_attribute(name)); - } - return attr_str; -} -function once(get_value) { - let value = ( - /** @type {V} */ - UNINITIALIZED - ); - return () => { - if (value === UNINITIALIZED) { - value = get_value(); - } - return value; - }; -} -function derived(fn) { - const get_value = ssr_context === null ? fn : once(fn); - let updated_value; - return function(new_value) { - if (arguments.length === 0) { - return updated_value ?? get_value(); - } - updated_value = new_value; - return updated_value; - }; -} -function asClassComponent(component) { - const component_constructor = asClassComponent$1(component); - const _render = (props, { context, csp, transformError } = {}) => { - const result = render(component, { props, context, csp, transformError }); - const munged = Object.defineProperties( - /** @type {LegacyRenderResult & PromiseLike} */ - {}, - { - css: { - value: { code: "", map: null } - }, - head: { - get: () => result.head - }, - html: { - get: () => result.body - }, - then: { - /** - * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function. - * - * @template TResult1 - * @template [TResult2=never] - * @param { (value: LegacyRenderResult) => TResult1 } onfulfilled - * @param { (reason: unknown) => TResult2 } onrejected - */ - value: (onfulfilled, onrejected) => { - { - const user_result = onfulfilled({ - css: munged.css, - head: munged.head, - html: munged.html - }); - return Promise.resolve(user_result); - } - } - } - } - ); - return munged; - }; - component_constructor.render = _render; - return component_constructor; -} -function Root($$renderer, $$props) { - $$renderer.component(($$renderer2) => { - let { - stores, - page, - constructors, - components = [], - form, - data_0 = null, - data_1 = null - } = $$props; - { - setContext("__svelte__", stores); - } - { - stores.page.set(page); - } - const Pyramid_1 = derived(() => constructors[1]); - if (constructors[1]) { - $$renderer2.push(""); - const Pyramid_0 = constructors[0]; - if (Pyramid_0) { - $$renderer2.push(""); - Pyramid_0($$renderer2, { - data: data_0, - form, - params: page.params, - children: ($$renderer3) => { - if (Pyramid_1()) { - $$renderer3.push(""); - Pyramid_1()($$renderer3, { data: data_1, form, params: page.params }); - $$renderer3.push(""); - } else { - $$renderer3.push(""); - $$renderer3.push(""); - } - }, - $$slots: { default: true } - }); - $$renderer2.push(""); - } else { - $$renderer2.push(""); - $$renderer2.push(""); - } - } else { - $$renderer2.push(""); - const Pyramid_0 = constructors[0]; - if (Pyramid_0) { - $$renderer2.push(""); - Pyramid_0($$renderer2, { data: data_0, form, params: page.params }); - $$renderer2.push(""); - } else { - $$renderer2.push(""); - $$renderer2.push(""); - } - } - $$renderer2.push(` `); - { - $$renderer2.push(""); - } - $$renderer2.push(``); - }); -} -const root = asClassComponent(Root); -export { - getContext as g, - root as r, - safe_not_equal as s -}; diff --git a/.svelte-kit/output/server/chunks/shared.js b/.svelte-kit/output/server/chunks/shared.js deleted file mode 100644 index a0fdd68..0000000 --- a/.svelte-kit/output/server/chunks/shared.js +++ /dev/null @@ -1,789 +0,0 @@ -import { json, text } from "@sveltejs/kit"; -import { SvelteKitError, HttpError } from "@sveltejs/kit/internal"; -import { with_request_store } from "@sveltejs/kit/internal/server"; -import * as devalue from "devalue"; -import { t as text_decoder, b as base64_encode, c as base64_decode } from "./utils.js"; -const SVELTE_KIT_ASSETS = "/_svelte_kit_assets"; -const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]; -const MUTATIVE_METHODS = ["POST", "PUT", "PATCH", "DELETE"]; -const PAGE_METHODS = ["GET", "POST", "HEAD"]; -function set_nested_value(object, path_string, value) { - if (path_string.startsWith("n:")) { - path_string = path_string.slice(2); - value = value === "" ? void 0 : parseFloat(value); - } else if (path_string.startsWith("b:")) { - path_string = path_string.slice(2); - value = value === "on"; - } - deep_set(object, split_path(path_string), value); -} -function convert_formdata(data) { - const result = {}; - for (let key of data.keys()) { - const is_array = key.endsWith("[]"); - let values = data.getAll(key); - if (is_array) key = key.slice(0, -2); - if (values.length > 1 && !is_array) { - throw new Error(`Form cannot contain duplicated keys — "${key}" has ${values.length} values`); - } - values = values.filter( - (entry) => typeof entry === "string" || entry.name !== "" || entry.size > 0 - ); - if (key.startsWith("n:")) { - key = key.slice(2); - values = values.map((v) => v === "" ? void 0 : parseFloat( - /** @type {string} */ - v - )); - } else if (key.startsWith("b:")) { - key = key.slice(2); - values = values.map((v) => v === "on"); - } - set_nested_value(result, key, is_array ? values : values[0]); - } - return result; -} -const BINARY_FORM_CONTENT_TYPE = "application/x-sveltekit-formdata"; -const BINARY_FORM_VERSION = 0; -const HEADER_BYTES = 1 + 4 + 2; -async function deserialize_binary_form(request) { - if (request.headers.get("content-type") !== BINARY_FORM_CONTENT_TYPE) { - const form_data = await request.formData(); - return { data: convert_formdata(form_data), meta: {}, form_data }; - } - if (!request.body) { - throw deserialize_error("no body"); - } - const content_length = parseInt(request.headers.get("content-length") ?? ""); - if (Number.isNaN(content_length)) { - throw deserialize_error("invalid Content-Length header"); - } - const reader = request.body.getReader(); - const chunks = []; - function get_chunk(index) { - if (index in chunks) return chunks[index]; - let i = chunks.length; - while (i <= index) { - chunks[i] = reader.read().then((chunk) => chunk.value); - i++; - } - return chunks[index]; - } - async function get_buffer(offset, length) { - let start_chunk; - let chunk_start = 0; - let chunk_index; - for (chunk_index = 0; ; chunk_index++) { - const chunk = await get_chunk(chunk_index); - if (!chunk) return null; - const chunk_end = chunk_start + chunk.byteLength; - if (offset >= chunk_start && offset < chunk_end) { - start_chunk = chunk; - break; - } - chunk_start = chunk_end; - } - if (offset + length <= chunk_start + start_chunk.byteLength) { - return start_chunk.subarray(offset - chunk_start, offset + length - chunk_start); - } - const chunks2 = [start_chunk.subarray(offset - chunk_start)]; - let cursor = start_chunk.byteLength - offset + chunk_start; - while (cursor < length) { - chunk_index++; - let chunk = await get_chunk(chunk_index); - if (!chunk) return null; - if (chunk.byteLength > length - cursor) { - chunk = chunk.subarray(0, length - cursor); - } - chunks2.push(chunk); - cursor += chunk.byteLength; - } - const buffer = new Uint8Array(length); - cursor = 0; - for (const chunk of chunks2) { - buffer.set(chunk, cursor); - cursor += chunk.byteLength; - } - return buffer; - } - const header = await get_buffer(0, HEADER_BYTES); - if (!header) throw deserialize_error("too short"); - if (header[0] !== BINARY_FORM_VERSION) { - throw deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`); - } - const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength); - const data_length = header_view.getUint32(1, true); - if (HEADER_BYTES + data_length > content_length) { - throw deserialize_error("data overflow"); - } - const file_offsets_length = header_view.getUint16(5, true); - if (HEADER_BYTES + data_length + file_offsets_length > content_length) { - throw deserialize_error("file offset table overflow"); - } - const data_buffer = await get_buffer(HEADER_BYTES, data_length); - if (!data_buffer) throw deserialize_error("data too short"); - let file_offsets; - let files_start_offset; - if (file_offsets_length > 0) { - const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length); - if (!file_offsets_buffer) throw deserialize_error("file offset table too short"); - const parsed_offsets = JSON.parse(text_decoder.decode(file_offsets_buffer)); - if (!Array.isArray(parsed_offsets) || parsed_offsets.some((n) => typeof n !== "number" || !Number.isInteger(n) || n < 0)) { - throw deserialize_error("invalid file offset table"); - } - file_offsets = /** @type {Array} */ - parsed_offsets; - files_start_offset = HEADER_BYTES + data_length + file_offsets_length; - } - const file_spans = []; - const [data, meta] = devalue.parse(text_decoder.decode(data_buffer), { - File: ([name, type, size, last_modified, index]) => { - if (typeof name !== "string" || typeof type !== "string" || typeof size !== "number" || typeof last_modified !== "number" || typeof index !== "number") { - throw deserialize_error("invalid file metadata"); - } - let offset = file_offsets[index]; - if (offset === void 0) { - throw deserialize_error("duplicate file offset table index"); - } - file_offsets[index] = void 0; - offset += files_start_offset; - if (offset + size > content_length) { - throw deserialize_error("file data overflow"); - } - file_spans.push({ offset, size }); - return new Proxy(new LazyFile(name, type, size, last_modified, get_chunk, offset), { - getPrototypeOf() { - return File.prototype; - } - }); - } - }); - file_spans.sort((a, b) => a.offset - b.offset || a.size - b.size); - for (let i = 1; i < file_spans.length; i++) { - const previous = file_spans[i - 1]; - const current = file_spans[i]; - const previous_end = previous.offset + previous.size; - if (previous_end < current.offset) { - throw deserialize_error("gaps in file data"); - } - if (previous_end > current.offset) { - throw deserialize_error("overlapping file data"); - } - } - void (async () => { - let has_more = true; - while (has_more) { - const chunk = await get_chunk(chunks.length); - has_more = !!chunk; - } - })(); - return { data, meta, form_data: null }; -} -function deserialize_error(message) { - return new SvelteKitError(400, "Bad Request", `Could not deserialize binary form: ${message}`); -} -class LazyFile { - /** @type {(index: number) => Promise | undefined>} */ - #get_chunk; - /** @type {number} */ - #offset; - /** - * @param {string} name - * @param {string} type - * @param {number} size - * @param {number} last_modified - * @param {(index: number) => Promise | undefined>} get_chunk - * @param {number} offset - */ - constructor(name, type, size, last_modified, get_chunk, offset) { - this.name = name; - this.type = type; - this.size = size; - this.lastModified = last_modified; - this.webkitRelativePath = ""; - this.#get_chunk = get_chunk; - this.#offset = offset; - this.arrayBuffer = this.arrayBuffer.bind(this); - this.bytes = this.bytes.bind(this); - this.slice = this.slice.bind(this); - this.stream = this.stream.bind(this); - this.text = this.text.bind(this); - } - /** @type {ArrayBuffer | undefined} */ - #buffer; - async arrayBuffer() { - this.#buffer ??= await new Response(this.stream()).arrayBuffer(); - return this.#buffer; - } - async bytes() { - return new Uint8Array(await this.arrayBuffer()); - } - /** - * @param {number=} start - * @param {number=} end - * @param {string=} contentType - */ - slice(start = 0, end = this.size, contentType = this.type) { - if (start < 0) { - start = Math.max(this.size + start, 0); - } else { - start = Math.min(start, this.size); - } - if (end < 0) { - end = Math.max(this.size + end, 0); - } else { - end = Math.min(end, this.size); - } - const size = Math.max(end - start, 0); - const file = new LazyFile( - this.name, - contentType, - size, - this.lastModified, - this.#get_chunk, - this.#offset + start - ); - return file; - } - stream() { - let cursor = 0; - let chunk_index = 0; - return new ReadableStream({ - start: async (controller) => { - let chunk_start = 0; - let start_chunk; - for (chunk_index = 0; ; chunk_index++) { - const chunk = await this.#get_chunk(chunk_index); - if (!chunk) return null; - const chunk_end = chunk_start + chunk.byteLength; - if (this.#offset >= chunk_start && this.#offset < chunk_end) { - start_chunk = chunk; - break; - } - chunk_start = chunk_end; - } - if (this.#offset + this.size <= chunk_start + start_chunk.byteLength) { - controller.enqueue( - start_chunk.subarray(this.#offset - chunk_start, this.#offset + this.size - chunk_start) - ); - controller.close(); - } else { - controller.enqueue(start_chunk.subarray(this.#offset - chunk_start)); - cursor = start_chunk.byteLength - this.#offset + chunk_start; - } - }, - pull: async (controller) => { - chunk_index++; - let chunk = await this.#get_chunk(chunk_index); - if (!chunk) { - controller.error("incomplete file data"); - controller.close(); - return; - } - if (chunk.byteLength > this.size - cursor) { - chunk = chunk.subarray(0, this.size - cursor); - } - controller.enqueue(chunk); - cursor += chunk.byteLength; - if (cursor >= this.size) { - controller.close(); - } - } - }); - } - async text() { - return text_decoder.decode(await this.arrayBuffer()); - } -} -const path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/; -function split_path(path) { - if (!path_regex.test(path)) { - throw new Error(`Invalid path ${path}`); - } - return path.split(/\.|\[|\]/).filter(Boolean); -} -function check_prototype_pollution(key) { - if (key === "__proto__" || key === "constructor" || key === "prototype") { - throw new Error( - `Invalid key "${key}"` - ); - } -} -function deep_set(object, keys, value) { - let current = object; - for (let i = 0; i < keys.length - 1; i += 1) { - const key = keys[i]; - check_prototype_pollution(key); - const is_array = /^\d+$/.test(keys[i + 1]); - const exists = Object.hasOwn(current, key); - const inner = current[key]; - if (exists && is_array !== Array.isArray(inner)) { - throw new Error(`Invalid array key ${keys[i + 1]}`); - } - if (!exists) { - current[key] = is_array ? [] : {}; - } - current = current[key]; - } - const final_key = keys[keys.length - 1]; - check_prototype_pollution(final_key); - current[final_key] = value; -} -function normalize_issue(issue, server = false) { - const normalized = { name: "", path: [], message: issue.message, server }; - if (issue.path !== void 0) { - let name = ""; - for (const segment of issue.path) { - const key = ( - /** @type {string | number} */ - typeof segment === "object" ? segment.key : segment - ); - normalized.path.push(key); - if (typeof key === "number") { - name += `[${key}]`; - } else if (typeof key === "string") { - name += name === "" ? key : "." + key; - } - } - normalized.name = name; - } - return normalized; -} -function flatten_issues(issues) { - const result = {}; - for (const issue of issues) { - (result.$ ??= []).push(issue); - let name = ""; - if (issue.path !== void 0) { - for (const key of issue.path) { - if (typeof key === "number") { - name += `[${key}]`; - } else if (typeof key === "string") { - name += name === "" ? key : "." + key; - } - (result[name] ??= []).push(issue); - } - } - } - return result; -} -function deep_get(object, path) { - let current = object; - for (const key of path) { - if (current == null || typeof current !== "object") { - return current; - } - current = current[key]; - } - return current; -} -function create_field_proxy(target, get_input, set_input, get_issues, path = []) { - const get_value = () => { - return deep_get(get_input(), path); - }; - return new Proxy(target, { - get(target2, prop) { - if (typeof prop === "symbol") return target2[prop]; - if (/^\d+$/.test(prop)) { - return create_field_proxy({}, get_input, set_input, get_issues, [ - ...path, - parseInt(prop, 10) - ]); - } - const key = build_path_string(path); - if (prop === "set") { - const set_func = function(newValue) { - set_input(path, newValue); - return newValue; - }; - return create_field_proxy(set_func, get_input, set_input, get_issues, [...path, prop]); - } - if (prop === "value") { - return create_field_proxy(get_value, get_input, set_input, get_issues, [...path, prop]); - } - if (prop === "issues" || prop === "allIssues") { - const issues_func = () => { - const all_issues = get_issues()[key === "" ? "$" : key]; - if (prop === "allIssues") { - return all_issues?.map((issue) => ({ - path: issue.path, - message: issue.message - })); - } - return all_issues?.filter((issue) => issue.name === key)?.map((issue) => ({ - path: issue.path, - message: issue.message - })); - }; - return create_field_proxy(issues_func, get_input, set_input, get_issues, [...path, prop]); - } - if (prop === "as") { - const as_func = (type, input_value) => { - const is_array = type === "file multiple" || type === "select multiple" || type === "checkbox" && typeof input_value === "string"; - const prefix = type === "number" || type === "range" ? "n:" : type === "checkbox" && !is_array ? "b:" : ""; - const base_props = { - name: prefix + key + (is_array ? "[]" : ""), - get "aria-invalid"() { - const issues = get_issues(); - return key in issues ? "true" : void 0; - } - }; - if (type !== "text" && type !== "select" && type !== "select multiple") { - base_props.type = type === "file multiple" ? "file" : type; - } - if (type === "submit" || type === "hidden") { - return Object.defineProperties(base_props, { - value: { value: input_value, enumerable: true } - }); - } - if (type === "select" || type === "select multiple") { - return Object.defineProperties(base_props, { - multiple: { value: is_array, enumerable: true }, - value: { - enumerable: true, - get() { - return get_value(); - } - } - }); - } - if (type === "checkbox" || type === "radio") { - return Object.defineProperties(base_props, { - value: { value: input_value ?? "on", enumerable: true }, - checked: { - enumerable: true, - get() { - const value = get_value(); - if (type === "radio") { - return value === input_value; - } - if (is_array) { - return (value ?? []).includes(input_value); - } - return value; - } - } - }); - } - if (type === "file" || type === "file multiple") { - return Object.defineProperties(base_props, { - multiple: { value: is_array, enumerable: true }, - files: { - enumerable: true, - get() { - const value = get_value(); - if (value instanceof File) { - if (typeof DataTransfer !== "undefined") { - const fileList = new DataTransfer(); - fileList.items.add(value); - return fileList.files; - } - return { 0: value, length: 1 }; - } - if (Array.isArray(value) && value.every((f) => f instanceof File)) { - if (typeof DataTransfer !== "undefined") { - const fileList = new DataTransfer(); - value.forEach((file) => fileList.items.add(file)); - return fileList.files; - } - const fileListLike = { length: value.length }; - value.forEach((file, index) => { - fileListLike[index] = file; - }); - return fileListLike; - } - return null; - } - } - }); - } - return Object.defineProperties(base_props, { - value: { - enumerable: true, - get() { - const value = get_value(); - return value != null ? String(value) : ""; - } - } - }); - }; - return create_field_proxy(as_func, get_input, set_input, get_issues, [...path, "as"]); - } - return create_field_proxy({}, get_input, set_input, get_issues, [...path, prop]); - } - }); -} -function build_path_string(path) { - let result = ""; - for (const segment of path) { - if (typeof segment === "number") { - result += `[${segment}]`; - } else { - result += result === "" ? segment : "." + segment; - } - } - return result; -} -function negotiate(accept, types) { - const parts = []; - accept.split(",").forEach((str, i) => { - const match = /([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str); - if (match) { - const [, type, subtype, q = "1"] = match; - parts.push({ type, subtype, q: +q, i }); - } - }); - parts.sort((a, b) => { - if (a.q !== b.q) { - return b.q - a.q; - } - if (a.subtype === "*" !== (b.subtype === "*")) { - return a.subtype === "*" ? 1 : -1; - } - if (a.type === "*" !== (b.type === "*")) { - return a.type === "*" ? 1 : -1; - } - return a.i - b.i; - }); - let accepted; - let min_priority = Infinity; - for (const mimetype of types) { - const [type, subtype] = mimetype.split("/"); - const priority = parts.findIndex( - (part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*") - ); - if (priority !== -1 && priority < min_priority) { - accepted = mimetype; - min_priority = priority; - } - } - return accepted; -} -function is_content_type(request, ...types) { - const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? ""; - return types.includes(type.toLowerCase()); -} -function is_form_content_type(request) { - return is_content_type( - request, - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - BINARY_FORM_CONTENT_TYPE - ); -} -function coalesce_to_error(err) { - return err instanceof Error || err && /** @type {any} */ - err.name && /** @type {any} */ - err.message ? ( - /** @type {Error} */ - err - ) : new Error(JSON.stringify(err)); -} -function normalize_error(error) { - return ( - /** @type {import('../exports/internal/index.js').Redirect | HttpError | SvelteKitError | Error} */ - error - ); -} -function get_status(error) { - return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500; -} -function get_message(error) { - return error instanceof SvelteKitError ? error.text : "Internal Error"; -} -const escape_html_attr_dict = { - "&": "&", - '"': """ - // Svelte also escapes < because the escape function could be called inside a `noscript` there - // https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c - // However, that doesn't apply in SvelteKit -}; -const escape_html_dict = { - "&": "&", - "<": "<" -}; -const surrogates = ( - // high surrogate without paired low surrogate - "[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]" -); -const escape_html_attr_regex = new RegExp( - `[${Object.keys(escape_html_attr_dict).join("")}]|` + surrogates, - "g" -); -const escape_html_regex = new RegExp( - `[${Object.keys(escape_html_dict).join("")}]|` + surrogates, - "g" -); -function escape_html(str, is_attr) { - const dict = is_attr ? escape_html_attr_dict : escape_html_dict; - const escaped_str = str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => { - if (match.length === 2) { - return match; - } - return dict[match] ?? `&#${match.charCodeAt(0)};`; - }); - return escaped_str; -} -function method_not_allowed(mod, method) { - return text(`${method} method not allowed`, { - status: 405, - headers: { - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 - // "The server must generate an Allow header field in a 405 status code response" - allow: allowed_methods(mod).join(", ") - } - }); -} -function allowed_methods(mod) { - const allowed = ENDPOINT_METHODS.filter((method) => method in mod); - if ("GET" in mod && !("HEAD" in mod)) { - allowed.push("HEAD"); - } - return allowed; -} -function get_global_name(options) { - return `__sveltekit_${options.version_hash}`; -} -function static_error_page(options, status, message) { - let page = options.templates.error({ status, message: escape_html(message) }); - return text(page, { - headers: { "content-type": "text/html; charset=utf-8" }, - status - }); -} -async function handle_fatal_error(event, state, options, error) { - error = error instanceof HttpError ? error : coalesce_to_error(error); - const status = get_status(error); - const body = await handle_error_and_jsonify(event, state, options, error); - const type = negotiate(event.request.headers.get("accept") || "text/html", [ - "application/json", - "text/html" - ]); - if (event.isDataRequest || type === "application/json") { - return json(body, { - status - }); - } - return static_error_page(options, status, body.message); -} -async function handle_error_and_jsonify(event, state, options, error) { - if (error instanceof HttpError) { - return { message: "Unknown Error", ...error.body }; - } - const status = get_status(error); - const message = get_message(error); - return await with_request_store( - { event, state }, - () => options.hooks.handleError({ error, event, status, message }) - ) ?? { message }; -} -function redirect_response(status, location) { - const response = new Response(void 0, { - status, - headers: { location } - }); - return response; -} -function clarify_devalue_error(event, error) { - if (error.path) { - return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path}). If you need to serialize/deserialize custom types, use transport hooks: https://svelte.dev/docs/kit/hooks#Universal-hooks-transport.`; - } - if (error.path === "") { - return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`; - } - return error.message; -} -function serialize_uses(node) { - const uses = {}; - if (node.uses && node.uses.dependencies.size > 0) { - uses.dependencies = Array.from(node.uses.dependencies); - } - if (node.uses && node.uses.search_params.size > 0) { - uses.search_params = Array.from(node.uses.search_params); - } - if (node.uses && node.uses.params.size > 0) { - uses.params = Array.from(node.uses.params); - } - if (node.uses?.parent) uses.parent = 1; - if (node.uses?.route) uses.route = 1; - if (node.uses?.url) uses.url = 1; - return uses; -} -function has_prerendered_path(manifest, pathname) { - return manifest._.prerendered_routes.has(pathname) || pathname.at(-1) === "/" && manifest._.prerendered_routes.has(pathname.slice(0, -1)); -} -function format_server_error(status, error, event) { - const formatted_text = ` -\x1B[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1B[0m`; - if (status === 404) { - return formatted_text; - } - return `${formatted_text} -${error.stack}`; -} -function get_node_type(node_id) { - const parts = node_id?.split("/"); - const filename = parts?.at(-1); - if (!filename) return "unknown"; - const dot_parts = filename.split("."); - return dot_parts.slice(0, -1).join("."); -} -const INVALIDATED_PARAM = "x-sveltekit-invalidated"; -const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash"; -function stringify(data, transport) { - const encoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode])); - return devalue.stringify(data, encoders); -} -function stringify_remote_arg(value, transport) { - if (value === void 0) return ""; - const json_string = stringify(value, transport); - const bytes = new TextEncoder().encode(json_string); - return base64_encode(bytes).replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_"); -} -function parse_remote_arg(string, transport) { - if (!string) return void 0; - const json_string = text_decoder.decode( - // no need to add back `=` characters, atob can handle it - base64_decode(string.replaceAll("-", "+").replaceAll("_", "/")) - ); - const decoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.decode])); - return devalue.parse(json_string, decoders); -} -function create_remote_key(id, payload) { - return id + "/" + payload; -} -export { - ENDPOINT_METHODS as E, - INVALIDATED_PARAM as I, - MUTATIVE_METHODS as M, - PAGE_METHODS as P, - SVELTE_KIT_ASSETS as S, - TRAILING_SLASH_PARAM as T, - normalize_error as a, - get_global_name as b, - clarify_devalue_error as c, - get_node_type as d, - escape_html as e, - create_remote_key as f, - get_status as g, - handle_error_and_jsonify as h, - is_form_content_type as i, - static_error_page as j, - stringify as k, - deserialize_binary_form as l, - method_not_allowed as m, - negotiate as n, - has_prerendered_path as o, - parse_remote_arg as p, - handle_fatal_error as q, - redirect_response as r, - serialize_uses as s, - format_server_error as t, - stringify_remote_arg as u, - create_field_proxy as v, - normalize_issue as w, - set_nested_value as x, - flatten_issues as y, - deep_set as z -}; diff --git a/.svelte-kit/output/server/chunks/utils.js b/.svelte-kit/output/server/chunks/utils.js deleted file mode 100644 index 78e5bde..0000000 --- a/.svelte-kit/output/server/chunks/utils.js +++ /dev/null @@ -1,43 +0,0 @@ -const text_encoder = new TextEncoder(); -const text_decoder = new TextDecoder(); -function get_relative_path(from, to) { - const from_parts = from.split(/[/\\]/); - const to_parts = to.split(/[/\\]/); - from_parts.pop(); - while (from_parts[0] === to_parts[0]) { - from_parts.shift(); - to_parts.shift(); - } - let i = from_parts.length; - while (i--) from_parts[i] = ".."; - return from_parts.concat(to_parts).join("/"); -} -function base64_encode(bytes) { - if (globalThis.Buffer) { - return globalThis.Buffer.from(bytes).toString("base64"); - } - let binary = ""; - for (let i = 0; i < bytes.length; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -} -function base64_decode(encoded) { - if (globalThis.Buffer) { - const buffer = globalThis.Buffer.from(encoded, "base64"); - return new Uint8Array(buffer); - } - const binary = atob(encoded); - const bytes = new Uint8Array(binary.length); - for (let i = 0; i < binary.length; i++) { - bytes[i] = binary.charCodeAt(i); - } - return bytes; -} -export { - text_encoder as a, - base64_encode as b, - base64_decode as c, - get_relative_path as g, - text_decoder as t -}; diff --git a/.svelte-kit/output/server/entries/fallbacks/error.svelte.js b/.svelte-kit/output/server/entries/fallbacks/error.svelte.js deleted file mode 100644 index b5c9b62..0000000 --- a/.svelte-kit/output/server/entries/fallbacks/error.svelte.js +++ /dev/null @@ -1,57 +0,0 @@ -import { n as noop, e as escape_html } from "../../chunks/attributes.js"; -import "clsx"; -import { w as writable } from "../../chunks/exports.js"; -import "@sveltejs/kit/internal/server"; -import { g as getContext } from "../../chunks/root.js"; -import "@sveltejs/kit/internal"; -import "../../chunks/utils.js"; -function create_updated_store() { - const { set, subscribe } = writable(false); - { - return { - subscribe, - // eslint-disable-next-line @typescript-eslint/require-await - check: async () => false - }; - } -} -const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString()); -const placeholder_url = "a:"; -if (is_legacy) { - ({ - data: {}, - form: null, - error: null, - params: {}, - route: { id: null }, - state: {}, - status: -1, - url: new URL(placeholder_url) - }); -} -const stores = { - updated: /* @__PURE__ */ create_updated_store() -}; -({ - check: stores.updated.check -}); -function context() { - return getContext("__request__"); -} -const page$1 = { - get error() { - return context().page.error; - }, - get status() { - return context().page.status; - } -}; -const page = page$1; -function Error$1($$renderer, $$props) { - $$renderer.component(($$renderer2) => { - $$renderer2.push(`

${escape_html(page.status)}

${escape_html(page.error?.message)}

`); - }); -} -export { - Error$1 as default -}; diff --git a/.svelte-kit/output/server/entries/fallbacks/layout.svelte.js b/.svelte-kit/output/server/entries/fallbacks/layout.svelte.js deleted file mode 100644 index c3792df..0000000 --- a/.svelte-kit/output/server/entries/fallbacks/layout.svelte.js +++ /dev/null @@ -1,9 +0,0 @@ -import "clsx"; -function Layout($$renderer, $$props) { - let { children } = $$props; - children($$renderer); - $$renderer.push(``); -} -export { - Layout as default -}; diff --git a/.svelte-kit/output/server/entries/pages/_layout.ts.js b/.svelte-kit/output/server/entries/pages/_layout.ts.js deleted file mode 100644 index 3953bf0..0000000 --- a/.svelte-kit/output/server/entries/pages/_layout.ts.js +++ /dev/null @@ -1,4 +0,0 @@ -const ssr = false; -export { - ssr -}; diff --git a/.svelte-kit/output/server/entries/pages/_page.svelte.js b/.svelte-kit/output/server/entries/pages/_page.svelte.js deleted file mode 100644 index 04dd03a..0000000 --- a/.svelte-kit/output/server/entries/pages/_page.svelte.js +++ /dev/null @@ -1,12 +0,0 @@ -import { q as attr, e as escape_html } from "../../chunks/attributes.js"; -import "@tauri-apps/api/core"; -function _page($$renderer, $$props) { - $$renderer.component(($$renderer2) => { - let name = ""; - let greetMsg = ""; - $$renderer2.push(`

Welcome to Tauri + Svelte

Click on the Tauri, Vite, and SvelteKit logos to learn more.

${escape_html(greetMsg)}

`); - }); -} -export { - _page as default -}; diff --git a/.svelte-kit/output/server/index.js b/.svelte-kit/output/server/index.js deleted file mode 100644 index db8418b..0000000 --- a/.svelte-kit/output/server/index.js +++ /dev/null @@ -1,3820 +0,0 @@ -import { B as BROWSER } from "./chunks/false.js"; -import { json, text, error } from "@sveltejs/kit"; -import { Redirect, SvelteKitError, ActionFailure, HttpError } from "@sveltejs/kit/internal"; -import { with_request_store, merge_tracing, try_get_request_store } from "@sveltejs/kit/internal/server"; -import { a as assets, b as base, c as app_dir, r as relative, o as override, d as reset } from "./chunks/environment.js"; -import { E as ENDPOINT_METHODS, P as PAGE_METHODS, n as negotiate, m as method_not_allowed, h as handle_error_and_jsonify, g as get_status, i as is_form_content_type, a as normalize_error, b as get_global_name, s as serialize_uses, c as clarify_devalue_error, d as get_node_type, e as escape_html, S as SVELTE_KIT_ASSETS, f as create_remote_key, j as static_error_page, r as redirect_response, p as parse_remote_arg, k as stringify, l as deserialize_binary_form, o as has_prerendered_path, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, q as handle_fatal_error, M as MUTATIVE_METHODS, t as format_server_error } from "./chunks/shared.js"; -import * as devalue from "devalue"; -import { m as make_trackable, d as disable_search, a as decode_params, S as SCHEME, w as writable, r as readable, v as validate_layout_server_exports, b as validate_layout_exports, c as validate_page_server_exports, e as validate_page_exports, n as normalize_path, f as resolve, g as decode_pathname, h as validate_server_exports } from "./chunks/exports.js"; -import { b as base64_encode, t as text_decoder, a as text_encoder, g as get_relative_path } from "./chunks/utils.js"; -import { p as public_env, r as read_implementation, o as options, s as set_private_env, a as set_public_env, g as get_hooks, b as set_read_implementation } from "./chunks/internal.js"; -import { parse, serialize } from "cookie"; -import * as set_cookie_parser from "set-cookie-parser"; -function with_resolvers() { - let resolve2; - let reject; - const promise = new Promise((res, rej) => { - resolve2 = res; - reject = rej; - }); - return { promise, resolve: resolve2, reject }; -} -const NULL_BODY_STATUS = [101, 103, 204, 205, 304]; -const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer; -async function render_endpoint(event, event_state, mod, state) { - const method = ( - /** @type {import('types').HttpMethod} */ - event.request.method - ); - let handler = mod[method] || mod.fallback; - if (method === "HEAD" && !mod.HEAD && mod.GET) { - handler = mod.GET; - } - if (!handler) { - return method_not_allowed(mod, method); - } - const prerender = mod.prerender ?? state.prerender_default; - if (prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) { - throw new Error("Cannot prerender endpoints that have mutative methods"); - } - if (state.prerendering && !state.prerendering.inside_reroute && !prerender) { - if (state.depth > 0) { - throw new Error(`${event.route.id} is not prerenderable`); - } else { - return new Response(void 0, { status: 204 }); - } - } - try { - event_state.allows_commands = true; - const response = await with_request_store( - { event, state: event_state }, - () => handler( - /** @type {import('@sveltejs/kit').RequestEvent>} */ - event - ) - ); - if (!(response instanceof Response)) { - throw new Error( - `Invalid response from route ${event.url.pathname}: handler should return a Response object` - ); - } - if (state.prerendering && (!state.prerendering.inside_reroute || prerender)) { - const cloned = new Response(response.clone().body, { - status: response.status, - statusText: response.statusText, - headers: new Headers(response.headers) - }); - cloned.headers.set("x-sveltekit-prerender", String(prerender)); - if (state.prerendering.inside_reroute && prerender) { - cloned.headers.set( - "x-sveltekit-routeid", - encodeURI( - /** @type {string} */ - event.route.id - ) - ); - state.prerendering.dependencies.set(event.url.pathname, { response: cloned, body: null }); - } else { - return cloned; - } - } - return response; - } catch (e) { - if (e instanceof Redirect) { - return new Response(void 0, { - status: e.status, - headers: { location: e.location } - }); - } - throw e; - } -} -function is_endpoint_request(event) { - const { method, headers: headers2 } = event.request; - if (ENDPOINT_METHODS.includes(method) && !PAGE_METHODS.includes(method)) { - return true; - } - if (method === "POST" && headers2.get("x-sveltekit-action") === "true") return false; - const accept = event.request.headers.get("accept") ?? "*/*"; - return negotiate(accept, ["*", "text/html"]) !== "text/html"; -} -function compact(arr) { - return arr.filter( - /** @returns {val is NonNullable} */ - (val) => val != null - ); -} -const DATA_SUFFIX = "/__data.json"; -const HTML_DATA_SUFFIX = ".html__data.json"; -function has_data_suffix(pathname) { - return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX); -} -function add_data_suffix(pathname) { - if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX); - return pathname.replace(/\/$/, "") + DATA_SUFFIX; -} -function strip_data_suffix(pathname) { - if (pathname.endsWith(HTML_DATA_SUFFIX)) { - return pathname.slice(0, -HTML_DATA_SUFFIX.length) + ".html"; - } - return pathname.slice(0, -DATA_SUFFIX.length); -} -const ROUTE_SUFFIX = "/__route.js"; -function has_resolution_suffix(pathname) { - return pathname.endsWith(ROUTE_SUFFIX); -} -function add_resolution_suffix(pathname) { - return pathname.replace(/\/$/, "") + ROUTE_SUFFIX; -} -function strip_resolution_suffix(pathname) { - return pathname.slice(0, -ROUTE_SUFFIX.length); -} -const noop_span = { - spanContext() { - return noop_span_context; - }, - setAttribute() { - return this; - }, - setAttributes() { - return this; - }, - addEvent() { - return this; - }, - setStatus() { - return this; - }, - updateName() { - return this; - }, - end() { - return this; - }, - isRecording() { - return false; - }, - recordException() { - return this; - }, - addLink() { - return this; - }, - addLinks() { - return this; - } -}; -const noop_span_context = { - traceId: "", - spanId: "", - traceFlags: 0 -}; -async function record_span({ name, attributes, fn }) { - { - return fn(noop_span); - } -} -function is_action_json_request(event) { - const accept = negotiate(event.request.headers.get("accept") ?? "*/*", [ - "application/json", - "text/html" - ]); - return accept === "application/json" && event.request.method === "POST"; -} -async function handle_action_json_request(event, event_state, options2, server) { - const actions = server?.actions; - if (!actions) { - const no_actions_error = new SvelteKitError( - 405, - "Method Not Allowed", - `POST method not allowed. No form actions exist for ${"this page"}` - ); - return action_json( - { - type: "error", - error: await handle_error_and_jsonify(event, event_state, options2, no_actions_error) - }, - { - status: no_actions_error.status, - headers: { - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 - // "The server must generate an Allow header field in a 405 status code response" - allow: "GET" - } - } - ); - } - check_named_default_separate(actions); - try { - const data = await call_action(event, event_state, actions); - if (BROWSER) ; - if (data instanceof ActionFailure) { - return action_json({ - type: "failure", - status: data.status, - // @ts-expect-error we assign a string to what is supposed to be an object. That's ok - // because we don't use the object outside, and this way we have better code navigation - // through knowing where the related interface is used. - data: stringify_action_response( - data.data, - /** @type {string} */ - event.route.id, - options2.hooks.transport - ) - }); - } else { - return action_json({ - type: "success", - status: data ? 200 : 204, - // @ts-expect-error see comment above - data: stringify_action_response( - data, - /** @type {string} */ - event.route.id, - options2.hooks.transport - ) - }); - } - } catch (e) { - const err = normalize_error(e); - if (err instanceof Redirect) { - return action_json_redirect(err); - } - return action_json( - { - type: "error", - error: await handle_error_and_jsonify( - event, - event_state, - options2, - check_incorrect_fail_use(err) - ) - }, - { - status: get_status(err) - } - ); - } -} -function check_incorrect_fail_use(error2) { - return error2 instanceof ActionFailure ? new Error('Cannot "throw fail()". Use "return fail()"') : error2; -} -function action_json_redirect(redirect) { - return action_json({ - type: "redirect", - status: redirect.status, - location: redirect.location - }); -} -function action_json(data, init2) { - return json(data, init2); -} -function is_action_request(event) { - return event.request.method === "POST"; -} -async function handle_action_request(event, event_state, server) { - const actions = server?.actions; - if (!actions) { - event.setHeaders({ - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 - // "The server must generate an Allow header field in a 405 status code response" - allow: "GET" - }); - return { - type: "error", - error: new SvelteKitError( - 405, - "Method Not Allowed", - `POST method not allowed. No form actions exist for ${"this page"}` - ) - }; - } - check_named_default_separate(actions); - try { - const data = await call_action(event, event_state, actions); - if (BROWSER) ; - if (data instanceof ActionFailure) { - return { - type: "failure", - status: data.status, - data: data.data - }; - } else { - return { - type: "success", - status: 200, - // @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission - data - }; - } - } catch (e) { - const err = normalize_error(e); - if (err instanceof Redirect) { - return { - type: "redirect", - status: err.status, - location: err.location - }; - } - return { - type: "error", - error: check_incorrect_fail_use(err) - }; - } -} -function check_named_default_separate(actions) { - if (actions.default && Object.keys(actions).length > 1) { - throw new Error( - "When using named actions, the default action cannot be used. See the docs for more info: https://svelte.dev/docs/kit/form-actions#named-actions" - ); - } -} -async function call_action(event, event_state, actions) { - const url = new URL(event.request.url); - let name = "default"; - for (const param of url.searchParams) { - if (param[0].startsWith("/")) { - name = param[0].slice(1); - if (name === "default") { - throw new Error('Cannot use reserved action name "default"'); - } - break; - } - } - const action = actions[name]; - if (!action) { - throw new SvelteKitError(404, "Not Found", `No action with name '${name}' found`); - } - if (!is_form_content_type(event.request)) { - throw new SvelteKitError( - 415, - "Unsupported Media Type", - `Form actions expect form-encoded data — received ${event.request.headers.get( - "content-type" - )}` - ); - } - return record_span({ - name: "sveltekit.form_action", - attributes: { - "http.route": event.route.id || "unknown" - }, - fn: async (current2) => { - const traced_event = merge_tracing(event, current2); - event_state.allows_commands = true; - const result = await with_request_store( - { event: traced_event, state: event_state }, - () => action(traced_event) - ); - if (result instanceof ActionFailure) { - current2.setAttributes({ - "sveltekit.form_action.result.type": "failure", - "sveltekit.form_action.result.status": result.status - }); - } - return result; - } - }); -} -function validate_action_return(data) { - if (data instanceof Redirect) { - throw new Error("Cannot `return redirect(...)` — use `redirect(...)` instead"); - } - if (data instanceof HttpError) { - throw new Error("Cannot `return error(...)` — use `error(...)` or `return fail(...)` instead"); - } -} -function uneval_action_response(data, route_id, transport) { - const replacer = (thing) => { - for (const key2 in transport) { - const encoded = transport[key2].encode(thing); - if (encoded) { - return `app.decode('${key2}', ${devalue.uneval(encoded, replacer)})`; - } - } - }; - return try_serialize(data, (value) => devalue.uneval(value, replacer), route_id); -} -function stringify_action_response(data, route_id, transport) { - const encoders = Object.fromEntries( - Object.entries(transport).map(([key2, value]) => [key2, value.encode]) - ); - return try_serialize(data, (value) => devalue.stringify(value, encoders), route_id); -} -function try_serialize(data, fn, route_id) { - try { - return fn(data); - } catch (e) { - const error2 = ( - /** @type {any} */ - e - ); - if (data instanceof Response) { - throw new Error( - `Data returned from action inside ${route_id} is not serializable. Form actions need to return plain objects or fail(). E.g. return { success: true } or return fail(400, { message: "invalid" });`, - { cause: e } - ); - } - if ("path" in error2) { - let message = `Data returned from action inside ${route_id} is not serializable: ${error2.message}`; - if (error2.path !== "") message += ` (data.${error2.path})`; - throw new Error(message, { cause: e }); - } - throw error2; - } -} -function create_async_iterator() { - let resolved = -1; - let returned = -1; - const deferred = []; - return { - iterate: (transform = (x) => x) => { - return { - [Symbol.asyncIterator]() { - return { - next: async () => { - const next = deferred[++returned]; - if (!next) return { value: null, done: true }; - const value = await next.promise; - return { value: transform(value), done: false }; - } - }; - } - }; - }, - add: (promise) => { - deferred.push(with_resolvers()); - void promise.then((value) => { - deferred[++resolved].resolve(value); - }); - } - }; -} -function server_data_serializer(event, event_state, options2) { - let promise_id = 1; - let max_nodes = -1; - const iterator = create_async_iterator(); - const global = get_global_name(options2); - function get_replacer(index) { - return function replacer(thing) { - if (typeof thing?.then === "function") { - const id = promise_id++; - const promise = thing.then( - /** @param {any} data */ - (data) => ({ data }) - ).catch( - /** @param {any} error */ - async (error2) => ({ - error: await handle_error_and_jsonify(event, event_state, options2, error2) - }) - ).then( - /** - * @param {{data: any; error: any}} result - */ - async ({ data, error: error2 }) => { - let str; - try { - str = devalue.uneval(error2 ? [, error2] : [data], replacer); - } catch { - error2 = await handle_error_and_jsonify( - event, - event_state, - options2, - new Error(`Failed to serialize promise while rendering ${event.route.id}`) - ); - str = devalue.uneval([, error2], replacer); - } - return { - index, - str: `${global}.resolve(${id}, ${str.includes("app.decode") ? `(app) => ${str}` : `() => ${str}`})` - }; - } - ); - iterator.add(promise); - return `${global}.defer(${id})`; - } else { - for (const key2 in options2.hooks.transport) { - const encoded = options2.hooks.transport[key2].encode(thing); - if (encoded) { - return `app.decode('${key2}', ${devalue.uneval(encoded, replacer)})`; - } - } - } - }; - } - const strings = ( - /** @type {string[]} */ - [] - ); - return { - set_max_nodes(i) { - max_nodes = i; - }, - add_node(i, node) { - try { - if (!node) { - strings[i] = "null"; - return; - } - const payload = { type: "data", data: node.data, uses: serialize_uses(node) }; - if (node.slash) payload.slash = node.slash; - strings[i] = devalue.uneval(payload, get_replacer(i)); - } catch (e) { - e.path = e.path.slice(1); - throw new Error(clarify_devalue_error( - event, - /** @type {any} */ - e - ), { cause: e }); - } - }, - get_data(csp) { - const open = ``; - const close = `<\/script> -`; - return { - data: `[${compact(max_nodes > -1 ? strings.slice(0, max_nodes) : strings).join(",")}]`, - chunks: promise_id > 1 ? iterator.iterate(({ index, str }) => { - if (max_nodes > -1 && index >= max_nodes) { - return ""; - } - return open + str + close; - }) : null - }; - } - }; -} -function server_data_serializer_json(event, event_state, options2) { - let promise_id = 1; - const iterator = create_async_iterator(); - const reducers = { - ...Object.fromEntries( - Object.entries(options2.hooks.transport).map(([key2, value]) => [key2, value.encode]) - ), - /** @param {any} thing */ - Promise: (thing) => { - if (typeof thing?.then !== "function") { - return; - } - const id = promise_id++; - let key2 = "data"; - const promise = thing.catch( - /** @param {any} e */ - async (e) => { - key2 = "error"; - return handle_error_and_jsonify( - event, - event_state, - options2, - /** @type {any} */ - e - ); - } - ).then( - /** @param {any} value */ - async (value) => { - let str; - try { - str = devalue.stringify(value, reducers); - } catch { - const error2 = await handle_error_and_jsonify( - event, - event_state, - options2, - new Error(`Failed to serialize promise while rendering ${event.route.id}`) - ); - key2 = "error"; - str = devalue.stringify(error2, reducers); - } - return `{"type":"chunk","id":${id},"${key2}":${str}} -`; - } - ); - iterator.add(promise); - return id; - } - }; - const strings = ( - /** @type {string[]} */ - [] - ); - return { - add_node(i, node) { - try { - if (!node) { - strings[i] = "null"; - return; - } - if (node.type === "error" || node.type === "skip") { - strings[i] = JSON.stringify(node); - return; - } - strings[i] = `{"type":"data","data":${devalue.stringify(node.data, reducers)},"uses":${JSON.stringify( - serialize_uses(node) - )}${node.slash ? `,"slash":${JSON.stringify(node.slash)}` : ""}}`; - } catch (e) { - e.path = "data" + e.path; - throw new Error(clarify_devalue_error( - event, - /** @type {any} */ - e - ), { cause: e }); - } - }, - get_data() { - return { - data: `{"type":"data","nodes":[${strings.join(",")}]} -`, - chunks: promise_id > 1 ? iterator.iterate() : null - }; - } - }; -} -async function load_server_data({ event, event_state, state, node, parent }) { - if (!node?.server) return null; - let is_tracking = true; - const uses = { - dependencies: /* @__PURE__ */ new Set(), - params: /* @__PURE__ */ new Set(), - parent: false, - route: false, - url: false, - search_params: /* @__PURE__ */ new Set() - }; - const load = node.server.load; - const slash = node.server.trailingSlash; - if (!load) { - return { type: "data", data: null, uses, slash }; - } - const url = make_trackable( - event.url, - () => { - if (is_tracking) { - uses.url = true; - } - }, - (param) => { - if (is_tracking) { - uses.search_params.add(param); - } - } - ); - if (state.prerendering) { - disable_search(url); - } - const result = await record_span({ - name: "sveltekit.load", - attributes: { - "sveltekit.load.node_id": node.server_id || "unknown", - "sveltekit.load.node_type": get_node_type(node.server_id), - "http.route": event.route.id || "unknown" - }, - fn: async (current2) => { - const traced_event = merge_tracing(event, current2); - const result2 = await with_request_store( - { event: traced_event, state: event_state }, - () => load.call(null, { - ...traced_event, - fetch: (info, init2) => { - new URL(info instanceof Request ? info.url : info, event.url); - return event.fetch(info, init2); - }, - /** @param {string[]} deps */ - depends: (...deps) => { - for (const dep of deps) { - const { href } = new URL(dep, event.url); - uses.dependencies.add(href); - } - }, - params: new Proxy(event.params, { - get: (target, key2) => { - if (is_tracking) { - uses.params.add(key2); - } - return target[ - /** @type {string} */ - key2 - ]; - } - }), - parent: async () => { - if (is_tracking) { - uses.parent = true; - } - return parent(); - }, - route: new Proxy(event.route, { - get: (target, key2) => { - if (is_tracking) { - uses.route = true; - } - return target[ - /** @type {'id'} */ - key2 - ]; - } - }), - url, - untrack(fn) { - is_tracking = false; - try { - return fn(); - } finally { - is_tracking = true; - } - } - }) - ); - return result2; - } - }); - return { - type: "data", - data: result ?? null, - uses, - slash - }; -} -async function load_data({ - event, - event_state, - fetched, - node, - parent, - server_data_promise, - state, - resolve_opts, - csr -}) { - const server_data_node = await server_data_promise; - const load = node?.universal?.load; - if (!load) { - return server_data_node?.data ?? null; - } - const result = await record_span({ - name: "sveltekit.load", - attributes: { - "sveltekit.load.node_id": node.universal_id || "unknown", - "sveltekit.load.node_type": get_node_type(node.universal_id), - "http.route": event.route.id || "unknown" - }, - fn: async (current2) => { - const traced_event = merge_tracing(event, current2); - return await with_request_store( - { event: traced_event, state: event_state }, - () => load.call(null, { - url: event.url, - params: event.params, - data: server_data_node?.data ?? null, - route: event.route, - fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts), - setHeaders: event.setHeaders, - depends: () => { - }, - parent, - untrack: (fn) => fn(), - tracing: traced_event.tracing - }) - ); - } - }); - return result ?? null; -} -function create_universal_fetch(event, state, fetched, csr, resolve_opts) { - const universal_fetch = async (input, init2) => { - const cloned_body = input instanceof Request && input.body ? input.clone().body : null; - const cloned_headers = input instanceof Request && [...input.headers].length ? new Headers(input.headers) : init2?.headers; - let response = await event.fetch(input, init2); - const url = new URL(input instanceof Request ? input.url : input, event.url); - const same_origin = url.origin === event.url.origin; - let dependency; - if (same_origin) { - if (state.prerendering) { - dependency = { response, body: null }; - state.prerendering.dependencies.set(url.pathname, dependency); - } - } else if (url.protocol === "https:" || url.protocol === "http:") { - const mode = input instanceof Request ? input.mode : init2?.mode ?? "cors"; - if (mode === "no-cors") { - response = new Response("", { - status: response.status, - statusText: response.statusText, - headers: response.headers - }); - } else { - const acao = response.headers.get("access-control-allow-origin"); - if (!acao || acao !== event.url.origin && acao !== "*") { - throw new Error( - `CORS error: ${acao ? "Incorrect" : "No"} 'Access-Control-Allow-Origin' header is present on the requested resource` - ); - } - } - } - let teed_body; - const proxy = new Proxy(response, { - get(response2, key2, receiver) { - async function push_fetched(body2, is_b64) { - const status_number = Number(response2.status); - if (isNaN(status_number)) { - throw new Error( - `response.status is not a number. value: "${response2.status}" type: ${typeof response2.status}` - ); - } - fetched.push({ - url: same_origin ? url.href.slice(event.url.origin.length) : url.href, - method: event.request.method, - request_body: ( - /** @type {string | ArrayBufferView | undefined} */ - input instanceof Request && cloned_body ? await stream_to_string(cloned_body) : init2?.body - ), - request_headers: cloned_headers, - response_body: body2, - response: response2, - is_b64 - }); - } - if (key2 === "body") { - if (response2.body === null) { - return null; - } - if (teed_body) { - return teed_body; - } - const [a, b] = response2.body.tee(); - void (async () => { - let result = new Uint8Array(); - for await (const chunk of a) { - const combined = new Uint8Array(result.length + chunk.length); - combined.set(result, 0); - combined.set(chunk, result.length); - result = combined; - } - if (dependency) { - dependency.body = new Uint8Array(result); - } - void push_fetched(base64_encode(result), true); - })(); - return teed_body = b; - } - if (key2 === "arrayBuffer") { - return async () => { - const buffer = await response2.arrayBuffer(); - const bytes = new Uint8Array(buffer); - if (dependency) { - dependency.body = bytes; - } - if (buffer instanceof ArrayBuffer) { - await push_fetched(base64_encode(bytes), true); - } - return buffer; - }; - } - async function text2() { - const body2 = await response2.text(); - if (body2 === "" && NULL_BODY_STATUS.includes(response2.status)) { - await push_fetched(void 0, false); - return void 0; - } - if (!body2 || typeof body2 === "string") { - await push_fetched(body2, false); - } - if (dependency) { - dependency.body = body2; - } - return body2; - } - if (key2 === "text") { - return text2; - } - if (key2 === "json") { - return async () => { - const body2 = await text2(); - return body2 ? JSON.parse(body2) : void 0; - }; - } - const value = Reflect.get(response2, key2, response2); - if (value instanceof Function) { - return Object.defineProperties( - /** - * @this {any} - */ - function() { - return Reflect.apply(value, this === receiver ? response2 : this, arguments); - }, - { - name: { value: value.name }, - length: { value: value.length } - } - ); - } - return value; - } - }); - if (csr) { - const get = response.headers.get; - response.headers.get = (key2) => { - const lower = key2.toLowerCase(); - const value = get.call(response.headers, lower); - if (value && !lower.startsWith("x-sveltekit-")) { - const included = resolve_opts.filterSerializedResponseHeaders(lower, value); - if (!included) { - throw new Error( - `Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#Server-hooks-handle (at ${event.route.id})` - ); - } - } - return value; - }; - } - return proxy; - }; - return (input, init2) => { - const response = universal_fetch(input, init2); - response.catch(() => { - }); - return response; - }; -} -async function stream_to_string(stream) { - let result = ""; - const reader = stream.getReader(); - while (true) { - const { done, value } = await reader.read(); - if (done) { - break; - } - result += text_decoder.decode(value); - } - return result; -} -function hash(...values) { - let hash2 = 5381; - for (const value of values) { - if (typeof value === "string") { - let i = value.length; - while (i) hash2 = hash2 * 33 ^ value.charCodeAt(--i); - } else if (ArrayBuffer.isView(value)) { - const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength); - let i = buffer.length; - while (i) hash2 = hash2 * 33 ^ buffer[--i]; - } else { - throw new TypeError("value must be a string or TypedArray"); - } - } - return (hash2 >>> 0).toString(36); -} -const replacements = { - "<": "\\u003C", - "\u2028": "\\u2028", - "\u2029": "\\u2029" -}; -const pattern = new RegExp(`[${Object.keys(replacements).join("")}]`, "g"); -function serialize_data(fetched, filter, prerendering = false) { - const headers2 = {}; - let cache_control = null; - let age = null; - let varyAny = false; - for (const [key2, value] of fetched.response.headers) { - if (filter(key2, value)) { - headers2[key2] = value; - } - if (key2 === "cache-control") cache_control = value; - else if (key2 === "age") age = value; - else if (key2 === "vary" && value.trim() === "*") varyAny = true; - } - const payload = { - status: fetched.response.status, - statusText: fetched.response.statusText, - headers: headers2, - body: fetched.response_body - }; - const safe_payload = JSON.stringify(payload).replace(pattern, (match) => replacements[match]); - const attrs = [ - 'type="application/json"', - "data-sveltekit-fetched", - `data-url="${escape_html(fetched.url, true)}"` - ]; - if (fetched.is_b64) { - attrs.push("data-b64"); - } - if (fetched.request_headers || fetched.request_body) { - const values = []; - if (fetched.request_headers) { - values.push([...new Headers(fetched.request_headers)].join(",")); - } - if (fetched.request_body) { - values.push(fetched.request_body); - } - attrs.push(`data-hash="${hash(...values)}"`); - } - if (!prerendering && fetched.method === "GET" && cache_control && !varyAny) { - const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control); - if (match) { - const ttl = +match[1] - +(age ?? "0"); - attrs.push(`data-ttl="${ttl}"`); - } - } - return `