watch-tail 0.1.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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +210 -0
  3. package/build/client/_app/immutable/assets/0.B1NsRRrX.css +2 -0
  4. package/build/client/_app/immutable/assets/0.B1NsRRrX.css.br +0 -0
  5. package/build/client/_app/immutable/assets/0.B1NsRRrX.css.gz +0 -0
  6. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  7. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  8. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  9. package/build/client/_app/immutable/chunks/DCKWcE8r.js +1 -0
  10. package/build/client/_app/immutable/chunks/DCKWcE8r.js.br +0 -0
  11. package/build/client/_app/immutable/chunks/DCKWcE8r.js.gz +0 -0
  12. package/build/client/_app/immutable/chunks/DDRhiz1-.js +1 -0
  13. package/build/client/_app/immutable/chunks/DDRhiz1-.js.br +0 -0
  14. package/build/client/_app/immutable/chunks/DDRhiz1-.js.gz +0 -0
  15. package/build/client/_app/immutable/chunks/ZAD2y5xJ.js +3 -0
  16. package/build/client/_app/immutable/chunks/ZAD2y5xJ.js.br +0 -0
  17. package/build/client/_app/immutable/chunks/ZAD2y5xJ.js.gz +0 -0
  18. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  19. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +1 -0
  20. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  21. package/build/client/_app/immutable/entry/app.DIoggGwf.js +2 -0
  22. package/build/client/_app/immutable/entry/app.DIoggGwf.js.br +0 -0
  23. package/build/client/_app/immutable/entry/app.DIoggGwf.js.gz +0 -0
  24. package/build/client/_app/immutable/entry/start._YXgjuSB.js +1 -0
  25. package/build/client/_app/immutable/entry/start._YXgjuSB.js.br +0 -0
  26. package/build/client/_app/immutable/entry/start._YXgjuSB.js.gz +0 -0
  27. package/build/client/_app/immutable/nodes/0.D5bYt7iX.js +1 -0
  28. package/build/client/_app/immutable/nodes/0.D5bYt7iX.js.br +0 -0
  29. package/build/client/_app/immutable/nodes/0.D5bYt7iX.js.gz +0 -0
  30. package/build/client/_app/immutable/nodes/1.DBX83mYX.js +1 -0
  31. package/build/client/_app/immutable/nodes/1.DBX83mYX.js.br +0 -0
  32. package/build/client/_app/immutable/nodes/1.DBX83mYX.js.gz +0 -0
  33. package/build/client/_app/immutable/nodes/2.DiH-2moC.js +5 -0
  34. package/build/client/_app/immutable/nodes/2.DiH-2moC.js.br +0 -0
  35. package/build/client/_app/immutable/nodes/2.DiH-2moC.js.gz +0 -0
  36. package/build/client/_app/version.json +1 -0
  37. package/build/client/_app/version.json.br +0 -0
  38. package/build/client/_app/version.json.gz +0 -0
  39. package/build/client/robots.txt +3 -0
  40. package/build/client/robots.txt.br +0 -0
  41. package/build/client/robots.txt.gz +0 -0
  42. package/build/env.js +70 -0
  43. package/build/env.js.map +1 -0
  44. package/build/handler.js +24 -0
  45. package/build/handler.js.map +1 -0
  46. package/build/index.js +147 -0
  47. package/build/index.js.map +1 -0
  48. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  49. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js.map +1 -0
  50. package/build/server/chunks/chunks/env2.js-D7xrfc37.js +316 -0
  51. package/build/server/chunks/chunks/env2.js-D7xrfc37.js.map +1 -0
  52. package/build/server/chunks/chunks/exports.js-CvFPPbaH.js +263 -0
  53. package/build/server/chunks/chunks/exports.js-CvFPPbaH.js.map +1 -0
  54. package/build/server/chunks/chunks/internal.js-DdmUz1r3.js +1191 -0
  55. package/build/server/chunks/chunks/internal.js-DdmUz1r3.js.map +1 -0
  56. package/build/server/chunks/chunks/internal2.js-DZ8ZzzjN.js +22 -0
  57. package/build/server/chunks/chunks/internal2.js-DZ8ZzzjN.js.map +1 -0
  58. package/build/server/chunks/chunks/regions.js-IQPMyP5C.js +52 -0
  59. package/build/server/chunks/chunks/regions.js-IQPMyP5C.js.map +1 -0
  60. package/build/server/chunks/chunks/server.js-ByNB8uti.js +3659 -0
  61. package/build/server/chunks/chunks/server.js-ByNB8uti.js.map +1 -0
  62. package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js +22 -0
  63. package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js.map +1 -0
  64. package/build/server/chunks/chunks/shared.js-CgjUIvRK.js +776 -0
  65. package/build/server/chunks/chunks/shared.js-CgjUIvRK.js.map +1 -0
  66. package/build/server/chunks/chunks/state.js-ClLTNPGs.js +86 -0
  67. package/build/server/chunks/chunks/state.js-ClLTNPGs.js.map +1 -0
  68. package/build/server/chunks/chunks/time-range.js-BLMT8aU3.js +102 -0
  69. package/build/server/chunks/chunks/time-range.js-BLMT8aU3.js.map +1 -0
  70. package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js +488 -0
  71. package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js.map +1 -0
  72. package/build/server/chunks/chunks/utils.js-BIlHjgGW.js +933 -0
  73. package/build/server/chunks/chunks/utils.js-BIlHjgGW.js.map +1 -0
  74. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-aiNZfkco.js +41 -0
  75. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-aiNZfkco.js.map +1 -0
  76. package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D143-vRl.js +120 -0
  77. package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D143-vRl.js.map +1 -0
  78. package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-CDNL7msU.js +88 -0
  79. package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-CDNL7msU.js.map +1 -0
  80. package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-D_i-xW6_.js +610 -0
  81. package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-D_i-xW6_.js.map +1 -0
  82. package/build/server/chunks/entries/fallbacks/error.svelte.js-qFLa8EVy.js +17 -0
  83. package/build/server/chunks/entries/fallbacks/error.svelte.js-qFLa8EVy.js.map +1 -0
  84. package/build/server/chunks/entries/pages/_layout.svelte.js-Bx7lXkAi.js +22 -0
  85. package/build/server/chunks/entries/pages/_layout.svelte.js-Bx7lXkAi.js.map +1 -0
  86. package/build/server/chunks/entries/pages/_page.svelte.js-BsvaKqbk.js +1264 -0
  87. package/build/server/chunks/entries/pages/_page.svelte.js-BsvaKqbk.js.map +1 -0
  88. package/build/server/chunks/handler-nVqa-QPz.js +1735 -0
  89. package/build/server/chunks/handler-nVqa-QPz.js.map +1 -0
  90. package/build/server/chunks/index.js-CtbhHm7L.js +3803 -0
  91. package/build/server/chunks/index.js-CtbhHm7L.js.map +1 -0
  92. package/build/server/chunks/manifest.js-BwUys8gK.js +70 -0
  93. package/build/server/chunks/manifest.js-BwUys8gK.js.map +1 -0
  94. package/build/server/chunks/nodes/0.js-Dl0J9d3p.js +9 -0
  95. package/build/server/chunks/nodes/0.js-Dl0J9d3p.js.map +1 -0
  96. package/build/server/chunks/nodes/1.js-dXZVW92o.js +9 -0
  97. package/build/server/chunks/nodes/1.js-dXZVW92o.js.map +1 -0
  98. package/build/server/chunks/nodes/2.js-aMMUenQc.js +9 -0
  99. package/build/server/chunks/nodes/2.js-aMMUenQc.js.map +1 -0
  100. package/build/shims.js +33 -0
  101. package/build/shims.js.map +1 -0
  102. package/dist/cli/bin.js +9 -0
  103. package/dist/cli/completions.js +99 -0
  104. package/dist/cli/index.js +183 -0
  105. package/dist/cli/options.js +171 -0
  106. package/dist/cli/server.js +126 -0
  107. package/dist/cli/ui.js +75 -0
  108. package/dist/lib/cli/aws.js +264 -0
  109. package/dist/lib/time-range.js +106 -0
  110. package/package.json +106 -0
