@sqg/sqg 0.21.0 → 0.22.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.
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
  import { LRParser } from "@lezer/lr";
5
5
  import { homedir } from "node:os";
6
6
  import { basename, dirname, extname, join, relative, resolve } from "node:path";
7
- import { camelCase, pascalCase, snakeCase } from "es-toolkit/string";
7
+ import { camelCase, escapeRegExp, pascalCase, snakeCase } from "es-toolkit/string";
8
8
  import Handlebars from "handlebars";
9
9
  import YAML from "yaml";
10
10
  import { z } from "zod";
@@ -252,6 +252,15 @@ Modifiers:
252
252
  Exception: SELECT * matching a -- TABLE schema (same columns,
253
253
  same order) auto-uses the table's row type with no annotation.
254
254
 
255
+ Generator config (sqg.yaml, under gen[].config):
256
+ package Java package name for generated classes (Java only)
257
+ migrations true → generate applyMigrations() with built-in tracking
258
+ observer true → generate an optional instrumentation hook (Java only).
259
+ Emits a shared SqgObserver interface + a (Connection, SqgObserver)
260
+ constructor; the hook wraps every QUERY/EXEC/:batch with a
261
+ start(queryName) → Scope.end(rowCount, error) callback for
262
+ tracing/metrics/logging. Off by default (zero overhead, no diff).
263
+
255
264
  Example:
256
265
  -- MIGRATE 1
257
266
  CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);
@@ -1017,6 +1026,9 @@ var BaseGenerator = class {
1017
1026
  listType(column) {
1018
1027
  return this.typeMapper.listType(column);
1019
1028
  }
1029
+ auxiliaryFiles(_gen) {
1030
+ return [];
1031
+ }
1020
1032
  async beforeGenerate(_projectDir, _gen, _queries, _tables) {}
1021
1033
  isCompatibleWith(_engine) {
1022
1034
  return true;
@@ -1041,6 +1053,48 @@ var BaseGenerator = class {
1041
1053
  };
1042
1054
  //#endregion
1043
1055
  //#region src/generators/java-generator.ts
1056
+ /** True when the instrumentation observer seam is opted in via config. */
1057
+ function observerEnabledFor(gen) {
1058
+ return gen.config?.observer === true;
1059
+ }
1060
+ /** Render the shared `SqgObserver` interface emitted once per output package. */
1061
+ function renderObserverInterface(pkg) {
1062
+ return `// GENERATED by sqg -- do not edit.
1063
+ ${pkg ? `package ${pkg};\n\n` : ""}/**
1064
+ * Optional instrumentation hook for generated database operations.
1065
+ *
1066
+ * <p>Implement this to observe every generated query/exec (tracing spans,
1067
+ * timers, logging). SQG depends on no tracing library; map this to Brave,
1068
+ * OpenTelemetry, Dropwizard, or plain logging in your application.
1069
+ *
1070
+ * <p>A no-op when no observer is passed to the generated accessor's constructor.
1071
+ */
1072
+ @FunctionalInterface
1073
+ public interface SqgObserver {
1074
+ /**
1075
+ * Called immediately before a generated operation runs.
1076
+ *
1077
+ * @param queryName the logical query/exec name (e.g. "trackedKeywordsWithRanks")
1078
+ * @return a handle for the in-flight operation whose {@code end} is invoked
1079
+ * once, in a finally, after the operation completes; return {@code null}
1080
+ * to ignore this operation.
1081
+ */
1082
+ Scope start(String queryName);
1083
+
1084
+ /** Handle for a single in-flight operation. */
1085
+ @FunctionalInterface
1086
+ interface Scope {
1087
+ /**
1088
+ * Called once, in a finally, after the operation completes.
1089
+ *
1090
+ * @param rowCount affected/returned rows, or -1 if not applicable
1091
+ * @param error the failure that aborted the operation, or null on success
1092
+ */
1093
+ void end(long rowCount, Throwable error);
1094
+ }
1095
+ }
1096
+ `;
1097
+ }
1044
1098
  var JavaGenerator = class extends BaseGenerator {
1045
1099
  engine;
1046
1100
  /** Query ids that should emit their row-type record declaration (set per render). */
@@ -1095,7 +1149,9 @@ var JavaGenerator = class extends BaseGenerator {
1095
1149
  if (readExpr !== null) return readExpr;
1096
1150
  return this.typeMapper.parseValue(column, `rs.getObject(${idx})`, path);
1097
1151
  }
1098
- async beforeGenerate(_projectDir, _gen, queries, tables) {
1152
+ async beforeGenerate(_projectDir, gen, queries, tables) {
1153
+ const observerEnabled = observerEnabledFor(gen);
1154
+ Handlebars.registerHelper("observerEnabled", () => observerEnabled);
1099
1155
  this.declareTypeOwners = /* @__PURE__ */ new Set();
1100
1156
  const seenRowTypes = /* @__PURE__ */ new Set();
1101
1157
  const tableRowTypes = new Set(this.supportsAppenders(this.engine) ? tables.filter((t) => t.hasAppender).map((t) => this.getClassName(`${t.id}_row`)) : []);
@@ -1204,6 +1260,13 @@ var JavaGenerator = class extends BaseGenerator {
1204
1260
  return `new ${rowType}(${result.join(",\n")})`;
1205
1261
  });
1206
1262
  }
1263
+ auxiliaryFiles(gen) {
1264
+ if (!observerEnabledFor(gen)) return [];
1265
+ return [{
1266
+ filename: "SqgObserver.java",
1267
+ content: renderObserverInterface(gen.config?.package)
1268
+ }];
1269
+ }
1207
1270
  async afterGenerate(outputPath) {
1208
1271
  try {
1209
1272
  consola.debug("Formatting file:", outputPath);
@@ -1931,8 +1994,20 @@ async function preparePostgresSources(sources, queries, reporter) {
1931
1994
  };
1932
1995
  try {
1933
1996
  for (const source of sources) {
1997
+ if (source.url) {
1998
+ attachments.push({
1999
+ alias: source.name,
2000
+ connectionUri: source.url
2001
+ });
2002
+ continue;
2003
+ }
1934
2004
  reporter?.onContainerStarting?.();
1935
- const container = await new PostgreSqlContainer(source.image).withDatabase("sqg-db").withUsername("sqg").withPassword("secret").start();
2005
+ let container;
2006
+ try {
2007
+ container = await new PostgreSqlContainer(source.image).withDatabase("sqg-db").withUsername("sqg").withPassword("secret").start();
2008
+ } catch (e) {
2009
+ throw new DatabaseError(`Could not start a Postgres container for source '${source.name}': ${e.message}`, "postgres", "Postgres sources need Docker to introspect schema. Start Docker, or set 'url' on the source to point at an existing Postgres database (e.g. url: $DATABASE_URL).");
2010
+ }
1936
2011
  containers.push(container);
1937
2012
  const connectionUri = container.getConnectionUri();
1938
2013
  reporter?.onContainerStarted?.(connectionUri);
@@ -2178,15 +2253,16 @@ const ProjectSchema = z.object({
2178
2253
  template: z.string().optional().describe("Custom Handlebars template path"),
2179
2254
  output: z.string().min(1, "Output path is required").describe("Output file or directory path"),
2180
2255
  config: z.any().optional().describe("Generator-specific configuration")
2181
- })).min(1, "At least one generator is required").describe("Code generators to run")
2182
- })).min(1, "At least one SQL configuration is required").describe("SQL file configurations"),
2256
+ }).strict()).min(1, "At least one generator is required").describe("Code generators to run")
2257
+ }).strict()).min(1, "At least one SQL configuration is required").describe("SQL file configurations"),
2183
2258
  sources: z.array(z.object({
2184
2259
  type: z.enum(["file", "postgres"]).optional().describe("Source type: 'file' (default) or 'postgres'"),
2185
2260
  path: z.string().optional().describe("Path to source file for file sources (supports $HOME)"),
2186
2261
  name: z.string().optional().describe("Variable name (file sources) or DuckDB attach alias (postgres sources)"),
2187
- image: z.string().optional().describe("Docker image for postgres sources (default: postgres:16-alpine)")
2188
- }).refine((s) => s.type === "postgres" ? !!s.name : !!s.path, { message: "file sources require 'path'; postgres sources require 'name'" })).optional().describe("External sources: files inlined as variables, or postgres databases attached for introspection")
2189
- });
2262
+ image: z.string().optional().describe("Docker image for postgres sources (default: postgres:16-alpine)"),
2263
+ url: z.string().optional().describe("Postgres source: connect to this existing database for introspection instead of starting a container. Use a literal DSN or '$ENV_VAR' to read from the environment. When set, ':source=' BASELINE blocks are not applied (the live schema is used), which avoids schema drift.")
2264
+ }).strict().refine((s) => s.type === "postgres" ? !!s.name : !!s.path, { message: "file sources require 'path'; postgres sources require 'name'" })).optional().describe("External sources: files inlined as variables, or postgres databases attached for introspection")
2265
+ }).strict();
2190
2266
  var ExtraVariable = class {
2191
2267
  constructor(name, value) {
2192
2268
  this.name = name;
@@ -2202,11 +2278,25 @@ function createExtraVariables(sources, suppressLogging = false) {
2202
2278
  return new ExtraVariable(varName, `'${resolvedPath}'`);
2203
2279
  });
2204
2280
  }
2281
+ /**
2282
+ * Resolve a postgres source `url`. A value of the form `$VAR` or `${VAR}` is
2283
+ * read from the environment (so credentials need not live in sqg.yaml); any
2284
+ * other value is treated as a literal DSN.
2285
+ */
2286
+ function resolveSourceUrl(url, sourceName) {
2287
+ const match = url.match(/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/);
2288
+ if (!match) return url;
2289
+ const envName = match[1];
2290
+ const value = process.env[envName];
2291
+ if (!value) throw new SqgError(`Postgres source '${sourceName}' references environment variable '${envName}' which is not set`, "CONFIG_VALIDATION_ERROR", `Set ${envName} to the database connection string, or use a literal DSN in the 'url' field`);
2292
+ return value;
2293
+ }
2205
2294
  /** Postgres sources resolved from the project config (with image defaulted). */
2206
2295
  function getPostgresSources(sources) {
2207
2296
  return sources.filter((source) => source.type === "postgres").map((source) => ({
2208
2297
  name: source.name,
2209
- image: source.image ?? "postgres:16-alpine"
2298
+ image: source.image ?? "postgres:16-alpine",
2299
+ url: source.url ? resolveSourceUrl(source.url, source.name) : void 0
2210
2300
  }));
2211
2301
  }
2212
2302
  function buildProjectFromCliOptions(options) {
@@ -2416,7 +2506,14 @@ async function writeGeneratedFile(projectDir, gen, generator, file, queries, tab
2416
2506
  const outputPath = getOutputPath(projectDir, name, gen, generator);
2417
2507
  writeFileSync(outputPath, sourceFile);
2418
2508
  await generator.afterGenerate(outputPath);
2419
- return outputPath;
2509
+ const written = [outputPath];
2510
+ const outputDir = dirname(outputPath);
2511
+ for (const aux of generator.auxiliaryFiles(gen)) {
2512
+ const auxPath = join(outputDir, aux.filename);
2513
+ writeFileSync(auxPath, aux.content);
2514
+ written.push(auxPath);
2515
+ }
2516
+ return written;
2420
2517
  }
2421
2518
  /**
2422
2519
  * Validate project configuration from a Project object without executing queries
@@ -2535,6 +2632,11 @@ async function processProjectFromConfig(project, projectDir, writeToStdout = fal
2535
2632
  if (e instanceof SqgError) throw e;
2536
2633
  throw SqgError.inFile(`Failed to parse SQL file: ${e.message}`, "SQL_PARSE_ERROR", sqlFile, { suggestion: "Check SQL syntax and annotation format" });
2537
2634
  }
2635
+ const referencedPgSources = pgSources.filter((source) => {
2636
+ const catalogRef = new RegExp(`\\b${escapeRegExp(source.name)}\\.`);
2637
+ return queries.some((q) => q.sourceTarget === source.name || catalogRef.test(q.rawQuery));
2638
+ });
2639
+ const referencedPgSourceNames = referencedPgSources.map((s) => s.name);
2538
2640
  for (const [engine, gens] of gensByEngine) {
2539
2641
  const executableQueries = queries.filter((q) => !q.skipGenerateFunction);
2540
2642
  const reporterAny = reporter;
@@ -2543,9 +2645,9 @@ async function processProjectFromConfig(project, projectDir, writeToStdout = fal
2543
2645
  try {
2544
2646
  const dbEngine = getDatabaseEngine(engine);
2545
2647
  let attachments;
2546
- if (engine === "duckdb" && pgSources.length > 0) {
2648
+ if (engine === "duckdb" && referencedPgSources.length > 0) {
2547
2649
  ui?.startPhase("Starting postgres source containers...");
2548
- preparedSources = await preparePostgresSources(pgSources, queries, reporter);
2650
+ preparedSources = await preparePostgresSources(referencedPgSources, queries, reporter);
2549
2651
  attachments = preparedSources.attachments;
2550
2652
  }
2551
2653
  ui?.startPhase(`Initializing ${engine} database...`);
@@ -2573,14 +2675,14 @@ async function processProjectFromConfig(project, projectDir, writeToStdout = fal
2573
2675
  const genStart = performance.now();
2574
2676
  for (const gen of gens) {
2575
2677
  const generator = getGenerator(gen.generator);
2576
- const outputPath = await writeGeneratedFile(projectDir, {
2678
+ const outputPaths = await writeGeneratedFile(projectDir, {
2577
2679
  ...gen,
2578
2680
  projectName: project.name
2579
- }, generator, sqlFile, queries, tables, engine, writeToStdout, pgSources.map((s) => s.name));
2580
- if (outputPath !== null) {
2581
- files.push(outputPath);
2681
+ }, generator, sqlFile, queries, tables, engine, writeToStdout, referencedPgSourceNames);
2682
+ if (outputPaths !== null) {
2683
+ for (const path of outputPaths) if (!files.includes(path)) files.push(path);
2582
2684
  results.push({
2583
- outputPath,
2685
+ outputPath: outputPaths[0],
2584
2686
  queryCount: executableQueries.length,
2585
2687
  enumCount: countEnums(queries),
2586
2688
  sqlFile,
@@ -2813,8 +2915,12 @@ function parseSQLQueries(filePath, extraVariables) {
2813
2915
  });
2814
2916
  }
2815
2917
  trim() {
2816
- const lastPart = this.sqlParts.length > 0 ? this.sqlParts[this.sqlParts.length - 1] : null;
2817
- if (lastPart && typeof lastPart === "string") this.sqlParts[this.sqlParts.length - 1] = lastPart.trimEnd();
2918
+ const isBlankString = (p) => typeof p === "string" && p.trim() === "";
2919
+ while (this.sqlParts.length > 0 && isBlankString(this.sqlParts[0])) this.sqlParts.shift();
2920
+ if (this.sqlParts.length > 0 && typeof this.sqlParts[0] === "string") this.sqlParts[0] = this.sqlParts[0].trimStart();
2921
+ while (this.sqlParts.length > 0 && isBlankString(this.sqlParts[this.sqlParts.length - 1])) this.sqlParts.pop();
2922
+ const lastIdx = this.sqlParts.length - 1;
2923
+ if (lastIdx >= 0 && typeof this.sqlParts[lastIdx] === "string") this.sqlParts[lastIdx] = this.sqlParts[lastIdx].trimEnd();
2818
2924
  }
2819
2925
  parameters() {
2820
2926
  return this.sqlParts.filter((part) => typeof part !== "string" && !part.name.startsWith("sources_"));
package/dist/sqg.mjs CHANGED
@@ -13,7 +13,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
13
13
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
14
14
  import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema } from "@modelcontextprotocol/sdk/types.js";
15
15
  import YAML from "yaml";
16
- import { camelCase, pascalCase, snakeCase } from "es-toolkit/string";
16
+ import { camelCase, escapeRegExp, pascalCase, snakeCase } from "es-toolkit/string";
17
17
  import Handlebars from "handlebars";
18
18
  import { z } from "zod";
19
19
  import { DuckDBEnumType, DuckDBInstance, DuckDBListType, DuckDBMapType, DuckDBStructType } from "@duckdb/node-api";
@@ -244,6 +244,15 @@ Modifiers:
244
244
  Exception: SELECT * matching a -- TABLE schema (same columns,
245
245
  same order) auto-uses the table's row type with no annotation.
246
246
 
247
+ Generator config (sqg.yaml, under gen[].config):
248
+ package Java package name for generated classes (Java only)
249
+ migrations true → generate applyMigrations() with built-in tracking
250
+ observer true → generate an optional instrumentation hook (Java only).
251
+ Emits a shared SqgObserver interface + a (Connection, SqgObserver)
252
+ constructor; the hook wraps every QUERY/EXEC/:batch with a
253
+ start(queryName) → Scope.end(rowCount, error) callback for
254
+ tracing/metrics/logging. Off by default (zero overhead, no diff).
255
+
247
256
  Example:
248
257
  -- MIGRATE 1
249
258
  CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);
@@ -949,8 +958,12 @@ function parseSQLQueries(filePath, extraVariables) {
949
958
  });
950
959
  }
951
960
  trim() {
952
- const lastPart = this.sqlParts.length > 0 ? this.sqlParts[this.sqlParts.length - 1] : null;
953
- if (lastPart && typeof lastPart === "string") this.sqlParts[this.sqlParts.length - 1] = lastPart.trimEnd();
961
+ const isBlankString = (p) => typeof p === "string" && p.trim() === "";
962
+ while (this.sqlParts.length > 0 && isBlankString(this.sqlParts[0])) this.sqlParts.shift();
963
+ if (this.sqlParts.length > 0 && typeof this.sqlParts[0] === "string") this.sqlParts[0] = this.sqlParts[0].trimStart();
964
+ while (this.sqlParts.length > 0 && isBlankString(this.sqlParts[this.sqlParts.length - 1])) this.sqlParts.pop();
965
+ const lastIdx = this.sqlParts.length - 1;
966
+ if (lastIdx >= 0 && typeof this.sqlParts[lastIdx] === "string") this.sqlParts[lastIdx] = this.sqlParts[lastIdx].trimEnd();
954
967
  }
955
968
  parameters() {
956
969
  return this.sqlParts.filter((part) => typeof part !== "string" && !part.name.startsWith("sources_"));
@@ -2265,6 +2278,9 @@ var BaseGenerator = class {
2265
2278
  listType(column) {
2266
2279
  return this.typeMapper.listType(column);
2267
2280
  }
2281
+ auxiliaryFiles(_gen) {
2282
+ return [];
2283
+ }
2268
2284
  async beforeGenerate(_projectDir, _gen, _queries, _tables) {}
2269
2285
  isCompatibleWith(_engine) {
2270
2286
  return true;
@@ -2289,6 +2305,48 @@ var BaseGenerator = class {
2289
2305
  };
2290
2306
  //#endregion
2291
2307
  //#region src/generators/java-generator.ts
2308
+ /** True when the instrumentation observer seam is opted in via config. */
2309
+ function observerEnabledFor(gen) {
2310
+ return gen.config?.observer === true;
2311
+ }
2312
+ /** Render the shared `SqgObserver` interface emitted once per output package. */
2313
+ function renderObserverInterface(pkg) {
2314
+ return `// GENERATED by sqg -- do not edit.
2315
+ ${pkg ? `package ${pkg};\n\n` : ""}/**
2316
+ * Optional instrumentation hook for generated database operations.
2317
+ *
2318
+ * <p>Implement this to observe every generated query/exec (tracing spans,
2319
+ * timers, logging). SQG depends on no tracing library; map this to Brave,
2320
+ * OpenTelemetry, Dropwizard, or plain logging in your application.
2321
+ *
2322
+ * <p>A no-op when no observer is passed to the generated accessor's constructor.
2323
+ */
2324
+ @FunctionalInterface
2325
+ public interface SqgObserver {
2326
+ /**
2327
+ * Called immediately before a generated operation runs.
2328
+ *
2329
+ * @param queryName the logical query/exec name (e.g. "trackedKeywordsWithRanks")
2330
+ * @return a handle for the in-flight operation whose {@code end} is invoked
2331
+ * once, in a finally, after the operation completes; return {@code null}
2332
+ * to ignore this operation.
2333
+ */
2334
+ Scope start(String queryName);
2335
+
2336
+ /** Handle for a single in-flight operation. */
2337
+ @FunctionalInterface
2338
+ interface Scope {
2339
+ /**
2340
+ * Called once, in a finally, after the operation completes.
2341
+ *
2342
+ * @param rowCount affected/returned rows, or -1 if not applicable
2343
+ * @param error the failure that aborted the operation, or null on success
2344
+ */
2345
+ void end(long rowCount, Throwable error);
2346
+ }
2347
+ }
2348
+ `;
2349
+ }
2292
2350
  var JavaGenerator = class extends BaseGenerator {
2293
2351
  engine;
2294
2352
  /** Query ids that should emit their row-type record declaration (set per render). */
@@ -2343,7 +2401,9 @@ var JavaGenerator = class extends BaseGenerator {
2343
2401
  if (readExpr !== null) return readExpr;
2344
2402
  return this.typeMapper.parseValue(column, `rs.getObject(${idx})`, path);
2345
2403
  }
2346
- async beforeGenerate(_projectDir, _gen, queries, tables) {
2404
+ async beforeGenerate(_projectDir, gen, queries, tables) {
2405
+ const observerEnabled = observerEnabledFor(gen);
2406
+ Handlebars.registerHelper("observerEnabled", () => observerEnabled);
2347
2407
  this.declareTypeOwners = /* @__PURE__ */ new Set();
2348
2408
  const seenRowTypes = /* @__PURE__ */ new Set();
2349
2409
  const tableRowTypes = new Set(this.supportsAppenders(this.engine) ? tables.filter((t) => t.hasAppender).map((t) => this.getClassName(`${t.id}_row`)) : []);
@@ -2452,6 +2512,13 @@ var JavaGenerator = class extends BaseGenerator {
2452
2512
  return `new ${rowType}(${result.join(",\n")})`;
2453
2513
  });
2454
2514
  }
2515
+ auxiliaryFiles(gen) {
2516
+ if (!observerEnabledFor(gen)) return [];
2517
+ return [{
2518
+ filename: "SqgObserver.java",
2519
+ content: renderObserverInterface(gen.config?.package)
2520
+ }];
2521
+ }
2455
2522
  async afterGenerate(outputPath) {
2456
2523
  try {
2457
2524
  consola.debug("Formatting file:", outputPath);
@@ -3179,8 +3246,20 @@ async function preparePostgresSources(sources, queries, reporter) {
3179
3246
  };
3180
3247
  try {
3181
3248
  for (const source of sources) {
3249
+ if (source.url) {
3250
+ attachments.push({
3251
+ alias: source.name,
3252
+ connectionUri: source.url
3253
+ });
3254
+ continue;
3255
+ }
3182
3256
  reporter?.onContainerStarting?.();
3183
- const container = await new PostgreSqlContainer(source.image).withDatabase("sqg-db").withUsername("sqg").withPassword("secret").start();
3257
+ let container;
3258
+ try {
3259
+ container = await new PostgreSqlContainer(source.image).withDatabase("sqg-db").withUsername("sqg").withPassword("secret").start();
3260
+ } catch (e) {
3261
+ throw new DatabaseError(`Could not start a Postgres container for source '${source.name}': ${e.message}`, "postgres", "Postgres sources need Docker to introspect schema. Start Docker, or set 'url' on the source to point at an existing Postgres database (e.g. url: $DATABASE_URL).");
3262
+ }
3184
3263
  containers.push(container);
3185
3264
  const connectionUri = container.getConnectionUri();
3186
3265
  reporter?.onContainerStarted?.(connectionUri);
@@ -3426,15 +3505,16 @@ const ProjectSchema = z.object({
3426
3505
  template: z.string().optional().describe("Custom Handlebars template path"),
3427
3506
  output: z.string().min(1, "Output path is required").describe("Output file or directory path"),
3428
3507
  config: z.any().optional().describe("Generator-specific configuration")
3429
- })).min(1, "At least one generator is required").describe("Code generators to run")
3430
- })).min(1, "At least one SQL configuration is required").describe("SQL file configurations"),
3508
+ }).strict()).min(1, "At least one generator is required").describe("Code generators to run")
3509
+ }).strict()).min(1, "At least one SQL configuration is required").describe("SQL file configurations"),
3431
3510
  sources: z.array(z.object({
3432
3511
  type: z.enum(["file", "postgres"]).optional().describe("Source type: 'file' (default) or 'postgres'"),
3433
3512
  path: z.string().optional().describe("Path to source file for file sources (supports $HOME)"),
3434
3513
  name: z.string().optional().describe("Variable name (file sources) or DuckDB attach alias (postgres sources)"),
3435
- image: z.string().optional().describe("Docker image for postgres sources (default: postgres:16-alpine)")
3436
- }).refine((s) => s.type === "postgres" ? !!s.name : !!s.path, { message: "file sources require 'path'; postgres sources require 'name'" })).optional().describe("External sources: files inlined as variables, or postgres databases attached for introspection")
3437
- });
3514
+ image: z.string().optional().describe("Docker image for postgres sources (default: postgres:16-alpine)"),
3515
+ url: z.string().optional().describe("Postgres source: connect to this existing database for introspection instead of starting a container. Use a literal DSN or '$ENV_VAR' to read from the environment. When set, ':source=' BASELINE blocks are not applied (the live schema is used), which avoids schema drift.")
3516
+ }).strict().refine((s) => s.type === "postgres" ? !!s.name : !!s.path, { message: "file sources require 'path'; postgres sources require 'name'" })).optional().describe("External sources: files inlined as variables, or postgres databases attached for introspection")
3517
+ }).strict();
3438
3518
  var ExtraVariable = class {
3439
3519
  constructor(name, value) {
3440
3520
  this.name = name;
@@ -3450,11 +3530,25 @@ function createExtraVariables(sources, suppressLogging = false) {
3450
3530
  return new ExtraVariable(varName, `'${resolvedPath}'`);
3451
3531
  });
3452
3532
  }
