plan-assistant 1.6.0-alpha.1 → 1.6.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.
@@ -10,10 +10,10 @@ return {
10
10
  assets: new Set(["favicon.png"]),
11
11
  mimeTypes: {".png":"image/png"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start.DfbNX0kb.js",app:"_app/immutable/entry/app.C_pWXh8R.js",imports:["_app/immutable/entry/start.DfbNX0kb.js","_app/immutable/chunks/C88p_n1l.js","_app/immutable/chunks/CobJHAAW.js","_app/immutable/chunks/DGn8gxMH.js","_app/immutable/entry/app.C_pWXh8R.js","_app/immutable/chunks/Dj-iuGW3.js","_app/immutable/chunks/CobJHAAW.js","_app/immutable/chunks/dRJp6O4P.js","_app/immutable/chunks/BrjAEg64.js","_app/immutable/chunks/DGn8gxMH.js","_app/immutable/chunks/BZQqs639.js","_app/immutable/chunks/C5wtj4WQ.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.BqbLotw0.js",app:"_app/immutable/entry/app.JpTJ3pcv.js",imports:["_app/immutable/entry/start.BqbLotw0.js","_app/immutable/chunks/Dq6W4XCo.js","_app/immutable/chunks/CobJHAAW.js","_app/immutable/chunks/DGn8gxMH.js","_app/immutable/entry/app.JpTJ3pcv.js","_app/immutable/chunks/Dj-iuGW3.js","_app/immutable/chunks/CobJHAAW.js","_app/immutable/chunks/dRJp6O4P.js","_app/immutable/chunks/BrjAEg64.js","_app/immutable/chunks/DGn8gxMH.js","_app/immutable/chunks/BZQqs639.js","_app/immutable/chunks/C5wtj4WQ.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
15
  __memo(() => import('./chunks/0-rXmaDIAK.js')),
16
- __memo(() => import('./chunks/1-CEFNOpUG.js')),
16
+ __memo(() => import('./chunks/1-Du-JlMvy.js')),
17
17
  __memo(() => import('./chunks/2-qGWtN2-9.js')),
18
18
  __memo(() => import('./chunks/3-OUU46X3b.js'))
19
19
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"favicon.png\"]),\n\tmimeTypes: {\".png\":\"image/png\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.DfbNX0kb.js\",app:\"_app/immutable/entry/app.C_pWXh8R.js\",imports:[\"_app/immutable/entry/start.DfbNX0kb.js\",\"_app/immutable/chunks/C88p_n1l.js\",\"_app/immutable/chunks/CobJHAAW.js\",\"_app/immutable/chunks/DGn8gxMH.js\",\"_app/immutable/entry/app.C_pWXh8R.js\",\"_app/immutable/chunks/Dj-iuGW3.js\",\"_app/immutable/chunks/CobJHAAW.js\",\"_app/immutable/chunks/dRJp6O4P.js\",\"_app/immutable/chunks/BrjAEg64.js\",\"_app/immutable/chunks/DGn8gxMH.js\",\"_app/immutable/chunks/BZQqs639.js\",\"_app/immutable/chunks/C5wtj4WQ.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/\",\n\t\t\t\tpattern: /^\\/$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/health\",\n\t\t\t\tpattern: /^\\/api\\/health\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/health/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]/feedback\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/feedback\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/feedback/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]/versions\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/versions\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/versions/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]/versions/[version]\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/versions\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false},{\"name\":\"version\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/versions/_version_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/shutdown\",\n\t\t\t\tpattern: /^\\/api\\/shutdown\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/shutdown/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sse/[sessionId]\",\n\t\t\t\tpattern: /^\\/api\\/sse\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sse/_sessionId_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/plan/[sessionId]\",\n\t\t\t\tpattern: /^\\/plan\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n\nexport const prerendered = new Set([]);\n\nexport const base = \"\";"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,MAAM;AAC/B,SAAS,MAAM,CAAC,EAAE,EAAE;AACpB,CAAC,IAAI,KAAK;AACV,CAAC,OAAO,MAAM,KAAK,MAAM,KAAK,GAAG,EAAE,EAAE,CAAC;AACtC;;AAEA,OAAO;AACP,CAAC,MAAM,EAAE,MAAM;AACf,CAAC,OAAO,EAAE,MAAM;AAChB,CAAC,MAAM,EAAE,IAAI,GA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EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
1
+ {"version":3,"file":"manifest.js","sources":["../../.svelte-kit/adapter-node/manifest.js"],"sourcesContent":["export const manifest = (() => {\nfunction __memo(fn) {\n\tlet value;\n\treturn () => value ??= (value = fn());\n}\n\nreturn {\n\tappDir: \"_app\",\n\tappPath: \"_app\",\n\tassets: new Set([\"favicon.png\"]),\n\tmimeTypes: {\".png\":\"image/png\"},\n\t_: {\n\t\tclient: {start:\"_app/immutable/entry/start.BqbLotw0.js\",app:\"_app/immutable/entry/app.JpTJ3pcv.js\",imports:[\"_app/immutable/entry/start.BqbLotw0.js\",\"_app/immutable/chunks/Dq6W4XCo.js\",\"_app/immutable/chunks/CobJHAAW.js\",\"_app/immutable/chunks/DGn8gxMH.js\",\"_app/immutable/entry/app.JpTJ3pcv.js\",\"_app/immutable/chunks/Dj-iuGW3.js\",\"_app/immutable/chunks/CobJHAAW.js\",\"_app/immutable/chunks/dRJp6O4P.js\",\"_app/immutable/chunks/BrjAEg64.js\",\"_app/immutable/chunks/DGn8gxMH.js\",\"_app/immutable/chunks/BZQqs639.js\",\"_app/immutable/chunks/C5wtj4WQ.js\"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},\n\t\tnodes: [\n\t\t\t__memo(() => import('./nodes/0.js')),\n\t\t\t__memo(() => import('./nodes/1.js')),\n\t\t\t__memo(() => import('./nodes/2.js')),\n\t\t\t__memo(() => import('./nodes/3.js'))\n\t\t],\n\t\tremotes: {\n\t\t\t\n\t\t},\n\t\troutes: [\n\t\t\t{\n\t\t\t\tid: \"/\",\n\t\t\t\tpattern: /^\\/$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 2 },\n\t\t\t\tendpoint: null\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/health\",\n\t\t\t\tpattern: /^\\/api\\/health\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/health/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]/feedback\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/feedback\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/feedback/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]/versions\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/versions\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/versions/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sessions/[sessionId]/versions/[version]\",\n\t\t\t\tpattern: /^\\/api\\/sessions\\/([^/]+?)\\/versions\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false},{\"name\":\"version\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sessions/_sessionId_/versions/_version_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/shutdown\",\n\t\t\t\tpattern: /^\\/api\\/shutdown\\/?$/,\n\t\t\t\tparams: [],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/shutdown/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/api/sse/[sessionId]\",\n\t\t\t\tpattern: /^\\/api\\/sse\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: null,\n\t\t\t\tendpoint: __memo(() => import('./entries/endpoints/api/sse/_sessionId_/_server.ts.js'))\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"/plan/[sessionId]\",\n\t\t\t\tpattern: /^\\/plan\\/([^/]+?)\\/?$/,\n\t\t\t\tparams: [{\"name\":\"sessionId\",\"optional\":false,\"rest\":false,\"chained\":false}],\n\t\t\t\tpage: { layouts: [0,], errors: [1,], leaf: 3 },\n\t\t\t\tendpoint: null\n\t\t\t}\n\t\t],\n\t\tprerendered_routes: new Set([]),\n\t\tmatchers: async () => {\n\t\t\t\n\t\t\treturn { };\n\t\t},\n\t\tserver_assets: {}\n\t}\n}\n})();\n\nexport const prerendered = new Set([]);\n\nexport const base = \"\";"],"names":[],"mappings":"AAAY,MA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AO,EAAE,uBAAuB;AACpC,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAChF,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;AAClD,IAAI,QAAQ,EAAE;AACd;AACA,GAAG;AACH,EAAE,kBAAkB,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC;AACjC,EAAE,QAAQ,EAAE,YAAY;AACxB;AACA,GAAG,OAAO,IAAI;AACd,EAAE,CAAC;AACH,EAAE,aAAa,EAAE;AACjB;AACA;AACA,CAAC;;AAEW,MAAC,WAAW,GAAG,IAAI,GAAG,CAAC,EAAE;;AAEzB,MAAC,IAAI,GAAG;;;;"}
@@ -1,17 +1,16 @@
1
1
  import { requireSession } from "../session-resolver.js";
2
- import { readMeta, readFeedback } from "../session-reader.js";
2
+ import { readMeta, readFeedback, waitForTerminalFeedback } from "../session-reader.js";
3
3
  import { outputJson, outputError } from "../output.js";
4
4
  import { parseDuration } from "../utils.js";
5
5
  import { CliError, CliExitCode } from "../errors.js";
6
- import { watch } from "chokidar";
7
6
  import { join } from "node:path";
8
- import { existsSync, readFileSync } from "node:fs";
9
7
  // Exit codes
10
8
  export const EXIT_APPROVED = 0;
11
9
  export const EXIT_ERROR = 1;
12
10
  export const EXIT_NEEDS_WORK = 3;
13
11
  export const EXIT_REVIEWING = 4;
14
12
  export const EXIT_NO_FEEDBACK = 5;
13
+ const DEFAULT_WAIT_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes
15
14
  export function computeStatus(feedback) {
16
15
  if (!feedback)
17
16
  return { feedbackStatus: "none", exitCode: EXIT_NO_FEEDBACK };
@@ -59,8 +58,8 @@ export async function status(args) {
59
58
  if (shouldWait) {
60
59
  const timeoutStr = args.flags["wait-timeout"];
61
60
  const timeoutMs = typeof timeoutStr === "string"
62
- ? (parseDuration(timeoutStr) ?? 30 * 60 * 1000)
63
- : 30 * 60 * 1000; // 30 min default
61
+ ? (parseDuration(timeoutStr) ?? DEFAULT_WAIT_TIMEOUT_MS)
62
+ : DEFAULT_WAIT_TIMEOUT_MS;
64
63
  const exitCode = await pollFeedbackStatus(resolved.sessionDir, resolved.sessionId, meta, timeoutMs);
65
64
  throw new CliExitCode(exitCode);
66
65
  }
@@ -82,14 +81,16 @@ export async function status(args) {
82
81
  }, args.flags.pretty === true);
83
82
  throw new CliExitCode(exitCode);
84
83
  }
84
+ function isTerminalForMeta(meta) {
85
+ return (feedback) => feedback.status !== "reviewing" &&
86
+ !(meta.planVersion && feedback.planVersion < meta.planVersion);
87
+ }
85
88
  async function pollFeedbackStatus(sessionDir, sessionId, meta, timeoutMs) {
86
- // Check current state first (ignore stale feedback from older plan versions)
87
- const current = readFeedback(sessionDir);
88
- if (current &&
89
- current.status !== "reviewing" &&
90
- !(meta.planVersion && current.planVersion < meta.planVersion)) {
91
- const { feedbackStatus, exitCode } = computeStatus(current);
92
- const { phaseSummary, commentSummary } = computeSummary(current);
89
+ const feedbackPath = join(sessionDir, "feedback.json");
90
+ try {
91
+ const feedback = await waitForTerminalFeedback(feedbackPath, isTerminalForMeta(meta), AbortSignal.timeout(timeoutMs));
92
+ const { feedbackStatus, exitCode } = computeStatus(feedback);
93
+ const { phaseSummary, commentSummary } = computeSummary(feedback);
93
94
  outputJson({
94
95
  sessionId,
95
96
  planTitle: meta.planTitle,
@@ -100,44 +101,8 @@ async function pollFeedbackStatus(sessionDir, sessionId, meta, timeoutMs) {
100
101
  });
101
102
  return exitCode;
102
103
  }
103
- // Watch for changes
104
- const feedbackPath = join(sessionDir, "feedback.json");
105
- return new Promise((resolve, reject) => {
106
- const timer = setTimeout(() => {
107
- watcher.close();
108
- outputError("Timed out waiting for feedback", "TIMEOUT");
109
- reject(new CliError("Timed out waiting for feedback"));
110
- }, timeoutMs);
111
- const checkFile = () => {
112
- try {
113
- if (!existsSync(feedbackPath))
114
- return;
115
- const data = JSON.parse(readFileSync(feedbackPath, "utf-8"));
116
- if (data.status !== "reviewing" &&
117
- !(meta.planVersion && data.planVersion < meta.planVersion)) {
118
- clearTimeout(timer);
119
- watcher.close();
120
- const { feedbackStatus, exitCode } = computeStatus(data);
121
- const { phaseSummary, commentSummary } = computeSummary(data);
122
- outputJson({
123
- sessionId,
124
- planTitle: meta.planTitle,
125
- status: meta.status,
126
- feedbackStatus,
127
- phaseSummary,
128
- commentSummary,
129
- });
130
- resolve(exitCode);
131
- }
132
- }
133
- catch {
134
- // ignore parse errors during writes
135
- }
136
- };
137
- const watcher = watch(feedbackPath, {
138
- awaitWriteFinish: { stabilityThreshold: 200, pollInterval: 100 },
139
- });
140
- watcher.on("change", checkFile);
141
- watcher.on("add", checkFile);
142
- });
104
+ catch {
105
+ outputError("Timed out waiting for feedback", "TIMEOUT");
106
+ throw new CliError("Timed out waiting for feedback");
107
+ }
143
108
  }
@@ -1,6 +1,6 @@
1
1
  import { dirname } from "node:path";
2
2
  import { requireSession } from "../session-resolver.js";
3
- import { stopServer, checkHealth, fetchWithTimeout, clearLock, DEFAULT_BASE_PORT, MAX_PORT, } from "../server-client.js";
3
+ import { stopServer, checkHealth, fetchWithTimeout, clearLock, DEFAULT_BASE_PORT, MAX_PORT, SHUTDOWN_TIMEOUT_MS, } from "../server-client.js";
4
4
  import { outputJson } from "../output.js";
5
5
  export async function stop(args) {
6
6
  const target = args.positional[0];
@@ -26,7 +26,7 @@ export async function stop(args) {
26
26
  const health = await checkHealth(port);
27
27
  if (health) {
28
28
  try {
29
- await fetchWithTimeout(`http://localhost:${port}/api/shutdown`, { method: "POST" }, 2000);
29
+ await fetchWithTimeout(`http://localhost:${port}/api/shutdown`, { method: "POST" }, SHUTDOWN_TIMEOUT_MS);
30
30
  clearLock(health.sessionDir);
31
31
  results.push({ port, sessionDir: health.sessionDir });
32
32
  stopped++;
@@ -260,7 +260,7 @@ export function tryMatchPhaseHeading(heading, autoNumber) {
260
260
  return null;
261
261
  }
262
262
  /** Known top-level section patterns that should NOT be treated as phases */
263
- export const KNOWN_SECTION_PATTERNS = [
263
+ const KNOWN_SECTION_PATTERNS = [
264
264
  /^Overview$/i,
265
265
  /^Current\s+State/i,
266
266
  /What\s+We.*NOT\s+Doing/i,
@@ -9,6 +9,11 @@ import { spawn, execSync } from "node:child_process";
9
9
  import { createServer } from "node:net";
10
10
  export const DEFAULT_BASE_PORT = 5181;
11
11
  export const MAX_PORT = 5199;
12
+ const HEALTH_CHECK_TIMEOUT_MS = 500;
13
+ const STARTUP_HEALTH_CHECK_TIMEOUT_MS = 1000;
14
+ const STARTUP_POLL_INTERVAL_MS = 500;
15
+ const STARTUP_MAX_ATTEMPTS = 30; // 30 × 500ms = 15s
16
+ export const SHUTDOWN_TIMEOUT_MS = 2000;
12
17
  export async function fetchWithTimeout(url, options, timeoutMs) {
13
18
  const controller = new AbortController();
14
19
  const timeout = setTimeout(() => controller.abort(), timeoutMs);
@@ -26,7 +31,7 @@ function getPackageDir() {
26
31
  }
27
32
  export async function checkHealth(port) {
28
33
  try {
29
- const res = await fetchWithTimeout(`http://localhost:${port}/api/health`, {}, 500);
34
+ const res = await fetchWithTimeout(`http://localhost:${port}/api/health`, {}, HEALTH_CHECK_TIMEOUT_MS);
30
35
  if (!res.ok)
31
36
  return null;
32
37
  return (await res.json());
@@ -135,23 +140,22 @@ function startServer(sessionDir, port) {
135
140
  child.unref();
136
141
  const pid = child.pid;
137
142
  let attempts = 0;
138
- const maxAttempts = 30;
139
143
  const interval = setInterval(async () => {
140
144
  attempts++;
141
145
  try {
142
- const res = await fetchWithTimeout(`http://localhost:${port}/api/health`, {}, 1000);
146
+ const res = await fetchWithTimeout(`http://localhost:${port}/api/health`, {}, STARTUP_HEALTH_CHECK_TIMEOUT_MS);
143
147
  if (res.ok) {
144
148
  clearInterval(interval);
145
149
  resolvePromise(pid);
146
150
  }
147
151
  }
148
152
  catch {
149
- if (attempts >= maxAttempts) {
153
+ if (attempts >= STARTUP_MAX_ATTEMPTS) {
150
154
  clearInterval(interval);
151
155
  reject(new Error("Server failed to start within 15 seconds"));
152
156
  }
153
157
  }
154
- }, 500);
158
+ }, STARTUP_POLL_INTERVAL_MS);
155
159
  });
156
160
  }
157
161
  export async function launchServer(sessionDir, port) {
@@ -166,7 +170,7 @@ export async function stopServer(sessionDir) {
166
170
  const port = lock?.port;
167
171
  if (port) {
168
172
  try {
169
- await fetchWithTimeout(`http://localhost:${port}/api/shutdown`, { method: "POST" }, 2000);
173
+ await fetchWithTimeout(`http://localhost:${port}/api/shutdown`, { method: "POST" }, SHUTDOWN_TIMEOUT_MS);
170
174
  clearLock(sessionDir);
171
175
  return true;
172
176
  }
@@ -57,70 +57,95 @@ export function findSessionDirs(startDir) {
57
57
  // ── Feedback watching ──────────────────────────────────────────────
58
58
  import { CliExitCode } from "./errors.js";
59
59
  import { EXIT_APPROVED, EXIT_NEEDS_WORK } from "./commands/status.js";
60
- async function outputFeedbackResult(feedback, sessionId, planTitle, sessionDir) {
61
- // Stop the server review cycle is complete
62
- const parentDir = dirname(sessionDir);
63
- const stopped = await stopServer(parentDir);
64
- if (stopped) {
65
- console.error("Server stopped.");
66
- }
67
- const unresolvedComments = feedback.comments.filter((c) => !c.resolved);
68
- outputJson({
69
- event: "feedback",
70
- sessionId,
71
- planTitle,
72
- status: feedback.status,
73
- comments: unresolvedComments,
74
- commentCount: unresolvedComments.length,
75
- });
76
- throw new CliExitCode(feedback.status === "approved" ? EXIT_APPROVED : EXIT_NEEDS_WORK);
77
- }
78
- export async function awaitReviewFeedback(feedbackPath, sessionId, planTitle, mdWatcher, sessionDir) {
79
- // Check if feedback already submitted
60
+ /**
61
+ * Watch a feedback.json file until a terminal state is reached.
62
+ * Returns the terminal FeedbackPayload, or throws on abort/timeout.
63
+ *
64
+ * @param isTerminal — predicate to determine if feedback is actionable
65
+ * (e.g., filter out stale plan versions or "reviewing" status)
66
+ * @param signal — AbortSignal for cancellation (timeout, SIGINT, etc.)
67
+ */
68
+ export function waitForTerminalFeedback(feedbackPath, isTerminal, signal) {
69
+ // Check if feedback already exists
80
70
  if (existsSync(feedbackPath)) {
81
71
  try {
82
72
  const existing = JSON.parse(readFileSync(feedbackPath, "utf-8"));
83
- if (existing.status === "approved" || existing.status === "needs-work") {
84
- mdWatcher.close();
85
- await outputFeedbackResult(existing, sessionId, planTitle, sessionDir);
86
- return;
73
+ if (isTerminal(existing)) {
74
+ return Promise.resolve(existing);
87
75
  }
88
76
  }
89
77
  catch {
90
78
  /* ignore */
91
79
  }
92
80
  }
93
- return new Promise((resolve) => {
81
+ return new Promise((resolve, reject) => {
82
+ if (signal?.aborted) {
83
+ reject(signal.reason);
84
+ return;
85
+ }
94
86
  const fbWatcher = watch(feedbackPath, {
95
87
  awaitWriteFinish: { stabilityThreshold: 200, pollInterval: 100 },
96
88
  });
97
89
  const cleanup = () => {
98
90
  fbWatcher.close();
99
- mdWatcher.close();
100
- process.removeListener("SIGINT", onSigint);
91
+ signal?.removeEventListener("abort", onAbort);
101
92
  };
102
- const check = async () => {
93
+ const check = () => {
103
94
  try {
104
95
  if (!existsSync(feedbackPath))
105
96
  return;
106
97
  const data = JSON.parse(readFileSync(feedbackPath, "utf-8"));
107
- if (data.status === "approved" || data.status === "needs-work") {
98
+ if (isTerminal(data)) {
108
99
  cleanup();
109
- await outputFeedbackResult(data, sessionId, planTitle, sessionDir);
110
- resolve();
100
+ resolve(data);
111
101
  }
112
102
  }
113
103
  catch {
114
104
  /* ignore parse errors during writes */
115
105
  }
116
106
  };
117
- const onSigint = () => {
107
+ const onAbort = () => {
118
108
  cleanup();
119
- console.error("\nStopped watching.");
120
- throw new CliExitCode(0);
109
+ reject(signal.reason);
121
110
  };
122
111
  fbWatcher.on("change", check);
123
112
  fbWatcher.on("add", check);
124
- process.on("SIGINT", onSigint);
113
+ signal?.addEventListener("abort", onAbort);
125
114
  });
126
115
  }
116
+ function isTerminalStatus(feedback) {
117
+ return feedback.status === "approved" || feedback.status === "needs-work";
118
+ }
119
+ export async function awaitReviewFeedback(feedbackPath, sessionId, planTitle, mdWatcher, sessionDir) {
120
+ const controller = new AbortController();
121
+ const onSigint = () => {
122
+ controller.abort();
123
+ mdWatcher.close();
124
+ console.error("\nStopped watching.");
125
+ throw new CliExitCode(0);
126
+ };
127
+ process.on("SIGINT", onSigint);
128
+ try {
129
+ const feedback = await waitForTerminalFeedback(feedbackPath, isTerminalStatus, controller.signal);
130
+ mdWatcher.close();
131
+ // Stop the server — review cycle is complete
132
+ const parentDir = dirname(sessionDir);
133
+ const stopped = await stopServer(parentDir);
134
+ if (stopped) {
135
+ console.error("Server stopped.");
136
+ }
137
+ const unresolvedComments = feedback.comments.filter((c) => !c.resolved);
138
+ outputJson({
139
+ event: "feedback",
140
+ sessionId,
141
+ planTitle,
142
+ status: feedback.status,
143
+ comments: unresolvedComments,
144
+ commentCount: unresolvedComments.length,
145
+ });
146
+ throw new CliExitCode(feedback.status === "approved" ? EXIT_APPROVED : EXIT_NEEDS_WORK);
147
+ }
148
+ finally {
149
+ process.removeListener("SIGINT", onSigint);
150
+ }
151
+ }
@@ -22,7 +22,7 @@ function getSessionDir(sessionId) {
22
22
  return join(getBaseDir(), sessionId);
23
23
  }
24
24
  // ── Shared JSON read helper ──────────────────────────────────────
25
- export function readJsonFile(filePath) {
25
+ function readJsonFile(filePath) {
26
26
  if (!existsSync(filePath))
27
27
  return null;
28
28
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plan-assistant",
3
- "version": "1.6.0-alpha.1",
3
+ "version": "1.6.0",
4
4
  "description": "Review implementation plans in the browser with live reload",
5
5
  "homepage": "https://github.com/sanderdatema/plan_assistant#readme",
6
6
  "bugs": {
@@ -34,8 +34,7 @@
34
34
  "dependencies": {
35
35
  "chokidar": "^4.0.3",
36
36
  "highlight.js": "^11.11.0",
37
- "marked": "^15.0.7",
38
- "mermaid": "^11.6.0"
37
+ "marked": "^15.0.7"
39
38
  },
40
39
  "knip": {
41
40
  "entry": [
@@ -52,6 +51,7 @@
52
51
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
53
52
  "@tailwindcss/vite": "^4.1.4",
54
53
  "@types/node": "^25.3.0",
54
+ "mermaid": "^11.6.0",
55
55
  "svelte": "^5.20.0",
56
56
  "svelte-check": "^4.1.0",
57
57
  "tailwindcss": "^4.1.4",
@@ -1,3 +0,0 @@
1
- var Qt=t=>{throw TypeError(t)};var $e=(t,e,n)=>e.has(t)||Qt("Cannot "+n);var S=(t,e,n)=>($e(t,e,"read from private field"),n?n.call(t):e.get(t)),P=(t,e,n)=>e.has(t)?Qt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{b8 as Ct,b9 as De,d as j,g as N,b as x,aM as _t,ba as Be}from"./CobJHAAW.js";import{o as te}from"./DGn8gxMH.js";const Y=[];function Mt(t,e=Ct){let n=null;const a=new Set;function r(c){if(De(t,c)&&(t=c,n)){const s=!Y.length;for(const l of a)l[1](),Y.push(l,t);if(s){for(let l=0;l<Y.length;l+=2)Y[l][0](Y[l+1]);Y.length=0}}}function i(c){r(c(t))}function o(c,s=Ct){const l=[c,s];return a.add(l),a.size===1&&(n=e(r,i)||Ct),c(t),()=>{a.delete(l),a.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:o}}class Rt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Vt{constructor(e,n){this.status=e,this.location=n}}class qt extends Error{constructor(e,n,a){super(a),this.status=e,this.text=n}}new URL("sveltekit-internal://");function Fe(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Me(t){return t.split("%25").map(decodeURI).join("%25")}function Ve(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Pt({href:t}){return t.split("#")[0]}function qe(...t){let e=5381;for(const n of t)if(typeof n=="string"){let a=n.length;for(;a;)e=e*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)e=e*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;const Ge=new TextDecoder;function Ke(t){const e=atob(t),n=new Uint8Array(e.length);for(let a=0;a<e.length;a++)n[a]=e.charCodeAt(a);return n}const Ye=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Q.delete(Gt(t)),Ye(t,e));const Q=new Map;function We(t,e){const n=Gt(t,e),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...i}=JSON.parse(a.textContent);const o=a.getAttribute("data-ttl");return o&&Q.set(n,{body:r,init:i,ttl:1e3*Number(o)}),a.getAttribute("data-b64")!==null&&(r=Ke(r)),Promise.resolve(new Response(r,i))}return window.fetch(t,e)}function ze(t,e,n){if(Q.size>0){const a=Gt(t,n),r=Q.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(r.body,r.init);Q.delete(a)}}return window.fetch(e,n)}function Gt(t,e){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const r=[];e.headers&&r.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&r.push(e.body),a+=`[data-hash="${qe(...r)}"]`}return a}const He=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Je(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Ze(t).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return e.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(i)return e.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const o=a.split(/\[(.+?)\](?!\])/);return"/"+o.map((s,l)=>{if(l%2){if(s.startsWith("x+"))return Ot(String.fromCharCode(parseInt(s.slice(2),16)));if(s.startsWith("u+"))return Ot(String.fromCharCode(...s.slice(2).split("-").map(h=>parseInt(h,16))));const f=He.exec(s),[,u,m,d,p]=f;return e.push({name:d,matcher:p,optional:!!u,rest:!!m,chained:m?l===1&&o[0]==="":!1}),m?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return Ot(s)}).join("")}).join("")}/?$`),params:e}}function Xe(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Ze(t){return t.slice(1).split("/").filter(Xe)}function Qe(t,e,n){const a={},r=t.slice(1),i=r.filter(c=>c!==void 0);let o=0;for(let c=0;c<e.length;c+=1){const s=e[c];let l=r[c-o];if(s.chained&&s.rest&&o&&(l=r.slice(c-o,c+1).filter(f=>f).join("/"),o=0),l===void 0)if(s.rest)l="";else continue;if(!s.matcher||n[s.matcher](l)){a[s.name]=l;const f=e[c+1],u=r[c+1];f&&!f.rest&&f.optional&&u&&s.chained&&(o=0),!f&&!u&&Object.keys(a).length===i.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return a}function Ot(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function tn({nodes:t,server_loads:e,dictionary:n,matchers:a}){const r=new Set(e);return Object.entries(n).map(([c,[s,l,f]])=>{const{pattern:u,params:m}=Je(c),d={id:c,exec:p=>{const h=u.exec(p);if(h)return Qe(h,m,a)},errors:[1,...f||[]].map(p=>t[p]),layouts:[0,...l||[]].map(o),leaf:i(s)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function i(c){const s=c<0;return s&&(c=~c),[s,t[c]]}function o(c){return c===void 0?c:[r.has(c),t[c]]}}function ge(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function ee(t,e,n=JSON.stringify){const a=n(e);try{sessionStorage[t]=a}catch{}}var fe;const C=((fe=globalThis.__sveltekit_1troby5)==null?void 0:fe.base)??"";var ue;const en=((ue=globalThis.__sveltekit_1troby5)==null?void 0:ue.assets)??C??"",nn="1774195308803",me="sveltekit:snapshot",_e="sveltekit:scroll",we="sveltekit:states",rn="sveltekit:pageurl",z="sveltekit:history",nt="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},It=location.origin;function ye(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function K(){return{x:pageXOffset,y:pageYOffset}}function W(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const ne={...q,"":q.hover};function ve(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function be(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ve(t)}}function xt(t,e,n){let a;try{if(a=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const c=location.hash.split("#")[1]||"/";a.hash=`#${c}${a.hash}`}}catch{}const r=t instanceof SVGAElement?t.target.baseVal:t.target,i=!a||!!r||Tt(a,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(a==null?void 0:a.origin)===It&&t.hasAttribute("download");return{url:a,external:i,target:r,download:o}}function wt(t){let e=null,n=null,a=null,r=null,i=null,o=null,c=t;for(;c&&c!==document.documentElement;)a===null&&(a=W(c,"preload-code")),r===null&&(r=W(c,"preload-data")),e===null&&(e=W(c,"keepfocus")),n===null&&(n=W(c,"noscroll")),i===null&&(i=W(c,"reload")),o===null&&(o=W(c,"replacestate")),c=ve(c);function s(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ne[a??"off"],preload_data:ne[r??"off"],keepfocus:s(e),noscroll:s(n),reload:s(i),replace_state:s(o)}}function re(t){const e=Mt(t);let n=!0;function a(){n=!0,e.update(o=>o)}function r(o){n=!1,e.set(o)}function i(o){let c;return e.subscribe(s=>{(c===void 0||n&&s!==c)&&o(c=s)})}return{notify:a,set:r,subscribe:i}}const ke={v:()=>{}};function an(){const{set:t,subscribe:e}=Mt(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${en}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const o=(await r.json()).version!==nn;return o&&(t(!0),ke.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:a}}function Tt(t,e,n){return t.origin!==It||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Wn(t){}function on(t){const e=cn(t),n=new ArrayBuffer(e.length),a=new DataView(n);for(let r=0;r<n.byteLength;r++)a.setUint8(r,e.charCodeAt(r));return n}const sn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function cn(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,a=0;for(let r=0;r<t.length;r++)n<<=6,n|=sn.indexOf(t[r]),a+=6,a===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=a=0);return a===12?(n>>=4,e+=String.fromCharCode(n)):a===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const ln=-1,fn=-2,un=-3,hn=-4,dn=-5,pn=-6,gn=-7;function mn(t,e){if(typeof t=="number")return i(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,a=Array(n.length);let r=null;function i(o,c=!1){if(o===ln)return;if(o===un)return NaN;if(o===hn)return 1/0;if(o===dn)return-1/0;if(o===pn)return-0;if(c||typeof o!="number")throw new Error("Invalid input");if(o in a)return a[o];const s=n[o];if(!s||typeof s!="object")a[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const l=s[0],f=e&&Object.hasOwn(e,l)?e[l]:void 0;if(f){let u=s[1];if(typeof u!="number"&&(u=n.push(s[1])-1),r??(r=new Set),r.has(u))throw new Error("Invalid circular reference");return r.add(u),a[o]=f(i(u)),r.delete(u),a[o]}switch(l){case"Date":a[o]=new Date(s[1]);break;case"Set":const u=new Set;a[o]=u;for(let h=1;h<s.length;h+=1)u.add(i(s[h]));break;case"Map":const m=new Map;a[o]=m;for(let h=1;h<s.length;h+=2)m.set(i(s[h]),i(s[h+1]));break;case"RegExp":a[o]=new RegExp(s[1],s[2]);break;case"Object":const d=Object(s[1]);if(Object.hasOwn(d,"__proto__"))throw new Error("Cannot parse an object with a `__proto__` property");a[o]=d;break;case"BigInt":a[o]=BigInt(s[1]);break;case"null":const p=Object.create(null);a[o]=p;for(let h=1;h<s.length;h+=2){if(s[h]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");p[s[h]]=i(s[h+1])}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{if(n[s[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const h=globalThis[l],w=i(s[1]),_=new h(w);a[o]=s[2]!==void 0?_.subarray(s[2],s[3]):_;break}case"ArrayBuffer":{const h=s[1];if(typeof h!="string")throw new Error("Invalid ArrayBuffer encoding");const w=on(h);a[o]=w;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const h=l.slice(9);a[o]=Temporal[h].from(s[1]);break}case"URL":{const h=new URL(s[1]);a[o]=h;break}case"URLSearchParams":{const h=new URLSearchParams(s[1]);a[o]=h;break}default:throw new Error(`Unknown type ${l}`)}}else if(s[0]===gn){const l=s[1];if(!Number.isInteger(l)||l<0)throw new Error("Invalid input");const f=new Array(l);a[o]=f;for(let u=2;u<s.length;u+=2){const m=s[u];if(!Number.isInteger(m)||m<0||m>=l)throw new Error("Invalid input");f[m]=i(s[u+1])}}else{const l=new Array(s.length);a[o]=l;for(let f=0;f<s.length;f+=1){const u=s[f];u!==fn&&(l[f]=i(u))}}else{const l={};a[o]=l;for(const f of Object.keys(s)){if(f==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const u=s[f];l[f]=i(u)}}return a[o]}return i(0)}const Ee=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ee];const _n=new Set([...Ee]);[..._n];function wn(t){return t.filter(e=>e!=null)}const yn="x-sveltekit-invalidated",vn="x-sveltekit-trailing-slash";function yt(t){return t instanceof Rt||t instanceof qt?t.status:500}function bn(t){return t instanceof qt?t.text:"Internal Error"}let U,rt,jt;const kn=te.toString().includes("$$")||/function \w+\(\) \{\}/.test(te.toString());var st,it,ct,lt,ft,ut,ht,dt,he,pt,de,gt,pe;kn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},rt={current:null},jt={current:!1}):(U=new(he=class{constructor(){P(this,st,j({}));P(this,it,j(null));P(this,ct,j(null));P(this,lt,j({}));P(this,ft,j({id:null}));P(this,ut,j({}));P(this,ht,j(-1));P(this,dt,j(new URL("https://example.com")))}get data(){return N(S(this,st))}set data(e){x(S(this,st),e)}get form(){return N(S(this,it))}set form(e){x(S(this,it),e)}get error(){return N(S(this,ct))}set error(e){x(S(this,ct),e)}get params(){return N(S(this,lt))}set params(e){x(S(this,lt),e)}get route(){return N(S(this,ft))}set route(e){x(S(this,ft),e)}get state(){return N(S(this,ut))}set state(e){x(S(this,ut),e)}get status(){return N(S(this,ht))}set status(e){x(S(this,ht),e)}get url(){return N(S(this,dt))}set url(e){x(S(this,dt),e)}},st=new WeakMap,it=new WeakMap,ct=new WeakMap,lt=new WeakMap,ft=new WeakMap,ut=new WeakMap,ht=new WeakMap,dt=new WeakMap,he),rt=new(de=class{constructor(){P(this,pt,j(null))}get current(){return N(S(this,pt))}set current(e){x(S(this,pt),e)}},pt=new WeakMap,de),jt=new(pe=class{constructor(){P(this,gt,j(!1))}get current(){return N(S(this,gt))}set current(e){x(S(this,gt),e)}},gt=new WeakMap,pe),ke.v=()=>jt.current=!0);function En(t){Object.assign(U,t)}const Sn="/__data.json",An=".html__data.json";function Rn(t){return t.endsWith(".html")?t.replace(/\.html$/,An):t.replace(/\/$/,"")+Sn}const In=new Set(["icon","shortcut icon","apple-touch-icon"]),F=ge(_e)??{},at=ge(me)??{},B={url:re({}),page:re({}),navigating:Mt(null),updated:an()};function Kt(t){F[t]=K()}function Tn(t,e){let n=t+1;for(;F[n];)delete F[n],n+=1;for(n=e+1;at[n];)delete at[n],n+=1}function X(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Se(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(C||"/");t&&await t.update()}}function ae(){}let Yt,$t,vt,D,Dt,R;const bt=[],kt=[];let A=null;function Bt(){var t;(t=A==null?void 0:A.fork)==null||t.then(e=>e==null?void 0:e.discard()),A=null}const mt=new Map,Ae=new Set,Un=new Set,tt=new Set;let y={branch:[],error:null,url:null},Wt=!1,Et=!1,oe=!0,ot=!1,Z=!1,Re=!1,zt=!1,Ie,I,L,G;const et=new Set,se=new Map;async function Xn(t,e,n){var i,o,c,s,l;(i=globalThis.__sveltekit_1troby5)!=null&&i.data&&globalThis.__sveltekit_1troby5.data,document.URL!==location.href&&(location.href=location.href),R=t,await((c=(o=t.hooks).init)==null?void 0:c.call(o)),Yt=tn(t),D=document.documentElement,Dt=e,$t=t.nodes[0],vt=t.nodes[1],$t(),vt(),I=(s=history.state)==null?void 0:s[z],L=(l=history.state)==null?void 0:l[nt],I||(I=L=Date.now(),history.replaceState({...history.state,[z]:I,[nt]:L},""));const a=F[I];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Mn(Dt,n)):(await H({type:"enter",url:ye(R.hash?qn(new URL(location.href)):location.href),replace_state:!0}),r()),Fn()}function Ln(){bt.length=0,zt=!1}function Te(t){kt.some(e=>e==null?void 0:e.snapshot)&&(at[t]=kt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ue(t){var e;(e=at[t])==null||e.forEach((n,a)=>{var r,i;(i=(r=kt[a])==null?void 0:r.snapshot)==null||i.restore(n)})}function ie(){Kt(I),ee(_e,F),Te(L),ee(me,at)}async function Cn(t,e,n,a){let r;e.invalidateAll&&Bt(),await H({type:"goto",url:ye(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:a,accept:()=>{e.invalidateAll&&(zt=!0,r=[...se.keys()]),e.invalidate&&e.invalidate.forEach(Bn)}}),e.invalidateAll&&_t().then(_t).then(()=>{se.forEach(({resource:i},o)=>{var c;r!=null&&r.includes(o)&&((c=i.refresh)==null||c.call(i))})})}async function Pn(t){if(t.id!==(A==null?void 0:A.id)){Bt();const e={};et.add(e),A={id:t.id,token:e,promise:Ce({...t,preload:e}).then(n=>(et.delete(e),n.type==="loaded"&&n.state.error&&Bt(),n)),fork:null}}return A.promise}async function Nt(t){var n;const e=(n=await Lt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(a=>a[1]()))}async function Le(t,e,n){var r;y=t.state;const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(U,t.props.page),Ie=new R.root({target:e,props:{...t.props,stores:B,components:kt},hydrate:n,sync:!1}),await Promise.resolve(),Ue(L),n){const i={from:null,to:{params:y.params,route:{id:((r=y.route)==null?void 0:r.id)??null},url:new URL(location.href),scroll:F[I]??K()},willUnload:!1,type:"enter",complete:Promise.resolve()};tt.forEach(o=>o(i))}Et=!0}function St({url:t,params:e,branch:n,status:a,error:r,route:i,form:o}){let c="never";if(C&&(t.pathname===C||t.pathname===C+"/"))c="always";else for(const d of n)(d==null?void 0:d.slash)!==void 0&&(c=d.slash);t.pathname=Fe(t.pathname,c),t.search=t.search;const s={type:"loaded",state:{url:t,params:e,branch:n,error:r,route:i},props:{constructors:wn(n).map(d=>d.node.component),page:Zt(U)}};o!==void 0&&(s.props.form=o);let l={},f=!U,u=0;for(let d=0;d<Math.max(n.length,y.branch.length);d+=1){const p=n[d],h=y.branch[d];(p==null?void 0:p.data)!==(h==null?void 0:h.data)&&(f=!0),p&&(l={...l,...p.data},f&&(s.props[`data_${u}`]=l),u+=1)}return(!y.url||t.href!==y.url.href||y.error!==r||o!==void 0&&o!==U.form||f)&&(s.props.page={error:r,params:e,route:{id:(i==null?void 0:i.id)??null},state:{},status:a,url:new URL(t),form:o??null,data:f?l:U.data}),s}async function Ht({loader:t,parent:e,url:n,params:a,route:r,server_data_node:i}){var l,f;let o=null;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await t();return{node:s,loader:t,server:i,universal:(l=s.universal)!=null&&l.load?{type:"data",data:o,uses:c}:null,data:o??(i==null?void 0:i.data)??null,slash:((f=s.universal)==null?void 0:f.trailingSlash)??(i==null?void 0:i.slash)}}function On(t,e,n){let a=t instanceof Request?t.url:t;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const i=Et?ze(a,r.href,e):We(a,e);return{resolved:r,promise:i}}function ce(t,e,n,a,r,i){if(zt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&e||r.url&&n)return!0;for(const o of r.search_params)if(a.has(o))return!0;for(const o of r.params)if(i[o]!==y.params[o])return!0;for(const o of r.dependencies)if(bt.some(c=>c(new URL(o))))return!0;return!1}function Jt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function jn(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const a of n){const r=t.searchParams.getAll(a),i=e.searchParams.getAll(a);r.every(o=>i.includes(o))&&i.every(o=>r.includes(o))&&n.delete(a)}return n}function le({error:t,url:e,route:n,params:a}){return{type:"loaded",state:{error:t,url:e,route:n,params:a,branch:[]},props:{page:Zt(U),constructors:[]}}}async function Ce({id:t,invalidating:e,url:n,params:a,route:r,preload:i}){if((A==null?void 0:A.id)===t)return et.delete(A.token),A.promise;const{errors:o,layouts:c,leaf:s}=r,l=[...c,s];o.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let f=null;const u=y.url?t!==At(y.url):!1,m=y.route?r.id!==y.route.id:!1,d=jn(y.url,n);let p=!1;{const g=l.map((v,b)=>{var E;const k=y.branch[b],O=!!(v!=null&&v[0])&&((k==null?void 0:k.loader)!==v[1]||ce(p,m,u,d,(E=k.server)==null?void 0:E.uses,a));return O&&(p=!0),O});if(g.some(Boolean)){try{f=await je(n,g)}catch(v){const b=await J(v,{url:n,params:a,route:{id:t}});return et.has(i)?le({error:b,url:n,params:a,route:r}):Ut({status:yt(v),error:b,url:n,route:r})}if(f.type==="redirect")return f}}const h=f==null?void 0:f.nodes;let w=!1;const _=l.map(async(g,v)=>{var E;if(!g)return;const b=y.branch[v],k=h==null?void 0:h[v];if((!k||k.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!ce(w,m,u,d,(E=b.universal)==null?void 0:E.uses,a))return b;if(w=!0,(k==null?void 0:k.type)==="error")throw k;return Ht({loader:g[1],url:n,params:a,route:r,parent:async()=>{var $;const M={};for(let V=0;V<v;V+=1)Object.assign(M,($=await _[V])==null?void 0:$.data);return M},server_data_node:Jt(k===void 0&&g[0]?{type:"skip"}:k??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of _)g.catch(()=>{});const T=[];for(let g=0;g<l.length;g+=1)if(l[g])try{T.push(await _[g])}catch(v){if(v instanceof Vt)return{type:"redirect",location:v.location};if(et.has(i))return le({error:await J(v,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let b=yt(v),k;if(h!=null&&h.includes(v))b=v.status??b,k=v.error;else if(v instanceof Rt)k=v.body;else{if(await B.updated.check())return await Se(),await X(n);k=await J(v,{params:a,url:n,route:{id:r.id}})}const O=await Nn(g,T,o);return O?St({url:n,params:a,branch:T.slice(0,O.idx).concat(O.node),status:b,error:k,route:r}):await Oe(n,{id:r.id},k,b)}else T.push(void 0);return St({url:n,params:a,branch:T,status:200,error:null,route:r,form:e?void 0:null})}async function Nn(t,e,n){for(;t--;)if(n[t]){let a=t;for(;!e[a];)a-=1;try{return{idx:a+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Ut({status:t,error:e,url:n,route:a}){const r={};let i=null;if(R.server_loads[0]===0)try{const c=await je(n,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;i=c.nodes[0]??null}catch{(n.origin!==It||n.pathname!==location.pathname||Wt)&&await X(n)}try{const o=await Ht({loader:$t,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Jt(i)}),c={node:await vt(),loader:vt,universal:null,server:null,data:null};return St({url:n,params:r,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof Vt)return Cn(new URL(o.location,location.href),{},0);throw o}}async function xn(t){const e=t.href;if(mt.has(e))return mt.get(e);let n;try{const a=(async()=>{let r=await R.hooks.reroute({url:new URL(t),fetch:async(i,o)=>On(i,o,t).promise})??t;if(typeof r=="string"){const i=new URL(t);R.hash?i.hash=r:i.pathname=r,r=i}return r})();mt.set(e,a),n=await a}catch{mt.delete(e);return}return n}async function Lt(t,e){if(t&&!Tt(t,C,R.hash)){const n=await xn(t);if(!n)return;const a=$n(n);for(const r of Yt){const i=r.exec(a);if(i)return{id:At(t),invalidating:e,route:r,params:Ve(i),url:t}}}}function $n(t){return Me(R.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(C.length))||"/"}function At(t){return(R.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Pe({url:t,type:e,intent:n,delta:a,event:r,scroll:i}){let o=!1;const c=Xt(y,n,t,e,i??null);a!==void 0&&(c.navigation.delta=a),r!==void 0&&(c.navigation.event=r);const s={...c.navigation,cancel:()=>{o=!0,c.reject(new Error("navigation cancelled"))}};return ot||Ae.forEach(l=>l(s)),o?null:c}async function H({type:t,url:e,popped:n,keepfocus:a,noscroll:r,replace_state:i,state:o={},redirect_count:c=0,nav_token:s={},accept:l=ae,block:f=ae,event:u}){var O;const m=G;G=s;const d=await Lt(e,!1),p=t==="enter"?Xt(y,d,e,t):Pe({url:e,type:t,delta:n==null?void 0:n.delta,intent:d,scroll:n==null?void 0:n.scroll,event:u});if(!p){f(),G===s&&(G=m);return}const h=I,w=L;l(),ot=!0,Et&&p.navigation.type!=="enter"&&B.navigating.set(rt.current=p.navigation);let _=d&&await Ce(d);if(!_){if(Tt(e,C,R.hash))return await X(e,i);_=await Oe(e,{id:null},await J(new qt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,i)}if(e=(d==null?void 0:d.url)||e,G!==s)return p.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(c<20){await H({type:t,url:new URL(_.location,e),popped:n,keepfocus:a,noscroll:r,replace_state:i,state:o,redirect_count:c+1,nav_token:s}),p.fulfil(void 0);return}_=await Ut({status:500,error:await J(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else _.props.page.status>=400&&await B.updated.check()&&(await Se(),await X(e,i));if(Ln(),Kt(h),Te(w),_.props.page.url.pathname!==e.pathname&&(e.pathname=_.props.page.url.pathname),o=n?n.state:o,!n){const E=i?0:1,M={[z]:I+=E,[nt]:L+=E,[we]:o};(i?history.replaceState:history.pushState).call(history,M,"",e),i||Tn(I,L)}const T=d&&(A==null?void 0:A.id)===d.id?A.fork:null;A=null,_.props.page.state=o;let g;if(Et){const E=(await Promise.all(Array.from(Un,$=>$(p.navigation)))).filter($=>typeof $=="function");if(E.length>0){let $=function(){E.forEach(V=>{tt.delete(V)})};E.push($),E.forEach(V=>{tt.add(V)})}y=_.state,_.props.page&&(_.props.page.url=e);const M=T&&await T;M?g=M.commit():(Ie.$set(_.props),En(_.props.page),g=(O=Be)==null?void 0:O()),Re=!0}else await Le(_,Dt,!1);const{activeElement:v}=document;await g,await _t(),await _t();let b=null;if(oe){const E=n?n.scroll:r?K():null;E?scrollTo(E.x,E.y):(b=e.hash&&document.getElementById(xe(e)))?b.scrollIntoView():scrollTo(0,0)}const k=document.activeElement!==v&&document.activeElement!==document.body;!a&&!k&&Vn(e,!b),oe=!0,_.props.page&&Object.assign(U,_.props.page),ot=!1,t==="popstate"&&Ue(L),p.fulfil(void 0),p.navigation.to&&(p.navigation.to.scroll=K()),tt.forEach(E=>E(p.navigation)),B.navigating.set(rt.current=null)}async function Oe(t,e,n,a,r){return t.origin===It&&t.pathname===location.pathname&&!Wt?await Ut({status:a,error:n,url:t,route:e}):await X(t,r)}function Dn(){let t,e={element:void 0,href:void 0},n;D.addEventListener("mousemove",c=>{const s=c.target;clearTimeout(t),t=setTimeout(()=>{i(s,q.hover)},20)});function a(c){c.defaultPrevented||i(c.composedPath()[0],q.tap)}D.addEventListener("mousedown",a),D.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(c=>{for(const s of c)s.isIntersecting&&(Nt(new URL(s.target.href)),r.unobserve(s.target))},{threshold:0});async function i(c,s){const l=be(c,D),f=l===e.element&&(l==null?void 0:l.href)===e.href&&s>=n;if(!l||f)return;const{url:u,external:m,download:d}=xt(l,C,R.hash);if(m||d)return;const p=wt(l),h=u&&At(y.url)===At(u);if(!(p.reload||h))if(s<=p.preload_data){e={element:l,href:l.href},n=q.tap;const w=await Lt(u,!1);if(!w)return;Pn(w)}else s<=p.preload_code&&(e={element:l,href:l.href},n=s,Nt(u))}function o(){r.disconnect();for(const c of D.querySelectorAll("a")){const{url:s,external:l,download:f}=xt(c,C,R.hash);if(l||f)continue;const u=wt(c);u.reload||(u.preload_code===q.viewport&&r.observe(c),u.preload_code===q.eager&&Nt(s))}}tt.add(o),o()}function J(t,e){if(t instanceof Rt)return t.body;const n=yt(t),a=bn(t);return R.hooks.handleError({error:t,event:e,status:n,message:a})??{message:a}}function Bn(t){if(typeof t=="function")bt.push(t);else{const{href:e}=new URL(t,location.href);bt.push(n=>n.href===e)}}function Fn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(ie(),!ot){const r=Xt(y,void 0,null,"leave"),i={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Ae.forEach(o=>o(i))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ie()}),(e=navigator.connection)!=null&&e.saveData||Dn(),D.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=be(n.composedPath()[0],D);if(!a)return;const{url:r,external:i,target:o,download:c}=xt(a,C,R.hash);if(!r)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const s=wt(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||c)return;const[f,u]=(R.hash?r.hash.replace(/^#/,""):r.href).split("#"),m=f===Pt(location);if(i||s.reload&&(!m||!u)){Pe({url:r,type:"link",event:n})?ot=!0:n.preventDefault();return}if(u!==void 0&&m){const[,d]=y.url.href.split("#");if(d===u){if(n.preventDefault(),u===""||u==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=a.ownerDocument.getElementById(decodeURIComponent(u));p&&(p.scrollIntoView(),p.focus())}return}if(Z=!0,Kt(I),t(r),!s.replace_state)return;Z=!1}n.preventDefault(),await new Promise(d=>{requestAnimationFrame(()=>{setTimeout(d,0)}),setTimeout(d,100)}),await H({type:"link",url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:n})}),D.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const c=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(Tt(c,C,!1))return;const s=n.target,l=wt(s);if(l.reload)return;n.preventDefault(),n.stopPropagation();const f=new FormData(s,r);c.search=new URLSearchParams(f).toString(),H({type:"form",url:c,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??c.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!Ft){if((a=n.state)!=null&&a[z]){const r=n.state[z];if(G={},r===I)return;const i=F[r],o=n.state[we]??{},c=new URL(n.state[rn]??location.href),s=n.state[nt],l=y.url?Pt(location)===Pt(y.url):!1;if(s===L&&(Re||l)){o!==U.state&&(U.state=o),t(c),F[I]=K(),i&&scrollTo(i.x,i.y),I=r;return}const u=r-I;await H({type:"popstate",url:c,popped:{state:o,scroll:i,delta:u},accept:()=>{I=r,L=s},block:()=>{history.go(-u)},nav_token:G,event:n})}else if(!Z){const r=new URL(location.href);t(r),R.hash&&location.reload()}}}),addEventListener("hashchange",()=>{Z&&(Z=!1,history.replaceState({...history.state,[z]:++I,[nt]:L},"",location.href))});for(const n of document.querySelectorAll("link"))In.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&B.navigating.set(rt.current=null)});function t(n){y.url=U.url=n,B.page.set(Zt(U)),B.page.notify()}}async function Mn(t,{status:e=200,error:n,node_ids:a,params:r,route:i,server_route:o,data:c,form:s}){Wt=!0;const l=new URL(location.href);let f;({params:r={},route:i={id:null}}=await Lt(l,!1)||{}),f=Yt.find(({id:d})=>d===i.id);let u,m=!0;try{const d=a.map(async(h,w)=>{const _=c[w];return _!=null&&_.uses&&(_.uses=Ne(_.uses)),Ht({loader:R.nodes[h],url:l,params:r,route:i,parent:async()=>{const T={};for(let g=0;g<w;g+=1)Object.assign(T,(await d[g]).data);return T},server_data_node:Jt(_)})}),p=await Promise.all(d);if(f){const h=f.layouts;for(let w=0;w<h.length;w++)h[w]||p.splice(w,0,void 0)}u=St({url:l,params:r,branch:p,status:e,error:n,form:s,route:f??null})}catch(d){if(d instanceof Vt){await X(new URL(d.location,location.href));return}u=await Ut({status:yt(d),error:await J(d,{url:l,params:r,route:i}),url:l,route:i}),t.textContent="",m=!1}u.props.page&&(u.props.page.state={}),await Le(u,t,m)}async function je(t,e){var i;const n=new URL(t);n.pathname=Rn(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(vn,"1"),n.searchParams.append(yn,e.map(o=>o?"1":"0").join(""));const a=window.fetch,r=await a(n.href,{});if(!r.ok){let o;throw(i=r.headers.get("content-type"))!=null&&i.includes("application/json")?o=await r.json():r.status===404?o="Not Found":r.status===500&&(o="Internal Error"),new Rt(r.status,o)}return new Promise(async o=>{var u;const c=new Map,s=r.body.getReader();function l(m){return mn(m,{...R.decoders,Promise:d=>new Promise((p,h)=>{c.set(d,{fulfil:p,reject:h})})})}let f="";for(;;){const{done:m,value:d}=await s.read();if(m&&!f)break;for(f+=!d&&f?`
2
- `:Ge.decode(d,{stream:!0});;){const p=f.indexOf(`
3
- `);if(p===-1)break;const h=JSON.parse(f.slice(0,p));if(f=f.slice(p+1),h.type==="redirect")return o(h);if(h.type==="data")(u=h.nodes)==null||u.forEach(w=>{(w==null?void 0:w.type)==="data"&&(w.uses=Ne(w.uses),w.data=l(w.data))}),o(h);else if(h.type==="chunk"){const{id:w,data:_,error:T}=h,g=c.get(w);c.delete(w),T?g.reject(l(T)):g.fulfil(l(_))}}}})}function Ne(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Ft=!1;function Vn(t,e=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=xe(t);if(a&&document.getElementById(a)){const{x:i,y:o}=K();setTimeout(()=>{const c=history.state;Ft=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(c,"",t),e&&scrollTo(i,o),Ft=!1})}else{const i=document.body,o=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),o!==null?i.setAttribute("tabindex",o):i.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const i=[];for(let o=0;o<r.rangeCount;o+=1)i.push(r.getRangeAt(o));setTimeout(()=>{if(r.rangeCount===i.length){for(let o=0;o<r.rangeCount;o+=1){const c=i[o],s=r.getRangeAt(o);if(c.commonAncestorContainer!==s.commonAncestorContainer||c.startContainer!==s.startContainer||c.endContainer!==s.endContainer||c.startOffset!==s.startOffset||c.endOffset!==s.endOffset)return}r.removeAllRanges()}})}}}function Xt(t,e,n,a,r=null){var l,f;let i,o;const c=new Promise((u,m)=>{i=u,o=m});return c.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url,scroll:K()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((f=e==null?void 0:e.route)==null?void 0:f.id)??null},url:n,scroll:r},willUnload:!e,type:a,complete:c},fulfil:i,reject:o}}function Zt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function qn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function xe(t){let e;if(R.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Xn as a,Wn as l,U as p,B as s};
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/C88p_n1l.js";export{o as load_css,r as start};