@@ -0,0 +1,776 @@
1
+ import { i as is_valid_array_len, a as is_valid_array_index, D as DevalueError, s as stringify_key, b as stringify_string, M as MAX_ARRAY_INDEX, c as is_plain_object, e as enumerable_symbols, v as valid_array_indices, g as get_type } from './uneval.js-DaakSYFQ.js';
2
+
3
+ /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
4
+
5
+ class HttpError {
6
+ /**
7
+ * @param {number} status
8
+ * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body
9
+ */
10
+ constructor(status, body) {
11
+ this.status = status;
12
+ if (typeof body === 'string') {
13
+ this.body = { message: body };
14
+ } else if (body) {
15
+ this.body = body;
16
+ } else {
17
+ this.body = { message: `Error: ${status}` };
18
+ }
19
+ }
20
+
21
+ toString() {
22
+ return JSON.stringify(this.body);
23
+ }
24
+ }
25
+
26
+ class Redirect {
27
+ /**
28
+ * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
29
+ * @param {string} location
30
+ */
31
+ constructor(status, location) {
32
+ try {
33
+ new Headers({ location });
34
+ } catch {
35
+ throw new Error(
36
+ `Invalid redirect location ${JSON.stringify(location)}: ` +
37
+ 'this string contains characters that cannot be used in HTTP headers'
38
+ );
39
+ }
40
+
41
+ this.status = status;
42
+ this.location = location;
43
+ }
44
+ }
45
+
46
+ /**
47
+ * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.
48
+ * `SvelteKitError` goes through `handleError`.
49
+ * @extends Error
50
+ */
51
+ class SvelteKitError extends Error {
52
+ /**
53
+ * @param {number} status
54
+ * @param {string} text
55
+ * @param {string} message
56
+ */
57
+ constructor(status, text, message) {
58
+ super(message);
59
+ this.status = status;
60
+ this.text = text;
61
+ }
62
+ }
63
+
64
+ /**
65
+ * @template [T=undefined]
66
+ */
67
+ class ActionFailure {
68
+ /**
69
+ * @param {number} status
70
+ * @param {T} data
71
+ */
72
+ constructor(status, data) {
73
+ this.status = status;
74
+ this.data = data;
75
+ }
76
+ }
77
+
78
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0_vite@8.2.2_@types_ab6e39593f61aae0ad0b9a1bac6935c7/node_modules/@sveltejs/kit/src/utils/functions.js
79
+ function noop() {}
80
+ /**
81
+ * @template T
82
+ * @param {() => T} fn
83
+ */
84
+ function once(fn) {
85
+ let done = false;
86
+ /** @type T */
87
+ let result;
88
+ return () => {
89
+ if (done) return result;
90
+ done = true;
91
+ return result = fn();
92
+ };
93
+ }
94
+ //#endregion
95
+ //#region node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/base64.js
96
+ /** @type {(array_buffer: ArrayBuffer) => string} */
97
+ function encode_native(array_buffer) {
98
+ return new Uint8Array(array_buffer).toBase64();
99
+ }
100
+ /** @type {(base64: string) => ArrayBuffer} */
101
+ function decode_native(base64) {
102
+ return Uint8Array.fromBase64(base64).buffer;
103
+ }
104
+ /** @type {(array_buffer: ArrayBuffer) => string} */
105
+ function encode_buffer(array_buffer) {
106
+ return Buffer.from(array_buffer).toString("base64");
107
+ }
108
+ /** @type {(base64: string) => ArrayBuffer} */
109
+ function decode_buffer(base64) {
110
+ return Uint8Array.from(Buffer.from(base64, "base64")).buffer;
111
+ }
112
+ /** @type {(array_buffer: ArrayBuffer) => string} */
113
+ function encode_legacy(array_buffer) {
114
+ const array = new Uint8Array(array_buffer);
115
+ let binary = "";
116
+ const chunk_size = 32768;
117
+ for (let i = 0; i < array.length; i += chunk_size) {
118
+ const chunk = array.subarray(i, i + chunk_size);
119
+ binary += String.fromCharCode.apply(null, chunk);
120
+ }
121
+ return btoa(binary);
122
+ }
123
+ /** @type {(base64: string) => ArrayBuffer} */
124
+ function decode_legacy(base64) {
125
+ const binary_string = atob(base64);
126
+ const len = binary_string.length;
127
+ const array = new Uint8Array(len);
128
+ for (let i = 0; i < len; i++) array[i] = binary_string.charCodeAt(i);
129
+ return array.buffer;
130
+ }
131
+ var native = typeof Uint8Array.fromBase64 === "function";
132
+ var buffer = typeof process === "object" && process.versions?.node !== void 0;
133
+ var encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
134
+ var decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
135
+ //#endregion
136
+ //#region node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/operations.js
137
+ /**
138
+ * Merges caller-provided operation overrides over the defaults. Iterating the
139
+ * default keys (rather than the override's own keys) means nullish members
140
+ * fall back to the default, and inherited members — e.g. from a class
141
+ * instance — are picked up.
142
+ *
143
+ * @template {Record<string, any>} T
144
+ * @param {T} defaults
145
+ * @param {Partial<T> | undefined} overrides
146
+ * @returns {T}
147
+ */
148
+ function merge_operations(defaults, overrides) {
149
+ return defaults;
150
+ }
151
+ /** @type {{ kind: 'not-plain' }} */
152
+ var NOT_PLAIN = Object.freeze({ kind: "not-plain" });
153
+ /** @type {{ kind: 'symbol-keys' }} */
154
+ var SYMBOL_KEYS = Object.freeze({ kind: "symbol-keys" });
155
+ var default_stringify_operations = Object.freeze({
156
+ identify: (value) => value,
157
+ typeOf: (value) => value === null ? "null" : typeof value,
158
+ toPrimitive: (value) => value,
159
+ tagOf: (value) => get_type(value),
160
+ isThenable: (value) => typeof value.then === "function",
161
+ toPromise: (thenable) => Promise.resolve(thenable),
162
+ unbox: (boxed) => boxed.valueOf(),
163
+ toISOString: (date) => isNaN(date.getDate()) ? "" : date.toISOString(),
164
+ toStringValue: (value) => value.toString(),
165
+ regExpInfo: (regexp) => ({
166
+ source: regexp.source,
167
+ flags: regexp.flags
168
+ }),
169
+ valuesOf: (set) => set,
170
+ entriesOf: (map) => map,
171
+ viewInfo: (view) => ({
172
+ buffer: view.buffer,
173
+ byteOffset: view.byteOffset,
174
+ byteLength: view.byteLength,
175
+ length: view.length,
176
+ bufferByteLength: view.buffer.byteLength
177
+ }),
178
+ toArrayBuffer: (buffer) => buffer,
179
+ lengthOf: (array) => array.length,
180
+ hasOwn: (value, key) => Object.hasOwn(value, key),
181
+ indicesOf: (array) => valid_array_indices(array),
182
+ shapeOf: (value) => {
183
+ if (!is_plain_object(value)) return NOT_PLAIN;
184
+ if (enumerable_symbols(value).length > 0) return SYMBOL_KEYS;
185
+ return {
186
+ kind: Object.getPrototypeOf(value) === null ? "null-proto" : "plain",
187
+ keys: Object.keys(value)
188
+ };
189
+ },
190
+ get: (value, key) => value[key]
191
+ });
192
+ var default_parse_operations = Object.freeze({
193
+ fromPrimitive: (primitive) => primitive,
194
+ fromISOString: (iso) => new Date(iso),
195
+ fromStringValue: (tag, text) => {
196
+ if (tag === "URL") return new URL(text);
197
+ if (tag === "URLSearchParams") return new URLSearchParams(text);
198
+ return Temporal[tag.slice(9)].from(text);
199
+ },
200
+ fromArrayBuffer: (buffer) => buffer,
201
+ fromRegExpInfo: (source, flags) => new RegExp(source, flags),
202
+ fromViewInfo: (tag, buffer, byteOffset, length) => {
203
+ const Constructor = globalThis[tag];
204
+ return byteOffset !== void 0 ? new Constructor(buffer, byteOffset, length) : new Constructor(buffer);
205
+ },
206
+ box: (value) => Object(value),
207
+ createArray: (length) => new Array(length),
208
+ createSparseArray: (length) => {
209
+ /** @type {any[]} */
210
+ const array = [];
211
+ array[MAX_ARRAY_INDEX] = void 0;
212
+ delete array[MAX_ARRAY_INDEX];
213
+ array.length = length;
214
+ return array;
215
+ },
216
+ createObject: () => ({}),
217
+ createNullPrototypeObject: () => Object.create(null),
218
+ createSet: () => /* @__PURE__ */ new Set(),
219
+ createMap: () => /* @__PURE__ */ new Map(),
220
+ set: (target, key, value) => {
221
+ target[key] = value;
222
+ },
223
+ addValue: (set, value) => {
224
+ set.add(value);
225
+ },
226
+ addEntry: (map, key, value) => {
227
+ map.set(key, value);
228
+ }
229
+ });
230
+ //#endregion
231
+ //#region node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/parse.js
232
+ /**
233
+ * Revive a value serialized with `devalue.stringify`
234
+ * @param {string} serialized
235
+ * @param {Record<string, (value: any) => any>} [revivers]
236
+ * @param {import('./types.js').ParseOptions} [options]
237
+ */
238
+ function parse(serialized, revivers, options) {
239
+ return unflatten(JSON.parse(serialized), revivers);
240
+ }
241
+ /**
242
+ * Revive a value flattened with `devalue.stringify`
243
+ * @param {number | any[]} parsed
244
+ * @param {Record<string, (value: any) => any>} [revivers]
245
+ * @param {import('./types.js').ParseOptions} [options]
246
+ */
247
+ function unflatten(parsed, revivers, options) {
248
+ /** @type {import('./types.js').ParseOperations} */
249
+ const ops = merge_operations(default_parse_operations);
250
+ if (typeof parsed === "number") return hydrate(parsed, true);
251
+ if (!Array.isArray(parsed) || parsed.length === 0) throw new Error("Invalid input");
252
+ const values = parsed;
253
+ const hydrated = Array(values.length);
254
+ /**
255
+ * A set of values currently being hydrated with custom revivers,
256
+ * used to detect invalid cyclical dependencies
257
+ * @type {Set<number> | null}
258
+ */
259
+ let hydrating = null;
260
+ /**
261
+ * @param {number} index
262
+ * @returns {any}
263
+ */
264
+ function hydrate(index, standalone = false) {
265
+ if (index === -1) return ops.fromPrimitive(void 0);
266
+ if (index === -3) return ops.fromPrimitive(NaN);
267
+ if (index === -4) return ops.fromPrimitive(Infinity);
268
+ if (index === -5) return ops.fromPrimitive(-Infinity);
269
+ if (index === -6) return ops.fromPrimitive(-0);
270
+ if (standalone || typeof index !== "number") throw new Error(`Invalid input`);
271
+ if (index in hydrated) return hydrated[index];
272
+ if (index >= values.length) throw new Error(`Invalid input`);
273
+ const value = values[index];
274
+ if (!value || typeof value !== "object") hydrated[index] = ops.fromPrimitive(value);
275
+ else if (Array.isArray(value)) {
276
+ if (typeof value[0] === "string") {
277
+ const type = value[0];
278
+ const reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : void 0;
279
+ if (reviver) {
280
+ let i = value[1];
281
+ if (typeof i !== "number") i = values.push(value[1]) - 1;
282
+ if (Object.hasOwn(hydrated, i)) return hydrated[index] = reviver(hydrated[i]);
283
+ hydrating ??= /* @__PURE__ */ new Set();
284
+ if (hydrating.has(i)) throw new Error("Invalid circular reference");
285
+ hydrating.add(i);
286
+ hydrated[index] = reviver(hydrate(i));
287
+ hydrating.delete(i);
288
+ return hydrated[index];
289
+ }
290
+ switch (type) {
291
+ case "Date":
292
+ hydrated[index] = ops.fromISOString(value[1]);
293
+ break;
294
+ case "Set":
295
+ const set = ops.createSet();
296
+ hydrated[index] = set;
297
+ for (let i = 1; i < value.length; i += 1) ops.addValue(set, hydrate(value[i]));
298
+ break;
299
+ case "Map":
300
+ const map = ops.createMap();
301
+ hydrated[index] = map;
302
+ for (let i = 1; i < value.length; i += 2) ops.addEntry(map, hydrate(value[i]), hydrate(value[i + 1]));
303
+ break;
304
+ case "RegExp":
305
+ hydrated[index] = ops.fromRegExpInfo(value[1], value[2]);
306
+ break;
307
+ case "Object": {
308
+ const wrapped_index = value[1];
309
+ if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") throw new Error("Invalid input");
310
+ hydrated[index] = ops.box(hydrate(wrapped_index));
311
+ break;
312
+ }
313
+ case "BigInt":
314
+ hydrated[index] = ops.fromPrimitive(BigInt(value[1]));
315
+ break;
316
+ case "null":
317
+ const obj = ops.createNullPrototypeObject();
318
+ hydrated[index] = obj;
319
+ for (let i = 1; i < value.length; i += 2) {
320
+ if (value[i] === "__proto__") throw new Error("Cannot parse an object with a `__proto__` property");
321
+ ops.set(obj, value[i], hydrate(value[i + 1]));
322
+ }
323
+ break;
324
+ case "Int8Array":
325
+ case "Uint8Array":
326
+ case "Uint8ClampedArray":
327
+ case "Int16Array":
328
+ case "Uint16Array":
329
+ case "Float16Array":
330
+ case "Int32Array":
331
+ case "Uint32Array":
332
+ case "Float32Array":
333
+ case "Float64Array":
334
+ case "BigInt64Array":
335
+ case "BigUint64Array":
336
+ case "DataView": {
337
+ if (values[value[1]][0] !== "ArrayBuffer") throw new Error("Invalid data");
338
+ const buffer = hydrate(value[1]);
339
+ hydrated[index] = ops.fromViewInfo(type, buffer, value[2], value[3]);
340
+ break;
341
+ }
342
+ case "ArrayBuffer": {
343
+ const base64 = value[1];
344
+ if (typeof base64 !== "string") throw new Error("Invalid ArrayBuffer encoding");
345
+ hydrated[index] = ops.fromArrayBuffer(decode64(base64));
346
+ break;
347
+ }
348
+ case "URL":
349
+ case "URLSearchParams":
350
+ case "Temporal.Duration":
351
+ case "Temporal.Instant":
352
+ case "Temporal.PlainDate":
353
+ case "Temporal.PlainTime":
354
+ case "Temporal.PlainDateTime":
355
+ case "Temporal.PlainMonthDay":
356
+ case "Temporal.PlainYearMonth":
357
+ case "Temporal.ZonedDateTime":
358
+ hydrated[index] = ops.fromStringValue(type, value[1]);
359
+ break;
360
+ default: throw new Error(`Unknown type ${type}`);
361
+ }
362
+ } else if (value[0] === -7) {
363
+ const len = value[1];
364
+ if (!is_valid_array_len(len)) throw new Error("Invalid input");
365
+ const array = ops.createSparseArray(len);
366
+ hydrated[index] = array;
367
+ for (let i = 2; i < value.length; i += 2) {
368
+ const idx = value[i];
369
+ if (!is_valid_array_index(idx) || idx >= len) throw new Error("Invalid input");
370
+ ops.set(array, idx, hydrate(value[i + 1]));
371
+ }
372
+ } else {
373
+ const array = ops.createArray(value.length);
374
+ hydrated[index] = array;
375
+ for (let i = 0; i < value.length; i += 1) {
376
+ const n = value[i];
377
+ if (n === -2) continue;
378
+ ops.set(array, i, hydrate(n));
379
+ }
380
+ }
381
+ } else {
382
+ const object = ops.createObject();
383
+ hydrated[index] = object;
384
+ for (const key of Object.keys(value)) {
385
+ if (key === "__proto__") throw new Error("Cannot parse an object with a `__proto__` property");
386
+ ops.set(object, key, hydrate(value[key]));
387
+ }
388
+ }
389
+ return hydrated[index];
390
+ }
391
+ return hydrate(0);
392
+ }
393
+ //#endregion
394
+ //#region node_modules/.pnpm/devalue@5.9.2/node_modules/devalue/src/stringify.js
395
+ /**
396
+ * Turn a value into a JSON string that can be parsed with `devalue.parse`
397
+ * @param {any} value
398
+ * @param {Record<string, (value: any) => any>} [reducers]
399
+ * @param {import('./types.js').StringifyOptions} [options]
400
+ */
401
+ function stringify$1(value, reducers, options) {
402
+ const stringified = run(false, value, reducers);
403
+ return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
404
+ }
405
+ /**
406
+ * @param {boolean} async
407
+ * @param {any} value
408
+ * @param {Record<string, (value: any) => any>} [reducers]
409
+ * @param {import('./types.js').StringifyOptions} [options]
410
+ */
411
+ function run(async, value, reducers, options) {
412
+ const ops = merge_operations(default_stringify_operations);
413
+ /** @type {any[]} */
414
+ const stringified = [];
415
+ /** @type {Map<any, number>} */
416
+ const indexes = /* @__PURE__ */ new Map();
417
+ /** @type {Array<{ key: string, fn: (value: any) => any }>} */
418
+ const custom = [];
419
+ if (reducers) for (const key of Object.getOwnPropertyNames(reducers)) custom.push({
420
+ key,
421
+ fn: reducers[key]
422
+ });
423
+ /** @type {string[]} */
424
+ const keys = [];
425
+ let p = 0;
426
+ /**
427
+ * @param {any} thing
428
+ * @param {number} [index]
429
+ */
430
+ function flatten(thing, index) {
431
+ const type = ops.typeOf(thing);
432
+ if (type === "undefined") return -1;
433
+ /** @type {number | undefined} */
434
+ let number;
435
+ if (type === "number") {
436
+ number = ops.toPrimitive(thing);
437
+ if (Number.isNaN(number)) return -3;
438
+ if (number === Infinity) return -4;
439
+ if (number === -Infinity) return -5;
440
+ if (number === 0 && 1 / number < 0) return -6;
441
+ }
442
+ const id = ops.identify(thing);
443
+ if (indexes.has(id)) return indexes.get(id);
444
+ index ??= p++;
445
+ indexes.set(id, index);
446
+ for (const { key, fn } of custom) {
447
+ const value = fn(thing);
448
+ if (value) {
449
+ stringified[index] = `["${key}",${flatten(value)}]`;
450
+ return index;
451
+ }
452
+ }
453
+ if (type === "function") throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
454
+ else if (type === "symbol") throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
455
+ /** @type {string | Promise<any>} */
456
+ let str = "";
457
+ if (type !== "object") str = stringify_primitive(type === "number" ? number : ops.toPrimitive(thing));
458
+ else if (ops.isThenable(thing)) {
459
+ throw new DevalueError(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, keys, thing, value);
460
+ } else {
461
+ const tag = ops.tagOf(thing);
462
+ switch (tag) {
463
+ case "Number":
464
+ case "String":
465
+ case "Boolean":
466
+ case "BigInt":
467
+ str = `["Object",${flatten(ops.unbox(thing))}]`;
468
+ break;
469
+ case "Date":
470
+ str = `["Date","${ops.toISOString(thing)}"]`;
471
+ break;
472
+ case "URL":
473
+ str = `["URL",${stringify_string(ops.toStringValue(thing))}]`;
474
+ break;
475
+ case "URLSearchParams":
476
+ str = `["URLSearchParams",${stringify_string(ops.toStringValue(thing))}]`;
477
+ break;
478
+ case "RegExp":
479
+ const { source, flags } = ops.regExpInfo(thing);
480
+ str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`;
481
+ break;
482
+ case "Array": {
483
+ let mostly_dense = false;
484
+ const length = ops.lengthOf(thing);
485
+ str = "[";
486
+ for (let i = 0; i < length; i += 1) {
487
+ if (i > 0) str += ",";
488
+ if (ops.hasOwn(thing, i)) {
489
+ keys.push(`[${i}]`);
490
+ str += flatten(ops.get(thing, i));
491
+ keys.pop();
492
+ } else if (mostly_dense) str += -2;
493
+ else {
494
+ const populated_keys = ops.indicesOf(thing);
495
+ const population = populated_keys.length;
496
+ const d = String(length).length;
497
+ if ((length - population) * 3 > 4 + d + population * (d + 1)) {
498
+ str = "[-7," + length;
499
+ for (let j = 0; j < populated_keys.length; j++) {
500
+ const key = populated_keys[j];
501
+ keys.push(`[${key}]`);
502
+ str += "," + key + "," + flatten(ops.get(thing, key));
503
+ keys.pop();
504
+ }
505
+ break;
506
+ } else {
507
+ mostly_dense = true;
508
+ str += -2;
509
+ }
510
+ }
511
+ }
512
+ str += "]";
513
+ break;
514
+ }
515
+ case "Set":
516
+ str = "[\"Set\"";
517
+ for (const value of ops.valuesOf(thing)) str += `,${flatten(value)}`;
518
+ str += "]";
519
+ break;
520
+ case "Map":
521
+ str = "[\"Map\"";
522
+ for (const [key, value] of ops.entriesOf(thing)) {
523
+ const key_type = ops.typeOf(key);
524
+ const key_is_primitive = key_type !== "object" && key_type !== "function" && key_type !== "symbol";
525
+ keys.push(`.get(${key_is_primitive ? stringify_primitive(ops.toPrimitive(key)) : "..."})`);
526
+ str += `,${flatten(key)},${flatten(value)}`;
527
+ keys.pop();
528
+ }
529
+ str += "]";
530
+ break;
531
+ case "Int8Array":
532
+ case "Uint8Array":
533
+ case "Uint8ClampedArray":
534
+ case "Int16Array":
535
+ case "Uint16Array":
536
+ case "Float16Array":
537
+ case "Int32Array":
538
+ case "Uint32Array":
539
+ case "Float32Array":
540
+ case "Float64Array":
541
+ case "BigInt64Array":
542
+ case "BigUint64Array": {
543
+ const info = ops.viewInfo(thing);
544
+ str = "[\"" + tag + "\"," + flatten(info.buffer);
545
+ if (info.byteLength !== info.bufferByteLength) str += `,${info.byteOffset},${info.length}`;
546
+ str += "]";
547
+ break;
548
+ }
549
+ case "DataView": {
550
+ const info = ops.viewInfo(thing);
551
+ str = "[\"" + tag + "\"," + flatten(info.buffer);
552
+ if (info.byteLength !== info.bufferByteLength) str += `,${info.byteOffset},${info.byteLength}`;
553
+ str += "]";
554
+ break;
555
+ }
556
+ case "ArrayBuffer":
557
+ str = `["ArrayBuffer","${encode64(ops.toArrayBuffer(thing))}"]`;
558
+ break;
559
+ case "Temporal.Duration":
560
+ case "Temporal.Instant":
561
+ case "Temporal.PlainDate":
562
+ case "Temporal.PlainTime":
563
+ case "Temporal.PlainDateTime":
564
+ case "Temporal.PlainMonthDay":
565
+ case "Temporal.PlainYearMonth":
566
+ case "Temporal.ZonedDateTime":
567
+ str = `["${tag}",${stringify_string(ops.toStringValue(thing))}]`;
568
+ break;
569
+ default: {
570
+ const shape = ops.shapeOf(thing);
571
+ if (shape.kind === "not-plain") throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
572
+ if (shape.kind === "symbol-keys") throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
573
+ if (shape.kind === "null-proto") {
574
+ str = "[\"null\"";
575
+ for (const key of shape.keys) {
576
+ if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
577
+ keys.push(stringify_key(key));
578
+ str += `,${stringify_string(key)},${flatten(ops.get(thing, key))}`;
579
+ keys.pop();
580
+ }
581
+ str += "]";
582
+ } else {
583
+ str = "{";
584
+ let started = false;
585
+ for (const key of shape.keys) {
586
+ if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
587
+ if (started) str += ",";
588
+ started = true;
589
+ keys.push(stringify_key(key));
590
+ str += `${stringify_string(key)}:${flatten(ops.get(thing, key))}`;
591
+ keys.pop();
592
+ }
593
+ str += "}";
594
+ }
595
+ }
596
+ }
597
+ }
598
+ stringified[index] = str;
599
+ return index;
600
+ }
601
+ const index = flatten(value);
602
+ if (index < 0) return `${index}`;
603
+ return stringified;
604
+ }
605
+ /**
606
+ * @param {any} thing
607
+ * @returns {string}
608
+ */
609
+ function stringify_primitive(thing) {
610
+ const type = typeof thing;
611
+ if (type === "string") return stringify_string(thing);
612
+ if (thing === void 0) return (-1).toString();
613
+ if (thing === 0 && 1 / thing < 0) return (-6).toString();
614
+ if (type === "bigint") return `["BigInt","${thing}"]`;
615
+ return String(thing);
616
+ }
617
+ //#endregion
618
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0_vite@8.2.2_@types_ab6e39593f61aae0ad0b9a1bac6935c7/node_modules/@sveltejs/kit/src/runtime/utils.js
619
+ var text_encoder = new TextEncoder();
620
+ /**
621
+ * Like node's path.relative, but without using node
622
+ * @param {string} from
623
+ * @param {string} to
624
+ */
625
+ function get_relative_path(from, to) {
626
+ const from_parts = from.split(/[/\\]/);
627
+ const to_parts = to.split(/[/\\]/);
628
+ from_parts.pop();
629
+ while (from_parts[0] === to_parts[0]) {
630
+ from_parts.shift();
631
+ to_parts.shift();
632
+ }
633
+ let i = from_parts.length;
634
+ while (i--) from_parts[i] = "..";
635
+ return from_parts.concat(to_parts).join("/");
636
+ }
637
+ /**
638
+ * @param {Uint8Array} bytes
639
+ * @returns {string}
640
+ */
641
+ function base64_encode(bytes) {
642
+ if (globalThis.Buffer) return globalThis.Buffer.from(bytes).toString("base64");
643
+ let binary = "";
644
+ for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
645
+ return btoa(binary);
646
+ }
647
+ /**
648
+ * @param {string} encoded
649
+ * @returns {Uint8Array}
650
+ */
651
+ function base64_decode(encoded) {
652
+ if (globalThis.Buffer) {
653
+ const buffer = globalThis.Buffer.from(encoded, "base64");
654
+ return new Uint8Array(buffer);
655
+ }
656
+ const binary = atob(encoded);
657
+ const bytes = new Uint8Array(binary.length);
658
+ for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
659
+ return bytes;
660
+ }
661
+ //#endregion
662
+ //#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.57.0_vite@8.2.2_@types_ab6e39593f61aae0ad0b9a1bac6935c7/node_modules/@sveltejs/kit/src/utils/error.js
663
+ /**
664
+ * @param {unknown} err
665
+ * @return {Error}
666
+ */
667
+ function coalesce_to_error(err) {
668
+ return err instanceof Error || err && err.name && err.message ? err : new Error(JSON.stringify(err));
669
+ }
670
+ /**
671
+ * This is an identity function that exists to make TypeScript less
672
+ * paranoid about people throwing things that aren't errors, which
673
+ * frankly is not something we should care about
674
+ * @param {unknown} error
675
+ */
676
+ function normalize_error(error) {
677
+ return error;
678
+ }
679
+ /**
680
+ * @param {unknown} error
681
+ */
682
+ function get_status(error) {
683
+ return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
684
+ }
685
+ /**
686
+ * @param {unknown} error
687
+ */
688
+ function get_message(error) {
689
+ return error instanceof SvelteKitError ? error.text : "Internal Error";
690
+ }
691
+ var INVALIDATED_PARAM = "x-sveltekit-invalidated";
692
+ var TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
693
+ /**
694
+ * Try to `devalue.stringify` the data object using the provided transport encoders.
695
+ * @param {any} data
696
+ * @param {Transport} transport
697
+ */
698
+ function stringify(data, transport) {
699
+ return stringify$1(data, Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode])));
700
+ }
701
+ var remote_object = "__skrao";
702
+ var remote_map = "__skram";
703
+ var remote_set = "__skras";
704
+ var remote_file = "__skraf";
705
+ /** @param {Transport} transport */
706
+ function create_remote_arg_revivers(transport) {
707
+ const remote_fns_revivers = {
708
+ /** @type {(value: unknown) => unknown} */
709
+ [remote_object]: (value) => value,
710
+ /** @type {(value: unknown) => Map<unknown, unknown>} */
711
+ [remote_map]: (value) => {
712
+ if (!Array.isArray(value)) throw new Error("Invalid data for Map reviver");
713
+ const map = /* @__PURE__ */ new Map();
714
+ for (const item of value) {
715
+ if (!Array.isArray(item) || item.length !== 2 || typeof item[0] !== "string" || typeof item[1] !== "string") throw new Error("Invalid data for Map reviver");
716
+ const [key, val] = item;
717
+ map.set(parse$1(key), parse$1(val));
718
+ }
719
+ return map;
720
+ },
721
+ /** @type {(value: unknown) => Set<unknown>} */
722
+ [remote_set]: (value) => {
723
+ if (!Array.isArray(value)) throw new Error("Invalid data for Set reviver");
724
+ const set = /* @__PURE__ */ new Set();
725
+ for (const item of value) {
726
+ if (typeof item !== "string") throw new Error("Invalid data for Set reviver");
727
+ set.add(parse$1(item));
728
+ }
729
+ return set;
730
+ },
731
+ /** @type {(value: any) => File} */
732
+ [remote_file]: (value) => {
733
+ if (!value || typeof value !== "object" || typeof value.name !== "string" || typeof value.type !== "string" || typeof value.size !== "number" || typeof value.lastModified !== "number" || !(value.data instanceof ArrayBuffer)) throw new Error("Invalid data for File reviver");
734
+ const { data, name, ...meta } = value;
735
+ return new File([data], name, meta);
736
+ }
737
+ };
738
+ const all_revivers = {
739
+ ...Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.decode])),
740
+ ...remote_fns_revivers
741
+ };
742
+ /** @type {(data: string) => unknown} */
743
+ const parse$1 = (data) => parse(data, all_revivers);
744
+ return all_revivers;
745
+ }
746
+ /**
747
+ * Parses the argument (if any) for a remote function
748
+ * @param {string} string
749
+ * @param {Transport} transport
750
+ */
751
+ function parse_remote_arg(string, transport) {
752
+ if (!string) return void 0;
753
+ return parse(new TextDecoder().decode(base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))), create_remote_arg_revivers(transport));
754
+ }
755
+ /**
756
+ * @param {string} id
757
+ * @param {string} payload
758
+ */
759
+ function create_remote_key(id, payload) {
760
+ return id + "/" + payload;
761
+ }
762
+ /**
763
+ * @param {string} key
764
+ * @returns {{ id: string; payload: string }}
765
+ */
766
+ function split_remote_key(key) {
767
+ const i = key.lastIndexOf("/");
768
+ if (i === -1) throw new Error(`Invalid remote key: ${key}`);
769
+ return {
770
+ id: key.slice(0, i),
771
+ payload: key.slice(i + 1)
772
+ };
773
+ }
774
+
775
+ export { ActionFailure as A, HttpError as H, INVALIDATED_PARAM as I, Redirect as R, SvelteKitError as S, TRAILING_SLASH_PARAM as T, get_message as a, get_relative_path as b, coalesce_to_error as c, normalize_error as d, create_remote_key as e, parse_remote_arg as f, get_status as g, stringify$1 as h, split_remote_key as i, base64_encode as j, noop as n, once as o, parse as p, stringify as s, text_encoder as t };
776
+ //# sourceMappingURL=shared.js-CgjUIvRK.js.map