3533
+ /**
3534
+ * Resolve a postgres source `url`. A value of the form `$VAR` or `${VAR}` is
3535
+ * read from the environment (so credentials need not live in sqg.yaml); any
3536
+ * other value is treated as a literal DSN.
3537
+ */
3538
+ function resolveSourceUrl(url, sourceName) {
3539
+ const match = url.match(/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/);
3540
+ if (!match) return url;
3541
+ const envName = match[1];
3542
+ const value = process.env[envName];
3543
+ if (!value) throw new SqgError(`Postgres source '${sourceName}' references environment variable '${envName}' which is not set`, "CONFIG_VALIDATION_ERROR", `Set ${envName} to the database connection string, or use a literal DSN in the 'url' field`);
3544
+ return value;
3545
+ }
3453
3546
  /** Postgres sources resolved from the project config (with image defaulted). */
3454
3547
  function getPostgresSources(sources) {
3455
3548
  return sources.filter((source) => source.type === "postgres").map((source) => ({
3456
3549
  name: source.name,
3457
- image: source.image ?? "postgres:16-alpine"
3550
+ image: source.image ?? "postgres:16-alpine",
3551
+ url: source.url ? resolveSourceUrl(source.url, source.name) : void 0
3458
3552
  }));
3459
3553
  }
