@axium/server 0.18.6 → 0.19.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 (191) hide show
  1. package/build/client/_app/immutable/chunks/BYEtX5Az.js +1 -0
  2. package/build/client/_app/immutable/chunks/BYEtX5Az.js.br +0 -0
  3. package/build/client/_app/immutable/chunks/BYEtX5Az.js.gz +0 -0
  4. package/build/client/_app/immutable/chunks/Cyzk4yeH.js +3 -0
  5. package/build/client/_app/immutable/chunks/Cyzk4yeH.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/Cyzk4yeH.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/{B3bf7yrh.js → DCUM25og.js} +1 -1
  8. package/build/client/_app/immutable/chunks/DCUM25og.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/{B3bf7yrh.js.gz → DCUM25og.js.gz} +0 -0
  10. package/build/client/_app/immutable/chunks/DY1x3fBx.js +1 -0
  11. package/build/client/_app/immutable/chunks/DY1x3fBx.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/DY1x3fBx.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{B4IjTTLF.js → DYZBB-Ix.js} +8 -8
  14. package/build/client/_app/immutable/chunks/DYZBB-Ix.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/DYZBB-Ix.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/FWeOBoAM.js +1 -0
  17. package/build/client/_app/immutable/chunks/FWeOBoAM.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/FWeOBoAM.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/IgiyYk6u.js +1 -0
  20. package/build/client/_app/immutable/chunks/IgiyYk6u.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/IgiyYk6u.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/p-F-zYzk.js +1 -0
  23. package/build/client/_app/immutable/chunks/p-F-zYzk.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/p-F-zYzk.js.gz +0 -0
  25. package/build/client/_app/immutable/entry/app.BOAQU4lu.js +2 -0
  26. package/build/client/_app/immutable/entry/app.BOAQU4lu.js.br +0 -0
  27. package/build/client/_app/immutable/entry/app.BOAQU4lu.js.gz +0 -0
  28. package/build/client/_app/immutable/entry/start.BcxVnXqP.js +1 -0
  29. package/build/client/_app/immutable/entry/start.BcxVnXqP.js.br +2 -0
  30. package/build/client/_app/immutable/entry/start.BcxVnXqP.js.gz +0 -0
  31. package/build/client/_app/immutable/nodes/{0.BbGefPez.js → 0.fU2Fkia3.js} +1 -1
  32. package/build/client/_app/immutable/nodes/0.fU2Fkia3.js.br +0 -0
  33. package/build/client/_app/immutable/nodes/0.fU2Fkia3.js.gz +0 -0
  34. package/build/client/_app/immutable/nodes/1.ebxToP8U.js +1 -0
  35. package/build/client/_app/immutable/nodes/1.ebxToP8U.js.br +0 -0
  36. package/build/client/_app/immutable/nodes/1.ebxToP8U.js.gz +0 -0
  37. package/build/client/_app/immutable/nodes/{2._Jmh03he.js → 2.Cczp5_pl.js} +1 -1
  38. package/build/client/_app/immutable/nodes/2.Cczp5_pl.js.br +0 -0
  39. package/build/client/_app/immutable/nodes/2.Cczp5_pl.js.gz +0 -0
  40. package/build/client/_app/immutable/nodes/3.BwwptDiR.js +1 -0
  41. package/build/client/_app/immutable/nodes/3.BwwptDiR.js.br +0 -0
  42. package/build/client/_app/immutable/nodes/3.BwwptDiR.js.gz +0 -0
  43. package/build/client/_app/immutable/nodes/4.DFZa97F0.js +1 -0
  44. package/build/client/_app/immutable/nodes/4.DFZa97F0.js.br +0 -0
  45. package/build/client/_app/immutable/nodes/4.DFZa97F0.js.gz +0 -0
  46. package/build/client/_app/immutable/nodes/5.CObFvODa.js +1 -0
  47. package/build/client/_app/immutable/nodes/5.CObFvODa.js.br +0 -0
  48. package/build/client/_app/immutable/nodes/5.CObFvODa.js.gz +0 -0
  49. package/build/client/_app/immutable/nodes/6.ezb4muQm.js +1 -0
  50. package/build/client/_app/immutable/nodes/6.ezb4muQm.js.br +0 -0
  51. package/build/client/_app/immutable/nodes/6.ezb4muQm.js.gz +0 -0
  52. package/build/client/_app/version.json +1 -1
  53. package/build/client/_app/version.json.br +0 -0
  54. package/build/client/_app/version.json.gz +0 -0
  55. package/build/server/chunks/{0-CUfr8UwD.js → 0-BwO1RCtn.js} +2 -2
  56. package/build/server/chunks/{0-CUfr8UwD.js.map → 0-BwO1RCtn.js.map} +1 -1
  57. package/build/server/chunks/1-BtBlW1Zd.js +9 -0
  58. package/build/server/chunks/{1-DffE3_iJ.js.map → 1-BtBlW1Zd.js.map} +1 -1
  59. package/build/server/chunks/{2-c1bljkMr.js → 2-BwMXZ3uH.js} +2 -2
  60. package/build/server/chunks/{2-c1bljkMr.js.map → 2-BwMXZ3uH.js.map} +1 -1
  61. package/build/server/chunks/3-DZ3qU23G.js +9 -0
  62. package/build/server/chunks/3-DZ3qU23G.js.map +1 -0
  63. package/build/server/chunks/4-CiYhCg7w.js +9 -0
  64. package/build/server/chunks/4-CiYhCg7w.js.map +1 -0
  65. package/build/server/chunks/5-DeLLDZUB.js +9 -0
  66. package/build/server/chunks/5-DeLLDZUB.js.map +1 -0
  67. package/build/server/chunks/6-WSYEiBK_.js +9 -0
  68. package/build/server/chunks/6-WSYEiBK_.js.map +1 -0
  69. package/build/server/chunks/{Logout-CkwmxNTt.js → Logout-CXx10rDN.js} +4 -5
  70. package/build/server/chunks/Logout-CXx10rDN.js.map +1 -0
  71. package/build/server/chunks/_page.svelte-BBp1dML7.js +11 -0
  72. package/build/server/chunks/{_page.svelte-DPdvFuWg.js.map → _page.svelte-BBp1dML7.js.map} +1 -1
  73. package/build/server/chunks/{_page.svelte-CVJoQAAB.js → _page.svelte-C_AR-luT.js} +4 -5
  74. package/build/server/chunks/_page.svelte-C_AR-luT.js.map +1 -0
  75. package/build/server/chunks/{_page.svelte-whmO3TtB.js → _page.svelte-CrDbYLUc.js} +10 -365
  76. package/build/server/chunks/_page.svelte-CrDbYLUc.js.map +1 -0
  77. package/build/server/chunks/{_page.svelte-D3kXcWlK.js → _page.svelte-Ds-0vPQG.js} +4 -5
  78. package/build/server/chunks/_page.svelte-Ds-0vPQG.js.map +1 -0
  79. package/build/server/chunks/error.svelte-DkJRpKga.js +46 -0
  80. package/build/server/chunks/error.svelte-DkJRpKga.js.map +1 -0
  81. package/build/server/chunks/exports-Cc9yggiy.js +226 -0
  82. package/build/server/chunks/exports-Cc9yggiy.js.map +1 -0
  83. package/build/server/chunks/hooks.server-PyYsuy1-.js +1324 -0
  84. package/build/server/chunks/hooks.server-PyYsuy1-.js.map +1 -0
  85. package/build/server/chunks/{exports-DeY8o0ws.js → index-CBVFb-Fk.js} +2 -223
  86. package/build/server/chunks/index-CBVFb-Fk.js.map +1 -0
  87. package/build/server/chunks/{user-DW-tjDe0.js → schemas-C2VqNPFY.js} +129 -2079
  88. package/build/server/chunks/schemas-C2VqNPFY.js.map +1 -0
  89. package/build/server/chunks/string-CafUlmcI.js +355 -0
  90. package/build/server/chunks/string-CafUlmcI.js.map +1 -0
  91. package/build/server/chunks/user-B61vTdij.js +2078 -0
  92. package/build/server/chunks/user-B61vTdij.js.map +1 -0
  93. package/build/server/index.js +4 -3
  94. package/build/server/index.js.map +1 -1
  95. package/build/server/manifest.js +8 -8
  96. package/build/server/manifest.js.map +1 -1
  97. package/dist/api/acl.js +2 -2
  98. package/dist/api/metadata.js +3 -4
  99. package/dist/api/passkeys.js +1 -2
  100. package/dist/api/register.js +9 -10
  101. package/dist/api/session.js +1 -2
  102. package/dist/api/users.js +11 -12
  103. package/dist/auth.d.ts +1 -1
  104. package/dist/auth.js +1 -2
  105. package/dist/cli.js +2 -2
  106. package/dist/config.d.ts +74 -70
  107. package/dist/config.js +62 -57
  108. package/dist/index.d.ts +1 -1
  109. package/dist/index.js +1 -1
  110. package/dist/requests.d.ts +36 -2
  111. package/dist/requests.js +65 -7
  112. package/dist/routes.d.ts +1 -1
  113. package/dist/serve.d.ts +6 -1
  114. package/dist/serve.js +19 -1
  115. package/dist/sveltekit.d.ts +3 -3
  116. package/dist/sveltekit.js +11 -46
  117. package/package.json +1 -2
  118. package/routes/account/+page.svelte +4 -5
  119. package/svelte.config.js +1 -2
  120. package/web/hooks.server.ts +3 -17
  121. package/web/lib/FormDialog.svelte +4 -5
  122. package/web/lib/Logout.svelte +6 -2
  123. package/web/tsconfig.json +1 -1
  124. package/build/client/_app/immutable/chunks/B3bf7yrh.js.br +0 -0
  125. package/build/client/_app/immutable/chunks/B4IjTTLF.js.br +0 -0
  126. package/build/client/_app/immutable/chunks/B4IjTTLF.js.gz +0 -0
  127. package/build/client/_app/immutable/chunks/BeFE4kE2.js +0 -3
  128. package/build/client/_app/immutable/chunks/BeFE4kE2.js.br +0 -0
  129. package/build/client/_app/immutable/chunks/BeFE4kE2.js.gz +0 -0
  130. package/build/client/_app/immutable/chunks/CtT1TXOG.js +0 -1
  131. package/build/client/_app/immutable/chunks/CtT1TXOG.js.br +0 -0
  132. package/build/client/_app/immutable/chunks/CtT1TXOG.js.gz +0 -0
  133. package/build/client/_app/immutable/chunks/D5lcOOwR.js +0 -1
  134. package/build/client/_app/immutable/chunks/D5lcOOwR.js.br +0 -0
  135. package/build/client/_app/immutable/chunks/D5lcOOwR.js.gz +0 -0
  136. package/build/client/_app/immutable/chunks/DCs3KlJy.js +0 -1
  137. package/build/client/_app/immutable/chunks/DCs3KlJy.js.br +0 -0
  138. package/build/client/_app/immutable/chunks/DCs3KlJy.js.gz +0 -0
  139. package/build/client/_app/immutable/chunks/ct9jA5hl.js +0 -1
  140. package/build/client/_app/immutable/chunks/ct9jA5hl.js.br +0 -0
  141. package/build/client/_app/immutable/chunks/ct9jA5hl.js.gz +0 -0
  142. package/build/client/_app/immutable/chunks/rXU5YtEm.js +0 -1
  143. package/build/client/_app/immutable/chunks/rXU5YtEm.js.br +0 -0
  144. package/build/client/_app/immutable/chunks/rXU5YtEm.js.gz +0 -0
  145. package/build/client/_app/immutable/entry/app.VDao1I0a.js +0 -2
  146. package/build/client/_app/immutable/entry/app.VDao1I0a.js.br +0 -0
  147. package/build/client/_app/immutable/entry/app.VDao1I0a.js.gz +0 -0
  148. package/build/client/_app/immutable/entry/start.CqVn4hZK.js +0 -1
  149. package/build/client/_app/immutable/entry/start.CqVn4hZK.js.br +0 -0
  150. package/build/client/_app/immutable/entry/start.CqVn4hZK.js.gz +0 -0
  151. package/build/client/_app/immutable/nodes/0.BbGefPez.js.br +0 -0
  152. package/build/client/_app/immutable/nodes/0.BbGefPez.js.gz +0 -0
  153. package/build/client/_app/immutable/nodes/1.C3jvF6zj.js +0 -1
  154. package/build/client/_app/immutable/nodes/1.C3jvF6zj.js.br +0 -0
  155. package/build/client/_app/immutable/nodes/1.C3jvF6zj.js.gz +0 -0
  156. package/build/client/_app/immutable/nodes/2._Jmh03he.js.br +0 -0
  157. package/build/client/_app/immutable/nodes/2._Jmh03he.js.gz +0 -0
  158. package/build/client/_app/immutable/nodes/3.C1G23fTe.js +0 -1
  159. package/build/client/_app/immutable/nodes/3.C1G23fTe.js.br +0 -0
  160. package/build/client/_app/immutable/nodes/3.C1G23fTe.js.gz +0 -0
  161. package/build/client/_app/immutable/nodes/4.TQjMBeyV.js +0 -1
  162. package/build/client/_app/immutable/nodes/4.TQjMBeyV.js.br +0 -0
  163. package/build/client/_app/immutable/nodes/4.TQjMBeyV.js.gz +0 -0
  164. package/build/client/_app/immutable/nodes/5.SHyxFZfo.js +0 -1
  165. package/build/client/_app/immutable/nodes/5.SHyxFZfo.js.br +0 -0
  166. package/build/client/_app/immutable/nodes/5.SHyxFZfo.js.gz +0 -0
  167. package/build/client/_app/immutable/nodes/6.ikul5Bcl.js +0 -1
  168. package/build/client/_app/immutable/nodes/6.ikul5Bcl.js.br +0 -0
  169. package/build/client/_app/immutable/nodes/6.ikul5Bcl.js.gz +0 -0
  170. package/build/server/chunks/1-DffE3_iJ.js +0 -9
  171. package/build/server/chunks/3-D6wMMS06.js +0 -9
  172. package/build/server/chunks/3-D6wMMS06.js.map +0 -1
  173. package/build/server/chunks/4-BIBXJVxM.js +0 -9
  174. package/build/server/chunks/4-BIBXJVxM.js.map +0 -1
  175. package/build/server/chunks/5-DnTszr4V.js +0 -9
  176. package/build/server/chunks/5-DnTszr4V.js.map +0 -1
  177. package/build/server/chunks/6-Ls1UJLAz.js +0 -9
  178. package/build/server/chunks/6-Ls1UJLAz.js.map +0 -1
  179. package/build/server/chunks/Logout-CkwmxNTt.js.map +0 -1
  180. package/build/server/chunks/_page.svelte-CVJoQAAB.js.map +0 -1
  181. package/build/server/chunks/_page.svelte-D3kXcWlK.js.map +0 -1
  182. package/build/server/chunks/_page.svelte-DPdvFuWg.js +0 -12
  183. package/build/server/chunks/_page.svelte-whmO3TtB.js.map +0 -1
  184. package/build/server/chunks/client-C5BesWYV.js +0 -33
  185. package/build/server/chunks/client-C5BesWYV.js.map +0 -1
  186. package/build/server/chunks/error.svelte-Crm_85Km.js +0 -24
  187. package/build/server/chunks/error.svelte-Crm_85Km.js.map +0 -1
  188. package/build/server/chunks/exports-DeY8o0ws.js.map +0 -1
  189. package/build/server/chunks/hooks.server-DmgUjoZV.js +0 -17
  190. package/build/server/chunks/hooks.server-DmgUjoZV.js.map +0 -1
  191. package/build/server/chunks/user-DW-tjDe0.js.map +0 -1
