@kozou/svelte-ui 0.0.1 → 0.1.1

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.
Files changed (119) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +107 -1
  3. package/build/client/_app/immutable/assets/0.CZsFVllx.css +2 -0
  4. package/build/client/_app/immutable/assets/0.CZsFVllx.css.br +0 -0
  5. package/build/client/_app/immutable/assets/0.CZsFVllx.css.gz +0 -0
  6. package/build/client/_app/immutable/chunks/BpIM_fT8.js +2 -0
  7. package/build/client/_app/immutable/chunks/BpIM_fT8.js.br +0 -0
  8. package/build/client/_app/immutable/chunks/BpIM_fT8.js.gz +0 -0
  9. package/build/client/_app/immutable/chunks/C4vVozd5.js +4 -0
  10. package/build/client/_app/immutable/chunks/C4vVozd5.js.br +0 -0
  11. package/build/client/_app/immutable/chunks/C4vVozd5.js.gz +0 -0
  12. package/build/client/_app/immutable/chunks/Cu9GwMht.js +214 -0
  13. package/build/client/_app/immutable/chunks/Cu9GwMht.js.br +0 -0
  14. package/build/client/_app/immutable/chunks/Cu9GwMht.js.gz +0 -0
  15. package/build/client/_app/immutable/chunks/DQLVkJ9E.js +1 -0
  16. package/build/client/_app/immutable/chunks/DQLVkJ9E.js.br +0 -0
  17. package/build/client/_app/immutable/chunks/DQLVkJ9E.js.gz +0 -0
  18. package/build/client/_app/immutable/chunks/kNaey6uv.js +1 -0
  19. package/build/client/_app/immutable/chunks/kNaey6uv.js.br +0 -0
  20. package/build/client/_app/immutable/chunks/kNaey6uv.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  22. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
  23. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  24. package/build/client/_app/immutable/entry/app.D4C-SzYE.js +2 -0
  25. package/build/client/_app/immutable/entry/app.D4C-SzYE.js.br +0 -0
  26. package/build/client/_app/immutable/entry/app.D4C-SzYE.js.gz +0 -0
  27. package/build/client/_app/immutable/entry/start.BgPykZWX.js +1 -0
  28. package/build/client/_app/immutable/entry/start.BgPykZWX.js.br +0 -0
  29. package/build/client/_app/immutable/entry/start.BgPykZWX.js.gz +0 -0
  30. package/build/client/_app/immutable/nodes/0.Ct90k1ZK.js +1 -0
  31. package/build/client/_app/immutable/nodes/0.Ct90k1ZK.js.br +0 -0
  32. package/build/client/_app/immutable/nodes/0.Ct90k1ZK.js.gz +0 -0
  33. package/build/client/_app/immutable/nodes/1.ByzpIkVa.js +1 -0
  34. package/build/client/_app/immutable/nodes/1.ByzpIkVa.js.br +0 -0
  35. package/build/client/_app/immutable/nodes/1.ByzpIkVa.js.gz +0 -0
  36. package/build/client/_app/immutable/nodes/2.DKSRkbg2.js +1 -0
  37. package/build/client/_app/immutable/nodes/2.DKSRkbg2.js.br +0 -0
  38. package/build/client/_app/immutable/nodes/2.DKSRkbg2.js.gz +0 -0
  39. package/build/client/_app/immutable/nodes/3.BRseKH3J.js +1 -0
  40. package/build/client/_app/immutable/nodes/3.BRseKH3J.js.br +0 -0
  41. package/build/client/_app/immutable/nodes/3.BRseKH3J.js.gz +0 -0
  42. package/build/client/_app/immutable/nodes/4.hHssvcSO.js +1 -0
  43. package/build/client/_app/immutable/nodes/4.hHssvcSO.js.br +0 -0
  44. package/build/client/_app/immutable/nodes/4.hHssvcSO.js.gz +0 -0
  45. package/build/client/_app/immutable/nodes/5.CfrPDIy5.js +1 -0
  46. package/build/client/_app/immutable/nodes/5.CfrPDIy5.js.br +0 -0
  47. package/build/client/_app/immutable/nodes/5.CfrPDIy5.js.gz +0 -0
  48. package/build/client/_app/immutable/nodes/6.nxvsG8yx.js +1 -0
  49. package/build/client/_app/immutable/nodes/6.nxvsG8yx.js.br +3 -0
  50. package/build/client/_app/immutable/nodes/6.nxvsG8yx.js.gz +0 -0
  51. package/build/client/_app/immutable/nodes/7.Bfhyc_gZ.js +1 -0
  52. package/build/client/_app/immutable/nodes/7.Bfhyc_gZ.js.br +0 -0
  53. package/build/client/_app/immutable/nodes/7.Bfhyc_gZ.js.gz +0 -0
  54. package/build/client/_app/version.json +1 -0
  55. package/build/client/_app/version.json.br +0 -0
  56. package/build/client/_app/version.json.gz +0 -0
  57. package/build/env.js +94 -0
  58. package/build/handler.js +1494 -0
  59. package/build/index.js +345 -0
  60. package/build/server/chunks/0-BFDPzvW-.js +24 -0
  61. package/build/server/chunks/0-BFDPzvW-.js.map +1 -0
  62. package/build/server/chunks/1-Dmzzx_Xf.js +9 -0
  63. package/build/server/chunks/1-Dmzzx_Xf.js.map +1 -0
  64. package/build/server/chunks/2-B1IcZygX.js +35 -0
  65. package/build/server/chunks/2-B1IcZygX.js.map +1 -0
  66. package/build/server/chunks/3-BVIqnkRy.js +70 -0
  67. package/build/server/chunks/3-BVIqnkRy.js.map +1 -0
  68. package/build/server/chunks/4-BeHrsGek.js +103 -0
  69. package/build/server/chunks/4-BeHrsGek.js.map +1 -0
  70. package/build/server/chunks/5-Cw01QEjm.js +69 -0
  71. package/build/server/chunks/5-Cw01QEjm.js.map +1 -0
  72. package/build/server/chunks/6-DdCU04G4.js +70 -0
  73. package/build/server/chunks/6-DdCU04G4.js.map +1 -0
  74. package/build/server/chunks/7-BJeosbkA.js +66 -0
  75. package/build/server/chunks/7-BJeosbkA.js.map +1 -0
  76. package/build/server/chunks/_layout.svelte-ClzaQTuQ.js +15 -0
  77. package/build/server/chunks/_layout.svelte-ClzaQTuQ.js.map +1 -0
  78. package/build/server/chunks/_page.svelte-B8Bnkzob.js +78 -0
  79. package/build/server/chunks/_page.svelte-B8Bnkzob.js.map +1 -0
  80. package/build/server/chunks/_page.svelte-BN1au56r.js +51 -0
  81. package/build/server/chunks/_page.svelte-BN1au56r.js.map +1 -0
  82. package/build/server/chunks/_page.svelte-Bu4SlGir.js +86 -0
  83. package/build/server/chunks/_page.svelte-Bu4SlGir.js.map +1 -0
  84. package/build/server/chunks/_page.svelte-DHhstcmi.js +70 -0
  85. package/build/server/chunks/_page.svelte-DHhstcmi.js.map +1 -0
  86. package/build/server/chunks/_page.svelte-DKhYDtNl.js +86 -0
  87. package/build/server/chunks/_page.svelte-DKhYDtNl.js.map +1 -0
  88. package/build/server/chunks/_page.svelte-DYlwwhHn.js +70 -0
  89. package/build/server/chunks/_page.svelte-DYlwwhHn.js.map +1 -0
  90. package/build/server/chunks/adapter-DSZ-_PM_.js +273 -0
  91. package/build/server/chunks/adapter-DSZ-_PM_.js.map +1 -0
  92. package/build/server/chunks/app-DST8OmzT.js +12 -0
  93. package/build/server/chunks/app-DST8OmzT.js.map +1 -0
  94. package/build/server/chunks/client-Bcpj9QFB.js +69 -0
  95. package/build/server/chunks/client-Bcpj9QFB.js.map +1 -0
  96. package/build/server/chunks/dev-yFiAtg5l.js +4498 -0
  97. package/build/server/chunks/dev-yFiAtg5l.js.map +1 -0
  98. package/build/server/chunks/error.svelte-1lnafu4q.js +68 -0
  99. package/build/server/chunks/error.svelte-1lnafu4q.js.map +1 -0
  100. package/build/server/chunks/hooks.server-BBW_dqIs.js +14060 -0
  101. package/build/server/chunks/hooks.server-BBW_dqIs.js.map +1 -0
  102. package/build/server/chunks/index-5kYmxIr9.js +191 -0
  103. package/build/server/chunks/index-5kYmxIr9.js.map +1 -0
  104. package/build/server/chunks/index-DBqjc0Yf.js +77 -0
  105. package/build/server/chunks/index-DBqjc0Yf.js.map +1 -0
  106. package/build/server/chunks/internal-BrzrGF6g.js +1757 -0
  107. package/build/server/chunks/internal-BrzrGF6g.js.map +1 -0
  108. package/build/server/chunks/list-params-DjWk7B1o.js +44 -0
  109. package/build/server/chunks/list-params-DjWk7B1o.js.map +1 -0
  110. package/build/server/chunks/widget-registry-CYJ6dCZP.js +242 -0
  111. package/build/server/chunks/widget-registry-CYJ6dCZP.js.map +1 -0
  112. package/build/server/chunks/zod-from-table-Cqu9YCfY.js +6923 -0
  113. package/build/server/chunks/zod-from-table-Cqu9YCfY.js.map +1 -0
  114. package/build/server/index.js +4447 -0
  115. package/build/server/index.js.map +1 -0
  116. package/build/server/manifest.js +86 -0
  117. package/build/server/manifest.js.map +1 -0
  118. package/build/shims.js +32 -0
  119. package/package.json +71 -4