3460
3554
  function buildProjectFromCliOptions(options) {
@@ -3664,7 +3758,14 @@ async function writeGeneratedFile(projectDir, gen, generator, file, queries, tab
3664
3758
  const outputPath = getOutputPath(projectDir, name, gen, generator);
3665
3759
  writeFileSync(outputPath, sourceFile);
3666
3760
  await generator.afterGenerate(outputPath);
3667
- return outputPath;
3761
+ const written = [outputPath];
3762
+ const outputDir = dirname(outputPath);
3763
+ for (const aux of generator.auxiliaryFiles(gen)) {
3764
+ const auxPath = join(outputDir, aux.filename);
3765
+ writeFileSync(auxPath, aux.content);
3766
+ written.push(auxPath);
3767
+ }
3768
+ return written;
3668
3769
  }
3669
3770
  /**
3670
3771
  * Validate project configuration from a Project object without executing queries
@@ -3783,6 +3884,11 @@ async function processProjectFromConfig(project, projectDir, writeToStdout = fal
3783
3884
  if (e instanceof SqgError) throw e;
3784
3885
  throw SqgError.inFile(`Failed to parse SQL file: ${e.message}`, "SQL_PARSE_ERROR", sqlFile, { suggestion: "Check SQL syntax and annotation format" });
3785
3886
  }
3887
+ const referencedPgSources = pgSources.filter((source) => {
3888
+ const catalogRef = new RegExp(`\\b${escapeRegExp(source.name)}\\.`);
3889
+ return queries.some((q) => q.sourceTarget === source.name || catalogRef.test(q.rawQuery));
3890
+ });
3891
+ const referencedPgSourceNames = referencedPgSources.map((s) => s.name);
3786
3892
  for (const [engine, gens] of gensByEngine) {
3787
3893
  const executableQueries = queries.filter((q) => !q.skipGenerateFunction);
3788
3894
  const reporterAny = reporter;
@@ -3791,9 +3897,9 @@ async function processProjectFromConfig(project, projectDir, writeToStdout = fal
3791
3897
  try {
3792
3898
  const dbEngine = getDatabaseEngine(engine);
3793
3899
  let attachments;
3794
- if (engine === "duckdb" && pgSources.length > 0) {
3900
+ if (engine === "duckdb" && referencedPgSources.length > 0) {
3795
3901
  ui?.startPhase("Starting postgres source containers...");
3796
- preparedSources = await preparePostgresSources(pgSources, queries, reporter);
3902
+ preparedSources = await preparePostgresSources(referencedPgSources, queries, reporter);
3797
3903
  attachments = preparedSources.attachments;
3798
3904
  }
3799
3905
  ui?.startPhase(`Initializing ${engine} database...`);
@@ -3821,14 +3927,14 @@ async function processProjectFromConfig(project, projectDir, writeToStdout = fal
3821
3927
  const genStart = performance.now();
3822
3928
  for (const gen of gens) {
3823
3929
  const generator = getGenerator(gen.generator);
3824
- const outputPath = await writeGeneratedFile(projectDir, {
3930
+ const outputPaths = await writeGeneratedFile(projectDir, {
3825
3931
  ...gen,
3826
3932
  projectName: project.name
3827
- }, generator, sqlFile, queries, tables, engine, writeToStdout, pgSources.map((s) => s.name));
3828
- if (outputPath !== null) {
3829
- files.push(outputPath);
3933
+ }, generator, sqlFile, queries, tables, engine, writeToStdout, referencedPgSourceNames);
3934
+ if (outputPaths !== null) {
3935
+ for (const path of outputPaths) if (!files.includes(path)) files.push(path);
3830
3936
  results.push({
3831
- outputPath,
3937
+ outputPath: outputPaths[0],
3832
3938
  queryCount: executableQueries.length,
3833
3939
  enumCount: countEnums(queries),
3834
3940
  sqlFile,
@@ -3858,7 +3964,7 @@ async function processProject(projectPath, ui) {
3858
3964
  //#region src/mcp-server.ts
3859
3965
  const server = new Server({
3860
3966
  name: "sqg-mcp",
3861
- version: process.env.npm_package_version ?? "0.21.0"
3967
+ version: process.env.npm_package_version ?? "0.22.0"
3862
3968
  }, { capabilities: {
3863
3969
  tools: {},
3864
3970
  resources: {}
@@ -4329,7 +4435,7 @@ function formatMs(ms) {
4329
4435
  }
4330
4436
  //#endregion
4331
4437
  //#region src/sqg.ts
4332
- const version = process.env.npm_package_version ?? "0.21.0";
4438
+ const version = process.env.npm_package_version ?? "0.22.0";
4333
4439
  updateNotifier({ pkg: {
4334
4440
  name: "@sqg/sqg",
4335
4441
  version
@@ -41,10 +41,24 @@ import java.io.IOException;
41
41
 
42
42
  public class {{className}} {
43
43
  private final Connection connection;
44
+ {{#if (observerEnabled)}}
45
+ private final SqgObserver observer;
46
+ {{/if}}
44
47
 
45
48
  public {{className}}(Connection connection) {
46
49
  this.connection = connection;
50
+ {{#if (observerEnabled)}}
51
+ this.observer = null;
52
+ {{/if}}
47
53
  }
54
+ {{#if (observerEnabled)}}
55
+
56
+ /** Construct with an instrumentation observer invoked around every generated operation. */
57
+ public {{className}}(Connection connection, SqgObserver observer) {
58
+ this.connection = connection;
59
+ this.observer = observer;
60
+ }
61
+ {{/if}}
48
62
 
49
63
  /** Options for streaming queries. fetchSize hints at the JDBC driver's batch size; 0 means driver default. */
50
64
  public record StreamOptions(int fetchSize) {
@@ -224,9 +238,11 @@ public class {{className}} {
224
238
  {{{declareEnums queries}}}
225
239
 
226
240
  {{#each attachers}}
227
- /** Attach the "{{alias}}" postgres source under the same alias used during generation. */
241
+ /** Attach the "{{alias}}" postgres source under the same alias used during generation. Loads the postgres extension (idempotent) so callers need not rely on DuckDB autoloading. */
228
242
  public void {{functionName}}(String connectionString) throws SQLException {
229
243
  try (var stmt = connection.createStatement()) {
244
+ stmt.execute("INSTALL postgres");
245
+ stmt.execute("LOAD postgres");
230
246
  stmt.execute("ATTACH '" + connectionString + "' AS {{alias}} (TYPE postgres)");
231
247
  }
232
248
  }
@@ -236,38 +252,83 @@ public class {{className}} {
236
252
  {{#unless skipGenerateFunction}}
237
253
  {{>columnTypesRecord}}
238
254
  public {{> returnType}} {{functionName}}({{#each variables}}{{{type}}} {{name}}{{#unless @last}}, {{/unless}}{{/each}}) throws SQLException {
255
+ {{#if (observerEnabled)}}
256
+ SqgObserver.Scope __obs = observer == null ? null : observer.start("{{functionName}}");
257
+ long __rows = -1; Throwable __err = null;
258
+ try {
259
+ {{/if}}
239
260
  try (var stmt = connection.prepareStatement({{{partsToString sqlQueryParts}}})) {
240
261
  {{> execute}}
241
262
  }
263
+ {{#if (observerEnabled)}}
264
+ } catch (SQLException __e) { __err = __e; throw __e; }
265
+ finally { if (__obs != null) __obs.end(__rows, __err); }
266
+ {{/if}}
242
267
  }
243
268
  {{#if isBatch}}
244
269
  {{#if (hasMultipleParams variables)}}
245
270
  public record {{batchParamsType}}({{#each variables}}{{{type}}} {{name}}{{#unless @last}}, {{/unless}}{{/each}}) {}
246
271
 
247
272
  public int[] {{functionName}}Batch(Iterable<{{batchParamsType}}> params) throws SQLException {
273
+ {{#if (observerEnabled)}}
274
+ SqgObserver.Scope __obs = observer == null ? null : observer.start("{{functionName}}Batch");
275
+ long __rows = -1; Throwable __err = null;
276
+ try {
277
+ {{/if}}
248
278
  try (var stmt = connection.prepareStatement({{{partsToString sqlQueryParts}}})) {
279
+ {{#if (observerEnabled)}}
280
+ long __n = 0;
281
+ {{/if}}
249
282
  for (var row : params) {
250
283
  {{#each parameters}}{{#if isArray}}stmt.setArray({{plusOne @index}}, connection.createArrayOf("{{arrayBaseType}}", row.{{name}}().toArray()));
251
284
  {{else if isEnum}}stmt.setObject({{plusOne @index}}, row.{{name}}().getValue());
252
285
  {{else}}{{{jdbcSet type (plusOne @index) (concat "row." name "()")}}}
253
286
  {{/if}}{{/each}}
254
287
  stmt.addBatch();
288
+ {{#if (observerEnabled)}}
289
+ __n++;
290
+ {{/if}}
255
291
  }
292
+ {{#if (observerEnabled)}}
293
+ __rows = __n;
294
+ {{/if}}
256
295
  return stmt.executeBatch();
257
296
  }
297
+ {{#if (observerEnabled)}}
298
+ } catch (SQLException __e) { __err = __e; throw __e; }
299
+ finally { if (__obs != null) __obs.end(__rows, __err); }
300
+ {{/if}}
258
301
  }
259
302
  {{else}}
260
303
  public int[] {{functionName}}Batch(Iterable<{{#each variables}}{{{type}}}{{/each}}> params) throws SQLException {
304
+ {{#if (observerEnabled)}}
305
+ SqgObserver.Scope __obs = observer == null ? null : observer.start("{{functionName}}Batch");
306
+ long __rows = -1; Throwable __err = null;
307
+ try {
308
+ {{/if}}
261
309
  try (var stmt = connection.prepareStatement({{{partsToString sqlQueryParts}}})) {
310
+ {{#if (observerEnabled)}}
311
+ long __n = 0;
312
+ {{/if}}
262
313
  for (var value : params) {
263
314
  {{#each parameters}}{{#if isArray}}stmt.setArray({{plusOne @index}}, connection.createArrayOf("{{arrayBaseType}}", value.toArray()));
264
315
  {{else if isEnum}}stmt.setObject({{plusOne @index}}, value.getValue());
265
316
  {{else}}{{{jdbcSet type (plusOne @index) "value"}}}
266
317
  {{/if}}{{/each}}
267
318
  stmt.addBatch();
319
+ {{#if (observerEnabled)}}
320
+ __n++;
321
+ {{/if}}
268
322
  }
323
+ {{#if (observerEnabled)}}
324
+ __rows = __n;
325
+ {{/if}}
269
326
  return stmt.executeBatch();
270
327
  }
328
+ {{#if (observerEnabled)}}
329
+ } catch (SQLException __e) { __err = __e; throw __e; }
330
+ finally { if (__obs != null) __obs.end(__rows, __err); }
331
+ {{/if}}
271
332
  }
272
333
  {{/if}}
273
334
  {{/if}}
@@ -277,6 +338,10 @@ public class {{className}} {
277
338
  }
278
339
 
279
340
  public Stream<{{rowType}}> {{functionName}}Stream({{#each variables}}{{{type}}} {{name}}, {{/each}}StreamOptions options) throws SQLException {
341
+ {{#if (observerEnabled)}}
342
+ SqgObserver.Scope __obs = observer == null ? null : observer.start("{{functionName}}Stream");
343
+ try {
344
+ {{/if}}
280
345
  {{#if (isPostgres)}}
281
346
  boolean wasAutoCommit = connection.getAutoCommit();
282
347
  if (wasAutoCommit) connection.setAutoCommit(false);
@@ -288,6 +353,9 @@ public class {{className}} {
288
353
  {{else}}{{{jdbcSet type (plusOne @index) name}}}
289
354
  {{/if}}{{/each}}
290
355
  var rs = stmt.executeQuery();
356
+ {{#if (observerEnabled)}}
357
+ final long[] __count = { 0 };
358
+ {{/if}}
291
359
  var iter = new Iterator<{{rowType}}>() {
292
360
  private Boolean hasNext = null;
293
361
  public boolean hasNext() {
@@ -300,7 +368,7 @@ public class {{className}} {
300
368
  public {{rowType}} next() {
301
369
  if (!hasNext()) throw new NoSuchElementException();
302
370
  hasNext = null;
303
- try { return {{> readRow}}; }
371
+ try { {{#if (observerEnabled)}}__count[0]++; {{/if}}return {{> readRow}}; }
304
372
  catch (SQLException e) { throw new RuntimeException(e); }
305
373
  }
306
374
  };
@@ -313,9 +381,18 @@ public class {{className}} {
313
381
  {{#if (isPostgres)}}
314
382
  if (wasAutoCommit) connection.setAutoCommit(true);
315
383
  {{/if}}
384
+ {{#if (observerEnabled)}}
385
+ if (__obs != null) __obs.end(__count[0], null);
386
+ {{/if}}
387
+ }
388
+ catch (SQLException e) {
389
+ {{#if (observerEnabled)}}if (__obs != null) __obs.end(__count[0], e);{{/if}}
390
+ throw new RuntimeException(e);
316
391
  }
317
- catch (SQLException e) { throw new RuntimeException(e); }
318
392
  });
393
+ {{#if (observerEnabled)}}
394
+ } catch (SQLException __e) { if (__obs != null) __obs.end(-1, __e); throw __e; }
395
+ {{/if}}
319
396
  }
320
397
  {{/unless}}{{/if}}
321
398
  {{/unless}}
@@ -435,16 +512,31 @@ int
435
512
  {{#if isQuery}}
436
513
  try(var rs = stmt.executeQuery()) {
437
514
  {{#if isOne}}
438
- return rs.next() ? {{> readRow}} : null;
515
+ {{#if (observerEnabled)}}
516
+ var __one = rs.next() ? {{> readRow}} : null;
517
+ __rows = __one != null ? 1 : 0;
518
+ return __one;
519
+ {{else}}
520
+ return rs.next() ? {{> readRow}} : null;
521
+ {{/if}}
439
522
  {{else}}
440
523
  var results = new ArrayList<{{rowType}}>();
441
524
  while (rs.next()) {
442
525
  results.add({{> readRow}});
443
526
  }
527
+ {{#if (observerEnabled)}}
528
+ __rows = results.size();
529
+ {{/if}}
444
530
  return results;
445
531
  {{/if}}
446
532
  }
447
533
  {{else}}
534
+ {{#if (observerEnabled)}}
535
+ int __updated = stmt.executeUpdate();
536
+ __rows = __updated;
537
+ return __updated;
538
+ {{else}}
448
539
  return stmt.executeUpdate();
449
540
  {{/if}}
541
+ {{/if}}
450
542
  {{/inline}}
@@ -137,7 +137,13 @@ class {{className}}:
137
137
 
138
138
  {{#each attachers}}
139
139
  def {{functionName}}(self, connection_string: str) -> None:
140
- """Attach the "{{alias}}" postgres source under the same alias used during generation."""
140
+ """Attach the "{{alias}}" postgres source under the same alias used during generation.
141
+
142
+ Loads the postgres extension (idempotent) so callers need not rely on
143
+ DuckDB autoloading.
144
+ """
145
+ self._conn.execute("INSTALL postgres")
146
+ self._conn.execute("LOAD postgres")
141
147
  self._conn.execute(f"ATTACH '{connection_string}' AS {{alias}} (TYPE postgres)")
142
148
 
143
149
  {{/each}}
@@ -59,8 +59,10 @@ export class {{className}} {
59
59
  }
60
60
 
61
61
  {{#each attachers}}
62
- /** Attach the "{{alias}}" postgres source under the same alias used during generation. */
62
+ /** Attach the "{{alias}}" postgres source under the same alias used during generation. Loads the postgres extension (idempotent) so callers need not rely on DuckDB autoloading. */
63
63
  async {{functionName}}(connectionString: string): Promise<void> {
64
+ await this.conn.run("INSTALL postgres");
65
+ await this.conn.run("LOAD postgres");
64
66
  await this.conn.run(`ATTACH '${connectionString}' AS {{alias}} (TYPE postgres)`);
65
67
  }
66
68
 
@@ -1,5 +1,5 @@
1
1
  (function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))h(g);new MutationObserver(g=>{for(const p of g)if(p.type==="childList")for(const b of p.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&h(b)}).observe(document,{childList:!0,subtree:!0});function l(g){const p={};return g.integrity&&(p.integrity=g.integrity),g.referrerPolicy&&(p.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?p.credentials="include":g.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function h(g){if(g.ep)return;g.ep=!0;const p=l(g);fetch(g.href,p)}})();const sen="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(sen);const oen=1,cen=2,Myt=4,uen=8,len=16,fen=1,aen=2,hen=4,den=8,gen=16,Oyt=1,ben=2,fh=Symbol(),Pyt="http://www.w3.org/1999/xhtml",wen="@attach",pen=!1;var TZ=Array.isArray,men=Array.prototype.indexOf,MM=Array.prototype.includes,MZ=Array.from,ven=Object.defineProperty,L6=Object.getOwnPropertyDescriptor,jyt=Object.getOwnPropertyDescriptors,_yt=Object.prototype,yen=Array.prototype,OZ=Object.getPrototypeOf,m2t=Object.isExtensible;function wN(u){return typeof u=="function"}const IS=()=>{};function ken(u){return u()}function jke(u){for(var s=0;s<u.length;s++)u[s]()}function Iyt(){var u,s,l=new Promise((h,g)=>{u=h,s=g});return{promise:l,resolve:u,reject:s}}function A1(u,s,l=!1){return u===void 0?l?s():s:u}function dB(u,s){if(Array.isArray(u))return u;if(s===void 0||!(Symbol.iterator in u))return Array.from(u);const l=[];for(const h of u)if(l.push(h),l.length===s)break;return l}function xen(u,s){var l={};for(var h in u)s.includes(h)||(l[h]=u[h]);for(var g of Object.getOwnPropertySymbols(u))Object.propertyIsEnumerable.call(u,g)&&!s.includes(g)&&(l[g]=u[g]);return l}const dh=2,OM=4,gB=8,o5e=1<<24,W6=16,Xm=32,F6=64,_ke=128,Dw=512,Na=1024,Dd=2048,i3=4096,ub=8192,Lw=16384,DS=32768,Ike=1<<25,H6=65536,v2t=1<<17,Sen=1<<18,LS=1<<19,Dyt=1<<20,Xv=1<<25,SS=65536,Dke=1<<21,c5e=1<<22,R6=1<<23,e3=Symbol("$state"),Lyt=Symbol("legacy props"),Cen=Symbol(""),gk=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ryt=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function u5e(u){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Een(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Aen(u,s,l){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ten(u){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Men(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Oen(u){throw new Error("https://svelte.dev/e/effect_orphan")}function Pen(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function jen(u){throw new Error("https://svelte.dev/e/props_invalid_value")}function _en(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ien(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Den(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Len(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Ren(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Nen(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Nyt(u){return u===this.v}function Byt(u,s){return u!=u?s==s:u!==s||u!==null&&typeof u=="object"||typeof u=="function"}function Fyt(u){return!Byt(u,this.v)}let QM=!1,Ben=!1;function Fen(){QM=!0}const Hen=[];function Hyt(u,s=!1,l=!1){return xY(u,new Map,"",Hen,null,l)}function xY(u,s,l,h,g=null,p=!1){if(typeof u=="object"&&u!==null){var b=s.get(u);if(b!==void 0)return b;if(u instanceof Map)return new Map(u);if(u instanceof Set)return new Set(u);if(TZ(u)){var y=Array(u.length);s.set(u,y),g!==null&&s.set(g,y);for(var x=0;x<u.length;x+=1){var A=u[x];x in u&&(y[x]=xY(A,s,l,h,null,p))}return y}if(OZ(u)===_yt){y={},s.set(u,y),g!==null&&s.set(g,y);for(var T of Object.keys(u))y[T]=xY(u[T],s,l,h,null,p);return y}if(u instanceof Date)return structuredClone(u);if(typeof u.toJSON=="function"&&!p)return xY(u.toJSON(),s,l,h,u)}if(u instanceof EventTarget)return u;try{return structuredClone(u)}catch{return u}}let ju=null;function PM(u){ju=u}function l5e(u){return f5e().get(u)}function $yt(u,s){return f5e().set(u,s),s}function $en(u){return f5e().has(u)}function vs(u,s=!1,l){ju={p:ju,i:!1,c:null,e:null,s:u,x:null,r:_o,l:QM&&!s?{s:null,u:null,$:[]}:null}}function ys(u){var s=ju,l=s.e;if(l!==null){s.e=null;for(var h of l)ukt(h)}return u!==void 0&&(s.x=u),s.i=!0,ju=s.p,u??{}}function YM(){return!QM||ju!==null&&ju.l===null}function f5e(u){return ju===null&&u5e(),ju.c??=new Map(Gen(ju)||void 0)}function Gen(u){let s=u.p;for(;s!==null;){const l=s.c;if(l!==null)return l;s=s.p}return null}let gS=[];function Gyt(){var u=gS;gS=[],jke(u)}function Sk(u){if(gS.length===0&&!LN){var s=gS;queueMicrotask(()=>{s===gS&&Gyt()})}gS.push(u)}function zen(){for(;gS.length>0;)Gyt()}function zyt(u){var s=_o;if(s===null)return Eo.f|=R6,u;if((s.f&DS)===0&&(s.f&OM)===0)throw u;j6(u,s)}function j6(u,s){for(;s!==null;){if((s.f&_ke)!==0){if((s.f&DS)===0)throw u;try{s.b.error(u);return}catch(l){u=l}}s=s.parent}throw u}const Jen=-7169;function sa(u,s){u.f=u.f&Jen|s}function a5e(u){(u.f&Dw)!==0||u.deps===null?sa(u,Na):sa(u,i3)}function Jyt(u){if(u!==null)for(const s of u)(s.f&dh)===0||(s.f&SS)===0||(s.f^=SS,Jyt(s.deps))}function qyt(u,s,l){(u.f&Dd)!==0?s.add(u):(u.f&i3)!==0&&l.add(u),Jyt(u.deps),sa(u,Na)}let NQ=!1;function qen(u){var s=NQ;try{return NQ=!1,[u(),NQ]}finally{NQ=s}}const S6=new Set;let vc=null,Gm=null,Lke=null,LN=!1,Oye=!1,hM=null,SY=null;var y2t=0;let Uen=1;class Ak{id=Uen++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#o=new Set;#c=new Set;#u=new Map;is_fork=!1;#f=!1;#l=new Set;#a(){return this.is_fork||this.#i.size>0}#d(){for(const h of this.#l)for(const g of h.#i.keys()){for(var s=!1,l=g;l.parent!==null;){if(this.#u.has(l)){s=!0;break}l=l.parent}if(!s)return!0}return!1}skip_effect(s){this.#u.has(s)||this.#u.set(s,{d:[],m:[]})}unskip_effect(s){var l=this.#u.get(s);if(l){this.#u.delete(s);for(var h of l.d)sa(h,Dd),this.schedule(h);for(h of l.m)sa(h,i3),this.schedule(h)}}#g(){if(y2t++>1e3&&(S6.delete(this),Wen()),!this.#a()){for(const y of this.#o)this.#c.delete(y),sa(y,Dd),this.schedule(y);for(const y of this.#c)sa(y,i3),this.schedule(y)}const s=this.#r;this.#r=[],this.apply();var l=hM=[],h=[],g=SY=[];for(const y of s)try{this.#h(y,l,h)}catch(x){throw Kyt(y),x}if(vc=null,g.length>0){var p=Ak.ensure();for(const y of g)p.schedule(y)}if(hM=null,SY=null,this.#a()||this.#d()){this.#b(h),this.#b(l);for(const[y,x]of this.#u)Wyt(y,x)}else{this.#t.size===0&&S6.delete(this),this.#o.clear(),this.#c.clear();for(const y of this.#e)y(this);this.#e.clear(),k2t(h),k2t(l),this.#s?.resolve()}var b=vc;if(this.#r.length>0){const y=b??=this;y.#r.push(...this.#r.filter(x=>!y.#r.includes(x)))}b!==null&&(S6.add(b),b.#g()),S6.has(this)||this.#m()}#h(s,l,h){s.f^=Na;for(var g=s.first;g!==null;){var p=g.f,b=(p&(Xm|F6))!==0,y=b&&(p&Na)!==0,x=y||(p&ub)!==0||this.#u.has(g);if(!x&&g.fn!==null){b?g.f^=Na:(p&OM)!==0?l.push(g):mB(g)&&((p&W6)!==0&&this.#c.add(g),_M(g));var A=g.first;if(A!==null){g=A;continue}}for(;g!==null;){var T=g.next;if(T!==null){g=T;break}g=g.parent}}}#b(s){for(var l=0;l<s.length;l+=1)qyt(s[l],this.#o,this.#c)}capture(s,l,h=!1){l!==fh&&!this.previous.has(s)&&this.previous.set(s,l),(s.f&R6)===0&&(this.current.set(s,[s.v,h]),Gm?.set(s,s.v))}activate(){vc=this}deactivate(){vc=null,Gm=null}flush(){try{Oye=!0,vc=this,this.#g()}finally{y2t=0,Lke=null,hM=null,SY=null,Oye=!1,vc=null,Gm=null,N6.clear()}}discard(){for(const s of this.#n)s(this);this.#n.clear(),S6.delete(this)}#m(){for(const A of S6){var s=A.id<this.id,l=[];for(const[T,[P,j]]of this.current){if(A.current.has(T)){var h=A.current.get(T)[0];if(s&&P!==h)A.current.set(T,[P,j]);else continue}l.push(T)}var g=[...A.current.keys()].filter(T=>!this.current.has(T));if(g.length===0)s&&A.discard();else if(l.length>0){A.activate();var p=new Set,b=new Map;for(var y of l)Uyt(y,g,p,b);if(A.#r.length>0){A.apply();for(var x of A.#r)A.#h(x,[],[]);A.#r=[]}A.deactivate()}}for(const A of S6)A.#l.has(this)&&(A.#l.delete(this),A.#l.size===0&&!A.#a()&&(A.activate(),A.#g()))}increment(s,l){let h=this.#t.get(l)??0;if(this.#t.set(l,h+1),s){let g=this.#i.get(l)??0;this.#i.set(l,g+1)}}decrement(s,l,h){let g=this.#t.get(l)??0;if(g===1?this.#t.delete(l):this.#t.set(l,g-1),s){let p=this.#i.get(l)??0;p===1?this.#i.delete(l):this.#i.set(l,p-1)}this.#f||h||(this.#f=!0,Sk(()=>{this.#f=!1,this.flush()}))}transfer_effects(s,l){for(const h of s)this.#o.add(h);for(const h of l)this.#c.add(h);s.clear(),l.clear()}oncommit(s){this.#e.add(s)}ondiscard(s){this.#n.add(s)}settled(){return(this.#s??=Iyt()).promise}static ensure(){if(vc===null){const s=vc=new Ak;Oye||(S6.add(vc),LN||Sk(()=>{vc===s&&s.flush()}))}return vc}apply(){{Gm=null;return}}schedule(s){if(Lke=s,s.b?.is_pending&&(s.f&(OM|gB|o5e))!==0&&(s.f&DS)===0){s.b.defer_effect(s);return}for(var l=s;l.parent!==null;){l=l.parent;var h=l.f;if(hM!==null&&l===_o&&(Eo===null||(Eo.f&dh)===0))return;if((h&(F6|Xm))!==0){if((h&Na)===0)return;l.f^=Na}}this.#r.push(l)}}function Ven(u){var s=LN;LN=!0;try{for(var l;;){if(zen(),vc===null)return l;vc.flush()}}finally{LN=s}}function Wen(){try{Pen()}catch(u){j6(u,Lke)}}let hk=null;function k2t(u){var s=u.length;if(s!==0){for(var l=0;l<s;){var h=u[l++];if((h.f&(Lw|ub))===0&&mB(h)&&(hk=new Set,_M(h),h.deps===null&&h.first===null&&h.nodes===null&&h.teardown===null&&h.ac===null&&hkt(h),hk?.size>0)){N6.clear();for(const g of hk){if((g.f&(Lw|ub))!==0)continue;const p=[g];let b=g.parent;for(;b!==null;)hk.has(b)&&(hk.delete(b),p.push(b)),b=b.parent;for(let y=p.length-1;y>=0;y--){const x=p[y];(x.f&(Lw|ub))===0&&_M(x)}}hk.clear()}}hk=null}}function Uyt(u,s,l,h){if(!l.has(u)&&(l.add(u),u.reactions!==null))for(const g of u.reactions){const p=g.f;(p&dh)!==0?Uyt(g,s,l,h):(p&(c5e|W6))!==0&&(p&Dd)===0&&Vyt(g,s,h)&&(sa(g,Dd),h5e(g))}}function Vyt(u,s,l){const h=l.get(u);if(h!==void 0)return h;if(u.deps!==null)for(const g of u.deps){if(MM.call(s,g))return!0;if((g.f&dh)!==0&&Vyt(g,s,l))return l.set(g,!0),!0}return l.set(u,!1),!1}function h5e(u){vc.schedule(u)}function Wyt(u,s){if(!((u.f&Xm)!==0&&(u.f&Na)!==0)){(u.f&Dd)!==0?s.d.push(u):(u.f&i3)!==0&&s.m.push(u),sa(u,Na);for(var l=u.first;l!==null;)Wyt(l,s),l=l.next}}function Kyt(u){sa(u,Na);for(var s=u.first;s!==null;)Kyt(s),s=s.next}function Xyt(u){let s=0,l=CS(0),h;return()=>{b5e()&&(q(l),jZ(()=>(s===0&&(h=qg(()=>u(()=>RN(l)))),s+=1,()=>{Sk(()=>{s-=1,s===0&&(h?.(),h=void 0,RN(l))})})))}}var Ken=H6|LS;function Xen(u,s,l,h){new Qen(u,s,l,h)}class Qen{parent;is_pending=!1;transform_error;#e;#n=null;#t;#i;#s;#r=null;#o=null;#c=null;#u=null;#f=0;#l=0;#a=!1;#d=new Set;#g=new Set;#h=null;#b=Xyt(()=>(this.#h=CS(this.#f),()=>{this.#h=null}));constructor(s,l,h,g){this.#e=s,this.#t=l,this.#i=p=>{var b=_o;b.b=this,b.f|=_ke,h(p)},this.parent=_o.b,this.transform_error=g??this.parent?.transform_error??(p=>p),this.#s=ZM(()=>{this.#v()},Ken)}#m(){try{this.#r=$g(()=>this.#i(this.#e))}catch(s){this.error(s)}}#k(s){const l=this.#t.failed;l&&(this.#c=$g(()=>{l(this.#e,()=>s,()=>()=>{})}))}#x(){const s=this.#t.pending;s&&(this.is_pending=!0,this.#o=$g(()=>s(this.#e)),Sk(()=>{var l=this.#u=document.createDocumentFragment(),h=Ck();l.append(h),this.#r=this.#p(()=>$g(()=>this.#i(h))),this.#l===0&&(this.#e.before(l),this.#u=null,vS(this.#o,()=>{this.#o=null}),this.#w(vc))}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#l=0,this.#f=0,this.#r=$g(()=>{this.#i(this.#e)}),this.#l>0){var s=this.#u=document.createDocumentFragment();y5e(this.#r,s);const l=this.#t.pending;this.#o=$g(()=>l(this.#e))}else this.#w(vc)}catch(l){this.error(l)}}#w(s){this.is_pending=!1,s.transfer_effects(this.#d,this.#g)}defer_effect(s){qyt(s,this.#d,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(s){var l=_o,h=Eo,g=ju;r3(this.#s),Bw(this.#s),PM(this.#s.ctx);try{return Ak.ensure(),s()}catch(p){return zyt(p),null}finally{r3(l),Bw(h),PM(g)}}#y(s,l){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(s,l);return}this.#l+=s,this.#l===0&&(this.#w(l),this.#o&&vS(this.#o,()=>{this.#o=null}),this.#u&&(this.#e.before(this.#u),this.#u=null))}update_pending_count(s,l){this.#y(s,l),this.#f+=s,!(!this.#h||this.#a)&&(this.#a=!0,Sk(()=>{this.#a=!1,this.#h&&jM(this.#h,this.#f)}))}get_effect_pending(){return this.#b(),q(this.#h)}error(s){var l=this.#t.onerror;let h=this.#t.failed;if(!l&&!h)throw s;this.#r&&(hh(this.#r),this.#r=null),this.#o&&(hh(this.#o),this.#o=null),this.#c&&(hh(this.#c),this.#c=null);var g=!1,p=!1;const b=()=>{if(g){Nen();return}g=!0,p&&Len(),this.#c!==null&&vS(this.#c,()=>{this.#c=null}),this.#p(()=>{this.#v()})},y=x=>{try{p=!0,l?.(x,b),p=!1}catch(A){j6(A,this.#s&&this.#s.parent)}h&&(this.#c=this.#p(()=>{try{return $g(()=>{var A=_o;A.b=this,A.f|=_ke,h(this.#e,()=>x,()=>b)})}catch(A){return j6(A,this.#s.parent),null}}))};Sk(()=>{var x;try{x=this.transform_error(s)}catch(A){j6(A,this.#s&&this.#s.parent);return}x!==null&&typeof x=="object"&&typeof x.then=="function"?x.then(y,A=>j6(A,this.#s&&this.#s.parent)):y(x)})}}function Qyt(u,s,l,h){const g=YM()?bB:d5e;var p=u.filter(j=>!j.settled);if(l.length===0&&p.length===0){h(s.map(g));return}var b=_o,y=Yen(),x=p.length===1?p[0].promise:p.length>1?Promise.all(p.map(j=>j.promise)):null;function A(j){y();try{h(j)}catch(R){(b.f&Lw)===0&&j6(R,b)}HY()}if(l.length===0){x.then(()=>A(s.map(g)));return}var T=Yyt();function P(){Promise.all(l.map(j=>Zen(j))).then(j=>A([...s.map(g),...j])).catch(j=>j6(j,b)).finally(()=>T())}x?x.then(()=>{y(),P(),HY()}):P()}function Yen(){var u=_o,s=Eo,l=ju,h=vc;return function(p=!0){r3(u),Bw(s),PM(l),p&&(u.f&Lw)===0&&(h?.activate(),h?.apply())}}function HY(u=!0){r3(null),Bw(null),PM(null),u&&vc?.deactivate()}function Yyt(){var u=_o,s=u.b,l=vc,h=s.is_rendered();return s.update_pending_count(1,l),l.increment(h,u),(g=!1)=>{s.update_pending_count(-1,l),l.decrement(h,u,g)}}function bB(u){var s=dh|Dd,l=Eo!==null&&(Eo.f&dh)!==0?Eo:null;return _o!==null&&(_o.f|=LS),{ctx:ju,deps:null,effects:null,equals:Nyt,f:s,fn:u,reactions:null,rv:0,v:fh,wv:0,parent:l??_o,ac:null}}function Zen(u,s,l){let h=_o;h===null&&Een();var g=void 0,p=CS(fh),b=!Eo,y=new Map;return gtn(()=>{var x=_o,A=Iyt();g=A.promise;try{Promise.resolve(u()).then(A.resolve,A.reject).finally(HY)}catch(R){A.reject(R),HY()}var T=vc;if(b){if((x.f&DS)!==0)var P=Yyt();if(h.b.is_rendered())y.get(T)?.reject(gk),y.delete(T);else{for(const R of y.values())R.reject(gk);y.clear()}y.set(T,A)}const j=(R,z=void 0)=>{if(P){var $=z===gk;P($)}if(!(z===gk||(x.f&Lw)!==0)){if(T.activate(),z)p.f|=R6,jM(p,z);else{(p.f&R6)!==0&&(p.f^=R6),jM(p,R);for(const[Q,ee]of y){if(y.delete(Q),Q===T)break;ee.reject(gk)}}T.deactivate()}};A.promise.then(j,R=>j(null,R||"unknown"))}),w5e(()=>{for(const x of y.values())x.reject(gk)}),new Promise(x=>{function A(T){function P(){T===g?x(p):A(g)}T.then(P,P)}A(g)})}function Je(u){const s=bB(u);return bkt(s),s}function d5e(u){const s=bB(u);return s.equals=Fyt,s}function etn(u){var s=u.effects;if(s!==null){u.effects=null;for(var l=0;l<s.length;l+=1)hh(s[l])}}function ttn(u){for(var s=u.parent;s!==null;){if((s.f&dh)===0)return(s.f&Lw)===0?s:null;s=s.parent}return null}function g5e(u){var s,l=_o;r3(ttn(u));try{u.f&=~SS,etn(u),s=vkt(u)}finally{r3(l)}return s}function Zyt(u){var s=u.v,l=g5e(u);if(!u.equals(l)&&(u.wv=pkt(),(!vc?.is_fork||u.deps===null)&&(u.v=l,vc?.capture(u,s,!0),u.deps===null))){sa(u,Na);return}$6||(Gm!==null?(b5e()||vc?.is_fork)&&Gm.set(u,l):a5e(u))}function ntn(u){if(u.effects!==null)for(const s of u.effects)(s.teardown||s.ac)&&(s.teardown?.(),s.ac?.abort(gk),s.teardown=IS,s.ac=null,UN(s,0),m5e(s))}function ekt(u){if(u.effects!==null)for(const s of u.effects)s.teardown&&_M(s)}let Rke=new Set;const N6=new Map;let tkt=!1;function CS(u,s){var l={f:0,v:u,reactions:null,equals:Nyt,rv:0,wv:0};return l}function Si(u,s){const l=CS(u);return bkt(l),l}function itn(u,s=!1,l=!0){const h=CS(u);return s||(h.equals=Fyt),QM&&l&&ju!==null&&ju.l!==null&&(ju.l.s??=[]).push(h),h}function ft(u,s,l=!1){Eo!==null&&(!zm||(Eo.f&v2t)!==0)&&YM()&&(Eo.f&(dh|W6|c5e|v2t))!==0&&(Rw===null||!MM.call(Rw,u))&&Den();let h=l?zh(s):s;return jM(u,h,SY)}function jM(u,s,l=null){if(!u.equals(s)){var h=u.v;$6?N6.set(u,s):N6.set(u,h),u.v=s;var g=Ak.ensure();if(g.capture(u,h),(u.f&dh)!==0){const p=u;(u.f&Dd)!==0&&g5e(p),Gm===null&&a5e(p)}u.wv=pkt(),nkt(u,Dd,l),YM()&&_o!==null&&(_o.f&Na)!==0&&(_o.f&(Xm|F6))===0&&(Mw===null?ptn([u]):Mw.push(u)),!g.is_fork&&Rke.size>0&&!tkt&&rtn()}return s}function rtn(){tkt=!1;for(const u of Rke)(u.f&Na)!==0&&sa(u,i3),mB(u)&&_M(u);Rke.clear()}function RN(u){ft(u,u.v+1)}function nkt(u,s,l){var h=u.reactions;if(h!==null)for(var g=YM(),p=h.length,b=0;b<p;b++){var y=h[b],x=y.f;if(!(!g&&y===_o)){var A=(x&Dd)===0;if(A&&sa(y,s),(x&dh)!==0){var T=y;Gm?.delete(T),(x&SS)===0&&(x&Dw&&(y.f|=SS),nkt(T,i3,l))}else if(A){var P=y;(x&W6)!==0&&hk!==null&&hk.add(P),l!==null?l.push(P):h5e(P)}}}}function zh(u){if(typeof u!="object"||u===null||e3 in u)return u;const s=OZ(u);if(s!==_yt&&s!==yen)return u;var l=new Map,h=TZ(u),g=Si(0),p=yS,b=y=>{if(yS===p)return y();var x=Eo,A=yS;Bw(null),E2t(p);var T=y();return Bw(x),E2t(A),T};return h&&l.set("length",Si(u.length)),new Proxy(u,{defineProperty(y,x,A){(!("value"in A)||A.configurable===!1||A.enumerable===!1||A.writable===!1)&&_en();var T=l.get(x);return T===void 0?b(()=>{var P=Si(A.value);return l.set(x,P),P}):ft(T,A.value,!0),!0},deleteProperty(y,x){var A=l.get(x);if(A===void 0){if(x in y){const T=b(()=>Si(fh));l.set(x,T),RN(g)}}else ft(A,fh),RN(g);return!0},get(y,x,A){if(x===e3)return u;var T=l.get(x),P=x in y;if(T===void 0&&(!P||L6(y,x)?.writable)&&(T=b(()=>{var R=zh(P?y[x]:fh),z=Si(R);return z}),l.set(x,T)),T!==void 0){var j=q(T);return j===fh?void 0:j}return Reflect.get(y,x,A)},getOwnPropertyDescriptor(y,x){var A=Reflect.getOwnPropertyDescriptor(y,x);if(A&&"value"in A){var T=l.get(x);T&&(A.value=q(T))}else if(A===void 0){var P=l.get(x),j=P?.v;if(P!==void 0&&j!==fh)return{enumerable:!0,configurable:!0,value:j,writable:!0}}return A},has(y,x){if(x===e3)return!0;var A=l.get(x),T=A!==void 0&&A.v!==fh||Reflect.has(y,x);if(A!==void 0||_o!==null&&(!T||L6(y,x)?.writable)){A===void 0&&(A=b(()=>{var j=T?zh(y[x]):fh,R=Si(j);return R}),l.set(x,A));var P=q(A);if(P===fh)return!1}return T},set(y,x,A,T){var P=l.get(x),j=x in y;if(h&&x==="length")for(var R=A;R<P.v;R+=1){var z=l.get(R+"");z!==void 0?ft(z,fh):R in y&&(z=b(()=>Si(fh)),l.set(R+"",z))}if(P===void 0)(!j||L6(y,x)?.writable)&&(P=b(()=>Si(void 0)),ft(P,zh(A)),l.set(x,P));else{j=P.v!==fh;var $=b(()=>zh(A));ft(P,$)}var Q=Reflect.getOwnPropertyDescriptor(y,x);if(Q?.set&&Q.set.call(T,A),!j){if(h&&typeof x=="string"){var ee=l.get("length"),ne=Number(x);Number.isInteger(ne)&&ne>=ee.v&&ft(ee,ne+1)}RN(g)}return!0},ownKeys(y){q(g);var x=Reflect.ownKeys(y).filter(P=>{var j=l.get(P);return j===void 0||j.v!==fh});for(var[A,T]of l)T.v!==fh&&!(A in y)&&x.push(A);return x},setPrototypeOf(){Ien()}})}function x2t(u){try{if(u!==null&&typeof u=="object"&&e3 in u)return u[e3]}catch{}return u}function stn(u,s){return Object.is(x2t(u),x2t(s))}var Bg,ikt,rkt,skt;function otn(){if(Bg===void 0){Bg=window,ikt=/Firefox/.test(navigator.userAgent);var u=Element.prototype,s=Node.prototype,l=Text.prototype;rkt=L6(s,"firstChild").get,skt=L6(s,"nextSibling").get,m2t(u)&&(u.__click=void 0,u.__className=void 0,u.__attributes=null,u.__style=void 0,u.__e=void 0),m2t(l)&&(l.__t=void 0)}}function Ck(u=""){return document.createTextNode(u)}function wk(u){return rkt.call(u)}function wB(u){return skt.call(u)}function Et(u,s){return wk(u)}function yc(u,s=!1){{var l=wk(u);return l instanceof Comment&&l.data===""?wB(l):l}}function Qt(u,s=1,l=!1){let h=u;for(;s--;)h=wB(h);return h}function ctn(u){u.textContent=""}function okt(){return!1}function utn(u,s,l){return document.createElementNS(Pyt,u,void 0)}function ltn(u,s){if(s){const l=document.body;u.autofocus=!0,Sk(()=>{document.activeElement===l&&u.focus()})}}let S2t=!1;function ftn(){S2t||(S2t=!0,document.addEventListener("reset",u=>{Promise.resolve().then(()=>{if(!u.defaultPrevented)for(const s of u.target.elements)s.__on_r?.()})},{capture:!0}))}function PZ(u){var s=Eo,l=_o;Bw(null),r3(null);try{return u()}finally{Bw(s),r3(l)}}function atn(u,s,l,h=l){u.addEventListener(s,()=>PZ(l));const g=u.__on_r;g?u.__on_r=()=>{g(),h(!0)}:u.__on_r=()=>h(!0),ftn()}function ckt(u){_o===null&&(Eo===null&&Oen(),Men()),$6&&Ten()}function htn(u,s){var l=s.last;l===null?s.last=s.first=u:(l.next=u,u.prev=l,s.last=u)}function Fw(u,s){var l=_o;l!==null&&(l.f&ub)!==0&&(u|=ub);var h={ctx:ju,deps:null,nodes:null,f:u|Dd|Dw,first:null,fn:s,last:null,next:null,parent:l,b:l&&l.b,prev:null,teardown:null,wv:0,ac:null},g=h;if((u&OM)!==0)hM!==null?hM.push(h):Ak.ensure().schedule(h);else if(s!==null){try{_M(h)}catch(b){throw hh(h),b}g.deps===null&&g.teardown===null&&g.nodes===null&&g.first===g.last&&(g.f&LS)===0&&(g=g.first,(u&W6)!==0&&(u&H6)!==0&&g!==null&&(g.f|=H6))}if(g!==null&&(g.parent=l,l!==null&&htn(g,l),Eo!==null&&(Eo.f&dh)!==0&&(u&F6)===0)){var p=Eo;(p.effects??=[]).push(g)}return h}function b5e(){return Eo!==null&&!zm}function w5e(u){const s=Fw(gB,null);return sa(s,Na),s.teardown=u,s}function O1(u){ckt();var s=_o.f,l=!Eo&&(s&Xm)!==0&&(s&DS)===0;if(l){var h=ju;(h.e??=[]).push(u)}else return ukt(u)}function ukt(u){return Fw(OM|Dyt,u)}function p5e(u){return ckt(),Fw(gB|Dyt,u)}function lkt(u){Ak.ensure();const s=Fw(F6|LS,u);return()=>{hh(s)}}function dtn(u){Ak.ensure();const s=Fw(F6|LS,u);return(l={})=>new Promise(h=>{l.outro?vS(s,()=>{hh(s),h(void 0)}):(hh(s),h(void 0))})}function pB(u){return Fw(OM,u)}function gtn(u){return Fw(c5e|LS,u)}function jZ(u,s=0){return Fw(gB|s,u)}function Ei(u,s=[],l=[],h=[]){Qyt(h,s,l,g=>{Fw(gB,()=>u(...g.map(q)))})}function ZM(u,s=0){var l=Fw(W6|s,u);return l}function fkt(u,s=0){var l=Fw(o5e|s,u);return l}function $g(u){return Fw(Xm|LS,u)}function akt(u){var s=u.teardown;if(s!==null){const l=$6,h=Eo;C2t(!0),Bw(null);try{s.call(null)}finally{C2t(l),Bw(h)}}}function m5e(u,s=!1){var l=u.first;for(u.first=u.last=null;l!==null;){const g=l.ac;g!==null&&PZ(()=>{g.abort(gk)});var h=l.next;(l.f&F6)!==0?l.parent=null:hh(l,s),l=h}}function btn(u){for(var s=u.first;s!==null;){var l=s.next;(s.f&Xm)===0&&hh(s),s=l}}function hh(u,s=!0){var l=!1;(s||(u.f&Sen)!==0)&&u.nodes!==null&&u.nodes.end!==null&&(wtn(u.nodes.start,u.nodes.end),l=!0),sa(u,Ike),m5e(u,s&&!l),UN(u,0);var h=u.nodes&&u.nodes.t;if(h!==null)for(const p of h)p.stop();akt(u),u.f^=Ike,u.f|=Lw;var g=u.parent;g!==null&&g.first!==null&&hkt(u),u.next=u.prev=u.teardown=u.ctx=u.deps=u.fn=u.nodes=u.ac=u.b=null}function wtn(u,s){for(;u!==null;){var l=u===s?null:wB(u);u.remove(),u=l}}function hkt(u){var s=u.parent,l=u.prev,h=u.next;l!==null&&(l.next=h),h!==null&&(h.prev=l),s!==null&&(s.first===u&&(s.first=h),s.last===u&&(s.last=l))}function vS(u,s,l=!0){var h=[];dkt(u,h,!0);var g=()=>{l&&hh(u),s&&s()},p=h.length;if(p>0){var b=()=>--p||g();for(var y of h)y.out(b)}else g()}function dkt(u,s,l){if((u.f&ub)===0){u.f^=ub;var h=u.nodes&&u.nodes.t;if(h!==null)for(const y of h)(y.is_global||l)&&s.push(y);for(var g=u.first;g!==null;){var p=g.next,b=(g.f&H6)!==0||(g.f&Xm)!==0&&(u.f&W6)!==0;dkt(g,s,b?l:!1),g=p}}}function v5e(u){gkt(u,!0)}function gkt(u,s){if((u.f&ub)!==0){u.f^=ub,(u.f&Na)===0&&(sa(u,Dd),Ak.ensure().schedule(u));for(var l=u.first;l!==null;){var h=l.next,g=(l.f&H6)!==0||(l.f&Xm)!==0;gkt(l,g?s:!1),l=h}var p=u.nodes&&u.nodes.t;if(p!==null)for(const b of p)(b.is_global||s)&&b.in()}}function y5e(u,s){if(u.nodes)for(var l=u.nodes.start,h=u.nodes.end;l!==null;){var g=l===h?null:wB(l);s.append(l),l=g}}let CY=!1,$6=!1;function C2t(u){$6=u}let Eo=null,zm=!1;function Bw(u){Eo=u}let _o=null;function r3(u){_o=u}let Rw=null;function bkt(u){Eo!==null&&(Rw===null?Rw=[u]:Rw.push(u))}let Hg=null,ob=0,Mw=null;function ptn(u){Mw=u}let wkt=1,bS=0,yS=bS;function E2t(u){yS=u}function pkt(){return++wkt}function mB(u){var s=u.f;if((s&Dd)!==0)return!0;if(s&dh&&(u.f&=~SS),(s&i3)!==0){for(var l=u.deps,h=l.length,g=0;g<h;g++){var p=l[g];if(mB(p)&&Zyt(p),p.wv>u.wv)return!0}(s&Dw)!==0&&Gm===null&&sa(u,Na)}return!1}function mkt(u,s,l=!0){var h=u.reactions;if(h!==null&&!(Rw!==null&&MM.call(Rw,u)))for(var g=0;g<h.length;g++){var p=h[g];(p.f&dh)!==0?mkt(p,s,!1):s===p&&(l?sa(p,Dd):(p.f&Na)!==0&&sa(p,i3),h5e(p))}}function vkt(u){var s=Hg,l=ob,h=Mw,g=Eo,p=Rw,b=ju,y=zm,x=yS,A=u.f;Hg=null,ob=0,Mw=null,Eo=(A&(Xm|F6))===0?u:null,Rw=null,PM(u.ctx),zm=!1,yS=++bS,u.ac!==null&&(PZ(()=>{u.ac.abort(gk)}),u.ac=null);try{u.f|=Dke;var T=u.fn,P=T();u.f|=DS;var j=u.deps,R=vc?.is_fork;if(Hg!==null){var z;if(R||UN(u,ob),j!==null&&ob>0)for(j.length=ob+Hg.length,z=0;z<Hg.length;z++)j[ob+z]=Hg[z];else u.deps=j=Hg;if(b5e()&&(u.f&Dw)!==0)for(z=ob;z<j.length;z++)(j[z].reactions??=[]).push(u)}else!R&&j!==null&&ob<j.length&&(UN(u,ob),j.length=ob);if(YM()&&Mw!==null&&!zm&&j!==null&&(u.f&(dh|i3|Dd))===0)for(z=0;z<Mw.length;z++)mkt(Mw[z],u);if(g!==null&&g!==u){if(bS++,g.deps!==null)for(let $=0;$<l;$+=1)g.deps[$].rv=bS;if(s!==null)for(const $ of s)$.rv=bS;Mw!==null&&(h===null?h=Mw:h.push(...Mw))}return(u.f&R6)!==0&&(u.f^=R6),P}catch($){return zyt($)}finally{u.f^=Dke,Hg=s,ob=l,Mw=h,Eo=g,Rw=p,PM(b),zm=y,yS=x}}function mtn(u,s){let l=s.reactions;if(l!==null){var h=men.call(l,u);if(h!==-1){var g=l.length-1;g===0?l=s.reactions=null:(l[h]=l[g],l.pop())}}if(l===null&&(s.f&dh)!==0&&(Hg===null||!MM.call(Hg,s))){var p=s;(p.f&Dw)!==0&&(p.f^=Dw,p.f&=~SS),a5e(p),ntn(p),UN(p,0)}}function UN(u,s){var l=u.deps;if(l!==null)for(var h=s;h<l.length;h++)mtn(u,l[h])}function _M(u){var s=u.f;if((s&Lw)===0){sa(u,Na);var l=_o,h=CY;_o=u,CY=!0;try{(s&(W6|o5e))!==0?btn(u):m5e(u),akt(u);var g=vkt(u);u.teardown=typeof g=="function"?g:null,u.wv=wkt;var p;pen&&Ben&&(u.f&Dd)!==0&&u.deps}finally{CY=h,_o=l}}}async function vtn(){await Promise.resolve(),Ven()}function q(u){var s=u.f,l=(s&dh)!==0;if(Eo!==null&&!zm){var h=_o!==null&&(_o.f&Lw)!==0;if(!h&&(Rw===null||!MM.call(Rw,u))){var g=Eo.deps;if((Eo.f&Dke)!==0)u.rv<bS&&(u.rv=bS,Hg===null&&g!==null&&g[ob]===u?ob++:Hg===null?Hg=[u]:Hg.push(u));else{(Eo.deps??=[]).push(u);var p=u.reactions;p===null?u.reactions=[Eo]:MM.call(p,Eo)||p.push(Eo)}}}if($6&&N6.has(u))return N6.get(u);if(l){var b=u;if($6){var y=b.v;return((b.f&Na)===0&&b.reactions!==null||kkt(b))&&(y=g5e(b)),N6.set(b,y),y}var x=(b.f&Dw)===0&&!zm&&Eo!==null&&(CY||(Eo.f&Dw)!==0),A=(b.f&DS)===0;mB(b)&&(x&&(b.f|=Dw),Zyt(b)),x&&!A&&(ekt(b),ykt(b))}if(Gm?.has(u))return Gm.get(u);if((u.f&R6)!==0)throw u.v;return u.v}function ykt(u){if(u.f|=Dw,u.deps!==null)for(const s of u.deps)(s.reactions??=[]).push(u),(s.f&dh)!==0&&(s.f&Dw)===0&&(ekt(s),ykt(s))}function kkt(u){if(u.v===fh)return!0;if(u.deps===null)return!1;for(const s of u.deps)if(N6.has(s)||(s.f&dh)!==0&&kkt(s))return!0;return!1}function qg(u){var s=zm;try{return zm=!0,u()}finally{zm=s}}function xkt(u){if(!(typeof u!="object"||!u||u instanceof EventTarget)){if(e3 in u)Nke(u);else if(!Array.isArray(u))for(let s in u){const l=u[s];typeof l=="object"&&l&&e3 in l&&Nke(l)}}}function Nke(u,s=new Set){if(typeof u=="object"&&u!==null&&!(u instanceof EventTarget)&&!s.has(u)){s.add(u),u instanceof Date&&u.getTime();for(let h in u)try{Nke(u[h],s)}catch{}const l=OZ(u);if(l!==Object.prototype&&l!==Array.prototype&&l!==Map.prototype&&l!==Set.prototype&&l!==Date.prototype){const h=jyt(l);for(let g in h){const p=h[g].get;if(p)try{p.call(u)}catch{}}}}}const ON=Symbol("events"),Skt=new Set,Bke=new Set;function k5e(u,s,l,h={}){function g(p){if(h.capture||Hke.call(s,p),!p.cancelBubble)return PZ(()=>l?.call(this,p))}return u.startsWith("pointer")||u.startsWith("touch")||u==="wheel"?Sk(()=>{s.addEventListener(u,g,h)}):s.addEventListener(u,g,h),g}function Fke(u,s,l,h={}){var g=k5e(s,u,l,h);return()=>{u.removeEventListener(s,g,h)}}function $Y(u,s,l,h,g){var p={capture:h,passive:g},b=k5e(u,s,l,p);(s===document.body||s===window||s===document||s instanceof HTMLMediaElement)&&w5e(()=>{s.removeEventListener(u,b,p)})}function go(u,s,l){(s[ON]??={})[u]=l}function Ym(u){for(var s=0;s<u.length;s++)Skt.add(u[s]);for(var l of Bke)l(u)}let A2t=null;function Hke(u){var s=this,l=s.ownerDocument,h=u.type,g=u.composedPath?.()||[],p=g[0]||u.target;A2t=u;var b=0,y=A2t===u&&u[ON];if(y){var x=g.indexOf(y);if(x!==-1&&(s===document||s===window)){u[ON]=s;return}var A=g.indexOf(s);if(A===-1)return;x<=A&&(b=x)}if(p=g[b]||u.target,p!==s){ven(u,"currentTarget",{configurable:!0,get(){return p||l}});var T=Eo,P=_o;Bw(null),r3(null);try{for(var j,R=[];p!==null;){var z=p.assignedSlot||p.parentNode||p.host||null;try{var $=p[ON]?.[h];$!=null&&(!p.disabled||u.target===p)&&$.call(p,u)}catch(Q){j?R.push(Q):j=Q}if(u.cancelBubble||z===s||z===null)break;p=z}if(j){for(let Q of R)queueMicrotask(()=>{throw Q});throw j}}finally{u[ON]=s,delete u.currentTarget,Bw(T),r3(P)}}}const ytn=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:u=>u});function ktn(u){return ytn?.createHTML(u)??u}function Ckt(u){var s=utn("template");return s.innerHTML=ktn(u.replaceAll("<!>","<!---->")),s.content}function IM(u,s){var l=_o;l.nodes===null&&(l.nodes={start:u,end:s,a:null,t:null})}function en(u,s){var l=(s&Oyt)!==0,h=(s&ben)!==0,g,p=!u.startsWith("<!>");return()=>{g===void 0&&(g=Ckt(p?u:"<!>"+u),l||(g=wk(g)));var b=h||ikt?document.importNode(g,!0):g.cloneNode(!0);if(l){var y=wk(b),x=b.lastChild;IM(y,x)}else IM(b,b);return b}}function xtn(u,s,l="svg"){var h=!u.startsWith("<!>"),g=(s&Oyt)!==0,p=`<${l}>${h?u:"<!>"+u}</${l}>`,b;return()=>{if(!b){var y=Ckt(p),x=wk(y);if(g)for(b=document.createDocumentFragment();wk(x);)b.appendChild(wk(x));else b=wk(x)}var A=b.cloneNode(!0);if(g){var T=wk(A),P=A.lastChild;IM(T,P)}else IM(A,A);return A}}function fl(u,s){return xtn(u,s,"svg")}function VN(u=""){{var s=Ck(u+"");return IM(s,s),s}}function Pd(){var u=document.createDocumentFragment(),s=document.createComment(""),l=Ck();return u.append(s,l),IM(s,l),u}function kt(u,s){u!==null&&u.before(s)}function Stn(u){return u.endsWith("capture")&&u!=="gotpointercapture"&&u!=="lostpointercapture"}const Ctn=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Etn(u){return Ctn.includes(u)}const Atn={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 Ttn(u){return u=u.toLowerCase(),Atn[u]??u}const Mtn=["touchstart","touchmove"];function Otn(u){return Mtn.includes(u)}function nr(u,s){var l=s==null?"":typeof s=="object"?`${s}`:s;l!==(u.__t??=u.nodeValue)&&(u.__t=l,u.nodeValue=`${l}`)}function Ptn(u,s){return jtn(u,s)}const BQ=new Map;function jtn(u,{target:s,anchor:l,props:h={},events:g,context:p,intro:b=!0,transformError:y}){otn();var x=void 0,A=dtn(()=>{var T=l??s.appendChild(Ck());Xen(T,{pending:()=>{}},R=>{vs({});var z=ju;p&&(z.c=p),g&&(h.$$events=g),x=u(R,h)||{},ys()},y);var P=new Set,j=R=>{for(var z=0;z<R.length;z++){var $=R[z];if(!P.has($)){P.add($);var Q=Otn($);for(const ye of[s,document]){var ee=BQ.get(ye);ee===void 0&&(ee=new Map,BQ.set(ye,ee));var ne=ee.get($);ne===void 0?(ye.addEventListener($,Hke,{passive:Q}),ee.set($,1)):ee.set($,ne+1)}}}};return j(MZ(Skt)),Bke.add(j),()=>{for(var R of P)for(const Q of[s,document]){var z=BQ.get(Q),$=z.get(R);--$==0?(Q.removeEventListener(R,Hke),z.delete(R),z.size===0&&BQ.delete(Q)):z.set(R,$)}Bke.delete(j),T!==l&&T.parentNode?.removeChild(T)}});return _tn.set(x,A),x}let _tn=new WeakMap;class _Z{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(s,l=!0){this.anchor=s,this.#s=l}#r=s=>{if(this.#e.has(s)){var l=this.#e.get(s),h=this.#n.get(l);if(h)v5e(h),this.#i.delete(l);else{var g=this.#t.get(l);g&&(this.#n.set(l,g.effect),this.#t.delete(l),g.fragment.lastChild.remove(),this.anchor.before(g.fragment),h=g.effect)}for(const[p,b]of this.#e){if(this.#e.delete(p),p===s)break;const y=this.#t.get(b);y&&(hh(y.effect),this.#t.delete(b))}for(const[p,b]of this.#n){if(p===l||this.#i.has(p))continue;const y=()=>{if(Array.from(this.#e.values()).includes(p)){var A=document.createDocumentFragment();y5e(b,A),A.append(Ck()),this.#t.set(p,{effect:b,fragment:A})}else hh(b);this.#i.delete(p),this.#n.delete(p)};this.#s||!h?(this.#i.add(p),vS(b,y,!1)):y()}}};#o=s=>{this.#e.delete(s);const l=Array.from(this.#e.values());for(const[h,g]of this.#t)l.includes(h)||(hh(g.effect),this.#t.delete(h))};ensure(s,l){var h=vc,g=okt();if(l&&!this.#n.has(s)&&!this.#t.has(s))if(g){var p=document.createDocumentFragment(),b=Ck();p.append(b),this.#t.set(s,{effect:$g(()=>l(b)),fragment:p})}else this.#n.set(s,$g(()=>l(this.anchor)));if(this.#e.set(h,s),g){for(const[y,x]of this.#n)y===s?h.unskip_effect(x):h.skip_effect(x);for(const[y,x]of this.#t)y===s?h.unskip_effect(x.effect):h.skip_effect(x.effect);h.oncommit(this.#r),h.ondiscard(this.#o)}else this.#r(h)}}function Wg(u,s,...l){var h=new _Z(u);ZM(()=>{const g=s()??null;h.ensure(g,g&&(p=>g(p,...l)))},H6)}function IZ(u){ju===null&&u5e(),QM&&ju.l!==null?Itn(ju).m.push(u):O1(()=>{const s=qg(u);if(typeof s=="function")return s})}function x5e(u){ju===null&&u5e(),IZ(()=>()=>qg(u))}function Itn(u){var s=u.l;return s.u??={a:[],b:[],m:[]}}function Ui(u,s,l=!1){var h=new _Z(u),g=l?H6:0;function p(b,y){h.ensure(b,y)}ZM(()=>{var b=!1;s((y,x=0)=>{b=!0,p(x,y)}),b||p(-1,null)},g)}const Dtn=Symbol("NaN");function Ltn(u,s,l){var h=new _Z(u),g=!YM();ZM(()=>{var p=s();p!==p&&(p=Dtn),g&&p!==null&&typeof p=="object"&&(p={}),h.ensure(p,l)})}function Ra(u,s){return s}function Rtn(u,s,l){for(var h=[],g=s.length,p,b=s.length,y=0;y<g;y++){let P=s[y];vS(P,()=>{if(p){if(p.pending.delete(P),p.done.add(P),p.pending.size===0){var j=u.outrogroups;$ke(u,MZ(p.done)),j.delete(p),j.size===0&&(u.outrogroups=null)}}else b-=1},!1)}if(b===0){var x=h.length===0&&l!==null;if(x){var A=l,T=A.parentNode;ctn(T),T.append(A),u.items.clear()}$ke(u,s,!x)}else p={pending:new Set(s),done:new Set},(u.outrogroups??=new Set).add(p)}function $ke(u,s,l=!0){var h;if(u.pending.size>0){h=new Set;for(const b of u.pending.values())for(const y of b)h.add(u.items.get(y).e)}for(var g=0;g<s.length;g++){var p=s[g];if(h?.has(p)){p.f|=Xv;const b=document.createDocumentFragment();y5e(p,b)}else hh(s[g],l)}}var T2t;function ef(u,s,l,h,g,p=null){var b=u,y=new Map,x=(s&Myt)!==0;if(x){var A=u;b=A.appendChild(Ck())}var T=null,P=d5e(()=>{var ye=l();return TZ(ye)?ye:ye==null?[]:MZ(ye)}),j,R=new Map,z=!0;function $(ye){(ne.effect.f&Lw)===0&&(ne.pending.delete(ye),ne.fallback=T,Ntn(ne,j,b,s,h),T!==null&&(j.length===0?(T.f&Xv)===0?v5e(T):(T.f^=Xv,PN(T,null,b)):vS(T,()=>{T=null})))}function Q(ye){ne.pending.delete(ye)}var ee=ZM(()=>{j=q(P);for(var ye=j.length,le=new Set,we=vc,Oe=okt(),We=0;We<ye;We+=1){var rt=j[We],Ye=h(rt,We),Nt=z?null:y.get(Ye);Nt?(Nt.v&&jM(Nt.v,rt),Nt.i&&jM(Nt.i,We),Oe&&we.unskip_effect(Nt.e)):(Nt=Btn(y,z?b:T2t??=Ck(),rt,Ye,We,g,s,l),z||(Nt.e.f|=Xv),y.set(Ye,Nt)),le.add(Ye)}if(ye===0&&p&&!T&&(z?T=$g(()=>p(b)):(T=$g(()=>p(T2t??=Ck())),T.f|=Xv)),ye>le.size&&Aen(),!z)if(R.set(we,le),Oe){for(const[Ke,Pe]of y)le.has(Ke)||we.skip_effect(Pe.e);we.oncommit($),we.ondiscard(Q)}else $(we);q(P)}),ne={effect:ee,items:y,pending:R,outrogroups:null,fallback:T};z=!1}function pN(u){for(;u!==null&&(u.f&Xm)===0;)u=u.next;return u}function Ntn(u,s,l,h,g){var p=(h&uen)!==0,b=s.length,y=u.items,x=pN(u.effect.first),A,T=null,P,j=[],R=[],z,$,Q,ee;if(p)for(ee=0;ee<b;ee+=1)z=s[ee],$=g(z,ee),Q=y.get($).e,(Q.f&Xv)===0&&(Q.nodes?.a?.measure(),(P??=new Set).add(Q));for(ee=0;ee<b;ee+=1){if(z=s[ee],$=g(z,ee),Q=y.get($).e,u.outrogroups!==null)for(const Nt of u.outrogroups)Nt.pending.delete(Q),Nt.done.delete(Q);if((Q.f&ub)!==0&&(v5e(Q),p&&(Q.nodes?.a?.unfix(),(P??=new Set).delete(Q))),(Q.f&Xv)!==0)if(Q.f^=Xv,Q===x)PN(Q,null,l);else{var ne=T?T.next:x;Q===u.effect.last&&(u.effect.last=Q.prev),Q.prev&&(Q.prev.next=Q.next),Q.next&&(Q.next.prev=Q.prev),C6(u,T,Q),C6(u,Q,ne),PN(Q,ne,l),T=Q,j=[],R=[],x=pN(T.next);continue}if(Q!==x){if(A!==void 0&&A.has(Q)){if(j.length<R.length){var ye=R[0],le;T=ye.prev;var we=j[0],Oe=j[j.length-1];for(le=0;le<j.length;le+=1)PN(j[le],ye,l);for(le=0;le<R.length;le+=1)A.delete(R[le]);C6(u,we.prev,Oe.next),C6(u,T,we),C6(u,Oe,ye),x=ye,T=Oe,ee-=1,j=[],R=[]}else A.delete(Q),PN(Q,x,l),C6(u,Q.prev,Q.next),C6(u,Q,T===null?u.effect.first:T.next),C6(u,T,Q),T=Q;continue}for(j=[],R=[];x!==null&&x!==Q;)(A??=new Set).add(x),R.push(x),x=pN(x.next);if(x===null)continue}(Q.f&Xv)===0&&j.push(Q),T=Q,x=pN(Q.next)}if(u.outrogroups!==null){for(const Nt of u.outrogroups)Nt.pending.size===0&&($ke(u,MZ(Nt.done)),u.outrogroups?.delete(Nt));u.outrogroups.size===0&&(u.outrogroups=null)}if(x!==null||A!==void 0){var We=[];if(A!==void 0)for(Q of A)(Q.f&ub)===0&&We.push(Q);for(;x!==null;)(x.f&ub)===0&&x!==u.fallback&&We.push(x),x=pN(x.next);var rt=We.length;if(rt>0){var Ye=(h&Myt)!==0&&b===0?l:null;if(p){for(ee=0;ee<rt;ee+=1)We[ee].nodes?.a?.measure();for(ee=0;ee<rt;ee+=1)We[ee].nodes?.a?.fix()}Rtn(u,We,Ye)}}p&&Sk(()=>{if(P!==void 0)for(Q of P)Q.nodes?.a?.apply()})}function Btn(u,s,l,h,g,p,b,y){var x=(b&oen)!==0?(b&len)===0?itn(l,!1,!1):CS(l):null,A=(b&cen)!==0?CS(g):null;return{v:x,i:A,e:$g(()=>(p(s,x??l,A??g,y),()=>{u.delete(h)}))}}function PN(u,s,l){if(u.nodes)for(var h=u.nodes.start,g=u.nodes.end,p=s&&(s.f&Xv)===0?s.nodes.start:l;h!==null;){var b=wB(h);if(p.before(h),h===g)return;h=b}}function C6(u,s,l){s===null?u.effect.first=l:s.next=l,l===null?u.effect.last=s:l.prev=s}function DZ(u,s,l){var h=new _Z(u);ZM(()=>{var g=s()??null;h.ensure(g,g&&(p=>l(p,g)))},H6)}function Fg(u,s,l){pB(()=>{var h=qg(()=>s(u,l?.())||{});if(l&&h?.update){var g=!1,p={};jZ(()=>{var b=l();xkt(b),g&&Byt(p,b)&&(p=b,h.update(b))}),g=!0}if(h?.destroy)return()=>h.destroy()})}function Ftn(u,s){var l=void 0,h;fkt(()=>{l!==(l=s())&&(h&&(hh(h),h=null),l&&(h=$g(()=>{pB(()=>l(u))})))})}function Ekt(u){var s,l,h="";if(typeof u=="string"||typeof u=="number")h+=u;else if(typeof u=="object")if(Array.isArray(u)){var g=u.length;for(s=0;s<g;s++)u[s]&&(l=Ekt(u[s]))&&(h&&(h+=" "),h+=l)}else for(l in u)u[l]&&(h&&(h+=" "),h+=l);return h}function Htn(){for(var u,s,l=0,h="",g=arguments.length;l<g;l++)(u=arguments[l])&&(s=Ekt(u))&&(h&&(h+=" "),h+=s);return h}function RS(u){return typeof u=="object"?Htn(u):u??""}const M2t=[...`
2
- \r\f \v\uFEFF`];function $tn(u,s,l){var h=u==null?"":""+u;if(s&&(h=h?h+" "+s:s),l){for(var g of Object.keys(l))if(l[g])h=h?h+" "+g:g;else if(h.length)for(var p=g.length,b=0;(b=h.indexOf(g,b))>=0;){var y=b+p;(b===0||M2t.includes(h[b-1]))&&(y===h.length||M2t.includes(h[y]))?h=(b===0?"":h.substring(0,b))+h.substring(y+1):b=y}}return h===""?null:h}function O2t(u,s=!1){var l=s?" !important;":";",h="";for(var g of Object.keys(u)){var p=u[g];p!=null&&p!==""&&(h+=" "+g+": "+p+l)}return h}function Pye(u){return u[0]!=="-"||u[1]!=="-"?u.toLowerCase():u}function Gtn(u,s){if(s){var l="",h,g;if(Array.isArray(s)?(h=s[0],g=s[1]):h=s,u){u=String(u).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var p=!1,b=0,y=!1,x=[];h&&x.push(...Object.keys(h).map(Pye)),g&&x.push(...Object.keys(g).map(Pye));var A=0,T=-1;const $=u.length;for(var P=0;P<$;P++){var j=u[P];if(y?j==="/"&&u[P-1]==="*"&&(y=!1):p?p===j&&(p=!1):j==="/"&&u[P+1]==="*"?y=!0:j==='"'||j==="'"?p=j:j==="("?b++:j===")"&&b--,!y&&p===!1&&b===0){if(j===":"&&T===-1)T=P;else if(j===";"||P===$-1){if(T!==-1){var R=Pye(u.substring(A,T).trim());if(!x.includes(R)){j!==";"&&P++;var z=u.substring(A,P).trim();l+=" "+z+";"}}A=P+1,T=-1}}}}return h&&(l+=O2t(h)),g&&(l+=O2t(g,!0)),l=l.trim(),l===""?null:l}return u==null?null:String(u)}function Lf(u,s,l,h,g,p){var b=u.__className;if(b!==l||b===void 0){var y=$tn(l,h,p);y==null?u.removeAttribute("class"):s?u.className=y:u.setAttribute("class",y),u.__className=l}else if(p&&g!==p)for(var x in p){var A=!!p[x];(g==null||A!==!!g[x])&&u.classList.toggle(x,A)}return p}function jye(u,s={},l,h){for(var g in l){var p=l[g];s[g]!==p&&(l[g]==null?u.style.removeProperty(g):u.style.setProperty(g,p,h))}}function lb(u,s,l,h){var g=u.__style;if(g!==s){var p=Gtn(s,h);p==null?u.removeAttribute("style"):u.style.cssText=p,u.__style=s}else h&&(Array.isArray(h)?(jye(u,l?.[0],h[0]),jye(u,l?.[1],h[1],"important")):jye(u,l,h));return h}function Gke(u,s,l=!1){if(u.multiple){if(s==null)return;if(!TZ(s))return Ren();for(var h of u.options)h.selected=s.includes(P2t(h));return}for(h of u.options){var g=P2t(h);if(stn(g,s)){h.selected=!0;return}}(!l||s!==void 0)&&(u.selectedIndex=-1)}function ztn(u){var s=new MutationObserver(()=>{Gke(u,u.__value)});s.observe(u,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),w5e(()=>{s.disconnect()})}function P2t(u){return"__value"in u?u.__value:u.value}const M6=Symbol("class"),pk=Symbol("style"),Akt=Symbol("is custom element"),Tkt=Symbol("is html"),Jtn=Ryt?"option":"OPTION",qtn=Ryt?"select":"SELECT";function Utn(u,s){s?u.hasAttribute("selected")||u.setAttribute("selected",""):u.removeAttribute("selected")}function ms(u,s,l,h){var g=Mkt(u);g[s]!==(g[s]=l)&&(s==="loading"&&(u[Cen]=l),l==null?u.removeAttribute(s):typeof l!="string"&&Okt(u).includes(s)?u[s]=l:u.setAttribute(s,l))}function Vtn(u,s,l,h,g=!1,p=!1){var b=Mkt(u),y=b[Akt],x=!b[Tkt],A=s||{},T=u.nodeName===Jtn;for(var P in s)P in l||(l[P]=null);l.class?l.class=RS(l.class):(h||l[M6])&&(l.class=null),l[pk]&&(l.style??=null);var j=Okt(u);for(const le in l){let we=l[le];if(T&&le==="value"&&we==null){u.value=u.__value="",A[le]=we;continue}if(le==="class"){var R=u.namespaceURI==="http://www.w3.org/1999/xhtml";Lf(u,R,we,h,s?.[M6],l[M6]),A[le]=we,A[M6]=l[M6];continue}if(le==="style"){lb(u,we,s?.[pk],l[pk]),A[le]=we,A[pk]=l[pk];continue}var z=A[le];if(!(we===z&&!(we===void 0&&u.hasAttribute(le)))){A[le]=we;var $=le[0]+le[1];if($!=="$$")if($==="on"){const Oe={},We="$$"+le;let rt=le.slice(2);var Q=Etn(rt);if(Stn(rt)&&(rt=rt.slice(0,-7),Oe.capture=!0),!Q&&z){if(we!=null)continue;u.removeEventListener(rt,A[We],Oe),A[We]=null}if(Q)go(rt,u,we),Ym([rt]);else if(we!=null){let Ye=function(Nt){A[le].call(this,Nt)};var ye=Ye;A[We]=k5e(rt,u,Ye,Oe)}}else if(le==="style")ms(u,le,we);else if(le==="autofocus")ltn(u,!!we);else if(!y&&(le==="__value"||le==="value"&&we!=null))u.value=u.__value=we;else if(le==="selected"&&T)Utn(u,we);else{var ee=le;x||(ee=Ttn(ee));var ne=ee==="defaultValue"||ee==="defaultChecked";if(we==null&&!y&&!ne)if(b[le]=null,ee==="value"||ee==="checked"){let Oe=u;const We=s===void 0;if(ee==="value"){let rt=Oe.defaultValue;Oe.removeAttribute(ee),Oe.defaultValue=rt,Oe.value=Oe.__value=We?rt:null}else{let rt=Oe.defaultChecked;Oe.removeAttribute(ee),Oe.defaultChecked=rt,Oe.checked=We?rt:!1}}else u.removeAttribute(le);else ne||j.includes(ee)&&(y||typeof we!="string")?(u[ee]=we,ee in b&&(b[ee]=fh)):typeof we!="function"&&ms(u,ee,we)}}}return A}function K6(u,s,l=[],h=[],g=[],p,b=!1,y=!1){Qyt(g,l,h,x=>{var A=void 0,T={},P=u.nodeName===qtn,j=!1;if(fkt(()=>{var z=s(...x.map(q)),$=Vtn(u,A,z,p,b,y);j&&P&&"value"in z&&Gke(u,z.value);for(let ee of Object.getOwnPropertySymbols(T))z[ee]||hh(T[ee]);for(let ee of Object.getOwnPropertySymbols(z)){var Q=z[ee];ee.description===wen&&(!A||Q!==A[ee])&&(T[ee]&&hh(T[ee]),T[ee]=$g(()=>Ftn(u,()=>Q))),$[ee]=Q}A=$}),P){var R=u;pB(()=>{Gke(R,A.value,!0),ztn(R)})}j=!0})}function Mkt(u){return u.__attributes??={[Akt]:u.nodeName.includes("-"),[Tkt]:u.namespaceURI===Pyt}}var j2t=new Map;function Okt(u){var s=u.getAttribute("is")||u.nodeName,l=j2t.get(s);if(l)return l;j2t.set(s,l=[]);for(var h,g=u,p=Element.prototype;p!==g;){h=jyt(g);for(var b in h)h[b].set&&l.push(b);g=OZ(g)}return l}function _2t(u,s,l=s){var h=new WeakSet;atn(u,"input",async g=>{var p=g?u.defaultValue:u.value;if(p=_ye(u)?Iye(p):p,l(p),vc!==null&&h.add(vc),await vtn(),p!==(p=s())){var b=u.selectionStart,y=u.selectionEnd,x=u.value.length;if(u.value=p??"",y!==null){var A=u.value.length;b===y&&y===x&&A>x?(u.selectionStart=A,u.selectionEnd=A):(u.selectionStart=b,u.selectionEnd=Math.min(y,A))}}}),qg(s)==null&&u.value&&(l(_ye(u)?Iye(u.value):u.value),vc!==null&&h.add(vc)),jZ(()=>{var g=s();if(u===document.activeElement){var p=vc;if(h.has(p))return}_ye(u)&&g===Iye(u.value)||u.type==="date"&&!g&&!u.value||g!==u.value&&(u.value=g??"")})}function _ye(u){var s=u.type;return s==="number"||s==="range"}function Iye(u){return u===""?null:+u}class S5e{#e=new WeakMap;#n;#t;static entries=new WeakMap;constructor(s){this.#t=s}observe(s,l){var h=this.#e.get(s)||new Set;return h.add(l),this.#e.set(s,h),this.#i().observe(s,this.#t),()=>{var g=this.#e.get(s);g.delete(l),g.size===0&&(this.#e.delete(s),this.#n.unobserve(s))}}#i(){return this.#n??(this.#n=new ResizeObserver(s=>{for(var l of s){S5e.entries.set(l.target,l);for(var h of this.#e.get(l.target)||[])h(l)}}))}}var Wtn=new S5e({box:"border-box"});function I2t(u,s,l){var h=Wtn.observe(u,()=>l(u[s]));pB(()=>(qg(()=>l(u[s])),h))}function D2t(u,s){return u===s||u?.[e3]===s}function X6(u={},s,l,h){var g=ju.r,p=_o;return pB(()=>{var b,y;return jZ(()=>{b=y,y=[],qg(()=>{u!==l(...y)&&(s(u,...y),b&&D2t(l(...b),u)&&s(null,...b))})}),()=>{let x=p;for(;x!==g&&x.parent!==null&&x.parent.f&Ike;)x=x.parent;const A=()=>{y&&D2t(l(...y),u)&&s(null,...y)},T=x.teardown;x.teardown=()=>{A(),T?.()}}}),u}function LZ(u=!1){const s=ju,l=s.l.u;if(!l)return;let h=()=>xkt(s.s);if(u){let g=0,p={};const b=bB(()=>{let y=!1;const x=s.s;for(const A in x)x[A]!==p[A]&&(p[A]=x[A],y=!0);return y&&g++,g});h=()=>q(b)}l.b.length&&p5e(()=>{L2t(s,h),jke(l.b)}),O1(()=>{const g=qg(()=>l.m.map(ken));return()=>{for(const p of g)typeof p=="function"&&p()}}),l.a.length&&O1(()=>{L2t(s,h),jke(l.a)})}function L2t(u,s){if(u.l.s)for(const l of u.l.s)q(l);s()}const Ktn={get(u,s){if(!u.exclude.includes(s))return u.props[s]},set(u,s){return!1},getOwnPropertyDescriptor(u,s){if(!u.exclude.includes(s)&&s in u.props)return{enumerable:!0,configurable:!0,value:u.props[s]}},has(u,s){return u.exclude.includes(s)?!1:s in u.props},ownKeys(u){return Reflect.ownKeys(u.props).filter(s=>!u.exclude.includes(s))}};function NS(u,s,l){return new Proxy({props:u,exclude:s},Ktn)}const Xtn={get(u,s){let l=u.props.length;for(;l--;){let h=u.props[l];if(wN(h)&&(h=h()),typeof h=="object"&&h!==null&&s in h)return h[s]}},set(u,s,l){let h=u.props.length;for(;h--;){let g=u.props[h];wN(g)&&(g=g());const p=L6(g,s);if(p&&p.set)return p.set(l),!0}return!1},getOwnPropertyDescriptor(u,s){let l=u.props.length;for(;l--;){let h=u.props[l];if(wN(h)&&(h=h()),typeof h=="object"&&h!==null&&s in h){const g=L6(h,s);return g&&!g.configurable&&(g.configurable=!0),g}}},has(u,s){if(s===e3||s===Lyt)return!1;for(let l of u.props)if(wN(l)&&(l=l()),l!=null&&s in l)return!0;return!1},ownKeys(u){const s=[];for(let l of u.props)if(wN(l)&&(l=l()),!!l){for(const h in l)s.includes(h)||s.push(h);for(const h of Object.getOwnPropertySymbols(l))s.includes(h)||s.push(h)}return s}};function aS(...u){return new Proxy({props:u},Xtn)}function mi(u,s,l,h){var g=!QM||(l&aen)!==0,p=(l&den)!==0,b=(l&gen)!==0,y=h,x=!0,A=()=>(x&&(x=!1,y=b?qg(h):h),y);let T;if(p){var P=e3 in u||Lyt in u;T=L6(u,s)?.set??(P&&s in u?ye=>u[s]=ye:void 0)}var j,R=!1;p?[j,R]=qen(()=>u[s]):j=u[s],j===void 0&&h!==void 0&&(j=A(),T&&(g&&jen(),T(j)));var z;if(g?z=()=>{var ye=u[s];return ye===void 0?A():(x=!0,ye)}:z=()=>{var ye=u[s];return ye!==void 0&&(y=void 0),ye===void 0?y:ye},g&&(l&hen)===0)return z;if(T){var $=u.$$legacy;return(function(ye,le){return arguments.length>0?((!g||!le||$||R)&&T(le?z():ye),ye):z()})}var Q=!1,ee=((l&fen)!==0?bB:d5e)(()=>(Q=!1,z()));p&&q(ee);var ne=_o;return(function(ye,le){if(arguments.length>0){const we=le?q(ee):g&&p?zh(ye):ye;return ft(ee,we),Q=!0,y!==void 0&&(y=we),ye}return $6&&Q||(ne.f&Lw)!==0?ee.v:q(ee)})}var Qtn=en('<div><div class="pane first svelte-1caar0q"><!></div> <div role="separator" tabindex="0"></div> <div class="pane second svelte-1caar0q"><!></div></div>');function mN(u,s){let l=mi(s,"horizontal",3,!1),h=mi(s,"initialSplit",3,50),g=mi(s,"minSize",3,10),p=Si(zh(h())),b,y=Si(!1);function x(ee){ee.preventDefault(),ft(y,!0);const ne=le=>{if(!b)return;const we=b.getBoundingClientRect();let Oe;l()?Oe=(le.clientY-we.top)/we.height*100:Oe=(le.clientX-we.left)/we.width*100,ft(p,Math.max(g(),Math.min(100-g(),Oe)),!0)},ye=()=>{ft(y,!1),window.removeEventListener("mousemove",ne),window.removeEventListener("mouseup",ye)};window.addEventListener("mousemove",ne),window.addEventListener("mouseup",ye)}var A=Qtn();let T;var P=Et(A),j=Et(P);Wg(j,()=>s.first);var R=Qt(P,2);let z;var $=Qt(R,2),Q=Et($);Wg(Q,()=>s.second),X6(A,ee=>b=ee,()=>b),Ei(()=>{T=Lf(A,1,"split-container svelte-1caar0q",null,T,{horizontal:l(),dragging:q(y)}),lb(P,`${l()?"height":"width"}: ${q(p)??""}%`),z=Lf(R,1,"splitter svelte-1caar0q",null,z,{horizontal:l()}),ms(R,"aria-orientation",l()?"horizontal":"vertical"),lb($,`${l()?"height":"width"}: ${100-q(p)}%`)}),go("mousedown",R,x),kt(u,A)}Ym(["mousedown"]);let zke=[],Pkt=[];(()=>{let u="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(s=>s?parseInt(s,36):1);for(let s=0,l=0;s<u.length;s++)(s%2?Pkt:zke).push(l=l+u[s])})();function Ytn(u){if(u<768)return!1;for(let s=0,l=zke.length;;){let h=s+l>>1;if(u<zke[h])l=h;else if(u>=Pkt[h])s=h+1;else return!0;if(s==l)return!1}}function R2t(u){return u>=127462&&u<=127487}const N2t=8205;function Ztn(u,s,l=!0,h=!0){return(l?jkt:enn)(u,s,h)}function jkt(u,s,l){if(s==u.length)return s;s&&_kt(u.charCodeAt(s))&&Ikt(u.charCodeAt(s-1))&&s--;let h=Dye(u,s);for(s+=B2t(h);s<u.length;){let g=Dye(u,s);if(h==N2t||g==N2t||l&&Ytn(g))s+=B2t(g),h=g;else if(R2t(g)){let p=0,b=s-2;for(;b>=0&&R2t(Dye(u,b));)p++,b-=2;if(p%2==0)break;s+=2}else break}return s}function enn(u,s,l){for(;s>0;){let h=jkt(u,s-2,l);if(h<s)return h;s--}return 0}function Dye(u,s){let l=u.charCodeAt(s);if(!Ikt(l)||s+1==u.length)return l;let h=u.charCodeAt(s+1);return _kt(h)?(l-55296<<10)+(h-56320)+65536:l}function _kt(u){return u>=56320&&u<57344}function Ikt(u){return u>=55296&&u<56320}function B2t(u){return u<65536?1:2}let kc=class Dkt{lineAt(s){if(s<0||s>this.length)throw new RangeError(`Invalid position ${s} in document of length ${this.length}`);return this.lineInner(s,!1,1,0)}line(s){if(s<1||s>this.lines)throw new RangeError(`Invalid line number ${s} in ${this.lines}-line document`);return this.lineInner(s,!0,1,0)}replace(s,l,h){[s,l]=DM(this,s,l);let g=[];return this.decompose(0,s,g,2),h.length&&h.decompose(0,h.length,g,3),this.decompose(l,this.length,g,1),Vv.from(g,this.length-(l-s)+h.length)}append(s){return this.replace(this.length,this.length,s)}slice(s,l=this.length){[s,l]=DM(this,s,l);let h=[];return this.decompose(s,l,h,0),Vv.from(h,l-s)}eq(s){if(s==this)return!0;if(s.length!=this.length||s.lines!=this.lines)return!1;let l=this.scanIdentical(s,1),h=this.length-this.scanIdentical(s,-1),g=new NN(this),p=new NN(s);for(let b=l,y=l;;){if(g.next(b),p.next(b),b=0,g.lineBreak!=p.lineBreak||g.done!=p.done||g.value!=p.value)return!1;if(y+=g.value.length,g.done||y>=h)return!0}}iter(s=1){return new NN(this,s)}iterRange(s,l=this.length){return new Lkt(this,s,l)}iterLines(s,l){let h;if(s==null)h=this.iter();else{l==null&&(l=this.lines+1);let g=this.line(s).from;h=this.iterRange(g,Math.max(g,l==this.lines+1?this.length:l<=1?0:this.line(l-1).to))}return new Rkt(h)}toString(){return this.sliceString(0)}toJSON(){let s=[];return this.flatten(s),s}constructor(){}static of(s){if(s.length==0)throw new RangeError("A document must have at least one line");return s.length==1&&!s[0]?Dkt.empty:s.length<=32?new Df(s):Vv.from(Df.split(s,[]))}};class Df extends kc{constructor(s,l=tnn(s)){super(),this.text=s,this.length=l}get lines(){return this.text.length}get children(){return null}lineInner(s,l,h,g){for(let p=0;;p++){let b=this.text[p],y=g+b.length;if((l?h:y)>=s)return new nnn(g,y,h,b);g=y+1,h++}}decompose(s,l,h,g){let p=s<=0&&l>=this.length?this:new Df(F2t(this.text,s,l),Math.min(l,this.length)-Math.max(0,s));if(g&1){let b=h.pop(),y=EY(p.text,b.text.slice(),0,p.length);if(y.length<=32)h.push(new Df(y,b.length+p.length));else{let x=y.length>>1;h.push(new Df(y.slice(0,x)),new Df(y.slice(x)))}}else h.push(p)}replace(s,l,h){if(!(h instanceof Df))return super.replace(s,l,h);[s,l]=DM(this,s,l);let g=EY(this.text,EY(h.text,F2t(this.text,0,s)),l),p=this.length+h.length-(l-s);return g.length<=32?new Df(g,p):Vv.from(Df.split(g,[]),p)}sliceString(s,l=this.length,h=`
2
+ \r\f \v\uFEFF`];function $tn(u,s,l){var h=u==null?"":""+u;if(s&&(h=h?h+" "+s:s),l){for(var g of Object.keys(l))if(l[g])h=h?h+" "+g:g;else if(h.length)for(var p=g.length,b=0;(b=h.indexOf(g,b))>=0;){var y=b+p;(b===0||M2t.includes(h[b-1]))&&(y===h.length||M2t.includes(h[y]))?h=(b===0?"":h.substring(0,b))+h.substring(y+1):b=y}}return h===""?null:h}function O2t(u,s=!1){var l=s?" !important;":";",h="";for(var g of Object.keys(u)){var p=u[g];p!=null&&p!==""&&(h+=" "+g+": "+p+l)}return h}function Pye(u){return u[0]!=="-"||u[1]!=="-"?u.toLowerCase():u}function Gtn(u,s){if(s){var l="",h,g;if(Array.isArray(s)?(h=s[0],g=s[1]):h=s,u){u=String(u).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var p=!1,b=0,y=!1,x=[];h&&x.push(...Object.keys(h).map(Pye)),g&&x.push(...Object.keys(g).map(Pye));var A=0,T=-1;const $=u.length;for(var P=0;P<$;P++){var j=u[P];if(y?j==="/"&&u[P-1]==="*"&&(y=!1):p?p===j&&(p=!1):j==="/"&&u[P+1]==="*"?y=!0:j==='"'||j==="'"?p=j:j==="("?b++:j===")"&&b--,!y&&p===!1&&b===0){if(j===":"&&T===-1)T=P;else if(j===";"||P===$-1){if(T!==-1){var R=Pye(u.substring(A,T).trim());if(!x.includes(R)){j!==";"&&P++;var z=u.substring(A,P).trim();l+=" "+z+";"}}A=P+1,T=-1}}}}return h&&(l+=O2t(h)),g&&(l+=O2t(g,!0)),l=l.trim(),l===""?null:l}return u==null?null:String(u)}function Lf(u,s,l,h,g,p){var b=u.__className;if(b!==l||b===void 0){var y=$tn(l,h,p);y==null?u.removeAttribute("class"):s?u.className=y:u.setAttribute("class",y),u.__className=l}else if(p&&g!==p)for(var x in p){var A=!!p[x];(g==null||A!==!!g[x])&&u.classList.toggle(x,A)}return p}function jye(u,s={},l,h){for(var g in l){var p=l[g];s[g]!==p&&(l[g]==null?u.style.removeProperty(g):u.style.setProperty(g,p,h))}}function lb(u,s,l,h){var g=u.__style;if(g!==s){var p=Gtn(s,h);p==null?u.removeAttribute("style"):u.style.cssText=p,u.__style=s}else h&&(Array.isArray(h)?(jye(u,l?.[0],h[0]),jye(u,l?.[1],h[1],"important")):jye(u,l,h));return h}function Gke(u,s,l=!1){if(u.multiple){if(s==null)return;if(!TZ(s))return Ren();for(var h of u.options)h.selected=s.includes(P2t(h));return}for(h of u.options){var g=P2t(h);if(stn(g,s)){h.selected=!0;return}}(!l||s!==void 0)&&(u.selectedIndex=-1)}function ztn(u){var s=new MutationObserver(()=>{Gke(u,u.__value)});s.observe(u,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),w5e(()=>{s.disconnect()})}function P2t(u){return"__value"in u?u.__value:u.value}const M6=Symbol("class"),pk=Symbol("style"),Akt=Symbol("is custom element"),Tkt=Symbol("is html"),Jtn=Ryt?"option":"OPTION",qtn=Ryt?"select":"SELECT";function Utn(u,s){s?u.hasAttribute("selected")||u.setAttribute("selected",""):u.removeAttribute("selected")}function ms(u,s,l,h){var g=Mkt(u);g[s]!==(g[s]=l)&&(s==="loading"&&(u[Cen]=l),l==null?u.removeAttribute(s):typeof l!="string"&&Okt(u).includes(s)?u[s]=l:u.setAttribute(s,l))}function Vtn(u,s,l,h,g=!1,p=!1){var b=Mkt(u),y=b[Akt],x=!b[Tkt],A=s||{},T=u.nodeName===Jtn;for(var P in s)P in l||(l[P]=null);l.class?l.class=RS(l.class):(h||l[M6])&&(l.class=null),l[pk]&&(l.style??=null);var j=Okt(u);for(const le in l){let we=l[le];if(T&&le==="value"&&we==null){u.value=u.__value="",A[le]=we;continue}if(le==="class"){var R=u.namespaceURI==="http://www.w3.org/1999/xhtml";Lf(u,R,we,h,s?.[M6],l[M6]),A[le]=we,A[M6]=l[M6];continue}if(le==="style"){lb(u,we,s?.[pk],l[pk]),A[le]=we,A[pk]=l[pk];continue}var z=A[le];if(!(we===z&&!(we===void 0&&u.hasAttribute(le)))){A[le]=we;var $=le[0]+le[1];if($!=="$$")if($==="on"){const Oe={},We="$$"+le;let rt=le.slice(2);var Q=Etn(rt);if(Stn(rt)&&(rt=rt.slice(0,-7),Oe.capture=!0),!Q&&z){if(we!=null)continue;u.removeEventListener(rt,A[We],Oe),A[We]=null}if(Q)go(rt,u,we),Ym([rt]);else if(we!=null){let Ye=function(Nt){A[le].call(this,Nt)};var ye=Ye;A[We]=k5e(rt,u,Ye,Oe)}}else if(le==="style")ms(u,le,we);else if(le==="autofocus")ltn(u,!!we);else if(!y&&(le==="__value"||le==="value"&&we!=null))u.value=u.__value=we;else if(le==="selected"&&T)Utn(u,we);else{var ee=le;x||(ee=Ttn(ee));var ne=ee==="defaultValue"||ee==="defaultChecked";if(we==null&&!y&&!ne)if(b[le]=null,ee==="value"||ee==="checked"){let Oe=u;const We=s===void 0;if(ee==="value"){let rt=Oe.defaultValue;Oe.removeAttribute(ee),Oe.defaultValue=rt,Oe.value=Oe.__value=We?rt:null}else{let rt=Oe.defaultChecked;Oe.removeAttribute(ee),Oe.defaultChecked=rt,Oe.checked=We?rt:!1}}else u.removeAttribute(le);else ne||j.includes(ee)&&(y||typeof we!="string")?(u[ee]=we,ee in b&&(b[ee]=fh)):typeof we!="function"&&ms(u,ee,we)}}}return A}function K6(u,s,l=[],h=[],g=[],p,b=!1,y=!1){Qyt(g,l,h,x=>{var A=void 0,T={},P=u.nodeName===qtn,j=!1;if(fkt(()=>{var z=s(...x.map(q)),$=Vtn(u,A,z,p,b,y);j&&P&&"value"in z&&Gke(u,z.value);for(let ee of Object.getOwnPropertySymbols(T))z[ee]||hh(T[ee]);for(let ee of Object.getOwnPropertySymbols(z)){var Q=z[ee];ee.description===wen&&(!A||Q!==A[ee])&&(T[ee]&&hh(T[ee]),T[ee]=$g(()=>Ftn(u,()=>Q))),$[ee]=Q}A=$}),P){var R=u;pB(()=>{Gke(R,A.value,!0),ztn(R)})}j=!0})}function Mkt(u){return u.__attributes??={[Akt]:u.nodeName.includes("-"),[Tkt]:u.namespaceURI===Pyt}}var j2t=new Map;function Okt(u){var s=u.getAttribute("is")||u.nodeName,l=j2t.get(s);if(l)return l;j2t.set(s,l=[]);for(var h,g=u,p=Element.prototype;p!==g;){h=jyt(g);for(var b in h)h[b].set&&l.push(b);g=OZ(g)}return l}function _2t(u,s,l=s){var h=new WeakSet;atn(u,"input",async g=>{var p=g?u.defaultValue:u.value;if(p=_ye(u)?Iye(p):p,l(p),vc!==null&&h.add(vc),await vtn(),p!==(p=s())){var b=u.selectionStart,y=u.selectionEnd,x=u.value.length;if(u.value=p??"",y!==null){var A=u.value.length;b===y&&y===x&&A>x?(u.selectionStart=A,u.selectionEnd=A):(u.selectionStart=b,u.selectionEnd=Math.min(y,A))}}}),qg(s)==null&&u.value&&(l(_ye(u)?Iye(u.value):u.value),vc!==null&&h.add(vc)),jZ(()=>{var g=s();if(u===document.activeElement){var p=vc;if(h.has(p))return}_ye(u)&&g===Iye(u.value)||u.type==="date"&&!g&&!u.value||g!==u.value&&(u.value=g??"")})}function _ye(u){var s=u.type;return s==="number"||s==="range"}function Iye(u){return u===""?null:+u}class S5e{#e=new WeakMap;#n;#t;static entries=new WeakMap;constructor(s){this.#t=s}observe(s,l){var h=this.#e.get(s)||new Set;return h.add(l),this.#e.set(s,h),this.#i().observe(s,this.#t),()=>{var g=this.#e.get(s);g.delete(l),g.size===0&&(this.#e.delete(s),this.#n.unobserve(s))}}#i(){return this.#n??(this.#n=new ResizeObserver(s=>{for(var l of s){S5e.entries.set(l.target,l);for(var h of this.#e.get(l.target)||[])h(l)}}))}}var Wtn=new S5e({box:"border-box"});function I2t(u,s,l){var h=Wtn.observe(u,()=>l(u[s]));pB(()=>(qg(()=>l(u[s])),h))}function D2t(u,s){return u===s||u?.[e3]===s}function X6(u={},s,l,h){var g=ju.r,p=_o;return pB(()=>{var b,y;return jZ(()=>{b=y,y=[],qg(()=>{u!==l(...y)&&(s(u,...y),b&&D2t(l(...b),u)&&s(null,...b))})}),()=>{let x=p;for(;x!==g&&x.parent!==null&&x.parent.f&Ike;)x=x.parent;const A=()=>{y&&D2t(l(...y),u)&&s(null,...y)},T=x.teardown;x.teardown=()=>{A(),T?.()}}}),u}function LZ(u=!1){const s=ju,l=s.l.u;if(!l)return;let h=()=>xkt(s.s);if(u){let g=0,p={};const b=bB(()=>{let y=!1;const x=s.s;for(const A in x)x[A]!==p[A]&&(p[A]=x[A],y=!0);return y&&g++,g});h=()=>q(b)}l.b.length&&p5e(()=>{L2t(s,h),jke(l.b)}),O1(()=>{const g=qg(()=>l.m.map(ken));return()=>{for(const p of g)typeof p=="function"&&p()}}),l.a.length&&O1(()=>{L2t(s,h),jke(l.a)})}function L2t(u,s){if(u.l.s)for(const l of u.l.s)q(l);s()}const Ktn={get(u,s){if(!u.exclude.includes(s))return u.props[s]},set(u,s){return!1},getOwnPropertyDescriptor(u,s){if(!u.exclude.includes(s)&&s in u.props)return{enumerable:!0,configurable:!0,value:u.props[s]}},has(u,s){return u.exclude.includes(s)?!1:s in u.props},ownKeys(u){return Reflect.ownKeys(u.props).filter(s=>!u.exclude.includes(s))}};function NS(u,s,l){return new Proxy({props:u,exclude:s},Ktn)}const Xtn={get(u,s){let l=u.props.length;for(;l--;){let h=u.props[l];if(wN(h)&&(h=h()),typeof h=="object"&&h!==null&&s in h)return h[s]}},set(u,s,l){let h=u.props.length;for(;h--;){let g=u.props[h];wN(g)&&(g=g());const p=L6(g,s);if(p&&p.set)return p.set(l),!0}return!1},getOwnPropertyDescriptor(u,s){let l=u.props.length;for(;l--;){let h=u.props[l];if(wN(h)&&(h=h()),typeof h=="object"&&h!==null&&s in h){const g=L6(h,s);return g&&!g.configurable&&(g.configurable=!0),g}}},has(u,s){if(s===e3||s===Lyt)return!1;for(let l of u.props)if(wN(l)&&(l=l()),l!=null&&s in l)return!0;return!1},ownKeys(u){const s=[];for(let l of u.props)if(wN(l)&&(l=l()),!!l){for(const h in l)s.includes(h)||s.push(h);for(const h of Object.getOwnPropertySymbols(l))s.includes(h)||s.push(h)}return s}};function aS(...u){return new Proxy({props:u},Xtn)}function mi(u,s,l,h){var g=!QM||(l&aen)!==0,p=(l&den)!==0,b=(l&gen)!==0,y=h,x=!0,A=()=>(x&&(x=!1,y=b?qg(h):h),y);let T;if(p){var P=e3 in u||Lyt in u;T=L6(u,s)?.set??(P&&s in u?ye=>u[s]=ye:void 0)}var j,R=!1;p?[j,R]=qen(()=>u[s]):j=u[s],j===void 0&&h!==void 0&&(j=A(),T&&(g&&jen(),T(j)));var z;if(g?z=()=>{var ye=u[s];return ye===void 0?A():(x=!0,ye)}:z=()=>{var ye=u[s];return ye!==void 0&&(y=void 0),ye===void 0?y:ye},g&&(l&hen)===0)return z;if(T){var $=u.$$legacy;return(function(ye,le){return arguments.length>0?((!g||!le||$||R)&&T(le?z():ye),ye):z()})}var Q=!1,ee=((l&fen)!==0?bB:d5e)(()=>(Q=!1,z()));p&&q(ee);var ne=_o;return(function(ye,le){if(arguments.length>0){const we=le?q(ee):g&&p?zh(ye):ye;return ft(ee,we),Q=!0,y!==void 0&&(y=we),ye}return $6&&Q||(ne.f&Lw)!==0?ee.v:q(ee)})}var Qtn=en('<div><div class="pane first svelte-1caar0q"><!></div> <div role="separator" tabindex="0"></div> <div class="pane second svelte-1caar0q"><!></div></div>');function mN(u,s){let l=mi(s,"horizontal",3,!1),h=mi(s,"initialSplit",3,50),g=mi(s,"minSize",3,10),p=Si(zh(h())),b,y=Si(!1);function x(ee){ee.preventDefault(),ft(y,!0);const ne=le=>{if(!b)return;const we=b.getBoundingClientRect();let Oe;l()?Oe=(le.clientY-we.top)/we.height*100:Oe=(le.clientX-we.left)/we.width*100,ft(p,Math.max(g(),Math.min(100-g(),Oe)),!0)},ye=()=>{ft(y,!1),window.removeEventListener("mousemove",ne),window.removeEventListener("mouseup",ye)};window.addEventListener("mousemove",ne),window.addEventListener("mouseup",ye)}var A=Qtn();let T;var P=Et(A),j=Et(P);Wg(j,()=>s.first);var R=Qt(P,2);let z;var $=Qt(R,2),Q=Et($);Wg(Q,()=>s.second),X6(A,ee=>b=ee,()=>b),Ei(()=>{T=Lf(A,1,"split-container svelte-1caar0q",null,T,{horizontal:l(),dragging:q(y)}),lb(P,`${l()?"height":"width"}: ${q(p)??""}%`),z=Lf(R,1,"splitter svelte-1caar0q",null,z,{horizontal:l()}),ms(R,"aria-orientation",l()?"horizontal":"vertical"),lb($,`${l()?"height":"width"}: ${100-q(p)}%`)}),go("mousedown",R,x),kt(u,A)}Ym(["mousedown"]);let zke=[],Pkt=[];(()=>{let u="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(s=>s?parseInt(s,36):1);for(let s=0,l=0;s<u.length;s++)(s%2?Pkt:zke).push(l=l+u[s])})();function Ytn(u){if(u<768)return!1;for(let s=0,l=zke.length;;){let h=s+l>>1;if(u<zke[h])l=h;else if(u>=Pkt[h])s=h+1;else return!0;if(s==l)return!1}}function R2t(u){return u>=127462&&u<=127487}const N2t=8205;function Ztn(u,s,l=!0,h=!0){return(l?jkt:enn)(u,s,h)}function jkt(u,s,l){if(s==u.length)return s;s&&_kt(u.charCodeAt(s))&&Ikt(u.charCodeAt(s-1))&&s--;let h=Dye(u,s);for(s+=B2t(h);s<u.length;){let g=Dye(u,s);if(h==N2t||g==N2t||l&&Ytn(g))s+=B2t(g),h=g;else if(R2t(g)){let p=0,b=s-2;for(;b>=0&&R2t(Dye(u,b));)p++,b-=2;if(p%2==0)break;s+=2}else break}return s}function enn(u,s,l){for(;s>1;){let h=jkt(u,s-2,l);if(h<s)return h;s--}return 0}function Dye(u,s){let l=u.charCodeAt(s);if(!Ikt(l)||s+1==u.length)return l;let h=u.charCodeAt(s+1);return _kt(h)?(l-55296<<10)+(h-56320)+65536:l}function _kt(u){return u>=56320&&u<57344}function Ikt(u){return u>=55296&&u<56320}function B2t(u){return u<65536?1:2}let kc=class Dkt{lineAt(s){if(s<0||s>this.length)throw new RangeError(`Invalid position ${s} in document of length ${this.length}`);return this.lineInner(s,!1,1,0)}line(s){if(s<1||s>this.lines)throw new RangeError(`Invalid line number ${s} in ${this.lines}-line document`);return this.lineInner(s,!0,1,0)}replace(s,l,h){[s,l]=DM(this,s,l);let g=[];return this.decompose(0,s,g,2),h.length&&h.decompose(0,h.length,g,3),this.decompose(l,this.length,g,1),Vv.from(g,this.length-(l-s)+h.length)}append(s){return this.replace(this.length,this.length,s)}slice(s,l=this.length){[s,l]=DM(this,s,l);let h=[];return this.decompose(s,l,h,0),Vv.from(h,l-s)}eq(s){if(s==this)return!0;if(s.length!=this.length||s.lines!=this.lines)return!1;let l=this.scanIdentical(s,1),h=this.length-this.scanIdentical(s,-1),g=new NN(this),p=new NN(s);for(let b=l,y=l;;){if(g.next(b),p.next(b),b=0,g.lineBreak!=p.lineBreak||g.done!=p.done||g.value!=p.value)return!1;if(y+=g.value.length,g.done||y>=h)return!0}}iter(s=1){return new NN(this,s)}iterRange(s,l=this.length){return new Lkt(this,s,l)}iterLines(s,l){let h;if(s==null)h=this.iter();else{l==null&&(l=this.lines+1);let g=this.line(s).from;h=this.iterRange(g,Math.max(g,l==this.lines+1?this.length:l<=1?0:this.line(l-1).to))}return new Rkt(h)}toString(){return this.sliceString(0)}toJSON(){let s=[];return this.flatten(s),s}constructor(){}static of(s){if(s.length==0)throw new RangeError("A document must have at least one line");return s.length==1&&!s[0]?Dkt.empty:s.length<=32?new Df(s):Vv.from(Df.split(s,[]))}};class Df extends kc{constructor(s,l=tnn(s)){super(),this.text=s,this.length=l}get lines(){return this.text.length}get children(){return null}lineInner(s,l,h,g){for(let p=0;;p++){let b=this.text[p],y=g+b.length;if((l?h:y)>=s)return new nnn(g,y,h,b);g=y+1,h++}}decompose(s,l,h,g){let p=s<=0&&l>=this.length?this:new Df(F2t(this.text,s,l),Math.min(l,this.length)-Math.max(0,s));if(g&1){let b=h.pop(),y=EY(p.text,b.text.slice(),0,p.length);if(y.length<=32)h.push(new Df(y,b.length+p.length));else{let x=y.length>>1;h.push(new Df(y.slice(0,x)),new Df(y.slice(x)))}}else h.push(p)}replace(s,l,h){if(!(h instanceof Df))return super.replace(s,l,h);[s,l]=DM(this,s,l);let g=EY(this.text,EY(h.text,F2t(this.text,0,s)),l),p=this.length+h.length-(l-s);return g.length<=32?new Df(g,p):Vv.from(Df.split(g,[]),p)}sliceString(s,l=this.length,h=`
3
3
  `){[s,l]=DM(this,s,l);let g="";for(let p=0,b=0;p<=l&&b<this.text.length;b++){let y=this.text[b],x=p+y.length;p>s&&b&&(g+=h),s<x&&l>p&&(g+=y.slice(Math.max(0,s-p),l-p)),p=x+1}return g}flatten(s){for(let l of this.text)s.push(l)}scanIdentical(){return 0}static split(s,l){let h=[],g=-1;for(let p of s)h.push(p),g+=p.length+1,h.length==32&&(l.push(new Df(h,g)),h=[],g=-1);return g>-1&&l.push(new Df(h,g)),l}}class Vv extends kc{constructor(s,l){super(),this.children=s,this.length=l,this.lines=0;for(let h of s)this.lines+=h.lines}lineInner(s,l,h,g){for(let p=0;;p++){let b=this.children[p],y=g+b.length,x=h+b.lines-1;if((l?x:y)>=s)return b.lineInner(s,l,h,g);g=y+1,h=x+1}}decompose(s,l,h,g){for(let p=0,b=0;b<=l&&p<this.children.length;p++){let y=this.children[p],x=b+y.length;if(s<=x&&l>=b){let A=g&((b<=s?1:0)|(x>=l?2:0));b>=s&&x<=l&&!A?h.push(y):y.decompose(s-b,l-b,h,A)}b=x+1}}replace(s,l,h){if([s,l]=DM(this,s,l),h.lines<this.lines)for(let g=0,p=0;g<this.children.length;g++){let b=this.children[g],y=p+b.length;if(s>=p&&l<=y){let x=b.replace(s-p,l-p,h),A=this.lines-b.lines+x.lines;if(x.lines<A>>4&&x.lines>A>>6){let T=this.children.slice();return T[g]=x,new Vv(T,this.length-(l-s)+h.length)}return super.replace(p,y,x)}p=y+1}return super.replace(s,l,h)}sliceString(s,l=this.length,h=`
4
4
  `){[s,l]=DM(this,s,l);let g="";for(let p=0,b=0;p<this.children.length&&b<=l;p++){let y=this.children[p],x=b+y.length;b>s&&p&&(g+=h),s<x&&l>b&&(g+=y.sliceString(s-b,l-b,h)),b=x+1}return g}flatten(s){for(let l of this.children)l.flatten(s)}scanIdentical(s,l){if(!(s instanceof Vv))return 0;let h=0,[g,p,b,y]=l>0?[0,0,this.children.length,s.children.length]:[this.children.length-1,s.children.length-1,-1,-1];for(;;g+=l,p+=l){if(g==b||p==y)return h;let x=this.children[g],A=s.children[p];if(x!=A)return h+x.scanIdentical(A,l);h+=x.length+1}}static from(s,l=s.reduce((h,g)=>h+g.length+1,-1)){let h=0;for(let R of s)h+=R.lines;if(h<32){let R=[];for(let z of s)z.flatten(R);return new Df(R,l)}let g=Math.max(32,h>>5),p=g<<1,b=g>>1,y=[],x=0,A=-1,T=[];function P(R){let z;if(R.lines>p&&R instanceof Vv)for(let $ of R.children)P($);else R.lines>b&&(x>b||!x)?(j(),y.push(R)):R instanceof Df&&x&&(z=T[T.length-1])instanceof Df&&R.lines+z.lines<=32?(x+=R.lines,A+=R.length+1,T[T.length-1]=new Df(z.text.concat(R.text),z.length+1+R.length)):(x+R.lines>g&&j(),x+=R.lines,A+=R.length+1,T.push(R))}function j(){x!=0&&(y.push(T.length==1?T[0]:Vv.from(T,A)),A=-1,x=T.length=0)}for(let R of s)P(R);return j(),y.length==1?y[0]:new Vv(y,l)}}kc.empty=new Df([""],0);function tnn(u){let s=-1;for(let l of u)s+=l.length+1;return s}function EY(u,s,l=0,h=1e9){for(let g=0,p=0,b=!0;p<u.length&&g<=h;p++){let y=u[p],x=g+y.length;x>=l&&(x>h&&(y=y.slice(0,h-g)),g<l&&(y=y.slice(l-g)),b?(s[s.length-1]+=y,b=!1):s.push(y)),g=x+1}return s}function F2t(u,s,l){return EY(u,[""],s,l)}class NN{constructor(s,l=1){this.dir=l,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[s],this.offsets=[l>0?1:(s instanceof Df?s.text.length:s.children.length)<<1]}nextInner(s,l){for(this.done=this.lineBreak=!1;;){let h=this.nodes.length-1,g=this.nodes[h],p=this.offsets[h],b=p>>1,y=g instanceof Df?g.text.length:g.children.length;if(b==(l>0?y:0)){if(h==0)return this.done=!0,this.value="",this;l>0&&this.offsets[h-1]++,this.nodes.pop(),this.offsets.pop()}else if((p&1)==(l>0?0:1)){if(this.offsets[h]+=l,s==0)return this.lineBreak=!0,this.value=`
5
5
  `,this;s--}else if(g instanceof Df){let x=g.text[b+(l<0?-1:0)];if(this.offsets[h]+=l,x.length>Math.max(0,s))return this.value=s==0?x:l>0?x.slice(s):x.slice(0,x.length-s),this;s-=x.length}else{let x=g.children[b+(l<0?-1:0)];s>x.length?(s-=x.length,this.offsets[h]+=l):(l<0&&this.offsets[h]--,this.nodes.push(x),this.offsets.push(l>0?1:(x instanceof Df?x.text.length:x.children.length)<<1))}}}next(s=0){return s<0&&(this.nextInner(-s,-this.dir),s=this.value.length),this.nextInner(s,this.dir)}}class Lkt{constructor(s,l,h){this.value="",this.done=!1,this.cursor=new NN(s,l>h?-1:1),this.pos=l>h?s.length:0,this.from=Math.min(l,h),this.to=Math.max(l,h)}nextInner(s,l){if(l<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;s+=Math.max(0,l<0?this.pos-this.to:this.from-this.pos);let h=l<0?this.pos-this.from:this.to-this.pos;s>h&&(s=h),h-=s;let{value:g}=this.cursor.next(s);return this.pos+=(g.length+s)*l,this.value=g.length<=h?g:l<0?g.slice(g.length-h):g.slice(0,h),this.done=!this.value,this}next(s=0){return s<0?s=Math.max(s,this.from-this.pos):s>0&&(s=Math.min(s,this.to-this.pos)),this.nextInner(s,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Rkt{constructor(s){this.inner=s,this.afterBreak=!0,this.value="",this.done=!1}next(s=0){let{done:l,lineBreak:h,value:g}=this.inner.next(s);return l&&this.afterBreak?(this.value="",this.afterBreak=!1):l?(this.done=!0,this.value=""):h?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=g,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(kc.prototype[Symbol.iterator]=function(){return this.iter()},NN.prototype[Symbol.iterator]=Lkt.prototype[Symbol.iterator]=Rkt.prototype[Symbol.iterator]=function(){return this});class nnn{constructor(s,l,h,g){this.from=s,this.to=l,this.number=h,this.text=g}get length(){return this.to-this.from}}function DM(u,s,l){return s=Math.max(0,Math.min(u.length,s)),[s,Math.max(s,Math.min(u.length,l))]}function jd(u,s,l=!0,h=!0){return Ztn(u,s,l,h)}function inn(u){return u>=56320&&u<57344}function rnn(u){return u>=55296&&u<56320}function uS(u,s){let l=u.charCodeAt(s);if(!rnn(l)||s+1==u.length)return l;let h=u.charCodeAt(s+1);return inn(h)?(l-55296<<10)+(h-56320)+65536:l}function snn(u){return u<=65535?String.fromCharCode(u):(u-=65536,String.fromCharCode((u>>10)+55296,(u&1023)+56320))}function fM(u){return u<65536?1:2}const Jke=/\r\n?|\n/;var zg=(function(u){return u[u.Simple=0]="Simple",u[u.TrackDel=1]="TrackDel",u[u.TrackBefore=2]="TrackBefore",u[u.TrackAfter=3]="TrackAfter",u})(zg||(zg={}));class t3{constructor(s){this.sections=s}get length(){let s=0;for(let l=0;l<this.sections.length;l+=2)s+=this.sections[l];return s}get newLength(){let s=0;for(let l=0;l<this.sections.length;l+=2){let h=this.sections[l+1];s+=h<0?this.sections[l]:h}return s}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(s){for(let l=0,h=0,g=0;l<this.sections.length;){let p=this.sections[l++],b=this.sections[l++];b<0?(s(h,g,p),g+=p):g+=b,h+=p}}iterChangedRanges(s,l=!1){qke(this,s,l)}get invertedDesc(){let s=[];for(let l=0;l<this.sections.length;){let h=this.sections[l++],g=this.sections[l++];g<0?s.push(h,g):s.push(g,h)}return new t3(s)}composeDesc(s){return this.empty?s:s.empty?this:Nkt(this,s)}mapDesc(s,l=!1){return s.empty?this:Uke(this,s,l)}mapPos(s,l=-1,h=zg.Simple){let g=0,p=0;for(let b=0;b<this.sections.length;){let y=this.sections[b++],x=this.sections[b++],A=g+y;if(x<0){if(A>s)return p+(s-g);p+=y}else{if(h!=zg.Simple&&A>=s&&(h==zg.TrackDel&&g<s&&A>s||h==zg.TrackBefore&&g<s||h==zg.TrackAfter&&A>s))return null;if(A>s||A==s&&l<0&&!y)return s==g||l<0?p:p+x;p+=x}g=A}if(s>g)throw new RangeError(`Position ${s} is out of range for changeset of length ${g}`);return p}touchesRange(s,l=s){for(let h=0,g=0;h<this.sections.length&&g<=l;){let p=this.sections[h++],b=this.sections[h++],y=g+p;if(b>=0&&g<=l&&y>=s)return g<s&&y>l?"cover":!0;g=y}return!1}toString(){let s="";for(let l=0;l<this.sections.length;){let h=this.sections[l++],g=this.sections[l++];s+=(s?" ":"")+h+(g>=0?":"+g:"")}return s}toJSON(){return this.sections}static fromJSON(s){if(!Array.isArray(s)||s.length%2||s.some(l=>typeof l!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t3(s)}static create(s){return new t3(s)}}class La extends t3{constructor(s,l){super(s),this.inserted=l}apply(s){if(this.length!=s.length)throw new RangeError("Applying change set to a document with the wrong length");return qke(this,(l,h,g,p,b)=>s=s.replace(g,g+(h-l),b),!1),s}mapDesc(s,l=!1){return Uke(this,s,l,!0)}invert(s){let l=this.sections.slice(),h=[];for(let g=0,p=0;g<l.length;g+=2){let b=l[g],y=l[g+1];if(y>=0){l[g]=y,l[g+1]=b;let x=g>>1;for(;h.length<x;)h.push(kc.empty);h.push(b?s.slice(p,p+b):kc.empty)}p+=b}return new La(l,h)}compose(s){return this.empty?s:s.empty?this:Nkt(this,s,!0)}map(s,l=!1){return s.empty?this:Uke(this,s,l,!0)}iterChanges(s,l=!1){qke(this,s,l)}get desc(){return t3.create(this.sections)}filter(s){let l=[],h=[],g=[],p=new WN(this);e:for(let b=0,y=0;;){let x=b==s.length?1e9:s[b++];for(;y<x||y==x&&p.len==0;){if(p.done)break e;let T=Math.min(p.len,x-y);Od(g,T,-1);let P=p.ins==-1?-1:p.off==0?p.ins:0;Od(l,T,P),P>0&&_6(h,l,p.text),p.forward(T),y+=T}let A=s[b++];for(;y<A;){if(p.done)break e;let T=Math.min(p.len,A-y);Od(l,T,-1),Od(g,T,p.ins==-1?-1:p.off==0?p.ins:0),p.forward(T),y+=T}}return{changes:new La(l,h),filtered:t3.create(g)}}toJSON(){let s=[];for(let l=0;l<this.sections.length;l+=2){let h=this.sections[l],g=this.sections[l+1];g<0?s.push(h):g==0?s.push([h]):s.push([h].concat(this.inserted[l>>1].toJSON()))}return s}static of(s,l,h){let g=[],p=[],b=0,y=null;function x(T=!1){if(!T&&!g.length)return;b<l&&Od(g,l-b,-1);let P=new La(g,p);y=y?y.compose(P.map(y)):P,g=[],p=[],b=0}function A(T){if(Array.isArray(T))for(let P of T)A(P);else if(T instanceof La){if(T.length!=l)throw new RangeError(`Mismatched change set length (got ${T.length}, expected ${l})`);x(),y=y?y.compose(T.map(y)):T}else{let{from:P,to:j=P,insert:R}=T;if(P>j||P<0||j>l)throw new RangeError(`Invalid change range ${P} to ${j} (in doc of length ${l})`);let z=R?typeof R=="string"?kc.of(R.split(h||Jke)):R:kc.empty,$=z.length;if(P==j&&$==0)return;P<b&&x(),P>b&&Od(g,P-b,-1),Od(g,j-P,$),_6(p,g,z),b=j}}return A(s),x(!y),y}static empty(s){return new La(s?[s,-1]:[],[])}static fromJSON(s){if(!Array.isArray(s))throw new RangeError("Invalid JSON representation of ChangeSet");let l=[],h=[];for(let g=0;g<s.length;g++){let p=s[g];if(typeof p=="number")l.push(p,-1);else{if(!Array.isArray(p)||typeof p[0]!="number"||p.some((b,y)=>y&&typeof b!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(p.length==1)l.push(p[0],0);else{for(;h.length<g;)h.push(kc.empty);h[g]=kc.of(p.slice(1)),l.push(p[0],h[g].length)}}}return new La(l,h)}static createSet(s,l){return new La(s,l)}}function Od(u,s,l,h=!1){if(s==0&&l<=0)return;let g=u.length-2;g>=0&&l<=0&&l==u[g+1]?u[g]+=s:g>=0&&s==0&&u[g]==0?u[g+1]+=l:h?(u[g]+=s,u[g+1]+=l):u.push(s,l)}function _6(u,s,l){if(l.length==0)return;let h=s.length-2>>1;if(h<u.length)u[u.length-1]=u[u.length-1].append(l);else{for(;u.length<h;)u.push(kc.empty);u.push(l)}}function qke(u,s,l){let h=u.inserted;for(let g=0,p=0,b=0;b<u.sections.length;){let y=u.sections[b++],x=u.sections[b++];if(x<0)g+=y,p+=y;else{let A=g,T=p,P=kc.empty;for(;A+=y,T+=x,x&&h&&(P=P.append(h[b-2>>1])),!(l||b==u.sections.length||u.sections[b+1]<0);)y=u.sections[b++],x=u.sections[b++];s(g,A,p,T,P),g=A,p=T}}}function Uke(u,s,l,h=!1){let g=[],p=h?[]:null,b=new WN(u),y=new WN(s);for(let x=-1;;){if(b.done&&y.len||y.done&&b.len)throw new Error("Mismatched change set lengths");if(b.ins==-1&&y.ins==-1){let A=Math.min(b.len,y.len);Od(g,A,-1),b.forward(A),y.forward(A)}else if(y.ins>=0&&(b.ins<0||x==b.i||b.off==0&&(y.len<b.len||y.len==b.len&&!l))){let A=y.len;for(Od(g,y.ins,-1);A;){let T=Math.min(b.len,A);b.ins>=0&&x<b.i&&b.len<=T&&(Od(g,0,b.ins),p&&_6(p,g,b.text),x=b.i),b.forward(T),A-=T}y.next()}else if(b.ins>=0){let A=0,T=b.len;for(;T;)if(y.ins==-1){let P=Math.min(T,y.len);A+=P,T-=P,y.forward(P)}else if(y.ins==0&&y.len<T)T-=y.len,y.next();else break;Od(g,A,x<b.i?b.ins:0),p&&x<b.i&&_6(p,g,b.text),x=b.i,b.forward(b.len-T)}else{if(b.done&&y.done)return p?La.createSet(g,p):t3.create(g);throw new Error("Mismatched change set lengths")}}}function Nkt(u,s,l=!1){let h=[],g=l?[]:null,p=new WN(u),b=new WN(s);for(let y=!1;;){if(p.done&&b.done)return g?La.createSet(h,g):t3.create(h);if(p.ins==0)Od(h,p.len,0,y),p.next();else if(b.len==0&&!b.done)Od(h,0,b.ins,y),g&&_6(g,h,b.text),b.next();else{if(p.done||b.done)throw new Error("Mismatched change set lengths");{let x=Math.min(p.len2,b.len),A=h.length;if(p.ins==-1){let T=b.ins==-1?-1:b.off?0:b.ins;Od(h,x,T,y),g&&T&&_6(g,h,b.text)}else b.ins==-1?(Od(h,p.off?0:p.len,x,y),g&&_6(g,h,p.textBit(x))):(Od(h,p.off?0:p.len,b.off?0:b.ins,y),g&&!b.off&&_6(g,h,b.text));y=(p.ins>x||b.ins>=0&&b.len>x)&&(y||h.length>A),p.forward2(x),b.forward(x)}}}}class WN{constructor(s){this.set=s,this.i=0,this.next()}next(){let{sections:s}=this.set;this.i<s.length?(this.len=s[this.i++],this.ins=s[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:s}=this.set,l=this.i-2>>1;return l>=s.length?kc.empty:s[l]}textBit(s){let{inserted:l}=this.set,h=this.i-2>>1;return h>=l.length&&!s?kc.empty:l[h].slice(this.off,s==null?void 0:this.off+s)}forward(s){s==this.len?this.next():(this.len-=s,this.off+=s)}forward2(s){this.ins==-1?this.forward(s):s==this.ins?this.next():(this.ins-=s,this.off+=s)}}class wS{constructor(s,l,h){this.from=s,this.to=l,this.flags=h}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let s=this.flags&7;return s==7?null:s}get goalColumn(){let s=this.flags>>6;return s==16777215?void 0:s}map(s,l=-1){let h,g;return this.empty?h=g=s.mapPos(this.from,l):(h=s.mapPos(this.from,1),g=s.mapPos(this.to,-1)),h==this.from&&g==this.to?this:new wS(h,g,this.flags)}extend(s,l=s){if(s<=this.anchor&&l>=this.anchor)return Gn.range(s,l);let h=Math.abs(s-this.anchor)>Math.abs(l-this.anchor)?s:l;return Gn.range(this.anchor,h)}eq(s,l=!1){return this.anchor==s.anchor&&this.head==s.head&&(!l||!this.empty||this.assoc==s.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(s){if(!s||typeof s.anchor!="number"||typeof s.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Gn.range(s.anchor,s.head)}static create(s,l,h){return new wS(s,l,h)}}class Gn{constructor(s,l){this.ranges=s,this.mainIndex=l}map(s,l=-1){return s.empty?this:Gn.create(this.ranges.map(h=>h.map(s,l)),this.mainIndex)}eq(s,l=!1){if(this.ranges.length!=s.ranges.length||this.mainIndex!=s.mainIndex)return!1;for(let h=0;h<this.ranges.length;h++)if(!this.ranges[h].eq(s.ranges[h],l))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Gn([this.main],0)}addRange(s,l=!0){return Gn.create([s].concat(this.ranges),l?0:this.mainIndex+1)}replaceRange(s,l=this.mainIndex){let h=this.ranges.slice();return h[l]=s,Gn.create(h,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(s=>s.toJSON()),main:this.mainIndex}}static fromJSON(s){if(!s||!Array.isArray(s.ranges)||typeof s.main!="number"||s.main>=s.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Gn(s.ranges.map(l=>wS.fromJSON(l)),s.main)}static single(s,l=s){return new Gn([Gn.range(s,l)],0)}static create(s,l=0){if(s.length==0)throw new RangeError("A selection needs at least one range");for(let h=0,g=0;g<s.length;g++){let p=s[g];if(p.empty?p.from<=h:p.from<h)return Gn.normalized(s.slice(),l);h=p.to}return new Gn(s,l)}static cursor(s,l=0,h,g){return wS.create(s,s,(l==0?0:l<0?8:16)|(h==null?7:Math.min(6,h))|(g??16777215)<<6)}static range(s,l,h,g){let p=(h??16777215)<<6|(g==null?7:Math.min(6,g));return l<s?wS.create(l,s,48|p):wS.create(s,l,(l>s?8:0)|p)}static normalized(s,l=0){let h=s[l];s.sort((g,p)=>g.from-p.from),l=s.indexOf(h);for(let g=1;g<s.length;g++){let p=s[g],b=s[g-1];if(p.empty?p.from<=b.to:p.from<b.to){let y=b.from,x=Math.max(p.to,b.to);g<=l&&l--,s.splice(--g,2,p.anchor>p.head?Gn.range(x,y):Gn.range(y,x))}}return new Gn(s,l)}}function Bkt(u,s){for(let l of u.ranges)if(l.to>s)throw new RangeError("Selection points outside of document")}let C5e=0;class $i{constructor(s,l,h,g,p){this.combine=s,this.compareInput=l,this.compare=h,this.isStatic=g,this.id=C5e++,this.default=s([]),this.extensions=typeof p=="function"?p(this):p}get reader(){return this}static define(s={}){return new $i(s.combine||(l=>l),s.compareInput||((l,h)=>l===h),s.compare||(s.combine?(l,h)=>l===h:E5e),!!s.static,s.enables)}of(s){return new AY([],this,0,s)}compute(s,l){if(this.isStatic)throw new Error("Can't compute a static facet");return new AY(s,this,1,l)}computeN(s,l){if(this.isStatic)throw new Error("Can't compute a static facet");return new AY(s,this,2,l)}from(s,l){return l||(l=h=>h),this.compute([s],h=>l(h.field(s)))}}function E5e(u,s){return u==s||u.length==s.length&&u.every((l,h)=>l===s[h])}class AY{constructor(s,l,h,g){this.dependencies=s,this.facet=l,this.type=h,this.value=g,this.id=C5e++}dynamicSlot(s){var l;let h=this.value,g=this.facet.compareInput,p=this.id,b=s[p]>>1,y=this.type==2,x=!1,A=!1,T=[];for(let P of this.dependencies)P=="doc"?x=!0:P=="selection"?A=!0:(((l=s[P.id])!==null&&l!==void 0?l:1)&1)==0&&T.push(s[P.id]);return{create(P){return P.values[b]=h(P),1},update(P,j){if(x&&j.docChanged||A&&(j.docChanged||j.selection)||Vke(P,T)){let R=h(P);if(y?!H2t(R,P.values[b],g):!g(R,P.values[b]))return P.values[b]=R,1}return 0},reconfigure:(P,j)=>{let R,z=j.config.address[p];if(z!=null){let $=zY(j,z);if(this.dependencies.every(Q=>Q instanceof $i?j.facet(Q)===P.facet(Q):Q instanceof Hw?j.field(Q,!1)==P.field(Q,!1):!0)||(y?H2t(R=h(P),$,g):g(R=h(P),$)))return P.values[b]=$,0}else R=h(P);return P.values[b]=R,1}}}}function H2t(u,s,l){if(u.length!=s.length)return!1;for(let h=0;h<u.length;h++)if(!l(u[h],s[h]))return!1;return!0}function Vke(u,s){let l=!1;for(let h of s)BN(u,h)&1&&(l=!0);return l}function onn(u,s,l){let h=l.map(x=>u[x.id]),g=l.map(x=>x.type),p=h.filter(x=>!(x&1)),b=u[s.id]>>1;function y(x){let A=[];for(let T=0;T<h.length;T++){let P=zY(x,h[T]);if(g[T]==2)for(let j of P)A.push(j);else A.push(P)}return s.combine(A)}return{create(x){for(let A of h)BN(x,A);return x.values[b]=y(x),1},update(x,A){if(!Vke(x,p))return 0;let T=y(x);return s.compare(T,x.values[b])?0:(x.values[b]=T,1)},reconfigure(x,A){let T=Vke(x,h),P=A.config.facets[s.id],j=A.facet(s);if(P&&!T&&E5e(l,P))return x.values[b]=j,0;let R=y(x);return s.compare(R,j)?(x.values[b]=j,0):(x.values[b]=R,1)}}}const FQ=$i.define({static:!0});class Hw{constructor(s,l,h,g,p){this.id=s,this.createF=l,this.updateF=h,this.compareF=g,this.spec=p,this.provides=void 0}static define(s){let l=new Hw(C5e++,s.create,s.update,s.compare||((h,g)=>h===g),s);return s.provide&&(l.provides=s.provide(l)),l}create(s){let l=s.facet(FQ).find(h=>h.field==this);return(l?.create||this.createF)(s)}slot(s){let l=s[this.id]>>1;return{create:h=>(h.values[l]=this.create(h),1),update:(h,g)=>{let p=h.values[l],b=this.updateF(p,g);return this.compareF(p,b)?0:(h.values[l]=b,1)},reconfigure:(h,g)=>{let p=h.facet(FQ),b=g.facet(FQ),y;return(y=p.find(x=>x.field==this))&&y!=b.find(x=>x.field==this)?(h.values[l]=y.create(h),1):g.config.address[this.id]!=null?(h.values[l]=g.field(this),0):(h.values[l]=this.create(h),1)}}}init(s){return[this,FQ.of({field:this,create:s})]}get extension(){return this}}const hS={lowest:4,low:3,default:2,high:1,highest:0};function vN(u){return s=>new Fkt(s,u)}const eO={highest:vN(hS.highest),high:vN(hS.high),default:vN(hS.default),low:vN(hS.low),lowest:vN(hS.lowest)};class Fkt{constructor(s,l){this.inner=s,this.prec=l}}class RZ{of(s){return new Wke(this,s)}reconfigure(s){return RZ.reconfigure.of({compartment:this,extension:s})}get(s){return s.config.compartments.get(this)}}class Wke{constructor(s,l){this.compartment=s,this.inner=l}}class GY{constructor(s,l,h,g,p,b){for(this.base=s,this.compartments=l,this.dynamicSlots=h,this.address=g,this.staticValues=p,this.facets=b,this.statusTemplate=[];this.statusTemplate.length<h.length;)this.statusTemplate.push(0)}staticFacet(s){let l=this.address[s.id];return l==null?s.default:this.staticValues[l>>1]}static resolve(s,l,h){let g=[],p=Object.create(null),b=new Map;for(let j of cnn(s,l,b))j instanceof Hw?g.push(j):(p[j.facet.id]||(p[j.facet.id]=[])).push(j);let y=Object.create(null),x=[],A=[];for(let j of g)y[j.id]=A.length<<1,A.push(R=>j.slot(R));let T=h?.config.facets;for(let j in p){let R=p[j],z=R[0].facet,$=T&&T[j]||[];if(R.every(Q=>Q.type==0))if(y[z.id]=x.length<<1|1,E5e($,R))x.push(h.facet(z));else{let Q=z.combine(R.map(ee=>ee.value));x.push(h&&z.compare(Q,h.facet(z))?h.facet(z):Q)}else{for(let Q of R)Q.type==0?(y[Q.id]=x.length<<1|1,x.push(Q.value)):(y[Q.id]=A.length<<1,A.push(ee=>Q.dynamicSlot(ee)));y[z.id]=A.length<<1,A.push(Q=>onn(Q,z,R))}}let P=A.map(j=>j(y));return new GY(s,b,P,y,x,p)}}function cnn(u,s,l){let h=[[],[],[],[],[]],g=new Map;function p(b,y){let x=g.get(b);if(x!=null){if(x<=y)return;let A=h[x].indexOf(b);A>-1&&h[x].splice(A,1),b instanceof Wke&&l.delete(b.compartment)}if(g.set(b,y),Array.isArray(b))for(let A of b)p(A,y);else if(b instanceof Wke){if(l.has(b.compartment))throw new RangeError("Duplicate use of compartment in extensions");let A=s.get(b.compartment)||b.inner;l.set(b.compartment,A),p(A,y)}else if(b instanceof Fkt)p(b.inner,b.prec);else if(b instanceof Hw)h[y].push(b),b.provides&&p(b.provides,y);else if(b instanceof AY)h[y].push(b),b.facet.extensions&&p(b.facet.extensions,hS.default);else{let A=b.extension;if(!A)throw new Error(`Unrecognized extension value in extension set (${b}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);p(A,y)}}return p(u,hS.default),h.reduce((b,y)=>b.concat(y))}function BN(u,s){if(s&1)return 2;let l=s>>1,h=u.status[l];if(h==4)throw new Error("Cyclic dependency between fields and/or facets");if(h&2)return h;u.status[l]=4;let g=u.computeSlot(u,u.config.dynamicSlots[l]);return u.status[l]=2|g}function zY(u,s){return s&1?u.config.staticValues[s>>1]:u.values[s>>1]}const Hkt=$i.define(),Kke=$i.define({combine:u=>u.some(s=>s),static:!0}),$kt=$i.define({combine:u=>u.length?u[0]:void 0,static:!0}),Gkt=$i.define(),zkt=$i.define(),Jkt=$i.define(),qkt=$i.define({combine:u=>u.length?u[0]:!1});class Ok{constructor(s,l){this.type=s,this.value=l}static define(){return new unn}}class unn{of(s){return new Ok(this,s)}}class lnn{constructor(s){this.map=s}of(s){return new cc(this,s)}}class cc{constructor(s,l){this.type=s,this.value=l}map(s){let l=this.type.map(this.value,s);return l===void 0?void 0:l==this.value?this:new cc(this.type,l)}is(s){return this.type==s}static define(s={}){return new lnn(s.map||(l=>l))}static mapEffects(s,l){if(!s.length)return s;let h=[];for(let g of s){let p=g.map(l);p&&h.push(p)}return h}}cc.reconfigure=cc.define();cc.appendConfig=cc.define();class Ba{constructor(s,l,h,g,p,b){this.startState=s,this.changes=l,this.selection=h,this.effects=g,this.annotations=p,this.scrollIntoView=b,this._doc=null,this._state=null,h&&Bkt(h,l.newLength),p.some(y=>y.type==Ba.time)||(this.annotations=p.concat(Ba.time.of(Date.now())))}static create(s,l,h,g,p,b){return new Ba(s,l,h,g,p,b)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(s){for(let l of this.annotations)if(l.type==s)return l.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(s){let l=this.annotation(Ba.userEvent);return!!(l&&(l==s||l.length>s.length&&l.slice(0,s.length)==s&&l[s.length]=="."))}}Ba.time=Ok.define();Ba.userEvent=Ok.define();Ba.addToHistory=Ok.define();Ba.remote=Ok.define();function fnn(u,s){let l=[];for(let h=0,g=0;;){let p,b;if(h<u.length&&(g==s.length||s[g]>=u[h]))p=u[h++],b=u[h++];else if(g<s.length)p=s[g++],b=s[g++];else return l;!l.length||l[l.length-1]<p?l.push(p,b):l[l.length-1]<b&&(l[l.length-1]=b)}}function Ukt(u,s,l){var h;let g,p,b;return l?(g=s.changes,p=La.empty(s.changes.length),b=u.changes.compose(s.changes)):(g=s.changes.map(u.changes),p=u.changes.mapDesc(s.changes,!0),b=u.changes.compose(g)),{changes:b,selection:s.selection?s.selection.map(p):(h=u.selection)===null||h===void 0?void 0:h.map(g),effects:cc.mapEffects(u.effects,g).concat(cc.mapEffects(s.effects,p)),annotations:u.annotations.length?u.annotations.concat(s.annotations):s.annotations,scrollIntoView:u.scrollIntoView||s.scrollIntoView}}function Xke(u,s,l){let h=s.selection,g=vM(s.annotations);return s.userEvent&&(g=g.concat(Ba.userEvent.of(s.userEvent))),{changes:s.changes instanceof La?s.changes:La.of(s.changes||[],l,u.facet($kt)),selection:h&&(h instanceof Gn?h:Gn.single(h.anchor,h.head)),effects:vM(s.effects),annotations:g,scrollIntoView:!!s.scrollIntoView}}function Vkt(u,s,l){let h=Xke(u,s.length?s[0]:{},u.doc.length);s.length&&s[0].filter===!1&&(l=!1);for(let p=1;p<s.length;p++){s[p].filter===!1&&(l=!1);let b=!!s[p].sequential;h=Ukt(h,Xke(u,s[p],b?h.changes.newLength:u.doc.length),b)}let g=Ba.create(u,h.changes,h.selection,h.effects,h.annotations,h.scrollIntoView);return hnn(l?ann(g):g)}function ann(u){let s=u.startState,l=!0;for(let g of s.facet(Gkt)){let p=g(u);if(p===!1){l=!1;break}Array.isArray(p)&&(l=l===!0?p:fnn(l,p))}if(l!==!0){let g,p;if(l===!1)p=u.changes.invertedDesc,g=La.empty(s.doc.length);else{let b=u.changes.filter(l);g=b.changes,p=b.filtered.mapDesc(b.changes).invertedDesc}u=Ba.create(s,g,u.selection&&u.selection.map(p),cc.mapEffects(u.effects,p),u.annotations,u.scrollIntoView)}let h=s.facet(zkt);for(let g=h.length-1;g>=0;g--){let p=h[g](u);p instanceof Ba?u=p:Array.isArray(p)&&p.length==1&&p[0]instanceof Ba?u=p[0]:u=Vkt(s,vM(p),!1)}return u}function hnn(u){let s=u.startState,l=s.facet(Jkt),h=u;for(let g=l.length-1;g>=0;g--){let p=l[g](u);p&&Object.keys(p).length&&(h=Ukt(h,Xke(s,p,u.changes.newLength),!0))}return h==u?u:Ba.create(s,u.changes,u.selection,h.effects,h.annotations,h.scrollIntoView)}const dnn=[];function vM(u){return u==null?dnn:Array.isArray(u)?u:[u]}var vk=(function(u){return u[u.Word=0]="Word",u[u.Space=1]="Space",u[u.Other=2]="Other",u})(vk||(vk={}));const gnn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Qke;try{Qke=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function bnn(u){if(Qke)return Qke.test(u);for(let s=0;s<u.length;s++){let l=u[s];if(/\w/.test(l)||l>"€"&&(l.toUpperCase()!=l.toLowerCase()||gnn.test(l)))return!0}return!1}function wnn(u){return s=>{if(!/\S/.test(s))return vk.Space;if(bnn(s))return vk.Word;for(let l=0;l<u.length;l++)if(s.indexOf(u[l])>-1)return vk.Word;return vk.Other}}class Vo{constructor(s,l,h,g,p,b){this.config=s,this.doc=l,this.selection=h,this.values=g,this.status=s.statusTemplate.slice(),this.computeSlot=p,b&&(b._state=this);for(let y=0;y<this.config.dynamicSlots.length;y++)BN(this,y<<1);this.computeSlot=null}field(s,l=!0){let h=this.config.address[s.id];if(h==null){if(l)throw new RangeError("Field is not present in this state");return}return BN(this,h),zY(this,h)}update(...s){return Vkt(this,s,!0)}applyTransaction(s){let l=this.config,{base:h,compartments:g}=l;for(let y of s.effects)y.is(RZ.reconfigure)?(l&&(g=new Map,l.compartments.forEach((x,A)=>g.set(A,x)),l=null),g.set(y.value.compartment,y.value.extension)):y.is(cc.reconfigure)?(l=null,h=y.value):y.is(cc.appendConfig)&&(l=null,h=vM(h).concat(y.value));let p;l?p=s.startState.values.slice():(l=GY.resolve(h,g,this),p=new Vo(l,this.doc,this.selection,l.dynamicSlots.map(()=>null),(x,A)=>A.reconfigure(x,this),null).values);let b=s.startState.facet(Kke)?s.newSelection:s.newSelection.asSingle();new Vo(l,s.newDoc,b,p,(y,x)=>x.update(y,s),s)}replaceSelection(s){return typeof s=="string"&&(s=this.toText(s)),this.changeByRange(l=>({changes:{from:l.from,to:l.to,insert:s},range:Gn.cursor(l.from+s.length)}))}changeByRange(s){let l=this.selection,h=s(l.ranges[0]),g=this.changes(h.changes),p=[h.range],b=vM(h.effects);for(let y=1;y<l.ranges.length;y++){let x=s(l.ranges[y]),A=this.changes(x.changes),T=A.map(g);for(let j=0;j<y;j++)p[j]=p[j].map(T);let P=g.mapDesc(A,!0);p.push(x.range.map(P)),g=g.compose(T),b=cc.mapEffects(b,T).concat(cc.mapEffects(vM(x.effects),P))}return{changes:g,selection:Gn.create(p,l.mainIndex),effects:b}}changes(s=[]){return s instanceof La?s:La.of(s,this.doc.length,this.facet(Vo.lineSeparator))}toText(s){return kc.of(s.split(this.facet(Vo.lineSeparator)||Jke))}sliceDoc(s=0,l=this.doc.length){return this.doc.sliceString(s,l,this.lineBreak)}facet(s){let l=this.config.address[s.id];return l==null?s.default:(BN(this,l),zY(this,l))}toJSON(s){let l={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(s)for(let h in s){let g=s[h];g instanceof Hw&&this.config.address[g.id]!=null&&(l[h]=g.spec.toJSON(this.field(s[h]),this))}return l}static fromJSON(s,l={},h){if(!s||typeof s.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let g=[];if(h){for(let p in h)if(Object.prototype.hasOwnProperty.call(s,p)){let b=h[p],y=s[p];g.push(b.init(x=>b.spec.fromJSON(y,x)))}}return Vo.create({doc:s.doc,selection:Gn.fromJSON(s.selection),extensions:l.extensions?g.concat([l.extensions]):g})}static create(s={}){let l=GY.resolve(s.extensions||[],new Map),h=s.doc instanceof kc?s.doc:kc.of((s.doc||"").split(l.staticFacet(Vo.lineSeparator)||Jke)),g=s.selection?s.selection instanceof Gn?s.selection:Gn.single(s.selection.anchor,s.selection.head):Gn.single(0);return Bkt(g,h.length),l.staticFacet(Kke)||(g=g.asSingle()),new Vo(l,h,g,l.dynamicSlots.map(()=>null),(p,b)=>b.create(p),null)}get tabSize(){return this.facet(Vo.tabSize)}get lineBreak(){return this.facet(Vo.lineSeparator)||`
@@ -7,7 +7,7 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com" />
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
9
  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="/assets/index-C22caD-U.js"></script>
10
+ <script type="module" crossorigin src="/assets/index-Crg5ISd8.js"></script>
11
11
  <link rel="stylesheet" crossorigin href="/assets/index-DQWvi9s-.css">
12
12
  </head>
13
13
  <body class="bg-gray-900 text-gray-100">
@@ -30270,7 +30270,7 @@ var require_vary = /* @__PURE__ */ __commonJSMin(((exports, module) => {
30270
30270
  module.exports.parse = parse;
30271
30271
  }));
30272
30272
  //#endregion
30273
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
30273
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
30274
30274
  var import_cors = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin(((exports, module) => {
30275
30275
  const fp = require_plugin();
30276
30276
  const { addAccessControlRequestHeadersToVaryHeader, addOriginToVaryHeader } = require_vary();
@@ -30568,7 +30568,7 @@ const TRPC_ERROR_CODES_BY_NUMBER = {
30568
30568
  };
30569
30569
  TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY, TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE, TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT, TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR;
30570
30570
  //#endregion
30571
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs
30571
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-vC8mUXJD.mjs
30572
30572
  var __create = Object.create;
30573
30573
  var __defProp = Object.defineProperty;
30574
30574
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -30765,7 +30765,7 @@ function getErrorShape(opts) {
30765
30765
  return config.errorFormatter((0, import_objectSpread2$6.default)((0, import_objectSpread2$6.default)({}, opts), {}, { shape }));
30766
30766
  }
30767
30767
  //#endregion
30768
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs
30768
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/tracked-Bjtgv3wJ.mjs
30769
30769
  const defaultFormatter = ({ shape }) => {
30770
30770
  return shape;
30771
30771
  };
@@ -31047,7 +31047,7 @@ function isTrackedEnvelope(value) {
31047
31047
  return Array.isArray(value) && value[2] === trackedSymbol;
31048
31048
  }
31049
31049
  //#endregion
31050
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/parseTRPCMessage-CTow-umk.mjs
31050
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/parseTRPCMessage-CTow-umk.mjs
31051
31051
  const procedureTypes = [
31052
31052
  "query",
31053
31053
  "mutation",
@@ -31101,7 +31101,7 @@ function parseTRPCMessage(obj, transformer) {
31101
31101
  };
31102
31102
  }
31103
31103
  //#endregion
31104
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs
31104
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs
31105
31105
  /** @public */
31106
31106
  function isObservable(x) {
31107
31107
  return typeof x === "object" && x !== null && "subscribe" in x;
@@ -31174,7 +31174,7 @@ function observableToAsyncIterable(observable$1, signal) {
31174
31174
  } };
31175
31175
  }
31176
31176
  //#endregion
31177
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/resolveResponse-DbcCY-yX.mjs
31177
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/resolveResponse-DbcCY-yX.mjs
31178
31178
  function parseConnectionParamsFromUnknown(parsed) {
31179
31179
  try {
31180
31180
  if (parsed === null) return null;
@@ -32936,7 +32936,7 @@ async function resolveResponse(opts) {
32936
32936
  }
32937
32937
  }
32938
32938
  //#endregion
32939
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs
32939
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/initTRPC-RoZMIBeA.mjs
32940
32940
  var import_objectSpread2$2$2 = __toESM(require_objectSpread2(), 1);
32941
32941
  /** @internal */
32942
32942
  const middlewareMarker = "middlewareMarker";
@@ -33250,7 +33250,7 @@ const initTRPC = new class TRPCBuilder {
33250
33250
  }
33251
33251
  }();
33252
33252
  //#endregion
33253
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/node-http-DZiUEwuh.mjs
33253
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/node-http-DZiUEwuh.mjs
33254
33254
  function createBody(req, opts) {
33255
33255
  if ("body" in req) {
33256
33256
  if (req.body === void 0) return void 0;
@@ -33338,7 +33338,7 @@ function incomingMessageToRequest(req, res, opts) {
33338
33338
  }
33339
33339
  __toESM(require_objectSpread2(), 1);
33340
33340
  //#endregion
33341
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/ws-Dmi9HHSk.mjs
33341
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/ws-Dmi9HHSk.mjs
33342
33342
  /**
33343
33343
  * Default JSON encoder - used when no encoder is specified.
33344
33344
  * This maintains backwards compatibility with existing behavior.
@@ -33763,7 +33763,7 @@ function handleKeepAlive(client, pingMs = 3e4, pongWaitMs = 5e3) {
33763
33763
  schedulePing();
33764
33764
  }
33765
33765
  //#endregion
33766
- //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.2/node_modules/@trpc/server/dist/adapters/fastify/index.mjs
33766
+ //#region ../../node_modules/.pnpm/@trpc+server@11.14.1_typescript@6.0.3/node_modules/@trpc/server/dist/adapters/fastify/index.mjs
33767
33767
  var import_objectSpread2$1 = __toESM(require_objectSpread2(), 1);
33768
33768
  async function fastifyRequestHandler(opts) {
33769
33769
  const createContext = async (innerOpts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqg/sqg",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "SQG - SQL Query Generator - Type-safe code generation from SQL (https://sqg.dev)",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -60,12 +60,12 @@
60
60
  "prettier": "^3.8.1",
61
61
  "prettier-plugin-java": "^2.8.1",
62
62
  "update-notifier": "^7.3.1",
63
- "yaml": "^2.8.3",
63
+ "yaml": "^2.9.0",
64
64
  "yocto-spinner": "^1.1.0",
65
65
  "zod": "^4.3.6"
66
66
  },
67
67
  "devDependencies": {
68
- "@biomejs/biome": "2.4.9",
68
+ "@biomejs/biome": "2.5.3",
69
69
  "@duckdb/node-bindings-linux-x64": "1.5.1-r.1",
70
70
  "@lezer-unofficial/printer": "^1.0.1",
71
71
  "@lezer/generator": "^1.8.0",
@@ -77,8 +77,8 @@
77
77
  "@types/update-notifier": "^6.0.8",
78
78
  "@vitest/ui": "^4.1.1",
79
79
  "tsdown": "0.21.5",
80
- "tsx": "^4.21.0",
81
- "typescript": "^6.0.2",
80
+ "tsx": "^4.23.0",
81
+ "typescript": "^6.0.3",
82
82
  "vitest": "^4.1.2"
83
83
  },
84
84
  "scripts": {