wherever-dev 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drafts.d.ts +112 -0
- package/dist/drafts.d.ts.map +1 -0
- package/dist/drafts.js +265 -0
- package/dist/drafts.js.map +1 -0
- package/dist/index.js +112 -65
- package/dist/index.js.map +1 -1
- package/dist/session-pool.d.ts +23 -1
- package/dist/session-pool.d.ts.map +1 -1
- package/dist/session-pool.js +30 -7
- package/dist/session-pool.js.map +1 -1
- package/package.json +1 -1
- package/public/_app/immutable/assets/0.BS_EGmNW.css +1 -0
- package/public/_app/immutable/chunks/{Cs_pvO9R.js → 55QXfSWV.js} +2 -2
- package/public/_app/immutable/chunks/{Cs_pvO9R.js.map → 55QXfSWV.js.map} +1 -1
- package/public/_app/immutable/chunks/BeRKnBIj.js +3 -0
- package/public/_app/immutable/chunks/{itgD7vGH.js.map → BeRKnBIj.js.map} +1 -1
- package/public/_app/immutable/chunks/{Dtm96ZKi.js → C8CBGqeA.js} +2 -2
- package/public/_app/immutable/chunks/{Dtm96ZKi.js.map → C8CBGqeA.js.map} +1 -1
- package/public/_app/immutable/chunks/{RXasHx9k.js → CuGyzHtA.js} +2 -2
- package/public/_app/immutable/chunks/{RXasHx9k.js.map → CuGyzHtA.js.map} +1 -1
- package/public/_app/immutable/chunks/{CRRPBe07.js → Cum3gQOV.js} +2 -2
- package/public/_app/immutable/chunks/{CRRPBe07.js.map → Cum3gQOV.js.map} +1 -1
- package/public/_app/immutable/chunks/{CAWbdcQM.js → D5t5dKgW.js} +2 -2
- package/public/_app/immutable/chunks/{CAWbdcQM.js.map → D5t5dKgW.js.map} +1 -1
- package/public/_app/immutable/chunks/{ByLcLrZX.js → sERBGsNa.js} +2 -2
- package/public/_app/immutable/chunks/{ByLcLrZX.js.map → sERBGsNa.js.map} +1 -1
- package/public/_app/immutable/entry/app.DN0r_HfQ.js +3 -0
- package/public/_app/immutable/entry/{app.gwwyWULZ.js.map → app.DN0r_HfQ.js.map} +1 -1
- package/public/_app/immutable/entry/start.CSyfkZFS.js +2 -0
- package/public/_app/immutable/entry/start.CSyfkZFS.js.map +1 -0
- package/public/_app/immutable/nodes/{0.B5eCDNfb.js → 0.BhHgt5Z6.js} +3 -3
- package/public/_app/immutable/nodes/{0.B5eCDNfb.js.map → 0.BhHgt5Z6.js.map} +1 -1
- package/public/_app/immutable/nodes/1.B9mDAaoD.js +2 -0
- package/public/_app/immutable/nodes/{1.B92A9EWe.js.map → 1.B9mDAaoD.js.map} +1 -1
- package/public/_app/immutable/nodes/2.BjlQDhkN.js +110 -0
- package/public/_app/immutable/nodes/2.BjlQDhkN.js.map +1 -0
- package/public/_app/version.json +1 -1
- package/public/index.html +15 -15
- package/public/service-worker.js +1 -1
- package/public/_app/immutable/assets/0.BnJtv5fG.css +0 -1
- package/public/_app/immutable/chunks/itgD7vGH.js +0 -3
- package/public/_app/immutable/entry/app.gwwyWULZ.js +0 -3
- package/public/_app/immutable/entry/start.CAV5FIFt.js +0 -2
- package/public/_app/immutable/entry/start.CAV5FIFt.js.map +0 -1
- package/public/_app/immutable/nodes/1.B92A9EWe.js +0 -2
- package/public/_app/immutable/nodes/2.DKpq2-9F.js +0 -104
- package/public/_app/immutable/nodes/2.DKpq2-9F.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dtm96ZKi.js","sources":["../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/reactivity/store.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/blocks/branches.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/blocks/if.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/reactivity/props.js"],"sourcesContent":["/** @import { StoreReferencesContainer } from '#client' */\n/** @import { Store } from '#shared' */\nimport { subscribe_to_store } from '../../../store/utils.js';\nimport { get as get_store } from '../../../store/shared/index.js';\nimport { define_property, noop } from '../../shared/utils.js';\nimport { get } from '../runtime.js';\nimport { teardown } from './effects.js';\nimport { mutable_source, set } from './sources.js';\nimport { DEV } from 'esm-env';\n\n/**\n * We set this to `true` when updating a store so that we correctly\n * schedule effects if the update takes place inside a `$:` effect\n */\nexport let legacy_is_updating_store = false;\n\n/**\n * Whether or not the prop currently being read is a store binding, as in\n * `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in\n * runes mode, and skip `binding_property_non_reactive` validation\n */\nlet is_store_binding = false;\n\nlet IS_UNMOUNTED = Symbol('unmounted');\n\n/**\n * Gets the current value of a store. If the store isn't subscribed to yet, it will create a proxy\n * signal that will be updated when the store is. The store references container is needed to\n * track reassignments to stores and to track the correct component context.\n * @template V\n * @param {Store<V> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n * @returns {V}\n */\nexport function store_get(store, store_name, stores) {\n\tconst entry = (stores[store_name] ??= {\n\t\tstore: null,\n\t\tsource: mutable_source(undefined),\n\t\tunsubscribe: noop\n\t});\n\n\tif (DEV) {\n\t\tentry.source.label = store_name;\n\t}\n\n\t// if the component that setup this is already unmounted we don't want to register a subscription\n\tif (entry.store !== store && !(IS_UNMOUNTED in stores)) {\n\t\tentry.unsubscribe();\n\t\tentry.store = store ?? null;\n\n\t\tif (store == null) {\n\t\t\tentry.source.v = undefined; // see synchronous callback comment below\n\t\t\tentry.unsubscribe = noop;\n\t\t} else {\n\t\t\tvar is_synchronous_callback = true;\n\n\t\t\tentry.unsubscribe = subscribe_to_store(store, (v) => {\n\t\t\t\tif (is_synchronous_callback) {\n\t\t\t\t\t// If the first updates to the store value (possibly multiple of them) are synchronously\n\t\t\t\t\t// inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value\n\t\t\t\t\tentry.source.v = v;\n\t\t\t\t} else {\n\t\t\t\t\tset(entry.source, v);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tis_synchronous_callback = false;\n\t\t}\n\t}\n\n\t// if the component that setup this stores is already unmounted the source will be out of sync\n\t// so we just use the `get` for the stores, less performant but it avoids to create a memory leak\n\t// and it will keep the value consistent\n\tif (store && IS_UNMOUNTED in stores) {\n\t\treturn get_store(store);\n\t}\n\n\treturn get(entry.source);\n}\n\n/**\n * Unsubscribe from a store if it's not the same as the one in the store references container.\n * We need this in addition to `store_get` because someone could unsubscribe from a store but\n * then never subscribe to the new one (if any), causing the subscription to stay open wrongfully.\n * @param {Store<any> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n */\nexport function store_unsub(store, store_name, stores) {\n\t/** @type {StoreReferencesContainer[''] | undefined} */\n\tlet entry = stores[store_name];\n\n\tif (entry && entry.store !== store) {\n\t\t// Don't reset store yet, so that store_get above can resubscribe to new store if necessary\n\t\tentry.unsubscribe();\n\t\tentry.unsubscribe = noop;\n\t}\n\n\treturn store;\n}\n\n/**\n * Sets the new value of a store and returns that value.\n * @template V\n * @param {Store<V>} store\n * @param {V} value\n * @returns {V}\n */\nexport function store_set(store, value) {\n\tupdate_with_flag(store, value);\n\treturn value;\n}\n\n/**\n * @param {StoreReferencesContainer} stores\n * @param {string} store_name\n */\nexport function invalidate_store(stores, store_name) {\n\tvar entry = stores[store_name];\n\tif (entry.store !== null) {\n\t\tstore_set(entry.store, entry.source.v);\n\t}\n}\n\n/**\n * Unsubscribes from all auto-subscribed stores on destroy\n * @returns {[StoreReferencesContainer, ()=>void]}\n */\nexport function setup_stores() {\n\t/** @type {StoreReferencesContainer} */\n\tconst stores = {};\n\n\tfunction cleanup() {\n\t\tteardown(() => {\n\t\t\tfor (var store_name in stores) {\n\t\t\t\tconst ref = stores[store_name];\n\t\t\t\tref.unsubscribe();\n\t\t\t}\n\t\t\tdefine_property(stores, IS_UNMOUNTED, {\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t});\n\t}\n\n\treturn [stores, cleanup];\n}\n\n/**\n * @param {Store<V>} store\n * @param {V} value\n * @template V\n */\nfunction update_with_flag(store, value) {\n\tlegacy_is_updating_store = true;\n\n\ttry {\n\t\tstore.set(value);\n\t} finally {\n\t\tlegacy_is_updating_store = false;\n\t}\n}\n\n/**\n * Updates a store with a new value.\n * @param {Store<V>} store the store to update\n * @param {any} expression the expression that mutates the store\n * @param {V} new_value the new store value\n * @template V\n */\nexport function store_mutate(store, expression, new_value) {\n\tupdate_with_flag(store, new_value);\n\treturn expression;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_store(store, store_value, d = 1) {\n\tupdate_with_flag(store, store_value + d);\n\treturn store_value;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_store(store, store_value, d = 1) {\n\tconst value = store_value + d;\n\tupdate_with_flag(store, value);\n\treturn value;\n}\n\n/**\n * Called inside prop getters to communicate that the prop is a store binding\n */\nexport function mark_store_binding() {\n\tis_store_binding = true;\n}\n\n/**\n * Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.\n * Used to prevent `binding_property_non_reactive` validation false positives and\n * ensure that these props are treated as mutable even in runes mode\n * @template T\n * @param {() => T} fn\n * @returns {[T, boolean]}\n */\nexport function capture_store_binding(fn) {\n\tvar previous_is_store_binding = is_store_binding;\n\n\ttry {\n\t\tis_store_binding = false;\n\t\treturn [fn(), is_store_binding];\n\t} finally {\n\t\tis_store_binding = previous_is_store_binding;\n\t}\n}\n","/** @import { Effect, TemplateNode } from '#client' */\nimport { Batch, current_batch } from '../../reactivity/batch.js';\nimport {\n\tbranch,\n\tdestroy_effect,\n\tmove_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { HMR_ANCHOR } from '../../constants.js';\nimport { hydrate_node, hydrating } from '../hydration.js';\nimport { create_text, should_defer_append } from '../operations.js';\nimport { DEV } from 'esm-env';\n\n/**\n * @typedef {{ effect: Effect, fragment: DocumentFragment }} Branch\n */\n\n/**\n * @template Key\n */\nexport class BranchManager {\n\t/** @type {TemplateNode} */\n\tanchor;\n\n\t/** @type {Map<Batch, Key>} */\n\t#batches = new Map();\n\n\t/**\n\t * Map of keys to effects that are currently rendered in the DOM.\n\t * These effects are visible and actively part of the document tree.\n\t * Example:\n\t * ```\n\t * {#if condition}\n\t * \tfoo\n\t * {:else}\n\t * \tbar\n\t * {/if}\n\t * ```\n\t * Can result in the entries `true->Effect` and `false->Effect`\n\t * @type {Map<Key, Effect>}\n\t */\n\t#onscreen = new Map();\n\n\t/**\n\t * Similar to #onscreen with respect to the keys, but contains branches that are not yet\n\t * in the DOM, because their insertion is deferred.\n\t * @type {Map<Key, Branch>}\n\t */\n\t#offscreen = new Map();\n\n\t/**\n\t * Keys of effects that are currently outroing\n\t * @type {Set<Key>}\n\t */\n\t#outroing = new Set();\n\n\t/**\n\t * Whether to pause (i.e. outro) on change, or destroy immediately.\n\t * This is necessary for `<svelte:element>`\n\t */\n\t#transition = true;\n\n\t/**\n\t * @param {TemplateNode} anchor\n\t * @param {boolean} transition\n\t */\n\tconstructor(anchor, transition = true) {\n\t\tthis.anchor = anchor;\n\t\tthis.#transition = transition;\n\t}\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\t#commit = (batch) => {\n\t\t// if this batch was made obsolete, bail\n\t\tif (!this.#batches.has(batch)) return;\n\n\t\tvar key = /** @type {Key} */ (this.#batches.get(batch));\n\n\t\tvar onscreen = this.#onscreen.get(key);\n\n\t\tif (onscreen) {\n\t\t\t// effect is already in the DOM — abort any current outro\n\t\t\tresume_effect(onscreen);\n\t\t\tthis.#outroing.delete(key);\n\t\t} else {\n\t\t\t// effect is currently offscreen. put it in the DOM\n\t\t\tvar offscreen = this.#offscreen.get(key);\n\n\t\t\tif (offscreen) {\n\t\t\t\tthis.#onscreen.set(key, offscreen.effect);\n\t\t\t\tthis.#offscreen.delete(key);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\t// Tell hmr.js about the anchor it should use for updates,\n\t\t\t\t\t// since the initial one will be removed\n\t\t\t\t\t/** @type {any} */ (offscreen.fragment.lastChild)[HMR_ANCHOR] = this.anchor;\n\t\t\t\t}\n\n\t\t\t\t// remove the anchor...\n\t\t\t\t/** @type {TemplateNode} */ (offscreen.fragment.lastChild).remove();\n\n\t\t\t\t// ...and append the fragment\n\t\t\t\tthis.anchor.before(offscreen.fragment);\n\t\t\t\tonscreen = offscreen.effect;\n\t\t\t}\n\t\t}\n\n\t\tfor (const [b, k] of this.#batches) {\n\t\t\tthis.#batches.delete(b);\n\n\t\t\tif (b === batch) {\n\t\t\t\t// keep values for newer batches\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst offscreen = this.#offscreen.get(k);\n\n\t\t\tif (offscreen) {\n\t\t\t\t// for older batches, destroy offscreen effects\n\t\t\t\t// as they will never be committed\n\t\t\t\tdestroy_effect(offscreen.effect);\n\t\t\t\tthis.#offscreen.delete(k);\n\t\t\t}\n\t\t}\n\n\t\t// outro/destroy all onscreen effects...\n\t\tfor (const [k, effect] of this.#onscreen) {\n\t\t\t// ...except the one that was just committed\n\t\t\t// or those that are already outroing (else the transition is aborted and the effect destroyed right away)\n\t\t\tif (k === key || this.#outroing.has(k)) continue;\n\n\t\t\tconst on_destroy = () => {\n\t\t\t\tconst keys = Array.from(this.#batches.values());\n\n\t\t\t\tif (keys.includes(k)) {\n\t\t\t\t\t// keep the effect offscreen, as another batch will need it\n\t\t\t\t\tvar fragment = document.createDocumentFragment();\n\t\t\t\t\tmove_effect(effect, fragment);\n\n\t\t\t\t\tfragment.append(create_text()); // TODO can we avoid this?\n\n\t\t\t\t\tthis.#offscreen.set(k, { effect, fragment });\n\t\t\t\t} else {\n\t\t\t\t\tdestroy_effect(effect);\n\t\t\t\t}\n\n\t\t\t\tthis.#outroing.delete(k);\n\t\t\t\tthis.#onscreen.delete(k);\n\t\t\t};\n\n\t\t\tif (this.#transition || !onscreen) {\n\t\t\t\tthis.#outroing.add(k);\n\t\t\t\tpause_effect(effect, on_destroy, false);\n\t\t\t} else {\n\t\t\t\ton_destroy();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\t#discard = (batch) => {\n\t\tthis.#batches.delete(batch);\n\n\t\tconst keys = Array.from(this.#batches.values());\n\n\t\tfor (const [k, branch] of this.#offscreen) {\n\t\t\tif (!keys.includes(k)) {\n\t\t\t\tdestroy_effect(branch.effect);\n\t\t\t\tthis.#offscreen.delete(k);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t *\n\t * @param {any} key\n\t * @param {null | ((target: TemplateNode) => void)} fn\n\t */\n\tensure(key, fn) {\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tif (fn && !this.#onscreen.has(key) && !this.#offscreen.has(key)) {\n\t\t\tif (defer) {\n\t\t\t\tvar fragment = document.createDocumentFragment();\n\t\t\t\tvar target = create_text();\n\n\t\t\t\tfragment.append(target);\n\n\t\t\t\tthis.#offscreen.set(key, {\n\t\t\t\t\teffect: branch(() => fn(target)),\n\t\t\t\t\tfragment\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.#onscreen.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tbranch(() => fn(this.anchor))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.#batches.set(batch, key);\n\n\t\tif (defer) {\n\t\t\tfor (const [k, effect] of this.#onscreen) {\n\t\t\t\tif (k === key) {\n\t\t\t\t\tbatch.unskip_effect(effect);\n\t\t\t\t} else {\n\t\t\t\t\tbatch.skip_effect(effect);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const [k, branch] of this.#offscreen) {\n\t\t\t\tif (k === key) {\n\t\t\t\t\tbatch.unskip_effect(branch.effect);\n\t\t\t\t} else {\n\t\t\t\t\tbatch.skip_effect(branch.effect);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbatch.oncommit(this.#commit);\n\t\t\tbatch.ondiscard(this.#discard);\n\t\t} else {\n\t\t\tif (hydrating) {\n\t\t\t\tthis.anchor = hydrate_node;\n\t\t\t}\n\n\t\t\tthis.#commit(batch);\n\t\t}\n\t}\n}\n","/** @import { TemplateNode } from '#client' */\nimport { EFFECT_TRANSPARENT } from '#client/constants';\nimport {\n\thydrate_next,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating,\n\thydrate_node\n} from '../hydration.js';\nimport { block } from '../../reactivity/effects.js';\nimport { BranchManager } from './branches.js';\n\n/**\n * @param {TemplateNode} node\n * @param {(branch: (fn: (anchor: Node) => void, key?: number | false) => void) => void} fn\n * @param {boolean} [elseif] True if this is an `{:else if ...}` block rather than an `{#if ...}`, as that affects which transitions are considered 'local'\n * @returns {void}\n */\nexport function if_block(node, fn, elseif = false) {\n\t/** @type {TemplateNode | undefined} */\n\tvar marker;\n\tif (hydrating) {\n\t\tmarker = hydrate_node;\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\tvar flags = elseif ? EFFECT_TRANSPARENT : 0;\n\n\t/**\n\t * @param {number | false} key\n\t * @param {null | ((anchor: Node) => void)} fn\n\t */\n\tfunction update_branch(key, fn) {\n\t\tif (hydrating) {\n\t\t\tvar data = read_hydration_instruction(/** @type {TemplateNode} */ (marker));\n\n\t\t\t// \"[n\" = branch n, \"[-1\" = else\n\t\t\tif (key !== parseInt(data.substring(1))) {\n\t\t\t\t// Hydration mismatch: remove everything inside the anchor and start fresh.\n\t\t\t\t// This could happen with `{#if browser}...{/if}`, for example\n\t\t\t\tvar anchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tbranches.anchor = anchor;\n\n\t\t\t\tset_hydrating(false);\n\t\t\t\tbranches.ensure(key, fn);\n\t\t\t\tset_hydrating(true);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tbranches.ensure(key, fn);\n\t}\n\n\tblock(() => {\n\t\tvar has_branch = false;\n\n\t\tfn((fn, key = 0) => {\n\t\t\thas_branch = true;\n\t\t\tupdate_branch(key, fn);\n\t\t});\n\n\t\tif (!has_branch) {\n\t\t\tupdate_branch(-1, null);\n\t\t}\n\t}, flags);\n}\n","/** @import { Derived, Effect, Source } from './types.js' */\nimport { DEV } from 'esm-env';\nimport {\n\tPROPS_IS_BINDABLE,\n\tPROPS_IS_IMMUTABLE,\n\tPROPS_IS_LAZY_INITIAL,\n\tPROPS_IS_RUNES,\n\tPROPS_IS_UPDATED\n} from '../../../constants.js';\nimport { get_descriptor, is_function } from '../../shared/utils.js';\nimport { set, source, update } from './sources.js';\nimport { derived, derived_safe_equal } from './deriveds.js';\nimport {\n\tactive_effect,\n\tget,\n\tis_destroying_effect,\n\tset_active_effect,\n\tuntrack\n} from '../runtime.js';\nimport * as e from '../errors.js';\nimport { DESTROYED, LEGACY_PROPS, STATE_SYMBOL } from '#client/constants';\nimport { proxy } from '../proxy.js';\nimport { capture_store_binding } from './store.js';\nimport { legacy_mode_flag } from '../../flags/index.js';\nimport { effect, render_effect } from './effects.js';\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_prop(fn, d = 1) {\n\tconst value = fn();\n\tfn(value + d);\n\treturn value;\n}\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_prop(fn, d = 1) {\n\tconst value = fn() + d;\n\tfn(value);\n\treturn value;\n}\n\n/**\n * The proxy handler for rest props (i.e. `const { x, ...rest } = $props()`).\n * Is passed the full `$$props` object and excludes the named props.\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name?: string }>}}\n */\nconst rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\treturn target.props[key];\n\t},\n\tset(target, key) {\n\t\tif (DEV) {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.props_rest_readonly(`${target.name}.${String(key)}`);\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @param {string} [name]\n * @returns {Record<string, unknown>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function rest_props(props, exclude, name) {\n\treturn new Proxy(\n\t\tDEV ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude },\n\t\trest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for legacy $$restProps and $$props\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, special: Record<string | symbol, (v?: unknown) => unknown>, version: Source<number>, parent_effect: Effect }>}}\n */\nconst legacy_rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tget(target.version);\n\t\treturn key in target.special ? target.special[key]() : target.props[key];\n\t},\n\tset(target, key, value) {\n\t\tif (!(key in target.special)) {\n\t\t\tvar previous_effect = active_effect;\n\n\t\t\ttry {\n\t\t\t\tset_active_effect(target.parent_effect);\n\n\t\t\t\t// Handle props that can temporarily get out of sync with the parent\n\t\t\t\t/** @type {Record<string, (v?: unknown) => unknown>} */\n\t\t\t\ttarget.special[key] = prop(\n\t\t\t\t\t{\n\t\t\t\t\t\tget [key]() {\n\t\t\t\t\t\t\treturn target.props[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t/** @type {string} */ (key),\n\t\t\t\t\tPROPS_IS_UPDATED\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tset_active_effect(previous_effect);\n\t\t\t}\n\t\t}\n\n\t\ttarget.special[key](value);\n\t\tupdate(target.version); // $$props is coarse-grained: when $$props.x is updated, usages of $$props.y etc are also rerun\n\t\treturn true;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\tdeleteProperty(target, key) {\n\t\t// Svelte 4 allowed for deletions on $$restProps\n\t\tif (target.exclude.includes(key)) return true;\n\t\ttarget.exclude.push(key);\n\t\tupdate(target.version);\n\t\treturn true;\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @returns {Record<string, unknown>}\n */\nexport function legacy_rest_props(props, exclude) {\n\treturn new Proxy(\n\t\t{\n\t\t\tprops,\n\t\t\texclude,\n\t\t\tspecial: {},\n\t\t\tversion: source(0),\n\t\t\t// TODO this is only necessary because we need to track component\n\t\t\t// destruction inside `prop`, because of `bind:this`, but it\n\t\t\t// seems likely that we can simplify `bind:this` instead\n\t\t\tparent_effect: /** @type {Effect} */ (active_effect)\n\t\t},\n\t\tlegacy_rest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for spread props. Handles the incoming array of props\n * that looks like `() => { dynamic: props }, { static: prop }, ..` and wraps\n * them so that the whole thing is passed to the component as the `$$props` argument.\n * @type {ProxyHandler<{ props: Array<Record<string | symbol, unknown> | (() => Record<string | symbol, unknown>)> }>}}\n */\nconst spread_props_handler = {\n\tget(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) return p[key];\n\t\t}\n\t},\n\tset(target, key, value) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tconst desc = get_descriptor(p, key);\n\t\t\tif (desc && desc.set) {\n\t\t\t\tdesc.set(value);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) {\n\t\t\t\tconst descriptor = get_descriptor(p, key);\n\t\t\t\tif (descriptor && !descriptor.configurable) {\n\t\t\t\t\t// Prevent a \"Non-configurability Report Error\": The target is an array, it does\n\t\t\t\t\t// not actually contain this property. If it is now described as non-configurable,\n\t\t\t\t\t// the proxy throws a validation error. Setting it to true avoids that.\n\t\t\t\t\tdescriptor.configurable = true;\n\t\t\t\t}\n\t\t\t\treturn descriptor;\n\t\t\t}\n\t\t}\n\t},\n\thas(target, key) {\n\t\t// To prevent a false positive `is_entry_props` in the `prop` function\n\t\tif (key === STATE_SYMBOL || key === LEGACY_PROPS) return false;\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (p != null && key in p) return true;\n\t\t}\n\n\t\treturn false;\n\t},\n\townKeys(target) {\n\t\t/** @type {Array<string | symbol>} */\n\t\tconst keys = [];\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (!p) continue;\n\n\t\t\tfor (const key in p) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\n\t\t\tfor (const key of Object.getOwnPropertySymbols(p)) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\t\t}\n\n\t\treturn keys;\n\t}\n};\n\n/**\n * @param {Array<Record<string, unknown> | (() => Record<string, unknown>)>} props\n * @returns {any}\n */\nexport function spread_props(...props) {\n\treturn new Proxy({ props }, spread_props_handler);\n}\n\n/**\n * This function is responsible for synchronizing a possibly bound prop with the inner component state.\n * It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.\n * @template V\n * @param {Record<string, unknown>} props\n * @param {string} key\n * @param {number} flags\n * @param {V | (() => V)} [fallback]\n * @returns {(() => V | ((arg: V) => V) | ((arg: V, mutation: boolean) => V))}\n */\nexport function prop(props, key, flags, fallback) {\n\tvar runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;\n\tvar bindable = (flags & PROPS_IS_BINDABLE) !== 0;\n\tvar lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;\n\n\tvar fallback_value = /** @type {V} */ (fallback);\n\tvar fallback_dirty = true;\n\tvar fallback_signal = /** @type {Derived<V> | undefined} */ (undefined);\n\n\tvar get_fallback = () => {\n\t\tif (lazy && runes) {\n\t\t\tfallback_signal ??= derived(/** @type {() => V} */ (fallback));\n\t\t\treturn get(fallback_signal);\n\t\t}\n\n\t\tif (fallback_dirty) {\n\t\t\tfallback_dirty = false;\n\n\t\t\tfallback_value = lazy\n\t\t\t\t? untrack(/** @type {() => V} */ (fallback))\n\t\t\t\t: /** @type {V} */ (fallback);\n\t\t}\n\n\t\treturn fallback_value;\n\t};\n\n\t/** @type {((v: V) => void) | undefined} */\n\tlet setter;\n\n\tif (bindable) {\n\t\t// Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`\n\t\t// or `createClassComponent(Component, props)`\n\t\tvar is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;\n\n\t\tsetter =\n\t\t\tget_descriptor(props, key)?.set ??\n\t\t\t(is_entry_props && key in props ? (v) => (props[key] = v) : undefined);\n\t}\n\n\t/** @type {V} */\n\tvar initial_value;\n\tvar is_store_sub = false;\n\n\tif (bindable) {\n\t\t[initial_value, is_store_sub] = capture_store_binding(() => /** @type {V} */ (props[key]));\n\t} else {\n\t\tinitial_value = /** @type {V} */ (props[key]);\n\t}\n\n\tif (initial_value === undefined && fallback !== undefined) {\n\t\tinitial_value = get_fallback();\n\n\t\tif (setter) {\n\t\t\tif (runes) e.props_invalid_value(key);\n\t\t\tsetter(initial_value);\n\t\t}\n\t}\n\n\t/** @type {() => V} */\n\tvar getter;\n\n\tif (runes) {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\t\t\tif (value === undefined) return get_fallback();\n\t\t\tfallback_dirty = true;\n\t\t\treturn value;\n\t\t};\n\t} else {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\n\t\t\tif (value !== undefined) {\n\t\t\t\t// in legacy mode, we don't revert to the fallback value\n\t\t\t\t// if the prop goes from defined to undefined. The easiest\n\t\t\t\t// way to model this is to make the fallback undefined\n\t\t\t\t// as soon as the prop has a value\n\t\t\t\tfallback_value = /** @type {V} */ (undefined);\n\t\t\t}\n\n\t\t\treturn value === undefined ? fallback_value : value;\n\t\t};\n\t}\n\n\t// prop is never written to — we only need a getter\n\tif (runes && (flags & PROPS_IS_UPDATED) === 0) {\n\t\treturn getter;\n\t}\n\n\t// prop is written to, but the parent component had `bind:foo` which\n\t// means we can just call `$$props.foo = value` directly\n\tif (setter) {\n\t\tvar legacy_parent = props.$$legacy;\n\t\treturn /** @type {() => V} */ (\n\t\t\tfunction (/** @type {V} */ value, /** @type {boolean} */ mutation) {\n\t\t\t\tif (arguments.length > 0) {\n\t\t\t\t\t// We don't want to notify if the value was mutated and the parent is in runes mode.\n\t\t\t\t\t// In that case the state proxy (if it exists) should take care of the notification.\n\t\t\t\t\t// If the parent is not in runes mode, we need to notify on mutation, too, that the prop\n\t\t\t\t\t// has changed because the parent will not be able to detect the change otherwise.\n\t\t\t\t\tif (!runes || !mutation || legacy_parent || is_store_sub) {\n\t\t\t\t\t\t/** @type {Function} */ (setter)(mutation ? getter() : value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\n\t\t\t\treturn getter();\n\t\t\t}\n\t\t);\n\t}\n\n\t// Either prop is written to, but there's no binding, which means we\n\t// create a derived that we can write to locally.\n\t// Or we are in legacy mode where we always create a derived to replicate that\n\t// Svelte 4 did not trigger updates when a primitive value was updated to the same value.\n\tvar overridden = false;\n\n\tvar d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => {\n\t\toverridden = false;\n\t\treturn getter();\n\t});\n\n\tif (DEV) {\n\t\td.label = key;\n\t}\n\n\t// Capture the initial value if it's bindable\n\tif (bindable) get(d);\n\n\tvar parent_effect = /** @type {Effect} */ (active_effect);\n\n\treturn /** @type {() => V} */ (\n\t\tfunction (/** @type {any} */ value, /** @type {boolean} */ mutation) {\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconst new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value;\n\n\t\t\t\tset(d, new_value);\n\t\t\t\toverridden = true;\n\n\t\t\t\tif (fallback_value !== undefined) {\n\t\t\t\t\tfallback_value = new_value;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\t// special case — avoid recalculating the derived if we're in a\n\t\t\t// teardown function and the prop was overridden locally, or the\n\t\t\t// component was already destroyed (people could access props in a timeout)\n\t\t\tif ((is_destroying_effect && overridden) || (parent_effect.f & DESTROYED) !== 0) {\n\t\t\t\treturn d.v;\n\t\t\t}\n\n\t\t\treturn get(d);\n\t\t}\n\t);\n}\n"],"names":["is_store_binding","IS_UNMOUNTED","store_get","store","store_name","stores","entry","mutable_source","noop","is_synchronous_callback","subscribe_to_store","v","set","get_store","get","setup_stores","cleanup","teardown","define_property","capture_store_binding","fn","previous_is_store_binding","BranchManager","#batches","#onscreen","#offscreen","#outroing","#transition","anchor","transition","#commit","batch","key","onscreen","resume_effect","offscreen","b","k","destroy_effect","effect","on_destroy","fragment","move_effect","create_text","pause_effect","#discard","keys","branch","current_batch","defer","should_defer_append","target","hydrating","hydrate_node","if_block","node","elseif","marker","hydrate_next","branches","flags","EFFECT_TRANSPARENT","update_branch","data","read_hydration_instruction","skip_nodes","set_hydrate_node","set_hydrating","block","has_branch","prop","props","fallback","runes","legacy_mode_flag","PROPS_IS_RUNES","bindable","PROPS_IS_BINDABLE","lazy","PROPS_IS_LAZY_INITIAL","fallback_value","fallback_dirty","fallback_signal","get_fallback","derived","untrack","setter","is_entry_props","STATE_SYMBOL","LEGACY_PROPS","get_descriptor","initial_value","is_store_sub","e.props_invalid_value","getter","value","PROPS_IS_UPDATED","legacy_parent","mutation","overridden","d","PROPS_IS_IMMUTABLE","derived_safe_equal","parent_effect","active_effect","new_value","proxy","is_destroying_effect","DESTROYED"],"mappings":"4WAqBA,IAAIA,EAAmB,GAEnBC,EAAe,OAAO,WAAW,EAY9B,SAASC,GAAUC,EAAOC,EAAYC,EAAQ,CACpD,MAAMC,EAASD,EAAOD,CAAU,IAAM,CACrC,MAAO,KACP,OAAQG,EAAe,MAAS,EAChC,YAAaC,CACf,EAOC,GAAIF,EAAM,QAAUH,GAAS,EAAEF,KAAgBI,GAI9C,GAHAC,EAAM,YAAW,EACjBA,EAAM,MAAQH,GAAS,KAEnBA,GAAS,KACZG,EAAM,OAAO,EAAI,OACjBA,EAAM,YAAcE,MACd,CACN,IAAIC,EAA0B,GAE9BH,EAAM,YAAcI,EAAmBP,EAAQQ,GAAM,CAChDF,EAGHH,EAAM,OAAO,EAAIK,EAEjBC,EAAIN,EAAM,OAAQK,CAAC,CAErB,CAAC,EAEDF,EAA0B,EAC3B,CAMD,OAAIN,GAASF,KAAgBI,EACrBQ,EAAUV,CAAK,EAGhBW,EAAIR,EAAM,MAAM,CACxB,CAkDO,SAASS,IAAe,CAE9B,MAAMV,EAAS,CAAA,EAEf,SAASW,GAAU,CAClBC,EAAS,IAAM,CACd,QAASb,KAAcC,EACVA,EAAOD,CAAU,EACzB,YAAW,E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AAM,EAAKC,CAAK,EAGtDA,GAGDD,EAAM,CACd,EAEF,CAMA,IAAIK,EAAa,GAEbC,IAAMxC,EAAQyC,MAAwB,EAAIjB,EAAUkB,IAAoB,KAC3EH,EAAa,GACNL,EAAM,EACb,EAOGlB,GAAU9D,EAAIsF,CAAC,EAEnB,IAAIG,EAAuCC,GAE3C,OACC,SAA6BT,EAA8BG,EAAU,CACpE,GAAI,UAAU,OAAS,EAAG,CACzB,MAAMO,EAAYP,EAAWpF,EAAIsF,CAAC,EAAI3B,GAASG,EAAW8B,EAAMX,CAAK,EAAIA,EAEzE,OAAAnF,EAAIwF,EAAGK,CAAS,EAChBN,EAAa,GAETnB,IAAmB,SACtBA,EAAiByB,GAGXV,CACR,CAKA,OAAKY,IAAwBR,IAAgBI,EAAc,EAAIK,MAAe,EACtER,EAAE,EAGHtF,EAAIsF,CAAC,CACb,EAEF","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"C8CBGqeA.js","sources":["../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/reactivity/store.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/blocks/branches.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/dom/blocks/if.js","../../../../../../../node_modules/.pnpm/svelte@5.55.9/node_modules/svelte/src/internal/client/reactivity/props.js"],"sourcesContent":["/** @import { StoreReferencesContainer } from '#client' */\n/** @import { Store } from '#shared' */\nimport { subscribe_to_store } from '../../../store/utils.js';\nimport { get as get_store } from '../../../store/shared/index.js';\nimport { define_property, noop } from '../../shared/utils.js';\nimport { get } from '../runtime.js';\nimport { teardown } from './effects.js';\nimport { mutable_source, set } from './sources.js';\nimport { DEV } from 'esm-env';\n\n/**\n * We set this to `true` when updating a store so that we correctly\n * schedule effects if the update takes place inside a `$:` effect\n */\nexport let legacy_is_updating_store = false;\n\n/**\n * Whether or not the prop currently being read is a store binding, as in\n * `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in\n * runes mode, and skip `binding_property_non_reactive` validation\n */\nlet is_store_binding = false;\n\nlet IS_UNMOUNTED = Symbol('unmounted');\n\n/**\n * Gets the current value of a store. If the store isn't subscribed to yet, it will create a proxy\n * signal that will be updated when the store is. The store references container is needed to\n * track reassignments to stores and to track the correct component context.\n * @template V\n * @param {Store<V> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n * @returns {V}\n */\nexport function store_get(store, store_name, stores) {\n\tconst entry = (stores[store_name] ??= {\n\t\tstore: null,\n\t\tsource: mutable_source(undefined),\n\t\tunsubscribe: noop\n\t});\n\n\tif (DEV) {\n\t\tentry.source.label = store_name;\n\t}\n\n\t// if the component that setup this is already unmounted we don't want to register a subscription\n\tif (entry.store !== store && !(IS_UNMOUNTED in stores)) {\n\t\tentry.unsubscribe();\n\t\tentry.store = store ?? null;\n\n\t\tif (store == null) {\n\t\t\tentry.source.v = undefined; // see synchronous callback comment below\n\t\t\tentry.unsubscribe = noop;\n\t\t} else {\n\t\t\tvar is_synchronous_callback = true;\n\n\t\t\tentry.unsubscribe = subscribe_to_store(store, (v) => {\n\t\t\t\tif (is_synchronous_callback) {\n\t\t\t\t\t// If the first updates to the store value (possibly multiple of them) are synchronously\n\t\t\t\t\t// inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value\n\t\t\t\t\tentry.source.v = v;\n\t\t\t\t} else {\n\t\t\t\t\tset(entry.source, v);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tis_synchronous_callback = false;\n\t\t}\n\t}\n\n\t// if the component that setup this stores is already unmounted the source will be out of sync\n\t// so we just use the `get` for the stores, less performant but it avoids to create a memory leak\n\t// and it will keep the value consistent\n\tif (store && IS_UNMOUNTED in stores) {\n\t\treturn get_store(store);\n\t}\n\n\treturn get(entry.source);\n}\n\n/**\n * Unsubscribe from a store if it's not the same as the one in the store references container.\n * We need this in addition to `store_get` because someone could unsubscribe from a store but\n * then never subscribe to the new one (if any), causing the subscription to stay open wrongfully.\n * @param {Store<any> | null | undefined} store\n * @param {string} store_name\n * @param {StoreReferencesContainer} stores\n */\nexport function store_unsub(store, store_name, stores) {\n\t/** @type {StoreReferencesContainer[''] | undefined} */\n\tlet entry = stores[store_name];\n\n\tif (entry && entry.store !== store) {\n\t\t// Don't reset store yet, so that store_get above can resubscribe to new store if necessary\n\t\tentry.unsubscribe();\n\t\tentry.unsubscribe = noop;\n\t}\n\n\treturn store;\n}\n\n/**\n * Sets the new value of a store and returns that value.\n * @template V\n * @param {Store<V>} store\n * @param {V} value\n * @returns {V}\n */\nexport function store_set(store, value) {\n\tupdate_with_flag(store, value);\n\treturn value;\n}\n\n/**\n * @param {StoreReferencesContainer} stores\n * @param {string} store_name\n */\nexport function invalidate_store(stores, store_name) {\n\tvar entry = stores[store_name];\n\tif (entry.store !== null) {\n\t\tstore_set(entry.store, entry.source.v);\n\t}\n}\n\n/**\n * Unsubscribes from all auto-subscribed stores on destroy\n * @returns {[StoreReferencesContainer, ()=>void]}\n */\nexport function setup_stores() {\n\t/** @type {StoreReferencesContainer} */\n\tconst stores = {};\n\n\tfunction cleanup() {\n\t\tteardown(() => {\n\t\t\tfor (var store_name in stores) {\n\t\t\t\tconst ref = stores[store_name];\n\t\t\t\tref.unsubscribe();\n\t\t\t}\n\t\t\tdefine_property(stores, IS_UNMOUNTED, {\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t});\n\t}\n\n\treturn [stores, cleanup];\n}\n\n/**\n * @param {Store<V>} store\n * @param {V} value\n * @template V\n */\nfunction update_with_flag(store, value) {\n\tlegacy_is_updating_store = true;\n\n\ttry {\n\t\tstore.set(value);\n\t} finally {\n\t\tlegacy_is_updating_store = false;\n\t}\n}\n\n/**\n * Updates a store with a new value.\n * @param {Store<V>} store the store to update\n * @param {any} expression the expression that mutates the store\n * @param {V} new_value the new store value\n * @template V\n */\nexport function store_mutate(store, expression, new_value) {\n\tupdate_with_flag(store, new_value);\n\treturn expression;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_store(store, store_value, d = 1) {\n\tupdate_with_flag(store, store_value + d);\n\treturn store_value;\n}\n\n/**\n * @param {Store<number>} store\n * @param {number} store_value\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_store(store, store_value, d = 1) {\n\tconst value = store_value + d;\n\tupdate_with_flag(store, value);\n\treturn value;\n}\n\n/**\n * Called inside prop getters to communicate that the prop is a store binding\n */\nexport function mark_store_binding() {\n\tis_store_binding = true;\n}\n\n/**\n * Returns a tuple that indicates whether `fn()` reads a prop that is a store binding.\n * Used to prevent `binding_property_non_reactive` validation false positives and\n * ensure that these props are treated as mutable even in runes mode\n * @template T\n * @param {() => T} fn\n * @returns {[T, boolean]}\n */\nexport function capture_store_binding(fn) {\n\tvar previous_is_store_binding = is_store_binding;\n\n\ttry {\n\t\tis_store_binding = false;\n\t\treturn [fn(), is_store_binding];\n\t} finally {\n\t\tis_store_binding = previous_is_store_binding;\n\t}\n}\n","/** @import { Effect, TemplateNode } from '#client' */\nimport { Batch, current_batch } from '../../reactivity/batch.js';\nimport {\n\tbranch,\n\tdestroy_effect,\n\tmove_effect,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { HMR_ANCHOR } from '../../constants.js';\nimport { hydrate_node, hydrating } from '../hydration.js';\nimport { create_text, should_defer_append } from '../operations.js';\nimport { DEV } from 'esm-env';\n\n/**\n * @typedef {{ effect: Effect, fragment: DocumentFragment }} Branch\n */\n\n/**\n * @template Key\n */\nexport class BranchManager {\n\t/** @type {TemplateNode} */\n\tanchor;\n\n\t/** @type {Map<Batch, Key>} */\n\t#batches = new Map();\n\n\t/**\n\t * Map of keys to effects that are currently rendered in the DOM.\n\t * These effects are visible and actively part of the document tree.\n\t * Example:\n\t * ```\n\t * {#if condition}\n\t * \tfoo\n\t * {:else}\n\t * \tbar\n\t * {/if}\n\t * ```\n\t * Can result in the entries `true->Effect` and `false->Effect`\n\t * @type {Map<Key, Effect>}\n\t */\n\t#onscreen = new Map();\n\n\t/**\n\t * Similar to #onscreen with respect to the keys, but contains branches that are not yet\n\t * in the DOM, because their insertion is deferred.\n\t * @type {Map<Key, Branch>}\n\t */\n\t#offscreen = new Map();\n\n\t/**\n\t * Keys of effects that are currently outroing\n\t * @type {Set<Key>}\n\t */\n\t#outroing = new Set();\n\n\t/**\n\t * Whether to pause (i.e. outro) on change, or destroy immediately.\n\t * This is necessary for `<svelte:element>`\n\t */\n\t#transition = true;\n\n\t/**\n\t * @param {TemplateNode} anchor\n\t * @param {boolean} transition\n\t */\n\tconstructor(anchor, transition = true) {\n\t\tthis.anchor = anchor;\n\t\tthis.#transition = transition;\n\t}\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\t#commit = (batch) => {\n\t\t// if this batch was made obsolete, bail\n\t\tif (!this.#batches.has(batch)) return;\n\n\t\tvar key = /** @type {Key} */ (this.#batches.get(batch));\n\n\t\tvar onscreen = this.#onscreen.get(key);\n\n\t\tif (onscreen) {\n\t\t\t// effect is already in the DOM — abort any current outro\n\t\t\tresume_effect(onscreen);\n\t\t\tthis.#outroing.delete(key);\n\t\t} else {\n\t\t\t// effect is currently offscreen. put it in the DOM\n\t\t\tvar offscreen = this.#offscreen.get(key);\n\n\t\t\tif (offscreen) {\n\t\t\t\tthis.#onscreen.set(key, offscreen.effect);\n\t\t\t\tthis.#offscreen.delete(key);\n\n\t\t\t\tif (DEV) {\n\t\t\t\t\t// Tell hmr.js about the anchor it should use for updates,\n\t\t\t\t\t// since the initial one will be removed\n\t\t\t\t\t/** @type {any} */ (offscreen.fragment.lastChild)[HMR_ANCHOR] = this.anchor;\n\t\t\t\t}\n\n\t\t\t\t// remove the anchor...\n\t\t\t\t/** @type {TemplateNode} */ (offscreen.fragment.lastChild).remove();\n\n\t\t\t\t// ...and append the fragment\n\t\t\t\tthis.anchor.before(offscreen.fragment);\n\t\t\t\tonscreen = offscreen.effect;\n\t\t\t}\n\t\t}\n\n\t\tfor (const [b, k] of this.#batches) {\n\t\t\tthis.#batches.delete(b);\n\n\t\t\tif (b === batch) {\n\t\t\t\t// keep values for newer batches\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst offscreen = this.#offscreen.get(k);\n\n\t\t\tif (offscreen) {\n\t\t\t\t// for older batches, destroy offscreen effects\n\t\t\t\t// as they will never be committed\n\t\t\t\tdestroy_effect(offscreen.effect);\n\t\t\t\tthis.#offscreen.delete(k);\n\t\t\t}\n\t\t}\n\n\t\t// outro/destroy all onscreen effects...\n\t\tfor (const [k, effect] of this.#onscreen) {\n\t\t\t// ...except the one that was just committed\n\t\t\t// or those that are already outroing (else the transition is aborted and the effect destroyed right away)\n\t\t\tif (k === key || this.#outroing.has(k)) continue;\n\n\t\t\tconst on_destroy = () => {\n\t\t\t\tconst keys = Array.from(this.#batches.values());\n\n\t\t\t\tif (keys.includes(k)) {\n\t\t\t\t\t// keep the effect offscreen, as another batch will need it\n\t\t\t\t\tvar fragment = document.createDocumentFragment();\n\t\t\t\t\tmove_effect(effect, fragment);\n\n\t\t\t\t\tfragment.append(create_text()); // TODO can we avoid this?\n\n\t\t\t\t\tthis.#offscreen.set(k, { effect, fragment });\n\t\t\t\t} else {\n\t\t\t\t\tdestroy_effect(effect);\n\t\t\t\t}\n\n\t\t\t\tthis.#outroing.delete(k);\n\t\t\t\tthis.#onscreen.delete(k);\n\t\t\t};\n\n\t\t\tif (this.#transition || !onscreen) {\n\t\t\t\tthis.#outroing.add(k);\n\t\t\t\tpause_effect(effect, on_destroy, false);\n\t\t\t} else {\n\t\t\t\ton_destroy();\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * @param {Batch} batch\n\t */\n\t#discard = (batch) => {\n\t\tthis.#batches.delete(batch);\n\n\t\tconst keys = Array.from(this.#batches.values());\n\n\t\tfor (const [k, branch] of this.#offscreen) {\n\t\t\tif (!keys.includes(k)) {\n\t\t\t\tdestroy_effect(branch.effect);\n\t\t\t\tthis.#offscreen.delete(k);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t *\n\t * @param {any} key\n\t * @param {null | ((target: TemplateNode) => void)} fn\n\t */\n\tensure(key, fn) {\n\t\tvar batch = /** @type {Batch} */ (current_batch);\n\t\tvar defer = should_defer_append();\n\n\t\tif (fn && !this.#onscreen.has(key) && !this.#offscreen.has(key)) {\n\t\t\tif (defer) {\n\t\t\t\tvar fragment = document.createDocumentFragment();\n\t\t\t\tvar target = create_text();\n\n\t\t\t\tfragment.append(target);\n\n\t\t\t\tthis.#offscreen.set(key, {\n\t\t\t\t\teffect: branch(() => fn(target)),\n\t\t\t\t\tfragment\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.#onscreen.set(\n\t\t\t\t\tkey,\n\t\t\t\t\tbranch(() => fn(this.anchor))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.#batches.set(batch, key);\n\n\t\tif (defer) {\n\t\t\tfor (const [k, effect] of this.#onscreen) {\n\t\t\t\tif (k === key) {\n\t\t\t\t\tbatch.unskip_effect(effect);\n\t\t\t\t} else {\n\t\t\t\t\tbatch.skip_effect(effect);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const [k, branch] of this.#offscreen) {\n\t\t\t\tif (k === key) {\n\t\t\t\t\tbatch.unskip_effect(branch.effect);\n\t\t\t\t} else {\n\t\t\t\t\tbatch.skip_effect(branch.effect);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbatch.oncommit(this.#commit);\n\t\t\tbatch.ondiscard(this.#discard);\n\t\t} else {\n\t\t\tif (hydrating) {\n\t\t\t\tthis.anchor = hydrate_node;\n\t\t\t}\n\n\t\t\tthis.#commit(batch);\n\t\t}\n\t}\n}\n","/** @import { TemplateNode } from '#client' */\nimport { EFFECT_TRANSPARENT } from '#client/constants';\nimport {\n\thydrate_next,\n\thydrating,\n\tread_hydration_instruction,\n\tskip_nodes,\n\tset_hydrate_node,\n\tset_hydrating,\n\thydrate_node\n} from '../hydration.js';\nimport { block } from '../../reactivity/effects.js';\nimport { BranchManager } from './branches.js';\n\n/**\n * @param {TemplateNode} node\n * @param {(branch: (fn: (anchor: Node) => void, key?: number | false) => void) => void} fn\n * @param {boolean} [elseif] True if this is an `{:else if ...}` block rather than an `{#if ...}`, as that affects which transitions are considered 'local'\n * @returns {void}\n */\nexport function if_block(node, fn, elseif = false) {\n\t/** @type {TemplateNode | undefined} */\n\tvar marker;\n\tif (hydrating) {\n\t\tmarker = hydrate_node;\n\t\thydrate_next();\n\t}\n\n\tvar branches = new BranchManager(node);\n\tvar flags = elseif ? EFFECT_TRANSPARENT : 0;\n\n\t/**\n\t * @param {number | false} key\n\t * @param {null | ((anchor: Node) => void)} fn\n\t */\n\tfunction update_branch(key, fn) {\n\t\tif (hydrating) {\n\t\t\tvar data = read_hydration_instruction(/** @type {TemplateNode} */ (marker));\n\n\t\t\t// \"[n\" = branch n, \"[-1\" = else\n\t\t\tif (key !== parseInt(data.substring(1))) {\n\t\t\t\t// Hydration mismatch: remove everything inside the anchor and start fresh.\n\t\t\t\t// This could happen with `{#if browser}...{/if}`, for example\n\t\t\t\tvar anchor = skip_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tbranches.anchor = anchor;\n\n\t\t\t\tset_hydrating(false);\n\t\t\t\tbranches.ensure(key, fn);\n\t\t\t\tset_hydrating(true);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tbranches.ensure(key, fn);\n\t}\n\n\tblock(() => {\n\t\tvar has_branch = false;\n\n\t\tfn((fn, key = 0) => {\n\t\t\thas_branch = true;\n\t\t\tupdate_branch(key, fn);\n\t\t});\n\n\t\tif (!has_branch) {\n\t\t\tupdate_branch(-1, null);\n\t\t}\n\t}, flags);\n}\n","/** @import { Derived, Effect, Source } from './types.js' */\nimport { DEV } from 'esm-env';\nimport {\n\tPROPS_IS_BINDABLE,\n\tPROPS_IS_IMMUTABLE,\n\tPROPS_IS_LAZY_INITIAL,\n\tPROPS_IS_RUNES,\n\tPROPS_IS_UPDATED\n} from '../../../constants.js';\nimport { get_descriptor, is_function } from '../../shared/utils.js';\nimport { set, source, update } from './sources.js';\nimport { derived, derived_safe_equal } from './deriveds.js';\nimport {\n\tactive_effect,\n\tget,\n\tis_destroying_effect,\n\tset_active_effect,\n\tuntrack\n} from '../runtime.js';\nimport * as e from '../errors.js';\nimport { DESTROYED, LEGACY_PROPS, STATE_SYMBOL } from '#client/constants';\nimport { proxy } from '../proxy.js';\nimport { capture_store_binding } from './store.js';\nimport { legacy_mode_flag } from '../../flags/index.js';\nimport { effect, render_effect } from './effects.js';\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_prop(fn, d = 1) {\n\tconst value = fn();\n\tfn(value + d);\n\treturn value;\n}\n\n/**\n * @param {((value?: number) => number)} fn\n * @param {1 | -1} [d]\n * @returns {number}\n */\nexport function update_pre_prop(fn, d = 1) {\n\tconst value = fn() + d;\n\tfn(value);\n\treturn value;\n}\n\n/**\n * The proxy handler for rest props (i.e. `const { x, ...rest } = $props()`).\n * Is passed the full `$$props` object and excludes the named props.\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name?: string }>}}\n */\nconst rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\treturn target.props[key];\n\t},\n\tset(target, key) {\n\t\tif (DEV) {\n\t\t\t// TODO should this happen in prod too?\n\t\t\te.props_rest_readonly(`${target.name}.${String(key)}`);\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @param {string} [name]\n * @returns {Record<string, unknown>}\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function rest_props(props, exclude, name) {\n\treturn new Proxy(\n\t\tDEV ? { props, exclude, name, other: {}, to_proxy: [] } : { props, exclude },\n\t\trest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for legacy $$restProps and $$props\n * @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, special: Record<string | symbol, (v?: unknown) => unknown>, version: Source<number>, parent_effect: Effect }>}}\n */\nconst legacy_rest_props_handler = {\n\tget(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tget(target.version);\n\t\treturn key in target.special ? target.special[key]() : target.props[key];\n\t},\n\tset(target, key, value) {\n\t\tif (!(key in target.special)) {\n\t\t\tvar previous_effect = active_effect;\n\n\t\t\ttry {\n\t\t\t\tset_active_effect(target.parent_effect);\n\n\t\t\t\t// Handle props that can temporarily get out of sync with the parent\n\t\t\t\t/** @type {Record<string, (v?: unknown) => unknown>} */\n\t\t\t\ttarget.special[key] = prop(\n\t\t\t\t\t{\n\t\t\t\t\t\tget [key]() {\n\t\t\t\t\t\t\treturn target.props[key];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t/** @type {string} */ (key),\n\t\t\t\t\tPROPS_IS_UPDATED\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tset_active_effect(previous_effect);\n\t\t\t}\n\t\t}\n\n\t\ttarget.special[key](value);\n\t\tupdate(target.version); // $$props is coarse-grained: when $$props.x is updated, usages of $$props.y etc are also rerun\n\t\treturn true;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tif (target.exclude.includes(key)) return;\n\t\tif (key in target.props) {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\tvalue: target.props[key]\n\t\t\t};\n\t\t}\n\t},\n\tdeleteProperty(target, key) {\n\t\t// Svelte 4 allowed for deletions on $$restProps\n\t\tif (target.exclude.includes(key)) return true;\n\t\ttarget.exclude.push(key);\n\t\tupdate(target.version);\n\t\treturn true;\n\t},\n\thas(target, key) {\n\t\tif (target.exclude.includes(key)) return false;\n\t\treturn key in target.props;\n\t},\n\townKeys(target) {\n\t\treturn Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));\n\t}\n};\n\n/**\n * @param {Record<string, unknown>} props\n * @param {string[]} exclude\n * @returns {Record<string, unknown>}\n */\nexport function legacy_rest_props(props, exclude) {\n\treturn new Proxy(\n\t\t{\n\t\t\tprops,\n\t\t\texclude,\n\t\t\tspecial: {},\n\t\t\tversion: source(0),\n\t\t\t// TODO this is only necessary because we need to track component\n\t\t\t// destruction inside `prop`, because of `bind:this`, but it\n\t\t\t// seems likely that we can simplify `bind:this` instead\n\t\t\tparent_effect: /** @type {Effect} */ (active_effect)\n\t\t},\n\t\tlegacy_rest_props_handler\n\t);\n}\n\n/**\n * The proxy handler for spread props. Handles the incoming array of props\n * that looks like `() => { dynamic: props }, { static: prop }, ..` and wraps\n * them so that the whole thing is passed to the component as the `$$props` argument.\n * @type {ProxyHandler<{ props: Array<Record<string | symbol, unknown> | (() => Record<string | symbol, unknown>)> }>}}\n */\nconst spread_props_handler = {\n\tget(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) return p[key];\n\t\t}\n\t},\n\tset(target, key, value) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tconst desc = get_descriptor(p, key);\n\t\t\tif (desc && desc.set) {\n\t\t\t\tdesc.set(value);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\tgetOwnPropertyDescriptor(target, key) {\n\t\tlet i = target.props.length;\n\t\twhile (i--) {\n\t\t\tlet p = target.props[i];\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (typeof p === 'object' && p !== null && key in p) {\n\t\t\t\tconst descriptor = get_descriptor(p, key);\n\t\t\t\tif (descriptor && !descriptor.configurable) {\n\t\t\t\t\t// Prevent a \"Non-configurability Report Error\": The target is an array, it does\n\t\t\t\t\t// not actually contain this property. If it is now described as non-configurable,\n\t\t\t\t\t// the proxy throws a validation error. Setting it to true avoids that.\n\t\t\t\t\tdescriptor.configurable = true;\n\t\t\t\t}\n\t\t\t\treturn descriptor;\n\t\t\t}\n\t\t}\n\t},\n\thas(target, key) {\n\t\t// To prevent a false positive `is_entry_props` in the `prop` function\n\t\tif (key === STATE_SYMBOL || key === LEGACY_PROPS) return false;\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (p != null && key in p) return true;\n\t\t}\n\n\t\treturn false;\n\t},\n\townKeys(target) {\n\t\t/** @type {Array<string | symbol>} */\n\t\tconst keys = [];\n\n\t\tfor (let p of target.props) {\n\t\t\tif (is_function(p)) p = p();\n\t\t\tif (!p) continue;\n\n\t\t\tfor (const key in p) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\n\t\t\tfor (const key of Object.getOwnPropertySymbols(p)) {\n\t\t\t\tif (!keys.includes(key)) keys.push(key);\n\t\t\t}\n\t\t}\n\n\t\treturn keys;\n\t}\n};\n\n/**\n * @param {Array<Record<string, unknown> | (() => Record<string, unknown>)>} props\n * @returns {any}\n */\nexport function spread_props(...props) {\n\treturn new Proxy({ props }, spread_props_handler);\n}\n\n/**\n * This function is responsible for synchronizing a possibly bound prop with the inner component state.\n * It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.\n * @template V\n * @param {Record<string, unknown>} props\n * @param {string} key\n * @param {number} flags\n * @param {V | (() => V)} [fallback]\n * @returns {(() => V | ((arg: V) => V) | ((arg: V, mutation: boolean) => V))}\n */\nexport function prop(props, key, flags, fallback) {\n\tvar runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;\n\tvar bindable = (flags & PROPS_IS_BINDABLE) !== 0;\n\tvar lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;\n\n\tvar fallback_value = /** @type {V} */ (fallback);\n\tvar fallback_dirty = true;\n\tvar fallback_signal = /** @type {Derived<V> | undefined} */ (undefined);\n\n\tvar get_fallback = () => {\n\t\tif (lazy && runes) {\n\t\t\tfallback_signal ??= derived(/** @type {() => V} */ (fallback));\n\t\t\treturn get(fallback_signal);\n\t\t}\n\n\t\tif (fallback_dirty) {\n\t\t\tfallback_dirty = false;\n\n\t\t\tfallback_value = lazy\n\t\t\t\t? untrack(/** @type {() => V} */ (fallback))\n\t\t\t\t: /** @type {V} */ (fallback);\n\t\t}\n\n\t\treturn fallback_value;\n\t};\n\n\t/** @type {((v: V) => void) | undefined} */\n\tlet setter;\n\n\tif (bindable) {\n\t\t// Can be the case when someone does `mount(Component, props)` with `let props = $state({...})`\n\t\t// or `createClassComponent(Component, props)`\n\t\tvar is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;\n\n\t\tsetter =\n\t\t\tget_descriptor(props, key)?.set ??\n\t\t\t(is_entry_props && key in props ? (v) => (props[key] = v) : undefined);\n\t}\n\n\t/** @type {V} */\n\tvar initial_value;\n\tvar is_store_sub = false;\n\n\tif (bindable) {\n\t\t[initial_value, is_store_sub] = capture_store_binding(() => /** @type {V} */ (props[key]));\n\t} else {\n\t\tinitial_value = /** @type {V} */ (props[key]);\n\t}\n\n\tif (initial_value === undefined && fallback !== undefined) {\n\t\tinitial_value = get_fallback();\n\n\t\tif (setter) {\n\t\t\tif (runes) e.props_invalid_value(key);\n\t\t\tsetter(initial_value);\n\t\t}\n\t}\n\n\t/** @type {() => V} */\n\tvar getter;\n\n\tif (runes) {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\t\t\tif (value === undefined) return get_fallback();\n\t\t\tfallback_dirty = true;\n\t\t\treturn value;\n\t\t};\n\t} else {\n\t\tgetter = () => {\n\t\t\tvar value = /** @type {V} */ (props[key]);\n\n\t\t\tif (value !== undefined) {\n\t\t\t\t// in legacy mode, we don't revert to the fallback value\n\t\t\t\t// if the prop goes from defined to undefined. The easiest\n\t\t\t\t// way to model this is to make the fallback undefined\n\t\t\t\t// as soon as the prop has a value\n\t\t\t\tfallback_value = /** @type {V} */ (undefined);\n\t\t\t}\n\n\t\t\treturn value === undefined ? fallback_value : value;\n\t\t};\n\t}\n\n\t// prop is never written to — we only need a getter\n\tif (runes && (flags & PROPS_IS_UPDATED) === 0) {\n\t\treturn getter;\n\t}\n\n\t// prop is written to, but the parent component had `bind:foo` which\n\t// means we can just call `$$props.foo = value` directly\n\tif (setter) {\n\t\tvar legacy_parent = props.$$legacy;\n\t\treturn /** @type {() => V} */ (\n\t\t\tfunction (/** @type {V} */ value, /** @type {boolean} */ mutation) {\n\t\t\t\tif (arguments.length > 0) {\n\t\t\t\t\t// We don't want to notify if the value was mutated and the parent is in runes mode.\n\t\t\t\t\t// In that case the state proxy (if it exists) should take care of the notification.\n\t\t\t\t\t// If the parent is not in runes mode, we need to notify on mutation, too, that the prop\n\t\t\t\t\t// has changed because the parent will not be able to detect the change otherwise.\n\t\t\t\t\tif (!runes || !mutation || legacy_parent || is_store_sub) {\n\t\t\t\t\t\t/** @type {Function} */ (setter)(mutation ? getter() : value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\n\t\t\t\treturn getter();\n\t\t\t}\n\t\t);\n\t}\n\n\t// Either prop is written to, but there's no binding, which means we\n\t// create a derived that we can write to locally.\n\t// Or we are in legacy mode where we always create a derived to replicate that\n\t// Svelte 4 did not trigger updates when a primitive value was updated to the same value.\n\tvar overridden = false;\n\n\tvar d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => {\n\t\toverridden = false;\n\t\treturn getter();\n\t});\n\n\tif (DEV) {\n\t\td.label = key;\n\t}\n\n\t// Capture the initial value if it's bindable\n\tif (bindable) get(d);\n\n\tvar parent_effect = /** @type {Effect} */ (active_effect);\n\n\treturn /** @type {() => V} */ (\n\t\tfunction (/** @type {any} */ value, /** @type {boolean} */ mutation) {\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconst new_value = mutation ? get(d) : runes && bindable ? proxy(value) : value;\n\n\t\t\t\tset(d, new_value);\n\t\t\t\toverridden = true;\n\n\t\t\t\tif (fallback_value !== undefined) {\n\t\t\t\t\tfallback_value = new_value;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\t// special case — avoid recalculating the derived if we're in a\n\t\t\t// teardown function and the prop was overridden locally, or the\n\t\t\t// component was already destroyed (people could access props in a timeout)\n\t\t\tif ((is_destroying_effect && overridden) || (parent_effect.f & DESTROYED) !== 0) {\n\t\t\t\treturn d.v;\n\t\t\t}\n\n\t\t\treturn get(d);\n\t\t}\n\t);\n}\n"],"names":["is_store_binding","IS_UNMOUNTED","store_get","store","store_name","stores","entry","mutable_source","noop","is_synchronous_callback","subscribe_to_store","v","set","get_store","get","setup_stores","cleanup","teardown","define_property","capture_store_binding","fn","previous_is_store_binding","BranchManager","#batches","#onscreen","#offscreen","#outroing","#transition","anchor","transition","#commit","batch","key","onscreen","resume_effect","offscreen","b","k","destroy_effect","effect","on_destroy","fragment","move_effect","create_text","pause_effect","#discard","keys","branch","current_batch","defer","should_defer_append","target","hydrating","hydrate_node","if_block","node","elseif","marker","hydrate_next","branches","flags","EFFECT_TRANSPARENT","update_branch","data","read_hydration_instruction","skip_nodes","set_hydrate_node","set_hydrating","block","has_branch","prop","props","fallback","runes","legacy_mode_flag","PROPS_IS_RUNES","bindable","PROPS_IS_BINDABLE","lazy","PROPS_IS_LAZY_INITIAL","fallback_value","fallback_dirty","fallback_signal","get_fallback","derived","untrack","setter","is_entry_props","STATE_SYMBOL","LEGACY_PROPS","get_descriptor","initial_value","is_store_sub","e.props_invalid_value","getter","value","PROPS_IS_UPDATED","legacy_parent","mutation","overridden","d","PROPS_IS_IMMUTABLE","derived_safe_equal","parent_effect","active_effect","new_value","proxy","is_destroying_effect","DESTROYED"],"mappings":"4WAqBA,IAAIA,EAAmB,GAEnBC,EAAe,OAAO,WAAW,EAY9B,SAASC,GAAUC,EAAOC,EAAYC,EAAQ,CACpD,MAAMC,EAASD,EAAOD,CAAU,IAAM,CACrC,MAAO,KACP,OAAQG,EAAe,MAAS,EAChC,YAAaC,CACf,EAOC,GAAIF,EAAM,QAAUH,GAAS,EAAEF,KAAgBI,GAI9C,GAHAC,EAAM,YAAW,EACjBA,EAAM,MAAQH,GAAS,KAEnBA,GAAS,KACZG,EAAM,OAAO,EAAI,OACjBA,EAAM,YAAcE,MACd,CACN,IAAIC,EAA0B,GAE9BH,EAAM,YAAcI,EAAmBP,EAAQQ,GAAM,CAChDF,EAGHH,EAAM,OAAO,EAAIK,EAEjBC,EAAIN,EAAM,OAAQK,CAAC,CAErB,CAAC,EAEDF,EAA0B,EAC3B,CAMD,OAAIN,GAASF,KAAgBI,EACrBQ,EAAUV,CAAK,EAGhBW,EAAIR,EAAM,MAAM,CACxB,CAkDO,SAASS,IAAe,CAE9B,MAAMV,EAAS,CAAA,EAEf,SAASW,GAAU,CAClBC,EAAS,IAAM,CACd,QAASb,KAAcC,EACVA,EAAOD,CAAU,EACzB,YAAW,EAEhBc,EAAgBb,EAAQJ,EAAc,CACrC,WAAY,GACZ,MAAO,EACX,CAAI,CACF,CAAC,CACF,CAEA,MAAO,CAACI,EAAQW,CAAO,CACxB,CAmEO,SAASG,GAAsBC,EAAI,CACzC,IAAIC,EAA4BrB,EAEhC,GAAI,CACH,OAAAA,EAAmB,GACZ,CAACoB,EAAE,EAAIpB,CAAgB,CAC/B,QAAC,CACAA,EAAmBq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,OAAS,EAAG,CACzB,MAAMO,EAAYP,EAAWpF,EAAIsF,CAAC,EAAI3B,GAASG,EAAW8B,EAAMX,CAAK,EAAIA,EAEzE,OAAAnF,EAAIwF,EAAGK,CAAS,EAChBN,EAAa,GAETnB,IAAmB,SACtBA,EAAiByB,GAGXV,CACR,CAKA,OAAKY,IAAwBR,IAAgBI,EAAc,EAAIK,MAAe,EACtER,EAAE,EAGHtF,EAAIsF,CAAC,CACb,EAEF","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bm as Le,aL as Ke,ba as A,aj as U,a$ as T,bg as re,b5 as bt,bh as kt}from"./CRRPBe07.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=n}}class Te extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function St(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Et(e){return e.split("%25").map(decodeURI).join("%25")}function Rt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ve({href:e}){return e.split("#")[0]}function C(){}function xt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function Lt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const At=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&J.delete($e(e)),At(e,t));const J=new Map;function Ut(e,t){const n=$e(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&J.set(n,{body:a,init:i,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=Lt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Tt(e,t,n){if(J.size>0){const r=$e(e,n),a=J.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);J.delete(r)}}return window.fetch(t,n)}function $e(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${xt(...a)}"]`}return r}const $t=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function It(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Ze(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ye(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ye(String.fromCharCode(...l.slice(2).split("-").map(_=>parseInt(_,16))));const f=$t.exec(l),[,p,w,d,u]=f;return t.push({name:d,matcher:u,optional:!!p,rest:!!w,chained:w?c===1&&o[0]==="":!1}),w?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ye(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Ze(e){return e.slice(1).split("/").filter(Pt)}function Ot(e,t,n){const r={},a=e.slice(1),i=a.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const l=t[s];let c=a[s-o];if(l.chained&&l.rest&&o&&(c=a.slice(s-o,s+1).filter(f=>f).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const f=t[s+1],p=a[s+1];f&&!f.rest&&f.optional&&p&&l.chained&&(o=0),!f&&!p&&Object.keys(r).length===i.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function ye(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const Ct=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function dn(e,t){const n=Ze(e),r=e!="/"&&e.endsWith("/");return"/"+n.map(a=>a.replace(Ct,(i,o,s,l)=>{const c=t[l];if(!c){if(o||s&&c!==void 0)return"";throw new Error(`Missing parameter '${l}' in route ${e}`)}if(c.startsWith("/")||c.endsWith("/"))throw new Error(`Parameter '${l}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return c})).filter(Boolean).join("/")+(r?"/":"")}function jt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([s,[l,c,f]])=>{const{pattern:p,params:w}=It(s),d={id:s,exec:u=>{const _=p.exec(u);if(_)return Ot(_,w,r)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...c||[]].map(o),leaf:i(l)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function i(s){const l=s<0;return l&&(s=~s),[l,e[s]]}function o(s){return s===void 0?s:[a.has(s),e[s]]}}function et(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Fe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const L=globalThis.__sveltekit_15rgw1w?.base??"",Nt=globalThis.__sveltekit_15rgw1w?.assets??L??"",qt="3ad21a5",tt="sveltekit:snapshot",nt="sveltekit:scroll",Ie="sveltekit:states",rt="sveltekit:pageurl",D="sveltekit:history",W="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Pe=location.origin;function Oe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function V(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ge={...q,"":q.hover};function at(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function ot(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=at(e)}}function Se(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const s=location.hash.split("#")[1]||"/";r.hash=`#${s}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||he(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===Pe&&e.hasAttribute("download");return{url:r,external:i,target:a,download:o}}function ae(e){let t=null,n=null,r=null,a=null,i=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=B(s,"preload-code")),a===null&&(a=B(s,"preload-data")),t===null&&(t=B(s,"keepfocus")),n===null&&(n=B(s,"noscroll")),i===null&&(i=B(s,"reload")),o===null&&(o=B(s,"replacestate")),s=at(s);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ge[r??"off"],preload_data:Ge[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(o)}}function He(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function i(o){let s;return t.subscribe(l=>{(s===void 0||n&&l!==s)&&o(s=l)})}return{notify:r,set:a,subscribe:i}}const st={v:C};function Dt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Nt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==qt;return o&&(e(!0),st.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function he(e,t,n){return e.origin!==Pe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function hn(e){}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const Vt=new Set([...it]);[...Vt];function Bt(e){return e.filter(t=>t!=null)}function te(e,t){return e+"/"+t}function Ce(e){return e instanceof Ae||e instanceof Te?e.status:500}function Mt(e){return e instanceof Te?e.text:"Internal Error"}let b,z,be;const Wt=Ke.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ke.toString()),Je="a:";Wt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Je)},z={current:null},be={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL(Je));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},z=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},be=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},st.v=()=>be.current=!0);function lt(e){Object.assign(b,e)}const Kt=kt??(e=>e()),Ft=new Set(["icon","shortcut icon","apple-touch-icon"]);let G=null;const N=et(nt)??{},X=et(tt)??{},j={url:He({}),page:He({}),navigating:Le(null),updated:Dt()};function pe(e){N[e]=V()}function ct(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function Q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(C)}async function ut(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}let je,Ee,oe,$,Re,y;const se=[],ie=[];let x=null;function le(){x?.fork?.then(e=>e?.discard()),x=null}const ne=new Map,ft=new Set,Gt=new Set,Y=new Set;let m={branch:[],error:null,url:null},dt=!1,ce=!1,Ye=!0,Z=!1,H=!1,Ne=!1,qe=!1,De,v,E,O;const ue=new Set,ze=new Map,Xe=new Map;async function mn(e,t,n){globalThis.__sveltekit_15rgw1w&&(globalThis.__sveltekit_15rgw1w.query,globalThis.__sveltekit_15rgw1w.prerender),document.URL!==location.href&&(location.href=location.href),y=e,await e.hooks.init?.(),je=jt(e),$=document.documentElement,Re=t,Ee=e.nodes[0],oe=e.nodes[1],Ee(),oe(),v=history.state?.[D],E=history.state?.[W],v||(v=E=Date.now(),history.replaceState({...history.state,[D]:v,[W]:E},""));const r=N[v];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await sn(Re,n)):(await M({type:"enter",url:Oe(y.hash?un(new URL(location.href)):location.href),replace_state:!0}),a()),on()}function Ht(){se.length=0,qe=!1}function ht(e){ie.some(t=>t?.snapshot)&&(X[e]=ie.map(t=>t?.snapshot?.capture()))}function pt(e){X[e]?.forEach((t,n)=>{ie[n]?.snapshot?.restore(t)})}function Qe(){pe(v),Fe(nt,N),ht(E),Fe(tt,X)}async function Jt(e,t,n,r){let a,i;t.invalidateAll&&le(),await M({type:"goto",url:Oe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{if(t.invalidateAll){qe=!0,a=new Set;for(const[o,s]of ze)for(const l of s.keys())a.add(te(o,l));i=new Set;for(const[o,s]of Xe)for(const l of s.keys())i.add(te(o,l))}t.invalidate&&t.invalidate.forEach(an)}}),t.invalidateAll&&re().then(re).then(()=>{for(const[o,s]of ze)for(const[l,{resource:c}]of s)a?.has(te(o,l))&&c.refresh();for(const[o,s]of Xe)for(const[l,{resource:c}]of s)i?.has(te(o,l))&&c.reconnect()})}async function Yt(e){if(e.id!==x?.id){le();const t={};ue.add(t),x={id:e.id,token:t,promise:_t({...e,preload:t}).then(n=>(ue.delete(t),n.type==="loaded"&&n.state.error&&le(),n)),fork:null}}return x.promise}async function ke(e){const t=(await ge(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function gt(e,t,n){const r={params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)};m={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),lt(e.props.page),De=new y.root({target:t,props:{...e.props,stores:j,components:ie},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),pt(E),n){const i={from:null,to:{...r,scroll:N[v]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};Y.forEach(o=>o(i))}ce=!0}async function fe({url:e,params:t,branch:n,errors:r,status:a,error:i,route:o,form:s}){let l="never";if(L&&(e.pathname===L||e.pathname===L+"/"))l="always";else for(const u of n)u?.slash!==void 0&&(l=u.slash);e.pathname=St(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:o},props:{constructors:Bt(n).map(u=>u.node.component),page:_e(b)}};s!==void 0&&(c.props.form=s);let f={},p=!b,w=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const _=n[u],g=m.branch[u];_?.data!==g?.data&&(p=!0),_&&(f={...f,..._.data},p&&(c.props[`data_${w}`]=f),w+=1)}return(!m.url||e.href!==m.url.href||m.error!==i||s!==void 0&&s!==b.form||p)&&(c.props.page={error:i,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:s??null,data:p?f:b.data}),c}async function Ve({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:o,uses:s}:null,data:o??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function zt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=ce?Tt(r,a.href,t):Ut(r,t);return{resolved:a,promise:i}}function Xt(e,t,n,r,a,i){if(qe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(i[o]!==m.params[o])return!0;for(const o of a.dependencies)if(se.some(s=>s(new URL(o))))return!0;return!1}function Be(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Qt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(o=>i.includes(o))&&i.every(o=>a.includes(o))&&n.delete(r)}return n}function Zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:_e(b),constructors:[]}}}async function _t({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(x?.id===e)return ue.delete(x.token),x.promise;const{errors:o,layouts:s,leaf:l}=a,c=[...s,l];o.forEach(g=>g?.().catch(C)),c.forEach(g=>g?.[1]().catch(C));const f=m.url?e!==de(m.url):!1,p=m.route?a.id!==m.route.id:!1,w=Qt(m.url,n);let d=!1;const u=c.map(async(g,h)=>{if(!g)return;const k=m.branch[h];return g[1]===k?.loader&&!Xt(d,p,f,w,k.universal?.uses,r)?k:(d=!0,Ve({loader:g[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let P=0;P<h;P+=1)Object.assign(I,(await u[P])?.data);return I},server_data_node:Be(g[0]?{type:"skip"}:null,g[0]?k?.server:void 0)}))});for(const g of u)g.catch(C);const _=[];for(let g=0;g<c.length;g+=1)if(c[g])try{_.push(await u[g])}catch(h){if(h instanceof Ue)return{type:"redirect",location:h.location};if(ue.has(i))return Zt({error:await ee(h,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let k=Ce(h),R;if(h instanceof Ae)R=h.body;else{if(await j.updated.check())return await ut(),await Q(n);R=await ee(h,{params:r,url:n,route:{id:a.id}})}const I=await en(g,_,o);return I?fe({url:n,params:r,branch:_.slice(0,I.idx).concat(I.node),errors:o,status:k,error:R,route:a}):await wt(n,{id:a.id},R,k)}else _.push(void 0);return fe({url:n,params:r,branch:_,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function en(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Me({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const o=await Ve({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Be(i)}),s={node:await oe(),loader:oe,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Ue)return Jt(new URL(o.location,location.href),{},0);throw o}}async function tn(e){const t=e.href;if(ne.has(t))return ne.get(t);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(e),fetch:async(i,o)=>zt(i,o,e).promise})??e;if(typeof a=="string"){const i=new URL(e);y.hash?i.hash=a:i.pathname=a,a=i}return a})();ne.set(t,r),n=await r}catch{ne.delete(t);return}return n}async function ge(e,t){if(e&&!he(e,L,y.hash)){const n=await tn(e);if(!n)return;const r=nn(n);for(const a of je){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:Rt(i),url:e}}}}function nn(e){return Et(y.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function de(e){return(y.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function mt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let o=!1;const s=We(m,n,e,t,i??null);r!==void 0&&(s.navigation.delta=r),a!==void 0&&(s.navigation.event=a);const l={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return Z||ft.forEach(c=>c(l)),o?null:s}async function M({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o={},redirect_count:s=0,nav_token:l={},accept:c=C,block:f=C,event:p}){const w=O;O=l;const d=await ge(t,!1),u=e==="enter"?We(m,d,t,e):mt({url:t,type:e,delta:n?.delta,intent:d,scroll:n?.scroll,event:p});if(!u){f(),O===l&&(O=w);return}const _=v,g=E;c(),Z=!0,ce&&u.navigation.type!=="enter"&&j.navigating.set(z.current=u.navigation);let h=d&&await _t(d);if(!h){if(he(t,L,y.hash))return await Q(t,i);h=await wt(t,{id:null},await ee(new Te(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=d?.url||t,O!==l)return u.reject(new Error("navigation aborted")),!1;if(h.type==="redirect"){if(s<20){await M({type:e,url:new URL(h.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o,redirect_count:s+1,nav_token:l}),u.fulfil(void 0);return}h=await Me({status:500,error:await ee(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else h.props.page.status>=400&&await j.updated.check()&&(await ut(),await Q(t,i));if(Ht(),pe(_),ht(g),h.props.page.url.pathname!==t.pathname&&(t.pathname=h.props.page.url.pathname),o=n?n.state:o,!n){const S=i?0:1,K={[D]:v+=S,[W]:E+=S,[Ie]:o};(i?history.replaceState:history.pushState).call(history,K,"",t),i||ct(v,E)}const k=d&&x?.id===d.id?x.fork:null;x?.fork&&!k&&le(),x=null,h.props.page.state=o;let R;if(ce){const S=(await Promise.all(Array.from(Gt,F=>F(u.navigation)))).filter(F=>typeof F=="function");if(S.length>0){let F=function(){S.forEach(we=>{Y.delete(we)})};S.push(F),S.forEach(we=>{Y.add(we)})}const K=u.navigation.to;m={...h.state,nav:{params:K.params,route:K.route,url:K.url}},h.props.page&&(h.props.page.url=t);const me=k&&await k;me?R=me.commit():(G=null,De.$set(h.props),G&&Object.assign(h.props.page,G),lt(h.props.page),R=bt?.()),Ne=!0}else await gt(h,Re,!1);const{activeElement:I}=document;if(await R,await re(),await re(),O!==l)return u.reject(new Error("navigation aborted")),!1;h.props.page&&G&&Object.assign(h.props.page,G);let P=null;if(Ye){const S=n?n.scroll:a?V():null;S?scrollTo(S.x,S.y):(P=t.hash&&document.getElementById(vt(t)))?P.scrollIntoView():scrollTo(0,0)}const yt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!yt&&cn(t,!P),Ye=!0,Z=!1,e==="popstate"&&pt(E),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=V()),Y.forEach(S=>S(u.navigation)),j.navigating.set(z.current=null)}async function wt(e,t,n,r,a){return e.origin===Pe&&e.pathname===location.pathname&&!dt?await Me({status:r,error:n,url:e,route:t}):await Q(e,a)}function rn(){let e,t={element:void 0,href:void 0},n;$.addEventListener("mousemove",s=>{const l=s.target;clearTimeout(e),e=setTimeout(()=>{i(l,q.hover)},20)});function r(s){s.defaultPrevented||i(s.composedPath()[0],q.tap)}$.addEventListener("mousedown",r),$.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(s=>{for(const l of s)l.isIntersecting&&(ke(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(s,l){const c=ot(s,$),f=c===t.element&&c?.href===t.href&&l>=n;if(!c||f)return;const{url:p,external:w,download:d}=Se(c,L,y.hash);if(w||d)return;const u=ae(c),_=p&&de(m.url)===de(p);if(!(u.reload||_))if(l<=u.preload_data){t={element:c,href:c.href},n=q.tap;const g=await ge(p,!1);if(!g)return;Yt(g)}else l<=u.preload_code&&(t={element:c,href:c.href},n=l,ke(p))}function o(){a.disconnect();for(const s of $.querySelectorAll("a")){const{url:l,external:c,download:f}=Se(s,L,y.hash);if(c||f)continue;const p=ae(s);p.reload||(p.preload_code===q.viewport&&a.observe(s),p.preload_code===q.eager&&ke(l))}}Y.add(o),o()}function ee(e,t){if(e instanceof Ae)return e.body;const n=Ce(e),r=Mt(e);return y.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function an(e){if(typeof e=="function")se.push(e);else{const{href:t}=new URL(e,location.href);se.push(n=>n.href===t)}}function wn(e,t){pe(v);const n={[D]:v+=1,[W]:E,[rt]:b.url.href,[Ie]:t};history.pushState(n,"",Oe(e)),Ne=!0,b.state=t,De.$set({page:Kt(()=>_e(b))}),ct(v,E)}function on(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Qe(),!Z){const r=We(m,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};ft.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Qe()}),navigator.connection?.saveData||rn(),$.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=ot(t.composedPath()[0],$);if(!n)return;const{url:r,external:a,target:i,download:o}=Se(n,L,y.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const s=ae(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[c,f]=(y.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===ve(location);if(a||s.reload&&(!p||!f)){mt({url:r,type:"link",event:t})?Z=!0:t.preventDefault();return}if(f!==void 0&&p){const[,w]=m.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=n.ownerDocument.getElementById(decodeURIComponent(f));d&&(d.scrollIntoView(),d.focus())}return}if(H=!0,pe(v),e(r),!s.replace_state)return;H=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await M({type:"link",url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),$.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(he(o,L,!1))return;const s=t.target,l=ae(s);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(s,r);o.search=new URLSearchParams(c).toString(),M({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[D]){const n=t.state[D];if(O={},n===v)return;const r=N[n],a=t.state[Ie]??{},i=new URL(t.state[rt]??location.href),o=t.state[W],s=m.url?ve(location)===ve(m.url):!1;if(o===E&&(Ne||s)){a!==b.state&&(b.state=a),e(i),N[v]=V(),r&&scrollTo(r.x,r.y),v=n;return}const c=n-v;await M({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{v=n,E=o},block:()=>{history.go(-c)},nav_token:O,event:t})}else if(!H){const n=new URL(location.href);e(n),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{H&&(H=!1,history.replaceState({...history.state,[D]:++v,[W]:E},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&j.navigating.set(z.current=null)});function e(t){m.url=b.url=t,j.page.set(_e(b)),j.page.notify()}}async function sn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:o,data:s,form:l}){dt=!0;const c=new URL(location.href);let f;({params:a={},route:i={id:null}}=await ge(c,!1)||{}),f=je.find(({id:d})=>d===i.id);let p,w=!0;try{const d=r.map(async(_,g)=>{const h=s[g];return h?.uses&&(h.uses=ln(h.uses)),Ve({loader:y.nodes[_],url:c,params:a,route:i,parent:async()=>{const k={};for(let R=0;R<g;R+=1)Object.assign(k,(await d[R]).data);return k},server_data_node:Be(h)})}),u=await Promise.all(d);if(f){const _=f.layouts;for(let g=0;g<_.length;g++)_[g]||u.splice(g,0,void 0)}p=await fe({url:c,params:a,branch:u,status:t,error:n,errors:f?.errors,form:l,route:f??null})}catch(d){if(d instanceof Ue){await Q(new URL(d.location,location.href));return}p=await Me({status:Ce(d),error:await ee(d,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",w=!1}p.props.page&&(p.props.page.state={}),await gt(p,e,w)}function ln(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function cn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=vt(e);if(r&&document.getElementById(r)){const{x:i,y:o}=V();setTimeout(()=>{const s=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(i,o),xe=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let o=0;o<a.rangeCount;o+=1)i.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===i.length){for(let o=0;o<a.rangeCount;o+=1){const s=i[o],l=a.getRangeAt(o);if(s.commonAncestorContainer!==l.commonAncestorContainer||s.startContainer!==l.startContainer||s.endContainer!==l.endContainer||s.startOffset!==l.startOffset||s.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function We(e,t,n,r,a=null){let i,o;const s=new Promise((c,f)=>{i=c,o=f});return s.catch(C),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:V()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:s},fulfil:i,reject:o}}function _e(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function un(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function vt(e){let t;if(y.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{wn as a,L as b,j as c,hn as l,b as p,dn as r,mn as s,qt as v};
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{bn as Le,aM as Ke,bb as A,aj as U,b0 as T,bh as re,b6 as bt,bi as kt}from"./Cum3gQOV.js";class Ae{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ue{constructor(t,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=n}}class Te extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function St(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Et(e){return e.split("%25").map(decodeURI).join("%25")}function Rt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ve({href:e}){return e.split("#")[0]}function C(){}function xt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function Lt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const At=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&J.delete($e(e)),At(e,t));const J=new Map;function Ut(e,t){const n=$e(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&J.set(n,{body:a,init:i,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=Lt(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function Tt(e,t,n){if(J.size>0){const r=$e(e,n),a=J.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);J.delete(r)}}return window.fetch(t,n)}function $e(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${xt(...a)}"]`}return r}const $t=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function It(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Ze(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ye(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ye(String.fromCharCode(...l.slice(2).split("-").map(_=>parseInt(_,16))));const f=$t.exec(l),[,p,w,d,u]=f;return t.push({name:d,matcher:u,optional:!!p,rest:!!w,chained:w?c===1&&o[0]==="":!1}),w?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ye(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Ze(e){return e.slice(1).split("/").filter(Pt)}function Ot(e,t,n){const r={},a=e.slice(1),i=a.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const l=t[s];let c=a[s-o];if(l.chained&&l.rest&&o&&(c=a.slice(s-o,s+1).filter(f=>f).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const f=t[s+1],p=a[s+1];f&&!f.rest&&f.optional&&p&&l.chained&&(o=0),!f&&!p&&Object.keys(r).length===i.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function ye(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const Ct=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function dn(e,t){const n=Ze(e),r=e!="/"&&e.endsWith("/");return"/"+n.map(a=>a.replace(Ct,(i,o,s,l)=>{const c=t[l];if(!c){if(o||s&&c!==void 0)return"";throw new Error(`Missing parameter '${l}' in route ${e}`)}if(c.startsWith("/")||c.endsWith("/"))throw new Error(`Parameter '${l}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return c})).filter(Boolean).join("/")+(r?"/":"")}function jt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([s,[l,c,f]])=>{const{pattern:p,params:w}=It(s),d={id:s,exec:u=>{const _=p.exec(u);if(_)return Ot(_,w,r)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...c||[]].map(o),leaf:i(l)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function i(s){const l=s<0;return l&&(s=~s),[l,e[s]]}function o(s){return s===void 0?s:[a.has(s),e[s]]}}function et(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Fe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const L=globalThis.__sveltekit_1guh939?.base??"",Nt=globalThis.__sveltekit_1guh939?.assets??L??"",qt="48ef86a",tt="sveltekit:snapshot",nt="sveltekit:scroll",Ie="sveltekit:states",rt="sveltekit:pageurl",D="sveltekit:history",W="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Pe=location.origin;function Oe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function V(){return{x:pageXOffset,y:pageYOffset}}function M(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ge={...q,"":q.hover};function at(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function ot(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=at(e)}}function Se(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const s=location.hash.split("#")[1]||"/";r.hash=`#${s}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||he(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===Pe&&e.hasAttribute("download");return{url:r,external:i,target:a,download:o}}function ae(e){let t=null,n=null,r=null,a=null,i=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=M(s,"preload-code")),a===null&&(a=M(s,"preload-data")),t===null&&(t=M(s,"keepfocus")),n===null&&(n=M(s,"noscroll")),i===null&&(i=M(s,"reload")),o===null&&(o=M(s,"replacestate")),s=at(s);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ge[r??"off"],preload_data:Ge[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(o)}}function He(e){const t=Le(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function i(o){let s;return t.subscribe(l=>{(s===void 0||n&&l!==s)&&o(s=l)})}return{notify:r,set:a,subscribe:i}}const st={v:C};function Dt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Nt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==qt;return o&&(e(!0),st.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function he(e,t,n){return e.origin!==Pe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function hn(e){}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const Vt=new Set([...it]);[...Vt];function Mt(e){return e.filter(t=>t!=null)}function te(e,t){return e+"/"+t}function Ce(e){return e instanceof Ae||e instanceof Te?e.status:500}function Bt(e){return e instanceof Te?e.text:"Internal Error"}let b,z,be;const Wt=Ke.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ke.toString()),Je="a:";Wt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Je)},z={current:null},be={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL(Je));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},z=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},be=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},st.v=()=>be.current=!0);function lt(e){Object.assign(b,e)}const Kt=kt??(e=>e()),Ft=new Set(["icon","shortcut icon","apple-touch-icon"]);let G=null;const N=et(nt)??{},X=et(tt)??{},j={url:He({}),page:He({}),navigating:Le(null),updated:Dt()};function pe(e){N[e]=V()}function ct(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function Q(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(C)}async function ut(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}let je,Ee,oe,$,Re,y;const se=[],ie=[];let x=null;function le(){x?.fork?.then(e=>e?.discard()),x=null}const ne=new Map,ft=new Set,Gt=new Set,Y=new Set;let m={branch:[],error:null,url:null},dt=!1,ce=!1,Ye=!0,Z=!1,H=!1,Ne=!1,qe=!1,De,v,E,O;const ue=new Set,ze=new Map,Xe=new Map;async function mn(e,t,n){globalThis.__sveltekit_1guh939&&(globalThis.__sveltekit_1guh939.query,globalThis.__sveltekit_1guh939.prerender),document.URL!==location.href&&(location.href=location.href),y=e,await e.hooks.init?.(),je=jt(e),$=document.documentElement,Re=t,Ee=e.nodes[0],oe=e.nodes[1],Ee(),oe(),v=history.state?.[D],E=history.state?.[W],v||(v=E=Date.now(),history.replaceState({...history.state,[D]:v,[W]:E},""));const r=N[v];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await sn(Re,n)):(await B({type:"enter",url:Oe(y.hash?un(new URL(location.href)):location.href),replace_state:!0}),a()),on()}function Ht(){se.length=0,qe=!1}function ht(e){ie.some(t=>t?.snapshot)&&(X[e]=ie.map(t=>t?.snapshot?.capture()))}function pt(e){X[e]?.forEach((t,n)=>{ie[n]?.snapshot?.restore(t)})}function Qe(){pe(v),Fe(nt,N),ht(E),Fe(tt,X)}async function Jt(e,t,n,r){let a,i;t.invalidateAll&&le(),await B({type:"goto",url:Oe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{if(t.invalidateAll){qe=!0,a=new Set;for(const[o,s]of ze)for(const l of s.keys())a.add(te(o,l));i=new Set;for(const[o,s]of Xe)for(const l of s.keys())i.add(te(o,l))}t.invalidate&&t.invalidate.forEach(an)}}),t.invalidateAll&&re().then(re).then(()=>{for(const[o,s]of ze)for(const[l,{resource:c}]of s)a?.has(te(o,l))&&c.refresh();for(const[o,s]of Xe)for(const[l,{resource:c}]of s)i?.has(te(o,l))&&c.reconnect()})}async function Yt(e){if(e.id!==x?.id){le();const t={};ue.add(t),x={id:e.id,token:t,promise:_t({...e,preload:t}).then(n=>(ue.delete(t),n.type==="loaded"&&n.state.error&&le(),n)),fork:null}}return x.promise}async function ke(e){const t=(await ge(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function gt(e,t,n){const r={params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)};m={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),lt(e.props.page),De=new y.root({target:t,props:{...e.props,stores:j,components:ie},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),pt(E),n){const i={from:null,to:{...r,scroll:N[v]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};Y.forEach(o=>o(i))}ce=!0}async function fe({url:e,params:t,branch:n,errors:r,status:a,error:i,route:o,form:s}){let l="never";if(L&&(e.pathname===L||e.pathname===L+"/"))l="always";else for(const u of n)u?.slash!==void 0&&(l=u.slash);e.pathname=St(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:o},props:{constructors:Mt(n).map(u=>u.node.component),page:_e(b)}};s!==void 0&&(c.props.form=s);let f={},p=!b,w=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const _=n[u],g=m.branch[u];_?.data!==g?.data&&(p=!0),_&&(f={...f,..._.data},p&&(c.props[`data_${w}`]=f),w+=1)}return(!m.url||e.href!==m.url.href||m.error!==i||s!==void 0&&s!==b.form||p)&&(c.props.page={error:i,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:s??null,data:p?f:b.data}),c}async function Ve({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:o,uses:s}:null,data:o??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function zt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=ce?Tt(r,a.href,t):Ut(r,t);return{resolved:a,promise:i}}function Xt(e,t,n,r,a,i){if(qe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(i[o]!==m.params[o])return!0;for(const o of a.dependencies)if(se.some(s=>s(new URL(o))))return!0;return!1}function Me(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Qt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(o=>i.includes(o))&&i.every(o=>a.includes(o))&&n.delete(r)}return n}function Zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:_e(b),constructors:[]}}}async function _t({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(x?.id===e)return ue.delete(x.token),x.promise;const{errors:o,layouts:s,leaf:l}=a,c=[...s,l];o.forEach(g=>g?.().catch(C)),c.forEach(g=>g?.[1]().catch(C));const f=m.url?e!==de(m.url):!1,p=m.route?a.id!==m.route.id:!1,w=Qt(m.url,n);let d=!1;const u=c.map(async(g,h)=>{if(!g)return;const k=m.branch[h];return g[1]===k?.loader&&!Xt(d,p,f,w,k.universal?.uses,r)?k:(d=!0,Ve({loader:g[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let P=0;P<h;P+=1)Object.assign(I,(await u[P])?.data);return I},server_data_node:Me(g[0]?{type:"skip"}:null,g[0]?k?.server:void 0)}))});for(const g of u)g.catch(C);const _=[];for(let g=0;g<c.length;g+=1)if(c[g])try{_.push(await u[g])}catch(h){if(h instanceof Ue)return{type:"redirect",location:h.location};if(ue.has(i))return Zt({error:await ee(h,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let k=Ce(h),R;if(h instanceof Ae)R=h.body;else{if(await j.updated.check())return await ut(),await Q(n);R=await ee(h,{params:r,url:n,route:{id:a.id}})}const I=await en(g,_,o);return I?fe({url:n,params:r,branch:_.slice(0,I.idx).concat(I.node),errors:o,status:k,error:R,route:a}):await wt(n,{id:a.id},R,k)}else _.push(void 0);return fe({url:n,params:r,branch:_,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function en(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const o=await Ve({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Me(i)}),s={node:await oe(),loader:oe,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Ue)return Jt(new URL(o.location,location.href),{},0);throw o}}async function tn(e){const t=e.href;if(ne.has(t))return ne.get(t);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(e),fetch:async(i,o)=>zt(i,o,e).promise})??e;if(typeof a=="string"){const i=new URL(e);y.hash?i.hash=a:i.pathname=a,a=i}return a})();ne.set(t,r),n=await r}catch{ne.delete(t);return}return n}async function ge(e,t){if(e&&!he(e,L,y.hash)){const n=await tn(e);if(!n)return;const r=nn(n);for(const a of je){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:Rt(i),url:e}}}}function nn(e){return Et(y.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function de(e){return(y.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function mt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let o=!1;const s=We(m,n,e,t,i??null);r!==void 0&&(s.navigation.delta=r),a!==void 0&&(s.navigation.event=a);const l={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return Z||ft.forEach(c=>c(l)),o?null:s}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o={},redirect_count:s=0,nav_token:l={},accept:c=C,block:f=C,event:p}){const w=O;O=l;const d=await ge(t,!1),u=e==="enter"?We(m,d,t,e):mt({url:t,type:e,delta:n?.delta,intent:d,scroll:n?.scroll,event:p});if(!u){f(),O===l&&(O=w);return}const _=v,g=E;c(),Z=!0,ce&&u.navigation.type!=="enter"&&j.navigating.set(z.current=u.navigation);let h=d&&await _t(d);if(!h){if(he(t,L,y.hash))return await Q(t,i);h=await wt(t,{id:null},await ee(new Te(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=d?.url||t,O!==l)return u.reject(new Error("navigation aborted")),!1;if(h.type==="redirect"){if(s<20){await B({type:e,url:new URL(h.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:o,redirect_count:s+1,nav_token:l}),u.fulfil(void 0);return}h=await Be({status:500,error:await ee(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else h.props.page.status>=400&&await j.updated.check()&&(await ut(),await Q(t,i));if(Ht(),pe(_),ht(g),h.props.page.url.pathname!==t.pathname&&(t.pathname=h.props.page.url.pathname),o=n?n.state:o,!n){const S=i?0:1,K={[D]:v+=S,[W]:E+=S,[Ie]:o};(i?history.replaceState:history.pushState).call(history,K,"",t),i||ct(v,E)}const k=d&&x?.id===d.id?x.fork:null;x?.fork&&!k&&le(),x=null,h.props.page.state=o;let R;if(ce){const S=(await Promise.all(Array.from(Gt,F=>F(u.navigation)))).filter(F=>typeof F=="function");if(S.length>0){let F=function(){S.forEach(we=>{Y.delete(we)})};S.push(F),S.forEach(we=>{Y.add(we)})}const K=u.navigation.to;m={...h.state,nav:{params:K.params,route:K.route,url:K.url}},h.props.page&&(h.props.page.url=t);const me=k&&await k;me?R=me.commit():(G=null,De.$set(h.props),G&&Object.assign(h.props.page,G),lt(h.props.page),R=bt?.()),Ne=!0}else await gt(h,Re,!1);const{activeElement:I}=document;if(await R,await re(),await re(),O!==l)return u.reject(new Error("navigation aborted")),!1;h.props.page&&G&&Object.assign(h.props.page,G);let P=null;if(Ye){const S=n?n.scroll:a?V():null;S?scrollTo(S.x,S.y):(P=t.hash&&document.getElementById(vt(t)))?P.scrollIntoView():scrollTo(0,0)}const yt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!yt&&cn(t,!P),Ye=!0,Z=!1,e==="popstate"&&pt(E),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=V()),Y.forEach(S=>S(u.navigation)),j.navigating.set(z.current=null)}async function wt(e,t,n,r,a){return e.origin===Pe&&e.pathname===location.pathname&&!dt?await Be({status:r,error:n,url:e,route:t}):await Q(e,a)}function rn(){let e,t={element:void 0,href:void 0},n;$.addEventListener("mousemove",s=>{const l=s.target;clearTimeout(e),e=setTimeout(()=>{i(l,q.hover)},20)});function r(s){s.defaultPrevented||i(s.composedPath()[0],q.tap)}$.addEventListener("mousedown",r),$.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(s=>{for(const l of s)l.isIntersecting&&(ke(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(s,l){const c=ot(s,$),f=c===t.element&&c?.href===t.href&&l>=n;if(!c||f)return;const{url:p,external:w,download:d}=Se(c,L,y.hash);if(w||d)return;const u=ae(c),_=p&&de(m.url)===de(p);if(!(u.reload||_))if(l<=u.preload_data){t={element:c,href:c.href},n=q.tap;const g=await ge(p,!1);if(!g)return;Yt(g)}else l<=u.preload_code&&(t={element:c,href:c.href},n=l,ke(p))}function o(){a.disconnect();for(const s of $.querySelectorAll("a")){const{url:l,external:c,download:f}=Se(s,L,y.hash);if(c||f)continue;const p=ae(s);p.reload||(p.preload_code===q.viewport&&a.observe(s),p.preload_code===q.eager&&ke(l))}}Y.add(o),o()}function ee(e,t){if(e instanceof Ae)return e.body;const n=Ce(e),r=Bt(e);return y.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function an(e){if(typeof e=="function")se.push(e);else{const{href:t}=new URL(e,location.href);se.push(n=>n.href===t)}}function wn(e,t){pe(v);const n={[D]:v+=1,[W]:E,[rt]:b.url.href,[Ie]:t};history.pushState(n,"",Oe(e)),Ne=!0,b.state=t,De.$set({page:Kt(()=>_e(b))}),ct(v,E)}function on(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Qe(),!Z){const r=We(m,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};ft.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Qe()}),navigator.connection?.saveData||rn(),$.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=ot(t.composedPath()[0],$);if(!n)return;const{url:r,external:a,target:i,download:o}=Se(n,L,y.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const s=ae(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[c,f]=(y.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===ve(location);if(a||s.reload&&(!p||!f)){mt({url:r,type:"link",event:t})?Z=!0:t.preventDefault();return}if(f!==void 0&&p){const[,w]=m.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=n.ownerDocument.getElementById(decodeURIComponent(f));d&&(d.scrollIntoView(),d.focus())}return}if(H=!0,pe(v),e(r),!s.replace_state)return;H=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await B({type:"link",url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),$.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(he(o,L,!1))return;const s=t.target,l=ae(s);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(s,r);o.search=new URLSearchParams(c).toString(),B({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!xe){if(t.state?.[D]){const n=t.state[D];if(O={},n===v)return;const r=N[n],a=t.state[Ie]??{},i=new URL(t.state[rt]??location.href),o=t.state[W],s=m.url?ve(location)===ve(m.url):!1;if(o===E&&(Ne||s)){a!==b.state&&(b.state=a),e(i),N[v]=V(),r&&scrollTo(r.x,r.y),v=n;return}const c=n-v;await B({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{v=n,E=o},block:()=>{history.go(-c)},nav_token:O,event:t})}else if(!H){const n=new URL(location.href);e(n),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{H&&(H=!1,history.replaceState({...history.state,[D]:++v,[W]:E},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&j.navigating.set(z.current=null)});function e(t){m.url=b.url=t,j.page.set(_e(b)),j.page.notify()}}async function sn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:o,data:s,form:l}){dt=!0;const c=new URL(location.href);let f;({params:a={},route:i={id:null}}=await ge(c,!1)||{}),f=je.find(({id:d})=>d===i.id);let p,w=!0;try{const d=r.map(async(_,g)=>{const h=s[g];return h?.uses&&(h.uses=ln(h.uses)),Ve({loader:y.nodes[_],url:c,params:a,route:i,parent:async()=>{const k={};for(let R=0;R<g;R+=1)Object.assign(k,(await d[R]).data);return k},server_data_node:Me(h)})}),u=await Promise.all(d);if(f){const _=f.layouts;for(let g=0;g<_.length;g++)_[g]||u.splice(g,0,void 0)}p=await fe({url:c,params:a,branch:u,status:t,error:n,errors:f?.errors,form:l,route:f??null})}catch(d){if(d instanceof Ue){await Q(new URL(d.location,location.href));return}p=await Be({status:Ce(d),error:await ee(d,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",w=!1}p.props.page&&(p.props.page.state={}),await gt(p,e,w)}function ln(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let xe=!1;function cn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=vt(e);if(r&&document.getElementById(r)){const{x:i,y:o}=V();setTimeout(()=>{const s=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(i,o),xe=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let o=0;o<a.rangeCount;o+=1)i.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===i.length){for(let o=0;o<a.rangeCount;o+=1){const s=i[o],l=a.getRangeAt(o);if(s.commonAncestorContainer!==l.commonAncestorContainer||s.startContainer!==l.startContainer||s.endContainer!==l.endContainer||s.startOffset!==l.startOffset||s.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function We(e,t,n,r,a=null){let i,o;const s=new Promise((c,f)=>{i=c,o=f});return s.catch(C),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:V()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:s},fulfil:i,reject:o}}function _e(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function un(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function vt(e){let t;if(y.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{wn as a,L as b,j as c,hn as l,b as p,dn as r,mn as s,qt as v};
|
|
2
|
+
//# sourceMappingURL=CuGyzHtA.js.map
|