@celsoft/coordinator 0.0.0 → 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 (131) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +107 -0
  3. package/THIRD_PARTY_NOTICES.md +2005 -0
  4. package/agents/console.md +20 -0
  5. package/agents/free.md +110 -0
  6. package/build/0-JP6XL6LB.js +17 -0
  7. package/build/1-A52YZWNS.js +17 -0
  8. package/build/2-CLH2NM6F.js +32 -0
  9. package/build/3-4N467IB6.js +45 -0
  10. package/build/4-WL5H4LUW.js +29 -0
  11. package/build/_layout.svelte-KPUSX7LQ.js +27 -0
  12. package/build/_page.svelte-22H56UR6.js +7972 -0
  13. package/build/_page.svelte-CVWUNRQC.js +135 -0
  14. package/build/_page.svelte-LTZXBHMT.js +57 -0
  15. package/build/_server.ts-3KVBYN6P.js +20 -0
  16. package/build/_server.ts-3POPKVEM.js +47 -0
  17. package/build/_server.ts-5735T2V5.js +31 -0
  18. package/build/_server.ts-5VXGNWV2.js +38 -0
  19. package/build/_server.ts-645KP7WP.js +42 -0
  20. package/build/_server.ts-A3AA24Z2.js +28 -0
  21. package/build/_server.ts-CITUOEM6.js +58 -0
  22. package/build/_server.ts-I7HMTPOA.js +25 -0
  23. package/build/_server.ts-M5BQ4LLX.js +30 -0
  24. package/build/_server.ts-OB4O27HF.js +683 -0
  25. package/build/_server.ts-OJT7HE7M.js +15 -0
  26. package/build/_server.ts-OYGWVLZM.js +12 -0
  27. package/build/_server.ts-T75UVMQP.js +38 -0
  28. package/build/_server.ts-WYZYNHUZ.js +28 -0
  29. package/build/_server.ts-Z26EB47B.js +486 -0
  30. package/build/chunk-4CIG53L5.js +33 -0
  31. package/build/chunk-BJTJS3XY.js +338 -0
  32. package/build/chunk-F2CNWJZM.js +14 -0
  33. package/build/chunk-HGYE3UTU.js +416 -0
  34. package/build/chunk-KAYW2W7H.js +1311 -0
  35. package/build/chunk-LFP3UPCM.js +10 -0
  36. package/build/chunk-M44JEFEH.js +62 -0
  37. package/build/chunk-MC5AGLMY.js +39 -0
  38. package/build/chunk-NCZ77J5E.js +19798 -0
  39. package/build/chunk-NVNLDPUJ.js +2122 -0
  40. package/build/chunk-PDCON4KS.js +494 -0
  41. package/build/chunk-Q4OQNY5M.js +25 -0
  42. package/build/chunk-QCUOR2U5.js +75 -0
  43. package/build/chunk-R6RYZZWA.js +46 -0
  44. package/build/chunk-SOJTASZC.js +51 -0
  45. package/build/chunk-SU26PJVX.js +410 -0
  46. package/build/chunk-U5BSBG4R.js +506 -0
  47. package/build/chunk-UEKOZGRO.js +37 -0
  48. package/build/chunk-W6EFUWJ2.js +9 -0
  49. package/build/chunk-WOPREK6Q.js +117 -0
  50. package/build/chunk-WWJ3F4QS.js +127 -0
  51. package/build/chunk-ZGZJEEE3.js +1091 -0
  52. package/build/client/_app/immutable/assets/0.BGa5ZNDM.css +1 -0
  53. package/build/client/_app/immutable/chunks/BUrrLYDt.js +2 -0
  54. package/build/client/_app/immutable/chunks/BgFr_EyZ.js +4 -0
  55. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +82 -0
  56. package/build/client/_app/immutable/chunks/C8qZab0y.js +56 -0
  57. package/build/client/_app/immutable/chunks/C90fLsA5.js +4 -0
  58. package/build/client/_app/immutable/chunks/CRzLMJPS.js +1 -0
  59. package/build/client/_app/immutable/chunks/DLT1iIlz.js +2 -0
  60. package/build/client/_app/immutable/chunks/pIrVVOVY.js +2 -0
  61. package/build/client/_app/immutable/entry/app.0DERehLW.js +3 -0
  62. package/build/client/_app/immutable/entry/payload.DSmR2FwN.js +2 -0
  63. package/build/client/_app/immutable/entry/start.B7srFiqh.js +3 -0
  64. package/build/client/_app/immutable/nodes/0.aD9vJoxR.js +2 -0
  65. package/build/client/_app/immutable/nodes/1.Br4FL91i.js +2 -0
  66. package/build/client/_app/immutable/nodes/2.vl6OYfu3.js +8 -0
  67. package/build/client/_app/immutable/nodes/3.VYqJOLAF.js +2 -0
  68. package/build/client/_app/immutable/nodes/4.jF9UVlFN.js +2 -0
  69. package/build/client/_app/version.json +1 -0
  70. package/build/client/apple-touch-icon.png +0 -0
  71. package/build/client/favicon.ico +0 -0
  72. package/build/client/favicon.svg +48 -0
  73. package/build/client/icon-192.png +0 -0
  74. package/build/client/icon-512.png +0 -0
  75. package/build/client/icon-maskable-512.png +0 -0
  76. package/build/client/icon.svg +44 -0
  77. package/build/client/manifest.webmanifest +15 -0
  78. package/build/error.svelte-JXZDY65F.js +51 -0
  79. package/build/handler.js +716 -0
  80. package/build/hooks.server-34IMHRKC.js +43 -0
  81. package/build/instance-NP3FJIWW.js +2967 -0
  82. package/client/client.mjs +28 -0
  83. package/client/hooks.mjs +7 -0
  84. package/client/register.mjs +5 -0
  85. package/dist/cli.js +62826 -0
  86. package/dist/port.js +36691 -0
  87. package/package.json +20 -1
  88. package/skills/agents/.claude-plugin/plugin.json +5 -0
  89. package/skills/agents/hooks/hooks.json +1 -0
  90. package/skills/agents/hooks/register.ts +57 -0
  91. package/skills/agents/skills/bus-work/SKILL.md +66 -0
  92. package/skills/agents/skills/plan/SKILL.md +98 -0
  93. package/skills/console/.claude-plugin/plugin.json +5 -0
  94. package/skills/console/hooks/hooks.json +1 -0
  95. package/skills/console/hooks/register.ts +10 -0
  96. package/skills/console/skills/bus/SKILL.md +61 -0
  97. package/skills/default/.claude-plugin/plugin.json +5 -0
  98. package/skills/default/skills/git-workflow/SKILL.md +294 -0
  99. package/skills/default/skills/git-workflow/mise-tasks/_lib.sh +107 -0
  100. package/skills/default/skills/git-workflow/mise-tasks/clone +36 -0
  101. package/skills/default/skills/git-workflow/mise-tasks/repo-list +8 -0
  102. package/skills/default/skills/git-workflow/mise-tasks/unpushed +26 -0
  103. package/skills/default/skills/git-workflow/mise-tasks/worktree-add +60 -0
  104. package/skills/default/skills/github/SKILL.md +208 -0
  105. package/skills/default/skills/github/scripts/gh-org +196 -0
  106. package/skills/default/skills/plan-page/SKILL.md +300 -0
  107. package/skills/default/skills/plan-page/assets/index.html +854 -0
  108. package/skills/default/skills/plan-page/scripts/inline +46 -0
  109. package/skills/default/skills/plan-page/scripts/stage +26 -0
  110. package/skills/default/skills/secrets/SKILL.md +134 -0
  111. package/skills/default/skills/secrets/scripts/secrets-check +87 -0
  112. package/skills/default/skills/writing-style/SKILL.md +45 -0
  113. package/skills/extra/.claude-plugin/plugin.json +5 -0
  114. package/skills/extra/skills/artifacts/SKILL.md +52 -0
  115. package/skills/extra/skills/github-actions/SKILL.md +78 -0
  116. package/skills/extra/skills/github-actions/scan +32 -0
  117. package/skills/extra/skills/markdown-review/SKILL.md +70 -0
  118. package/skills/extra/skills/markdown-review/assets/index.html +201 -0
  119. package/skills/extra/skills/markdown-review/scripts/stage +36 -0
  120. package/skills/extra/skills/mise-usage/SKILL.md +155 -0
  121. package/skills/extra/skills/plugin-authoring/SKILL.md +317 -0
  122. package/skills/extra/skills/project-conventions/SKILL.md +64 -0
  123. package/skills/extra/skills/questions/SKILL.md +156 -0
  124. package/skills/extra/skills/questions/assets/index.html +376 -0
  125. package/skills/extra/skills/questions/scripts/stage +26 -0
  126. package/skills/extra/skills/serve/SKILL.md +165 -0
  127. package/skills/extra/skills/serve/scripts/serve +268 -0
  128. package/skills/extra/skills/serve/scripts/server.py +345 -0
  129. package/skills/extra/skills/skill-dependencies/SKILL.md +65 -0
  130. package/skills/extra/skills/skill-maintenance/SKILL.md +101 -0
  131. package/skills/extra/skills/ticketing/SKILL.md +125 -0
