@alcyone-labs/arg-parser 2.4.1 → 2.5.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.
@@ -6,7 +6,7 @@ var ol = (i, e, t) => e in i ? sl(i, e, { enumerable: !0, configurable: !0, writ
6
6
  var vt = (i, e, t) => ol(i, typeof e != "symbol" ? e + "" : e, t), zt = (i, e, t) => e.has(i) || is("Cannot " + t);
7
7
  var O = (i, e, t) => (zt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), $e = (i, e, t) => e.has(i) ? is("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), xe = (i, e, t, a) => (zt(i, e, "write to private field"), a ? a.call(i, t) : e.set(i, t), t), ye = (i, e, t) => (zt(i, e, "access private method"), t);
8
8
  import * as re from "node:fs";
9
- import * as Y from "node:path";
9
+ import * as Z from "node:path";
10
10
  import { createRegExp as il, anyOf as ll, oneOrMore as cl, char as ul } from "magic-regexp";
11
11
  import { getTsconfig as fl, createPathsMatcher as dl } from "get-tsconfig";
12
12
  import { z as b } from "zod";
@@ -423,7 +423,7 @@ class ql {
423
423
  const o = [];
424
424
  for (const f of a)
425
425
  o.push(...f.flags);
426
- const n = Y.extname(e).toLowerCase();
426
+ const n = Z.extname(e).toLowerCase();
427
427
  let l;
428
428
  const c = yr.getPluginByExtension(n);
429
429
  if (c)
@@ -465,7 +465,7 @@ class ql {
465
465
  try {
466
466
  if (!re.existsSync(e))
467
467
  throw new Error(`Configuration file not found: ${e}`);
468
- const a = re.readFileSync(e, "utf8"), r = Y.extname(e).toLowerCase();
468
+ const a = re.readFileSync(e, "utf8"), r = Z.extname(e).toLowerCase();
469
469
  let s;
470
470
  const o = yr.getPluginByExtension(r);
471
471
  if (o)
@@ -813,6 +813,11 @@ const kl = b.object({
813
813
  "Must be a custom parser function"
814
814
  ),
815
815
  // Custom parser function (value: string) => any | Promise<any>
816
+ b.custom(
817
+ (i) => i && typeof i == "object" && i._def,
818
+ "Must be a Zod schema"
819
+ ),
820
+ // Zod schema for structured JSON validation
816
821
  b.string().refine(
817
822
  // String literal types
818
823
  (i) => ["boolean", "string", "number", "array", "object"].includes(
@@ -823,7 +828,7 @@ const kl = b.object({
823
828
  }
824
829
  )
825
830
  ]).default("string").describe(
826
- "Expected data type (constructor or string literal) or a custom parser function. Defaults to 'string'."
831
+ "Expected data type (constructor, string literal, custom parser function, or Zod schema). Defaults to 'string'."
827
832
  ),
828
833
  mandatory: b.union([
829
834
  b.boolean(),
@@ -849,6 +854,8 @@ const kl = b.object({
849
854
  return "default" in e && e.default !== void 0 && !("defaultValue" in e) && (e.defaultValue = e.default), "required" in e && e.required !== void 0 && !("mandatory" in e) && (e.mandatory = e.required), e;
850
855
  });
851
856
  function Mt(i) {
857
+ if (i && typeof i == "object" && i._def)
858
+ return "object";
852
859
  if (typeof i == "function")
853
860
  return i === String ? "string" : i === Number ? "number" : i === Boolean ? "boolean" : i === Array ? "array" : i === Object ? "object" : "string";
854
861
  if (typeof i == "string")
@@ -936,7 +943,7 @@ class hs {
936
943
  const a = e[t + 1] || "./dxt-packages", r = this.argParserInstance.toMcpTools();
937
944
  if (r.length === 0)
938
945
  return this.handleExit(0, "No MCP servers found", "success");
939
- const s = this.extractMcpServerInfo(), o = `${s.name.replace(/[^a-zA-Z0-9_-]/g, "_")}-dxt`, n = Y.join(a, o);
946
+ const s = this.extractMcpServerInfo(), o = `${s.name.replace(/[^a-zA-Z0-9_-]/g, "_")}-dxt`, n = Z.join(a, o);
940
947
  re.existsSync(n) || re.mkdirSync(n, { recursive: !0 });
941
948
  const l = {
942
949
  dxt_version: "0.1",
@@ -960,7 +967,7 @@ class hs {
960
967
  icon: "logo.jpg"
961
968
  };
962
969
  re.writeFileSync(
963
- Y.join(n, "manifest.json"),
970
+ Z.join(n, "manifest.json"),
964
971
  JSON.stringify(l, null, 2)
965
972
  );
966
973
  const c = {
@@ -971,7 +978,7 @@ class hs {
971
978
  type: "module"
972
979
  };
973
980
  re.writeFileSync(
974
- Y.join(n, "package.json"),
981
+ Z.join(n, "package.json"),
975
982
  JSON.stringify(c, null, 2)
976
983
  );
977
984
  const f = `# ${s.name}
@@ -979,11 +986,11 @@ class hs {
979
986
  ${s.description}
980
987
 
981
988
  Generated by @alcyone-labs/arg-parser`;
982
- re.writeFileSync(Y.join(n, "README.md"), f);
989
+ re.writeFileSync(Z.join(n, "README.md"), f);
983
990
  const h = `#!/bin/bash
984
991
  echo "Mock DXT build script for ${s.name}"`;
985
992
  return re.writeFileSync(
986
- Y.join(n, "build-dxt-package.sh"),
993
+ Z.join(n, "build-dxt-package.sh"),
987
994
  h
988
995
  ), this.handleExit(0, "DXT package generation completed", "success", {
989
996
  entryPoint: "test-mode",
@@ -1045,7 +1052,7 @@ class Ul {
1045
1052
  "🗂️ --s-with-node-modules detected: will include node_modules in bundle"
1046
1053
  )
1047
1054
  );
1048
- const o = Y.resolve("./node_modules");
1055
+ const o = Z.resolve("./node_modules");
1049
1056
  if (!re.existsSync(o))
1050
1057
  return console.error(
1051
1058
  G.red(
@@ -1062,9 +1069,9 @@ class Ul {
1062
1069
  );
1063
1070
  try {
1064
1071
  re.readdirSync(o).filter((c) => !c.startsWith(".") && !c.startsWith("@")).some((c) => {
1065
- const f = Y.join(o, c);
1072
+ const f = Z.join(o, c);
1066
1073
  try {
1067
- return re.statSync(f).isDirectory() && re.existsSync(Y.join(f, "node_modules"));
1074
+ return re.statSync(f).isDirectory() && re.existsSync(Z.join(f, "node_modules"));
1068
1075
  } catch {
1069
1076
  return !1;
1070
1077
  }
@@ -1214,8 +1221,8 @@ class Ul {
1214
1221
  const n = await fetch(o);
1215
1222
  if (n.ok) {
1216
1223
  r = Buffer.from(await n.arrayBuffer());
1217
- const l = new URL(o).pathname, c = Y.basename(l);
1218
- c && c.includes(".") ? s = `logo${Y.extname(c)}` : s = "logo.jpg", console.log("✓ Downloaded logo from URL");
1224
+ const l = new URL(o).pathname, c = Z.basename(l);
1225
+ c && c.includes(".") ? s = `logo${Z.extname(c)}` : s = "logo.jpg", console.log("✓ Downloaded logo from URL");
1219
1226
  } else
1220
1227
  console.warn(
1221
1228
  `⚠ Failed to download logo: HTTP ${n.status}`
@@ -1228,20 +1235,20 @@ class Ul {
1228
1235
  }
1229
1236
  else {
1230
1237
  let n;
1231
- if (a && !Y.isAbsolute(o)) {
1232
- const l = Y.dirname(a);
1233
- n = Y.resolve(l, o), console.log(
1238
+ if (a && !Z.isAbsolute(o)) {
1239
+ const l = Z.dirname(a);
1240
+ n = Z.resolve(l, o), console.log(
1234
1241
  `📍 Resolving logo path relative to entry point: ${n}`
1235
1242
  );
1236
1243
  } else
1237
- n = Y.resolve(o);
1238
- re.existsSync(n) ? (r = re.readFileSync(n), s = `logo${Y.extname(n)}`, console.log("✓ Added custom logo from local file")) : console.warn(`⚠ Custom logo file not found: ${n}`);
1244
+ n = Z.resolve(o);
1245
+ re.existsSync(n) ? (r = re.readFileSync(n), s = `logo${Z.extname(n)}`, console.log("✓ Added custom logo from local file")) : console.warn(`⚠ Custom logo file not found: ${n}`);
1239
1246
  }
1240
1247
  }
1241
1248
  if (!r) {
1242
- const o = Y.dirname(new URL(import.meta.url).pathname);
1243
- let n = Y.join(o, "assets", "logo_1_small.jpg");
1244
- if (re.existsSync(n) || (n = Y.join(
1249
+ const o = Z.dirname(new URL(import.meta.url).pathname);
1250
+ let n = Z.join(o, "assets", "logo_1_small.jpg");
1251
+ if (re.existsSync(n) || (n = Z.join(
1245
1252
  o,
1246
1253
  "..",
1247
1254
  "docs",
@@ -1250,7 +1257,7 @@ class Ul {
1250
1257
  "logo_1_small.jpg"
1251
1258
  )), !re.existsSync(n)) {
1252
1259
  const l = typeof process < "u" ? process.cwd() : "/test";
1253
- n = Y.join(
1260
+ n = Z.join(
1254
1261
  l,
1255
1262
  "docs",
1256
1263
  "MCP",
@@ -1260,7 +1267,7 @@ class Ul {
1260
1267
  }
1261
1268
  if (!re.existsSync(n)) {
1262
1269
  const l = typeof process < "u" ? process.cwd() : "/test";
1263
- n = Y.join(
1270
+ n = Z.join(
1264
1271
  l,
1265
1272
  "node_modules",
1266
1273
  "@alcyone-labs",
@@ -1272,7 +1279,7 @@ class Ul {
1272
1279
  }
1273
1280
  if (!re.existsSync(n)) {
1274
1281
  const l = typeof process < "u" ? process.cwd() : "/test";
1275
- n = Y.join(
1282
+ n = Z.join(
1276
1283
  l,
1277
1284
  "dist",
1278
1285
  "assets",
@@ -1280,7 +1287,7 @@ class Ul {
1280
1287
  );
1281
1288
  }
1282
1289
  if (re.existsSync(n))
1283
- r = re.readFileSync(n), s = `logo${Y.extname(n)}`, console.log("✓ Added default logo to build folder");
1290
+ r = re.readFileSync(n), s = `logo${Z.extname(n)}`, console.log("✓ Added default logo to build folder");
1284
1291
  else {
1285
1292
  console.warn(
1286
1293
  "⚠ No logo found (custom or default), build folder will be created without icon"
@@ -1288,7 +1295,7 @@ class Ul {
1288
1295
  return;
1289
1296
  }
1290
1297
  }
1291
- return r ? (re.writeFileSync(Y.join(e, s), r), s) : void 0;
1298
+ return r ? (re.writeFileSync(Z.join(e, s), r), s) : void 0;
1292
1299
  } catch (r) {
1293
1300
  console.warn(
1294
1301
  "⚠ Failed to add logo to build folder:",
@@ -1304,10 +1311,10 @@ class Ul {
1304
1311
  var r, s;
1305
1312
  try {
1306
1313
  console.log(G.cyan("🔧 Building DXT package with TSDown..."));
1307
- const o = this.findProjectRoot(e), n = Y.resolve(e), l = Y.relative(o, n);
1314
+ const o = this.findProjectRoot(e), n = Z.resolve(e), l = Z.relative(o, n);
1308
1315
  console.log(G.gray(`Entry point: ${e}`)), console.log(G.gray(`Project root: ${o}`)), console.log(G.gray(`Relative entry path: ${l}`));
1309
1316
  const c = this.getDxtIgnoreTemplatePath();
1310
- re.existsSync(c) && re.copyFileSync(c, Y.join(o, ".dxtignore"));
1317
+ re.existsSync(c) && re.copyFileSync(c, Z.join(o, ".dxtignore"));
1311
1318
  const f = this.extractMcpServerInfo(), h = await this.addLogoToFolder(
1312
1319
  o,
1313
1320
  f,
@@ -1324,7 +1331,7 @@ class Ul {
1324
1331
  `${a ? "with node_modules" : "without node_modules"}`
1325
1332
  )
1326
1333
  );
1327
- const m = (s = (r = this.argParserInstance).getMcpServerConfig) == null ? void 0 : s.call(r), g = Y.dirname(l), E = g !== "." && g !== "" ? Y.resolve(d, t, g) : Y.resolve(d, t), v = {
1334
+ const m = (s = (r = this.argParserInstance).getMcpServerConfig) == null ? void 0 : s.call(r), g = Z.dirname(l), E = g !== "." && g !== "" ? Z.resolve(d, t, g) : Z.resolve(d, t), v = {
1328
1335
  entry: [l],
1329
1336
  outDir: E,
1330
1337
  format: ["es"],
@@ -1370,12 +1377,12 @@ class Ul {
1370
1377
  "📦 Including node_modules in bundle (may take longer)..."
1371
1378
  )
1372
1379
  ), S.push("node_modules"));
1373
- const _ = g !== "." && g !== "" ? Y.dirname(w.outDir) : w.outDir;
1380
+ const _ = g !== "." && g !== "" ? Z.dirname(w.outDir) : w.outDir;
1374
1381
  if (h) {
1375
- const M = typeof process < "u" ? process.cwd() : "/test", A = Y.join(M, h);
1382
+ const M = typeof process < "u" ? process.cwd() : "/test", A = Z.join(M, h);
1376
1383
  re.existsSync(A) && (console.log(G.gray(`Adding logo from: ${A}`)), S.push({
1377
1384
  from: A,
1378
- to: Y.join(_, h)
1385
+ to: Z.join(_, h)
1379
1386
  }));
1380
1387
  }
1381
1388
  if ((T = m == null ? void 0 : m.dxt) != null && T.include) {
@@ -1386,17 +1393,17 @@ class Ul {
1386
1393
  );
1387
1394
  for (const M of m.dxt.include)
1388
1395
  if (typeof M == "string") {
1389
- const A = Y.resolve(o, M);
1396
+ const A = Z.resolve(o, M);
1390
1397
  re.existsSync(A) ? (console.log(G.gray(` • ${M}`)), S.push({
1391
1398
  from: A,
1392
- to: Y.join(_, M)
1399
+ to: Z.join(_, M)
1393
1400
  })) : console.warn(
1394
1401
  G.yellow(
1395
1402
  ` ⚠ File not found: ${M} (resolved to ${A})`
1396
1403
  )
1397
1404
  );
1398
1405
  } else {
1399
- const A = Y.resolve(
1406
+ const A = Z.resolve(
1400
1407
  o,
1401
1408
  M.from
1402
1409
  );
@@ -1404,7 +1411,7 @@ class Ul {
1404
1411
  G.gray(` • ${M.from} → ${M.to}`)
1405
1412
  ), S.push({
1406
1413
  from: A,
1407
- to: Y.join(_, M.to)
1414
+ to: Z.join(_, M.to)
1408
1415
  })) : console.warn(
1409
1416
  G.yellow(
1410
1417
  ` ⚠ File not found: ${M.from} (resolved to ${A})`
@@ -1429,7 +1436,7 @@ export default ${JSON.stringify(v, null, 2)};
1429
1436
  // npx tsdown -c tsdown.config.dxt.ts
1430
1437
  `;
1431
1438
  re.writeFileSync(
1432
- Y.join("dxt", "tsdown.config.dxt.ts"),
1439
+ Z.join("dxt", "tsdown.config.dxt.ts"),
1433
1440
  w
1434
1441
  ), console.log(
1435
1442
  G.gray("📝 Debug config written to dxt/tsdown.config.dxt.ts")
@@ -1561,14 +1568,14 @@ export default ${JSON.stringify(v, null, 2)};
1561
1568
  let a = typeof process < "u" ? process.cwd() : "/test", r = 0;
1562
1569
  const s = 3;
1563
1570
  for (; r < s; ) {
1564
- const o = Y.join(a, "package.json");
1571
+ const o = Z.join(a, "package.json");
1565
1572
  if (re.existsSync(o)) {
1566
- const l = Y.join(a, "node_modules");
1573
+ const l = Z.join(a, "node_modules");
1567
1574
  if (!re.existsSync(l))
1568
1575
  return !1;
1569
- const c = Y.join(l, e);
1576
+ const c = Z.join(l, e);
1570
1577
  if (re.existsSync(c)) {
1571
- const f = Y.join(
1578
+ const f = Z.join(
1572
1579
  c,
1573
1580
  "package.json"
1574
1581
  );
@@ -1576,7 +1583,7 @@ export default ${JSON.stringify(v, null, 2)};
1576
1583
  }
1577
1584
  return !1;
1578
1585
  }
1579
- const n = Y.dirname(a);
1586
+ const n = Z.dirname(a);
1580
1587
  if (n === a)
1581
1588
  break;
1582
1589
  a = n, r++;
@@ -1592,14 +1599,14 @@ export default ${JSON.stringify(v, null, 2)};
1592
1599
  getDxtIgnoreTemplatePath() {
1593
1600
  const e = [
1594
1601
  // 1. From the built library assets (when installed via npm)
1595
- Y.join(
1596
- Y.dirname(new URL(import.meta.url).pathname),
1602
+ Z.join(
1603
+ Z.dirname(new URL(import.meta.url).pathname),
1597
1604
  "..",
1598
1605
  "assets",
1599
1606
  ".dxtignore.template"
1600
1607
  ),
1601
1608
  // 2. From node_modules/@alcyone-labs/arg-parser/dist/assets (when installed via npm)
1602
- Y.join(
1609
+ Z.join(
1603
1610
  typeof process < "u" ? process.cwd() : "/test",
1604
1611
  "node_modules",
1605
1612
  "@alcyone-labs",
@@ -1609,9 +1616,9 @@ export default ${JSON.stringify(v, null, 2)};
1609
1616
  ".dxtignore.template"
1610
1617
  ),
1611
1618
  // 3. From the root directory (development/local build)
1612
- Y.join(typeof process < "u" ? process.cwd() : "/test", ".dxtignore.template"),
1619
+ Z.join(typeof process < "u" ? process.cwd() : "/test", ".dxtignore.template"),
1613
1620
  // 4. From the library root (when using local file dependency)
1614
- Y.join(typeof process < "u" ? process.cwd() : "/test", "..", "..", "..", ".dxtignore.template")
1621
+ Z.join(typeof process < "u" ? process.cwd() : "/test", "..", "..", "..", ".dxtignore.template")
1615
1622
  ];
1616
1623
  for (const t of e)
1617
1624
  if (re.existsSync(t))
@@ -1623,10 +1630,10 @@ export default ${JSON.stringify(v, null, 2)};
1623
1630
  */
1624
1631
  async setupDxtPackageFiles(e, t = "./dxt", a, r = "logo.jpg") {
1625
1632
  var g, E, v, P, w, S;
1626
- const s = typeof process < "u" ? process.cwd() : "/test", o = Y.resolve(s, t);
1633
+ const s = typeof process < "u" ? process.cwd() : "/test", o = Z.resolve(s, t);
1627
1634
  if (!re.existsSync(o))
1628
1635
  throw new Error(`TSDown output directory (${t}) not found`);
1629
- const n = Y.join(s, "package.json");
1636
+ const n = Z.join(s, "package.json");
1630
1637
  let l = {};
1631
1638
  if (re.existsSync(n))
1632
1639
  try {
@@ -1664,8 +1671,8 @@ export default ${JSON.stringify(v, null, 2)};
1664
1671
  if (a)
1665
1672
  u = a;
1666
1673
  else {
1667
- const _ = this.findProjectRoot(e), T = Y.resolve(e);
1668
- u = Y.relative(_, T).replace(/\.ts$/, ".js");
1674
+ const _ = this.findProjectRoot(e), T = Z.resolve(e);
1675
+ u = Z.relative(_, T).replace(/\.ts$/, ".js");
1669
1676
  }
1670
1677
  const m = {
1671
1678
  dxt_version: "0.1",
@@ -1702,7 +1709,7 @@ export default ${JSON.stringify(v, null, 2)};
1702
1709
  license: l.license || "MIT"
1703
1710
  };
1704
1711
  re.writeFileSync(
1705
- Y.join(o, "manifest.json"),
1712
+ Z.join(o, "manifest.json"),
1706
1713
  JSON.stringify(m, null, 2)
1707
1714
  ), console.log(G.gray("✅ DXT package files set up"));
1708
1715
  }
@@ -1714,7 +1721,7 @@ export default ${JSON.stringify(v, null, 2)};
1714
1721
  let a = function(h, d = "") {
1715
1722
  const u = re.readdirSync(h, { withFileTypes: !0 });
1716
1723
  for (const m of u) {
1717
- const g = Y.join(h, m.name), E = Y.join(d, m.name);
1724
+ const g = Z.join(h, m.name), E = Z.join(d, m.name);
1718
1725
  if (m.isDirectory()) {
1719
1726
  if (m.name === "node_modules" || m.name.startsWith("."))
1720
1727
  continue;
@@ -1722,7 +1729,7 @@ export default ${JSON.stringify(v, null, 2)};
1722
1729
  } else (m.name.endsWith(".js") || m.name.endsWith(".mjs")) && !m.name.includes("chunk-") && !m.name.includes("dist-") && !m.name.startsWith(".") && o.push(E);
1723
1730
  }
1724
1731
  };
1725
- const r = typeof process < "u" ? process.cwd() : "/test", s = Y.resolve(r, e);
1732
+ const r = typeof process < "u" ? process.cwd() : "/test", s = Z.resolve(r, e);
1726
1733
  if (!re.existsSync(s))
1727
1734
  return console.warn(
1728
1735
  G.yellow(`⚠ Output directory (${e}) not found`)
@@ -1734,7 +1741,7 @@ export default ${JSON.stringify(v, null, 2)};
1734
1741
  return console.log(G.gray(`✓ Detected TSDown output: ${n}`)), n;
1735
1742
  if (o.includes(l))
1736
1743
  return console.log(G.gray(`✓ Detected TSDown output: ${l}`)), l;
1737
- const c = Y.parse(t).name;
1744
+ const c = Z.parse(t).name;
1738
1745
  for (const h of [".js", ".mjs"]) {
1739
1746
  const d = `${c}${h}`;
1740
1747
  if (o.includes(d))
@@ -1748,7 +1755,7 @@ export default ${JSON.stringify(v, null, 2)};
1748
1755
  if (f.length > 1) {
1749
1756
  let h = f[0], d = 0;
1750
1757
  for (const u of f) {
1751
- const m = Y.join(s, u), g = re.statSync(m), E = u.includes(c) ? 100 : 0, v = Math.min(g.size / 1e3, 50), P = E + v;
1758
+ const m = Z.join(s, u), g = re.statSync(m), E = u.includes(c) ? 100 : 0, v = Math.min(g.size / 1e3, 50), P = E + v;
1752
1759
  P > d && (d = P, h = u);
1753
1760
  }
1754
1761
  return console.log(
@@ -1769,13 +1776,13 @@ export default ${JSON.stringify(v, null, 2)};
1769
1776
  }
1770
1777
  }
1771
1778
  findProjectRoot(e) {
1772
- let t = Y.dirname(Y.resolve(e)), a = 0;
1779
+ let t = Z.dirname(Z.resolve(e)), a = 0;
1773
1780
  const r = 5;
1774
1781
  for (; a < r; ) {
1775
- const s = Y.join(t, "package.json");
1782
+ const s = Z.join(t, "package.json");
1776
1783
  if (re.existsSync(s))
1777
1784
  return t;
1778
- const o = Y.dirname(t);
1785
+ const o = Z.dirname(t);
1779
1786
  if (o === t)
1780
1787
  break;
1781
1788
  t = o, a++;
@@ -1837,7 +1844,7 @@ export default ${JSON.stringify(v, null, 2)};
1837
1844
  if (process.env.DEBUG) {
1838
1845
  const l = typeof process < "u" ? process.cwd() : "/test";
1839
1846
  console.log(
1840
- ` <${G.gray("ts-paths")}> Found tsconfig at '${Y.relative(l, r.path)}' with paths:`,
1847
+ ` <${G.gray("ts-paths")}> Found tsconfig at '${Z.relative(l, r.path)}' with paths:`,
1841
1848
  Object.keys(r.config.compilerOptions.paths)
1842
1849
  );
1843
1850
  }
@@ -1853,8 +1860,8 @@ export default ${JSON.stringify(v, null, 2)};
1853
1860
  l
1854
1861
  );
1855
1862
  for (const c of l) {
1856
- const f = Y.resolve(
1857
- Y.dirname(r.path),
1863
+ const f = Z.resolve(
1864
+ Z.dirname(r.path),
1858
1865
  c
1859
1866
  );
1860
1867
  process.env.DEBUG && console.log(
@@ -1884,7 +1891,7 @@ export default ${JSON.stringify(v, null, 2)};
1884
1891
  }
1885
1892
  if (re.existsSync(f) && re.statSync(f).isDirectory())
1886
1893
  for (const d of h) {
1887
- const u = Y.join(f, `index${d}`);
1894
+ const u = Z.join(f, `index${d}`);
1888
1895
  if (re.existsSync(u))
1889
1896
  return process.env.DEBUG && console.log(
1890
1897
  ` <${G.grey("ts-paths")}> ✓ Resolved '${e}' to '${u}' (index)`
@@ -1897,7 +1904,7 @@ export default ${JSON.stringify(v, null, 2)};
1897
1904
  ` <${G.gray("file-resolve")}> Trying regular file resolution for '${e}'`
1898
1905
  );
1899
1906
  let s;
1900
- Y.isAbsolute(e) ? s = e : s = Y.resolve(Y.dirname(t), e);
1907
+ Z.isAbsolute(e) ? s = e : s = Z.resolve(Z.dirname(t), e);
1901
1908
  const o = [".ts", ".js", ".tsx", ".jsx", ".mjs", ".cjs"];
1902
1909
  if (re.existsSync(s) && re.statSync(s).isFile())
1903
1910
  return process.env.DEBUG && console.log(
@@ -1922,7 +1929,7 @@ export default ${JSON.stringify(v, null, 2)};
1922
1929
  }
1923
1930
  if (re.existsSync(s) && re.statSync(s).isDirectory())
1924
1931
  for (const n of o) {
1925
- const l = Y.join(s, `index${n}`);
1932
+ const l = Z.join(s, `index${n}`);
1926
1933
  if (re.existsSync(l))
1927
1934
  return process.env.DEBUG && console.log(
1928
1935
  ` <${G.gray("file-resolve")}> ✓ Resolved '${e}' to '${l}' (index)`
@@ -2485,31 +2492,31 @@ function gs(i) {
2485
2492
  function Cr(i, e) {
2486
2493
  if (typeof i == "string") {
2487
2494
  const o = gs(i);
2488
- if (Y.isAbsolute(o))
2495
+ if (Z.isAbsolute(o))
2489
2496
  return o;
2490
2497
  if (o.startsWith("cwd:")) {
2491
2498
  const l = o.slice(4);
2492
- return Y.resolve(process.cwd(), l);
2499
+ return Z.resolve(process.cwd(), l);
2493
2500
  }
2494
2501
  const n = ms() || e;
2495
- return n ? Y.resolve(Y.dirname(n), o) : (console.warn(
2502
+ return n ? Z.resolve(Z.dirname(n), o) : (console.warn(
2496
2503
  `Warning: Could not detect entry point for log path resolution. Using process.cwd() as fallback. Path: ${o}`
2497
- ), Y.resolve(process.cwd(), o));
2504
+ ), Z.resolve(process.cwd(), o));
2498
2505
  }
2499
2506
  const { path: t, relativeTo: a = "entry", basePath: r } = i, s = gs(t);
2500
2507
  switch (a) {
2501
2508
  case "absolute":
2502
- return r ? Y.resolve(r, s) : Y.isAbsolute(s) ? s : (console.warn(
2509
+ return r ? Z.resolve(r, s) : Z.isAbsolute(s) ? s : (console.warn(
2503
2510
  `Warning: relativeTo 'absolute' specified but no basePath provided and path is not absolute. Using process.cwd() as fallback. Path: ${s}`
2504
- ), Y.resolve(process.cwd(), s));
2511
+ ), Z.resolve(process.cwd(), s));
2505
2512
  case "cwd":
2506
- return Y.resolve(process.cwd(), s);
2513
+ return Z.resolve(process.cwd(), s);
2507
2514
  case "entry":
2508
2515
  default:
2509
2516
  const o = ms() || e;
2510
- return o ? Y.resolve(Y.dirname(o), s) : (console.warn(
2517
+ return o ? Z.resolve(Z.dirname(o), s) : (console.warn(
2511
2518
  `Warning: Could not detect entry point for log path resolution. Using process.cwd() as fallback. Path: ${s}`
2512
- ), Y.resolve(process.cwd(), s));
2519
+ ), Z.resolve(process.cwd(), s));
2513
2520
  }
2514
2521
  }
2515
2522
  function Td(i) {
@@ -2642,7 +2649,21 @@ const Pr = class Pr {
2642
2649
  else if (typeof e.type == "function") {
2643
2650
  const o = e.type(s);
2644
2651
  s = o && typeof o.then == "function" ? await o : o;
2645
- } else typeof e.type == "object" && (s = new e.type(s));
2652
+ } else if (typeof e.type == "object")
2653
+ if (e.type && e.type._def)
2654
+ try {
2655
+ const o = typeof s == "string" ? JSON.parse(s) : s;
2656
+ s = e.type.parse(o);
2657
+ } catch (o) {
2658
+ if (o instanceof SyntaxError)
2659
+ throw new Error(`Invalid JSON for flag '${e.name}': ${o.message}`);
2660
+ {
2661
+ const n = o instanceof Error ? o.message : String(o);
2662
+ throw new Error(`Validation failed for flag '${e.name}': ${n}`);
2663
+ }
2664
+ }
2665
+ else
2666
+ s = new e.type(s);
2646
2667
  if (e.enum && e.enum.length > 0) {
2647
2668
  const o = e.enum.map((n) => typeof n == "string" ? `'${n}'` : n).join(", ");
2648
2669
  if (!e.enum.includes(s))
@@ -2698,7 +2719,7 @@ const Pr = class Pr {
2698
2719
  printAll(e) {
2699
2720
  if (e)
2700
2721
  try {
2701
- const t = Y.dirname(e);
2722
+ const t = Z.dirname(e);
2702
2723
  if (re.existsSync(t) || re.mkdirSync(t, { recursive: !0 }), e.toLowerCase().endsWith(".json")) {
2703
2724
  const a = ye(this, he, un).call(this, this), r = JSON.stringify(a, null, 2);
2704
2725
  re.writeFileSync(e, r), console.log(`ArgParser configuration JSON dumped to: ${e}`);
@@ -2904,24 +2925,37 @@ ${e("Flags:")}
2904
2925
  `;
2905
2926
  const h = O(this, Me).flags;
2906
2927
  return h.length > 0 ? c += h.sort((d, u) => d.name.localeCompare(u.name)).map((d) => {
2907
- const u = d.options.slice().sort((_, T) => _.length - T.length).map((_) => t(_)).join(", "), m = typeof d.mandatory == "function" ? "dynamic" : d.mandatory, g = m === !0 ? ` ${r(O(this, er).mandatoryCharacter || "*")}` : m === "dynamic" ? ` ${s("(conditionally mandatory)")}` : "", E = Array.isArray(d.description) ? d.description : [d.description], v = [];
2908
- let P = "unknown";
2909
- typeof d.type == "function" ? (P = d.type.name || "custom function", P === "Boolean" && (P = "boolean"), P === "String" && (P = "string"), P === "Number" && (P = "number"), P === "Array" && (P = "array"), P === "Object" && (P = "object")) : typeof d.type == "string" && (P = d.type), v.push(`Type: ${P}`), d.flagOnly && v.push("Flag only (no value expected)"), d.defaultValue !== void 0 && d.defaultValue !== null && v.push(`Default: ${JSON.stringify(d.defaultValue)}`), d.enum && d.enum.length > 0 && v.push(
2910
- `Allowed values: ${d.enum.map((_) => `'${_}'`).join(", ")}`
2928
+ const u = d.options.slice().sort((T, M) => T.length - M.length).map((T) => t(T)).join(", "), m = typeof d.mandatory == "function" ? "dynamic" : d.mandatory, g = m === !0 ? ` ${r(O(this, er).mandatoryCharacter || "*")}` : m === "dynamic" ? ` ${s("(conditionally mandatory)")}` : "", E = Array.isArray(d.description) ? d.description : [d.description], v = [];
2929
+ let P = "unknown", w = [];
2930
+ if (d.type && typeof d.type == "object" && d.type._def) {
2931
+ P = "JSON object";
2932
+ try {
2933
+ const M = d.type._def;
2934
+ if (M.shape) {
2935
+ const A = typeof M.shape == "function" ? M.shape() : M.shape, L = Object.keys(A);
2936
+ L.length > 0 && (L.length <= 4 ? w.push(`Properties: ${L.join(", ")}`) : w.push(`Properties: ${L.slice(0, 4).join(", ")}, ... (${L.length} total)`));
2937
+ }
2938
+ w.push("Expected: JSON string");
2939
+ } catch {
2940
+ w.push("Expected: JSON string");
2941
+ }
2942
+ } else typeof d.type == "function" ? (P = d.type.name || "custom function", P === "Boolean" && (P = "boolean"), P === "String" && (P = "string"), P === "Number" && (P = "number"), P === "Array" && (P = "array"), P === "Object" && (P = "object")) : typeof d.type == "string" && (P = d.type);
2943
+ v.push(`Type: ${P}`), w.length > 0 && v.push(...w), d.flagOnly && v.push("Flag only (no value expected)"), d.defaultValue !== void 0 && d.defaultValue !== null && v.push(`Default: ${JSON.stringify(d.defaultValue)}`), d.enum && d.enum.length > 0 && v.push(
2944
+ `Allowed values: ${d.enum.map((T) => `'${T}'`).join(", ")}`
2911
2945
  );
2912
- const w = Math.max(
2946
+ const S = Math.max(
2913
2947
  ...h.map(
2914
- (_) => _.options.join(", ").length
2948
+ (T) => T.options.join(", ").length
2915
2949
  ),
2916
2950
  0
2917
- ), S = u.padEnd(w + 5) + g;
2951
+ ), _ = u.padEnd(S + 5) + g;
2918
2952
  return `
2919
- ${f()}${S}
2953
+ ${f()}${_}
2920
2954
  ${f(2)}${a(E[0])}
2921
- ${v.map((_) => `${f(3)}${s(_)}`).join(`
2955
+ ${v.map((T) => `${f(3)}${s(T)}`).join(`
2922
2956
  `)}
2923
- ${E.slice(1).map((_) => `
2924
- ${f(2)}${a(_)}`).join("")}
2957
+ ${E.slice(1).map((T) => `
2958
+ ${f(2)}${a(T)}`).join("")}
2925
2959
  `.trim();
2926
2960
  }).join(`
2927
2961
 
@@ -3165,13 +3199,13 @@ He = new WeakMap(), ze = new WeakMap(), Qe = new WeakMap(), er = new WeakMap(),
3165
3199
  E = (h = O(E, Oe).get(M)) == null ? void 0 : h.parser, v = v.slice(1);
3166
3200
  const A = v.findIndex(
3167
3201
  (F) => O(E, Oe).has(F)
3168
- ), B = A === -1 ? v : v.slice(0, A), R = {
3202
+ ), L = A === -1 ? v : v.slice(0, A), R = {
3169
3203
  level: M,
3170
- argsSlice: B
3204
+ argsSlice: L
3171
3205
  };
3172
3206
  w.push(R);
3173
3207
  try {
3174
- const { parsedArgs: F } = await ye(d = E, he, At).call(d, B, {
3208
+ const { parsedArgs: F } = await ye(d = E, he, At).call(d, L, {
3175
3209
  skipHelpHandling: !0
3176
3210
  });
3177
3211
  R.parsed = F, P = { ...P, ...F };
@@ -3342,7 +3376,7 @@ on = function() {
3342
3376
  t = O(this, He);
3343
3377
  else if (typeof process < "u" && process.argv && process.argv[1])
3344
3378
  try {
3345
- t = Y.basename(process.argv[1]);
3379
+ t = Z.basename(process.argv[1]);
3346
3380
  } catch {
3347
3381
  }
3348
3382
  if (console.error(`
@@ -3417,7 +3451,9 @@ ${G.dim(`Try '${t} --help' for usage details.`)}`
3417
3451
  `${n} Description: ${Array.isArray(h.description) ? h.description.join(" | ") : h.description}`
3418
3452
  );
3419
3453
  let d = "unknown";
3420
- if (typeof h.type == "function")
3454
+ if (h.type && typeof h.type == "object" && h.type._def)
3455
+ d = "Zod schema";
3456
+ else if (typeof h.type == "function")
3421
3457
  d = h.type.name || "custom function";
3422
3458
  else if (typeof h.type == "string")
3423
3459
  d = h.type;
@@ -3465,7 +3501,9 @@ ${G.dim(`Try '${t} --help' for usage details.`)}`
3465
3501
  a.flags = r.map((o) => {
3466
3502
  var l;
3467
3503
  let n = "unknown";
3468
- if (typeof o.type == "function")
3504
+ if (o.type && typeof o.type == "object" && o.type._def)
3505
+ n = "Zod schema";
3506
+ else if (typeof o.type == "function")
3469
3507
  n = o.type.name || "custom function";
3470
3508
  else if (typeof o.type == "string")
3471
3509
  n = o.type;
@@ -3526,7 +3564,7 @@ oi = function(e, t) {
3526
3564
  Be.log("Transport options parsed:", JSON.stringify(a));
3527
3565
  const r = ye(this, he, ui).call(this);
3528
3566
  Be.log("Got MCP server config:", JSON.stringify(r));
3529
- const s = a.logPath || (r == null ? void 0 : r.logPath) || "./logs/mcp.log";
3567
+ const s = a.logPath || (r != null && r.log && typeof r.log == "object" ? r.log.logToFile : null) || (r == null ? void 0 : r.logPath) || "./logs/mcp.log";
3530
3568
  Be.log("Effective log path:", s);
3531
3569
  const o = Cr(s);
3532
3570
  Be.log("Resolved log path:", o);
@@ -3592,7 +3630,7 @@ oi = function(e, t) {
3592
3630
  }, /**
3593
3631
  * Resolve logger configuration for MCP serve with proper priority
3594
3632
  * @param mcpServerConfig MCP server configuration
3595
- * @param resolvedLogPath Resolved log path from CLI flags
3633
+ * @param resolvedLogPath Resolved log path from CLI flags and config priority
3596
3634
  * @returns Logger configuration object or string path
3597
3635
  */
3598
3636
  ci = function(e, t) {
@@ -3608,7 +3646,7 @@ ci = function(e, t) {
3608
3646
  // Default level for backward compatibility
3609
3647
  mcpMode: !0,
3610
3648
  ...e.log,
3611
- // Use CLI-resolved path if available, otherwise use config path
3649
+ // Use the resolved path which respects the proper priority order
3612
3650
  logToFile: t
3613
3651
  } : t;
3614
3652
  }, /**
@@ -3783,6 +3821,22 @@ function Wr(i) {
3783
3821
  };
3784
3822
  }
3785
3823
  function Gl(i) {
3824
+ if (i.type && typeof i.type == "object" && i.type._def) {
3825
+ const r = i.type;
3826
+ try {
3827
+ const s = b.toJSONSchema(r);
3828
+ i.description && (s.description = i.description);
3829
+ const o = !!(i.mandatory || i.required);
3830
+ return { property: s, isRequired: o };
3831
+ } catch (s) {
3832
+ console.warn(`Failed to convert Zod schema to JSON Schema for flag '${i.name}':`, s);
3833
+ const o = {
3834
+ type: "object",
3835
+ description: i.description || `${i.name} parameter (Zod schema)`
3836
+ }, n = !!(i.mandatory || i.required);
3837
+ return { property: o, isRequired: n };
3838
+ }
3839
+ }
3786
3840
  const e = {
3787
3841
  type: Mt(i.type),
3788
3842
  description: i.description || `${i.name} parameter`
@@ -3869,10 +3923,11 @@ function Jl(i) {
3869
3923
  };
3870
3924
  }
3871
3925
  function hi(i) {
3872
- let e = b.string();
3873
- const t = i.type;
3874
- let a;
3875
- typeof t == "function" ? a = t.name.toLowerCase().replace("constructor", "") : a = String(t).toLowerCase();
3926
+ const e = i.type;
3927
+ if (e && typeof e == "object" && e._def)
3928
+ return e;
3929
+ let t = b.string(), a;
3930
+ typeof e == "function" ? a = e.name.toLowerCase().replace("constructor", "") : a = String(e).toLowerCase();
3876
3931
  const r = i.enum;
3877
3932
  if (i.allowMultiple) {
3878
3933
  let l;
@@ -3898,44 +3953,44 @@ function hi(i) {
3898
3953
  l = b.string();
3899
3954
  break;
3900
3955
  }
3901
- e = b.array(l);
3956
+ t = b.array(l);
3902
3957
  } else
3903
3958
  switch (a) {
3904
3959
  case "string":
3905
- e = r && Array.isArray(r) && r.length > 0 && r.every((f) => typeof f == "string") ? b.enum(r) : b.string();
3960
+ t = r && Array.isArray(r) && r.length > 0 && r.every((f) => typeof f == "string") ? b.enum(r) : b.string();
3906
3961
  break;
3907
3962
  case "number":
3908
3963
  if (r && Array.isArray(r) && r.length > 0 && r.every((f) => typeof f == "number")) {
3909
3964
  const f = r.map((h) => b.literal(h));
3910
- f.length === 1 ? e = f[0] : f.length >= 2 ? e = b.union(
3965
+ f.length === 1 ? t = f[0] : f.length >= 2 ? t = b.union(
3911
3966
  f
3912
- ) : e = b.number();
3967
+ ) : t = b.number();
3913
3968
  } else
3914
- e = b.number();
3969
+ t = b.number();
3915
3970
  break;
3916
3971
  case "boolean":
3917
- e = b.boolean();
3972
+ t = b.boolean();
3918
3973
  break;
3919
3974
  case "array":
3920
3975
  const l = r && Array.isArray(r) && r.length > 0 && r.every((f) => typeof f == "string") ? b.enum(r) : b.string();
3921
- e = b.array(l);
3976
+ t = b.array(l);
3922
3977
  break;
3923
3978
  case "object":
3924
- e = b.record(b.string(), b.any());
3979
+ t = b.record(b.string(), b.any());
3925
3980
  break;
3926
3981
  default:
3927
3982
  Vr("MCP Integration").mcpError(
3928
3983
  `Flag '${i.name}' has an unknown type '${a}'. Defaulting to z.string().`
3929
- ), e = b.string();
3984
+ ), t = b.string();
3930
3985
  break;
3931
3986
  }
3932
3987
  const o = i.description;
3933
- o && (e = e.describe(
3988
+ o && (t = t.describe(
3934
3989
  Array.isArray(o) ? o.join(`
3935
3990
  `) : o
3936
3991
  ));
3937
3992
  const n = i.defaultValue;
3938
- return n !== void 0 ? e = e.default(n) : i.mandatory || (e = e.optional()), e;
3993
+ return n !== void 0 ? t = t.default(n) : i.mandatory || (t = t.optional()), t;
3939
3994
  }
3940
3995
  function ys(i, e) {
3941
3996
  const t = [], a = /* @__PURE__ */ new Set();
@@ -3960,13 +4015,13 @@ function ys(i, e) {
3960
4015
  const R = e.outputSchemaMap[P];
3961
4016
  A = typeof R == "object" && R !== null && !R._def ? b.object(R) : R;
3962
4017
  } else e != null && e.defaultOutputSchema ? A = e.defaultOutputSchema : e != null && e.autoGenerateOutputSchema && (typeof e.autoGenerateOutputSchema == "string" ? A = Or(e.autoGenerateOutputSchema) : e.autoGenerateOutputSchema === !0 && (A = Or("successWithData")));
3963
- const B = {
4018
+ const L = {
3964
4019
  name: P,
3965
4020
  description: f || `Executes the ${P} command.`,
3966
4021
  inputSchema: M,
3967
4022
  outputSchema: A,
3968
4023
  async execute(R) {
3969
- var W, Q, ee, le, Z, me;
4024
+ var W, Q, ee, le, Y, me;
3970
4025
  if (process.env.MCP_DEBUG && (console.error(
3971
4026
  `[MCP Execute] Starting execution for tool '${P}'`
3972
4027
  ), console.error(
@@ -4014,10 +4069,10 @@ function ys(i, e) {
4014
4069
  else if (N === "array")
4015
4070
  if (Array.isArray(ne))
4016
4071
  if (Ce) {
4017
- const L = F.length;
4072
+ const B = F.length;
4018
4073
  ne.forEach((H) => {
4019
4074
  F.push(pe[0]), F.push(String(H));
4020
- }), ne.length > 0 && F[L - 1] === pe[0] && F.splice(L - 1, 1);
4075
+ }), ne.length > 0 && F[B - 1] === pe[0] && F.splice(B - 1, 1);
4021
4076
  } else
4022
4077
  F.push(ne.join(","));
4023
4078
  else ne != null && F.push(String(ne));
@@ -4037,14 +4092,14 @@ function ys(i, e) {
4037
4092
  ), console.error("[MCP Tool Debug] Is unified tool:", ne));
4038
4093
  let ce;
4039
4094
  if (ne) {
4040
- const L = ae.get(P);
4095
+ const B = ae.get(P);
4041
4096
  if (process.env.MCP_DEBUG && (console.error(
4042
4097
  "[MCP Tool Debug] Found unified tool config:",
4043
- !!L
4098
+ !!B
4044
4099
  ), console.error(
4045
4100
  "[MCP Tool Debug] Has handler:",
4046
- !!(L && L.handler)
4047
- )), L && L.handler)
4101
+ !!(B && B.handler)
4102
+ )), B && B.handler)
4048
4103
  try {
4049
4104
  process.env.MCP_DEBUG && (console.error(
4050
4105
  `[MCP Tool Debug] Executing unified tool handler for '${P}'`
@@ -4074,7 +4129,7 @@ function ys(i, e) {
4074
4129
  }
4075
4130
  }
4076
4131
  }
4077
- }, z = await L.handler(se);
4132
+ }, z = await B.handler(se);
4078
4133
  process.env.MCP_DEBUG && console.error(
4079
4134
  "[MCP Tool Debug] Handler result:",
4080
4135
  JSON.stringify(z, null, 2)
@@ -4115,9 +4170,9 @@ function ys(i, e) {
4115
4170
  F
4116
4171
  );
4117
4172
  if (ce.$error) {
4118
- const L = ce.$error, H = {
4119
- message: `Cmd error: ${L.type} - ${L.message}`,
4120
- details: L.details
4173
+ const B = ce.$error, H = {
4174
+ message: `Cmd error: ${B.type} - ${B.message}`,
4175
+ details: B.details
4121
4176
  };
4122
4177
  if (A) {
4123
4178
  const se = {
@@ -4131,7 +4186,7 @@ function ys(i, e) {
4131
4186
  if (process.env.MCP_DEBUG && console.error(
4132
4187
  "[MCP Debug] Output schema type:",
4133
4188
  ((Q = z._def) == null ? void 0 : Q.typeName) || ((ee = z._def) == null ? void 0 : ee.type)
4134
- ), ((le = z._def) == null ? void 0 : le.typeName) === "ZodObject" || ((Z = z._def) == null ? void 0 : Z.type) === "object") {
4189
+ ), ((le = z._def) == null ? void 0 : le.typeName) === "ZodObject" || ((Y = z._def) == null ? void 0 : Y.type) === "object") {
4135
4190
  const K = (me = z._def) == null ? void 0 : me.shape;
4136
4191
  if (K) {
4137
4192
  const ie = typeof K == "function" ? K() : K;
@@ -4197,47 +4252,47 @@ function ys(i, e) {
4197
4252
  if (!pe && ce._asyncHandlerPromise)
4198
4253
  try {
4199
4254
  pe = await ce._asyncHandlerPromise;
4200
- } catch (L) {
4255
+ } catch (B) {
4201
4256
  return Wr(
4202
- L instanceof Error ? L : new Error(String(L))
4257
+ B instanceof Error ? B : new Error(String(B))
4203
4258
  );
4204
4259
  }
4205
4260
  let we = ce.$commandChain;
4206
4261
  if (!we) {
4207
- const L = i.getAppCommandName ? i.getAppCommandName() : i["#appCommandName"];
4208
- L && (we = [L]);
4262
+ const B = i.getAppCommandName ? i.getAppCommandName() : i["#appCommandName"];
4263
+ B && (we = [B]);
4209
4264
  }
4210
4265
  if ((pe === void 0 || pe !== void 0 && we) && we) {
4211
- let L = i, H = { ...ce }, se;
4266
+ let B = i, H = { ...ce }, se;
4212
4267
  const z = we;
4213
4268
  delete H.handlerResponse, delete H.$commandChain, delete H.$error, delete H._originalInputArgs, delete H._asyncHandlerPromise, delete H._asyncHandlerInfo, delete H._fuzzyModePreventedExecution, delete H.help;
4214
4269
  for (let X = 0; X < z.length; X++) {
4215
- const oe = z[X], Pe = L != null && L.getSubCommand ? L.getSubCommand(oe) : void 0;
4270
+ const oe = z[X], Pe = B != null && B.getSubCommand ? B.getSubCommand(oe) : void 0;
4216
4271
  if (Pe && Pe.parser)
4217
- se = { ...H }, H = { ...H }, delete H.handlerResponse, delete H.$commandChain, delete H.$error, delete H._originalInputArgs, delete H._asyncHandlerPromise, delete H._asyncHandlerInfo, delete H._fuzzyModePreventedExecution, delete H.help, L = Pe.parser;
4218
- else if (X === 0 && L && oe === (L.getAppCommandName ? L.getAppCommandName() : L["#appCommandName"] || (L.getAppName ? L.getAppName() : L["#appName"]))) {
4272
+ se = { ...H }, H = { ...H }, delete H.handlerResponse, delete H.$commandChain, delete H.$error, delete H._originalInputArgs, delete H._asyncHandlerPromise, delete H._asyncHandlerInfo, delete H._fuzzyModePreventedExecution, delete H.help, B = Pe.parser;
4273
+ else if (X === 0 && B && oe === (B.getAppCommandName ? B.getAppCommandName() : B["#appCommandName"] || (B.getAppName ? B.getAppName() : B["#appName"]))) {
4219
4274
  H = { ...ce }, delete H.handlerResponse, delete H.$commandChain, delete H.$error, delete H._originalInputArgs, delete H._asyncHandlerPromise, delete H._asyncHandlerInfo, delete H._fuzzyModePreventedExecution, delete H.help;
4220
4275
  break;
4221
4276
  } else {
4222
- L = void 0;
4277
+ B = void 0;
4223
4278
  break;
4224
4279
  }
4225
4280
  }
4226
- const K = L, ie = K.getHandler ? K.getHandler() : K["#handler"];
4227
- if (L && ie) {
4281
+ const K = B, ie = K.getHandler ? K.getHandler() : K["#handler"];
4282
+ if (B && ie) {
4228
4283
  const X = ie, oe = { ...R };
4229
4284
  delete oe.help;
4230
4285
  const x = {
4231
4286
  args: oe,
4232
4287
  commandChain: z,
4233
- parser: L,
4288
+ parser: B,
4234
4289
  parentArgs: se,
4235
4290
  isMcp: !0,
4236
4291
  getFlag: (p) => {
4237
4292
  if (oe && oe[p] !== void 0)
4238
4293
  return oe[p];
4239
- if (L) {
4240
- const y = L.getFlagDefinition(p);
4294
+ if (B) {
4295
+ const y = B.getFlagDefinition(p);
4241
4296
  if (y) {
4242
4297
  const $ = y.env;
4243
4298
  if ($) {
@@ -4268,7 +4323,7 @@ function ys(i, e) {
4268
4323
  `[MCP Execute] Returning MCP format response for '${P}'`
4269
4324
  ), pe;
4270
4325
  {
4271
- const L = {
4326
+ const B = {
4272
4327
  content: [
4273
4328
  {
4274
4329
  type: "text",
@@ -4281,8 +4336,8 @@ function ys(i, e) {
4281
4336
  `[MCP Execute] Wrapping plain response in MCP format for '${P}'`
4282
4337
  ), console.error(
4283
4338
  "[MCP Execute] Final MCP response:",
4284
- JSON.stringify(L, null, 2)
4285
- )), L;
4339
+ JSON.stringify(B, null, 2)
4340
+ )), B;
4286
4341
  }
4287
4342
  }
4288
4343
  const N = pe || { success: !0 };
@@ -4292,7 +4347,7 @@ function ys(i, e) {
4292
4347
  "[MCP Execute] Default response:",
4293
4348
  JSON.stringify(N, null, 2)
4294
4349
  )), typeof N == "object") {
4295
- const L = {
4350
+ const B = {
4296
4351
  content: [
4297
4352
  {
4298
4353
  type: "text",
@@ -4305,8 +4360,8 @@ function ys(i, e) {
4305
4360
  `[MCP Execute] Returning structured default response for '${P}'`
4306
4361
  ), console.error(
4307
4362
  "[MCP Execute] Final response:",
4308
- JSON.stringify(L, null, 2)
4309
- )), L;
4363
+ JSON.stringify(B, null, 2)
4364
+ )), B;
4310
4365
  }
4311
4366
  return process.env.MCP_DEBUG && console.error(
4312
4367
  `[MCP Execute] Returning success response for '${P}'`
@@ -4381,7 +4436,7 @@ function ys(i, e) {
4381
4436
  }
4382
4437
  }
4383
4438
  };
4384
- t.push(B);
4439
+ t.push(L);
4385
4440
  }
4386
4441
  const w = m;
4387
4442
  if (w && (e == null ? void 0 : e.includeSubCommands) !== !1)
@@ -4800,14 +4855,18 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
4800
4855
  );
4801
4856
  try {
4802
4857
  const T = process.argv.slice(2).filter(
4803
- (B) => !B.startsWith("--s-mcp-") && B !== "--s-mcp-serve"
4858
+ (L) => !L.startsWith("--s-mcp-") && L !== "--s-mcp-serve"
4804
4859
  ), M = await this.parse(T, {
4805
4860
  skipHandlerExecution: !0,
4806
4861
  isMcp: !0
4807
4862
  }), A = (M == null ? void 0 : M.args) || M || {};
4808
- S.setParsedArgs(A), o.mcpError(`Lifecycle manager initialized with parsed args: ${Object.keys(A).join(", ")}`);
4863
+ S.setParsedArgs(A), o.mcpError(
4864
+ `Lifecycle manager initialized with parsed args: ${Object.keys(A).join(", ")}`
4865
+ );
4809
4866
  } catch (T) {
4810
- o.mcpError(`Warning: Could not parse arguments for lifecycle manager: ${T instanceof Error ? T.message : String(T)}`);
4867
+ o.mcpError(
4868
+ `Warning: Could not parse arguments for lifecycle manager: ${T instanceof Error ? T.message : String(T)}`
4869
+ );
4811
4870
  }
4812
4871
  const _ = u.connect.bind(u);
4813
4872
  u.connect = async (T) => {
@@ -4923,26 +4982,26 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
4923
4982
  description: w.description,
4924
4983
  inputSchema: M
4925
4984
  }));
4926
- const B = async (le) => {
4985
+ const L = async (le) => {
4927
4986
  process.env.MCP_DEBUG && console.error(
4928
4987
  `[MCP Simple Execute] 🎯 TOOL CALLED: '${w.name}' with args:`,
4929
4988
  JSON.stringify(le, null, 2)
4930
4989
  );
4931
4990
  try {
4932
- const Z = await w.execute(le);
4991
+ const Y = await w.execute(le);
4933
4992
  return process.env.MCP_DEBUG && console.error(
4934
4993
  `[MCP Simple Execute] Tool '${w.name}' returned:`,
4935
- JSON.stringify(Z, null, 2)
4936
- ), Z && typeof Z == "object" && Z.content && Array.isArray(Z.content) ? Z : {
4994
+ JSON.stringify(Y, null, 2)
4995
+ ), Y && typeof Y == "object" && Y.content && Array.isArray(Y.content) ? Y : {
4937
4996
  content: [
4938
4997
  {
4939
4998
  type: "text",
4940
- text: typeof Z == "string" ? Z : JSON.stringify(Z, null, 2)
4999
+ text: typeof Y == "string" ? Y : JSON.stringify(Y, null, 2)
4941
5000
  }
4942
5001
  ]
4943
5002
  };
4944
- } catch (Z) {
4945
- const me = Z instanceof Error ? Z.message : String(Z);
5003
+ } catch (Y) {
5004
+ const me = Y instanceof Error ? Y.message : String(Y);
4946
5005
  return process.env.MCP_DEBUG && console.error(
4947
5006
  `[MCP Simple Execute] Tool '${w.name}' error:`,
4948
5007
  me
@@ -4957,7 +5016,7 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
4957
5016
  };
4958
5017
  }
4959
5018
  };
4960
- u.registerTool(w.name, A, B);
5019
+ u.registerTool(w.name, A, L);
4961
5020
  }), o.mcpError("Successfully registered all tools with MCP server");
4962
5021
  const v = this.getMcpResources();
4963
5022
  o.mcpError(`Registering ${v.length} MCP resources`), v.forEach((w) => {
@@ -4984,10 +5043,10 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
4984
5043
  return R.text !== void 0 && (F.text = R.text), R.blob !== void 0 && (F.blob = R.blob), R.mimeType !== void 0 && (F.mimeType = R.mimeType), F;
4985
5044
  })
4986
5045
  };
4987
- } catch (B) {
5046
+ } catch (L) {
4988
5047
  throw o.mcpError(
4989
- `Resource template handler error for ${w.name}: ${B instanceof Error ? B.message : String(B)}`
4990
- ), B;
5048
+ `Resource template handler error for ${w.name}: ${L instanceof Error ? L.message : String(L)}`
5049
+ ), L;
4991
5050
  }
4992
5051
  };
4993
5052
  u.registerResource(
@@ -5004,10 +5063,10 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
5004
5063
  new URL(T.href || T),
5005
5064
  {}
5006
5065
  )).contents.map((A) => {
5007
- const B = {
5066
+ const L = {
5008
5067
  uri: A.uri
5009
5068
  };
5010
- return A.text !== void 0 && (B.text = A.text), A.blob !== void 0 && (B.blob = A.blob), A.mimeType !== void 0 && (B.mimeType = A.mimeType), B;
5069
+ return A.text !== void 0 && (L.text = A.text), A.blob !== void 0 && (L.blob = A.blob), A.mimeType !== void 0 && (L.mimeType = A.mimeType), L;
5011
5070
  })
5012
5071
  };
5013
5072
  } catch (M) {
@@ -5059,10 +5118,10 @@ Migration guide: https://github.com/alcyone-labs/arg-parser/blob/main/docs/MCP-M
5059
5118
  // Use Zod v3 compatible schema for MCP SDK
5060
5119
  }, T = async (M) => {
5061
5120
  try {
5062
- const A = w.argsSchema.parse(M), B = await w.handler(A);
5121
+ const A = w.argsSchema.parse(M), L = await w.handler(A);
5063
5122
  return process.env.MCP_DEBUG && console.error(
5064
5123
  `[MCP Debug] Prompt '${w.name}' executed successfully`
5065
- ), B;
5124
+ ), L;
5066
5125
  } catch (A) {
5067
5126
  throw process.env.MCP_DEBUG && console.error(
5068
5127
  `[MCP Debug] Prompt '${w.name}' execution error:`,
@@ -5436,7 +5495,7 @@ mi = function(t) {
5436
5495
  break;
5437
5496
  }
5438
5497
  case "streamable-http": {
5439
- const { StreamableHTTPServerTransport: l } = await Promise.resolve().then(() => Yf), c = (await import("express")).default, f = c();
5498
+ const { StreamableHTTPServerTransport: l } = await Promise.resolve().then(() => Zf), c = (await import("express")).default, f = c();
5440
5499
  f.use(c.json());
5441
5500
  const h = r.port || 3e3, d = r.path || "/mcp", u = {};
5442
5501
  f.all(d, async (m, g) => {
@@ -5592,7 +5651,7 @@ class Ft extends Bt {
5592
5651
  return typeof e == "function" ? e.name || "custom function" : String(e).toLowerCase();
5593
5652
  }
5594
5653
  }
5595
- function Yl() {
5654
+ function Zl() {
5596
5655
  try {
5597
5656
  return new Ft();
5598
5657
  } catch (i) {
@@ -5602,7 +5661,7 @@ function Yl() {
5602
5661
  ), null;
5603
5662
  }
5604
5663
  }
5605
- async function Zl() {
5664
+ async function Yl() {
5606
5665
  try {
5607
5666
  if (typeof require < "u")
5608
5667
  try {
@@ -5622,8 +5681,8 @@ async function Zl() {
5622
5681
  const Xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5623
5682
  __proto__: null,
5624
5683
  TomlConfigPlugin: Ft,
5625
- createTomlPlugin: Yl,
5626
- createTomlPluginAsync: Zl
5684
+ createTomlPlugin: Zl,
5685
+ createTomlPluginAsync: Yl
5627
5686
  }, Symbol.toStringTag, { value: "Module" }));
5628
5687
  class Ot extends Bt {
5629
5688
  constructor(e) {
@@ -6006,7 +6065,7 @@ const vi = "2025-06-18", ac = "2025-03-26", gn = [
6006
6065
  progressToken: b.optional(yi)
6007
6066
  }), tr = b.looseObject({
6008
6067
  _meta: b.optional(nc)
6009
- }), Ye = b.object({
6068
+ }), Ze = b.object({
6010
6069
  method: b.string(),
6011
6070
  params: b.optional(tr)
6012
6071
  }), ut = b.looseObject({
@@ -6027,7 +6086,7 @@ const vi = "2025-06-18", ac = "2025-03-26", gn = [
6027
6086
  }), kt = b.union([b.string(), b.number().int()]), wi = b.strictObject({
6028
6087
  jsonrpc: b.literal(qt),
6029
6088
  id: kt
6030
- }).extend(Ye.shape), vn = (i) => wi.safeParse(i).success, Ei = b.strictObject({
6089
+ }).extend(Ze.shape), vn = (i) => wi.safeParse(i).success, Ei = b.strictObject({
6031
6090
  jsonrpc: b.literal(qt)
6032
6091
  }).extend(br.shape), sc = (i) => Ei.safeParse(i).success, Si = b.strictObject({
6033
6092
  jsonrpc: b.literal(qt),
@@ -6110,7 +6169,7 @@ const Pi = b.strictObject({
6110
6169
  */
6111
6170
  listChanged: b.optional(b.boolean())
6112
6171
  }).passthrough())
6113
- }).passthrough(), Dn = Ye.extend({
6172
+ }).passthrough(), Dn = Ze.extend({
6114
6173
  method: b.literal("initialize"),
6115
6174
  params: tr.extend({
6116
6175
  /**
@@ -6179,7 +6238,7 @@ const Pi = b.strictObject({
6179
6238
  instructions: b.optional(b.string())
6180
6239
  }), xi = br.extend({
6181
6240
  method: b.literal("notifications/initialized")
6182
- }), In = Ye.extend({
6241
+ }), In = Ze.extend({
6183
6242
  method: b.literal("ping")
6184
6243
  }), uc = b.object({
6185
6244
  /**
@@ -6203,7 +6262,7 @@ const Pi = b.strictObject({
6203
6262
  */
6204
6263
  progressToken: yi
6205
6264
  })
6206
- }), dt = Ye.extend({
6265
+ }), dt = Ze.extend({
6207
6266
  params: tr.extend({
6208
6267
  /**
6209
6268
  * An opaque token representing the current pagination position.
@@ -6295,7 +6354,7 @@ const Pi = b.strictObject({
6295
6354
  method: b.literal("resources/templates/list")
6296
6355
  }), hc = Ut.extend({
6297
6356
  resourceTemplates: b.array(fc)
6298
- }), wn = Ye.extend({
6357
+ }), wn = Ze.extend({
6299
6358
  method: b.literal("resources/read"),
6300
6359
  params: tr.extend({
6301
6360
  /**
@@ -6307,7 +6366,7 @@ const Pi = b.strictObject({
6307
6366
  contents: b.array(b.union([Ci, Ti]))
6308
6367
  }), mc = br.extend({
6309
6368
  method: b.literal("notifications/resources/list_changed")
6310
- }), gc = Ye.extend({
6369
+ }), gc = Ze.extend({
6311
6370
  method: b.literal("resources/subscribe"),
6312
6371
  params: tr.extend({
6313
6372
  /**
@@ -6315,7 +6374,7 @@ const Pi = b.strictObject({
6315
6374
  */
6316
6375
  uri: b.string()
6317
6376
  })
6318
- }), vc = Ye.extend({
6377
+ }), vc = Ze.extend({
6319
6378
  method: b.literal("resources/unsubscribe"),
6320
6379
  params: tr.extend({
6321
6380
  /**
@@ -6362,7 +6421,7 @@ const Pi = b.strictObject({
6362
6421
  method: b.literal("prompts/list")
6363
6422
  }), Ec = Ut.extend({
6364
6423
  prompts: b.array(wc)
6365
- }), Sn = Ye.extend({
6424
+ }), Sn = Ze.extend({
6366
6425
  method: b.literal("prompts/get"),
6367
6426
  params: tr.extend({
6368
6427
  /**
@@ -6548,7 +6607,7 @@ const Pi = b.strictObject({
6548
6607
  Ai.or(ar.extend({
6549
6608
  toolResult: b.unknown()
6550
6609
  }));
6551
- const _n = Ye.extend({
6610
+ const _n = Ze.extend({
6552
6611
  method: b.literal("tools/call"),
6553
6612
  params: tr.extend({
6554
6613
  name: b.string(),
@@ -6565,7 +6624,7 @@ const _n = Ye.extend({
6565
6624
  "critical",
6566
6625
  "alert",
6567
6626
  "emergency"
6568
- ]), Ac = Ye.extend({
6627
+ ]), Ac = Ze.extend({
6569
6628
  method: b.literal("logging/setLevel"),
6570
6629
  params: tr.extend({
6571
6630
  /**
@@ -6614,7 +6673,7 @@ const _n = Ye.extend({
6614
6673
  }), Oc = b.looseObject({
6615
6674
  role: b.enum(["user", "assistant"]),
6616
6675
  content: b.union([Nn, jn, Ln])
6617
- }), Nc = Ye.extend({
6676
+ }), Nc = Ze.extend({
6618
6677
  method: b.literal("sampling/createMessage"),
6619
6678
  params: tr.extend({
6620
6679
  messages: b.array(Oc),
@@ -6685,7 +6744,7 @@ const _n = Ye.extend({
6685
6744
  Lc,
6686
6745
  Bc,
6687
6746
  qc
6688
- ]), Uc = Ye.extend({
6747
+ ]), Uc = Ze.extend({
6689
6748
  method: b.literal("elicitation/create"),
6690
6749
  params: tr.extend({
6691
6750
  /**
@@ -6722,7 +6781,7 @@ const _n = Ye.extend({
6722
6781
  * The name of the prompt or prompt template
6723
6782
  */
6724
6783
  name: b.string()
6725
- }).passthrough(), xn = Ye.extend({
6784
+ }).passthrough(), xn = Ze.extend({
6726
6785
  method: b.literal("completion/complete"),
6727
6786
  params: tr.extend({
6728
6787
  ref: b.union([zc, Hc]),
@@ -7140,10 +7199,10 @@ class Kc {
7140
7199
  this._notificationHandlers.delete(e);
7141
7200
  }
7142
7201
  }
7143
- function Yc(i, e) {
7202
+ function Zc(i, e) {
7144
7203
  return Object.entries(e).reduce((t, [a, r]) => (r && typeof r == "object" ? t[a] = t[a] ? { ...t[a], ...r } : r : t[a] = r, t), { ...i });
7145
7204
  }
7146
- var Zc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7205
+ var Yc = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7147
7206
  function Bn(i) {
7148
7207
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
7149
7208
  }
@@ -7238,7 +7297,7 @@ function eu() {
7238
7297
  return I;
7239
7298
  } else
7240
7299
  return Array.from(D);
7241
- }, m = 2147483647, g = 36, E = 1, v = 26, P = 38, w = 700, S = 72, _ = 128, T = "-", M = /^xn--/, A = /[^\0-\x7E]/, B = /[\x2E\u3002\uFF0E\uFF61]/g, R = {
7300
+ }, m = 2147483647, g = 36, E = 1, v = 26, P = 38, w = 700, S = 72, _ = 128, T = "-", M = /^xn--/, A = /[^\0-\x7E]/, L = /[\x2E\u3002\uFF0E\uFF61]/g, R = {
7242
7301
  overflow: "Overflow: input needs wider integers to process",
7243
7302
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
7244
7303
  "invalid-input": "Invalid input"
@@ -7253,11 +7312,11 @@ function eu() {
7253
7312
  }
7254
7313
  function le(D, C) {
7255
7314
  var I = D.split("@"), k = "";
7256
- I.length > 1 && (k = I[0] + "@", D = I[1]), D = D.replace(B, ".");
7315
+ I.length > 1 && (k = I[0] + "@", D = I[1]), D = D.replace(L, ".");
7257
7316
  var q = D.split("."), ue = ee(q, C).join(".");
7258
7317
  return k + ue;
7259
7318
  }
7260
- function Z(D) {
7319
+ function Y(D) {
7261
7320
  for (var C = [], I = 0, k = D.length; I < k; ) {
7262
7321
  var q = D.charCodeAt(I++);
7263
7322
  if (q >= 55296 && q <= 56319 && I < k) {
@@ -7311,7 +7370,7 @@ function eu() {
7311
7370
  return String.fromCodePoint.apply(String, I);
7312
7371
  }, pe = function(C) {
7313
7372
  var I = [];
7314
- C = Z(C);
7373
+ C = Y(C);
7315
7374
  var k = C.length, q = _, ue = 0, de = S, Se = !0, Ae = !1, je = void 0;
7316
7375
  try {
7317
7376
  for (var Ee = C[Symbol.iterator](), Re; !(Se = (Re = Ee.next()).done); Se = !0) {
@@ -7404,14 +7463,14 @@ function eu() {
7404
7463
  * @type Object
7405
7464
  */
7406
7465
  ucs2: {
7407
- decode: Z,
7466
+ decode: Y,
7408
7467
  encode: me
7409
7468
  },
7410
7469
  decode: ce,
7411
7470
  encode: pe,
7412
7471
  toASCII: Ce,
7413
7472
  toUnicode: we
7414
- }, L = {};
7473
+ }, B = {};
7415
7474
  function H(D) {
7416
7475
  var C = D.charCodeAt(0), I = void 0;
7417
7476
  return C < 16 ? I = "%0" + C.toString(16).toUpperCase() : C < 128 ? I = "%" + C.toString(16).toUpperCase() : C < 2048 ? I = "%" + (C >> 6 | 192).toString(16).toUpperCase() + "%" + (C & 63 | 128).toString(16).toUpperCase() : I = "%" + (C >> 12 | 224).toString(16).toUpperCase() + "%" + (C >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (C & 63 | 128).toString(16).toUpperCase(), I;
@@ -7485,7 +7544,7 @@ function eu() {
7485
7544
  var q = D.match(oe);
7486
7545
  if (q) {
7487
7546
  Pe ? (I.scheme = q[1], I.userinfo = q[3], I.host = q[4], I.port = parseInt(q[5], 10), I.path = q[6] || "", I.query = q[7], I.fragment = q[8], isNaN(I.port) && (I.port = q[5])) : (I.scheme = q[1] || void 0, I.userinfo = D.indexOf("@") !== -1 ? q[3] : void 0, I.host = D.indexOf("//") !== -1 ? q[4] : void 0, I.port = parseInt(q[5], 10), I.path = q[6] || "", I.query = D.indexOf("?") !== -1 ? q[7] : void 0, I.fragment = D.indexOf("#") !== -1 ? q[8] : void 0, isNaN(I.port) && (I.port = D.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? q[4] : void 0)), I.host && (I.host = X(ie(I.host, k), k)), I.scheme === void 0 && I.userinfo === void 0 && I.host === void 0 && I.port === void 0 && !I.path && I.query === void 0 ? I.reference = "same-document" : I.scheme === void 0 ? I.reference = "relative" : I.fragment === void 0 ? I.reference = "absolute" : I.reference = "uri", C.reference && C.reference !== "suffix" && C.reference !== I.reference && (I.error = I.error || "URI is not a " + C.reference + " reference.");
7488
- var ue = L[(C.scheme || I.scheme || "").toLowerCase()];
7547
+ var ue = B[(C.scheme || I.scheme || "").toLowerCase()];
7489
7548
  if (!C.unicodeSupport && (!ue || !ue.unicodeSupport)) {
7490
7549
  if (I.host && (C.domainHost || ue && ue.domainHost))
7491
7550
  try {
@@ -7529,7 +7588,7 @@ function eu() {
7529
7588
  return C.join("");
7530
7589
  }
7531
7590
  function fe(D) {
7532
- var C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I = C.iri ? h : f, k = [], q = L[(C.scheme || D.scheme || "").toLowerCase()];
7591
+ var C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, I = C.iri ? h : f, k = [], q = B[(C.scheme || D.scheme || "").toLowerCase()];
7533
7592
  if (q && q.serialize && q.serialize(D, C), D.host && !I.IPV6ADDRESS.test(D.host)) {
7534
7593
  if (C.domainHost || q && q.domainHost)
7535
7594
  try {
@@ -7563,7 +7622,7 @@ function eu() {
7563
7622
  function qr(D, C) {
7564
7623
  return D && D.toString().replace(!C || !C.iri ? f.ESCAPE : h.ESCAPE, H);
7565
7624
  }
7566
- function Ze(D, C) {
7625
+ function Ye(D, C) {
7567
7626
  return D && D.toString().replace(!C || !C.iri ? f.PCT_ENCODED : h.PCT_ENCODED, se);
7568
7627
  }
7569
7628
  var xr = {
@@ -7585,7 +7644,7 @@ function eu() {
7585
7644
  function Kn(D) {
7586
7645
  return typeof D.secure == "boolean" ? D.secure : String(D.scheme).toLowerCase() === "wss";
7587
7646
  }
7588
- var Zr = {
7647
+ var Yr = {
7589
7648
  scheme: "ws",
7590
7649
  domainHost: !0,
7591
7650
  parse: function(C, I) {
@@ -7599,12 +7658,12 @@ function eu() {
7599
7658
  }
7600
7659
  return C.fragment = void 0, C;
7601
7660
  }
7602
- }, Yn = {
7661
+ }, Zn = {
7603
7662
  scheme: "wss",
7604
- domainHost: Zr.domainHost,
7605
- parse: Zr.parse,
7606
- serialize: Zr.serialize
7607
- }, Wi = {}, Zn = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", ir = "[0-9A-Fa-f]", Qi = r(r("%[EFef]" + ir + "%" + ir + ir + "%" + ir + ir) + "|" + r("%[89A-Fa-f]" + ir + "%" + ir + ir) + "|" + r("%" + ir + ir)), Ki = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", Yi = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", Zi = a(Yi, '[\\"\\\\]'), Xi = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", el = new RegExp(Zn, "g"), kr = new RegExp(Qi, "g"), rl = new RegExp(a("[^]", Ki, "[\\.]", '[\\"]', Zi), "g"), Xn = new RegExp(a("[^]", Zn, Xi), "g"), tl = Xn;
7663
+ domainHost: Yr.domainHost,
7664
+ parse: Yr.parse,
7665
+ serialize: Yr.serialize
7666
+ }, Wi = {}, Yn = "[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]", ir = "[0-9A-Fa-f]", Qi = r(r("%[EFef]" + ir + "%" + ir + ir + "%" + ir + ir) + "|" + r("%[89A-Fa-f]" + ir + "%" + ir + ir) + "|" + r("%" + ir + ir)), Ki = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]", Zi = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]", Yi = a(Zi, '[\\"\\\\]'), Xi = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]", el = new RegExp(Yn, "g"), kr = new RegExp(Qi, "g"), rl = new RegExp(a("[^]", Ki, "[\\.]", '[\\"]', Yi), "g"), Xn = new RegExp(a("[^]", Yn, Xi), "g"), tl = Xn;
7608
7667
  function Ht(D) {
7609
7668
  var C = se(D);
7610
7669
  return C.match(el) ? C : D;
@@ -7622,13 +7681,13 @@ function eu() {
7622
7681
  q.push(Re[Le]);
7623
7682
  break;
7624
7683
  case "subject":
7625
- k.subject = Ze(Ee[1], I);
7684
+ k.subject = Ye(Ee[1], I);
7626
7685
  break;
7627
7686
  case "body":
7628
- k.body = Ze(Ee[1], I);
7687
+ k.body = Ye(Ee[1], I);
7629
7688
  break;
7630
7689
  default:
7631
- ue = !0, de[Ze(Ee[0], I)] = Ze(Ee[1], I);
7690
+ ue = !0, de[Ye(Ee[0], I)] = Ye(Ee[1], I);
7632
7691
  break;
7633
7692
  }
7634
7693
  }
@@ -7637,11 +7696,11 @@ function eu() {
7637
7696
  k.query = void 0;
7638
7697
  for (var Ie = 0, Ue = q.length; Ie < Ue; ++Ie) {
7639
7698
  var Fe = q[Ie].split("@");
7640
- if (Fe[0] = Ze(Fe[0]), I.unicodeSupport)
7641
- Fe[1] = Ze(Fe[1], I).toLowerCase();
7699
+ if (Fe[0] = Ye(Fe[0]), I.unicodeSupport)
7700
+ Fe[1] = Ye(Fe[1], I).toLowerCase();
7642
7701
  else
7643
7702
  try {
7644
- Fe[1] = N.toASCII(Ze(Fe[1], I).toLowerCase());
7703
+ Fe[1] = N.toASCII(Ye(Fe[1], I).toLowerCase());
7645
7704
  } catch ($r) {
7646
7705
  k.error = k.error || "Email address's domain name can not be converted to ASCII via punycode: " + $r;
7647
7706
  }
@@ -7655,7 +7714,7 @@ function eu() {
7655
7714
  for (var ue = 0, de = q.length; ue < de; ++ue) {
7656
7715
  var Se = String(q[ue]), Ae = Se.lastIndexOf("@"), je = Se.slice(0, Ae).replace(kr, Ht).replace(kr, o).replace(rl, H), Ee = Se.slice(Ae + 1);
7657
7716
  try {
7658
- Ee = I.iri ? N.toUnicode(Ee) : N.toASCII(Ze(Ee, I).toLowerCase());
7717
+ Ee = I.iri ? N.toUnicode(Ee) : N.toASCII(Ye(Ee, I).toLowerCase());
7659
7718
  } catch (Ie) {
7660
7719
  k.error = k.error || "Email address's domain name can not be converted to " + (I.iri ? "Unicode" : "ASCII") + " via punycode: " + Ie;
7661
7720
  }
@@ -7675,14 +7734,14 @@ function eu() {
7675
7734
  parse: function(C, I) {
7676
7735
  var k = C.path && C.path.match(al), q = C;
7677
7736
  if (k) {
7678
- var ue = I.scheme || q.scheme || "urn", de = k[1].toLowerCase(), Se = k[2], Ae = ue + ":" + (I.nid || de), je = L[Ae];
7737
+ var ue = I.scheme || q.scheme || "urn", de = k[1].toLowerCase(), Se = k[2], Ae = ue + ":" + (I.nid || de), je = B[Ae];
7679
7738
  q.nid = de, q.nss = Se, q.path = void 0, je && (q = je.parse(q, I));
7680
7739
  } else
7681
7740
  q.error = q.error || "URN can not be parsed.";
7682
7741
  return q;
7683
7742
  },
7684
7743
  serialize: function(C, I) {
7685
- var k = I.scheme || C.scheme || "urn", q = C.nid, ue = k + ":" + (I.nid || q), de = L[ue];
7744
+ var k = I.scheme || C.scheme || "urn", q = C.nid, ue = k + ":" + (I.nid || q), de = B[ue];
7686
7745
  de && (C = de.serialize(C, I));
7687
7746
  var Se = C, Ae = C.nss;
7688
7747
  return Se.path = (q || I.nid) + ":" + Ae, Se;
@@ -7698,7 +7757,7 @@ function eu() {
7698
7757
  return k.nss = (C.uuid || "").toLowerCase(), k;
7699
7758
  }
7700
7759
  };
7701
- L[xr.scheme] = xr, L[Qn.scheme] = Qn, L[Zr.scheme] = Zr, L[Yn.scheme] = Yn, L[es.scheme] = es, L[rs.scheme] = rs, L[ts.scheme] = ts, t.SCHEMES = L, t.pctEncChar = H, t.pctDecChars = se, t.parse = x, t.removeDotSegments = J, t.serialize = fe, t.resolveComponents = ve, t.resolve = _e, t.normalize = ke, t.equal = Te, t.escapeComponent = qr, t.unescapeComponent = Ze, Object.defineProperty(t, "__esModule", { value: !0 });
7760
+ B[xr.scheme] = xr, B[Qn.scheme] = Qn, B[Yr.scheme] = Yr, B[Zn.scheme] = Zn, B[es.scheme] = es, B[rs.scheme] = rs, B[ts.scheme] = ts, t.SCHEMES = B, t.pctEncChar = H, t.pctDecChars = se, t.parse = x, t.removeDotSegments = J, t.serialize = fe, t.resolveComponents = ve, t.resolve = _e, t.normalize = ke, t.equal = Te, t.escapeComponent = qr, t.unescapeComponent = Ye, Object.defineProperty(t, "__esModule", { value: !0 });
7702
7761
  });
7703
7762
  }(nt, nt.exports)), nt.exports;
7704
7763
  }
@@ -7739,7 +7798,7 @@ function ru() {
7739
7798
  }), Wt;
7740
7799
  }
7741
7800
  var Qt, _s;
7742
- function Yr() {
7801
+ function Zr() {
7743
7802
  if (_s) return Qt;
7744
7803
  _s = 1, Qt = {
7745
7804
  copy: i,
@@ -7761,7 +7820,7 @@ function Yr() {
7761
7820
  getPath: v,
7762
7821
  getData: S,
7763
7822
  unescapeFragment: T,
7764
- unescapeJsonPointer: B,
7823
+ unescapeJsonPointer: L,
7765
7824
  escapeFragment: M,
7766
7825
  escapeJsonPointer: A
7767
7826
  };
@@ -7771,16 +7830,16 @@ function Yr() {
7771
7830
  return F;
7772
7831
  }
7773
7832
  function e(R, F, U, W) {
7774
- var Q = W ? " !== " : " === ", ee = W ? " || " : " && ", le = W ? "!" : "", Z = W ? "" : "!";
7833
+ var Q = W ? " !== " : " === ", ee = W ? " || " : " && ", le = W ? "!" : "", Y = W ? "" : "!";
7775
7834
  switch (R) {
7776
7835
  case "null":
7777
7836
  return F + Q + "null";
7778
7837
  case "array":
7779
7838
  return le + "Array.isArray(" + F + ")";
7780
7839
  case "object":
7781
- return "(" + le + F + ee + "typeof " + F + Q + '"object"' + ee + Z + "Array.isArray(" + F + "))";
7840
+ return "(" + le + F + ee + "typeof " + F + Q + '"object"' + ee + Y + "Array.isArray(" + F + "))";
7782
7841
  case "integer":
7783
- return "(typeof " + F + Q + '"number"' + ee + Z + "(" + F + " % 1)" + ee + F + Q + F + (U ? ee + le + "isFinite(" + F + ")" : "") + ")";
7842
+ return "(typeof " + F + Q + '"number"' + ee + Y + "(" + F + " % 1)" + ee + F + Q + F + (U ? ee + le + "isFinite(" + F + ")" : "") + ")";
7784
7843
  case "number":
7785
7844
  return "(typeof " + F + Q + '"' + R + '"' + (U ? ee + le + "isFinite(" + F + ")" : "") + ")";
7786
7845
  default:
@@ -7873,17 +7932,17 @@ function Yr() {
7873
7932
  if (W > F) throw new Error("Cannot access data " + W + " levels up, current level is " + F);
7874
7933
  if (ee = "data" + (F - W || ""), !Q) return ee;
7875
7934
  }
7876
- for (var Z = ee, me = Q.split("/"), te = 0; te < me.length; te++) {
7935
+ for (var Y = ee, me = Q.split("/"), te = 0; te < me.length; te++) {
7877
7936
  var ae = me[te];
7878
- ae && (ee += l(B(ae)), Z += " && " + ee);
7937
+ ae && (ee += l(L(ae)), Y += " && " + ee);
7879
7938
  }
7880
- return Z;
7939
+ return Y;
7881
7940
  }
7882
7941
  function _(R, F) {
7883
7942
  return R == '""' ? F : (R + " + " + F).replace(/([^\\])' \+ '/g, "$1");
7884
7943
  }
7885
7944
  function T(R) {
7886
- return B(decodeURIComponent(R));
7945
+ return L(decodeURIComponent(R));
7887
7946
  }
7888
7947
  function M(R) {
7889
7948
  return encodeURIComponent(A(R));
@@ -7891,7 +7950,7 @@ function Yr() {
7891
7950
  function A(R) {
7892
7951
  return R.replace(/~/g, "~0").replace(/\//g, "~1");
7893
7952
  }
7894
- function B(R) {
7953
+ function L(R) {
7895
7954
  return R.replace(/~1/g, "/").replace(/~0/g, "~");
7896
7955
  }
7897
7956
  return Qt;
@@ -7900,18 +7959,18 @@ var Kt, xs;
7900
7959
  function Ni() {
7901
7960
  if (xs) return Kt;
7902
7961
  xs = 1;
7903
- var i = Yr();
7962
+ var i = Zr();
7904
7963
  Kt = e;
7905
7964
  function e(t) {
7906
7965
  i.copy(t, this);
7907
7966
  }
7908
7967
  return Kt;
7909
7968
  }
7910
- var Yt = { exports: {} }, $s;
7969
+ var Zt = { exports: {} }, $s;
7911
7970
  function tu() {
7912
- if ($s) return Yt.exports;
7971
+ if ($s) return Zt.exports;
7913
7972
  $s = 1;
7914
- var i = Yt.exports = function(a, r, s) {
7973
+ var i = Zt.exports = function(a, r, s) {
7915
7974
  typeof r == "function" && (s = r, r = {}), s = r.cb || s;
7916
7975
  var o = typeof s == "function" ? s : s.pre || function() {
7917
7976
  }, n = s.post || function() {
@@ -7976,14 +8035,14 @@ function tu() {
7976
8035
  function t(a) {
7977
8036
  return a.replace(/~/g, "~0").replace(/\//g, "~1");
7978
8037
  }
7979
- return Yt.exports;
8038
+ return Zt.exports;
7980
8039
  }
7981
- var Zt, Cs;
8040
+ var Yt, Cs;
7982
8041
  function kn() {
7983
- if (Cs) return Zt;
8042
+ if (Cs) return Yt;
7984
8043
  Cs = 1;
7985
- var i = eu(), e = qn(), t = Yr(), a = Ni(), r = tu();
7986
- Zt = s, s.normalizeId = v, s.fullPath = m, s.url = P, s.ids = w, s.inlineRef = h, s.schema = o;
8044
+ var i = eu(), e = qn(), t = Zr(), a = Ni(), r = tu();
8045
+ Yt = s, s.normalizeId = v, s.fullPath = m, s.url = P, s.ids = w, s.inlineRef = h, s.schema = o;
7987
8046
  function s(S, _, T) {
7988
8047
  var M = this._refs[T];
7989
8048
  if (typeof M == "string")
@@ -7991,19 +8050,19 @@ function kn() {
7991
8050
  else return s.call(this, S, _, M);
7992
8051
  if (M = M || this._schemas[T], M instanceof a)
7993
8052
  return h(M.schema, this._opts.inlineRefs) ? M.schema : M.validate || this._compile(M);
7994
- var A = o.call(this, _, T), B, R, F;
7995
- return A && (B = A.schema, _ = A.root, F = A.baseId), B instanceof a ? R = B.validate || S.call(this, B.schema, _, void 0, F) : B !== void 0 && (R = h(B, this._opts.inlineRefs) ? B : S.call(this, B, _, void 0, F)), R;
8053
+ var A = o.call(this, _, T), L, R, F;
8054
+ return A && (L = A.schema, _ = A.root, F = A.baseId), L instanceof a ? R = L.validate || S.call(this, L.schema, _, void 0, F) : L !== void 0 && (R = h(L, this._opts.inlineRefs) ? L : S.call(this, L, _, void 0, F)), R;
7996
8055
  }
7997
8056
  function o(S, _) {
7998
8057
  var T = i.parse(_), M = g(T), A = m(this._getId(S.schema));
7999
8058
  if (Object.keys(S.schema).length === 0 || M !== A) {
8000
- var B = v(M), R = this._refs[B];
8059
+ var L = v(M), R = this._refs[L];
8001
8060
  if (typeof R == "string")
8002
8061
  return n.call(this, S, R, T);
8003
8062
  if (R instanceof a)
8004
8063
  R.validate || this._compile(R), S = R;
8005
- else if (R = this._schemas[B], R instanceof a) {
8006
- if (R.validate || this._compile(R), B == v(_))
8064
+ else if (R = this._schemas[L], R instanceof a) {
8065
+ if (R.validate || this._compile(R), L == v(_))
8007
8066
  return { schema: R, root: S, baseId: A };
8008
8067
  S = R;
8009
8068
  } else
@@ -8016,17 +8075,17 @@ function kn() {
8016
8075
  function n(S, _, T) {
8017
8076
  var M = o.call(this, S, _);
8018
8077
  if (M) {
8019
- var A = M.schema, B = M.baseId;
8078
+ var A = M.schema, L = M.baseId;
8020
8079
  S = M.root;
8021
8080
  var R = this._getId(A);
8022
- return R && (B = P(B, R)), c.call(this, T, B, A, S);
8081
+ return R && (L = P(L, R)), c.call(this, T, L, A, S);
8023
8082
  }
8024
8083
  }
8025
8084
  var l = t.toHash(["properties", "patternProperties", "enum", "dependencies", "definitions"]);
8026
8085
  function c(S, _, T, M) {
8027
8086
  if (S.fragment = S.fragment || "", S.fragment.slice(0, 1) == "/") {
8028
- for (var A = S.fragment.split("/"), B = 1; B < A.length; B++) {
8029
- var R = A[B];
8087
+ for (var A = S.fragment.split("/"), L = 1; L < A.length; L++) {
8088
+ var R = A[L];
8030
8089
  if (R) {
8031
8090
  if (R = t.unescapeFragment(R), T = T[R], T === void 0) break;
8032
8091
  var F;
@@ -8102,29 +8161,29 @@ function kn() {
8102
8161
  return _ = v(_), i.resolve(S, _);
8103
8162
  }
8104
8163
  function w(S) {
8105
- var _ = v(this._getId(S)), T = { "": _ }, M = { "": m(_, !1) }, A = {}, B = this;
8164
+ var _ = v(this._getId(S)), T = { "": _ }, M = { "": m(_, !1) }, A = {}, L = this;
8106
8165
  return r(S, { allKeys: !0 }, function(R, F, U, W, Q, ee, le) {
8107
8166
  if (F !== "") {
8108
- var Z = B._getId(R), me = T[W], te = M[W] + "/" + Q;
8109
- if (le !== void 0 && (te += "/" + (typeof le == "number" ? le : t.escapeFragment(le))), typeof Z == "string") {
8110
- Z = me = v(me ? i.resolve(me, Z) : Z);
8111
- var ae = B._refs[Z];
8112
- if (typeof ae == "string" && (ae = B._refs[ae]), ae && ae.schema) {
8167
+ var Y = L._getId(R), me = T[W], te = M[W] + "/" + Q;
8168
+ if (le !== void 0 && (te += "/" + (typeof le == "number" ? le : t.escapeFragment(le))), typeof Y == "string") {
8169
+ Y = me = v(me ? i.resolve(me, Y) : Y);
8170
+ var ae = L._refs[Y];
8171
+ if (typeof ae == "string" && (ae = L._refs[ae]), ae && ae.schema) {
8113
8172
  if (!e(R, ae.schema))
8114
- throw new Error('id "' + Z + '" resolves to more than one schema');
8115
- } else if (Z != v(te))
8116
- if (Z[0] == "#") {
8117
- if (A[Z] && !e(R, A[Z]))
8118
- throw new Error('id "' + Z + '" resolves to more than one schema');
8119
- A[Z] = R;
8173
+ throw new Error('id "' + Y + '" resolves to more than one schema');
8174
+ } else if (Y != v(te))
8175
+ if (Y[0] == "#") {
8176
+ if (A[Y] && !e(R, A[Y]))
8177
+ throw new Error('id "' + Y + '" resolves to more than one schema');
8178
+ A[Y] = R;
8120
8179
  } else
8121
- B._refs[Z] = te;
8180
+ L._refs[Y] = te;
8122
8181
  }
8123
8182
  T[F] = me, M[F] = te;
8124
8183
  }
8125
8184
  }), A;
8126
8185
  }
8127
- return Zt;
8186
+ return Yt;
8128
8187
  }
8129
8188
  var Xt, Ts;
8130
8189
  function Un() {
@@ -8223,35 +8282,35 @@ function Li() {
8223
8282
  if (n && (e.baseId = e.resolve.url(e.baseId, n)), s && !e.async) throw new Error("async schema in sync schema");
8224
8283
  r += " var errs_" + f + " = errors;";
8225
8284
  }
8226
- var S = "valid" + f, _ = !e.opts.allErrors, T = "", M = "", A, B = e.schema.type, R = Array.isArray(B);
8227
- if (B && e.opts.nullable && e.schema.nullable === !0 && (R ? B.indexOf("null") == -1 && (B = B.concat("null")) : B != "null" && (B = [B, "null"], R = !0)), R && B.length == 1 && (B = B[0], R = !1), e.schema.$ref && o) {
8285
+ var S = "valid" + f, _ = !e.opts.allErrors, T = "", M = "", A, L = e.schema.type, R = Array.isArray(L);
8286
+ if (L && e.opts.nullable && e.schema.nullable === !0 && (R ? L.indexOf("null") == -1 && (L = L.concat("null")) : L != "null" && (L = [L, "null"], R = !0)), R && L.length == 1 && (L = L[0], R = !1), e.schema.$ref && o) {
8228
8287
  if (e.opts.extendRefs == "fail")
8229
8288
  throw new Error('$ref: validation keywords used in schema at path "' + e.errSchemaPath + '" (see option extendRefs)');
8230
8289
  e.opts.extendRefs !== !0 && (o = !1, e.logger.warn('$ref: keywords ignored in schema at path "' + e.errSchemaPath + '"'));
8231
8290
  }
8232
- if (e.schema.$comment && e.opts.$comment && (r += " " + e.RULES.all.$comment.code(e, "$comment")), B) {
8291
+ if (e.schema.$comment && e.opts.$comment && (r += " " + e.RULES.all.$comment.code(e, "$comment")), L) {
8233
8292
  if (e.opts.coerceTypes)
8234
- var F = e.util.coerceToTypes(e.opts.coerceTypes, B);
8235
- var U = e.RULES.types[B];
8293
+ var F = e.util.coerceToTypes(e.opts.coerceTypes, L);
8294
+ var U = e.RULES.types[L];
8236
8295
  if (F || R || U === !0 || U && !$(U)) {
8237
8296
  var u = e.schemaPath + ".type", m = e.errSchemaPath + "/type", u = e.schemaPath + ".type", m = e.errSchemaPath + "/type", W = R ? "checkDataTypes" : "checkDataType";
8238
- if (r += " if (" + e.util[W](B, g, e.opts.strictNumbers, !0) + ") { ", F) {
8297
+ if (r += " if (" + e.util[W](L, g, e.opts.strictNumbers, !0) + ") { ", F) {
8239
8298
  var Q = "dataType" + f, ee = "coerced" + f;
8240
8299
  r += " var " + Q + " = typeof " + g + "; var " + ee + " = undefined; ", e.opts.coerceTypes == "array" && (r += " if (" + Q + " == 'object' && Array.isArray(" + g + ") && " + g + ".length == 1) { " + g + " = " + g + "[0]; " + Q + " = typeof " + g + "; if (" + e.util.checkDataType(e.schema.type, g, e.opts.strictNumbers) + ") " + ee + " = " + g + "; } "), r += " if (" + ee + " !== undefined) ; ";
8241
8300
  var le = F;
8242
8301
  if (le)
8243
- for (var Z, me = -1, te = le.length - 1; me < te; )
8244
- Z = le[me += 1], Z == "string" ? r += " else if (" + Q + " == 'number' || " + Q + " == 'boolean') " + ee + " = '' + " + g + "; else if (" + g + " === null) " + ee + " = ''; " : Z == "number" || Z == "integer" ? (r += " else if (" + Q + " == 'boolean' || " + g + " === null || (" + Q + " == 'string' && " + g + " && " + g + " == +" + g + " ", Z == "integer" && (r += " && !(" + g + " % 1)"), r += ")) " + ee + " = +" + g + "; ") : Z == "boolean" ? r += " else if (" + g + " === 'false' || " + g + " === 0 || " + g + " === null) " + ee + " = false; else if (" + g + " === 'true' || " + g + " === 1) " + ee + " = true; " : Z == "null" ? r += " else if (" + g + " === '' || " + g + " === 0 || " + g + " === false) " + ee + " = null; " : e.opts.coerceTypes == "array" && Z == "array" && (r += " else if (" + Q + " == 'string' || " + Q + " == 'number' || " + Q + " == 'boolean' || " + g + " == null) " + ee + " = [" + g + "]; ");
8302
+ for (var Y, me = -1, te = le.length - 1; me < te; )
8303
+ Y = le[me += 1], Y == "string" ? r += " else if (" + Q + " == 'number' || " + Q + " == 'boolean') " + ee + " = '' + " + g + "; else if (" + g + " === null) " + ee + " = ''; " : Y == "number" || Y == "integer" ? (r += " else if (" + Q + " == 'boolean' || " + g + " === null || (" + Q + " == 'string' && " + g + " && " + g + " == +" + g + " ", Y == "integer" && (r += " && !(" + g + " % 1)"), r += ")) " + ee + " = +" + g + "; ") : Y == "boolean" ? r += " else if (" + g + " === 'false' || " + g + " === 0 || " + g + " === null) " + ee + " = false; else if (" + g + " === 'true' || " + g + " === 1) " + ee + " = true; " : Y == "null" ? r += " else if (" + g + " === '' || " + g + " === 0 || " + g + " === false) " + ee + " = null; " : e.opts.coerceTypes == "array" && Y == "array" && (r += " else if (" + Q + " == 'string' || " + Q + " == 'number' || " + Q + " == 'boolean' || " + g + " == null) " + ee + " = [" + g + "]; ");
8245
8304
  r += " else { ";
8246
8305
  var E = E || [];
8247
- E.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (A || "type") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(m) + " , params: { type: '", R ? r += "" + B.join(",") : r += "" + B, r += "' } ", e.opts.messages !== !1 && (r += " , message: 'should be ", R ? r += "" + B.join(",") : r += "" + B, r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + u + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + g + " "), r += " } ") : r += " {} ";
8306
+ E.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (A || "type") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(m) + " , params: { type: '", R ? r += "" + L.join(",") : r += "" + L, r += "' } ", e.opts.messages !== !1 && (r += " , message: 'should be ", R ? r += "" + L.join(",") : r += "" + L, r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + u + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + g + " "), r += " } ") : r += " {} ";
8248
8307
  var v = r;
8249
8308
  r = E.pop(), !e.compositeRule && _ ? e.async ? r += " throw new ValidationError([" + v + "]); " : r += " validate.errors = [" + v + "]; return false; " : r += " var err = " + v + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } if (" + ee + " !== undefined) { ";
8250
8309
  var ae = h ? "data" + (h - 1 || "") : "parentData", ne = h ? e.dataPathArr[h] : "parentDataProperty";
8251
8310
  r += " " + g + " = " + ee + "; ", h || (r += "if (" + ae + " !== undefined)"), r += " " + ae + "[" + ne + "] = " + ee + "; } ";
8252
8311
  } else {
8253
8312
  var E = E || [];
8254
- E.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (A || "type") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(m) + " , params: { type: '", R ? r += "" + B.join(",") : r += "" + B, r += "' } ", e.opts.messages !== !1 && (r += " , message: 'should be ", R ? r += "" + B.join(",") : r += "" + B, r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + u + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + g + " "), r += " } ") : r += " {} ";
8313
+ E.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (A || "type") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(m) + " , params: { type: '", R ? r += "" + L.join(",") : r += "" + L, r += "' } ", e.opts.messages !== !1 && (r += " , message: 'should be ", R ? r += "" + L.join(",") : r += "" + L, r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + u + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + g + " "), r += " } ") : r += " {} ";
8255
8314
  var v = r;
8256
8315
  r = E.pop(), !e.compositeRule && _ ? e.async ? r += " throw new ValidationError([" + v + "]); " : r += " validate.errors = [" + v + "]; return false; " : r += " var err = " + v + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
8257
8316
  }
@@ -8269,11 +8328,11 @@ function Li() {
8269
8328
  if (U.type == "object" && e.schema.properties) {
8270
8329
  var d = e.schema.properties, Ce = Object.keys(d), N = Ce;
8271
8330
  if (N)
8272
- for (var L, H = -1, se = N.length - 1; H < se; ) {
8273
- L = N[H += 1];
8274
- var z = d[L];
8331
+ for (var B, H = -1, se = N.length - 1; H < se; ) {
8332
+ B = N[H += 1];
8333
+ var z = d[B];
8275
8334
  if (z.default !== void 0) {
8276
- var K = g + e.util.getProperty(L);
8335
+ var K = g + e.util.getProperty(B);
8277
8336
  if (e.compositeRule) {
8278
8337
  if (e.opts.strictDefaults) {
8279
8338
  var w = "default is ignored for: " + K;
@@ -8310,10 +8369,10 @@ function Li() {
8310
8369
  y && (r += " " + y + " ", _ && (T += "}"));
8311
8370
  }
8312
8371
  }
8313
- if (_ && (r += " " + T + " ", T = ""), U.type && (r += " } ", B && B === U.type && !F)) {
8372
+ if (_ && (r += " " + T + " ", T = ""), U.type && (r += " } ", L && L === U.type && !F)) {
8314
8373
  r += " else { ";
8315
8374
  var u = e.schemaPath + ".type", m = e.errSchemaPath + "/type", E = E || [];
8316
- E.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (A || "type") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(m) + " , params: { type: '", R ? r += "" + B.join(",") : r += "" + B, r += "' } ", e.opts.messages !== !1 && (r += " , message: 'should be ", R ? r += "" + B.join(",") : r += "" + B, r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + u + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + g + " "), r += " } ") : r += " {} ";
8375
+ E.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (A || "type") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(m) + " , params: { type: '", R ? r += "" + L.join(",") : r += "" + L, r += "' } ", e.opts.messages !== !1 && (r += " , message: 'should be ", R ? r += "" + L.join(",") : r += "" + L, r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + u + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + g + " "), r += " } ") : r += " {} ";
8317
8376
  var v = r;
8318
8377
  r = E.pop(), !e.compositeRule && _ ? e.async ? r += " throw new ValidationError([" + v + "]); " : r += " validate.errors = [" + v + "]; return false; " : r += " var err = " + v + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } ";
8319
8378
  }
@@ -8340,14 +8399,14 @@ var ta, As;
8340
8399
  function au() {
8341
8400
  if (As) return ta;
8342
8401
  As = 1;
8343
- var i = kn(), e = Yr(), t = Un(), a = ji(), r = Li(), s = e.ucs2length, o = qn(), n = t.Validation;
8402
+ var i = kn(), e = Zr(), t = Un(), a = ji(), r = Li(), s = e.ucs2length, o = qn(), n = t.Validation;
8344
8403
  ta = l;
8345
8404
  function l(v, P, w, S) {
8346
- var _ = this, T = this._opts, M = [void 0], A = {}, B = [], R = {}, F = [], U = {}, W = [];
8405
+ var _ = this, T = this._opts, M = [void 0], A = {}, L = [], R = {}, F = [], U = {}, W = [];
8347
8406
  P = P || { schema: v, refVal: M, refs: A };
8348
8407
  var Q = c.call(this, v, P, S), ee = this._compilations[Q.index];
8349
8408
  if (Q.compiling) return ee.callValidate = ae;
8350
- var le = this._formats, Z = this.RULES;
8409
+ var le = this._formats, Y = this.RULES;
8351
8410
  try {
8352
8411
  var me = ne(v, P, w, S);
8353
8412
  ee.validate = me;
@@ -8374,12 +8433,12 @@ function au() {
8374
8433
  errSchemaPath: "#",
8375
8434
  errorPath: '""',
8376
8435
  MissingRefError: t.MissingRef,
8377
- RULES: Z,
8436
+ RULES: Y,
8378
8437
  validate: r,
8379
8438
  util: e,
8380
8439
  resolve: i,
8381
8440
  resolveRef: ce,
8382
- usePattern: L,
8441
+ usePattern: B,
8383
8442
  useDefault: H,
8384
8443
  useCustomRule: se,
8385
8444
  opts: T,
@@ -8387,7 +8446,7 @@ function au() {
8387
8446
  logger: _.logger,
8388
8447
  self: _
8389
8448
  });
8390
- x = E(M, m) + E(B, d) + E(F, u) + E(W, g) + x, T.processCode && (x = T.processCode(x, z));
8449
+ x = E(M, m) + E(L, d) + E(F, u) + E(W, g) + x, T.processCode && (x = T.processCode(x, z));
8391
8450
  var p;
8392
8451
  try {
8393
8452
  var y = new Function(
@@ -8405,7 +8464,7 @@ function au() {
8405
8464
  );
8406
8465
  p = y(
8407
8466
  _,
8408
- Z,
8467
+ Y,
8409
8468
  le,
8410
8469
  P,
8411
8470
  M,
@@ -8420,7 +8479,7 @@ function au() {
8420
8479
  }
8421
8480
  return p.schema = z, p.errors = null, p.refs = A, p.refVal = M, p.root = oe ? p : K, Pe && (p.$async = !0), T.sourceCode === !0 && (p.source = {
8422
8481
  code: x,
8423
- patterns: B,
8482
+ patterns: L,
8424
8483
  defaults: F
8425
8484
  }), p;
8426
8485
  }
@@ -8459,9 +8518,9 @@ function au() {
8459
8518
  function N(z, K) {
8460
8519
  return typeof z == "object" || typeof z == "boolean" ? { code: K, schema: z, inline: !0 } : { code: K, $async: z && !!z.$async };
8461
8520
  }
8462
- function L(z) {
8521
+ function B(z) {
8463
8522
  var K = R[z];
8464
- return K === void 0 && (K = R[z] = B.length, B[K] = z), "pattern" + K;
8523
+ return K === void 0 && (K = R[z] = L.length, L[K] = z), "pattern" + K;
8465
8524
  }
8466
8525
  function H(z) {
8467
8526
  switch (typeof z) {
@@ -8570,7 +8629,7 @@ var na, Is;
8570
8629
  function su() {
8571
8630
  if (Is) return na;
8572
8631
  Is = 1;
8573
- var i = Yr(), e = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, t = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, r = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, s = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, o = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, n = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, l = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i, c = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, f = /^(?:\/(?:[^~/]|~0|~1)*)*$/, h = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, d = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
8632
+ var i = Zr(), e = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, t = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], a = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, r = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, s = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, o = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, n = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, l = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i, c = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, f = /^(?:\/(?:[^~/]|~0|~1)*)*$/, h = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, d = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
8574
8633
  na = u;
8575
8634
  function u(M) {
8576
8635
  return M = M == "full" ? "full" : "fast", i.copy(u[M]);
@@ -8628,13 +8687,13 @@ function su() {
8628
8687
  function g(M) {
8629
8688
  var A = M.match(e);
8630
8689
  if (!A) return !1;
8631
- var B = +A[1], R = +A[2], F = +A[3];
8632
- return R >= 1 && R <= 12 && F >= 1 && F <= (R == 2 && m(B) ? 29 : t[R]);
8690
+ var L = +A[1], R = +A[2], F = +A[3];
8691
+ return R >= 1 && R <= 12 && F >= 1 && F <= (R == 2 && m(L) ? 29 : t[R]);
8633
8692
  }
8634
8693
  function E(M, A) {
8635
- var B = M.match(a);
8636
- if (!B) return !1;
8637
- var R = B[1], F = B[2], U = B[3], W = B[5];
8694
+ var L = M.match(a);
8695
+ if (!L) return !1;
8696
+ var R = L[1], F = L[2], U = L[3], W = L[5];
8638
8697
  return (R <= 23 && F <= 59 && U <= 59 || R == 23 && F == 59 && U == 60) && (!A || W);
8639
8698
  }
8640
8699
  var v = /t|\s/i;
@@ -8772,10 +8831,10 @@ function fu() {
8772
8831
  m.baseId = S, e.util.varOccurences(A, w) < 2 ? r += " " + e.util.varReplace(A, w, M) + " " : r += " var " + w + " = " + M + "; " + A + " ", r += " if (" + E + ") break; } ", e.compositeRule = m.compositeRule = T, r += " " + g + " if (!" + E + ") {";
8773
8832
  } else
8774
8833
  r += " if (" + h + ".length == 0) {";
8775
- var B = B || [];
8776
- B.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: 'contains' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: {} ", e.opts.messages !== !1 && (r += " , message: 'should contain a valid item' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
8834
+ var L = L || [];
8835
+ L.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: 'contains' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: {} ", e.opts.messages !== !1 && (r += " , message: 'should contain a valid item' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
8777
8836
  var R = r;
8778
- return r = B.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + R + "]); " : r += " validate.errors = [" + R + "]; return false; " : r += " var err = " + R + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } else { ", _ && (r += " errors = " + u + "; if (vErrors !== null) { if (" + u + ") vErrors.length = " + u + "; else vErrors = null; } "), e.opts.allErrors && (r += " } "), r;
8837
+ return r = L.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + R + "]); " : r += " validate.errors = [" + R + "]; return false; " : r += " var err = " + R + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } else { ", _ && (r += " errors = " + u + "; if (vErrors !== null) { if (" + u + ") vErrors.length = " + u + "; else vErrors = null; } "), e.opts.allErrors && (r += " } "), r;
8779
8838
  }), ua;
8780
8839
  }
8781
8840
  var fa, qs;
@@ -8798,8 +8857,8 @@ function du() {
8798
8857
  r += " && ( ";
8799
8858
  var M = S;
8800
8859
  if (M)
8801
- for (var A, B = -1, R = M.length - 1; B < R; ) {
8802
- A = M[B += 1], B && (r += " || ");
8860
+ for (var A, L = -1, R = M.length - 1; L < R; ) {
8861
+ A = M[L += 1], L && (r += " || ");
8803
8862
  var F = e.util.getProperty(A), U = h + F;
8804
8863
  r += " ( ( " + U + " === undefined ", P && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(A) + "') "), r += ") && (missing" + s + " = " + e.util.toQuotedString(e.opts.jsonPointers ? A : F) + ") ) ";
8805
8864
  }
@@ -8812,10 +8871,10 @@ function du() {
8812
8871
  r = ee.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + le + "]); " : r += " validate.errors = [" + le + "]; return false; " : r += " var err = " + le + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";
8813
8872
  } else {
8814
8873
  r += " ) { ";
8815
- var Z = S;
8816
- if (Z)
8817
- for (var A, me = -1, te = Z.length - 1; me < te; ) {
8818
- A = Z[me += 1];
8874
+ var Y = S;
8875
+ if (Y)
8876
+ for (var A, me = -1, te = Y.length - 1; me < te; ) {
8877
+ A = Y[me += 1];
8819
8878
  var F = e.util.getProperty(A), Q = e.util.escapeQuotes(A), U = h + F;
8820
8879
  e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(_, A, e.opts.jsonPointers)), r += " if ( " + U + " === undefined ", P && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(A) + "') "), r += ") { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'dependencies' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { property: '" + e.util.escapeQuotes(T) + "', missingProperty: '" + Q + "', depsCount: " + S.length + ", deps: '" + e.util.escapeQuotes(S.length == 1 ? S[0] : S.join(", ")) + "' } ", e.opts.messages !== !1 && (r += " , message: 'should have ", S.length == 1 ? r += "property " + e.util.escapeQuotes(S[0]) : r += "properties " + e.util.escapeQuotes(S.join(", ")), r += " when property " + e.util.escapeQuotes(T) + " is present' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ";
8821
8880
  }
@@ -8921,10 +8980,10 @@ function gu() {
8921
8980
  var A = r;
8922
8981
  r = M.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + A + "]); " : r += " validate.errors = [" + A + "]; return false; " : r += " var err = " + A + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } ", c = T, f && (g += "}", r += " else { ");
8923
8982
  }
8924
- var B = n;
8925
- if (B) {
8926
- for (var R, F = -1, U = B.length - 1; F < U; )
8927
- if (R = B[F += 1], e.opts.strictKeywords ? typeof R == "object" && Object.keys(R).length > 0 || R === !1 : e.util.schemaHasRules(R, e.RULES.all)) {
8983
+ var L = n;
8984
+ if (L) {
8985
+ for (var R, F = -1, U = L.length - 1; F < U; )
8986
+ if (R = L[F += 1], e.opts.strictKeywords ? typeof R == "object" && Object.keys(R).length > 0 || R === !1 : e.util.schemaHasRules(R, e.RULES.all)) {
8928
8987
  r += " " + E + " = true; if (" + h + ".length > " + F + ") { ";
8929
8988
  var W = h + "[" + F + "]";
8930
8989
  m.schema = R, m.schemaPath = l + "[" + F + "]", m.errSchemaPath = c + "/" + F, m.errorPath = e.util.getPathExpr(e.errorPath, F, e.opts.jsonPointers, !0), m.dataPathArr[P] = F;
@@ -8960,7 +9019,7 @@ function Gs() {
8960
9019
  if (!(v || E === void 0 || typeof E == "number" || typeof E == "boolean"))
8961
9020
  throw new Error(g + " must be number or boolean");
8962
9021
  if (v) {
8963
- var _ = e.util.getData(E.$data, o, e.dataPathArr), T = "exclusive" + s, M = "exclType" + s, A = "exclIsNumber" + s, B = "op" + s, R = "' + " + B + " + '";
9022
+ var _ = e.util.getData(E.$data, o, e.dataPathArr), T = "exclusive" + s, M = "exclType" + s, A = "exclIsNumber" + s, L = "op" + s, R = "' + " + L + " + '";
8964
9023
  r += " var schemaExcl" + s + " = " + _ + "; ", _ = "schemaExcl" + s, r += " var " + T + "; var " + M + " = typeof " + _ + "; if (" + M + " != 'boolean' && " + M + " != 'undefined' && " + M + " != 'number') { ";
8965
9024
  var S = g, F = F || [];
8966
9025
  F.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (S || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: {} ", e.opts.messages !== !1 && (r += " , message: '" + g + " should be boolean' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
@@ -8969,17 +9028,17 @@ function Gs() {
8969
9028
  } else {
8970
9029
  var A = typeof E == "number", R = P;
8971
9030
  if (A && d) {
8972
- var B = "'" + R + "'";
9031
+ var L = "'" + R + "'";
8973
9032
  r += " if ( ", d && (r += " (" + u + " !== undefined && typeof " + u + " != 'number') || "), r += " ( " + u + " === undefined || " + E + " " + P + "= " + u + " ? " + h + " " + w + "= " + E + " : " + h + " " + w + " " + u + " ) || " + h + " !== " + h + ") { ";
8974
9033
  } else {
8975
9034
  A && n === void 0 ? (T = !0, S = g, c = e.errSchemaPath + "/" + g, u = E, w += "=") : (A && (u = Math[m ? "min" : "max"](E, n)), E === (A ? u : !0) ? (T = !0, S = g, c = e.errSchemaPath + "/" + g, w += "=") : (T = !1, R += "="));
8976
- var B = "'" + R + "'";
9035
+ var L = "'" + R + "'";
8977
9036
  r += " if ( ", d && (r += " (" + u + " !== undefined && typeof " + u + " != 'number') || "), r += " " + h + " " + w + " " + u + " || " + h + " !== " + h + ") { ";
8978
9037
  }
8979
9038
  }
8980
9039
  S = S || t;
8981
9040
  var F = F || [];
8982
- F.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (S || "_limit") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { comparison: " + B + ", limit: " + u + ", exclusive: " + T + " } ", e.opts.messages !== !1 && (r += " , message: 'should be " + R + " ", d ? r += "' + " + u : r += "" + u + "'"), e.opts.verbose && (r += " , schema: ", d ? r += "validate.schema" + l : r += "" + n, r += " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
9041
+ F.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: '" + (S || "_limit") + "' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { comparison: " + L + ", limit: " + u + ", exclusive: " + T + " } ", e.opts.messages !== !1 && (r += " , message: 'should be " + R + " ", d ? r += "' + " + u : r += "" + u + "'"), e.opts.verbose && (r += " , schema: ", d ? r += "validate.schema" + l : r += "" + n, r += " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
8983
9042
  var U = r;
8984
9043
  return r = F.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + U + "]); " : r += " validate.errors = [" + U + "]; return false; " : r += " var err = " + U + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += " } ", f && (r += " else { "), r;
8985
9044
  }), ga;
@@ -9012,9 +9071,9 @@ function Ks() {
9012
9071
  return r = E.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + v + "]); " : r += " validate.errors = [" + v + "]; return false; " : r += " var err = " + v + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", r += "} ", f && (r += " else { "), r;
9013
9072
  }), ya;
9014
9073
  }
9015
- var ba, Ys;
9016
- function Zs() {
9017
- return Ys || (Ys = 1, ba = function(e, t, a) {
9074
+ var ba, Zs;
9075
+ function Ys() {
9076
+ return Zs || (Zs = 1, ba = function(e, t, a) {
9018
9077
  var r = " ", s = e.level, o = e.dataLevel, n = e.schema[t], l = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, g, h = "data" + (o || ""), d = e.opts.$data && n && n.$data, u;
9019
9078
  if (d ? (r += " var schema" + s + " = " + e.util.getData(n.$data, o, e.dataPathArr) + "; ", u = "schema" + s) : u = n, !(d || typeof n == "number"))
9020
9079
  throw new Error(t + " must be number");
@@ -9094,14 +9153,14 @@ function Eu() {
9094
9153
  return ao || (ao = 1, _a = function(e, t, a) {
9095
9154
  var r = " ", s = e.level, o = e.dataLevel, n = e.schema[t], l = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, h = "data" + (o || ""), d = "errs__" + s, u = e.util.copy(e), m = "";
9096
9155
  u.level++;
9097
- var g = "valid" + u.level, E = "key" + s, v = "idx" + s, P = u.dataLevel = e.dataLevel + 1, w = "data" + P, S = "dataProperties" + s, _ = Object.keys(n || {}).filter(me), T = e.schema.patternProperties || {}, M = Object.keys(T).filter(me), A = e.schema.additionalProperties, B = _.length || M.length, R = A === !1, F = typeof A == "object" && Object.keys(A).length, U = e.opts.removeAdditional, W = R || F || U, Q = e.opts.ownProperties, ee = e.baseId, le = e.schema.required;
9156
+ var g = "valid" + u.level, E = "key" + s, v = "idx" + s, P = u.dataLevel = e.dataLevel + 1, w = "data" + P, S = "dataProperties" + s, _ = Object.keys(n || {}).filter(me), T = e.schema.patternProperties || {}, M = Object.keys(T).filter(me), A = e.schema.additionalProperties, L = _.length || M.length, R = A === !1, F = typeof A == "object" && Object.keys(A).length, U = e.opts.removeAdditional, W = R || F || U, Q = e.opts.ownProperties, ee = e.baseId, le = e.schema.required;
9098
9157
  if (le && !(e.opts.$data && le.$data) && le.length < e.opts.loopRequired)
9099
- var Z = e.util.toHash(le);
9158
+ var Y = e.util.toHash(le);
9100
9159
  function me(Te) {
9101
9160
  return Te !== "__proto__";
9102
9161
  }
9103
9162
  if (r += "var " + d + " = errors;var " + g + " = true;", Q && (r += " var " + S + " = undefined;"), W) {
9104
- if (Q ? r += " " + S + " = " + S + " || Object.keys(" + h + "); for (var " + v + "=0; " + v + "<" + S + ".length; " + v + "++) { var " + E + " = " + S + "[" + v + "]; " : r += " for (var " + E + " in " + h + ") { ", B) {
9163
+ if (Q ? r += " " + S + " = " + S + " || Object.keys(" + h + "); for (var " + v + "=0; " + v + "<" + S + ".length; " + v + "++) { var " + E + " = " + S + "[" + v + "]; " : r += " for (var " + E + " in " + h + ") { ", L) {
9105
9164
  if (r += " var isAdditional" + s + " = !(false ", _.length)
9106
9165
  if (_.length > 8)
9107
9166
  r += " || validate.schema" + l + ".hasOwnProperty(" + E + ") ";
@@ -9122,7 +9181,7 @@ function Eu() {
9122
9181
  if (U == "all")
9123
9182
  r += " delete " + h + "[" + E + "]; ";
9124
9183
  else {
9125
- var L = e.errorPath, H = "' + " + E + " + '";
9184
+ var B = e.errorPath, H = "' + " + E + " + '";
9126
9185
  if (e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(e.errorPath, E, e.opts.jsonPointers)), R)
9127
9186
  if (U)
9128
9187
  r += " delete " + h + "[" + E + "]; ";
@@ -9151,9 +9210,9 @@ function Eu() {
9151
9210
  var oe = e.validate(u);
9152
9211
  u.baseId = ee, e.util.varOccurences(oe, w) < 2 ? r += " " + e.util.varReplace(oe, w, X) + " " : r += " var " + w + " = " + X + "; " + oe + " ", f && (r += " if (!" + g + ") break; ");
9153
9212
  }
9154
- e.errorPath = L;
9213
+ e.errorPath = B;
9155
9214
  }
9156
- B && (r += " } "), r += " } ", f && (r += " if (" + g + ") { ", m += "}");
9215
+ L && (r += " } "), r += " } ", f && (r += " if (" + g + ") { ", m += "}");
9157
9216
  }
9158
9217
  var Pe = e.opts.useDefaults && !e.compositeRule;
9159
9218
  if (_.length) {
@@ -9176,14 +9235,14 @@ function Eu() {
9176
9235
  if (V)
9177
9236
  r += " " + oe + " ";
9178
9237
  else {
9179
- if (Z && Z[ae]) {
9238
+ if (Y && Y[ae]) {
9180
9239
  r += " if ( " + J + " === undefined ", Q && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(ae) + "') "), r += ") { " + g + " = false; ";
9181
- var L = e.errorPath, se = c, fe = e.util.escapeQuotes(ae);
9182
- e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(L, ae, e.opts.jsonPointers)), c = e.errSchemaPath + "/required";
9240
+ var B = e.errorPath, se = c, fe = e.util.escapeQuotes(ae);
9241
+ e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(B, ae, e.opts.jsonPointers)), c = e.errSchemaPath + "/required";
9183
9242
  var z = z || [];
9184
9243
  z.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + fe + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + fe + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
9185
9244
  var K = r;
9186
- r = z.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + K + "]); " : r += " validate.errors = [" + K + "]; return false; " : r += " var err = " + K + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", c = se, e.errorPath = L, r += " } else { ";
9245
+ r = z.pop(), !e.compositeRule && f ? e.async ? r += " throw new ValidationError([" + K + "]); " : r += " validate.errors = [" + K + "]; return false; " : r += " var err = " + K + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", c = se, e.errorPath = B, r += " } else { ";
9187
9246
  } else
9188
9247
  f ? (r += " if ( " + J + " === undefined ", Q && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(ae) + "') "), r += ") { " + g + " = true; } else { ") : (r += " if (" + J + " !== undefined ", Q && (r += " && Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(ae) + "') "), r += " ) { ");
9189
9248
  r += " " + oe + " } ";
@@ -9220,10 +9279,10 @@ function Su() {
9220
9279
  u.schema = n, u.schemaPath = l, u.errSchemaPath = c;
9221
9280
  var E = "key" + s, v = "idx" + s, P = "i" + s, w = "' + " + E + " + '", S = u.dataLevel = e.dataLevel + 1, _ = "data" + S, T = "dataProperties" + s, M = e.opts.ownProperties, A = e.baseId;
9222
9281
  M && (r += " var " + T + " = undefined; "), M ? r += " " + T + " = " + T + " || Object.keys(" + h + "); for (var " + v + "=0; " + v + "<" + T + ".length; " + v + "++) { var " + E + " = " + T + "[" + v + "]; " : r += " for (var " + E + " in " + h + ") { ", r += " var startErrs" + s + " = errors; ";
9223
- var B = E, R = e.compositeRule;
9282
+ var L = E, R = e.compositeRule;
9224
9283
  e.compositeRule = u.compositeRule = !0;
9225
9284
  var F = e.validate(u);
9226
- u.baseId = A, e.util.varOccurences(F, _) < 2 ? r += " " + e.util.varReplace(F, _, B) + " " : r += " var " + _ + " = " + B + "; " + F + " ", e.compositeRule = u.compositeRule = R, r += " if (!" + g + ") { for (var " + P + "=startErrs" + s + "; " + P + "<errors; " + P + "++) { vErrors[" + P + "].propertyName = " + E + "; } var err = ", e.createErrors !== !1 ? (r += " { keyword: 'propertyNames' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { propertyName: '" + w + "' } ", e.opts.messages !== !1 && (r += " , message: 'property name \\'" + w + "\\' is invalid' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !e.compositeRule && f && (e.async ? r += " throw new ValidationError(vErrors); " : r += " validate.errors = vErrors; return false; "), f && (r += " break; "), r += " } }";
9285
+ u.baseId = A, e.util.varOccurences(F, _) < 2 ? r += " " + e.util.varReplace(F, _, L) + " " : r += " var " + _ + " = " + L + "; " + F + " ", e.compositeRule = u.compositeRule = R, r += " if (!" + g + ") { for (var " + P + "=startErrs" + s + "; " + P + "<errors; " + P + "++) { vErrors[" + P + "].propertyName = " + E + "; } var err = ", e.createErrors !== !1 ? (r += " { keyword: 'propertyNames' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { propertyName: '" + w + "' } ", e.opts.messages !== !1 && (r += " , message: 'property name \\'" + w + "\\' is invalid' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ", !e.compositeRule && f && (e.async ? r += " throw new ValidationError(vErrors); " : r += " validate.errors = vErrors; return false; "), f && (r += " break; "), r += " } }";
9227
9286
  }
9228
9287
  return f && (r += " " + m + " if (" + d + " == errors) {"), r;
9229
9288
  }), xa;
@@ -9250,8 +9309,8 @@ function Pu() {
9250
9309
  if (f)
9251
9310
  if (r += " var missing" + s + "; ", T) {
9252
9311
  u || (r += " var " + m + " = validate.schema" + l + "; ");
9253
- var A = "i" + s, B = "schema" + s + "[" + A + "]", R = "' + " + B + " + '";
9254
- e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(_, B, e.opts.jsonPointers)), r += " var " + d + " = true; ", u && (r += " if (schema" + s + " === undefined) " + d + " = true; else if (!Array.isArray(schema" + s + ")) " + d + " = false; else {"), r += " for (var " + A + " = 0; " + A + " < " + m + ".length; " + A + "++) { " + d + " = " + h + "[" + m + "[" + A + "]] !== undefined ", M && (r += " && Object.prototype.hasOwnProperty.call(" + h + ", " + m + "[" + A + "]) "), r += "; if (!" + d + ") break; } ", u && (r += " } "), r += " if (!" + d + ") { ";
9312
+ var A = "i" + s, L = "schema" + s + "[" + A + "]", R = "' + " + L + " + '";
9313
+ e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(_, L, e.opts.jsonPointers)), r += " var " + d + " = true; ", u && (r += " if (schema" + s + " === undefined) " + d + " = true; else if (!Array.isArray(schema" + s + ")) " + d + " = false; else {"), r += " for (var " + A + " = 0; " + A + " < " + m + ".length; " + A + "++) { " + d + " = " + h + "[" + m + "[" + A + "]] !== undefined ", M && (r += " && Object.prototype.hasOwnProperty.call(" + h + ", " + m + "[" + A + "]) "), r += "; if (!" + d + ") break; } ", u && (r += " } "), r += " if (!" + d + ") { ";
9255
9314
  var F = F || [];
9256
9315
  F.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
9257
9316
  var U = r;
@@ -9262,12 +9321,12 @@ function Pu() {
9262
9321
  if (W)
9263
9322
  for (var Q, A = -1, ee = W.length - 1; A < ee; ) {
9264
9323
  Q = W[A += 1], A && (r += " || ");
9265
- var le = e.util.getProperty(Q), Z = h + le;
9266
- r += " ( ( " + Z + " === undefined ", M && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(Q) + "') "), r += ") && (missing" + s + " = " + e.util.toQuotedString(e.opts.jsonPointers ? Q : le) + ") ) ";
9324
+ var le = e.util.getProperty(Q), Y = h + le;
9325
+ r += " ( ( " + Y + " === undefined ", M && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(Q) + "') "), r += ") && (missing" + s + " = " + e.util.toQuotedString(e.opts.jsonPointers ? Q : le) + ") ) ";
9267
9326
  }
9268
9327
  r += ") { ";
9269
- var B = "missing" + s, R = "' + " + B + " + '";
9270
- e.opts._errorDataPathProperty && (e.errorPath = e.opts.jsonPointers ? e.util.getPathExpr(_, B, !0) : _ + " + " + B);
9328
+ var L = "missing" + s, R = "' + " + L + " + '";
9329
+ e.opts._errorDataPathProperty && (e.errorPath = e.opts.jsonPointers ? e.util.getPathExpr(_, L, !0) : _ + " + " + L);
9271
9330
  var F = F || [];
9272
9331
  F.push(r), r = "", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ";
9273
9332
  var U = r;
@@ -9275,15 +9334,15 @@ function Pu() {
9275
9334
  }
9276
9335
  else if (T) {
9277
9336
  u || (r += " var " + m + " = validate.schema" + l + "; ");
9278
- var A = "i" + s, B = "schema" + s + "[" + A + "]", R = "' + " + B + " + '";
9279
- e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(_, B, e.opts.jsonPointers)), u && (r += " if (" + m + " && !Array.isArray(" + m + ")) { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + m + " !== undefined) { "), r += " for (var " + A + " = 0; " + A + " < " + m + ".length; " + A + "++) { if (" + h + "[" + m + "[" + A + "]] === undefined ", M && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", " + m + "[" + A + "]) "), r += ") { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ", u && (r += " } ");
9337
+ var A = "i" + s, L = "schema" + s + "[" + A + "]", R = "' + " + L + " + '";
9338
+ e.opts._errorDataPathProperty && (e.errorPath = e.util.getPathExpr(_, L, e.opts.jsonPointers)), u && (r += " if (" + m + " && !Array.isArray(" + m + ")) { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + m + " !== undefined) { "), r += " for (var " + A + " = 0; " + A + " < " + m + ".length; " + A + "++) { if (" + h + "[" + m + "[" + A + "]] === undefined ", M && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", " + m + "[" + A + "]) "), r += ") { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ", u && (r += " } ");
9280
9339
  } else {
9281
9340
  var me = g;
9282
9341
  if (me)
9283
9342
  for (var Q, te = -1, ae = me.length - 1; te < ae; ) {
9284
9343
  Q = me[te += 1];
9285
- var le = e.util.getProperty(Q), R = e.util.escapeQuotes(Q), Z = h + le;
9286
- e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(_, Q, e.opts.jsonPointers)), r += " if ( " + Z + " === undefined ", M && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(Q) + "') "), r += ") { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ";
9344
+ var le = e.util.getProperty(Q), R = e.util.escapeQuotes(Q), Y = h + le;
9345
+ e.opts._errorDataPathProperty && (e.errorPath = e.util.getPath(_, Q, e.opts.jsonPointers)), r += " if ( " + Y + " === undefined ", M && (r += " || ! Object.prototype.hasOwnProperty.call(" + h + ", '" + e.util.escapeQuotes(Q) + "') "), r += ") { var err = ", e.createErrors !== !1 ? (r += " { keyword: 'required' , dataPath: (dataPath || '') + " + e.errorPath + " , schemaPath: " + e.util.toQuotedString(c) + " , params: { missingProperty: '" + R + "' } ", e.opts.messages !== !1 && (r += " , message: '", e.opts._errorDataPathProperty ? r += "is a required property" : r += "should have required property \\'" + R + "\\'", r += "' "), e.opts.verbose && (r += " , schema: validate.schema" + l + " , parentSchema: validate.schema" + e.schemaPath + " , data: " + h + " "), r += " } ") : r += " {} ", r += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ";
9287
9346
  }
9288
9347
  }
9289
9348
  e.errorPath = _;
@@ -9335,8 +9394,8 @@ function xu() {
9335
9394
  minItems: Ws(),
9336
9395
  maxLength: Ks(),
9337
9396
  minLength: Ks(),
9338
- maxProperties: Zs(),
9339
- minProperties: Zs(),
9397
+ maxProperties: Ys(),
9398
+ minProperties: Ys(),
9340
9399
  multipleOf: vu(),
9341
9400
  not: yu(),
9342
9401
  oneOf: bu(),
@@ -9352,7 +9411,7 @@ var Ra, lo;
9352
9411
  function $u() {
9353
9412
  if (lo) return Ra;
9354
9413
  lo = 1;
9355
- var i = xu(), e = Yr().toHash;
9414
+ var i = xu(), e = Zr().toHash;
9356
9415
  return Ra = function() {
9357
9416
  var a = [
9358
9417
  {
@@ -9530,16 +9589,16 @@ function Ru() {
9530
9589
  return fo || (fo = 1, Da = function(e, t, a) {
9531
9590
  var r = " ", s = e.level, o = e.dataLevel, n = e.schema[t], l = e.schemaPath + e.util.getProperty(t), c = e.errSchemaPath + "/" + t, f = !e.opts.allErrors, h, d = "data" + (o || ""), u = "valid" + s, m = "errs__" + s, g = e.opts.$data && n && n.$data, E;
9532
9591
  g ? (r += " var schema" + s + " = " + e.util.getData(n.$data, o, e.dataPathArr) + "; ", E = "schema" + s) : E = n;
9533
- var v = this, P = "definition" + s, w = v.definition, S = "", _, T, M, A, B;
9592
+ var v = this, P = "definition" + s, w = v.definition, S = "", _, T, M, A, L;
9534
9593
  if (g && w.$data) {
9535
- B = "keywordValidate" + s;
9594
+ L = "keywordValidate" + s;
9536
9595
  var R = w.validateSchema;
9537
- r += " var " + P + " = RULES.custom['" + t + "'].definition; var " + B + " = " + P + ".validate;";
9596
+ r += " var " + P + " = RULES.custom['" + t + "'].definition; var " + L + " = " + P + ".validate;";
9538
9597
  } else {
9539
9598
  if (A = e.useCustomRule(v, n, e.schema, e), !A) return;
9540
- E = "validate.schema" + l, B = A.code, _ = w.compile, T = w.inline, M = w.macro;
9599
+ E = "validate.schema" + l, L = A.code, _ = w.compile, T = w.inline, M = w.macro;
9541
9600
  }
9542
- var F = B + ".errors", U = "i" + s, W = "ruleErr" + s, Q = w.async;
9601
+ var F = L + ".errors", U = "i" + s, W = "ruleErr" + s, Q = w.async;
9543
9602
  if (Q && !e.async) throw new Error("async keyword in sync schema");
9544
9603
  if (T || M || (r += "" + F + " = null;"), r += "var " + m + " = errors;var " + u + ";", g && w.$data && (S += "}", r += " if (" + E + " === undefined) { " + u + " = true; } else { ", R && (S += "}", r += " " + u + " = " + P + ".validateSchema(" + E + "); if (" + u + ") { ")), T)
9545
9604
  w.statements ? r += " " + A.validate + " " : r += " " + u + " = " + A.validate + "; ";
@@ -9548,13 +9607,13 @@ function Ru() {
9548
9607
  ee.level++;
9549
9608
  var le = "valid" + ee.level;
9550
9609
  ee.schema = A.validate, ee.schemaPath = "";
9551
- var Z = e.compositeRule;
9610
+ var Y = e.compositeRule;
9552
9611
  e.compositeRule = ee.compositeRule = !0;
9553
- var me = e.validate(ee).replace(/validate\.schema/g, B);
9554
- e.compositeRule = ee.compositeRule = Z, r += " " + me;
9612
+ var me = e.validate(ee).replace(/validate\.schema/g, L);
9613
+ e.compositeRule = ee.compositeRule = Y, r += " " + me;
9555
9614
  } else {
9556
9615
  var te = te || [];
9557
- te.push(r), r = "", r += " " + B + ".call( ", e.opts.passContext ? r += "this" : r += "self", _ || w.schema === !1 ? r += " , " + d + " " : r += " , " + E + " , " + d + " , validate.schema" + e.schemaPath + " ", r += " , (dataPath || '')", e.errorPath != '""' && (r += " + " + e.errorPath);
9616
+ te.push(r), r = "", r += " " + L + ".call( ", e.opts.passContext ? r += "this" : r += "self", _ || w.schema === !1 ? r += " , " + d + " " : r += " , " + E + " , " + d + " , validate.schema" + e.schemaPath + " ", r += " , (dataPath || '')", e.errorPath != '""' && (r += " + " + e.errorPath);
9558
9617
  var ae = o ? "data" + (o - 1 || "") : "parentData", ne = o ? e.dataPathArr[o] : "parentDataProperty";
9559
9618
  r += " , " + ae + " , " + ne + " , rootData ) ";
9560
9619
  var ce = r;
@@ -9716,8 +9775,8 @@ var Oa, mo;
9716
9775
  function Gu() {
9717
9776
  if (mo) return Oa;
9718
9777
  mo = 1;
9719
- var i = au(), e = kn(), t = nu(), a = Ni(), r = ji(), s = su(), o = $u(), n = Cu(), l = Yr();
9720
- Oa = m, m.prototype.validate = g, m.prototype.compile = E, m.prototype.addSchema = v, m.prototype.addMetaSchema = P, m.prototype.validateSchema = w, m.prototype.getSchema = _, m.prototype.removeSchema = A, m.prototype.addFormat = Z, m.prototype.errorsText = le, m.prototype._addSchema = R, m.prototype._compile = F, m.prototype.compileAsync = Tu();
9778
+ var i = au(), e = kn(), t = nu(), a = Ni(), r = ji(), s = su(), o = $u(), n = Cu(), l = Zr();
9779
+ Oa = m, m.prototype.validate = g, m.prototype.compile = E, m.prototype.addSchema = v, m.prototype.addMetaSchema = P, m.prototype.validateSchema = w, m.prototype.getSchema = _, m.prototype.removeSchema = A, m.prototype.addFormat = Y, m.prototype.errorsText = le, m.prototype._addSchema = R, m.prototype._compile = F, m.prototype.compileAsync = Tu();
9721
9780
  var c = ju();
9722
9781
  m.prototype.addKeyword = c.add, m.prototype.getKeyword = c.get, m.prototype.removeKeyword = c.remove, m.prototype.validateKeyword = c.validate;
9723
9782
  var f = Un();
@@ -9727,7 +9786,7 @@ function Gu() {
9727
9786
  if (!(this instanceof m)) return new m(N);
9728
9787
  N = this._opts = l.copy(N) || {}, we(this), this._schemas = {}, this._refs = {}, this._fragments = {}, this._formats = s(N.format), this._cache = N.cache || new t(), this._loadingSchemas = {}, this._compilations = [], this.RULES = o(), this._getId = U(N), N.loopRequired = N.loopRequired || 1 / 0, N.errorDataPath == "property" && (N._errorDataPathProperty = !0), N.serialize === void 0 && (N.serialize = r), this._metaOpts = pe(this), N.formats && ae(this), N.keywords && ne(this), me(this), typeof N.meta == "object" && this.addMetaSchema(N.meta), N.nullable && this.addKeyword("nullable", { metaSchema: { type: "boolean" } }), te(this);
9729
9788
  }
9730
- function g(N, L) {
9789
+ function g(N, B) {
9731
9790
  var H;
9732
9791
  if (typeof N == "string") {
9733
9792
  if (H = this.getSchema(N), !H) throw new Error('no schema with key or ref "' + N + '"');
@@ -9735,14 +9794,14 @@ function Gu() {
9735
9794
  var se = this._addSchema(N);
9736
9795
  H = se.validate || this._compile(se);
9737
9796
  }
9738
- var z = H(L);
9797
+ var z = H(B);
9739
9798
  return H.$async !== !0 && (this.errors = H.errors), z;
9740
9799
  }
9741
- function E(N, L) {
9742
- var H = this._addSchema(N, void 0, L);
9800
+ function E(N, B) {
9801
+ var H = this._addSchema(N, void 0, B);
9743
9802
  return H.validate || this._compile(H);
9744
9803
  }
9745
- function v(N, L, H, se) {
9804
+ function v(N, B, H, se) {
9746
9805
  if (Array.isArray(N)) {
9747
9806
  for (var z = 0; z < N.length; z++) this.addSchema(N[z], void 0, H, se);
9748
9807
  return this;
@@ -9750,19 +9809,19 @@ function Gu() {
9750
9809
  var K = this._getId(N);
9751
9810
  if (K !== void 0 && typeof K != "string")
9752
9811
  throw new Error("schema id must be string");
9753
- return L = e.normalizeId(L || K), ce(this, L), this._schemas[L] = this._addSchema(N, H, se, !0), this;
9812
+ return B = e.normalizeId(B || K), ce(this, B), this._schemas[B] = this._addSchema(N, H, se, !0), this;
9754
9813
  }
9755
- function P(N, L, H) {
9756
- return this.addSchema(N, L, H, !0), this;
9814
+ function P(N, B, H) {
9815
+ return this.addSchema(N, B, H, !0), this;
9757
9816
  }
9758
- function w(N, L) {
9817
+ function w(N, B) {
9759
9818
  var H = N.$schema;
9760
9819
  if (H !== void 0 && typeof H != "string")
9761
9820
  throw new Error("$schema must be a string");
9762
9821
  if (H = H || this._opts.defaultMeta || S(this), !H)
9763
9822
  return this.logger.warn("meta-schema not available"), this.errors = null, !0;
9764
9823
  var se = this.validate(H, N);
9765
- if (!se && L) {
9824
+ if (!se && B) {
9766
9825
  var z = "schema is invalid: " + this.errorsText();
9767
9826
  if (this._opts.validateSchema == "log") this.logger.error(z);
9768
9827
  else throw new Error(z);
@@ -9770,26 +9829,26 @@ function Gu() {
9770
9829
  return se;
9771
9830
  }
9772
9831
  function S(N) {
9773
- var L = N._opts.meta;
9774
- return N._opts.defaultMeta = typeof L == "object" ? N._getId(L) || L : N.getSchema(h) ? h : void 0, N._opts.defaultMeta;
9832
+ var B = N._opts.meta;
9833
+ return N._opts.defaultMeta = typeof B == "object" ? N._getId(B) || B : N.getSchema(h) ? h : void 0, N._opts.defaultMeta;
9775
9834
  }
9776
9835
  function _(N) {
9777
- var L = M(this, N);
9778
- switch (typeof L) {
9836
+ var B = M(this, N);
9837
+ switch (typeof B) {
9779
9838
  case "object":
9780
- return L.validate || this._compile(L);
9839
+ return B.validate || this._compile(B);
9781
9840
  case "string":
9782
- return this.getSchema(L);
9841
+ return this.getSchema(B);
9783
9842
  case "undefined":
9784
9843
  return T(this, N);
9785
9844
  }
9786
9845
  }
9787
- function T(N, L) {
9788
- var H = e.schema.call(N, { schema: {} }, L);
9846
+ function T(N, B) {
9847
+ var H = e.schema.call(N, { schema: {} }, B);
9789
9848
  if (H) {
9790
9849
  var se = H.schema, z = H.root, K = H.baseId, ie = i.call(N, se, z, void 0, K);
9791
- return N._fragments[L] = new a({
9792
- ref: L,
9850
+ return N._fragments[B] = new a({
9851
+ ref: B,
9793
9852
  fragment: !0,
9794
9853
  schema: se,
9795
9854
  root: z,
@@ -9798,18 +9857,18 @@ function Gu() {
9798
9857
  }), ie;
9799
9858
  }
9800
9859
  }
9801
- function M(N, L) {
9802
- return L = e.normalizeId(L), N._schemas[L] || N._refs[L] || N._fragments[L];
9860
+ function M(N, B) {
9861
+ return B = e.normalizeId(B), N._schemas[B] || N._refs[B] || N._fragments[B];
9803
9862
  }
9804
9863
  function A(N) {
9805
9864
  if (N instanceof RegExp)
9806
- return B(this, this._schemas, N), B(this, this._refs, N), this;
9865
+ return L(this, this._schemas, N), L(this, this._refs, N), this;
9807
9866
  switch (typeof N) {
9808
9867
  case "undefined":
9809
- return B(this, this._schemas), B(this, this._refs), this._cache.clear(), this;
9868
+ return L(this, this._schemas), L(this, this._refs), this._cache.clear(), this;
9810
9869
  case "string":
9811
- var L = M(this, N);
9812
- return L && this._cache.del(L.cacheKey), delete this._schemas[N], delete this._refs[N], this;
9870
+ var B = M(this, N);
9871
+ return B && this._cache.del(B.cacheKey), delete this._schemas[N], delete this._refs[N], this;
9813
9872
  case "object":
9814
9873
  var H = this._opts.serialize, se = H ? H(N) : N;
9815
9874
  this._cache.del(se);
@@ -9818,13 +9877,13 @@ function Gu() {
9818
9877
  }
9819
9878
  return this;
9820
9879
  }
9821
- function B(N, L, H) {
9822
- for (var se in L) {
9823
- var z = L[se];
9824
- !z.meta && (!H || H.test(se)) && (N._cache.del(z.cacheKey), delete L[se]);
9880
+ function L(N, B, H) {
9881
+ for (var se in B) {
9882
+ var z = B[se];
9883
+ !z.meta && (!H || H.test(se)) && (N._cache.del(z.cacheKey), delete B[se]);
9825
9884
  }
9826
9885
  }
9827
- function R(N, L, H, se) {
9886
+ function R(N, B, H, se) {
9828
9887
  if (typeof N != "object" && typeof N != "boolean")
9829
9888
  throw new Error("schema should be object or boolean");
9830
9889
  var z = this._opts.serialize, K = z ? z(N) : N, ie = this._cache.get(K);
@@ -9832,7 +9891,7 @@ function Gu() {
9832
9891
  se = se || this._opts.addUsedSchema !== !1;
9833
9892
  var X = e.normalizeId(this._getId(N));
9834
9893
  X && se && ce(this, X);
9835
- var oe = this._opts.validateSchema !== !1 && !L, Pe;
9894
+ var oe = this._opts.validateSchema !== !1 && !B, Pe;
9836
9895
  oe && !(Pe = X && X == e.normalizeId(N.$schema)) && this.validateSchema(N, !0);
9837
9896
  var x = e.ids.call(this, N), p = new a({
9838
9897
  id: X,
@@ -9843,15 +9902,15 @@ function Gu() {
9843
9902
  });
9844
9903
  return X[0] != "#" && se && (this._refs[X] = p), this._cache.put(K, p), oe && Pe && this.validateSchema(N, !0), p;
9845
9904
  }
9846
- function F(N, L) {
9905
+ function F(N, B) {
9847
9906
  if (N.compiling)
9848
- return N.validate = z, z.schema = N.schema, z.errors = null, z.root = L || z, N.schema.$async === !0 && (z.$async = !0), z;
9907
+ return N.validate = z, z.schema = N.schema, z.errors = null, z.root = B || z, N.schema.$async === !0 && (z.$async = !0), z;
9849
9908
  N.compiling = !0;
9850
9909
  var H;
9851
9910
  N.meta && (H = this._opts, this._opts = this._metaOpts);
9852
9911
  var se;
9853
9912
  try {
9854
- se = i.call(this, N.schema, L, N.localRefs);
9913
+ se = i.call(this, N.schema, B, N.localRefs);
9855
9914
  } catch (K) {
9856
9915
  throw delete N.validate, K;
9857
9916
  } finally {
@@ -9884,60 +9943,60 @@ function Gu() {
9884
9943
  throw new Error("schema $id is different from id");
9885
9944
  return N.$id || N.id;
9886
9945
  }
9887
- function le(N, L) {
9946
+ function le(N, B) {
9888
9947
  if (N = N || this.errors, !N) return "No errors";
9889
- L = L || {};
9890
- for (var H = L.separator === void 0 ? ", " : L.separator, se = L.dataVar === void 0 ? "data" : L.dataVar, z = "", K = 0; K < N.length; K++) {
9948
+ B = B || {};
9949
+ for (var H = B.separator === void 0 ? ", " : B.separator, se = B.dataVar === void 0 ? "data" : B.dataVar, z = "", K = 0; K < N.length; K++) {
9891
9950
  var ie = N[K];
9892
9951
  ie && (z += se + ie.dataPath + " " + ie.message + H);
9893
9952
  }
9894
9953
  return z.slice(0, -H.length);
9895
9954
  }
9896
- function Z(N, L) {
9897
- return typeof L == "string" && (L = new RegExp(L)), this._formats[N] = L, this;
9955
+ function Y(N, B) {
9956
+ return typeof B == "string" && (B = new RegExp(B)), this._formats[N] = B, this;
9898
9957
  }
9899
9958
  function me(N) {
9900
- var L;
9901
- if (N._opts.$data && (L = Vu, N.addMetaSchema(L, L.$id, !0)), N._opts.meta !== !1) {
9959
+ var B;
9960
+ if (N._opts.$data && (B = Vu, N.addMetaSchema(B, B.$id, !0)), N._opts.meta !== !1) {
9902
9961
  var H = Bi;
9903
9962
  N._opts.$data && (H = n(H, u)), N.addMetaSchema(H, h, !0), N._refs["http://json-schema.org/schema"] = h;
9904
9963
  }
9905
9964
  }
9906
9965
  function te(N) {
9907
- var L = N._opts.schemas;
9908
- if (L)
9909
- if (Array.isArray(L)) N.addSchema(L);
9910
- else for (var H in L) N.addSchema(L[H], H);
9966
+ var B = N._opts.schemas;
9967
+ if (B)
9968
+ if (Array.isArray(B)) N.addSchema(B);
9969
+ else for (var H in B) N.addSchema(B[H], H);
9911
9970
  }
9912
9971
  function ae(N) {
9913
- for (var L in N._opts.formats) {
9914
- var H = N._opts.formats[L];
9915
- N.addFormat(L, H);
9972
+ for (var B in N._opts.formats) {
9973
+ var H = N._opts.formats[B];
9974
+ N.addFormat(B, H);
9916
9975
  }
9917
9976
  }
9918
9977
  function ne(N) {
9919
- for (var L in N._opts.keywords) {
9920
- var H = N._opts.keywords[L];
9921
- N.addKeyword(L, H);
9978
+ for (var B in N._opts.keywords) {
9979
+ var H = N._opts.keywords[B];
9980
+ N.addKeyword(B, H);
9922
9981
  }
9923
9982
  }
9924
- function ce(N, L) {
9925
- if (N._schemas[L] || N._refs[L])
9926
- throw new Error('schema with key or id "' + L + '" already exists');
9983
+ function ce(N, B) {
9984
+ if (N._schemas[B] || N._refs[B])
9985
+ throw new Error('schema with key or id "' + B + '" already exists');
9927
9986
  }
9928
9987
  function pe(N) {
9929
- for (var L = l.copy(N._opts), H = 0; H < d.length; H++)
9930
- delete L[d[H]];
9931
- return L;
9988
+ for (var B = l.copy(N._opts), H = 0; H < d.length; H++)
9989
+ delete B[d[H]];
9990
+ return B;
9932
9991
  }
9933
9992
  function we(N) {
9934
- var L = N._opts.logger;
9935
- if (L === !1)
9993
+ var B = N._opts.logger;
9994
+ if (B === !1)
9936
9995
  N.logger = { log: Ce, warn: Ce, error: Ce };
9937
9996
  else {
9938
- if (L === void 0 && (L = console), !(typeof L == "object" && L.log && L.warn && L.error))
9997
+ if (B === void 0 && (B = console), !(typeof B == "object" && B.log && B.warn && B.error))
9939
9998
  throw new Error("logger must implement log, warn and error methods");
9940
- N.logger = L;
9999
+ N.logger = B;
9941
10000
  }
9942
10001
  }
9943
10002
  function Ce() {
@@ -9965,7 +10024,7 @@ class Qu extends Kc {
9965
10024
  registerCapabilities(e) {
9966
10025
  if (this.transport)
9967
10026
  throw new Error("Cannot register capabilities after connecting to transport");
9968
- this._capabilities = Yc(this._capabilities, e);
10027
+ this._capabilities = Zc(this._capabilities, e);
9969
10028
  }
9970
10029
  assertCapabilityForMethod(e) {
9971
10030
  var t, a, r;
@@ -10398,7 +10457,7 @@ class Rr {
10398
10457
  return o;
10399
10458
  }
10400
10459
  }
10401
- class Yu {
10460
+ class Zu {
10402
10461
  constructor(e, t) {
10403
10462
  this._registeredResources = {}, this._registeredResourceTemplates = {}, this._registeredTools = {}, this._registeredPrompts = {}, this._toolHandlersInitialized = !1, this._completionHandlerInitialized = !1, this._resourceHandlersInitialized = !1, this._promptHandlersInitialized = !1, this.server = new Qu(e, t);
10404
10463
  }
@@ -10765,7 +10824,7 @@ class Yu {
10765
10824
  this.isConnected() && this.server.sendPromptListChanged();
10766
10825
  }
10767
10826
  }
10768
- class Zu {
10827
+ class Yu {
10769
10828
  constructor(e, t) {
10770
10829
  this._callbacks = t, this._uriTemplate = typeof e == "string" ? new Rr(e) : e;
10771
10830
  }
@@ -10836,8 +10895,8 @@ const zr = {
10836
10895
  }
10837
10896
  }, ef = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10838
10897
  __proto__: null,
10839
- McpServer: Yu,
10840
- ResourceTemplate: Zu
10898
+ McpServer: Zu,
10899
+ ResourceTemplate: Yu
10841
10900
  }, Symbol.toStringTag, { value: "Module" }));
10842
10901
  class rf {
10843
10902
  constructor(e, t, a, r) {
@@ -11714,7 +11773,7 @@ function qi() {
11714
11773
  case "utf-8":
11715
11774
  return Q(this, p, y);
11716
11775
  case "ascii":
11717
- return Z(this, p, y);
11776
+ return Y(this, p, y);
11718
11777
  case "latin1":
11719
11778
  case "binary":
11720
11779
  return me(this, p, y);
@@ -11807,8 +11866,8 @@ function qi() {
11807
11866
  return -1;
11808
11867
  V = 2, J /= 2, fe /= 2, y /= 2;
11809
11868
  }
11810
- function ve(Ze, xr) {
11811
- return V === 1 ? Ze[xr] : Ze.readUInt16BE(xr * V);
11869
+ function ve(Ye, xr) {
11870
+ return V === 1 ? Ye[xr] : Ye.readUInt16BE(xr * V);
11812
11871
  }
11813
11872
  var _e;
11814
11873
  if (j) {
@@ -11849,7 +11908,7 @@ function qi() {
11849
11908
  }
11850
11909
  return J;
11851
11910
  }
11852
- function B(x, p, y, $) {
11911
+ function L(x, p, y, $) {
11853
11912
  return ie(H(p, x.length - y), x, y, $);
11854
11913
  }
11855
11914
  function R(x, p, y, $) {
@@ -11882,7 +11941,7 @@ function qi() {
11882
11941
  return A(this, p, y, $);
11883
11942
  case "utf8":
11884
11943
  case "utf-8":
11885
- return B(this, p, y, $);
11944
+ return L(this, p, y, $);
11886
11945
  case "ascii":
11887
11946
  case "latin1":
11888
11947
  case "binary":
@@ -11943,7 +12002,7 @@ function qi() {
11943
12002
  );
11944
12003
  return y;
11945
12004
  }
11946
- function Z(x, p, y) {
12005
+ function Y(x, p, y) {
11947
12006
  var $ = "";
11948
12007
  y = Math.min(x.length, y);
11949
12008
  for (var j = p; j < y; ++j)
@@ -12157,7 +12216,7 @@ function qi() {
12157
12216
  return this;
12158
12217
  };
12159
12218
  var N = /[^+/0-9A-Za-z-_]/g;
12160
- function L(x) {
12219
+ function B(x) {
12161
12220
  if (x = x.split("=")[0], x = x.trim().replace(N, ""), x.length < 2) return "";
12162
12221
  for (; x.length % 4 !== 0; )
12163
12222
  x = x + "=";
@@ -12224,7 +12283,7 @@ function qi() {
12224
12283
  return V;
12225
12284
  }
12226
12285
  function K(x) {
12227
- return e.toByteArray(L(x));
12286
+ return e.toByteArray(B(x));
12228
12287
  }
12229
12288
  function ie(x, p, y, $) {
12230
12289
  for (var j = 0; j < $ && !(j + y >= p.length || j >= x.length); ++j)
@@ -13058,9 +13117,9 @@ function Cf() {
13058
13117
  csmacintosh: "macintosh"
13059
13118
  }), Ka;
13060
13119
  }
13061
- var Ya, qo;
13120
+ var Za, qo;
13062
13121
  function Tf() {
13063
- return qo || (qo = 1, Ya = {
13122
+ return qo || (qo = 1, Za = {
13064
13123
  437: "cp437",
13065
13124
  737: "cp737",
13066
13125
  775: "cp775",
@@ -13512,14 +13571,14 @@ function Tf() {
13512
13571
  type: "_sbcs",
13513
13572
  chars: "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
13514
13573
  }
13515
- }), Ya;
13574
+ }), Za;
13516
13575
  }
13517
- var Za = {}, ko;
13576
+ var Ya = {}, ko;
13518
13577
  function Rf() {
13519
- if (ko) return Za;
13578
+ if (ko) return Ya;
13520
13579
  ko = 1;
13521
13580
  var i = Ar().Buffer;
13522
- Za._dbcs = l;
13581
+ Ya._dbcs = l;
13523
13582
  for (var e = -1, t = -2, a = -10, r = -1e3, s = new Array(256), o = -1, n = 0; n < 256; n++)
13524
13583
  s[n] = e;
13525
13584
  function l(d, u) {
@@ -13558,17 +13617,17 @@ function Rf() {
13558
13617
  }
13559
13618
  }
13560
13619
  this.defaultCharUnicode = u.defaultCharUnicode, this.encodeTable = [], this.encodeTableSeq = [];
13561
- var B = {};
13620
+ var L = {};
13562
13621
  if (d.encodeSkipVals)
13563
13622
  for (var g = 0; g < d.encodeSkipVals.length; g++) {
13564
13623
  var R = d.encodeSkipVals[g];
13565
13624
  if (typeof R == "number")
13566
- B[R] = !0;
13625
+ L[R] = !0;
13567
13626
  else
13568
13627
  for (var S = R.from; S <= R.to; S++)
13569
- B[S] = !0;
13628
+ L[S] = !0;
13570
13629
  }
13571
- if (this._fillEncodeTable(0, 0, B), d.encodeAdd)
13630
+ if (this._fillEncodeTable(0, 0, L), d.encodeAdd)
13572
13631
  for (var F in d.encodeAdd)
13573
13632
  Object.prototype.hasOwnProperty.call(d.encodeAdd, F) && this._setEncodeChar(F.charCodeAt(0), d.encodeAdd[F]);
13574
13633
  this.defCharSB = this.encodeTable[0][u.defaultCharSingleByte.charCodeAt(0)], this.defCharSB === e && (this.defCharSB = this.encodeTable[0]["?"]), this.defCharSB === e && (this.defCharSB = 63);
@@ -13723,8 +13782,8 @@ function Rf() {
13723
13782
  m = r - P;
13724
13783
  continue;
13725
13784
  } else if (P <= a) {
13726
- for (var A = this.decodeTableSeq[a - P], B = 0; B < A.length - 1; B++)
13727
- P = A[B], u[S++] = P & 255, u[S++] = P >> 8;
13785
+ for (var A = this.decodeTableSeq[a - P], L = 0; L < A.length - 1; L++)
13786
+ P = A[L], u[S++] = P & 255, u[S++] = P >> 8;
13728
13787
  P = A[A.length - 1];
13729
13788
  } else
13730
13789
  throw new Error("iconv-lite internal error: invalid decoding table value " + P + " at " + m + "/" + _);
@@ -13753,7 +13812,7 @@ function Rf() {
13753
13812
  }
13754
13813
  return m;
13755
13814
  }
13756
- return Za;
13815
+ return Ya;
13757
13816
  }
13758
13817
  const Mf = [
13759
13818
  [
@@ -15531,13 +15590,13 @@ function Uf() {
15531
15590
  encoding: u
15532
15591
  }), typeof u == "function" && (g = u, E = {}), g !== void 0 && typeof g != "function")
15533
15592
  throw new TypeError("argument callback must be a function");
15534
- if (!g && !Zc.Promise)
15593
+ if (!g && !Yc.Promise)
15535
15594
  throw new TypeError("argument callback is required");
15536
15595
  var v = E.encoding !== !0 ? E.encoding : "utf-8", P = e.parse(E.limit), w = E.length != null && !isNaN(E.length) ? parseInt(E.length, 10) : null;
15537
15596
  return g ? c(d, v, w, P, h(g)) : new Promise(function(_, T) {
15538
- c(d, v, w, P, function(A, B) {
15597
+ c(d, v, w, P, function(A, L) {
15539
15598
  if (A) return T(A);
15540
- _(B);
15599
+ _(L);
15541
15600
  });
15542
15601
  });
15543
15602
  }
@@ -15569,7 +15628,7 @@ function Uf() {
15569
15628
  return M(U);
15570
15629
  }
15571
15630
  var T = _ ? "" : [];
15572
- d.on("aborted", A), d.on("close", F), d.on("data", B), d.on("end", R), d.on("error", R), P = !1;
15631
+ d.on("aborted", A), d.on("close", F), d.on("data", L), d.on("end", R), d.on("error", R), P = !1;
15573
15632
  function M() {
15574
15633
  for (var U = new Array(arguments.length), W = 0; W < U.length; W++)
15575
15634
  U[W] = arguments[W];
@@ -15587,7 +15646,7 @@ function Uf() {
15587
15646
  type: "request.aborted"
15588
15647
  }));
15589
15648
  }
15590
- function B(U) {
15649
+ function L(U) {
15591
15650
  v || (S += U.length, g !== null && S > g ? M(t(413, "request entity too large", {
15592
15651
  limit: g,
15593
15652
  received: S,
@@ -15611,7 +15670,7 @@ function Uf() {
15611
15670
  }
15612
15671
  }
15613
15672
  function F() {
15614
- T = null, d.removeListener("aborted", A), d.removeListener("data", B), d.removeListener("end", R), d.removeListener("error", R), d.removeListener("close", F);
15673
+ T = null, d.removeListener("aborted", A), d.removeListener("data", L), d.removeListener("end", R), d.removeListener("error", R), d.removeListener("close", F);
15615
15674
  }
15616
15675
  }
15617
15676
  function f() {
@@ -16190,7 +16249,7 @@ class Kf {
16190
16249
  }
16191
16250
  }
16192
16251
  }
16193
- const Yf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16252
+ const Zf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16194
16253
  __proto__: null,
16195
16254
  StreamableHTTPServerTransport: Kf
16196
16255
  }, Symbol.toStringTag, { value: "Module" }));
@@ -16221,7 +16280,7 @@ const Yf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16221
16280
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16222
16281
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16223
16282
  */
16224
- function Zf(i, e) {
16283
+ function Yf(i, e) {
16225
16284
  let t = i.slice(0, e).split(/\r\n|\n|\r/g);
16226
16285
  return [t.length, t.pop().length + 1];
16227
16286
  }
@@ -16237,7 +16296,7 @@ function Xf(i, e, t) {
16237
16296
  }
16238
16297
  class be extends Error {
16239
16298
  constructor(t, a) {
16240
- const [r, s] = Zf(a.toml, a.ptr), o = Xf(a.toml, r, s);
16299
+ const [r, s] = Yf(a.toml, a.ptr), o = Xf(a.toml, r, s);
16241
16300
  super(`Invalid TOML document: ${t}
16242
16301
 
16243
16302
  ${o}`, a);
@@ -16304,7 +16363,7 @@ function _r(i, e, t, a) {
16304
16363
  e++;
16305
16364
  return a || r !== "#" ? e : _r(i, Hn(i, e), t);
16306
16365
  }
16307
- function Yo(i, e, t, a, r = !1) {
16366
+ function Zo(i, e, t, a, r = !1) {
16308
16367
  if (!a)
16309
16368
  return e = jt(i, e), e < 0 ? i.length : e;
16310
16369
  for (let s = e; s < i.length; s++) {
@@ -16449,7 +16508,7 @@ let it = Kr;
16449
16508
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
16450
16509
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16451
16510
  */
16452
- let rd = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, td = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, ad = /^[+-]?0[0-9_]/, nd = /^[0-9a-f]{4,8}$/i, Zo = {
16511
+ let rd = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, td = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, ad = /^[+-]?0[0-9_]/, nd = /^[0-9a-f]{4,8}$/i, Yo = {
16453
16512
  b: "\b",
16454
16513
  t: " ",
16455
16514
  n: `
@@ -16504,8 +16563,8 @@ function zi(i, e = 0, t = i.length) {
16504
16563
  ptr: s
16505
16564
  });
16506
16565
  e = _r(i, e);
16507
- } else if (c in Zo)
16508
- n += Zo[c];
16566
+ } else if (c in Yo)
16567
+ n += Yo[c];
16509
16568
  else
16510
16569
  throw new be("unrecognized escape sequence", {
16511
16570
  toml: i,
@@ -16611,7 +16670,7 @@ function zn(i, e, t, a, r) {
16611
16670
  });
16612
16671
  let s = i[e];
16613
16672
  if (s === "[" || s === "{") {
16614
- let [l, c] = s === "[" ? cd(i, e, a, r) : ld(i, e, a, r), f = t ? Yo(i, c, ",", t) : c;
16673
+ let [l, c] = s === "[" ? cd(i, e, a, r) : ld(i, e, a, r), f = t ? Zo(i, c, ",", t) : c;
16615
16674
  if (c - f && t === "}") {
16616
16675
  let h = jt(i, c, f);
16617
16676
  if (h > -1)
@@ -16637,7 +16696,7 @@ function zn(i, e, t, a, r) {
16637
16696
  }
16638
16697
  return [l, o];
16639
16698
  }
16640
- o = Yo(i, e, ",", t);
16699
+ o = Zo(i, e, ",", t);
16641
16700
  let n = od(i, e, o - +(i[o - 1] === ","), t === "]");
16642
16701
  if (!n[0])
16643
16702
  throw new be("incomplete key-value declaration: no value specified", {
@@ -17094,8 +17153,8 @@ export {
17094
17153
  qd as createMcpLogger,
17095
17154
  hn as createMcpSuccessResponse,
17096
17155
  Or as createOutputSchema,
17097
- Yl as createTomlPlugin,
17098
- Zl as createTomlPluginAsync,
17156
+ Zl as createTomlPlugin,
17157
+ Yl as createTomlPluginAsync,
17099
17158
  ec as createYamlPlugin,
17100
17159
  rc as createYamlPluginAsync,
17101
17160
  Rd as cwdRelative,