@@ -0,0 +1,1757 @@
1
+ import { createRequire } from 'node:module';
2
+ import { a5 as ssr_context, _ as run$1, a0 as setContext, U as noop$1, C as hasContext, x as getContext, w as getAllContexts, v as getAbortSignal, j as createContext, S as lifecycle_function_unavailable, r as experimental_async_required, A as get_render_context, aa as uneval, E as hydratable_serialization_failed, D as DevalueError, P as is_primitive, B as get_type, O as is_plain_object, p as enumerable_symbols, a8 as stringify_key, a9 as stringify_string, ac as valid_array_indices, R as is_valid_array_len, M as MAX_ARRAY_INDEX, Q as is_valid_array_index, Z as render, $ as set, L as LEGACY_PROPS, t as get, s as flushSync, l as define_property, T as mutable_source, K as init_operations, y as get_first_child, z as get_next_sibling, H as HYDRATION_ERROR, a4 as set_hydrating, a3 as set_hydrate_node, I as hydration_failed, g as clear_text_content, i as component_root, F as hydrate_node, k as create_text, f as boundary, c as array_from, N as is_passive_event, a2 as set_active_reaction, a1 as set_active_effect, b as active_reaction, a as active_effect, m as derived, G as hydrating, W as push, h as component_context, J as hydration_mismatch, V as pop } from './dev-yFiAtg5l.js';
3
+ import { H as HttpError, S as SvelteKitError } from './index-DBqjc0Yf.js';
4
+ import 'clsx';
5
+
6
+ //#region \0rolldown/runtime.js
7
+ var __create = Object.create;
8
+ var __defProp = Object.defineProperty;
9
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
+ var __getOwnPropNames = Object.getOwnPropertyNames;
11
+ var __getProtoOf = Object.getPrototypeOf;
12
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
13
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
14
+ var __exportAll = (all, no_symbols) => {
15
+ let target = {};
16
+ for (var name in all) __defProp(target, name, {
17
+ get: all[name],
18
+ enumerable: true
19
+ });
20
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
21
+ return target;
22
+ };
23
+ var __copyProps = (to, from, except, desc) => {
24
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
25
+ key = keys[i];
26
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
27
+ get: ((k) => from[k]).bind(null, key),
28
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
29
+ });
30
+ }
31
+ return to;
32
+ };
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(__defProp(target, "default", {
34
+ value: mod,
35
+ enumerable: true
36
+ }) , mod));
37
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
38
+
39
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/app/paths/internal/server.js
40
+ var base = "";
41
+ var assets = base;
42
+ var app_dir = "_app";
43
+ var initial = {
44
+ base,
45
+ assets
46
+ };
47
+ /**
48
+ * @param {{ base: string, assets: string }} paths
49
+ */
50
+ function override(paths) {
51
+ base = paths.base;
52
+ assets = paths.assets;
53
+ }
54
+ function reset() {
55
+ base = initial.base;
56
+ assets = initial.assets;
57
+ }
58
+ /**
59
+ * `$env/dynamic/public`
60
+ * @type {Record<string, string>}
61
+ */
62
+ var public_env = {};
63
+ /** @type {(environment: Record<string, string>) => void} */
64
+ function set_private_env(environment) {}
65
+ /** @type {(environment: Record<string, string>) => void} */
66
+ function set_public_env(environment) {
67
+ public_env = environment;
68
+ }
69
+ //#endregion
70
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/internal/server/hydratable.js
71
+ /** @import { HydratableLookupEntry } from '#server' */
72
+ /**
73
+ * @template T
74
+ * @param {string} key
75
+ * @param {() => T} fn
76
+ * @returns {T}
77
+ */
78
+ function hydratable(key, fn) {
79
+ experimental_async_required();
80
+ const { hydratable } = get_render_context();
81
+ let entry = hydratable.lookup.get(key);
82
+ if (entry !== void 0) return entry.value;
83
+ const value = fn();
84
+ entry = encode(key, value, hydratable.unresolved_promises);
85
+ hydratable.lookup.set(key, entry);
86
+ return value;
87
+ }
88
+ /**
89
+ * @param {string} key
90
+ * @param {any} value
91
+ * @param {Map<Promise<any>, string>} [unresolved]
92
+ */
93
+ function encode(key, value, unresolved) {
94
+ /** @type {HydratableLookupEntry} */
95
+ const entry = {
96
+ value,
97
+ serialized: ""
98
+ };
99
+ let uid = 1;
100
+ entry.serialized = uneval(entry.value, (value, uneval) => {
101
+ if (is_promise(value)) {
102
+ const placeholder = `"${uid++}"`;
103
+ const p = value.then((v) => {
104
+ entry.serialized = entry.serialized.replace(placeholder, () => `r(${uneval(v)})`);
105
+ }).catch((devalue_error) => hydratable_serialization_failed(key, serialization_stack(entry.stack, devalue_error?.stack)));
106
+ p.catch(() => {}).finally(() => unresolved?.delete(p));
107
+ (entry.promises ??= []).push(p);
108
+ return placeholder;
109
+ }
110
+ });
111
+ return entry;
112
+ }
113
+ /**
114
+ * @param {any} value
115
+ * @returns {value is Promise<any>}
116
+ */
117
+ function is_promise(value) {
118
+ return Object.prototype.toString.call(value) === "[object Promise]";
119
+ }
120
+ /**
121
+ * @param {string | undefined} root_stack
122
+ * @param {string | undefined} uneval_stack
123
+ */
124
+ function serialization_stack(root_stack, uneval_stack) {
125
+ let out = "";
126
+ if (root_stack) out += root_stack + "\n";
127
+ if (uneval_stack) out += "Caused by:\n" + uneval_stack + "\n";
128
+ return out || "<missing stack trace>";
129
+ }
130
+ //#endregion
131
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/internal/server/blocks/snippet.js
132
+ /** @import { Snippet } from 'svelte' */
133
+ /** @import { Renderer } from '../renderer' */
134
+ /** @import { Getters } from '#shared' */
135
+ /**
136
+ * Create a snippet programmatically
137
+ * @template {unknown[]} Params
138
+ * @param {(...params: Getters<Params>) => {
139
+ * render: () => string
140
+ * setup?: (element: Element) => void | (() => void)
141
+ * }} fn
142
+ * @returns {Snippet<Params>}
143
+ */
144
+ function createRawSnippet(fn) {
145
+ return (renderer, ...args) => {
146
+ var getters = args.map((value) => () => value);
147
+ renderer.push(fn(...getters).render().trim());
148
+ };
149
+ }
150
+ //#endregion
151
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/index-server.js
152
+ /** @import { SSRContext } from '#server' */
153
+ /** @import { Renderer } from './internal/server/renderer.js' */
154
+ var index_server_exports = /* @__PURE__ */ __exportAll({
155
+ afterUpdate: () => noop$1,
156
+ beforeUpdate: () => noop$1,
157
+ createContext: () => createContext,
158
+ createEventDispatcher: () => createEventDispatcher,
159
+ createRawSnippet: () => createRawSnippet,
160
+ flushSync: () => noop$1,
161
+ fork: () => fork,
162
+ getAbortSignal: () => getAbortSignal,
163
+ getAllContexts: () => getAllContexts,
164
+ getContext: () => getContext,
165
+ hasContext: () => hasContext,
166
+ hydratable: () => hydratable,
167
+ hydrate: () => hydrate$1,
168
+ mount: () => mount$1,
169
+ onDestroy: () => onDestroy,
170
+ onMount: () => noop$1,
171
+ setContext: () => setContext,
172
+ settled: () => settled,
173
+ tick: () => tick,
174
+ unmount: () => unmount$1,
175
+ untrack: () => run$1
176
+ });
177
+ /** @param {() => void} fn */
178
+ function onDestroy(fn) {
179
+ /** @type {Renderer} */ ssr_context.r.on_destroy(fn);
180
+ }
181
+ function createEventDispatcher() {
182
+ return noop$1;
183
+ }
184
+ function mount$1() {
185
+ lifecycle_function_unavailable("mount");
186
+ }
187
+ function hydrate$1() {
188
+ lifecycle_function_unavailable("hydrate");
189
+ }
190
+ function unmount$1() {
191
+ lifecycle_function_unavailable("unmount");
192
+ }
193
+ function fork() {
194
+ lifecycle_function_unavailable("fork");
195
+ }
196
+ async function tick() {}
197
+ async function settled() {}
198
+
199
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/utils/functions.js
200
+ function noop() {}
201
+ /**
202
+ * @template T
203
+ * @param {() => T} fn
204
+ */
205
+ function once(fn) {
206
+ let done = false;
207
+ /** @type T */
208
+ let result;
209
+ return () => {
210
+ if (done) return result;
211
+ done = true;
212
+ return result = fn();
213
+ };
214
+ }
215
+ //#endregion
216
+ //#region ../../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/base64.js
217
+ /** @type {(array_buffer: ArrayBuffer) => string} */
218
+ function encode_native(array_buffer) {
219
+ return new Uint8Array(array_buffer).toBase64();
220
+ }
221
+ /** @type {(base64: string) => ArrayBuffer} */
222
+ function decode_native(base64) {
223
+ return Uint8Array.fromBase64(base64).buffer;
224
+ }
225
+ /** @type {(array_buffer: ArrayBuffer) => string} */
226
+ function encode_buffer(array_buffer) {
227
+ return Buffer.from(array_buffer).toString("base64");
228
+ }
229
+ /** @type {(base64: string) => ArrayBuffer} */
230
+ function decode_buffer(base64) {
231
+ return Uint8Array.from(Buffer.from(base64, "base64")).buffer;
232
+ }
233
+ /** @type {(array_buffer: ArrayBuffer) => string} */
234
+ function encode_legacy(array_buffer) {
235
+ const array = new Uint8Array(array_buffer);
236
+ let binary = "";
237
+ const chunk_size = 32768;
238
+ for (let i = 0; i < array.length; i += chunk_size) {
239
+ const chunk = array.subarray(i, i + chunk_size);
240
+ binary += String.fromCharCode.apply(null, chunk);
241
+ }
242
+ return btoa(binary);
243
+ }
244
+ /** @type {(base64: string) => ArrayBuffer} */
245
+ function decode_legacy(base64) {
246
+ const binary_string = atob(base64);
247
+ const len = binary_string.length;
248
+ const array = new Uint8Array(len);
249
+ for (let i = 0; i < len; i++) array[i] = binary_string.charCodeAt(i);
250
+ return array.buffer;
251
+ }
252
+ var native = typeof Uint8Array.fromBase64 === "function";
253
+ var buffer = typeof process === "object" && process.versions?.node !== void 0;
254
+ var encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
255
+ var decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
256
+ //#endregion
257
+ //#region ../../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/parse.js
258
+ /**
259
+ * Revive a value serialized with `devalue.stringify`
260
+ * @param {string} serialized
261
+ * @param {Record<string, (value: any) => any>} [revivers]
262
+ */
263
+ function parse(serialized, revivers) {
264
+ return unflatten(JSON.parse(serialized), revivers);
265
+ }
266
+ /**
267
+ * Revive a value flattened with `devalue.stringify`
268
+ * @param {number | any[]} parsed
269
+ * @param {Record<string, (value: any) => any>} [revivers]
270
+ */
271
+ function unflatten(parsed, revivers) {
272
+ if (typeof parsed === "number") return hydrate(parsed, true);
273
+ if (!Array.isArray(parsed) || parsed.length === 0) throw new Error("Invalid input");
274
+ const values = parsed;
275
+ const hydrated = Array(values.length);
276
+ /**
277
+ * A set of values currently being hydrated with custom revivers,
278
+ * used to detect invalid cyclical dependencies
279
+ * @type {Set<number> | null}
280
+ */
281
+ let hydrating = null;
282
+ /**
283
+ * @param {number} index
284
+ * @returns {any}
285
+ */
286
+ function hydrate(index, standalone = false) {
287
+ if (index === -1) return void 0;
288
+ if (index === -3) return NaN;
289
+ if (index === -4) return Infinity;
290
+ if (index === -5) return -Infinity;
291
+ if (index === -6) return -0;
292
+ if (standalone || typeof index !== "number") throw new Error(`Invalid input`);
293
+ if (index in hydrated) return hydrated[index];
294
+ const value = values[index];
295
+ if (!value || typeof value !== "object") hydrated[index] = value;
296
+ else if (Array.isArray(value)) if (typeof value[0] === "string") {
297
+ const type = value[0];
298
+ const reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : void 0;
299
+ if (reviver) {
300
+ let i = value[1];
301
+ if (typeof i !== "number") i = values.push(value[1]) - 1;
302
+ hydrating ??= /* @__PURE__ */ new Set();
303
+ if (hydrating.has(i)) throw new Error("Invalid circular reference");
304
+ hydrating.add(i);
305
+ hydrated[index] = reviver(hydrate(i));
306
+ hydrating.delete(i);
307
+ return hydrated[index];
308
+ }
309
+ switch (type) {
310
+ case "Date":
311
+ hydrated[index] = new Date(value[1]);
312
+ break;
313
+ case "Set":
314
+ const set = /* @__PURE__ */ new Set();
315
+ hydrated[index] = set;
316
+ for (let i = 1; i < value.length; i += 1) set.add(hydrate(value[i]));
317
+ break;
318
+ case "Map":
319
+ const map = /* @__PURE__ */ new Map();
320
+ hydrated[index] = map;
321
+ for (let i = 1; i < value.length; i += 2) map.set(hydrate(value[i]), hydrate(value[i + 1]));
322
+ break;
323
+ case "RegExp":
324
+ hydrated[index] = new RegExp(value[1], value[2]);
325
+ break;
326
+ case "Object": {
327
+ const wrapped_index = value[1];
328
+ if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") throw new Error("Invalid input");
329
+ hydrated[index] = Object(hydrate(wrapped_index));
330
+ break;
331
+ }
332
+ case "BigInt":
333
+ hydrated[index] = BigInt(value[1]);
334
+ break;
335
+ case "null":
336
+ const obj = Object.create(null);
337
+ hydrated[index] = obj;
338
+ for (let i = 1; i < value.length; i += 2) {
339
+ if (value[i] === "__proto__") throw new Error("Cannot parse an object with a `__proto__` property");
340
+ obj[value[i]] = hydrate(value[i + 1]);
341
+ }
342
+ break;
343
+ case "Int8Array":
344
+ case "Uint8Array":
345
+ case "Uint8ClampedArray":
346
+ case "Int16Array":
347
+ case "Uint16Array":
348
+ case "Float16Array":
349
+ case "Int32Array":
350
+ case "Uint32Array":
351
+ case "Float32Array":
352
+ case "Float64Array":
353
+ case "BigInt64Array":
354
+ case "BigUint64Array":
355
+ case "DataView": {
356
+ if (values[value[1]][0] !== "ArrayBuffer") throw new Error("Invalid data");
357
+ const TypedArrayConstructor = globalThis[type];
358
+ const buffer = hydrate(value[1]);
359
+ hydrated[index] = value[2] !== void 0 ? new TypedArrayConstructor(buffer, value[2], value[3]) : new TypedArrayConstructor(buffer);
360
+ break;
361
+ }
362
+ case "ArrayBuffer": {
363
+ const base64 = value[1];
364
+ if (typeof base64 !== "string") throw new Error("Invalid ArrayBuffer encoding");
365
+ hydrated[index] = decode64(base64);
366
+ break;
367
+ }
368
+ case "Temporal.Duration":
369
+ case "Temporal.Instant":
370
+ case "Temporal.PlainDate":
371
+ case "Temporal.PlainTime":
372
+ case "Temporal.PlainDateTime":
373
+ case "Temporal.PlainMonthDay":
374
+ case "Temporal.PlainYearMonth":
375
+ case "Temporal.ZonedDateTime": {
376
+ const temporalName = type.slice(9);
377
+ hydrated[index] = Temporal[temporalName].from(value[1]);
378
+ break;
379
+ }
380
+ case "URL":
381
+ hydrated[index] = new URL(value[1]);
382
+ break;
383
+ case "URLSearchParams":
384
+ hydrated[index] = new URLSearchParams(value[1]);
385
+ break;
386
+ default: throw new Error(`Unknown type ${type}`);
387
+ }
388
+ } else if (value[0] === -7) {
389
+ const len = value[1];
390
+ if (!is_valid_array_len(len)) throw new Error("Invalid input");
391
+ /** @type {any[]} */
392
+ const array = [];
393
+ hydrated[index] = array;
394
+ array[MAX_ARRAY_INDEX] = void 0;
395
+ delete array[MAX_ARRAY_INDEX];
396
+ for (let i = 2; i < value.length; i += 2) {
397
+ const idx = value[i];
398
+ if (!is_valid_array_index(idx) || idx >= len) throw new Error("Invalid input");
399
+ array[idx] = hydrate(value[i + 1]);
400
+ }
401
+ array.length = len;
402
+ } else {
403
+ const array = new Array(value.length);
404
+ hydrated[index] = array;
405
+ for (let i = 0; i < value.length; i += 1) {
406
+ const n = value[i];
407
+ if (n === -2) continue;
408
+ array[i] = hydrate(n);
409
+ }
410
+ }
411
+ else {
412
+ /** @type {Record<string, any>} */
413
+ const object = {};
414
+ hydrated[index] = object;
415
+ for (const key of Object.keys(value)) {
416
+ if (key === "__proto__") throw new Error("Cannot parse an object with a `__proto__` property");
417
+ const n = value[key];
418
+ object[key] = hydrate(n);
419
+ }
420
+ }
421
+ return hydrated[index];
422
+ }
423
+ return hydrate(0);
424
+ }
425
+ //#endregion
426
+ //#region ../../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/stringify.js
427
+ /**
428
+ * Turn a value into a JSON string that can be parsed with `devalue.parse`
429
+ * @param {any} value
430
+ * @param {Record<string, (value: any) => any>} [reducers]
431
+ */
432
+ function stringify$1(value, reducers) {
433
+ const stringified = run(false, value, reducers);
434
+ return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
435
+ }
436
+ /**
437
+ * @param {boolean} async
438
+ * @param {any} value
439
+ * @param {Record<string, (value: any) => any>} [reducers]
440
+ */
441
+ function run(async, value, reducers) {
442
+ /** @type {any[]} */
443
+ const stringified = [];
444
+ /** @type {Map<any, number>} */
445
+ const indexes = /* @__PURE__ */ new Map();
446
+ /** @type {Array<{ key: string, fn: (value: any) => any }>} */
447
+ const custom = [];
448
+ if (reducers) for (const key of Object.getOwnPropertyNames(reducers)) custom.push({
449
+ key,
450
+ fn: reducers[key]
451
+ });
452
+ /** @type {string[]} */
453
+ const keys = [];
454
+ let p = 0;
455
+ /**
456
+ * @param {any} thing
457
+ * @param {number} [index]
458
+ */
459
+ function flatten(thing, index) {
460
+ if (thing === void 0) return -1;
461
+ if (Number.isNaN(thing)) return -3;
462
+ if (thing === Infinity) return -4;
463
+ if (thing === -Infinity) return -5;
464
+ if (thing === 0 && 1 / thing < 0) return -6;
465
+ if (indexes.has(thing)) return indexes.get(thing);
466
+ index ??= p++;
467
+ indexes.set(thing, index);
468
+ for (const { key, fn } of custom) {
469
+ const value = fn(thing);
470
+ if (value) {
471
+ stringified[index] = `["${key}",${flatten(value)}]`;
472
+ return index;
473
+ }
474
+ }
475
+ if (typeof thing === "function") throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
476
+ else if (typeof thing === "symbol") throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
477
+ /** @type {string | Promise<any>} */
478
+ let str = "";
479
+ if (is_primitive(thing)) str = stringify_primitive(thing);
480
+ else if (typeof thing.then === "function") {
481
+ throw new DevalueError(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, keys, thing, value);
482
+ } else {
483
+ const type = get_type(thing);
484
+ switch (type) {
485
+ case "Number":
486
+ case "String":
487
+ case "Boolean":
488
+ case "BigInt":
489
+ str = `["Object",${flatten(thing.valueOf())}]`;
490
+ break;
491
+ case "Date":
492
+ str = `["Date","${!isNaN(thing.getDate()) ? thing.toISOString() : ""}"]`;
493
+ break;
494
+ case "URL":
495
+ str = `["URL",${stringify_string(thing.toString())}]`;
496
+ break;
497
+ case "URLSearchParams":
498
+ str = `["URLSearchParams",${stringify_string(thing.toString())}]`;
499
+ break;
500
+ case "RegExp":
501
+ const { source, flags } = thing;
502
+ str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`;
503
+ break;
504
+ case "Array": {
505
+ let mostly_dense = false;
506
+ str = "[";
507
+ for (let i = 0; i < thing.length; i += 1) {
508
+ if (i > 0) str += ",";
509
+ if (Object.hasOwn(thing, i)) {
510
+ keys.push(`[${i}]`);
511
+ str += flatten(thing[i]);
512
+ keys.pop();
513
+ } else if (mostly_dense) str += -2;
514
+ else {
515
+ const populated_keys = valid_array_indices(thing);
516
+ const population = populated_keys.length;
517
+ const d = String(thing.length).length;
518
+ if ((thing.length - population) * 3 > 4 + d + population * (d + 1)) {
519
+ str = "[-7," + thing.length;
520
+ for (let j = 0; j < populated_keys.length; j++) {
521
+ const key = populated_keys[j];
522
+ keys.push(`[${key}]`);
523
+ str += "," + key + "," + flatten(thing[key]);
524
+ keys.pop();
525
+ }
526
+ break;
527
+ } else {
528
+ mostly_dense = true;
529
+ str += -2;
530
+ }
531
+ }
532
+ }
533
+ str += "]";
534
+ break;
535
+ }
536
+ case "Set":
537
+ str = "[\"Set\"";
538
+ for (const value of thing) str += `,${flatten(value)}`;
539
+ str += "]";
540
+ break;
541
+ case "Map":
542
+ str = "[\"Map\"";
543
+ for (const [key, value] of thing) {
544
+ keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
545
+ str += `,${flatten(key)},${flatten(value)}`;
546
+ keys.pop();
547
+ }
548
+ str += "]";
549
+ break;
550
+ case "Int8Array":
551
+ case "Uint8Array":
552
+ case "Uint8ClampedArray":
553
+ case "Int16Array":
554
+ case "Uint16Array":
555
+ case "Float16Array":
556
+ case "Int32Array":
557
+ case "Uint32Array":
558
+ case "Float32Array":
559
+ case "Float64Array":
560
+ case "BigInt64Array":
561
+ case "BigUint64Array":
562
+ case "DataView": {
563
+ /** @type {import("./types.js").TypedArray} */
564
+ const typedArray = thing;
565
+ str = "[\"" + type + "\"," + flatten(typedArray.buffer);
566
+ if (typedArray.byteLength !== typedArray.buffer.byteLength) str += `,${typedArray.byteOffset},${typedArray.length}`;
567
+ str += "]";
568
+ break;
569
+ }
570
+ case "ArrayBuffer":
571
+ str = `["ArrayBuffer","${encode64(thing)}"]`;
572
+ break;
573
+ case "Temporal.Duration":
574
+ case "Temporal.Instant":
575
+ case "Temporal.PlainDate":
576
+ case "Temporal.PlainTime":
577
+ case "Temporal.PlainDateTime":
578
+ case "Temporal.PlainMonthDay":
579
+ case "Temporal.PlainYearMonth":
580
+ case "Temporal.ZonedDateTime":
581
+ str = `["${type}",${stringify_string(thing.toString())}]`;
582
+ break;
583
+ default:
584
+ if (!is_plain_object(thing)) throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
585
+ if (enumerable_symbols(thing).length > 0) throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
586
+ if (Object.getPrototypeOf(thing) === null) {
587
+ str = "[\"null\"";
588
+ for (const key of Object.keys(thing)) {
589
+ if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
590
+ keys.push(stringify_key(key));
591
+ str += `,${stringify_string(key)},${flatten(thing[key])}`;
592
+ keys.pop();
593
+ }
594
+ str += "]";
595
+ } else {
596
+ str = "{";
597
+ let started = false;
598
+ for (const key of Object.keys(thing)) {
599
+ if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
600
+ if (started) str += ",";
601
+ started = true;
602
+ keys.push(stringify_key(key));
603
+ str += `${stringify_string(key)}:${flatten(thing[key])}`;
604
+ keys.pop();
605
+ }
606
+ str += "}";
607
+ }
608
+ }
609
+ }
610
+ stringified[index] = str;
611
+ return index;
612
+ }
613
+ const index = flatten(value);
614
+ if (index < 0) return `${index}`;
615
+ return stringified;
616
+ }
617
+ /**
618
+ * @param {any} thing
619
+ * @returns {string}
620
+ */
621
+ function stringify_primitive(thing) {
622
+ const type = typeof thing;
623
+ if (type === "string") return stringify_string(thing);
624
+ if (thing === void 0) return (-1).toString();
625
+ if (thing === 0 && 1 / thing < 0) return (-6).toString();
626
+ if (type === "bigint") return `["BigInt","${thing}"]`;
627
+ return String(thing);
628
+ }
629
+ //#endregion
630
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/utils.js
631
+ var text_encoder = new TextEncoder();
632
+ /**
633
+ * Like node's path.relative, but without using node
634
+ * @param {string} from
635
+ * @param {string} to
636
+ */
637
+ function get_relative_path(from, to) {
638
+ const from_parts = from.split(/[/\\]/);
639
+ const to_parts = to.split(/[/\\]/);
640
+ from_parts.pop();
641
+ while (from_parts[0] === to_parts[0]) {
642
+ from_parts.shift();
643
+ to_parts.shift();
644
+ }
645
+ let i = from_parts.length;
646
+ while (i--) from_parts[i] = "..";
647
+ return from_parts.concat(to_parts).join("/");
648
+ }
649
+ /**
650
+ * @param {Uint8Array} bytes
651
+ * @returns {string}
652
+ */
653
+ function base64_encode(bytes) {
654
+ if (globalThis.Buffer) return globalThis.Buffer.from(bytes).toString("base64");
655
+ let binary = "";
656
+ for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
657
+ return btoa(binary);
658
+ }
659
+ /**
660
+ * @param {string} encoded
661
+ * @returns {Uint8Array}
662
+ */
663
+ function base64_decode(encoded) {
664
+ if (globalThis.Buffer) {
665
+ const buffer = globalThis.Buffer.from(encoded, "base64");
666
+ return new Uint8Array(buffer);
667
+ }
668
+ const binary = atob(encoded);
669
+ const bytes = new Uint8Array(binary.length);
670
+ for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
671
+ return bytes;
672
+ }
673
+ //#endregion
674
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/utils/error.js
675
+ /**
676
+ * @param {unknown} err
677
+ * @return {Error}
678
+ */
679
+ function coalesce_to_error(err) {
680
+ return err instanceof Error || err && err.name && err.message ? err : new Error(JSON.stringify(err));
681
+ }
682
+ /**
683
+ * This is an identity function that exists to make TypeScript less
684
+ * paranoid about people throwing things that aren't errors, which
685
+ * frankly is not something we should care about
686
+ * @param {unknown} error
687
+ */
688
+ function normalize_error(error) {
689
+ return error;
690
+ }
691
+ /**
692
+ * @param {unknown} error
693
+ */
694
+ function get_status(error) {
695
+ return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
696
+ }
697
+ /**
698
+ * @param {unknown} error
699
+ */
700
+ function get_message(error) {
701
+ return error instanceof SvelteKitError ? error.text : "Internal Error";
702
+ }
703
+ var INVALIDATED_PARAM = "x-sveltekit-invalidated";
704
+ var TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
705
+ /**
706
+ * Try to `devalue.stringify` the data object using the provided transport encoders.
707
+ * @param {any} data
708
+ * @param {Transport} transport
709
+ */
710
+ function stringify(data, transport) {
711
+ return stringify$1(data, Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode])));
712
+ }
713
+ var remote_object = "__skrao";
714
+ var remote_map = "__skram";
715
+ var remote_set = "__skras";
716
+ /** @param {Transport} transport */
717
+ function create_remote_arg_revivers(transport) {
718
+ const remote_fns_revivers = {
719
+ /** @type {(value: unknown) => unknown} */
720
+ [remote_object]: (value) => value,
721
+ /** @type {(value: unknown) => Map<unknown, unknown>} */
722
+ [remote_map]: (value) => {
723
+ if (!Array.isArray(value)) throw new Error("Invalid data for Map reviver");
724
+ const map = /* @__PURE__ */ new Map();
725
+ for (const item of value) {
726
+ if (!Array.isArray(item) || item.length !== 2 || typeof item[0] !== "string" || typeof item[1] !== "string") throw new Error("Invalid data for Map reviver");
727
+ const [key, val] = item;
728
+ map.set(parse$1(key), parse$1(val));
729
+ }
730
+ return map;
731
+ },
732
+ /** @type {(value: unknown) => Set<unknown>} */
733
+ [remote_set]: (value) => {
734
+ if (!Array.isArray(value)) throw new Error("Invalid data for Set reviver");
735
+ const set = /* @__PURE__ */ new Set();
736
+ for (const item of value) {
737
+ if (typeof item !== "string") throw new Error("Invalid data for Set reviver");
738
+ set.add(parse$1(item));
739
+ }
740
+ return set;
741
+ }
742
+ };
743
+ const all_revivers = {
744
+ ...Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.decode])),
745
+ ...remote_fns_revivers
746
+ };
747
+ /** @type {(data: string) => unknown} */
748
+ const parse$1 = (data) => parse(data, all_revivers);
749
+ return all_revivers;
750
+ }
751
+ /**
752
+ * Parses the argument (if any) for a remote function
753
+ * @param {string} string
754
+ * @param {Transport} transport
755
+ */
756
+ function parse_remote_arg(string, transport) {
757
+ if (!string) return void 0;
758
+ return parse(new TextDecoder().decode(base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))), create_remote_arg_revivers(transport));
759
+ }
760
+ /**
761
+ * @param {string} id
762
+ * @param {string} payload
763
+ */
764
+ function create_remote_key(id, payload) {
765
+ return id + "/" + payload;
766
+ }
767
+ /**
768
+ * @param {string} key
769
+ * @returns {{ id: string; payload: string }}
770
+ */
771
+ function split_remote_key(key) {
772
+ const i = key.lastIndexOf("/");
773
+ if (i === -1) throw new Error(`Invalid remote key: ${key}`);
774
+ return {
775
+ id: key.slice(0, i),
776
+ payload: key.slice(i + 1)
777
+ };
778
+ }
779
+
780
+ // eslint-disable-next-line n/prefer-global/process
781
+ const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
782
+
783
+ /** @import { RequestEvent } from '@sveltejs/kit' */
784
+ /** @import { RequestStore } from 'types' */
785
+ /** @import { AsyncLocalStorage } from 'node:async_hooks' */
786
+
787
+
788
+ /** @type {RequestStore | null} */
789
+ let sync_store = null;
790
+
791
+ /** @type {AsyncLocalStorage<RequestStore | null> | null} */
792
+ let als;
793
+
794
+ import('node:async_hooks')
795
+ .then((hooks) => (als = new hooks.AsyncLocalStorage()))
796
+ .catch(() => {
797
+ // can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
798
+ // this isn't behind `supports` because it's basically just StackBlitz (i.e.
799
+ // in-browser usage) that doesn't support it AFAICT
800
+ });
801
+
802
+ /**
803
+ * @template T
804
+ * @param {RequestStore | null} store
805
+ * @param {() => T} fn
806
+ */
807
+ function with_request_store(store, fn) {
808
+ try {
809
+ sync_store = store;
810
+ return als ? als.run(store, fn) : fn();
811
+ } finally {
812
+ // Since AsyncLocalStorage is not working in webcontainers, we don't reset `sync_store`
813
+ // and handle only one request at a time in `src/runtime/server/index.js`.
814
+ if (!IN_WEBCONTAINER) {
815
+ sync_store = null;
816
+ }
817
+ }
818
+ }
819
+
820
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/utils/array.js
821
+ /**
822
+ * Removes nullish values from an array.
823
+ *
824
+ * @template T
825
+ * @param {Array<T>} arr
826
+ */
827
+ function compact(arr) {
828
+ return arr.filter(
829
+ /** @returns {val is NonNullable<T>} */
830
+ (val) => val != null
831
+ );
832
+ }
833
+ //#endregion
834
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/pathname.js
835
+ var DATA_SUFFIX = "/__data.json";
836
+ var HTML_DATA_SUFFIX = ".html__data.json";
837
+ /** @param {string} pathname */
838
+ function has_data_suffix(pathname) {
839
+ return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);
840
+ }
841
+ /** @param {string} pathname */
842
+ function add_data_suffix(pathname) {
843
+ if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX);
844
+ return pathname.replace(/\/$/, "") + DATA_SUFFIX;
845
+ }
846
+ /** @param {string} pathname */
847
+ function strip_data_suffix(pathname) {
848
+ if (pathname.endsWith(HTML_DATA_SUFFIX)) return pathname.slice(0, -16) + ".html";
849
+ return pathname.slice(0, -12);
850
+ }
851
+ var ROUTE_SUFFIX = "/__route.js";
852
+ /**
853
+ * @param {string} pathname
854
+ * @returns {boolean}
855
+ */
856
+ function has_resolution_suffix(pathname) {
857
+ return pathname.endsWith(ROUTE_SUFFIX);
858
+ }
859
+ /**
860
+ * Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint
861
+ * @param {string} pathname
862
+ * @returns {string}
863
+ */
864
+ function add_resolution_suffix(pathname) {
865
+ return pathname.replace(/\/$/, "") + ROUTE_SUFFIX;
866
+ }
867
+ /**
868
+ * @param {string} pathname
869
+ * @returns {string}
870
+ */
871
+ function strip_resolution_suffix(pathname) {
872
+ return pathname.slice(0, -11);
873
+ }
874
+ //#endregion
875
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/telemetry/noop.js
876
+ /**
877
+ * @type {Span}
878
+ */
879
+ var noop_span = {
880
+ spanContext() {
881
+ return noop_span_context;
882
+ },
883
+ setAttribute() {
884
+ return this;
885
+ },
886
+ setAttributes() {
887
+ return this;
888
+ },
889
+ addEvent() {
890
+ return this;
891
+ },
892
+ setStatus() {
893
+ return this;
894
+ },
895
+ updateName() {
896
+ return this;
897
+ },
898
+ end() {
899
+ return this;
900
+ },
901
+ isRecording() {
902
+ return false;
903
+ },
904
+ recordException() {
905
+ return this;
906
+ },
907
+ addLink() {
908
+ return this;
909
+ },
910
+ addLinks() {
911
+ return this;
912
+ }
913
+ };
914
+ /**
915
+ * @type {SpanContext}
916
+ */
917
+ var noop_span_context = {
918
+ traceId: "",
919
+ spanId: "",
920
+ traceFlags: 0
921
+ };
922
+ var internal = new URL("sveltekit-internal://");
923
+ /**
924
+ * @param {string} base
925
+ * @param {string} path
926
+ */
927
+ function resolve(base, path) {
928
+ if (path[0] === "/" && path[1] === "/") return path;
929
+ let url = new URL(base, internal);
930
+ url = new URL(path, url);
931
+ return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
932
+ }
933
+ /**
934
+ * @param {string} path
935
+ * @param {import('types').TrailingSlash} trailing_slash
936
+ */
937
+ function normalize_path(path, trailing_slash) {
938
+ if (path === "/" || trailing_slash === "ignore") return path;
939
+ if (trailing_slash === "never") return path.endsWith("/") ? path.slice(0, -1) : path;
940
+ else if (trailing_slash === "always" && !path.endsWith("/")) return path + "/";
941
+ return path;
942
+ }
943
+ /**
944
+ * Decode pathname excluding %25 to prevent further double decoding of params
945
+ * @param {string} pathname
946
+ */
947
+ function decode_pathname(pathname) {
948
+ return pathname.split("%25").map(decodeURI).join("%25");
949
+ }
950
+ /** @param {Record<string, string>} params */
951
+ function decode_params(params) {
952
+ for (const key in params) params[key] = decodeURIComponent(params[key]);
953
+ return params;
954
+ }
955
+ /**
956
+ * @param {URL} url
957
+ * @param {() => void} callback
958
+ * @param {(search_param: string) => void} search_params_callback
959
+ * @param {boolean} [allow_hash]
960
+ */
961
+ function make_trackable(url, callback, search_params_callback, allow_hash = false) {
962
+ const tracked = new URL(url);
963
+ Object.defineProperty(tracked, "searchParams", {
964
+ value: new Proxy(tracked.searchParams, { get(obj, key) {
965
+ if (key === "get" || key === "getAll" || key === "has") return (param, ...rest) => {
966
+ search_params_callback(param);
967
+ return obj[key](param, ...rest);
968
+ };
969
+ callback();
970
+ const value = Reflect.get(obj, key);
971
+ return typeof value === "function" ? value.bind(obj) : value;
972
+ } }),
973
+ enumerable: true,
974
+ configurable: true
975
+ });
976
+ /**
977
+ * URL properties that could change during the lifetime of the page,
978
+ * which excludes things like `origin`
979
+ */
980
+ const tracked_url_properties = [
981
+ "href",
982
+ "pathname",
983
+ "search",
984
+ "toString",
985
+ "toJSON"
986
+ ];
987
+ if (allow_hash) tracked_url_properties.push("hash");
988
+ for (const property of tracked_url_properties) Object.defineProperty(tracked, property, {
989
+ get() {
990
+ callback();
991
+ return url[property];
992
+ },
993
+ enumerable: true,
994
+ configurable: true
995
+ });
996
+ tracked[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
997
+ return inspect(url, opts);
998
+ };
999
+ tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
1000
+ return inspect(url.searchParams, opts);
1001
+ };
1002
+ if (!allow_hash) disable_hash(tracked);
1003
+ return tracked;
1004
+ }
1005
+ /**
1006
+ * Disallow access to `url.hash` on the server and in `load`
1007
+ * @param {URL} url
1008
+ */
1009
+ function disable_hash(url) {
1010
+ allow_nodejs_console_log(url);
1011
+ Object.defineProperty(url, "hash", { get() {
1012
+ throw new Error("Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead");
1013
+ } });
1014
+ }
1015
+ /**
1016
+ * Disallow access to `url.search` and `url.searchParams` during prerendering
1017
+ * @param {URL} url
1018
+ */
1019
+ function disable_search(url) {
1020
+ allow_nodejs_console_log(url);
1021
+ for (const property of ["search", "searchParams"]) Object.defineProperty(url, property, { get() {
1022
+ throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
1023
+ } });
1024
+ }
1025
+ /**
1026
+ * Allow URL to be console logged, bypassing disabled properties.
1027
+ * @param {URL} url
1028
+ */
1029
+ function allow_nodejs_console_log(url) {
1030
+ url[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
1031
+ return inspect(new URL(url), opts);
1032
+ };
1033
+ }
1034
+ //#endregion
1035
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/utils/hash.js
1036
+ /**
1037
+ * Hash using djb2
1038
+ * @param {import('types').StrictBody[]} values
1039
+ */
1040
+ function hash(...values) {
1041
+ let hash = 5381;
1042
+ for (const value of values) if (typeof value === "string") {
1043
+ let i = value.length;
1044
+ while (i) hash = hash * 33 ^ value.charCodeAt(--i);
1045
+ } else if (ArrayBuffer.isView(value)) {
1046
+ const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
1047
+ let i = buffer.length;
1048
+ while (i) hash = hash * 33 ^ buffer[--i];
1049
+ } else throw new TypeError("value must be a string or TypedArray");
1050
+ return (hash >>> 0).toString(36);
1051
+ }
1052
+ //#endregion
1053
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/utils/routing.js
1054
+ /**
1055
+ * @param {RegExpMatchArray} match
1056
+ * @param {import('types').RouteParam[]} params
1057
+ * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
1058
+ */
1059
+ function exec(match, params, matchers) {
1060
+ /** @type {Record<string, string>} */
1061
+ const result = {};
1062
+ const values = match.slice(1);
1063
+ const values_needing_match = values.filter((value) => value !== void 0);
1064
+ let buffered = 0;
1065
+ for (let i = 0; i < params.length; i += 1) {
1066
+ const param = params[i];
1067
+ let value = values[i - buffered];
1068
+ if (param.chained && param.rest && buffered) {
1069
+ value = values.slice(i - buffered, i + 1).filter((s) => s).join("/");
1070
+ buffered = 0;
1071
+ }
1072
+ if (value === void 0) if (param.rest) value = "";
1073
+ else continue;
1074
+ if (!param.matcher || matchers[param.matcher](value)) {
1075
+ result[param.name] = value;
1076
+ const next_param = params[i + 1];
1077
+ const next_value = values[i + 1];
1078
+ if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) buffered = 0;
1079
+ if (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) buffered = 0;
1080
+ continue;
1081
+ }
1082
+ if (param.optional && param.chained) {
1083
+ buffered++;
1084
+ continue;
1085
+ }
1086
+ return;
1087
+ }
1088
+ if (buffered) return;
1089
+ return result;
1090
+ }
1091
+ /**
1092
+ * Find the first route that matches the given path
1093
+ * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route
1094
+ * @param {string} path - The decoded pathname to match
1095
+ * @param {Route[]} routes
1096
+ * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
1097
+ * @returns {{ route: Route, params: Record<string, string> } | null}
1098
+ */
1099
+ function find_route(path, routes, matchers) {
1100
+ for (const route of routes) {
1101
+ const match = route.pattern.exec(path);
1102
+ if (!match) continue;
1103
+ const matched = exec(match, route.params, matchers);
1104
+ if (matched) return {
1105
+ route,
1106
+ params: decode_params(matched)
1107
+ };
1108
+ }
1109
+ return null;
1110
+ }
1111
+ //#endregion
1112
+ //#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/utils/exports.js
1113
+ /**
1114
+ * @param {Set<string>} expected
1115
+ */
1116
+ function validator(expected) {
1117
+ /**
1118
+ * @param {any} module
1119
+ * @param {string} [file]
1120
+ */
1121
+ function validate(module, file) {
1122
+ if (!module) return;
1123
+ for (const key in module) {
1124
+ if (key[0] === "_" || expected.has(key)) continue;
1125
+ const values = [...expected.values()];
1126
+ const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
1127
+ throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
1128
+ }
1129
+ }
1130
+ return validate;
1131
+ }
1132
+ /**
1133
+ * @param {string} key
1134
+ * @param {string} ext
1135
+ * @returns {string | void}
1136
+ */
1137
+ function hint_for_supported_files(key, ext = ".js") {
1138
+ const supported_files = [];
1139
+ if (valid_layout_exports.has(key)) supported_files.push(`+layout${ext}`);
1140
+ if (valid_page_exports.has(key)) supported_files.push(`+page${ext}`);
1141
+ if (valid_layout_server_exports.has(key)) supported_files.push(`+layout.server${ext}`);
1142
+ if (valid_page_server_exports.has(key)) supported_files.push(`+page.server${ext}`);
1143
+ if (valid_server_exports.has(key)) supported_files.push(`+server${ext}`);
1144
+ if (supported_files.length > 0) return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
1145
+ }
1146
+ var valid_layout_exports = new Set([
1147
+ "load",
1148
+ "prerender",
1149
+ "csr",
1150
+ "ssr",
1151
+ "trailingSlash",
1152
+ "config"
1153
+ ]);
1154
+ var valid_page_exports = new Set([...valid_layout_exports, "entries"]);
1155
+ var valid_layout_server_exports = new Set([...valid_layout_exports]);
1156
+ var valid_page_server_exports = new Set([
1157
+ ...valid_layout_server_exports,
1158
+ "actions",
1159
+ "entries"
1160
+ ]);
1161
+ var valid_server_exports = new Set([
1162
+ "GET",
1163
+ "POST",
1164
+ "PATCH",
1165
+ "PUT",
1166
+ "DELETE",
1167
+ "OPTIONS",
1168
+ "HEAD",
1169
+ "fallback",
1170
+ "prerender",
1171
+ "trailingSlash",
1172
+ "config",
1173
+ "entries"
1174
+ ]);
1175
+ var validate_layout_exports = validator(valid_layout_exports);
1176
+ var validate_page_exports = validator(valid_page_exports);
1177
+ var validate_layout_server_exports = validator(valid_layout_server_exports);
1178
+ var validate_page_server_exports = validator(valid_page_server_exports);
1179
+
1180
+ //#region \0virtual:__sveltekit/server
1181
+ var read_implementation = null;
1182
+ function set_read_implementation(fn) {
1183
+ read_implementation = fn;
1184
+ }
1185
+ //#endregion
1186
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/internal/client/dom/elements/events.js
1187
+ /**
1188
+ * Used on elements, as a map of event type -> event handler,
1189
+ * and on events themselves to track which element handled an event
1190
+ */
1191
+ var event_symbol = Symbol("events");
1192
+ /** @type {Set<string>} */
1193
+ var all_registered_events = /* @__PURE__ */ new Set();
1194
+ /** @type {Set<(events: Array<string>) => void>} */
1195
+ var root_event_handles = /* @__PURE__ */ new Set();
1196
+ var last_propagated_event = null;
1197
+ /**
1198
+ * @this {EventTarget}
1199
+ * @param {Event} event
1200
+ * @returns {void}
1201
+ */
1202
+ function handle_event_propagation(event) {
1203
+ var handler_element = this;
1204
+ var owner_document = handler_element.ownerDocument;
1205
+ var event_name = event.type;
1206
+ var path = event.composedPath?.() || [];
1207
+ var current_target = path[0] || event.target;
1208
+ last_propagated_event = event;
1209
+ var path_idx = 0;
1210
+ var handled_at = last_propagated_event === event && event[event_symbol];
1211
+ if (handled_at) {
1212
+ var at_idx = path.indexOf(handled_at);
1213
+ if (at_idx !== -1 && (handler_element === document || handler_element === window)) {
1214
+ event[event_symbol] = handler_element;
1215
+ return;
1216
+ }
1217
+ var handler_idx = path.indexOf(handler_element);
1218
+ if (handler_idx === -1) return;
1219
+ if (at_idx <= handler_idx) path_idx = at_idx;
1220
+ }
1221
+ current_target = path[path_idx] || event.target;
1222
+ if (current_target === handler_element) return;
1223
+ define_property(event, "currentTarget", {
1224
+ configurable: true,
1225
+ get() {
1226
+ return current_target || owner_document;
1227
+ }
1228
+ });
1229
+ var previous_reaction = active_reaction;
1230
+ var previous_effect = active_effect;
1231
+ set_active_reaction(null);
1232
+ set_active_effect(null);
1233
+ try {
1234
+ /**
1235
+ * @type {unknown}
1236
+ */
1237
+ var throw_error;
1238
+ /**
1239
+ * @type {unknown[]}
1240
+ */
1241
+ var other_errors = [];
1242
+ while (current_target !== null) {
1243
+ /** @type {null | Element} */
1244
+ var parent_element = current_target.assignedSlot || current_target.parentNode || current_target.host || null;
1245
+ try {
1246
+ var delegated = current_target[event_symbol]?.[event_name];
1247
+ if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
1248
+ } catch (error) {
1249
+ if (throw_error) other_errors.push(error);
1250
+ else throw_error = error;
1251
+ }
1252
+ if (event.cancelBubble || parent_element === handler_element || parent_element === null) break;
1253
+ current_target = parent_element;
1254
+ }
1255
+ if (throw_error) {
1256
+ for (let error of other_errors) queueMicrotask(() => {
1257
+ throw error;
1258
+ });
1259
+ throw throw_error;
1260
+ }
1261
+ } finally {
1262
+ event[event_symbol] = handler_element;
1263
+ delete event.currentTarget;
1264
+ set_active_reaction(previous_reaction);
1265
+ set_active_effect(previous_effect);
1266
+ }
1267
+ }
1268
+ //#endregion
1269
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/internal/client/dom/template.js
1270
+ /**
1271
+ * @param {TemplateNode} start
1272
+ * @param {TemplateNode | null} end
1273
+ */
1274
+ function assign_nodes(start, end) {
1275
+ var effect = active_effect;
1276
+ if (effect.nodes === null) effect.nodes = {
1277
+ start,
1278
+ end,
1279
+ a: null,
1280
+ t: null
1281
+ };
1282
+ }
1283
+ /**
1284
+ * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
1285
+ * Transitions will play during the initial render unless the `intro` option is set to `false`.
1286
+ *
1287
+ * @template {Record<string, any>} Props
1288
+ * @template {Record<string, any>} Exports
1289
+ * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
1290
+ * @param {MountOptions<Props>} options
1291
+ * @returns {Exports}
1292
+ */
1293
+ function mount(component, options) {
1294
+ return _mount(component, options);
1295
+ }
1296
+ /**
1297
+ * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
1298
+ *
1299
+ * @template {Record<string, any>} Props
1300
+ * @template {Record<string, any>} Exports
1301
+ * @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
1302
+ * @param {{} extends Props ? {
1303
+ * target: Document | Element | ShadowRoot;
1304
+ * props?: Props;
1305
+ * events?: Record<string, (e: any) => any>;
1306
+ * context?: Map<any, any>;
1307
+ * intro?: boolean;
1308
+ * recover?: boolean;
1309
+ * transformError?: (error: unknown) => unknown;
1310
+ * } : {
1311
+ * target: Document | Element | ShadowRoot;
1312
+ * props: Props;
1313
+ * events?: Record<string, (e: any) => any>;
1314
+ * context?: Map<any, any>;
1315
+ * intro?: boolean;
1316
+ * recover?: boolean;
1317
+ * transformError?: (error: unknown) => unknown;
1318
+ * }} options
1319
+ * @returns {Exports}
1320
+ */
1321
+ function hydrate(component, options) {
1322
+ init_operations();
1323
+ options.intro = options.intro ?? false;
1324
+ const target = options.target;
1325
+ const was_hydrating = hydrating;
1326
+ const previous_hydrate_node = hydrate_node;
1327
+ try {
1328
+ var anchor = /* @__PURE__ */ get_first_child(target);
1329
+ while (anchor && (anchor.nodeType !== 8 || anchor.data !== "[")) anchor = /* @__PURE__ */ get_next_sibling(anchor);
1330
+ if (!anchor) throw HYDRATION_ERROR;
1331
+ set_hydrating(true);
1332
+ set_hydrate_node(anchor);
1333
+ const instance = _mount(component, {
1334
+ ...options,
1335
+ anchor
1336
+ });
1337
+ set_hydrating(false);
1338
+ return instance;
1339
+ } catch (error) {
1340
+ if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) throw error;
1341
+ if (error !== HYDRATION_ERROR) console.warn("Failed to hydrate: ", error);
1342
+ if (options.recover === false) hydration_failed();
1343
+ init_operations();
1344
+ clear_text_content(target);
1345
+ set_hydrating(false);
1346
+ return mount(component, options);
1347
+ } finally {
1348
+ set_hydrating(was_hydrating);
1349
+ set_hydrate_node(previous_hydrate_node);
1350
+ }
1351
+ }
1352
+ /** @type {Map<EventTarget, Map<string, number>>} */
1353
+ var listeners = /* @__PURE__ */ new Map();
1354
+ /**
1355
+ * @template {Record<string, any>} Exports
1356
+ * @param {ComponentType<SvelteComponent<any>> | Component<any>} Component
1357
+ * @param {MountOptions} options
1358
+ * @returns {Exports}
1359
+ */
1360
+ function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
1361
+ init_operations();
1362
+ /** @type {Exports} */
1363
+ var component = void 0;
1364
+ var unmount = component_root(() => {
1365
+ var anchor_node = anchor ?? target.appendChild(create_text());
1366
+ boundary(anchor_node, { pending: () => {} }, (anchor_node) => {
1367
+ push({});
1368
+ var ctx = component_context;
1369
+ if (context) ctx.c = context;
1370
+ if (events)
1371
+ /** @type {any} */ props.$$events = events;
1372
+ if (hydrating) assign_nodes(anchor_node, null);
1373
+ component = Component(anchor_node, props) || {};
1374
+ if (hydrating) {
1375
+ /** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
1376
+ if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
1377
+ hydration_mismatch();
1378
+ throw HYDRATION_ERROR;
1379
+ }
1380
+ }
1381
+ pop();
1382
+ }, transformError);
1383
+ /** @type {Set<string>} */
1384
+ var registered_events = /* @__PURE__ */ new Set();
1385
+ /** @param {Array<string>} events */
1386
+ var event_handle = (events) => {
1387
+ for (var i = 0; i < events.length; i++) {
1388
+ var event_name = events[i];
1389
+ if (registered_events.has(event_name)) continue;
1390
+ registered_events.add(event_name);
1391
+ var passive = is_passive_event(event_name);
1392
+ for (const node of [target, document]) {
1393
+ var counts = listeners.get(node);
1394
+ if (counts === void 0) {
1395
+ counts = /* @__PURE__ */ new Map();
1396
+ listeners.set(node, counts);
1397
+ }
1398
+ var count = counts.get(event_name);
1399
+ if (count === void 0) {
1400
+ node.addEventListener(event_name, handle_event_propagation, { passive });
1401
+ counts.set(event_name, 1);
1402
+ } else counts.set(event_name, count + 1);
1403
+ }
1404
+ }
1405
+ };
1406
+ event_handle(array_from(all_registered_events));
1407
+ root_event_handles.add(event_handle);
1408
+ return () => {
1409
+ for (var event_name of registered_events) for (const node of [target, document]) {
1410
+ var counts = listeners.get(node);
1411
+ var count = counts.get(event_name);
1412
+ if (--count == 0) {
1413
+ node.removeEventListener(event_name, handle_event_propagation);
1414
+ counts.delete(event_name);
1415
+ if (counts.size === 0) listeners.delete(node);
1416
+ } else counts.set(event_name, count);
1417
+ }
1418
+ root_event_handles.delete(event_handle);
1419
+ if (anchor_node !== anchor) anchor_node.parentNode?.removeChild(anchor_node);
1420
+ };
1421
+ });
1422
+ mounted_components.set(component, unmount);
1423
+ return component;
1424
+ }
1425
+ /**
1426
+ * References of the components that were mounted or hydrated.
1427
+ * Uses a `WeakMap` to avoid memory leaks.
1428
+ */
1429
+ var mounted_components = /* @__PURE__ */ new WeakMap();
1430
+ /**
1431
+ * Unmounts a component that was previously mounted using `mount` or `hydrate`.
1432
+ *
1433
+ * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.
1434
+ *
1435
+ * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).
1436
+ *
1437
+ * ```js
1438
+ * import { mount, unmount } from 'svelte';
1439
+ * import App from './App.svelte';
1440
+ *
1441
+ * const app = mount(App, { target: document.body });
1442
+ *
1443
+ * // later...
1444
+ * unmount(app, { outro: true });
1445
+ * ```
1446
+ * @param {Record<string, any>} component
1447
+ * @param {{ outro?: boolean }} [options]
1448
+ * @returns {Promise<void>}
1449
+ */
1450
+ function unmount(component, options) {
1451
+ const fn = mounted_components.get(component);
1452
+ if (fn) {
1453
+ mounted_components.delete(component);
1454
+ return fn(options);
1455
+ }
1456
+ return Promise.resolve();
1457
+ }
1458
+ //#endregion
1459
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/legacy/legacy-client.js
1460
+ /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
1461
+ /**
1462
+ * Takes the component function and returns a Svelte 4 compatible component constructor.
1463
+ *
1464
+ * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
1465
+ *
1466
+ * @template {Record<string, any>} Props
1467
+ * @template {Record<string, any>} Exports
1468
+ * @template {Record<string, any>} Events
1469
+ * @template {Record<string, any>} Slots
1470
+ *
1471
+ * @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component
1472
+ * @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}
1473
+ */
1474
+ function asClassComponent$1(component) {
1475
+ return class extends Svelte4Component {
1476
+ /** @param {any} options */
1477
+ constructor(options) {
1478
+ super({
1479
+ component,
1480
+ ...options
1481
+ });
1482
+ }
1483
+ };
1484
+ }
1485
+ /**
1486
+ * Support using the component as both a class and function during the transition period
1487
+ * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType
1488
+ */
1489
+ var Svelte4Component = class {
1490
+ /** @type {any} */
1491
+ #events;
1492
+ /** @type {Record<string, any>} */
1493
+ #instance;
1494
+ /**
1495
+ * @param {ComponentConstructorOptions & {
1496
+ * component: any;
1497
+ * }} options
1498
+ */
1499
+ constructor(options) {
1500
+ var sources = /* @__PURE__ */ new Map();
1501
+ /**
1502
+ * @param {string | symbol} key
1503
+ * @param {unknown} value
1504
+ */
1505
+ var add_source = (key, value) => {
1506
+ var s = /* @__PURE__ */ mutable_source(value, false, false);
1507
+ sources.set(key, s);
1508
+ return s;
1509
+ };
1510
+ const props = new Proxy({
1511
+ ...options.props || {},
1512
+ $$events: {}
1513
+ }, {
1514
+ get(target, prop) {
1515
+ return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
1516
+ },
1517
+ has(target, prop) {
1518
+ if (prop === LEGACY_PROPS) return true;
1519
+ get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
1520
+ return Reflect.has(target, prop);
1521
+ },
1522
+ set(target, prop, value) {
1523
+ set(sources.get(prop) ?? add_source(prop, value), value);
1524
+ return Reflect.set(target, prop, value);
1525
+ }
1526
+ });
1527
+ this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
1528
+ target: options.target,
1529
+ anchor: options.anchor,
1530
+ props,
1531
+ context: options.context,
1532
+ intro: options.intro ?? false,
1533
+ recover: options.recover,
1534
+ transformError: options.transformError
1535
+ });
1536
+ if ((!options?.props?.$$host || options.sync === false)) flushSync();
1537
+ this.#events = props.$$events;
1538
+ for (const key of Object.keys(this.#instance)) {
1539
+ if (key === "$set" || key === "$destroy" || key === "$on") continue;
1540
+ define_property(this, key, {
1541
+ get() {
1542
+ return this.#instance[key];
1543
+ },
1544
+ /** @param {any} value */
1545
+ set(value) {
1546
+ this.#instance[key] = value;
1547
+ },
1548
+ enumerable: true
1549
+ });
1550
+ }
1551
+ this.#instance.$set = (next) => {
1552
+ Object.assign(props, next);
1553
+ };
1554
+ this.#instance.$destroy = () => {
1555
+ unmount(this.#instance);
1556
+ };
1557
+ }
1558
+ /** @param {Record<string, any>} props */
1559
+ $set(props) {
1560
+ this.#instance.$set(props);
1561
+ }
1562
+ /**
1563
+ * @param {string} event
1564
+ * @param {(...args: any[]) => any} callback
1565
+ * @returns {any}
1566
+ */
1567
+ $on(event, callback) {
1568
+ this.#events[event] = this.#events[event] || [];
1569
+ /** @param {any[]} args */
1570
+ const cb = (...args) => callback.call(this, ...args);
1571
+ this.#events[event].push(cb);
1572
+ return () => {
1573
+ this.#events[event] = this.#events[event].filter(
1574
+ /** @param {any} fn */
1575
+ (fn) => fn !== cb
1576
+ );
1577
+ };
1578
+ }
1579
+ $destroy() {
1580
+ this.#instance.$destroy();
1581
+ }
1582
+ };
1583
+ //#endregion
1584
+ //#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/legacy/legacy-server.js
1585
+ /** @import { SvelteComponent } from '../index.js' */
1586
+ /** @import { Csp } from '#server' */
1587
+ /** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
1588
+ /**
1589
+ * Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.
1590
+ *
1591
+ * @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
1592
+ *
1593
+ * @template {Record<string, any>} Props
1594
+ * @template {Record<string, any>} Exports
1595
+ * @template {Record<string, any>} Events
1596
+ * @template {Record<string, any>} Slots
1597
+ *
1598
+ * @param {SvelteComponent<Props, Events, Slots>} component
1599
+ * @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}
1600
+ */
1601
+ function asClassComponent(component) {
1602
+ const component_constructor = asClassComponent$1(component);
1603
+ /** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */
1604
+ const _render = (props, { context, csp, transformError } = {}) => {
1605
+ const result = render(component, {
1606
+ props,
1607
+ context,
1608
+ csp,
1609
+ transformError
1610
+ });
1611
+ const munged = Object.defineProperties({}, {
1612
+ css: { value: {
1613
+ code: "",
1614
+ map: null
1615
+ } },
1616
+ head: { get: () => result.head },
1617
+ html: { get: () => result.body },
1618
+ then: {
1619
+ /**
1620
+ * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
1621
+ *
1622
+ * @template TResult1
1623
+ * @template [TResult2=never]
1624
+ * @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
1625
+ * @param { (reason: unknown) => TResult2 } onrejected
1626
+ */
1627
+ value: (onfulfilled, onrejected) => {
1628
+ {
1629
+ const user_result = onfulfilled({
1630
+ css: munged.css,
1631
+ head: munged.head,
1632
+ html: munged.html
1633
+ });
1634
+ return Promise.resolve(user_result);
1635
+ }
1636
+ } }
1637
+ });
1638
+ return munged;
1639
+ };
1640
+ component_constructor.render = _render;
1641
+ return component_constructor;
1642
+ }
1643
+ //#endregion
1644
+ //#region .svelte-kit/generated/root.svelte
1645
+ function Root($$renderer, $$props) {
1646
+ $$renderer.component(($$renderer) => {
1647
+ let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $$props;
1648
+ setContext("__svelte__", stores);
1649
+ stores.page.set(page);
1650
+ const Pyramid_1 = derived(() => constructors[1]);
1651
+ if (constructors[1]) {
1652
+ $$renderer.push("<!--[0-->");
1653
+ const Pyramid_0 = constructors[0];
1654
+ if (Pyramid_0) {
1655
+ $$renderer.push("<!--[-->");
1656
+ Pyramid_0($$renderer, {
1657
+ data: data_0,
1658
+ form,
1659
+ params: page.params,
1660
+ children: ($$renderer) => {
1661
+ if (Pyramid_1()) {
1662
+ $$renderer.push("<!--[-->");
1663
+ Pyramid_1()($$renderer, {
1664
+ data: data_1,
1665
+ form,
1666
+ params: page.params
1667
+ });
1668
+ $$renderer.push("<!--]-->");
1669
+ } else {
1670
+ $$renderer.push("<!--[!-->");
1671
+ $$renderer.push("<!--]-->");
1672
+ }
1673
+ },
1674
+ $$slots: { default: true }
1675
+ });
1676
+ $$renderer.push("<!--]-->");
1677
+ } else {
1678
+ $$renderer.push("<!--[!-->");
1679
+ $$renderer.push("<!--]-->");
1680
+ }
1681
+ } else {
1682
+ $$renderer.push("<!--[-1-->");
1683
+ const Pyramid_0 = constructors[0];
1684
+ if (Pyramid_0) {
1685
+ $$renderer.push("<!--[-->");
1686
+ Pyramid_0($$renderer, {
1687
+ data: data_0,
1688
+ form,
1689
+ params: page.params
1690
+ });
1691
+ $$renderer.push("<!--]-->");
1692
+ } else {
1693
+ $$renderer.push("<!--[!-->");
1694
+ $$renderer.push("<!--]-->");
1695
+ }
1696
+ }
1697
+ $$renderer.push(`<!--]--> `);
1698
+ $$renderer.push("<!--[-1-->");
1699
+ $$renderer.push(`<!--]-->`);
1700
+ });
1701
+ }
1702
+ //#endregion
1703
+ //#region .svelte-kit/generated/server/internal.js
1704
+ var options = {
1705
+ app_template_contains_nonce: false,
1706
+ async: false,
1707
+ csp: {
1708
+ "mode": "auto",
1709
+ "directives": {
1710
+ "upgrade-insecure-requests": false,
1711
+ "block-all-mixed-content": false
1712
+ },
1713
+ "reportOnly": {
1714
+ "upgrade-insecure-requests": false,
1715
+ "block-all-mixed-content": false
1716
+ }
1717
+ },
1718
+ csrf_check_origin: true,
1719
+ csrf_trusted_origins: [],
1720
+ embedded: false,
1721
+ env_public_prefix: "PUBLIC_",
1722
+ env_private_prefix: "",
1723
+ hash_routing: false,
1724
+ hooks: null,
1725
+ preload_strategy: "modulepreload",
1726
+ root: asClassComponent(Root),
1727
+ service_worker: false,
1728
+ service_worker_options: void 0,
1729
+ server_error_boundaries: false,
1730
+ templates: {
1731
+ app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
1732
+ error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
1733
+ },
1734
+ version_hash: "16i0po3"
1735
+ };
1736
+ async function get_hooks() {
1737
+ let handle;
1738
+ let handleFetch;
1739
+ let handleError;
1740
+ let handleValidationError;
1741
+ let init;
1742
+ ({handle, handleFetch, handleError, handleValidationError, init} = await import('./hooks.server-BBW_dqIs.js'));
1743
+ let reroute;
1744
+ let transport;
1745
+ return {
1746
+ handle,
1747
+ handleFetch,
1748
+ handleError,
1749
+ handleValidationError,
1750
+ init,
1751
+ reroute,
1752
+ transport
1753
+ };
1754
+ }
1755
+
1756
+ export { validate_page_exports as $, normalize_error as A, normalize_path as B, onDestroy as C, once as D, options as E, override as F, parse as G, parse_remote_arg as H, INVALIDATED_PARAM as I, public_env as J, read_implementation as K, reset as L, resolve as M, set_private_env as N, set_public_env as O, set_read_implementation as P, split_remote_key as Q, stringify as R, stringify$1 as S, TRAILING_SLASH_PARAM as T, strip_data_suffix as U, strip_resolution_suffix as V, text_encoder as W, tick as X, validate_layout_exports as Y, validate_layout_server_exports as Z, __commonJSMin as _, __exportAll as a, validate_page_server_exports as a0, with_request_store as a1, __require as b, __toESM as c, add_data_suffix as d, add_resolution_suffix as e, app_dir as f, assets as g, base as h, base64_encode as i, coalesce_to_error as j, compact as k, create_remote_key as l, decode_pathname as m, disable_search as n, find_route as o, get_hooks as p, get_message as q, get_relative_path as r, get_status as s, has_data_suffix as t, has_resolution_suffix as u, hash as v, index_server_exports as w, make_trackable as x, noop as y, noop_span as z };
1757
+ //# sourceMappingURL=internal-BrzrGF6g.js.map