@@ -0,0 +1,410 @@
1
+ import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
2
+
3
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/exports/internal/shared.js
4
+ var HttpError = class {
5
+ /**
6
+ * @param {App.Error} error
7
+ */
8
+ constructor(error2) {
9
+ this.status = error2.status;
10
+ this.body = error2;
11
+ }
12
+ toString() {
13
+ return JSON.stringify(this.body);
14
+ }
15
+ };
16
+ var HandledHttpError = class extends HttpError {
17
+ };
18
+ var Redirect = class {
19
+ /**
20
+ * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status
21
+ * @param {string} location
22
+ */
23
+ constructor(status, location) {
24
+ try {
25
+ new Headers({ location });
26
+ } catch {
27
+ throw new Error(
28
+ `Invalid redirect location ${JSON.stringify(location)}: this string contains characters that cannot be used in HTTP headers`
29
+ );
30
+ }
31
+ this.status = status;
32
+ this.location = location;
33
+ }
34
+ };
35
+ var SvelteKitError = class extends Error {
36
+ /**
37
+ * @param {number} status
38
+ * @param {string} text
39
+ * @param {string} message
40
+ */
41
+ constructor(status, text2, message) {
42
+ super(message);
43
+ this.status = status;
44
+ this.text = text2;
45
+ }
46
+ };
47
+ var ActionFailure = class {
48
+ /**
49
+ * @param {number} status
50
+ * @param {T} data
51
+ */
52
+ constructor(status, data) {
53
+ this.status = status;
54
+ this.data = data;
55
+ }
56
+ };
57
+ var ValidationError = class extends Error {
58
+ /**
59
+ * @param {StandardSchemaV1.Issue[]} issues
60
+ */
61
+ constructor(issues) {
62
+ super("Validation failed");
63
+ this.name = "ValidationError";
64
+ this.issues = issues;
65
+ }
66
+ };
67
+
68
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/constants.js
69
+ var MUTATIVE_METHODS = ["POST", "PUT", "PATCH", "DELETE"];
70
+ var BODY_DEPENDENT_METHODS = [...MUTATIVE_METHODS, "QUERY"];
71
+ var SRC_ROOT = import.meta.dirname;
72
+ var IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
73
+
74
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/exports/internal/server/event.js
75
+ var sync_store = null;
76
+ var als;
77
+ import("node:async_hooks").then((hooks) => als = new hooks.AsyncLocalStorage()).catch(() => {
78
+ });
79
+ function try_get_request_store() {
80
+ return sync_store ?? als?.getStore() ?? null;
81
+ }
82
+ function with_request_store(store, fn) {
83
+ try {
84
+ sync_store = store;
85
+ return als ? als.run(store, fn) : fn();
86
+ } finally {
87
+ if (!IN_WEBCONTAINER) {
88
+ sync_store = null;
89
+ }
90
+ }
91
+ }
92
+
93
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/telemetry.js
94
+ var noop_span = {
95
+ spanContext() {
96
+ return noop_span_context;
97
+ },
98
+ setAttribute() {
99
+ return this;
100
+ },
101
+ setAttributes() {
102
+ return this;
103
+ },
104
+ addEvent() {
105
+ return this;
106
+ },
107
+ setStatus() {
108
+ return this;
109
+ },
110
+ updateName() {
111
+ return this;
112
+ },
113
+ end() {
114
+ return this;
115
+ },
116
+ isRecording() {
117
+ return false;
118
+ },
119
+ recordException() {
120
+ return this;
121
+ },
122
+ addLink() {
123
+ return this;
124
+ },
125
+ addLinks() {
126
+ return this;
127
+ }
128
+ };
129
+ var noop_span_context = {
130
+ traceId: "",
131
+ spanId: "",
132
+ traceFlags: 0
133
+ };
134
+
135
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/exports/internal/server/telemetry.js
136
+ var otel = null;
137
+ async function record_span({ name, attributes, fn }) {
138
+ if (otel === null) {
139
+ return fn(noop_span);
140
+ }
141
+ const { SpanStatusCode, tracer } = await otel;
142
+ return tracer.startActiveSpan(name, { attributes }, async (span) => {
143
+ try {
144
+ return await fn(span);
145
+ } catch (error2) {
146
+ if (error2 instanceof HttpError) {
147
+ span.setAttributes({
148
+ [`${name}.result.type`]: "known_error",
149
+ [`${name}.result.status`]: error2.status,
150
+ [`${name}.result.message`]: error2.body.message
151
+ });
152
+ if (error2.status >= 500) {
153
+ span.recordException({
154
+ name: "HttpError",
155
+ message: error2.body.message
156
+ });
157
+ span.setStatus({
158
+ code: SpanStatusCode.ERROR,
159
+ message: error2.body.message
160
+ });
161
+ }
162
+ } else if (error2 instanceof Redirect) {
163
+ span.setAttributes({
164
+ [`${name}.result.type`]: "redirect",
165
+ [`${name}.result.status`]: error2.status,
166
+ [`${name}.result.location`]: error2.location
167
+ });
168
+ } else if (error2 instanceof Error) {
169
+ span.setAttributes({
170
+ [`${name}.result.type`]: "unknown_error"
171
+ });
172
+ span.recordException({
173
+ name: error2.name,
174
+ message: error2.message,
175
+ // conditional so this compiles under consumers' `exactOptionalPropertyTypes`
176
+ ...error2.stack !== void 0 && { stack: error2.stack }
177
+ });
178
+ span.setStatus({
179
+ code: SpanStatusCode.ERROR,
180
+ message: error2.message
181
+ });
182
+ } else {
183
+ span.setAttributes({
184
+ [`${name}.result.type`]: "unknown_error"
185
+ });
186
+ span.setStatus({ code: SpanStatusCode.ERROR });
187
+ }
188
+ throw error2;
189
+ } finally {
190
+ span.end();
191
+ }
192
+ });
193
+ }
194
+
195
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/exports/internal/server/index.js
196
+ function get_origin() {
197
+ const request = try_get_request_store()?.event.request;
198
+ return request && new URL(request.url).origin;
199
+ }
200
+ function merge_tracing(event_like, current) {
201
+ return {
202
+ ...event_like,
203
+ tracing: {
204
+ ...event_like.tracing,
205
+ current
206
+ }
207
+ };
208
+ }
209
+
210
+ // node_modules/.pnpm/esm-env@1.2.2/node_modules/esm-env/browser-fallback.js
211
+ var browser_fallback_default = typeof window !== "undefined";
212
+
213
+ // node_modules/.pnpm/esm-env@1.2.2/node_modules/esm-env/dev-fallback.js
214
+ var node_env = globalThis.process?.env?.NODE_ENV;
215
+ var dev_fallback_default = node_env && !node_env.toLowerCase().startsWith("prod");
216
+
217
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/messages/internal/shared.js
218
+ var verbose = false;
219
+ var bold = "font-weight: bold";
220
+ var normal = "font-weight: normal";
221
+ function throw_error2(code, message, caller) {
222
+ const error2 = new Error(`${code}
223
+ ${message}
224
+ https://svelte.dev/e/kit/${code}`);
225
+ error2.name = "SvelteKit error";
226
+ Error.captureStackTrace?.(error2, caller);
227
+ throw error2;
228
+ }
229
+
230
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/messages/shared-errors.js
231
+ function invalid_error_status(_values) {
232
+ if (dev_fallback_default || !browser_fallback_default && verbose) {
233
+ throw_error2("invalid_error_status", `HTTP error status codes must be between 400 and 599 \u2014 ${_values.status} is invalid`, invalid_error_status);
234
+ }
235
+ throw new Error("https://svelte.dev/e/kit/invalid_error_status");
236
+ }
237
+ function invalid_redirect_status(_values) {
238
+ if (dev_fallback_default || !browser_fallback_default && verbose) {
239
+ throw_error2("invalid_redirect_status", `Redirect status codes must be between 300 and 308 \u2014 ${_values.status} is invalid`, invalid_redirect_status);
240
+ }
241
+ throw new Error("https://svelte.dev/e/kit/invalid_redirect_status");
242
+ }
243
+ function redirect_external_javascript(_values) {
244
+ if (dev_fallback_default || !browser_fallback_default && verbose) {
245
+ throw_error2("redirect_external_javascript", `Cannot redirect to \`${_values.location}\` with \`{ external: true }\`. The \`javascript:\` and \`data:\` protocols must be explicitly listed in the \`external\` allowlist`, redirect_external_javascript);
246
+ }
247
+ throw new Error("https://svelte.dev/e/kit/redirect_external_javascript");
248
+ }
249
+ function redirect_external_not_allowed(_values) {
250
+ if (dev_fallback_default || !browser_fallback_default && verbose) {
251
+ throw_error2("redirect_external_not_allowed", `Cannot redirect to external URL \`${_values.location}\`. To redirect to an external URL, pass \`{ external: true }\` or an allowlist of permitted origins as the third argument to \`redirect\``, redirect_external_not_allowed);
252
+ }
253
+ throw new Error("https://svelte.dev/e/kit/redirect_external_not_allowed");
254
+ }
255
+ function redirect_external_not_in_allowlist(_values) {
256
+ if (dev_fallback_default || !browser_fallback_default && verbose) {
257
+ throw_error2("redirect_external_not_in_allowlist", `Cannot redirect to \`${_values.location}\`: URL origin is not included in the \`external\` allowlist`, redirect_external_not_in_allowlist);
258
+ }
259
+ throw new Error("https://svelte.dev/e/kit/redirect_external_not_in_allowlist");
260
+ }
261
+ function redirect_external_option_invalid(_values) {
262
+ if (dev_fallback_default || !browser_fallback_default && verbose) {
263
+ throw_error2("redirect_external_option_invalid", `\`redirect\` \`options.external\` must be \`true\` or an array of allowed origins`, redirect_external_option_invalid);
264
+ }
265
+ throw new Error("https://svelte.dev/e/kit/redirect_external_option_invalid");
266
+ }
267
+
268
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/utils/url.js
269
+ var internal = new URL("a://");
270
+ function matches_external_allowlist_entry(location, allowed) {
271
+ if (location === allowed) return true;
272
+ try {
273
+ const allow = new URL(allowed);
274
+ const loc = new URL(location, allow);
275
+ return loc.protocol === allow.protocol && loc.host === allow.host;
276
+ } catch {
277
+ return false;
278
+ }
279
+ }
280
+
281
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/exports/url.js
282
+ var REDIRECT_BASE = "https://sveltekit-redirect.invalid";
283
+ function is_external_location(location) {
284
+ const origin = get_origin();
285
+ try {
286
+ return !matches_external_allowlist_entry(location, origin ?? REDIRECT_BASE);
287
+ } catch {
288
+ return true;
289
+ }
290
+ }
291
+ var javascript_protocols = /* @__PURE__ */ new Set(["javascript:", "data:"]);
292
+ function is_javascript_location(location) {
293
+ try {
294
+ return javascript_protocols.has(new URL(location, REDIRECT_BASE).protocol);
295
+ } catch {
296
+ return false;
297
+ }
298
+ }
299
+ function validate_redirect_location(location, options) {
300
+ if (!is_external_location(location)) return;
301
+ const external = options?.external;
302
+ if (!external) {
303
+ redirect_external_not_allowed({ location: JSON.stringify(location) });
304
+ }
305
+ if (external === true) {
306
+ if (is_javascript_location(location)) {
307
+ redirect_external_javascript({ location: JSON.stringify(location) });
308
+ }
309
+ return;
310
+ }
311
+ if (Array.isArray(external)) {
312
+ if (!external.some((allowed) => matches_external_allowlist_entry(location, allowed))) {
313
+ redirect_external_not_in_allowlist({ location: JSON.stringify(location) });
314
+ }
315
+ return;
316
+ }
317
+ redirect_external_option_invalid();
318
+ }
319
+
320
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/messages/shared-warnings.js
321
+ function error_body_deprecated(_values) {
322
+ if (dev_fallback_default) {
323
+ console.warn(
324
+ `%c[sveltekit] ${"error_body_deprecated"}
325
+ %c${`Passing an \`App.Error\` body as the second argument is deprecated \u2014 pass the \`message\` as the second argument, and any additional properties as the third`}
326
+ https://svelte.dev/e/kit/${"error_body_deprecated"}`,
327
+ bold,
328
+ normal
329
+ );
330
+ } else {
331
+ console.warn("https://svelte.dev/e/kit/error_body_deprecated");
332
+ }
333
+ }
334
+
335
+ // node_modules/.pnpm/@sveltejs+kit@3.1.1_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_vite@8.3.5_@types+_5f9037060038b4818f2cc347056790f8/node_modules/@sveltejs/kit/src/exports/index.js
336
+ var text_encoder = new TextEncoder();
337
+ function error(status, message, properties) {
338
+ if ((!browser_fallback_default || dev_fallback_default) && (isNaN(status) || status < 400 || status > 599)) {
339
+ invalid_error_status({ status: String(status) });
340
+ }
341
+ if (message !== void 0 && typeof message !== "string") {
342
+ if (dev_fallback_default) {
343
+ error_body_deprecated();
344
+ }
345
+ ({ message, ...properties } = message);
346
+ }
347
+ throw new HttpError({ ...properties, status, message: message ?? `Error: ${status}` });
348
+ }
349
+ function redirect(status, location, options) {
350
+ if ((!browser_fallback_default || dev_fallback_default) && (isNaN(status) || status < 300 || status > 308)) {
351
+ invalid_redirect_status({ status: String(status) });
352
+ }
353
+ const href = location.toString();
354
+ validate_redirect_location(href, options);
355
+ throw new Redirect(
356
+ // @ts-ignore
357
+ status,
358
+ href
359
+ );
360
+ }
361
+ function isRedirect(e) {
362
+ return e instanceof Redirect;
363
+ }
364
+ function json(data, init) {
365
+ const body = JSON.stringify(data);
366
+ const headers = new Headers(init?.headers);
367
+ if (!headers.has("content-length")) {
368
+ headers.set("content-length", text_encoder.encode(body).byteLength.toString());
369
+ }
370
+ if (!headers.has("content-type")) {
371
+ headers.set("content-type", "application/json");
372
+ }
373
+ return new Response(body, {
374
+ ...init,
375
+ headers
376
+ });
377
+ }
378
+ function text(body, init) {
379
+ const headers = new Headers(init?.headers);
380
+ if (!headers.has("content-length")) {
381
+ const encoded = text_encoder.encode(body);
382
+ headers.set("content-length", encoded.byteLength.toString());
383
+ return new Response(encoded, {
384
+ ...init,
385
+ headers
386
+ });
387
+ }
388
+ return new Response(body, {
389
+ ...init,
390
+ headers
391
+ });
392
+ }
393
+
394
+ export {
395
+ HttpError,
396
+ HandledHttpError,
397
+ Redirect,
398
+ SvelteKitError,
399
+ ActionFailure,
400
+ ValidationError,
401
+ with_request_store,
402
+ otel,
403
+ record_span,
404
+ merge_tracing,
405
+ error,
406
+ redirect,
407
+ isRedirect,
408
+ json,
409
+ text
410
+ };