@@ -1,9 +1,43 @@
1
1
  import { type User } from '@axium/core/user';
2
- import { type HttpError, type RequestEvent } from '@sveltejs/kit';
2
+ import type { Cookies as SK_Cookies } from '@sveltejs/kit';
3
3
  import * as z from 'zod';
4
4
  import { type UserInternal } from './auth.js';
5
+ import type { ServerRoute } from './routes.js';
6
+ /**
7
+ * @todo
8
+ * Add parsing for Node.js `IncomingMessage` -> standard `Request` and standard `Response` -> Node.js `ServerResponse`
9
+ */
10
+ /**
11
+ * A `Request` with some commonly used stuff pre-parsed for convenience.
12
+ */
13
+ export interface RequestEvent<Params extends Partial<Record<string, string>> = Partial<Record<string, string>>> {
14
+ request: Request;
15
+ url: URL;
16
+ params: Params;
17
+ cookies: SK_Cookies;
18
+ }
19
+ export interface ResponseError extends Error {
20
+ status: number;
21
+ name: 'ResponseError';
22
+ responseMessage?: string;
23
+ }
24
+ export declare function isResponseError(e: unknown): e is ResponseError;
25
+ export declare function error(status: number, message: string): never;
26
+ export interface Redirect {
27
+ location: string;
28
+ status: number;
29
+ }
30
+ export declare function isRedirect(e: unknown): e is Redirect;
31
+ /**
32
+ * Use `Response.redirect` if you can.
33
+ * This should only when `return`ing a `Response` is not possible.
34
+ */
35
+ export declare function redirect(location: string, status?: number): never;
36
+ export declare function json(data: object, init?: ResponseInit): Response;
5
37
  export declare function parseBody<const Schema extends z.ZodType, const Result extends z.infer<Schema> = z.infer<Schema>>(event: RequestEvent, schema: Schema): Promise<Result>;
6
38
  export declare function getToken(event: RequestEvent, sensitive?: boolean): string | undefined;
7
39
  export declare function createSessionData(userId: string, elevated?: boolean): Promise<Response>;
8
40
  export declare function stripUser(user: UserInternal, includeProtected?: boolean): User;
9
- export declare function withError(text: string, code?: number): (e: Error | HttpError) => never;
41
+ export declare function withError(text: string, code?: number): (e: Error | ResponseError) => never;
42
+ export declare function handleAPIRequest(event: RequestEvent, route: ServerRoute): Promise<Response>;
43
+ export declare function handleResponseError(e: Error | ResponseError | Redirect): Response;
package/dist/requests.js CHANGED
@@ -1,20 +1,44 @@
1
1
  import { userProtectedFields, userPublicFields } from '@axium/core/user';
2
- import { error, json } from '@sveltejs/kit';
3
2
  import { serialize as serializeCookie } from 'cookie';
4
3
  import { pick } from 'utilium';
5
4
  import * as z from 'zod';
6
- import { createSession, getSessionAndUser, getUser } from './auth.js';
5
+ import { createSession } from './auth.js';
7
6
  import { config } from './config.js';
7
+ export function isResponseError(e) {
8
+ return e instanceof Error && e.name === 'ResponseError' && typeof e.status === 'number';
9
+ }
10
+ export function error(status, message) {
11
+ const error = Object.assign(new Error(message), { status });
12
+ error.name = 'ResponseError';
13
+ throw error;
14
+ }
15
+ export function isRedirect(e) {
16
+ return typeof e === 'object' && e !== null && 'location' in e && 'status' in e;
17
+ }
18
+ /**
19
+ * Use `Response.redirect` if you can.
20
+ * This should only when `return`ing a `Response` is not possible.
21
+ */
22
+ export function redirect(location, status = 302) {
23
+ throw { location, status };
24
+ }
25
+ export function json(data, init) {
26
+ const response = Response.json(data, init);
27
+ if (!response.headers.has('content-length')) {
28
+ response.headers.set('content-length', JSON.stringify(data).length.toString());
29
+ }
30
+ return response;
31
+ }
8
32
  export async function parseBody(event, schema) {
9
33
  const contentType = event.request.headers.get('content-type');
10
34
  if (!contentType || !contentType.includes('application/json'))
11
- error(415, { message: 'Invalid content type' });
12
- const body = await event.request.json().catch(() => error(415, { message: 'Invalid JSON' }));
35
+ error(415, 'Invalid content type');
36
+ const body = await event.request.json().catch(() => error(415, 'Invalid JSON'));
13
37
  try {
14
38
  return schema.parse(body);
15
39
  }
16
40
  catch (e) {
17
- error(400, { message: z.prettifyError(e) });
41
+ error(400, z.prettifyError(e));
18
42
  }
19
43
  }
20
44
  export function getToken(event, sensitive = false) {
@@ -43,8 +67,42 @@ export function stripUser(user, includeProtected = false) {
43
67
  }
44
68
  export function withError(text, code = 500) {
45
69
  return function (e) {
46
- if ('body' in e)
70
+ if (e.name == 'ResponseError')
47
71
  throw e;
48
- error(code, { message: text + (config.debug && e.message ? `: ${e.message}` : '') });
72
+ error(code, text + (config.debug && e.message ? `: ${e.message}` : ''));
49
73
  };
50
74
  }
75
+ export async function handleAPIRequest(event, route) {
76
+ const method = event.request.method;
77
+ const _warnings = [];
78
+ if (route.api && !event.request.headers.get('Accept')?.includes('application/json')) {
79
+ _warnings.push('Only application/json is supported');
80
+ event.request.headers.set('Accept', 'application/json');
81
+ }
82
+ for (const [key, type] of Object.entries(route.params || {})) {
83
+ if (!type)
84
+ continue;
85
+ try {
86
+ event.params[key] = type.parse(event.params[key]);
87
+ }
88
+ catch (e) {
89
+ error(400, `Invalid parameter: ${z.prettifyError(e)}`);
90
+ }
91
+ }
92
+ if (typeof route[method] != 'function')
93
+ error(405, `Method ${method} not allowed for ${route.path}`);
94
+ const result = await route[method](event);
95
+ if (result instanceof Response)
96
+ return result;
97
+ result._warnings ||= [];
98
+ result._warnings.push(..._warnings);
99
+ return json(result);
100
+ }
101
+ export function handleResponseError(e) {
102
+ if (isResponseError(e))
103
+ return json({ message: e.message }, { status: e.status });
104
+ if (isRedirect(e))
105
+ return Response.redirect(e.location, e.status);
106
+ console.error(e);
107
+ return json({ message: 'Internal Error' + (config.debug ? ': ' + e.message : '') }, { status: 500 });
108
+ }
package/dist/routes.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { RequestMethod } from '@axium/core/requests';
2
- import type { RequestEvent } from '@sveltejs/kit';
3
2
  import type { Component } from 'svelte';
4
3
  import type z from 'zod';
4
+ import type { RequestEvent } from './requests.js';
5
5
  type _Params = Partial<Record<string, string>>;
6
6
  type MaybePromise<T> = T | Promise<T>;
7
7
  export type EndpointHandlers<Params extends _Params = _Params> = Partial<Record<RequestMethod, (event: RequestEvent<Params>) => MaybePromise<object | Response>>>;
package/dist/serve.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import type { Server } from 'node:http';
2
+ import '@axium/server/api/index';
2
3
  export interface ServeOptions {
3
4
  secure: boolean;
4
5
  ssl_key: string;
5
6
  ssl_cert: string;
6
7
  build: string;
7
8
  }
8
- export declare function serve(opt: Partial<ServeOptions>): Promise<Server>;
9
+ export declare function serveSvelteKit(opt: Partial<ServeOptions>): Promise<Server>;
10
+ /**
11
+ * Perform initial setup for when the server is serving web pages.
12
+ */
13
+ export declare function init(): Promise<void>;
package/dist/serve.js CHANGED
@@ -2,9 +2,27 @@ import { readFileSync } from 'node:fs';
2
2
  import { createServer } from 'node:http';
3
3
  import { createServer as createSecureServer } from 'node:https';
4
4
  import config from './config.js';
5
- export async function serve(opt) {
5
+ import '@axium/server/api/index';
6
+ import { loadDefaultConfigs } from '@axium/server/config';
7
+ import { clean, connect, database } from '@axium/server/database';
8
+ import { dirs, logger } from '@axium/server/io';
9
+ import { allLogLevels } from 'logzen';
10
+ import { createWriteStream } from 'node:fs';
11
+ import { join } from 'node:path/posix';
12
+ export async function serveSvelteKit(opt) {
6
13
  const { handler } = await import(opt.build || config.web.build);
7
14
  if (!opt.secure && !config.web.secure)
8
15
  return createServer(handler);
9
16
  return createSecureServer({ key: readFileSync(opt.ssl_key || config.web.ssl_key), cert: readFileSync(opt.ssl_cert || config.web.ssl_cert) }, handler);
10
17
  }
18
+ /**
19
+ * Perform initial setup for when the server is serving web pages.
20
+ */
21
+ export async function init() {
22
+ logger.attach(createWriteStream(join(dirs.at(-1), 'server.log')), { output: allLogLevels });
23
+ await loadDefaultConfigs();
24
+ connect();
25
+ await clean({});
26
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
27
+ process.on('beforeExit', () => database.destroy());
28
+ }
@@ -1,8 +1,8 @@
1
- import type { RequestEvent, ResolveOptions } from '@sveltejs/kit';
1
+ import { type RequestEvent } from './requests.js';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export declare function handle({ event, resolve, }: {
5
+ export declare function handleSvelteKit({ event, resolve, }: {
6
6
  event: RequestEvent;
7
- resolve: (event: RequestEvent, opts?: ResolveOptions) => Promise<Response>;
7
+ resolve: (event: RequestEvent, opts?: unknown) => Promise<Response>;
8
8
  }): Promise<Response>;
package/dist/sveltekit.js CHANGED
@@ -1,69 +1,34 @@
1
- import { error, json } from '@sveltejs/kit';
2
1
  import { readFileSync } from 'node:fs';
3
2
  import { styleText } from 'node:util';
4
3
  import { render } from 'svelte/server';
5
- import * as z from 'zod';
6
4
  import { config } from './config.js';
5
+ import { error, handleAPIRequest, handleResponseError, json } from './requests.js';
7
6
  import { resolveRoute } from './routes.js';
8
- async function handleAPIRequest(event, route) {
9
- const method = event.request.method;
10
- const _warnings = [];
11
- if (route.api && !event.request.headers.get('Accept')?.includes('application/json')) {
12
- _warnings.push('Only application/json is supported');
13
- event.request.headers.set('Accept', 'application/json');
14
- }
15
- for (const [key, type] of Object.entries(route.params || {})) {
16
- if (!type)
17
- continue;
18
- try {
19
- event.params[key] = type.parse(event.params[key]);
20
- }
21
- catch (e) {
22
- error(400, `Invalid parameter: ${z.prettifyError(e)}`);
23
- }
24
- }
25
- if (typeof route[method] != 'function')
26
- error(405, `Method ${method} not allowed for ${route.path}`);
27
- const result = await route[method](event);
28
- if (result instanceof Response)
29
- return result;
30
- result._warnings ||= [];
31
- result._warnings.push(..._warnings);
32
- return json(result);
33
- }
34
- function handleError(e) {
35
- if ('body' in e)
36
- return json(e.body, { status: e.status });
37
- if ('location' in e)
38
- return Response.redirect(e.location, e.status);
39
- console.error(e);
40
- return json({ message: 'Internal Error' + (config.debug ? ': ' + e.message : '') }, { status: 500 });
41
- }
42
7
  let template = null;
43
- function fillTemplate({ head, body }, env = {}, nonce = '') {
8
+ function fillSvelteKitTemplate({ head, body }, env = {}, nonce = '') {
44
9
  template ||= readFileSync(config.web.template, 'utf-8');
45
10
  return (template
46
- .replace('%sveltekit.head%', head)
47
- .replace('%sveltekit.body%', body)
48
- .replace(/%sveltekit\.assets%/g, config.web.assets)
11
+ .replaceAll('%sveltekit.head%', head)
12
+ .replaceAll('%sveltekit.body%', body)
13
+ .replaceAll('%sveltekit.assets%', config.web.assets)
49
14
  // Unused for now.
50
- .replace(/%sveltekit\.nonce%/g, nonce)
15
+ .replaceAll('%sveltekit.nonce%', nonce)
51
16
  .replace(/%sveltekit\.env\.([^%]+)%/g, (_match, key) => env[key] ?? ''));
52
17
  }
53
18
  /**
54
19
  * @internal
55
20
  */
56
- export async function handle({ event, resolve, }) {
21
+ export async function handleSvelteKit({ event, resolve, }) {
57
22
  const route = resolveRoute(event);
58
23
  if (!route && event.url.pathname === '/' && config.debug)
59
24
  return new Response(null, { status: 303, headers: { Location: '/_axium/default' } });
60
25
  if (config.debug)
61
26
  console.log(styleText('blueBright', event.request.method.padEnd(7)), route ? route.path : event.url.pathname);
62
27
  if (!route)
63
- return await resolve(event).catch(handleError);
28
+ return await resolve(event).catch(handleResponseError);
64
29
  if (route.server == true) {
65
30
  if (route.api)
66
- return await handleAPIRequest(event, route).catch(handleError);
31
+ return await handleAPIRequest(event, route).catch(handleResponseError);
67
32
  const run = route[event.request.method];
68
33
  if (typeof run !== 'function') {
69
34
  error(405, `Method ${event.request.method} not allowed for ${route.path}`);
@@ -75,11 +40,11 @@ export async function handle({ event, resolve, }) {
75
40
  return json(result);
76
41
  }
77
42
  catch (e) {
78
- return handleError(e);
43
+ return handleResponseError(e);
79
44
  }
80
45
  }
81
46
  const data = await route.load?.(event);
82
- const body = fillTemplate(render(route.page));
47
+ const body = fillSvelteKitTemplate(render(route.page));
83
48
  return new Response(body, {
84
49
  headers: config.web.disable_cache
85
50
  ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.18.6",
3
+ "version": "0.19.0",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -49,7 +49,6 @@
49
49
  "zod": "^4.0.5"
50
50
  },
51
51
  "dependencies": {
52
- "@axium/server": "file:.",
53
52
  "@simplewebauthn/server": "^13.1.1",
54
53
  "@sveltejs/kit": "^2.23.0",
55
54
  "@types/pg": "^8.11.11",
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import { goto } from '$app/navigation';
3
2
  import { ClipboardCopy, FormDialog, Icon, Logout } from '$lib';
4
3
  import {
5
4
  createPasskey,
@@ -29,7 +28,7 @@
29
28
 
30
29
  async function ready() {
31
30
  currentSession = await getCurrentSession().catch(() => {
32
- goto('/login?after=/account');
31
+ window.location.href = '/login?after=/account';
33
32
  return null;
34
33
  })!;
35
34
  user = currentSession.user;
@@ -111,7 +110,7 @@
111
110
  <Logout bind:dialog={dialogs.logout} />
112
111
  <FormDialog
113
112
  bind:dialog={dialogs.delete}
114
- submit={() => deleteUser(user.id).then(() => goto('/'))}
113
+ submit={() => deleteUser(user.id).then(() => (window.location.href = '/'))}
115
114
  submitText="Delete Account"
116
115
  submitDanger
117
116
  >
@@ -196,7 +195,7 @@
196
195
  await logout(user.id, session.id);
197
196
  dialogs['logout#' + session.id].remove();
198
197
  sessions.splice(sessions.indexOf(session), 1);
199
- if (session.id == currentSession.id) goto('/');
198
+ if (session.id == currentSession.id) window.location.href = '/';
200
199
  }}
201
200
  submitText="Logout"
202
201
  >
@@ -208,7 +207,7 @@
208
207
  </span>
209
208
  <FormDialog
210
209
  bind:dialog={dialogs['logout_all']}
211
- submit={() => logoutAll(user.id).then(() => goto('/'))}
210
+ submit={() => logoutAll(user.id).then(() => (window.location.href = '/'))}
212
211
  submitText="Logout All Sessions"
213
212
  submitDanger
214
213
  >
package/svelte.config.js CHANGED
@@ -19,12 +19,11 @@ export default {
19
19
  },
20
20
  preprocess: vitePreprocess({ script: true }),
21
21
  vitePlugin: {
22
- exclude: '@axium/**',
22
+ exclude: '@axium/server/**',
23
23
  },
24
24
  kit: {
25
25
  adapter: node(),
26
26
  alias: {
27
- $stores: fixed('web/stores'),
28
27
  $lib: fixed('web/lib'),
29
28
  },
30
29
  files: {
@@ -1,18 +1,4 @@
1
- import '@axium/server/api/index';
2
- import { loadDefaultConfigs } from '@axium/server/config';
3
- import { clean, connect, database } from '@axium/server/database';
4
- import { dirs, logger } from '@axium/server/io';
5
- import { allLogLevels } from 'logzen';
6
- import { createWriteStream } from 'node:fs';
7
- import { join } from 'node:path/posix';
1
+ import { init } from '@axium/server/serve';
2
+ await init();
8
3
 
9
- logger.attach(createWriteStream(join(dirs.at(-1), 'server.log')), { output: allLogLevels });
10
- await loadDefaultConfigs();
11
- connect();
12
- await clean({});
13
-
14
- process.on('beforeExit', async () => {
15
- await database.destroy();
16
- });
17
-
18
- export { handle } from '@axium/server/sveltekit';
4
+ export { handleSvelteKit as handle } from '@axium/server/sveltekit';
@@ -1,11 +1,10 @@
1
1
  <script lang="ts">
2
- import { goto } from '$app/navigation';
3
- import { page } from '$app/state';
4
2
  import Dialog from './Dialog.svelte';
5
3
 
6
4
  function resolveRedirectAfter() {
7
- const maybe = page.url.searchParams.get('after');
8
- if (!maybe || maybe == page.url.pathname) return '/';
5
+ const url = new URL(location.href);
6
+ const maybe = url.searchParams.get('after');
7
+ if (!maybe || maybe == url.pathname) return '/';
9
8
  for (const prefix of ['/api/']) if (maybe.startsWith(prefix)) return '/';
10
9
  return maybe || '/';
11
10
  }
@@ -53,7 +52,7 @@
53
52
  const data = Object.fromEntries(new FormData(e.currentTarget));
54
53
  submit(data)
55
54
  .then(result => {
56
- if (pageMode) goto(resolveRedirectAfter());
55
+ if (pageMode) window.location.href = resolveRedirectAfter();
57
56
  else dialog.close();
58
57
  })
59
58
  .catch((e: unknown) => {
@@ -1,12 +1,16 @@
1
1
  <script lang="ts">
2
- import { goto } from '$app/navigation';
3
2
  import { logoutCurrentSession } from '@axium/client/user';
4
3
  import FormDialog from './FormDialog.svelte';
5
4
 
6
5
  let { dialog = $bindable(), fullPage = false }: { dialog?: HTMLDialogElement; fullPage?: boolean } = $props();
7
6
  </script>
8
7
 
9
- <FormDialog pageMode={fullPage} bind:dialog submitText="Log Out" submit={() => logoutCurrentSession().then(() => goto('/'))}>
8
+ <FormDialog
9
+ pageMode={fullPage}
10
+ bind:dialog
11
+ submitText="Log Out"
12
+ submit={() => logoutCurrentSession().then(() => (window.location.href = '/'))}
13
+ >
10
14
  <p>Are you sure you want to log out?</p>
11
15
  {#if fullPage}
12
16
  <button
package/web/tsconfig.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "target": "ES2023",
5
5
  "lib": ["ESNext", "DOM", "DOM.Iterable"]
6
6
  },
7
- "include": ["./**/*", "../lib"]
7
+ "include": ["./**/*"]
8
8
  }
@@ -1,3 +0,0 @@
1
- import{o as Be,g as yt}from"./D5lcOOwR.js";import{n as me,aZ as wt,ax as T,N as x,Q as P}from"./B3bf7yrh.js";const q=[];function Re(e,t=me){let n=null;const r=new Set;function a(o){if(wt(e,o)&&(e=o,n)){const c=!q.length;for(const l of r)l[1](),q.push(l,e);if(c){for(let l=0;l<q.length;l+=2)q[l][0](q[l+1]);q.length=0}}}function s(o){a(o(e))}function i(o,c=me){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,s)||me),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:s,subscribe:i}}class fe{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Ie{constructor(t,n){this.status=t,this.location=n}}class Ue extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function bt(e){return e.split("%25").map(decodeURI).join("%25")}function kt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}function At(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function St(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Et(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&H.delete(Le(e)),Rt(e,t));const H=new Map;function It(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&H.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Et(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Ut(e,t,n){if(H.size>0){const r=Le(e,n),a=H.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);H.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${St(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Tt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Pt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return we(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return we(String.fromCharCode(...c.slice(2).split("-").map(m=>parseInt(m,16))));const d=Lt.exec(c),[,h,u,f,p]=d;return t.push({name:f,matcher:p,optional:!!h,rest:!!u,chained:u?l===1&&i[0]==="":!1}),u?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return we(c)}).join("")}).join("")}/?$`),params:t}}function xt(e){return!/^\([^)]+\)$/.test(e)}function Pt(e){return e.slice(1).split("/").filter(xt)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(d=>d).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],h=a[o+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function we(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:h,params:u}=Tt(o),f={id:o,exec:p=>{const m=h.exec(p);if(m)return Ct(m,u,r)},errors:[1,...d||[]].map(p=>e[p]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function Je(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Fe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_1k8tjlq?.base??"",Ot=globalThis.__sveltekit_1k8tjlq?.assets??U,jt="1753739247777",Xe="sveltekit:snapshot",Ze="sveltekit:scroll",Qe="sveltekit:states",$t="sveltekit:pageurl",F="sveltekit:history",z="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Q=location.origin;function Te(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ue(){return{x:pageXOffset,y:pageYOffset}}function B(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function et(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function tt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=et(e)}}function ke(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||de(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=r?.origin===Q&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ne(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),t===null&&(t=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=et(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Me(e){const t=Re(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const nt={v:()=>{}};function Dt(){const{set:e,subscribe:t}=Re(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==jt;return i&&(e(!0),nt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function de(e,t,n){return e.origin!==Q||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function An(e){}function Ge(e){const t=Bt(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Bt(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=qt.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const Ft=-1,Vt=-2,Mt=-3,Gt=-4,Ht=-5,Kt=-6;function Wt(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===Ft)return;if(s===Mt)return NaN;if(s===Gt)return 1/0;if(s===Ht)return-1/0;if(s===Kt)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t?.[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const d=new Set;r[s]=d;for(let f=1;f<o.length;f+=1)d.add(a(o[f]));break;case"Map":const h=new Map;r[s]=h;for(let f=1;f<o.length;f+=2)h.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const u=Object.create(null);r[s]=u;for(let f=1;f<o.length;f+=2)u[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],p=o[1],m=Ge(p),_=new f(m);r[s]=_;break}case"ArrayBuffer":{const f=o[1],p=Ge(f);r[s]=p;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const d=o[l];d!==Vt&&(c[l]=a(d))}}else{const c={};r[s]=c;for(const l in o){const d=o[l];c[l]=a(d)}}return r[s]}return a(0)}const rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...rt];const Yt=new Set([...rt]);[...Yt];function zt(e){return e.filter(t=>t!=null)}const Jt="x-sveltekit-invalidated",Xt="x-sveltekit-trailing-slash";function re(e){return e instanceof fe||e instanceof Ue?e.status:500}function Zt(e){return e instanceof Ue?e.text:"Internal Error"}let S,J,ve;const Qt=Be.toString().includes("$$")||/function \w+\(\) \{\}/.test(Be.toString());Qt?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},J={current:null},ve={current:!1}):(S=new class{#e=T({});get data(){return x(this.#e)}set data(t){P(this.#e,t)}#t=T(null);get form(){return x(this.#t)}set form(t){P(this.#t,t)}#n=T(null);get error(){return x(this.#n)}set error(t){P(this.#n,t)}#r=T({});get params(){return x(this.#r)}set params(t){P(this.#r,t)}#a=T({id:null});get route(){return x(this.#a)}set route(t){P(this.#a,t)}#o=T({});get state(){return x(this.#o)}set state(t){P(this.#o,t)}#s=T(-1);get status(){return x(this.#s)}set status(t){P(this.#s,t)}#i=T(new URL("https://example.com"));get url(){return x(this.#i)}set url(t){P(this.#i,t)}},J=new class{#e=T(null);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=T(!1);get current(){return x(this.#e)}set current(t){P(this.#e,t)}},nt.v=()=>ve.current=!0);function en(e){Object.assign(S,e)}const tn="/__data.json",nn=".html__data.json";function rn(e){return e.endsWith(".html")?e.replace(/\.html$/,nn):e.replace(/\/$/,"")+tn}const{tick:an}=yt,on=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Je(Ze)??{},X=Je(Xe)??{},O={url:Me({}),page:Me({}),navigating:Re(null),updated:Dt()};function xe(e){D[e]=ue()}function sn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function M(e){return location.href=e.href,new Promise(()=>{})}async function at(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function He(){}let Pe,Ae,ae,C,Se,v;const oe=[],se=[];let N=null;const te=new Map,ot=new Set,cn=new Set,K=new Set;let w={branch:[],error:null,url:null},Ce=!1,ie=!1,Ke=!0,Z=!1,G=!1,st=!1,Ne=!1,it,k,I,$;const W=new Set;async function In(e,t,n){document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Pe=Nt(e),C=document.documentElement,Se=t,Ae=e.nodes[0],ae=e.nodes[1],Ae(),ae(),k=history.state?.[F],I=history.state?.[z],k||(k=I=Date.now(),history.replaceState({...history.state,[F]:k,[z]:I},""));const r=D[k];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await yn(Se,n)):(await Y({type:"enter",url:Te(v.hash?vn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function ln(){oe.length=0,Ne=!1}function ct(e){se.some(t=>t?.snapshot)&&(X[e]=se.map(t=>t?.snapshot?.capture()))}function lt(e){X[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function We(){xe(k),Fe(Ze,D),ct(I),Fe(Xe,X)}async function Oe(e,t,n,r){return Y({type:"goto",url:Te(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ne=!0),t.invalidate&&t.invalidate.forEach(_n)}})}async function fn(e){if(e.id!==N?.id){const t={};W.add(t),N={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(W.delete(t),n.type==="loaded"&&n.state.error&&(N=null),n))}}return N.promise}async function be(e){const t=(await pe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}function ft(e,t,n){w=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(S,e.props.page),it=new v.root({target:t,props:{...e.props,stores:O,components:se},hydrate:n,sync:!1}),lt(I),n){const a={from:null,to:{params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};K.forEach(s=>s(a))}ie=!0}function ce({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(U&&(e.pathname===U||e.pathname===U+"/"))o="always";else for(const f of n)f?.slash!==void 0&&(o=f.slash);e.pathname=vt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:zt(n).map(f=>f.node.component),page:qe(S)}};i!==void 0&&(c.props.form=i);let l={},d=!S,h=0;for(let f=0;f<Math.max(n.length,w.branch.length);f+=1){const p=n[f],m=w.branch[f];p?.data!==m?.data&&(d=!0),p&&(l={...l,...p.data},d&&(c.props[`data_${h}`]=l),h+=1)}return(!w.url||e.href!==w.url.href||w.error!==a||i!==void 0&&i!==S.form||d)&&(c.props.page={error:a,params:t,route:{id:s?.id??null},state:{},status:r,url:new URL(e),form:i??null,data:d?l:S.data}),c}async function je({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){let d=function(...u){for(const f of u){const{href:p}=new URL(f,n);c.dependencies.add(p)}};const h={route:new Proxy(a,{get:(u,f)=>(o&&(c.route=!0),u[f])}),params:new Proxy(r,{get:(u,f)=>(o&&c.params.add(f),u[f])}),data:s?.data??null,url:At(n,()=>{o&&(c.url=!0)},u=>{o&&c.search_params.add(u)},v.hash),async fetch(u,f){u instanceof Request&&(f={body:u.method==="GET"||u.method==="HEAD"?void 0:await u.blob(),cache:u.cache,credentials:u.credentials,headers:[...u.headers].length>0?u?.headers:void 0,integrity:u.integrity,keepalive:u.keepalive,method:u.method,mode:u.mode,redirect:u.redirect,referrer:u.referrer,referrerPolicy:u.referrerPolicy,signal:u.signal,...f});const{resolved:p,promise:m}=ut(u,f,n);return o&&d(p.href),m},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(u){o=!1;try{return u()}finally{o=!0}}};i=await l.universal.load.call(null,h)??null}return{node:l,loader:e,server:s,universal:l.universal?.load?{type:"data",data:i,uses:c}:null,data:i??s?.data??null,slash:l.universal?.trailingSlash??s?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=ie?Ut(r,a.href,t):It(r,t);return{resolved:a,promise:s}}function Ye(e,t,n,r,a,s){if(Ne)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(oe.some(o=>o(new URL(i))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function un(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ze({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:qe(S),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(N?.id===e)return W.delete(N.token),N.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g?.().catch(()=>{})),l.forEach(g=>g?.[1]().catch(()=>{}));let d=null;const h=w.url?e!==le(w.url):!1,u=w.route?a.id!==w.route.id:!1,f=un(w.url,n);let p=!1;const m=l.map((g,y)=>{const b=w.branch[y],A=!!g?.[0]&&(b?.loader!==g[1]||Ye(p,u,h,f,b.server?.uses,r));return A&&(p=!0),A});if(m.some(Boolean)){try{d=await gt(n,m)}catch(g){const y=await V(g,{url:n,params:r,route:{id:e}});return W.has(s)?ze({error:y,url:n,params:r,route:a}):he({status:re(g),error:y,url:n,route:a})}if(d.type==="redirect")return d}const _=d?.nodes;let R=!1;const E=l.map(async(g,y)=>{if(!g)return;const b=w.branch[y],A=_?.[y];if((!A||A.type==="skip")&&g[1]===b?.loader&&!Ye(R,u,h,f,b.universal?.uses,r))return b;if(R=!0,A?.type==="error")throw A;return je({loader:g[1],url:n,params:r,route:a,parent:async()=>{const ge={};for(let _e=0;_e<y;_e+=1)Object.assign(ge,(await E[_e])?.data);return ge},server_data_node:$e(A===void 0&&g[0]?{type:"skip"}:A??null,g[0]?b?.server:void 0)})});for(const g of E)g.catch(()=>{});const L=[];for(let g=0;g<l.length;g+=1)if(l[g])try{L.push(await E[g])}catch(y){if(y instanceof Ie)return{type:"redirect",location:y.location};if(W.has(s))return ze({error:await V(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=re(y),A;if(_?.includes(y))b=y.status??b,A=y.error;else if(y instanceof fe)A=y.body;else{if(await O.updated.check())return await at(),await M(n);A=await V(y,{params:r,url:n,route:{id:a.id}})}const ee=await dn(g,L,i);return ee?ce({url:n,params:r,branch:L.slice(0,ee.idx).concat(ee.node),status:b,error:A,route:a}):await pt(n,{id:a.id},A,b)}else L.push(void 0);return ce({url:n,params:r,branch:L,status:200,error:null,route:a,form:t?void 0:null})}async function dn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function he({status:e,error:t,url:n,route:r}){const a={};let s=null;if(v.server_loads[0]===0)try{const o=await gt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==Q||n.pathname!==location.pathname||Ce)&&await M(n)}try{const o=await je({loader:Ae,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(s)}),c={node:await ae(),loader:ae,universal:null,server:null,data:null};return ce({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Ie)return Oe(new URL(o.location,location.href),{},0);throw o}}async function hn(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(s,i)=>ut(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);v.hash?s.hash=a:s.pathname=a,a=s}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function pe(e,t){if(e&&!de(e,U,v.hash)){const n=await hn(e);if(!n)return;const r=pn(n);for(const a of Pe){const s=a.exec(r);if(s)return{id:le(e),invalidating:t,route:a,params:kt(s),url:e}}}}function pn(e){return bt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function le(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r}){let a=!1;const s=De(w,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Z||ot.forEach(o=>o(i)),a?null:s}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=He,block:d=He}){const h=$;$=c;const u=await pe(t,!1),f=e==="enter"?De(w,u,t,e):ht({url:t,type:e,delta:n?.delta,intent:u});if(!f){d(),$===c&&($=h);return}const p=k,m=I;l(),Z=!0,ie&&f.navigation.type!=="enter"&&O.navigating.set(J.current=f.navigation);let _=u&&await dt(u);if(!_){if(de(t,U,v.hash))return await M(t);_=await pt(t,{id:null},await V(new Ue(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=u?.url||t,$!==c)return f.reject(new Error("navigation aborted")),!1;if(_.type==="redirect")if(o>=20)_=await he({status:500,error:await V(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Oe(new URL(_.location,t).href,{},o+1,c),!1;else _.props.page.status>=400&&await O.updated.check()&&(await at(),await M(t));if(ln(),xe(p),ct(m),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,y={[F]:k+=g,[z]:I+=g,[Qe]:i};(s?history.replaceState:history.pushState).call(history,y,"",t),s||sn(k,I)}if(N=null,_.props.page.state=i,ie){w=_.state,_.props.page&&(_.props.page.url=t);const g=(await Promise.all(Array.from(cn,y=>y(f.navigation)))).filter(y=>typeof y=="function");if(g.length>0){let y=function(){g.forEach(b=>{K.delete(b)})};g.push(y),g.forEach(b=>{K.add(b)})}it.$set(_.props),en(_.props.page),st=!0}else ft(_,Se,!1);const{activeElement:R}=document;await an();const E=n?n.scroll:a?ue():null;if(Ke){const g=t.hash&&document.getElementById(mt(t));E?scrollTo(E.x,E.y):g?g.scrollIntoView():scrollTo(0,0)}const L=document.activeElement!==R&&document.activeElement!==document.body;!r&&!L&&wn(t),Ke=!0,_.props.page&&Object.assign(S,_.props.page),Z=!1,e==="popstate"&&lt(I),f.fulfil(void 0),K.forEach(g=>g(f.navigation)),O.navigating.set(J.current=null)}async function pt(e,t,n,r){return e.origin===Q&&e.pathname===location.pathname&&!Ce?await he({status:r,error:n,url:e,route:t}):await M(e)}function gn(){let e,t,n;C.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],j.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(be(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=tt(o,C),d=l===t&&c>=n;if(!l||d)return;const{url:h,external:u,download:f}=ke(l,U,v.hash);if(u||f)return;const p=ne(l),m=h&&le(w.url)===le(h);if(!(p.reload||m))if(c<=p.preload_data){t=l,n=j.tap;const _=await pe(h,!1);if(!_)return;fn(_)}else c<=p.preload_code&&(t=l,n=c,be(h))}function i(){a.disconnect();for(const o of C.querySelectorAll("a")){const{url:c,external:l,download:d}=ke(o,U,v.hash);if(l||d)continue;const h=ne(o);h.reload||(h.preload_code===j.viewport&&a.observe(o),h.preload_code===j.eager&&be(c))}}K.add(i),i()}function V(e,t){if(e instanceof fe)return e.body;const n=re(e),r=Zt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Un(e,t={}){return e=new URL(Te(e)),e.origin!==Q?Promise.reject(new Error("goto: invalid URL")):Oe(e,t,0)}function _n(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function mn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!Z){const r=De(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};ot.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||gn(),C.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=tt(t.composedPath()[0],C);if(!n)return;const{url:r,external:a,target:s,download:i}=ke(n,U,v.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||i)return;const[l,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),h=l===ye(location);if(a||o.reload&&(!h||!d)){ht({url:r,type:"link"})?Z=!0:t.preventDefault();return}if(d!==void 0&&h){const[,u]=w.url.href.split("#");if(u===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const f=n.ownerDocument.getElementById(decodeURIComponent(d));f&&(f.scrollIntoView(),f.focus())}return}if(G=!0,xe(k),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),await Y({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href})}),C.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const i=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(de(i,U,!1))return;const o=t.target,c=ne(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(o),d=r?.getAttribute("name");d&&l.append(d,r?.getAttribute("value")??""),i.search=new URLSearchParams(l).toString(),Y({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href})}),addEventListener("popstate",async t=>{if(!Ee){if(t.state?.[F]){const n=t.state[F];if($={},n===k)return;const r=D[n],a=t.state[Qe]??{},s=new URL(t.state[$t]??location.href),i=t.state[z],o=w.url?ye(location)===ye(w.url):!1;if(i===I&&(st||o)){a!==S.state&&(S.state=a),e(s),D[k]=ue(),r&&scrollTo(r.x,r.y),k=n;return}const l=n-k;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:l},accept:()=>{k=n,I=i},block:()=>{history.go(-l)},nav_token:$})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[F]:++k,[z]:I},"",location.href))});for(const t of document.querySelectorAll("link"))on.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&O.navigating.set(J.current=null)});function e(t){w.url=S.url=t,O.page.set(qe(S)),O.page.notify()}}async function yn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Ce=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await pe(l,!1)||{}),d=Pe.find(({id:f})=>f===s.id);let h,u=!0;try{const f=r.map(async(m,_)=>{const R=o[_];return R?.uses&&(R.uses=_t(R.uses)),je({loader:v.nodes[m],url:l,params:a,route:s,parent:async()=>{const E={};for(let L=0;L<_;L+=1)Object.assign(E,(await f[L]).data);return E},server_data_node:$e(R)})}),p=await Promise.all(f);if(d){const m=d.layouts;for(let _=0;_<m.length;_++)m[_]||p.splice(_,0,void 0)}h=ce({url:l,params:a,branch:p,status:t,error:n,form:c,route:d??null})}catch(f){if(f instanceof Ie){await M(new URL(f.location,location.href));return}h=await he({status:re(f),error:await V(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",u=!1}h.props.page&&(h.props.page.state={}),ft(h,e,u)}async function gt(e,t){const n=new URL(e);n.pathname=rn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(Xt,"1"),n.searchParams.append(Jt,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new fe(a.status,s)}return new Promise(async s=>{const i=new Map,o=a.body.getReader(),c=new TextDecoder;function l(h){return Wt(h,{...v.decoders,Promise:u=>new Promise((f,p)=>{i.set(u,{fulfil:f,reject:p})})})}let d="";for(;;){const{done:h,value:u}=await o.read();if(h&&!d)break;for(d+=!u&&d?`
2
- `:c.decode(u,{stream:!0});;){const f=d.indexOf(`
3
- `);if(f===-1)break;const p=JSON.parse(d.slice(0,f));if(d=d.slice(f+1),p.type==="redirect")return s(p);if(p.type==="data")p.nodes?.forEach(m=>{m?.type==="data"&&(m.uses=_t(m.uses),m.data=l(m.data))}),s(p);else if(p.type==="chunk"){const{id:m,data:_,error:R}=p,E=i.get(m);i.delete(m),R?E.reject(l(R)):E.fulfil(l(_))}}}})}function _t(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ee=!1;function wn(e){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=mt(e);if(n&&document.getElementById(n)){const{x:a,y:s}=ue();setTimeout(()=>{const i=history.state;Ee=!0,location.replace(`#${n}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(a,s),Ee=!1})}else{const a=document.body,s=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),s!==null?a.setAttribute("tabindex",s):a.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function De(e,t,n,r){let a,s;const i=new Promise((c,l)=>{a=c,s=l});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function qe(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function vn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{In as a,Un as g,An as l,S as p,O as s};
@@ -1 +0,0 @@
1
- import"./DsnmJJEf.js";import{p,d as c,b as m,s as d,f as b,a as u}from"./B3bf7yrh.js";import{d as _}from"./D5lcOOwR.js";import{p as g,i as v}from"./ct9jA5hl.js";import{g as k}from"./BeFE4kE2.js";import{F as h,l as y}from"./B4IjTTLF.js";var L=(t,o)=>{t.preventDefault(),o().close(),history.back()},P=m("<button>Take me back</button>"),x=m("<p>Are you sure you want to log out?</p> <!>",1);function O(t,o){p(o,!0);let a=g(o,"dialog",15),l=g(o,"fullPage",3,!1);h(t,{get pageMode(){return l()},submitText:"Log Out",submit:()=>y().then(()=>k("/")),get dialog(){return a()},set dialog(r){a(r)},children:(r,D)=>{var s=x(),n=d(b(s),2);{var f=e=>{var i=P();i.__click=[L,a],u(e,i)};v(n,e=>{l()&&e(f)})}u(r,s)},$$slots:{default:!0}}),c()}_(["click"]);export{O as L};
@@ -1 +0,0 @@
1
- import{a2 as k,a3 as S,a4 as A,R as I,a5 as K,a6 as j,J as Q,l as X,A as H,g as Z,a7 as ee,h as w,a8 as L,a9 as q,aa as M,z as b,y as C,q as h,u as W,ab as N,ac as D,i as te,ad as ae,ae as ne,af as re,ag as oe,ah as ie,ai as se,m as le,p as ue,aj as f,k as ce,d as fe,ak as E,al as de,am as _e,an as $,K as P,ao as pe,ap as he,aq as ve,ar as ye,as as ge,at as be,au as we}from"./B3bf7yrh.js";import{c as me}from"./DCs3KlJy.js";function He(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Ee=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function qe(e){return Ee.includes(e)}const Te={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function We(e){return e=e.toLowerCase(),Te[e]??e}const ke=["touchstart","touchmove"];function Se(e){return ke.includes(e)}function Ae(e){var t=A,n=I;k(null),S(null);try{return e()}finally{k(t),S(n)}}const z=new Set,R=new Set;function Ce(e,t,n,o={}){function r(a){if(o.capture||m.call(t,a),!a.cancelBubble)return Ae(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Q(()=>{t.addEventListener(e,r,o)}):t.addEventListener(e,r,o),r}function $e(e,t,n,o,r){var a={capture:o,passive:r},s=Ce(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&X(()=>{t.removeEventListener(e,s,a)})}function ze(e){for(var t=0;t<e.length;t++)z.add(e[t]);for(var n of R)n(e)}function m(e){var t=this,n=t.ownerDocument,o=e.type,r=e.composedPath?.()||[],a=r[0]||e.target,s=0,d=e.__root;if(d){var _=r.indexOf(d);if(_!==-1&&(t===document||t===window)){e.__root=t;return}var v=r.indexOf(t);if(v===-1)return;_<=v&&(s=_)}if(a=r[s]||e.target,a!==t){K(e,"currentTarget",{configurable:!0,get(){return a||n}});var O=A,c=I;k(null),S(null);try{for(var i,l=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var p=a["__"+o];if(p!=null&&(!a.disabled||e.target===a))if(j(p)){var[G,...J]=p;G.apply(a,[e,...J])}else p.call(a,e)}catch(T){i?l.push(T):i=T}if(e.cancelBubble||y===t||y===null)break;a=y}if(i){for(let T of l)queueMicrotask(()=>{throw T});throw i}}finally{e.__root=t,delete e.currentTarget,k(O),S(c)}}}let u;function Oe(){u=void 0}function Be(e){let t=null,n=w;var o;if(w){for(t=h,u===void 0&&(u=W(document.head));u!==null&&(u.nodeType!==L||u.data!==q);)u=M(u);u===null?b(!1):u=C(M(u))}w||(o=document.head.appendChild(H()));try{Z(()=>e(o),ee)}finally{n&&(b(!0),u=h,C(t))}}let V=!0;function Fe(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function B(e,t){return F(e,t)}function De(e,t){N(),t.intro=t.intro??!1;const n=t.target,o=w,r=h;try{for(var a=W(n);a&&(a.nodeType!==L||a.data!==q);)a=M(a);if(!a)throw D;b(!0),C(a),te();const s=F(e,{...t,anchor:a});if(h===null||h.nodeType!==L||h.data!==ae)throw ne(),D;return b(!1),s}catch(s){if(s===D)return t.recover===!1&&re(),N(),oe(n),b(!1),B(e,t);throw s}finally{b(o),C(r),Oe()}}const g=new Map;function F(e,{target:t,anchor:n,props:o={},events:r,context:a,intro:s=!0}){N();var d=new Set,_=c=>{for(var i=0;i<c.length;i++){var l=c[i];if(!d.has(l)){d.add(l);var y=Se(l);t.addEventListener(l,m,{passive:y});var p=g.get(l);p===void 0?(document.addEventListener(l,m,{passive:y}),g.set(l,1)):g.set(l,p+1)}}};_(ie(z)),R.add(_);var v=void 0,O=se(()=>{var c=n??t.appendChild(H());return le(()=>{if(a){ue({});var i=f;i.c=a}r&&(o.$$events=r),w&&ce(c,null),V=s,v=e(c,o)||{},V=!0,w&&(I.nodes_end=h),a&&fe()}),()=>{for(var i of d){t.removeEventListener(i,m);var l=g.get(i);--l===0?(document.removeEventListener(i,m),g.delete(i)):g.set(i,l)}R.delete(_),c!==n&&c.parentNode?.removeChild(c)}});return x.set(v,O),v}let x=new WeakMap;function Le(e,t){const n=x.get(e);return n?(x.delete(e),n(t)):Promise.resolve()}function Me(){return A===null&&_e(),(A.ac??=new AbortController).signal}function U(e){f===null&&E(),de(()=>{const t=P(e);if(typeof t=="function")return t})}function Ne(e){f===null&&E(),U(()=>()=>P(e))}function Re(e,t,{bubbles:n=!1,cancelable:o=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:o})}function xe(){const e=f;return e===null&&E(),(t,n,o)=>{const r=e.s.$$events?.[t];if(r){const a=j(r)?r.slice():[r],s=Re(t,n,o);for(const d of a)d.call(e.x,s);return!s.defaultPrevented}return!0}}function Ie(e){f===null&&E(),f.l===null&&$(),Y(f).b.push(e)}function Pe(e){f===null&&E(),f.l===null&&$(),Y(f).a.push(e)}function Y(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Ue=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:Pe,beforeUpdate:Ie,createEventDispatcher:xe,createRawSnippet:me,flushSync:pe,getAbortSignal:Me,getAllContexts:he,getContext:ve,hasContext:ye,hydrate:De,mount:B,onDestroy:Ne,onMount:U,setContext:ge,settled:be,tick:we,unmount:Le,untrack:P},Symbol.toStringTag,{value:"Module"}));export{De as a,V as b,Ce as c,ze as d,qe as e,$e as f,Ue as g,Be as h,He as i,B as m,We as n,U as o,Fe as s,Le as u,Ae as w};
@@ -1 +0,0 @@
1
- import{g as c,h as o,i as _,j as d,k as l,l as u,E as h,m,n as v,o as g,q as f,u as y}from"./B3bf7yrh.js";function b(r,n,...s){var t=r,e=v,a;c(()=>{e!==(e=n())&&(a&&(g(a),a=null),a=m(()=>e(t,...s)))},h),o&&(t=f)}function R(r){return(n,...s)=>{var t=r(...s),e;if(o)e=f,_();else{var a=t.render().trim(),p=d(a);e=y(p),n.before(e)}const i=t.setup?.(e);l(e,e),typeof i=="function"&&u(i)}}export{R as c,b as s};
@@ -1 +0,0 @@
1
- import{g as N,E as Y,h as E,w as B,H as q,x as C,y as F,z as O,A as K,m as R,B as M,U,C as j,D as Z,F as z,i as G,q as H,G as $,I as J,J as Q,K as D,S as A,L as w,M as V,P as W,N as T,O as X,Q as k,R as ee,T as re,V as ne,W as se,X as te,Y as ie,Z as y,_ as m,a0 as ae,a1 as fe}from"./B3bf7yrh.js";function de(e,r,s=!1){E&&G();var n=e,t=null,i=null,f=U,b=s?Y:0,v=!1;const _=(u,l=!0)=>{v=!0,g(l,u)};var o=null;function c(){o!==null&&(o.lastChild.remove(),n.before(o),o=null);var u=f?t:i,l=f?i:t;u&&Z(u),l&&z(l,()=>{f?i=null:t=null})}const g=(u,l)=>{if(f===(f=u))return;let h=!1;if(E){const L=B(n)===q;!!f===L&&(n=C(),F(n),O(!1),h=!0)}var d=j(),P=n;if(d&&(o=document.createDocumentFragment(),o.append(P=K())),f?t??=l&&R(()=>l(P)):i??=l&&R(()=>l(P)),d){var a=M,p=f?t:i,S=f?i:t;p&&a.skipped_effects.delete(p),S&&a.skipped_effects.add(S),a.add_callback(c)}else c();h&&O(!0)};N(()=>{v=!1,r(_),v||g(null,null)},b),E&&(n=H)}function x(e,r){return e===r||e?.[A]===r}function _e(e={},r,s,n){return $(()=>{var t,i;return J(()=>{t=i,i=[],D(()=>{e!==s(...i)&&(r(e,...i),t&&x(s(...t),e)&&r(null,...t))})}),()=>{Q(()=>{i&&x(s(...i),e)&&r(null,...i)})}}),e}let I=!1;function ue(e){var r=I;try{return I=!1,[e(),I]}finally{I=r}}const le={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function pe(e,r,s){return new Proxy({props:e,exclude:r},le)}const oe={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(y(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let t=e.props[n];y(t)&&(t=t());const i=w(t,r);if(i&&i.set)return i.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(y(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const t=w(n,r);return t&&!t.configurable&&(t.configurable=!0),t}}},has(e,r){if(r===A||r===m)return!1;for(let s of e.props)if(y(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(y(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function ve(...e){return new Proxy({props:e},oe)}function he(e,r,s,n){var t=(s&te)!==0,i=(s&ae)!==0,f=n,b=!0,v=()=>(b&&(b=!1,f=i?D(n):n),f),_;if(t){var o=A in e||m in e;_=w(e,r)?.set??(o&&r in e?a=>e[r]=a:void 0)}var c,g=!1;t?[c,g]=ue(()=>e[r]):c=e[r],c===void 0&&n!==void 0&&(c=v(),_&&(V(),_(c)));var u;if(u=()=>{var a=e[r];return a===void 0?v():(b=!0,a)},(s&W)===0)return u;if(_){var l=e.$$legacy;return function(a,p){return arguments.length>0?((!p||l||g)&&_(p?u():a),a):u()}}var h=!1,d=((s&ie)!==0?ne:se)(()=>(h=!1,u()));t&&T(d);var P=ee;return function(a,p){if(arguments.length>0){const S=p?T(d):t?X(a):a;return k(d,S),h=!0,f!==void 0&&(f=S),a}return fe&&h||(P.f&re)!==0?d.v:T(d)}}export{_e as b,de as i,he as p,pe as r,ve as s};
@@ -1 +0,0 @@
1
- import{s as e,p as r}from"./BeFE4kE2.js";const t={get error(){return r.error},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BbGefPez.js","../chunks/DsnmJJEf.js","../chunks/B3bf7yrh.js","../chunks/DCs3KlJy.js","../nodes/1.C3jvF6zj.js","../chunks/D5lcOOwR.js","../chunks/rXU5YtEm.js","../chunks/BeFE4kE2.js","../nodes/2._Jmh03he.js","../nodes/3.C1G23fTe.js","../chunks/ct9jA5hl.js","../chunks/B4IjTTLF.js","../assets/user.Cbakz6hh.css","../chunks/CtT1TXOG.js","../assets/3.C2J9FN5q.css","../assets/Login.C58W2qGZ.css","../nodes/4.TQjMBeyV.js","../nodes/5.SHyxFZfo.js","../nodes/6.ikul5Bcl.js"])))=>i.map(i=>d[i]);
2
- import{h as V,i as U,g as z,E as G,A as Q,m as W,B as Y,C as H,q as J,F as K,Q as x,_ as X,N as m,ao as Z,a5 as $,av as ee,p as te,aw as re,al as ae,ax as k,au as se,b as N,f as w,s as ne,a as b,d as oe,c as A,e as ie,r as ce,ay as O,az as le,t as ue}from"../chunks/B3bf7yrh.js";import{a as fe,m as de,u as me,o as _e,s as he}from"../chunks/D5lcOOwR.js";import"../chunks/DsnmJJEf.js";import{p as L,i as T,b as C}from"../chunks/ct9jA5hl.js";function S(l,e,s){V&&U();var i=l,n,r,t=null,a=null;function _(){r&&(K(r),r=null),t&&(t.lastChild.remove(),i.before(t),t=null),r=a,a=null}z(()=>{if(n!==(n=e())){var h=H();if(n){var c=i;h&&(t=document.createDocumentFragment(),t.append(c=Q())),a=W(()=>s(c,n))}h?Y.add_callback(_):_()}},G),V&&(i=J)}function ve(l){return class extends ge{constructor(e){super({component:l,...e})}}}class ge{#t;#e;constructor(e){var s=new Map,i=(r,t)=>{var a=ee(t,!1,!1);return s.set(r,a),a};const n=new Proxy({...e.props||{},$$events:{}},{get(r,t){return m(s.get(t)??i(t,Reflect.get(r,t)))},has(r,t){return t===X?!0:(m(s.get(t)??i(t,Reflect.get(r,t))),Reflect.has(r,t))},set(r,t,a){return x(s.get(t)??i(t,a),a),Reflect.set(r,t,a)}});this.#e=(e.hydrate?fe:de)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Z(),this.#t=n.$$events;for(const r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||$(this,r,{get(){return this.#e[r]},set(t){this.#e[r]=t},enumerable:!0});this.#e.$set=r=>{Object.assign(n,r)},this.#e.$destroy=()=>{me(this.#e)}}$set(e){this.#e.$set(e)}$on(e,s){this.#t[e]=this.#t[e]||[];const i=(...n)=>s.call(this,...n);return this.#t[e].push(i),()=>{this.#t[e]=this.#t[e].filter(n=>n!==i)}}$destroy(){this.#e.$destroy()}}const ye="modulepreload",Ee=function(l,e){return new URL(l,e).href},j={},y=function(e,s,i){let n=Promise.resolve();if(s&&s.length>0){let h=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const t=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),_=a?.nonce||a?.getAttribute("nonce");n=h(s.map(c=>{if(c=Ee(c,i),c in j)return;j[c]=!0;const d=c.endsWith(".css"),v=d?'[rel="stylesheet"]':"";if(!!i)for(let o=t.length-1;o>=0;o--){const u=t[o];if(u.href===c&&(!d||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${v}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":ye,d||(f.as="script"),f.crossOrigin="",f.href=c,_&&f.setAttribute("nonce",_),document.head.appendChild(f),d)return new Promise((o,u)=>{f.addEventListener("load",o),f.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(t){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=t,window.dispatchEvent(a),!a.defaultPrevented)throw t}return n.then(t=>{for(const a of t||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})},Te={};var be=N('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),pe=N("<!> <!>",1);function Pe(l,e){te(e,!0);let s=L(e,"components",23,()=>[]),i=L(e,"data_0",3,null),n=L(e,"data_1",3,null);re(()=>e.stores.page.set(e.page)),ae(()=>{e.stores,e.page,e.constructors,s(),e.form,i(),n(),e.stores.page.notify()});let r=k(!1),t=k(!1),a=k(null);_e(()=>{const o=e.stores.page.subscribe(()=>{m(r)&&(x(t,!0),se().then(()=>{x(a,document.title||"untitled page",!0)}))});return x(r,!0),o});const _=O(()=>e.constructors[1]);var h=pe(),c=w(h);{var d=o=>{var u=A();const p=O(()=>e.constructors[0]);var P=w(u);S(P,()=>m(p),(g,E)=>{C(E(g,{get data(){return i()},get form(){return e.form},get params(){return e.page.params},children:(R,xe)=>{var I=A(),B=w(I);S(B,()=>m(_),(F,q)=>{C(q(F,{get data(){return n()},get form(){return e.form},get params(){return e.page.params}}),M=>s()[1]=M,()=>s()?.[1])}),b(R,I)},$$slots:{default:!0}}),R=>s()[0]=R,()=>s()?.[0])}),b(o,u)},v=o=>{var u=A();const p=O(()=>e.constructors[0]);var P=w(u);S(P,()=>m(p),(g,E)=>{C(E(g,{get data(){return i()},get form(){return e.form},get params(){return e.page.params}}),R=>s()[0]=R,()=>s()?.[0])}),b(o,u)};T(c,o=>{e.constructors[1]?o(d):o(v,!1)})}var D=ne(c,2);{var f=o=>{var u=be(),p=ie(u);{var P=g=>{var E=le();ue(()=>he(E,m(a))),b(g,E)};T(p,g=>{m(t)&&g(P)})}ce(u),b(o,u)};T(D,o=>{m(r)&&o(f)})}b(l,h),oe()}const Ce=ve(Pe),Se=[()=>y(()=>import("../nodes/0.BbGefPez.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>y(()=>import("../nodes/1.C3jvF6zj.js"),__vite__mapDeps([4,1,2,5,3,6,7]),import.meta.url),()=>y(()=>import("../nodes/2._Jmh03he.js"),__vite__mapDeps([8,1,2]),import.meta.url),()=>y(()=>import("../nodes/3.C1G23fTe.js"),__vite__mapDeps([9,1,2,5,3,10,11,7,6,12,13,14,15]),import.meta.url),()=>y(()=>import("../nodes/4.TQjMBeyV.js"),__vite__mapDeps([16,1,2,5,3,10,11,7,6,12,15]),import.meta.url),()=>y(()=>import("../nodes/5.SHyxFZfo.js"),__vite__mapDeps([17,1,13,2,5,3,10,7,11,6,12]),import.meta.url),()=>y(()=>import("../nodes/6.ikul5Bcl.js"),__vite__mapDeps([18,1,2,5,3,10,11,7,6,12,15]),import.meta.url)],De=[],Ie={"/_axium/default":[2],"/account":[3],"/login":[4],"/logout":[5],"/register":[6]},Re={handleError:({error:l})=>{console.error(l)},reroute:()=>{},transport:{}},we=Object.fromEntries(Object.entries(Re.transport).map(([l,e])=>[l,e.decode])),Ve=!1,je=(l,e)=>we[l](e);export{je as decode,we as decoders,Ie as dictionary,Ve as hash,Re as hooks,Te as matchers,Se as nodes,Ce as root,De as server_loads};