@typespec/html-program-viewer 0.83.0-dev.1 → 0.83.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.
@@ -11,7 +11,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
11
  var __getOwnPropNames = Object.getOwnPropertyNames;
12
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
13
13
  var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
14
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
14
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
15
15
  var __exportAll = (all, no_symbols) => {
16
16
  let target = {};
17
17
  for (var name in all) __defProp$1(target, name, {
@@ -934,6 +934,9 @@ function paramMessage(strings, ...keys) {
934
934
  return template;
935
935
  }
936
936
  var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
937
+ /**
938
+ * Scanner errors.
939
+ */
937
940
  "digit-expected": {
938
941
  severity: "error",
939
942
  messages: { default: "Digit expected." }
@@ -976,6 +979,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
976
979
  severity: "error",
977
980
  messages: { default: "Invalid character." }
978
981
  },
982
+ /**
983
+ * Utils
984
+ */
979
985
  "file-not-found": {
980
986
  severity: "error",
981
987
  messages: { default: paramMessage`File ${"path"} not found.` }
@@ -984,6 +990,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
984
990
  severity: "error",
985
991
  messages: { default: paramMessage`${"message"}` }
986
992
  },
993
+ /**
994
+ * Init templates
995
+ */
987
996
  "init-template-invalid-json": {
988
997
  severity: "error",
989
998
  messages: { default: paramMessage`Unable to parse ${"url"}: ${"message"}. Check that the template URL is correct.` }
@@ -992,6 +1001,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
992
1001
  severity: "error",
993
1002
  messages: { default: paramMessage`Failed to download template from ${"url"}: ${"message"}. Check that the template URL is correct.` }
994
1003
  },
1004
+ /**
1005
+ * Parser errors.
1006
+ */
995
1007
  "multiple-blockless-namespace": {
996
1008
  severity: "error",
997
1009
  messages: { default: "Cannot use multiple blockless namespaces." }
@@ -1092,6 +1104,10 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1092
1104
  severity: "error",
1093
1105
  messages: { default: "A rest parameter cannot be optional." }
1094
1106
  },
1107
+ /**
1108
+ * Parser doc comment warnings.
1109
+ * Design goal: Malformed doc comments should only produce warnings, not errors.
1110
+ */
1095
1111
  "doc-invalid-identifier": {
1096
1112
  severity: "warning",
1097
1113
  messages: {
@@ -1102,12 +1118,14 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1102
1118
  templateParam: "Invalid template parameter name."
1103
1119
  }
1104
1120
  },
1121
+ /**
1122
+ * Checker
1123
+ */
1105
1124
  "experimental-feature": {
1106
1125
  severity: "warning",
1107
1126
  messages: {
1108
1127
  default: paramMessage`${"feature"} is an experimental feature. It may change in the future or be removed. Use with caution and consider providing feedback on this feature.`,
1109
- functionDeclarations: "Function declarations are an experimental feature that may change in the future. Use with caution and consider providing feedback to the TypeSpec team.",
1110
- internal: `Internal symbols are experimental and may be changed in a future release. Use with caution. Suppress this message ('#suppress "experimental-feature"') to silence this warning.`
1128
+ functionDeclarations: "Function declarations are an experimental feature that may change in the future. Use with caution and consider providing feedback to the TypeSpec team."
1111
1129
  }
1112
1130
  },
1113
1131
  "using-invalid-ref": {
@@ -1365,6 +1383,12 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1365
1383
  severity: "error",
1366
1384
  messages: { default: "Extern declaration must have an implementation in JS file." }
1367
1385
  },
1386
+ "missing-extern-declaration": {
1387
+ severity: "error",
1388
+ description: "Report when a function is registered in $functions in a JS file but has no corresponding `extern fn` declaration in TypeSpec.",
1389
+ url: "https://typespec.io/docs/standard-library/diags/missing-extern-declaration",
1390
+ messages: { default: paramMessage`Function implementation "${"name"}" is exported in JS via $functions but has no corresponding 'extern fn' declaration in TypeSpec.` }
1391
+ },
1368
1392
  "overload-same-parent": {
1369
1393
  severity: "error",
1370
1394
  messages: { default: `Overload must be in the same interface or namespace.` }
@@ -1384,6 +1408,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1384
1408
  severity: "warning",
1385
1409
  messages: { default: "The #deprecated directive cannot be used more than once on the same declaration." }
1386
1410
  },
1411
+ /**
1412
+ * Configuration
1413
+ */
1387
1414
  "config-invalid-argument": {
1388
1415
  severity: "error",
1389
1416
  messages: { default: paramMessage`Argument "${"name"}" is not defined as a parameter in the config.` }
@@ -1408,6 +1435,25 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1408
1435
  severity: "error",
1409
1436
  messages: { default: paramMessage`No configuration file found at config path "${"path"}".` }
1410
1437
  },
1438
+ "config-project-kind-filename": {
1439
+ severity: "error",
1440
+ messages: { default: paramMessage`Config with \`kind: project\` must be named "tspconfig.yaml". Found in "${"filename"}".` }
1441
+ },
1442
+ "config-project-only-option": {
1443
+ severity: "error",
1444
+ messages: { default: paramMessage`Property "${"option"}" can only be used in a project config (with \`kind: project\`).` }
1445
+ },
1446
+ "config-unknown-feature": {
1447
+ severity: "error",
1448
+ messages: { default: paramMessage`Unknown compiler feature "${"feature"}".` }
1449
+ },
1450
+ "config-project-not-as-cli-config": {
1451
+ severity: "error",
1452
+ messages: { default: "`--config` cannot point to a project config (with `kind: project`). Use a non-project build config that `extends` the project config instead." }
1453
+ },
1454
+ /**
1455
+ * Program
1456
+ */
1411
1457
  "dynamic-import": {
1412
1458
  severity: "error",
1413
1459
  messages: { default: "Dynamically generated TypeSpec cannot have imports" }
@@ -1455,6 +1501,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1455
1501
  severity: "error",
1456
1502
  messages: { default: "Value interpolated in this string template cannot be converted to a string. Only literal types can be automatically interpolated." }
1457
1503
  },
1504
+ /**
1505
+ * Binder
1506
+ */
1458
1507
  "ambiguous-symbol": {
1459
1508
  severity: "error",
1460
1509
  messages: { default: paramMessage`"${"name"}" is an ambiguous name between ${"duplicateNames"}. Try using fully qualified name instead: ${"duplicateNames"}` }
@@ -1463,6 +1512,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1463
1512
  severity: "error",
1464
1513
  messages: { default: paramMessage`duplicate using of "${"usingName"}" namespace` }
1465
1514
  },
1515
+ /**
1516
+ * Library
1517
+ */
1466
1518
  "on-validate-fail": {
1467
1519
  severity: "error",
1468
1520
  messages: { default: paramMessage`onValidate failed with errors. ${"error"}` }
@@ -1479,6 +1531,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1479
1531
  severity: "error",
1480
1532
  messages: { default: paramMessage`Emitter '${"emitterName"}' requires '${"requiredImport"}' to be imported. Add 'import "${"requiredImport"}".` }
1481
1533
  },
1534
+ /**
1535
+ * Linter
1536
+ */
1482
1537
  "invalid-rule-ref": {
1483
1538
  severity: "error",
1484
1539
  messages: { default: paramMessage`Reference "${"ref"}" is not a valid reference to a rule or ruleset. It must be in the following format: "<library-name>:<rule-name>"` }
@@ -1499,10 +1554,16 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1499
1554
  severity: "error",
1500
1555
  messages: { default: paramMessage`Invalid options for rule "${"ruleName"}": ${"details"}` }
1501
1556
  },
1557
+ /**
1558
+ * Formatter
1559
+ */
1502
1560
  "format-failed": {
1503
1561
  severity: "error",
1504
1562
  messages: { default: paramMessage`File '${"file"}' failed to format. ${"details"}` }
1505
1563
  },
1564
+ /**
1565
+ * Decorator
1566
+ */
1506
1567
  "invalid-pattern-regex": {
1507
1568
  severity: "warning",
1508
1569
  messages: { default: "@pattern decorator expects a valid regular expression pattern." }
@@ -1619,6 +1680,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1619
1680
  severity: "error",
1620
1681
  messages: { default: paramMessage`Paged operation '${"operationName"}' return type must have a property annotated with @pageItems.` }
1621
1682
  },
1683
+ /**
1684
+ * Service
1685
+ */
1622
1686
  "service-decorator-duplicate": {
1623
1687
  severity: "error",
1624
1688
  messages: { default: `@service can only be set once per TypeSpec document.` }
@@ -1631,6 +1695,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1631
1695
  severity: "error",
1632
1696
  messages: { default: paramMessage`Range "${"start"}..${"end"}" is invalid.` }
1633
1697
  },
1698
+ /**
1699
+ * Mutator
1700
+ */
1634
1701
  "add-response": {
1635
1702
  severity: "error",
1636
1703
  messages: { default: "Cannot add a response to anything except an operation statement." }
@@ -1716,179 +1783,471 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
1716
1783
  }
1717
1784
  });
1718
1785
  //#endregion
1719
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js
1720
- var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1721
- Object.defineProperty(exports, "__esModule", { value: true });
1722
- exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
1723
- var _CodeOrName = class {};
1724
- exports._CodeOrName = _CodeOrName;
1725
- exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
1726
- var Name = class extends _CodeOrName {
1727
- constructor(s) {
1728
- super();
1729
- if (!exports.IDENTIFIER.test(s)) throw new Error("CodeGen: name must be a valid identifier");
1730
- this.str = s;
1731
- }
1732
- toString() {
1733
- return this.str;
1734
- }
1735
- emptyStr() {
1736
- return false;
1737
- }
1738
- get names() {
1739
- return { [this.str]: 1 };
1740
- }
1741
- };
1742
- exports.Name = Name;
1743
- var _Code = class extends _CodeOrName {
1744
- constructor(code) {
1745
- super();
1746
- this._items = typeof code === "string" ? [code] : code;
1747
- }
1748
- toString() {
1749
- return this.str;
1750
- }
1751
- emptyStr() {
1752
- if (this._items.length > 1) return false;
1753
- const item = this._items[0];
1754
- return item === "" || item === "\"\"";
1755
- }
1756
- get str() {
1757
- var _a;
1758
- return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
1759
- }
1760
- get names() {
1761
- var _a;
1762
- return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {
1763
- if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1;
1764
- return names;
1765
- }, {});
1766
- }
1786
+ //#region ../compiler/dist/src/core/source-file.js
1787
+ function createSourceFile(text, path) {
1788
+ let lineStarts = void 0;
1789
+ return {
1790
+ text,
1791
+ path,
1792
+ getLineStarts,
1793
+ getLineAndCharacterOfPosition
1767
1794
  };
1768
- exports._Code = _Code;
1769
- exports.nil = new _Code("");
1770
- function _(strs, ...args) {
1771
- const code = [strs[0]];
1772
- let i = 0;
1773
- while (i < args.length) {
1774
- addCodeArg(code, args[i]);
1775
- code.push(strs[++i]);
1776
- }
1777
- return new _Code(code);
1778
- }
1779
- exports._ = _;
1780
- var plus = new _Code("+");
1781
- function str(strs, ...args) {
1782
- const expr = [safeStringify(strs[0])];
1783
- let i = 0;
1784
- while (i < args.length) {
1785
- expr.push(plus);
1786
- addCodeArg(expr, args[i]);
1787
- expr.push(plus, safeStringify(strs[++i]));
1788
- }
1789
- optimize(expr);
1790
- return new _Code(expr);
1791
- }
1792
- exports.str = str;
1793
- function addCodeArg(code, arg) {
1794
- if (arg instanceof _Code) code.push(...arg._items);
1795
- else if (arg instanceof Name) code.push(arg);
1796
- else code.push(interpolate(arg));
1795
+ function getLineStarts() {
1796
+ return lineStarts = lineStarts ?? scanLineStarts(text);
1797
1797
  }
1798
- exports.addCodeArg = addCodeArg;
1799
- function optimize(expr) {
1800
- let i = 1;
1801
- while (i < expr.length - 1) {
1802
- if (expr[i] === plus) {
1803
- const res = mergeExprItems(expr[i - 1], expr[i + 1]);
1804
- if (res !== void 0) {
1805
- expr.splice(i - 1, 3, res);
1806
- continue;
1807
- }
1808
- expr[i++] = "+";
1809
- }
1810
- i++;
1811
- }
1798
+ function getLineAndCharacterOfPosition(position) {
1799
+ const starts = getLineStarts();
1800
+ let line = binarySearch(starts, position);
1801
+ if (line < 0) line = ~line - 1;
1802
+ return {
1803
+ line,
1804
+ character: position - starts[line]
1805
+ };
1812
1806
  }
1813
- function mergeExprItems(a, b) {
1814
- if (b === "\"\"") return a;
1815
- if (a === "\"\"") return b;
1816
- if (typeof a == "string") {
1817
- if (b instanceof Name || a[a.length - 1] !== "\"") return;
1818
- if (typeof b != "string") return `${a.slice(0, -1)}${b}"`;
1819
- if (b[0] === "\"") return a.slice(0, -1) + b.slice(1);
1820
- return;
1807
+ }
1808
+ function scanLineStarts(text) {
1809
+ const starts = [];
1810
+ let start = 0;
1811
+ let pos = 0;
1812
+ while (pos < text.length) {
1813
+ const ch = text.charCodeAt(pos);
1814
+ pos++;
1815
+ switch (ch) {
1816
+ case 13: if (text.charCodeAt(pos) === 10) pos++;
1817
+ case 10:
1818
+ starts.push(start);
1819
+ start = pos;
1820
+ break;
1821
1821
  }
1822
- if (typeof b == "string" && b[0] === "\"" && !(a instanceof Name)) return `"${a}${b.slice(1)}`;
1823
- }
1824
- function strConcat(c1, c2) {
1825
- return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
1826
- }
1827
- exports.strConcat = strConcat;
1828
- function interpolate(x) {
1829
- return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
1830
- }
1831
- function stringify(x) {
1832
- return new _Code(safeStringify(x));
1833
- }
1834
- exports.stringify = stringify;
1835
- function safeStringify(x) {
1836
- return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
1837
- }
1838
- exports.safeStringify = safeStringify;
1839
- function getProperty(key) {
1840
- return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
1841
- }
1842
- exports.getProperty = getProperty;
1843
- function getEsmExportName(key) {
1844
- if (typeof key == "string" && exports.IDENTIFIER.test(key)) return new _Code(`${key}`);
1845
- throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
1846
1822
  }
1847
- exports.getEsmExportName = getEsmExportName;
1848
- function regexpCode(rx) {
1849
- return new _Code(rx.toString());
1823
+ starts.push(start);
1824
+ return starts;
1825
+ }
1826
+ /**
1827
+ * Search sorted array of numbers for the given value. If found, return index
1828
+ * in array where value was found. If not found, return a negative number that
1829
+ * is the bitwise complement of the index where value would need to be inserted
1830
+ * to keep the array sorted.
1831
+ */
1832
+ function binarySearch(array, value) {
1833
+ let low = 0;
1834
+ let high = array.length - 1;
1835
+ while (low <= high) {
1836
+ const middle = low + (high - low >> 1);
1837
+ const v = array[middle];
1838
+ if (v < value) low = middle + 1;
1839
+ else if (v > value) high = middle - 1;
1840
+ else return middle;
1850
1841
  }
1851
- exports.regexpCode = regexpCode;
1852
- }));
1842
+ return ~low;
1843
+ }
1853
1844
  //#endregion
1854
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js
1855
- var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
1856
- Object.defineProperty(exports, "__esModule", { value: true });
1857
- exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
1858
- var code_1 = require_code$1();
1859
- var ValueError = class extends Error {
1860
- constructor(name) {
1861
- super(`CodeGen: "code" for ${name} not defined`);
1862
- this.value = name.value;
1863
- }
1864
- };
1865
- var UsedValueState;
1866
- (function(UsedValueState) {
1867
- UsedValueState[UsedValueState["Started"] = 0] = "Started";
1868
- UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
1869
- })(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
1870
- exports.varKinds = {
1871
- const: new code_1.Name("const"),
1872
- let: new code_1.Name("let"),
1873
- var: new code_1.Name("var")
1874
- };
1875
- var Scope = class {
1876
- constructor({ prefixes, parent } = {}) {
1877
- this._names = {};
1878
- this._prefixes = prefixes;
1879
- this._parent = parent;
1880
- }
1881
- toName(nameOrPrefix) {
1882
- return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
1883
- }
1884
- name(prefix) {
1885
- return new code_1.Name(this._newName(prefix));
1886
- }
1887
- _newName(prefix) {
1888
- const ng = this._names[prefix] || this._nameGroup(prefix);
1889
- return `${prefix}${ng.index++}`;
1890
- }
1891
- _nameGroup(prefix) {
1845
+ //#region ../compiler/dist/src/core/types.js
1846
+ var ResolutionResultFlags;
1847
+ (function(ResolutionResultFlags) {
1848
+ ResolutionResultFlags[ResolutionResultFlags["None"] = 0] = "None";
1849
+ ResolutionResultFlags[ResolutionResultFlags["Resolved"] = 2] = "Resolved";
1850
+ ResolutionResultFlags[ResolutionResultFlags["Unknown"] = 4] = "Unknown";
1851
+ ResolutionResultFlags[ResolutionResultFlags["Ambiguous"] = 8] = "Ambiguous";
1852
+ ResolutionResultFlags[ResolutionResultFlags["NotFound"] = 16] = "NotFound";
1853
+ ResolutionResultFlags[ResolutionResultFlags["ResolutionFailed"] = 28] = "ResolutionFailed";
1854
+ })(ResolutionResultFlags || (ResolutionResultFlags = {}));
1855
+ /**
1856
+ * AST types
1857
+ */
1858
+ var SyntaxKind;
1859
+ (function(SyntaxKind) {
1860
+ SyntaxKind[SyntaxKind["TypeSpecScript"] = 0] = "TypeSpecScript";
1861
+ SyntaxKind[SyntaxKind["JsSourceFile"] = 1] = "JsSourceFile";
1862
+ SyntaxKind[SyntaxKind["ImportStatement"] = 2] = "ImportStatement";
1863
+ SyntaxKind[SyntaxKind["Identifier"] = 3] = "Identifier";
1864
+ SyntaxKind[SyntaxKind["AugmentDecoratorStatement"] = 4] = "AugmentDecoratorStatement";
1865
+ SyntaxKind[SyntaxKind["DecoratorExpression"] = 5] = "DecoratorExpression";
1866
+ SyntaxKind[SyntaxKind["DirectiveExpression"] = 6] = "DirectiveExpression";
1867
+ SyntaxKind[SyntaxKind["MemberExpression"] = 7] = "MemberExpression";
1868
+ SyntaxKind[SyntaxKind["NamespaceStatement"] = 8] = "NamespaceStatement";
1869
+ SyntaxKind[SyntaxKind["UsingStatement"] = 9] = "UsingStatement";
1870
+ SyntaxKind[SyntaxKind["OperationStatement"] = 10] = "OperationStatement";
1871
+ SyntaxKind[SyntaxKind["OperationSignatureDeclaration"] = 11] = "OperationSignatureDeclaration";
1872
+ SyntaxKind[SyntaxKind["OperationSignatureReference"] = 12] = "OperationSignatureReference";
1873
+ SyntaxKind[SyntaxKind["ModelStatement"] = 13] = "ModelStatement";
1874
+ SyntaxKind[SyntaxKind["ModelExpression"] = 14] = "ModelExpression";
1875
+ SyntaxKind[SyntaxKind["ModelProperty"] = 15] = "ModelProperty";
1876
+ SyntaxKind[SyntaxKind["ModelSpreadProperty"] = 16] = "ModelSpreadProperty";
1877
+ SyntaxKind[SyntaxKind["ScalarStatement"] = 17] = "ScalarStatement";
1878
+ SyntaxKind[SyntaxKind["InterfaceStatement"] = 18] = "InterfaceStatement";
1879
+ SyntaxKind[SyntaxKind["UnionStatement"] = 19] = "UnionStatement";
1880
+ SyntaxKind[SyntaxKind["UnionVariant"] = 20] = "UnionVariant";
1881
+ SyntaxKind[SyntaxKind["EnumStatement"] = 21] = "EnumStatement";
1882
+ SyntaxKind[SyntaxKind["EnumMember"] = 22] = "EnumMember";
1883
+ SyntaxKind[SyntaxKind["EnumSpreadMember"] = 23] = "EnumSpreadMember";
1884
+ SyntaxKind[SyntaxKind["AliasStatement"] = 24] = "AliasStatement";
1885
+ SyntaxKind[SyntaxKind["DecoratorDeclarationStatement"] = 25] = "DecoratorDeclarationStatement";
1886
+ SyntaxKind[SyntaxKind["FunctionDeclarationStatement"] = 26] = "FunctionDeclarationStatement";
1887
+ SyntaxKind[SyntaxKind["FunctionParameter"] = 27] = "FunctionParameter";
1888
+ SyntaxKind[SyntaxKind["UnionExpression"] = 28] = "UnionExpression";
1889
+ SyntaxKind[SyntaxKind["IntersectionExpression"] = 29] = "IntersectionExpression";
1890
+ SyntaxKind[SyntaxKind["TupleExpression"] = 30] = "TupleExpression";
1891
+ SyntaxKind[SyntaxKind["ArrayExpression"] = 31] = "ArrayExpression";
1892
+ SyntaxKind[SyntaxKind["StringLiteral"] = 32] = "StringLiteral";
1893
+ SyntaxKind[SyntaxKind["NumericLiteral"] = 33] = "NumericLiteral";
1894
+ SyntaxKind[SyntaxKind["BooleanLiteral"] = 34] = "BooleanLiteral";
1895
+ SyntaxKind[SyntaxKind["StringTemplateExpression"] = 35] = "StringTemplateExpression";
1896
+ SyntaxKind[SyntaxKind["StringTemplateHead"] = 36] = "StringTemplateHead";
1897
+ SyntaxKind[SyntaxKind["StringTemplateMiddle"] = 37] = "StringTemplateMiddle";
1898
+ SyntaxKind[SyntaxKind["StringTemplateTail"] = 38] = "StringTemplateTail";
1899
+ SyntaxKind[SyntaxKind["StringTemplateSpan"] = 39] = "StringTemplateSpan";
1900
+ SyntaxKind[SyntaxKind["ExternKeyword"] = 40] = "ExternKeyword";
1901
+ SyntaxKind[SyntaxKind["VoidKeyword"] = 41] = "VoidKeyword";
1902
+ SyntaxKind[SyntaxKind["NeverKeyword"] = 42] = "NeverKeyword";
1903
+ SyntaxKind[SyntaxKind["UnknownKeyword"] = 43] = "UnknownKeyword";
1904
+ SyntaxKind[SyntaxKind["ValueOfExpression"] = 44] = "ValueOfExpression";
1905
+ SyntaxKind[SyntaxKind["TypeReference"] = 45] = "TypeReference";
1906
+ SyntaxKind[SyntaxKind["TemplateParameterDeclaration"] = 46] = "TemplateParameterDeclaration";
1907
+ SyntaxKind[SyntaxKind["EmptyStatement"] = 47] = "EmptyStatement";
1908
+ SyntaxKind[SyntaxKind["InvalidStatement"] = 48] = "InvalidStatement";
1909
+ SyntaxKind[SyntaxKind["LineComment"] = 49] = "LineComment";
1910
+ SyntaxKind[SyntaxKind["BlockComment"] = 50] = "BlockComment";
1911
+ SyntaxKind[SyntaxKind["Doc"] = 51] = "Doc";
1912
+ SyntaxKind[SyntaxKind["DocText"] = 52] = "DocText";
1913
+ SyntaxKind[SyntaxKind["DocParamTag"] = 53] = "DocParamTag";
1914
+ SyntaxKind[SyntaxKind["DocPropTag"] = 54] = "DocPropTag";
1915
+ SyntaxKind[SyntaxKind["DocReturnsTag"] = 55] = "DocReturnsTag";
1916
+ SyntaxKind[SyntaxKind["DocErrorsTag"] = 56] = "DocErrorsTag";
1917
+ SyntaxKind[SyntaxKind["DocTemplateTag"] = 57] = "DocTemplateTag";
1918
+ SyntaxKind[SyntaxKind["DocUnknownTag"] = 58] = "DocUnknownTag";
1919
+ SyntaxKind[SyntaxKind["Return"] = 59] = "Return";
1920
+ SyntaxKind[SyntaxKind["JsNamespaceDeclaration"] = 60] = "JsNamespaceDeclaration";
1921
+ SyntaxKind[SyntaxKind["TemplateArgument"] = 61] = "TemplateArgument";
1922
+ SyntaxKind[SyntaxKind["TypeOfExpression"] = 62] = "TypeOfExpression";
1923
+ SyntaxKind[SyntaxKind["ObjectLiteral"] = 63] = "ObjectLiteral";
1924
+ SyntaxKind[SyntaxKind["ObjectLiteralProperty"] = 64] = "ObjectLiteralProperty";
1925
+ SyntaxKind[SyntaxKind["ObjectLiteralSpreadProperty"] = 65] = "ObjectLiteralSpreadProperty";
1926
+ SyntaxKind[SyntaxKind["ArrayLiteral"] = 66] = "ArrayLiteral";
1927
+ SyntaxKind[SyntaxKind["ConstStatement"] = 67] = "ConstStatement";
1928
+ SyntaxKind[SyntaxKind["CallExpression"] = 68] = "CallExpression";
1929
+ SyntaxKind[SyntaxKind["ScalarConstructor"] = 69] = "ScalarConstructor";
1930
+ SyntaxKind[SyntaxKind["InternalKeyword"] = 70] = "InternalKeyword";
1931
+ SyntaxKind[SyntaxKind["FunctionTypeExpression"] = 71] = "FunctionTypeExpression";
1932
+ })(SyntaxKind || (SyntaxKind = {}));
1933
+ var IdentifierKind;
1934
+ (function(IdentifierKind) {
1935
+ IdentifierKind[IdentifierKind["TypeReference"] = 0] = "TypeReference";
1936
+ IdentifierKind[IdentifierKind["TemplateArgument"] = 1] = "TemplateArgument";
1937
+ IdentifierKind[IdentifierKind["Decorator"] = 2] = "Decorator";
1938
+ IdentifierKind[IdentifierKind["Function"] = 3] = "Function";
1939
+ IdentifierKind[IdentifierKind["Using"] = 4] = "Using";
1940
+ IdentifierKind[IdentifierKind["Declaration"] = 5] = "Declaration";
1941
+ IdentifierKind[IdentifierKind["ModelExpressionProperty"] = 6] = "ModelExpressionProperty";
1942
+ IdentifierKind[IdentifierKind["ModelStatementProperty"] = 7] = "ModelStatementProperty";
1943
+ IdentifierKind[IdentifierKind["ObjectLiteralProperty"] = 8] = "ObjectLiteralProperty";
1944
+ IdentifierKind[IdentifierKind["Other"] = 9] = "Other";
1945
+ })(IdentifierKind || (IdentifierKind = {}));
1946
+ /** Used to explicitly specify that a diagnostic has no target. */
1947
+ var NoTarget = Symbol.for("NoTarget");
1948
+ var ListenerFlow;
1949
+ (function(ListenerFlow) {
1950
+ /**
1951
+ * Do not navigate any containing or referenced type.
1952
+ */
1953
+ ListenerFlow[ListenerFlow["NoRecursion"] = 1] = "NoRecursion";
1954
+ })(ListenerFlow || (ListenerFlow = {}));
1955
+ //#endregion
1956
+ //#region ../compiler/dist/src/core/diagnostics.js
1957
+ /**
1958
+ * Find the syntax node for a TypeSpec diagnostic target.
1959
+ *
1960
+ * This function extracts the AST node from various types of diagnostic targets:
1961
+ * - For template instance targets: returns the node of the template declaration
1962
+ * - For symbols: returns the first declaration node (or symbol source for using symbols)
1963
+ * - For AST nodes: returns the node itself
1964
+ * - For types: returns the node associated with the type
1965
+ *
1966
+ * @param target The diagnostic target to extract a node from. Can be a template instance,
1967
+ * symbol, AST node, or type.
1968
+ * @returns The AST node associated with the target, or undefined if the target is a type
1969
+ * or symbol that doesn't have an associated node.
1970
+ */
1971
+ function getNodeForTarget(target) {
1972
+ if (!("kind" in target) && !("entityKind" in target)) {
1973
+ if (!("declarations" in target)) return target.node;
1974
+ if (target.flags & 8192) target = target.symbolSource;
1975
+ return target.declarations[0];
1976
+ } else if ("kind" in target && typeof target.kind === "number") return target;
1977
+ else return target.node;
1978
+ }
1979
+ function getSourceLocation(target, options = {}) {
1980
+ if (target === NoTarget || target === void 0) return;
1981
+ if ("file" in target) return target;
1982
+ const node = getNodeForTarget(target);
1983
+ return node ? getSourceLocationOfNode(node, options) : createSyntheticSourceLocation();
1984
+ }
1985
+ function createSyntheticSourceLocation(loc = "<unknown location>") {
1986
+ return {
1987
+ file: createSourceFile("", loc),
1988
+ pos: 0,
1989
+ end: 0,
1990
+ isSynthetic: true
1991
+ };
1992
+ }
1993
+ function getSourceLocationOfNode(node, options) {
1994
+ let root = node;
1995
+ while (root.parent !== void 0) root = root.parent;
1996
+ if (root.kind !== SyntaxKind.TypeSpecScript && root.kind !== SyntaxKind.JsSourceFile) return createSyntheticSourceLocation(node.flags & 8 ? void 0 : "<unknown location - cannot obtain source location of unbound node - file bug at https://github.com/microsoft/typespec>");
1997
+ if (options.locateId && "id" in node && node.id !== void 0) node = node.id;
1998
+ return {
1999
+ file: root.file,
2000
+ pos: node.pos,
2001
+ end: node.end
2002
+ };
2003
+ }
2004
+ /**
2005
+ * Use this to report bugs in the compiler, and not errors in the source code
2006
+ * being compiled.
2007
+ *
2008
+ * @param condition Throw if this is not true.
2009
+ *
2010
+ * @param message Error message.
2011
+ *
2012
+ * @param target Optional location in source code that might give a clue about
2013
+ * what got the compiler off track.
2014
+ */
2015
+ function compilerAssert(condition, message, target) {
2016
+ if (condition) return;
2017
+ if (target) {
2018
+ let location;
2019
+ try {
2020
+ location = getSourceLocation(target);
2021
+ } catch (err) {}
2022
+ if (location) {
2023
+ const pos = location.file.getLineAndCharacterOfPosition(location.pos);
2024
+ const file = location.file.path;
2025
+ const line = pos.line + 1;
2026
+ const col = pos.character + 1;
2027
+ message += `\nOccurred while compiling code in ${file} near line ${line}, column ${col}`;
2028
+ }
2029
+ }
2030
+ throw new Error(message);
2031
+ }
2032
+ /**
2033
+ * Create a new instance of the @see DiagnosticCollector.
2034
+ */
2035
+ function createDiagnosticCollector() {
2036
+ const diagnostics = [];
2037
+ return {
2038
+ diagnostics,
2039
+ add,
2040
+ pipe,
2041
+ wrap,
2042
+ join
2043
+ };
2044
+ function add(diagnostic) {
2045
+ diagnostics.push(diagnostic);
2046
+ }
2047
+ function pipe(result) {
2048
+ const [value, diags] = result;
2049
+ for (const diag of diags) diagnostics.push(diag);
2050
+ return value;
2051
+ }
2052
+ function wrap(value) {
2053
+ return [value, diagnostics];
2054
+ }
2055
+ function join(result) {
2056
+ const [value, diags] = result;
2057
+ for (const diag of diags) diagnostics.push(diag);
2058
+ return [value, diagnostics];
2059
+ }
2060
+ }
2061
+ /**
2062
+ * Ignore the diagnostics emitted by the diagnostic accessor pattern and just return the actual result.
2063
+ * @param result Accessor pattern tuple result including the actual result and the list of diagnostics.
2064
+ * @returns Actual result.
2065
+ */
2066
+ function ignoreDiagnostics(result) {
2067
+ return result[0];
2068
+ }
2069
+ //#endregion
2070
+ //#region ../compiler/dist/src/core/helpers/location-context.js
2071
+ function getLocationContext(program, type) {
2072
+ const sourceLocation = getSourceLocation(type);
2073
+ if (sourceLocation.isSynthetic) return { type: "synthetic" };
2074
+ return program.getSourceFileLocationContext(sourceLocation.file);
2075
+ }
2076
+ new Set(Object.keys({ "function-declarations": { description: "Allows use of function declarations without experimental warnings in project code." } }));
2077
+ //#endregion
2078
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
2079
+ var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2080
+ Object.defineProperty(exports, "__esModule", { value: true });
2081
+ exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
2082
+ var _CodeOrName = class {};
2083
+ exports._CodeOrName = _CodeOrName;
2084
+ exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
2085
+ var Name = class extends _CodeOrName {
2086
+ constructor(s) {
2087
+ super();
2088
+ if (!exports.IDENTIFIER.test(s)) throw new Error("CodeGen: name must be a valid identifier");
2089
+ this.str = s;
2090
+ }
2091
+ toString() {
2092
+ return this.str;
2093
+ }
2094
+ emptyStr() {
2095
+ return false;
2096
+ }
2097
+ get names() {
2098
+ return { [this.str]: 1 };
2099
+ }
2100
+ };
2101
+ exports.Name = Name;
2102
+ var _Code = class extends _CodeOrName {
2103
+ constructor(code) {
2104
+ super();
2105
+ this._items = typeof code === "string" ? [code] : code;
2106
+ }
2107
+ toString() {
2108
+ return this.str;
2109
+ }
2110
+ emptyStr() {
2111
+ if (this._items.length > 1) return false;
2112
+ const item = this._items[0];
2113
+ return item === "" || item === "\"\"";
2114
+ }
2115
+ get str() {
2116
+ var _a;
2117
+ return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
2118
+ }
2119
+ get names() {
2120
+ var _a;
2121
+ return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {
2122
+ if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1;
2123
+ return names;
2124
+ }, {});
2125
+ }
2126
+ };
2127
+ exports._Code = _Code;
2128
+ exports.nil = new _Code("");
2129
+ function _(strs, ...args) {
2130
+ const code = [strs[0]];
2131
+ let i = 0;
2132
+ while (i < args.length) {
2133
+ addCodeArg(code, args[i]);
2134
+ code.push(strs[++i]);
2135
+ }
2136
+ return new _Code(code);
2137
+ }
2138
+ exports._ = _;
2139
+ var plus = new _Code("+");
2140
+ function str(strs, ...args) {
2141
+ const expr = [safeStringify(strs[0])];
2142
+ let i = 0;
2143
+ while (i < args.length) {
2144
+ expr.push(plus);
2145
+ addCodeArg(expr, args[i]);
2146
+ expr.push(plus, safeStringify(strs[++i]));
2147
+ }
2148
+ optimize(expr);
2149
+ return new _Code(expr);
2150
+ }
2151
+ exports.str = str;
2152
+ function addCodeArg(code, arg) {
2153
+ if (arg instanceof _Code) code.push(...arg._items);
2154
+ else if (arg instanceof Name) code.push(arg);
2155
+ else code.push(interpolate(arg));
2156
+ }
2157
+ exports.addCodeArg = addCodeArg;
2158
+ function optimize(expr) {
2159
+ let i = 1;
2160
+ while (i < expr.length - 1) {
2161
+ if (expr[i] === plus) {
2162
+ const res = mergeExprItems(expr[i - 1], expr[i + 1]);
2163
+ if (res !== void 0) {
2164
+ expr.splice(i - 1, 3, res);
2165
+ continue;
2166
+ }
2167
+ expr[i++] = "+";
2168
+ }
2169
+ i++;
2170
+ }
2171
+ }
2172
+ function mergeExprItems(a, b) {
2173
+ if (b === "\"\"") return a;
2174
+ if (a === "\"\"") return b;
2175
+ if (typeof a == "string") {
2176
+ if (b instanceof Name || a[a.length - 1] !== "\"") return;
2177
+ if (typeof b != "string") return `${a.slice(0, -1)}${b}"`;
2178
+ if (b[0] === "\"") return a.slice(0, -1) + b.slice(1);
2179
+ return;
2180
+ }
2181
+ if (typeof b == "string" && b[0] === "\"" && !(a instanceof Name)) return `"${a}${b.slice(1)}`;
2182
+ }
2183
+ function strConcat(c1, c2) {
2184
+ return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
2185
+ }
2186
+ exports.strConcat = strConcat;
2187
+ function interpolate(x) {
2188
+ return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
2189
+ }
2190
+ function stringify(x) {
2191
+ return new _Code(safeStringify(x));
2192
+ }
2193
+ exports.stringify = stringify;
2194
+ function safeStringify(x) {
2195
+ return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
2196
+ }
2197
+ exports.safeStringify = safeStringify;
2198
+ function getProperty(key) {
2199
+ return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
2200
+ }
2201
+ exports.getProperty = getProperty;
2202
+ function getEsmExportName(key) {
2203
+ if (typeof key == "string" && exports.IDENTIFIER.test(key)) return new _Code(`${key}`);
2204
+ throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
2205
+ }
2206
+ exports.getEsmExportName = getEsmExportName;
2207
+ function regexpCode(rx) {
2208
+ return new _Code(rx.toString());
2209
+ }
2210
+ exports.regexpCode = regexpCode;
2211
+ }));
2212
+ //#endregion
2213
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
2214
+ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
2215
+ Object.defineProperty(exports, "__esModule", { value: true });
2216
+ exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
2217
+ var code_1 = require_code$1();
2218
+ var ValueError = class extends Error {
2219
+ constructor(name) {
2220
+ super(`CodeGen: "code" for ${name} not defined`);
2221
+ this.value = name.value;
2222
+ }
2223
+ };
2224
+ var UsedValueState;
2225
+ (function(UsedValueState) {
2226
+ UsedValueState[UsedValueState["Started"] = 0] = "Started";
2227
+ UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
2228
+ })(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
2229
+ exports.varKinds = {
2230
+ const: new code_1.Name("const"),
2231
+ let: new code_1.Name("let"),
2232
+ var: new code_1.Name("var")
2233
+ };
2234
+ var Scope = class {
2235
+ constructor({ prefixes, parent } = {}) {
2236
+ this._names = {};
2237
+ this._prefixes = prefixes;
2238
+ this._parent = parent;
2239
+ }
2240
+ toName(nameOrPrefix) {
2241
+ return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
2242
+ }
2243
+ name(prefix) {
2244
+ return new code_1.Name(this._newName(prefix));
2245
+ }
2246
+ _newName(prefix) {
2247
+ const ng = this._names[prefix] || this._nameGroup(prefix);
2248
+ return `${prefix}${ng.index++}`;
2249
+ }
2250
+ _nameGroup(prefix) {
1892
2251
  var _a, _b;
1893
2252
  if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
1894
2253
  return this._names[prefix] = {
@@ -1988,7 +2347,7 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
1988
2347
  exports.ValueScope = ValueScope;
1989
2348
  }));
1990
2349
  //#endregion
1991
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js
2350
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
1992
2351
  var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
1993
2352
  Object.defineProperty(exports, "__esModule", { value: true });
1994
2353
  exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
@@ -2657,7 +3016,7 @@ var require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {
2657
3016
  }
2658
3017
  }));
2659
3018
  //#endregion
2660
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js
3019
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
2661
3020
  var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
2662
3021
  Object.defineProperty(exports, "__esModule", { value: true });
2663
3022
  exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
@@ -2798,7 +3157,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
2798
3157
  exports.checkStrictMode = checkStrictMode;
2799
3158
  }));
2800
3159
  //#endregion
2801
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js
3160
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
2802
3161
  var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
2803
3162
  Object.defineProperty(exports, "__esModule", { value: true });
2804
3163
  var codegen_1 = require_codegen();
@@ -2822,7 +3181,7 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
2822
3181
  };
2823
3182
  }));
2824
3183
  //#endregion
2825
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js
3184
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
2826
3185
  var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
2827
3186
  Object.defineProperty(exports, "__esModule", { value: true });
2828
3187
  exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
@@ -2918,7 +3277,7 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
2918
3277
  }
2919
3278
  }));
2920
3279
  //#endregion
2921
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js
3280
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
2922
3281
  var require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {
2923
3282
  Object.defineProperty(exports, "__esModule", { value: true });
2924
3283
  exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
@@ -2960,7 +3319,7 @@ var require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {
2960
3319
  }
2961
3320
  }));
2962
3321
  //#endregion
2963
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js
3322
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
2964
3323
  var require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {
2965
3324
  Object.defineProperty(exports, "__esModule", { value: true });
2966
3325
  exports.getRules = exports.isJSONType = void 0;
@@ -3018,7 +3377,7 @@ var require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {
3018
3377
  exports.getRules = getRules;
3019
3378
  }));
3020
3379
  //#endregion
3021
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js
3380
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
3022
3381
  var require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {
3023
3382
  Object.defineProperty(exports, "__esModule", { value: true });
3024
3383
  exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
@@ -3038,7 +3397,7 @@ var require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {
3038
3397
  exports.shouldUseRule = shouldUseRule;
3039
3398
  }));
3040
3399
  //#endregion
3041
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js
3400
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
3042
3401
  var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
3043
3402
  Object.defineProperty(exports, "__esModule", { value: true });
3044
3403
  exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
@@ -3202,7 +3561,7 @@ var require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {
3202
3561
  }
3203
3562
  }));
3204
3563
  //#endregion
3205
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js
3564
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
3206
3565
  var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
3207
3566
  Object.defineProperty(exports, "__esModule", { value: true });
3208
3567
  exports.assignDefaults = void 0;
@@ -3228,7 +3587,7 @@ var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
3228
3587
  }
3229
3588
  }));
3230
3589
  //#endregion
3231
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js
3590
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
3232
3591
  var require_code = /* @__PURE__ */ __commonJSMin(((exports) => {
3233
3592
  Object.defineProperty(exports, "__esModule", { value: true });
3234
3593
  exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
@@ -3352,7 +3711,7 @@ var require_code = /* @__PURE__ */ __commonJSMin(((exports) => {
3352
3711
  exports.validateUnion = validateUnion;
3353
3712
  }));
3354
3713
  //#endregion
3355
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js
3714
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
3356
3715
  var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
3357
3716
  Object.defineProperty(exports, "__esModule", { value: true });
3358
3717
  exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
@@ -3458,7 +3817,7 @@ var require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {
3458
3817
  exports.validateKeywordUsage = validateKeywordUsage;
3459
3818
  }));
3460
3819
  //#endregion
3461
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js
3820
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
3462
3821
  var require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {
3463
3822
  Object.defineProperty(exports, "__esModule", { value: true });
3464
3823
  exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
@@ -3630,7 +3989,7 @@ var require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, modu
3630
3989
  }
3631
3990
  }));
3632
3991
  //#endregion
3633
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js
3992
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
3634
3993
  var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
3635
3994
  Object.defineProperty(exports, "__esModule", { value: true });
3636
3995
  exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
@@ -3757,7 +4116,7 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
3757
4116
  exports.getSchemaRefs = getSchemaRefs;
3758
4117
  }));
3759
4118
  //#endregion
3760
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js
4119
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
3761
4120
  var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
3762
4121
  Object.defineProperty(exports, "__esModule", { value: true });
3763
4122
  exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
@@ -4176,7 +4535,7 @@ var require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {
4176
4535
  exports.getData = getData;
4177
4536
  }));
4178
4537
  //#endregion
4179
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js
4538
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
4180
4539
  var require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {
4181
4540
  Object.defineProperty(exports, "__esModule", { value: true });
4182
4541
  var ValidationError = class extends Error {
@@ -4189,7 +4548,7 @@ var require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {
4189
4548
  exports.default = ValidationError;
4190
4549
  }));
4191
4550
  //#endregion
4192
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js
4551
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
4193
4552
  var require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {
4194
4553
  Object.defineProperty(exports, "__esModule", { value: true });
4195
4554
  var resolve_1 = require_resolve();
@@ -4203,7 +4562,7 @@ var require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {
4203
4562
  exports.default = MissingRefError;
4204
4563
  }));
4205
4564
  //#endregion
4206
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js
4565
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
4207
4566
  var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
4208
4567
  Object.defineProperty(exports, "__esModule", { value: true });
4209
4568
  exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
@@ -4417,7 +4776,7 @@ var require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {
4417
4776
  }
4418
4777
  }));
4419
4778
  //#endregion
4420
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json
4779
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
4421
4780
  var data_exports = /* @__PURE__ */ __exportAll({
4422
4781
  $id: () => $id$1,
4423
4782
  additionalProperties: () => false,
@@ -4446,12 +4805,18 @@ var init_data = __esmMin((() => {
4446
4805
  };
4447
4806
  }));
4448
4807
  //#endregion
4449
- //#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js
4808
+ //#region ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js
4450
4809
  var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4451
4810
  /** @type {(value: string) => boolean} */
4452
4811
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
4453
4812
  /** @type {(value: string) => boolean} */
4454
4813
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
4814
+ /** @type {(value: string) => boolean} */
4815
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
4816
+ /** @type {(value: string) => boolean} */
4817
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
4818
+ /** @type {(value: string) => boolean} */
4819
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
4455
4820
  /**
4456
4821
  * @param {Array<string>} input
4457
4822
  * @returns {string}
@@ -4674,19 +5039,103 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4674
5039
  return output.join("");
4675
5040
  }
4676
5041
  /**
4677
- * @param {import('../types/index').URIComponent} component
4678
- * @param {boolean} esc
4679
- * @returns {import('../types/index').URIComponent}
5042
+ * Re-escape RFC 3986 gen-delims that must not appear literally in the host.
5043
+ * After the URI regex parses, these characters cannot be literal in the host
5044
+ * field, so any that appear after decoding came from percent-encoding and
5045
+ * must be restored to prevent authority structure changes.
5046
+ *
5047
+ * @param {string} host
5048
+ * @param {boolean} isIP - true for IPv4/IPv6 hosts (skip colon re-escaping)
5049
+ * @returns {string}
4680
5050
  */
4681
- function normalizeComponentEncoding(component, esc) {
4682
- const func = esc !== true ? escape : unescape;
4683
- if (component.scheme !== void 0) component.scheme = func(component.scheme);
4684
- if (component.userinfo !== void 0) component.userinfo = func(component.userinfo);
4685
- if (component.host !== void 0) component.host = func(component.host);
4686
- if (component.path !== void 0) component.path = func(component.path);
4687
- if (component.query !== void 0) component.query = func(component.query);
4688
- if (component.fragment !== void 0) component.fragment = func(component.fragment);
4689
- return component;
5051
+ var HOST_DELIMS = {
5052
+ "@": "%40",
5053
+ "/": "%2F",
5054
+ "?": "%3F",
5055
+ "#": "%23",
5056
+ ":": "%3A"
5057
+ };
5058
+ var HOST_DELIM_RE = /[@/?#:]/g;
5059
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
5060
+ function reescapeHostDelimiters(host, isIP) {
5061
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
5062
+ re.lastIndex = 0;
5063
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
5064
+ }
5065
+ /**
5066
+ * Normalizes percent escapes and optionally decodes only unreserved ASCII bytes.
5067
+ * Reserved delimiters such as `%2F` and `%2E` stay escaped.
5068
+ *
5069
+ * @param {string} input
5070
+ * @param {boolean} [decodeUnreserved=false]
5071
+ * @returns {string}
5072
+ */
5073
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
5074
+ if (input.indexOf("%") === -1) return input;
5075
+ let output = "";
5076
+ for (let i = 0; i < input.length; i++) {
5077
+ if (input[i] === "%" && i + 2 < input.length) {
5078
+ const hex = input.slice(i + 1, i + 3);
5079
+ if (isHexPair(hex)) {
5080
+ const normalizedHex = hex.toUpperCase();
5081
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
5082
+ if (decodeUnreserved && isUnreserved(decoded)) output += decoded;
5083
+ else output += "%" + normalizedHex;
5084
+ i += 2;
5085
+ continue;
5086
+ }
5087
+ }
5088
+ output += input[i];
5089
+ }
5090
+ return output;
5091
+ }
5092
+ /**
5093
+ * Normalizes path data without turning reserved escapes into live path syntax.
5094
+ * Valid escapes are uppercased, raw unsafe characters are escaped, and only
5095
+ * unreserved bytes that are not `.` are decoded.
5096
+ *
5097
+ * @param {string} input
5098
+ * @returns {string}
5099
+ */
5100
+ function normalizePathEncoding(input) {
5101
+ let output = "";
5102
+ for (let i = 0; i < input.length; i++) {
5103
+ if (input[i] === "%" && i + 2 < input.length) {
5104
+ const hex = input.slice(i + 1, i + 3);
5105
+ if (isHexPair(hex)) {
5106
+ const normalizedHex = hex.toUpperCase();
5107
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
5108
+ if (decoded !== "." && isUnreserved(decoded)) output += decoded;
5109
+ else output += "%" + normalizedHex;
5110
+ i += 2;
5111
+ continue;
5112
+ }
5113
+ }
5114
+ if (isPathCharacter(input[i])) output += input[i];
5115
+ else output += escape(input[i]);
5116
+ }
5117
+ return output;
5118
+ }
5119
+ /**
5120
+ * Escapes a component while preserving existing valid percent escapes.
5121
+ *
5122
+ * @param {string} input
5123
+ * @returns {string}
5124
+ */
5125
+ function escapePreservingEscapes(input) {
5126
+ let output = "";
5127
+ for (let i = 0; i < input.length; i++) {
5128
+ if (input[i] === "%" && i + 2 < input.length) {
5129
+ const hex = input.slice(i + 1, i + 3);
5130
+ if (isHexPair(hex)) {
5131
+ output += "%" + hex.toUpperCase();
5132
+ i += 2;
5133
+ continue;
5134
+ }
5135
+ }
5136
+ output += escape(input[i]);
5137
+ }
5138
+ return output;
4690
5139
  }
4691
5140
  /**
4692
5141
  * @param {import('../types/index').URIComponent} component
@@ -4703,7 +5152,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4703
5152
  if (!isIPv4(host)) {
4704
5153
  const ipV6res = normalizeIPv6(host);
4705
5154
  if (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`;
4706
- else host = component.host;
5155
+ else host = reescapeHostDelimiters(host, false);
4707
5156
  }
4708
5157
  uriTokens.push(host);
4709
5158
  }
@@ -4716,7 +5165,10 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4716
5165
  module.exports = {
4717
5166
  nonSimpleDomain,
4718
5167
  recomposeAuthority,
4719
- normalizeComponentEncoding,
5168
+ reescapeHostDelimiters,
5169
+ normalizePercentEncoding,
5170
+ normalizePathEncoding,
5171
+ escapePreservingEscapes,
4720
5172
  removeDotSegments,
4721
5173
  isIPv4,
4722
5174
  isUUID,
@@ -4725,7 +5177,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4725
5177
  };
4726
5178
  }));
4727
5179
  //#endregion
4728
- //#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js
5180
+ //#region ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js
4729
5181
  var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4730
5182
  var { isUUID } = require_utils();
4731
5183
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -4908,9 +5360,9 @@ var require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4908
5360
  };
4909
5361
  }));
4910
5362
  //#endregion
4911
- //#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js
5363
+ //#region ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js
4912
5364
  var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4913
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
5365
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
4914
5366
  var { SCHEMES, getSchemeHandler } = require_schemes();
4915
5367
  /**
4916
5368
  * @template {import('./types/index').URIComponent|string} T
@@ -4919,7 +5371,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4919
5371
  * @returns {T}
4920
5372
  */
4921
5373
  function normalize(uri, options) {
4922
- if (typeof uri === "string") uri = serialize(parse(uri, options), options);
5374
+ if (typeof uri === "string") uri = normalizeString(uri, options);
4923
5375
  else if (typeof uri === "object") uri = parse(serialize(uri, options), options);
4924
5376
  return uri;
4925
5377
  }
@@ -4995,27 +5447,9 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4995
5447
  * @returns {boolean}
4996
5448
  */
4997
5449
  function equal(uriA, uriB, options) {
4998
- if (typeof uriA === "string") {
4999
- uriA = unescape(uriA);
5000
- uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), {
5001
- ...options,
5002
- skipEscape: true
5003
- });
5004
- } else if (typeof uriA === "object") uriA = serialize(normalizeComponentEncoding(uriA, true), {
5005
- ...options,
5006
- skipEscape: true
5007
- });
5008
- if (typeof uriB === "string") {
5009
- uriB = unescape(uriB);
5010
- uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), {
5011
- ...options,
5012
- skipEscape: true
5013
- });
5014
- } else if (typeof uriB === "object") uriB = serialize(normalizeComponentEncoding(uriB, true), {
5015
- ...options,
5016
- skipEscape: true
5017
- });
5018
- return uriA.toLowerCase() === uriB.toLowerCase();
5450
+ const normalizedA = normalizeComparableURI(uriA, options);
5451
+ const normalizedB = normalizeComparableURI(uriB, options);
5452
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
5019
5453
  }
5020
5454
  /**
5021
5455
  * @param {Readonly<import('./types/index').URIComponent>} cmpts
@@ -5044,9 +5478,9 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5044
5478
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
5045
5479
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
5046
5480
  if (component.path !== void 0) if (!options.skipEscape) {
5047
- component.path = escape(component.path);
5481
+ component.path = escapePreservingEscapes(component.path);
5048
5482
  if (component.scheme !== void 0) component.path = component.path.split("%3A").join(":");
5049
- } else component.path = unescape(component.path);
5483
+ } else component.path = normalizePercentEncoding(component.path);
5050
5484
  if (options.reference !== "suffix" && component.scheme) uriTokens.push(component.scheme, ":");
5051
5485
  const authority = recomposeAuthority(component);
5052
5486
  if (authority !== void 0) {
@@ -5066,11 +5500,20 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5066
5500
  }
5067
5501
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
5068
5502
  /**
5503
+ * @param {import('./types/index').URIComponent} parsed
5504
+ * @param {RegExpMatchArray} matches
5505
+ * @returns {string|undefined}
5506
+ */
5507
+ function getParseError(parsed, matches) {
5508
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") return "URI path must start with \"/\" when authority is present.";
5509
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) return "URI port is malformed.";
5510
+ }
5511
+ /**
5069
5512
  * @param {string} uri
5070
5513
  * @param {import('./types/index').Options} [opts]
5071
- * @returns
5514
+ * @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean }}
5072
5515
  */
5073
- function parse(uri, opts) {
5516
+ function parseWithStatus(uri, opts) {
5074
5517
  const options = Object.assign({}, opts);
5075
5518
  /** @type {import('./types/index').URIComponent} */
5076
5519
  const parsed = {
@@ -5082,6 +5525,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5082
5525
  query: void 0,
5083
5526
  fragment: void 0
5084
5527
  };
5528
+ let malformedAuthorityOrPort = false;
5085
5529
  let isIP = false;
5086
5530
  if (options.reference === "suffix") if (options.scheme) uri = options.scheme + ":" + uri;
5087
5531
  else uri = "//" + uri;
@@ -5095,6 +5539,11 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5095
5539
  parsed.query = matches[7];
5096
5540
  parsed.fragment = matches[8];
5097
5541
  if (isNaN(parsed.port)) parsed.port = matches[5];
5542
+ const parseError = getParseError(parsed, matches);
5543
+ if (parseError !== void 0) {
5544
+ parsed.error = parsed.error || parseError;
5545
+ malformedAuthorityOrPort = true;
5546
+ }
5098
5547
  if (parsed.host) if (isIPv4(parsed.host) === false) {
5099
5548
  const ipv6result = normalizeIPv6(parsed.host);
5100
5549
  parsed.host = ipv6result.host.toLowerCase();
@@ -5116,14 +5565,61 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5116
5565
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
5117
5566
  if (uri.indexOf("%") !== -1) {
5118
5567
  if (parsed.scheme !== void 0) parsed.scheme = unescape(parsed.scheme);
5119
- if (parsed.host !== void 0) parsed.host = unescape(parsed.host);
5568
+ if (parsed.host !== void 0) parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
5569
+ }
5570
+ if (parsed.path) parsed.path = normalizePathEncoding(parsed.path);
5571
+ if (parsed.fragment) try {
5572
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
5573
+ } catch {
5574
+ parsed.error = parsed.error || "URI malformed";
5120
5575
  }
5121
- if (parsed.path) parsed.path = escape(unescape(parsed.path));
5122
- if (parsed.fragment) parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
5123
5576
  }
5124
5577
  if (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);
5125
5578
  } else parsed.error = parsed.error || "URI can not be parsed.";
5126
- return parsed;
5579
+ return {
5580
+ parsed,
5581
+ malformedAuthorityOrPort
5582
+ };
5583
+ }
5584
+ /**
5585
+ * @param {string} uri
5586
+ * @param {import('./types/index').Options} [opts]
5587
+ * @returns
5588
+ */
5589
+ function parse(uri, opts) {
5590
+ return parseWithStatus(uri, opts).parsed;
5591
+ }
5592
+ /**
5593
+ * @param {string} uri
5594
+ * @param {import('./types/index').Options} [opts]
5595
+ * @returns {string}
5596
+ */
5597
+ function normalizeString(uri, opts) {
5598
+ return normalizeStringWithStatus(uri, opts).normalized;
5599
+ }
5600
+ /**
5601
+ * @param {string} uri
5602
+ * @param {import('./types/index').Options} [opts]
5603
+ * @returns {{ normalized: string, malformedAuthorityOrPort: boolean }}
5604
+ */
5605
+ function normalizeStringWithStatus(uri, opts) {
5606
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
5607
+ return {
5608
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
5609
+ malformedAuthorityOrPort
5610
+ };
5611
+ }
5612
+ /**
5613
+ * @param {import ('./types/index').URIComponent|string} uri
5614
+ * @param {import('./types/index').Options} [opts]
5615
+ * @returns {string|undefined}
5616
+ */
5617
+ function normalizeComparableURI(uri, opts) {
5618
+ if (typeof uri === "string") {
5619
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
5620
+ return malformedAuthorityOrPort ? void 0 : normalized;
5621
+ }
5622
+ if (typeof uri === "object") return serialize(uri, opts);
5127
5623
  }
5128
5624
  var fastUri = {
5129
5625
  SCHEMES,
@@ -5139,7 +5635,7 @@ var require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5139
5635
  module.exports.fastUri = fastUri;
5140
5636
  }));
5141
5637
  //#endregion
5142
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js
5638
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
5143
5639
  var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
5144
5640
  Object.defineProperty(exports, "__esModule", { value: true });
5145
5641
  var uri = require_fast_uri();
@@ -5147,7 +5643,7 @@ var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
5147
5643
  exports.default = uri;
5148
5644
  }));
5149
5645
  //#endregion
5150
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js
5646
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js
5151
5647
  var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5152
5648
  Object.defineProperty(exports, "__esModule", { value: true });
5153
5649
  exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
@@ -5289,7 +5785,7 @@ var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5289
5785
  constructor(opts = {}) {
5290
5786
  this.schemas = {};
5291
5787
  this.refs = {};
5292
- this.formats = {};
5788
+ this.formats = Object.create(null);
5293
5789
  this._compilations = /* @__PURE__ */ new Set();
5294
5790
  this._loading = {};
5295
5791
  this._cache = /* @__PURE__ */ new Map();
@@ -5716,7 +6212,7 @@ var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5716
6212
  }
5717
6213
  }));
5718
6214
  //#endregion
5719
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js
6215
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
5720
6216
  var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
5721
6217
  Object.defineProperty(exports, "__esModule", { value: true });
5722
6218
  exports.default = {
@@ -5727,7 +6223,7 @@ var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
5727
6223
  };
5728
6224
  }));
5729
6225
  //#endregion
5730
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js
6226
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
5731
6227
  var require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {
5732
6228
  Object.defineProperty(exports, "__esModule", { value: true });
5733
6229
  exports.callRef = exports.getValidate = void 0;
@@ -5830,7 +6326,7 @@ var require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {
5830
6326
  exports.default = def;
5831
6327
  }));
5832
6328
  //#endregion
5833
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js
6329
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
5834
6330
  var require_core = /* @__PURE__ */ __commonJSMin(((exports) => {
5835
6331
  Object.defineProperty(exports, "__esModule", { value: true });
5836
6332
  var id_1 = require_id();
@@ -5847,7 +6343,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((exports) => {
5847
6343
  ];
5848
6344
  }));
5849
6345
  //#endregion
5850
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
6346
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
5851
6347
  var require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
5852
6348
  Object.defineProperty(exports, "__esModule", { value: true });
5853
6349
  var codegen_1 = require_codegen();
@@ -5890,7 +6386,7 @@ var require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
5890
6386
  };
5891
6387
  }));
5892
6388
  //#endregion
5893
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
6389
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
5894
6390
  var require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {
5895
6391
  Object.defineProperty(exports, "__esModule", { value: true });
5896
6392
  var codegen_1 = require_codegen();
@@ -5913,7 +6409,7 @@ var require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {
5913
6409
  };
5914
6410
  }));
5915
6411
  //#endregion
5916
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js
6412
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
5917
6413
  var require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {
5918
6414
  Object.defineProperty(exports, "__esModule", { value: true });
5919
6415
  function ucs2length(str) {
@@ -5935,7 +6431,7 @@ var require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {
5935
6431
  ucs2length.code = "require(\"ajv/dist/runtime/ucs2length\").default";
5936
6432
  }));
5937
6433
  //#endregion
5938
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
6434
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
5939
6435
  var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
5940
6436
  Object.defineProperty(exports, "__esModule", { value: true });
5941
6437
  var codegen_1 = require_codegen();
@@ -5962,7 +6458,7 @@ var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
5962
6458
  };
5963
6459
  }));
5964
6460
  //#endregion
5965
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
6461
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
5966
6462
  var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
5967
6463
  Object.defineProperty(exports, "__esModule", { value: true });
5968
6464
  var code_1 = require_code();
@@ -5994,7 +6490,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
5994
6490
  };
5995
6491
  }));
5996
6492
  //#endregion
5997
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
6493
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
5998
6494
  var require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
5999
6495
  Object.defineProperty(exports, "__esModule", { value: true });
6000
6496
  var codegen_1 = require_codegen();
@@ -6018,7 +6514,7 @@ var require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
6018
6514
  };
6019
6515
  }));
6020
6516
  //#endregion
6021
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js
6517
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
6022
6518
  var require_required = /* @__PURE__ */ __commonJSMin(((exports) => {
6023
6519
  Object.defineProperty(exports, "__esModule", { value: true });
6024
6520
  var code_1 = require_code();
@@ -6084,7 +6580,7 @@ var require_required = /* @__PURE__ */ __commonJSMin(((exports) => {
6084
6580
  };
6085
6581
  }));
6086
6582
  //#endregion
6087
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
6583
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
6088
6584
  var require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6089
6585
  Object.defineProperty(exports, "__esModule", { value: true });
6090
6586
  var codegen_1 = require_codegen();
@@ -6108,7 +6604,7 @@ var require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6108
6604
  };
6109
6605
  }));
6110
6606
  //#endregion
6111
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js
6607
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
6112
6608
  var require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {
6113
6609
  Object.defineProperty(exports, "__esModule", { value: true });
6114
6610
  var equal = require_fast_deep_equal();
@@ -6116,7 +6612,7 @@ var require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {
6116
6612
  exports.default = equal;
6117
6613
  }));
6118
6614
  //#endregion
6119
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
6615
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
6120
6616
  var require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6121
6617
  Object.defineProperty(exports, "__esModule", { value: true });
6122
6618
  var dataType_1 = require_dataType();
@@ -6179,7 +6675,7 @@ var require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6179
6675
  };
6180
6676
  }));
6181
6677
  //#endregion
6182
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js
6678
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
6183
6679
  var require_const = /* @__PURE__ */ __commonJSMin(((exports) => {
6184
6680
  Object.defineProperty(exports, "__esModule", { value: true });
6185
6681
  var codegen_1 = require_codegen();
@@ -6200,7 +6696,7 @@ var require_const = /* @__PURE__ */ __commonJSMin(((exports) => {
6200
6696
  };
6201
6697
  }));
6202
6698
  //#endregion
6203
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js
6699
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
6204
6700
  var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
6205
6701
  Object.defineProperty(exports, "__esModule", { value: true });
6206
6702
  var codegen_1 = require_codegen();
@@ -6243,7 +6739,7 @@ var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
6243
6739
  };
6244
6740
  }));
6245
6741
  //#endregion
6246
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js
6742
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
6247
6743
  var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
6248
6744
  Object.defineProperty(exports, "__esModule", { value: true });
6249
6745
  var limitNumber_1 = require_limitNumber();
@@ -6278,7 +6774,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
6278
6774
  ];
6279
6775
  }));
6280
6776
  //#endregion
6281
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
6777
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
6282
6778
  var require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6283
6779
  Object.defineProperty(exports, "__esModule", { value: true });
6284
6780
  exports.validateAdditionalItems = void 0;
@@ -6330,7 +6826,7 @@ var require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6330
6826
  exports.default = def;
6331
6827
  }));
6332
6828
  //#endregion
6333
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js
6829
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
6334
6830
  var require_items = /* @__PURE__ */ __commonJSMin(((exports) => {
6335
6831
  Object.defineProperty(exports, "__esModule", { value: true });
6336
6832
  exports.validateTuple = void 0;
@@ -6383,7 +6879,7 @@ var require_items = /* @__PURE__ */ __commonJSMin(((exports) => {
6383
6879
  exports.default = def;
6384
6880
  }));
6385
6881
  //#endregion
6386
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
6882
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
6387
6883
  var require_prefixItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6388
6884
  Object.defineProperty(exports, "__esModule", { value: true });
6389
6885
  var items_1 = require_items();
@@ -6396,7 +6892,7 @@ var require_prefixItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6396
6892
  };
6397
6893
  }));
6398
6894
  //#endregion
6399
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
6895
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
6400
6896
  var require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {
6401
6897
  Object.defineProperty(exports, "__esModule", { value: true });
6402
6898
  var codegen_1 = require_codegen();
@@ -6423,7 +6919,7 @@ var require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {
6423
6919
  };
6424
6920
  }));
6425
6921
  //#endregion
6426
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
6922
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
6427
6923
  var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
6428
6924
  Object.defineProperty(exports, "__esModule", { value: true });
6429
6925
  var codegen_1 = require_codegen();
@@ -6507,7 +7003,7 @@ var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
6507
7003
  };
6508
7004
  }));
6509
7005
  //#endregion
6510
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
7006
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
6511
7007
  var require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {
6512
7008
  Object.defineProperty(exports, "__esModule", { value: true });
6513
7009
  exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
@@ -6588,7 +7084,7 @@ var require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {
6588
7084
  exports.default = def;
6589
7085
  }));
6590
7086
  //#endregion
6591
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
7087
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
6592
7088
  var require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {
6593
7089
  Object.defineProperty(exports, "__esModule", { value: true });
6594
7090
  var codegen_1 = require_codegen();
@@ -6624,7 +7120,7 @@ var require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {
6624
7120
  };
6625
7121
  }));
6626
7122
  //#endregion
6627
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
7123
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
6628
7124
  var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
6629
7125
  Object.defineProperty(exports, "__esModule", { value: true });
6630
7126
  var code_1 = require_code();
@@ -6713,7 +7209,7 @@ var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
6713
7209
  };
6714
7210
  }));
6715
7211
  //#endregion
6716
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
7212
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
6717
7213
  var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
6718
7214
  Object.defineProperty(exports, "__esModule", { value: true });
6719
7215
  var validate_1 = require_validate();
@@ -6758,7 +7254,7 @@ var require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {
6758
7254
  };
6759
7255
  }));
6760
7256
  //#endregion
6761
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
7257
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
6762
7258
  var require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
6763
7259
  Object.defineProperty(exports, "__esModule", { value: true });
6764
7260
  var code_1 = require_code();
@@ -6813,7 +7309,7 @@ var require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
6813
7309
  };
6814
7310
  }));
6815
7311
  //#endregion
6816
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js
7312
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
6817
7313
  var require_not = /* @__PURE__ */ __commonJSMin(((exports) => {
6818
7314
  Object.defineProperty(exports, "__esModule", { value: true });
6819
7315
  var util_1 = require_util();
@@ -6840,7 +7336,7 @@ var require_not = /* @__PURE__ */ __commonJSMin(((exports) => {
6840
7336
  };
6841
7337
  }));
6842
7338
  //#endregion
6843
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
7339
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
6844
7340
  var require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {
6845
7341
  Object.defineProperty(exports, "__esModule", { value: true });
6846
7342
  exports.default = {
@@ -6852,7 +7348,7 @@ var require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {
6852
7348
  };
6853
7349
  }));
6854
7350
  //#endregion
6855
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
7351
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
6856
7352
  var require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {
6857
7353
  Object.defineProperty(exports, "__esModule", { value: true });
6858
7354
  var codegen_1 = require_codegen();
@@ -6898,7 +7394,7 @@ var require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {
6898
7394
  };
6899
7395
  }));
6900
7396
  //#endregion
6901
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
7397
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
6902
7398
  var require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {
6903
7399
  Object.defineProperty(exports, "__esModule", { value: true });
6904
7400
  var util_1 = require_util();
@@ -6923,7 +7419,7 @@ var require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {
6923
7419
  };
6924
7420
  }));
6925
7421
  //#endregion
6926
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js
7422
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
6927
7423
  var require_if = /* @__PURE__ */ __commonJSMin(((exports) => {
6928
7424
  Object.defineProperty(exports, "__esModule", { value: true });
6929
7425
  var codegen_1 = require_codegen();
@@ -6980,7 +7476,7 @@ var require_if = /* @__PURE__ */ __commonJSMin(((exports) => {
6980
7476
  exports.default = def;
6981
7477
  }));
6982
7478
  //#endregion
6983
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
7479
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
6984
7480
  var require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {
6985
7481
  Object.defineProperty(exports, "__esModule", { value: true });
6986
7482
  var util_1 = require_util();
@@ -6993,7 +7489,7 @@ var require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {
6993
7489
  };
6994
7490
  }));
6995
7491
  //#endregion
6996
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js
7492
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
6997
7493
  var require_applicator = /* @__PURE__ */ __commonJSMin(((exports) => {
6998
7494
  Object.defineProperty(exports, "__esModule", { value: true });
6999
7495
  var additionalItems_1 = require_additionalItems();
@@ -7034,7 +7530,7 @@ var require_applicator = /* @__PURE__ */ __commonJSMin(((exports) => {
7034
7530
  exports.default = getApplicator;
7035
7531
  }));
7036
7532
  //#endregion
7037
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js
7533
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
7038
7534
  var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
7039
7535
  Object.defineProperty(exports, "__esModule", { value: true });
7040
7536
  var codegen_1 = require_codegen();
@@ -7122,13 +7618,13 @@ var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
7122
7618
  };
7123
7619
  }));
7124
7620
  //#endregion
7125
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js
7621
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
7126
7622
  var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
7127
7623
  Object.defineProperty(exports, "__esModule", { value: true });
7128
7624
  exports.default = [require_format$1().default];
7129
7625
  }));
7130
7626
  //#endregion
7131
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js
7627
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
7132
7628
  var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
7133
7629
  Object.defineProperty(exports, "__esModule", { value: true });
7134
7630
  exports.contentVocabulary = exports.metadataVocabulary = void 0;
@@ -7148,7 +7644,7 @@ var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
7148
7644
  ];
7149
7645
  }));
7150
7646
  //#endregion
7151
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js
7647
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
7152
7648
  var require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {
7153
7649
  Object.defineProperty(exports, "__esModule", { value: true });
7154
7650
  var core_1 = require_core();
@@ -7166,7 +7662,7 @@ var require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {
7166
7662
  ];
7167
7663
  }));
7168
7664
  //#endregion
7169
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
7665
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
7170
7666
  var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
7171
7667
  Object.defineProperty(exports, "__esModule", { value: true });
7172
7668
  exports.DiscrError = void 0;
@@ -7177,7 +7673,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
7177
7673
  })(DiscrError || (exports.DiscrError = DiscrError = {}));
7178
7674
  }));
7179
7675
  //#endregion
7180
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
7676
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
7181
7677
  var require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {
7182
7678
  Object.defineProperty(exports, "__esModule", { value: true });
7183
7679
  var codegen_1 = require_codegen();
@@ -7270,7 +7766,7 @@ var require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {
7270
7766
  };
7271
7767
  }));
7272
7768
  //#endregion
7273
- //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
7769
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
7274
7770
  var json_schema_draft_07_exports = /* @__PURE__ */ __exportAll({
7275
7771
  $id: () => $id,
7276
7772
  $schema: () => $schema,
@@ -7424,7 +7920,7 @@ var init_json_schema_draft_07 = __esmMin((() => {
7424
7920
  };
7425
7921
  }));
7426
7922
  //#endregion
7427
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/identity.js
7923
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js
7428
7924
  var import_ajv = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
7429
7925
  Object.defineProperty(exports, "__esModule", { value: true });
7430
7926
  exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
@@ -7546,7 +8042,7 @@ function isNode(node) {
7546
8042
  }
7547
8043
  var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
7548
8044
  //#endregion
7549
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/visit.js
8045
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/visit.js
7550
8046
  var BREAK$1 = Symbol("break visit");
7551
8047
  var SKIP$1 = Symbol("skip children");
7552
8048
  var REMOVE$1 = Symbol("remove node");
@@ -7731,7 +8227,7 @@ function replaceNode(key, path, node) {
7731
8227
  }
7732
8228
  }
7733
8229
  //#endregion
7734
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/directives.js
8230
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js
7735
8231
  var escapeChars = {
7736
8232
  "!": "%21",
7737
8233
  ",": "%2C",
@@ -7891,7 +8387,7 @@ Directives.defaultYaml = {
7891
8387
  };
7892
8388
  Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
7893
8389
  //#endregion
7894
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/anchors.js
8390
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js
7895
8391
  /**
7896
8392
  * Verify that the input string is a valid anchor.
7897
8393
  *
@@ -7905,7 +8401,7 @@ function anchorIsValid(anchor) {
7905
8401
  return true;
7906
8402
  }
7907
8403
  //#endregion
7908
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/applyReviver.js
8404
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js
7909
8405
  /**
7910
8406
  * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,
7911
8407
  * in section 24.5.1.1 "Runtime Semantics: InternalizeJSONProperty" of the
@@ -7942,7 +8438,7 @@ function applyReviver(reviver, obj, key, val) {
7942
8438
  return reviver.call(obj, key, val);
7943
8439
  }
7944
8440
  //#endregion
7945
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/toJS.js
8441
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js
7946
8442
  /**
7947
8443
  * Recursively convert any node or its contents to native JavaScript
7948
8444
  *
@@ -7975,7 +8471,7 @@ function toJS(value, arg, ctx) {
7975
8471
  return value;
7976
8472
  }
7977
8473
  //#endregion
7978
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Node.js
8474
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js
7979
8475
  var NodeBase = class {
7980
8476
  constructor(type) {
7981
8477
  Object.defineProperty(this, NODE_TYPE, { value: type });
@@ -8003,7 +8499,7 @@ var NodeBase = class {
8003
8499
  }
8004
8500
  };
8005
8501
  //#endregion
8006
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Alias.js
8502
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js
8007
8503
  var Alias = class extends NodeBase {
8008
8504
  constructor(source) {
8009
8505
  super(ALIAS);
@@ -8017,6 +8513,7 @@ var Alias = class extends NodeBase {
8017
8513
  * instance of the `source` anchor before this node.
8018
8514
  */
8019
8515
  resolve(doc, ctx) {
8516
+ if (ctx?.maxAliasCount === 0) throw new ReferenceError("Alias resolution is disabled");
8020
8517
  let nodes;
8021
8518
  if (ctx?.aliasResolveCache) nodes = ctx.aliasResolveCache;
8022
8519
  else {
@@ -8088,7 +8585,7 @@ function getAliasCount(doc, node, anchors) {
8088
8585
  return 1;
8089
8586
  }
8090
8587
  //#endregion
8091
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Scalar.js
8588
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js
8092
8589
  var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
8093
8590
  var Scalar = class extends NodeBase {
8094
8591
  constructor(value) {
@@ -8108,7 +8605,7 @@ Scalar.PLAIN = "PLAIN";
8108
8605
  Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
8109
8606
  Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
8110
8607
  //#endregion
8111
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/doc/createNode.js
8608
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js
8112
8609
  var defaultTagPrefix = "tag:yaml.org,2002:";
8113
8610
  function findTagObject(value, tagName, tags) {
8114
8611
  if (tagName) {
@@ -8165,7 +8662,7 @@ function createNode(value, tagName, ctx) {
8165
8662
  return node;
8166
8663
  }
8167
8664
  //#endregion
8168
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Collection.js
8665
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js
8169
8666
  function collectionFromPath(schema, path, value) {
8170
8667
  let v = value;
8171
8668
  for (let i = path.length - 1; i >= 0; --i) {
@@ -8278,7 +8775,7 @@ var Collection = class extends NodeBase {
8278
8775
  }
8279
8776
  };
8280
8777
  //#endregion
8281
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyComment.js
8778
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyComment.js
8282
8779
  /**
8283
8780
  * Stringifies a comment.
8284
8781
  *
@@ -8293,7 +8790,7 @@ function indentComment(comment, indent) {
8293
8790
  }
8294
8791
  var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
8295
8792
  //#endregion
8296
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/foldFlowLines.js
8793
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/foldFlowLines.js
8297
8794
  var FOLD_FLOW = "flow";
8298
8795
  var FOLD_BLOCK = "block";
8299
8796
  var FOLD_QUOTED = "quoted";
@@ -8403,7 +8900,7 @@ function consumeMoreIndentedLines(text, i, indent) {
8403
8900
  return end;
8404
8901
  }
8405
8902
  //#endregion
8406
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyString.js
8903
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js
8407
8904
  var getFoldOptions = (ctx, isBlock) => ({
8408
8905
  indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
8409
8906
  lineWidth: ctx.options.lineWidth,
@@ -8622,7 +9119,7 @@ function stringifyString(item, ctx, onComment, onChompKeep) {
8622
9119
  return res;
8623
9120
  }
8624
9121
  //#endregion
8625
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringify.js
9122
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js
8626
9123
  function createStringifyContext(doc, options) {
8627
9124
  const opt = Object.assign({
8628
9125
  blockQuote: true,
@@ -8722,7 +9219,7 @@ function stringify$1(item, ctx, onComment, onChompKeep) {
8722
9219
  return isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}\n${ctx.indent}${str}`;
8723
9220
  }
8724
9221
  //#endregion
8725
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyPair.js
9222
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js
8726
9223
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
8727
9224
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
8728
9225
  let keyComment = isNode(key) && key.comment || null;
@@ -8812,12 +9309,12 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
8812
9309
  return str;
8813
9310
  }
8814
9311
  //#endregion
8815
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/log.js
9312
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js
8816
9313
  function warn(logLevel, warning) {
8817
9314
  if (logLevel === "debug" || logLevel === "warn") console.warn(warning);
8818
9315
  }
8819
9316
  //#endregion
8820
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
9317
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
8821
9318
  var MERGE_KEY = "<<";
8822
9319
  var merge = {
8823
9320
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
@@ -8829,13 +9326,13 @@ var merge = {
8829
9326
  };
8830
9327
  var isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
8831
9328
  function addMergeToJSMap(ctx, map, value) {
8832
- value = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
8833
- if (isSeq(value)) for (const it of value.items) mergeValue(ctx, map, it);
8834
- else if (Array.isArray(value)) for (const it of value) mergeValue(ctx, map, it);
8835
- else mergeValue(ctx, map, value);
9329
+ const source = resolveAliasValue(ctx, value);
9330
+ if (isSeq(source)) for (const it of source.items) mergeValue(ctx, map, it);
9331
+ else if (Array.isArray(source)) for (const it of source) mergeValue(ctx, map, it);
9332
+ else mergeValue(ctx, map, source);
8836
9333
  }
8837
9334
  function mergeValue(ctx, map, value) {
8838
- const source = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
9335
+ const source = resolveAliasValue(ctx, value);
8839
9336
  if (!isMap(source)) throw new Error("Merge sources must be maps or map aliases");
8840
9337
  const srcMap = source.toJSON(null, ctx, Map);
8841
9338
  for (const [key, value] of srcMap) if (map instanceof Map) {
@@ -8849,8 +9346,11 @@ function mergeValue(ctx, map, value) {
8849
9346
  });
8850
9347
  return map;
8851
9348
  }
9349
+ function resolveAliasValue(ctx, value) {
9350
+ return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
9351
+ }
8852
9352
  //#endregion
8853
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
9353
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
8854
9354
  function addPairToJSMap(ctx, map, { key, value }) {
8855
9355
  if (isNode(key) && key.addToJSMap) key.addToJSMap(ctx, map, value);
8856
9356
  else if (isMergeKey(ctx, key)) addMergeToJSMap(ctx, map, value);
@@ -8893,7 +9393,7 @@ function stringifyKey(key, jsKey, ctx) {
8893
9393
  return JSON.stringify(jsKey);
8894
9394
  }
8895
9395
  //#endregion
8896
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/Pair.js
9396
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js
8897
9397
  function createPair(key, value, ctx) {
8898
9398
  return new Pair(createNode(key, void 0, ctx), createNode(value, void 0, ctx));
8899
9399
  }
@@ -8917,7 +9417,7 @@ var Pair = class Pair {
8917
9417
  }
8918
9418
  };
8919
9419
  //#endregion
8920
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
9420
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
8921
9421
  function stringifyCollection(collection, ctx, options) {
8922
9422
  return (ctx.inFlow ?? collection.flow ? stringifyFlowCollection : stringifyBlockCollection)(collection, ctx, options);
8923
9423
  }
@@ -9029,7 +9529,7 @@ function addCommentBefore({ indent, options: { commentString } }, lines, comment
9029
9529
  }
9030
9530
  }
9031
9531
  //#endregion
9032
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/YAMLMap.js
9532
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js
9033
9533
  function findPair(items, key) {
9034
9534
  const k = isScalar(key) ? key.value : key;
9035
9535
  for (const it of items) if (isPair(it)) {
@@ -9128,7 +9628,7 @@ var YAMLMap = class extends Collection {
9128
9628
  }
9129
9629
  };
9130
9630
  //#endregion
9131
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/common/map.js
9631
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/map.js
9132
9632
  var map = {
9133
9633
  collection: "map",
9134
9634
  default: true,
@@ -9141,7 +9641,7 @@ var map = {
9141
9641
  createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx)
9142
9642
  };
9143
9643
  //#endregion
9144
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/nodes/YAMLSeq.js
9644
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLSeq.js
9145
9645
  var YAMLSeq = class extends Collection {
9146
9646
  static get tagName() {
9147
9647
  return "tag:yaml.org,2002:seq";
@@ -9238,7 +9738,7 @@ function asItemIndex(key) {
9238
9738
  return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
9239
9739
  }
9240
9740
  //#endregion
9241
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/common/seq.js
9741
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js
9242
9742
  var seq = {
9243
9743
  collection: "seq",
9244
9744
  default: true,
@@ -9251,7 +9751,7 @@ var seq = {
9251
9751
  createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx)
9252
9752
  };
9253
9753
  //#endregion
9254
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/json/schema.js
9754
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js
9255
9755
  function intIdentify(value) {
9256
9756
  return typeof value === "bigint" || Number.isInteger(value);
9257
9757
  }
@@ -9308,7 +9808,7 @@ var jsonScalars = [
9308
9808
  }
9309
9809
  });
9310
9810
  //#endregion
9311
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
9811
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
9312
9812
  function createPairs(schema, iterable, ctx) {
9313
9813
  const { replacer } = ctx;
9314
9814
  const pairs = new YAMLSeq(schema);
@@ -9319,504 +9819,220 @@ function createPairs(schema, iterable, ctx) {
9319
9819
  let key, value;
9320
9820
  if (Array.isArray(it)) if (it.length === 2) {
9321
9821
  key = it[0];
9322
- value = it[1];
9323
- } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
9324
- else if (it && it instanceof Object) {
9325
- const keys = Object.keys(it);
9326
- if (keys.length === 1) {
9327
- key = keys[0];
9328
- value = it[key];
9329
- } else throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
9330
- } else key = it;
9331
- pairs.items.push(createPair(key, value, ctx));
9332
- }
9333
- return pairs;
9334
- }
9335
- //#endregion
9336
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
9337
- var YAMLOMap = class YAMLOMap extends YAMLSeq {
9338
- constructor() {
9339
- super();
9340
- this.add = YAMLMap.prototype.add.bind(this);
9341
- this.delete = YAMLMap.prototype.delete.bind(this);
9342
- this.get = YAMLMap.prototype.get.bind(this);
9343
- this.has = YAMLMap.prototype.has.bind(this);
9344
- this.set = YAMLMap.prototype.set.bind(this);
9345
- this.tag = YAMLOMap.tag;
9346
- }
9347
- /**
9348
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
9349
- * but TypeScript won't allow widening the signature of a child method.
9350
- */
9351
- toJSON(_, ctx) {
9352
- if (!ctx) return super.toJSON(_);
9353
- const map = /* @__PURE__ */ new Map();
9354
- if (ctx?.onCreate) ctx.onCreate(map);
9355
- for (const pair of this.items) {
9356
- let key, value;
9357
- if (isPair(pair)) {
9358
- key = toJS(pair.key, "", ctx);
9359
- value = toJS(pair.value, key, ctx);
9360
- } else key = toJS(pair, "", ctx);
9361
- if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys");
9362
- map.set(key, value);
9363
- }
9364
- return map;
9365
- }
9366
- static from(schema, iterable, ctx) {
9367
- const pairs = createPairs(schema, iterable, ctx);
9368
- const omap = new this();
9369
- omap.items = pairs.items;
9370
- return omap;
9371
- }
9372
- };
9373
- YAMLOMap.tag = "tag:yaml.org,2002:omap";
9374
- //#endregion
9375
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
9376
- var YAMLSet = class YAMLSet extends YAMLMap {
9377
- constructor(schema) {
9378
- super(schema);
9379
- this.tag = YAMLSet.tag;
9380
- }
9381
- add(key) {
9382
- let pair;
9383
- if (isPair(key)) pair = key;
9384
- else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) pair = new Pair(key.key, null);
9385
- else pair = new Pair(key, null);
9386
- if (!findPair(this.items, pair.key)) this.items.push(pair);
9387
- }
9388
- /**
9389
- * If `keepPair` is `true`, returns the Pair matching `key`.
9390
- * Otherwise, returns the value of that Pair's key.
9391
- */
9392
- get(key, keepPair) {
9393
- const pair = findPair(this.items, key);
9394
- return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair;
9395
- }
9396
- set(key, value) {
9397
- if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
9398
- const prev = findPair(this.items, key);
9399
- if (prev && !value) this.items.splice(this.items.indexOf(prev), 1);
9400
- else if (!prev && value) this.items.push(new Pair(key));
9401
- }
9402
- toJSON(_, ctx) {
9403
- return super.toJSON(_, ctx, Set);
9404
- }
9405
- toString(ctx, onComment, onChompKeep) {
9406
- if (!ctx) return JSON.stringify(this);
9407
- if (this.hasAllNullValues(true)) return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
9408
- else throw new Error("Set items must all have null values");
9409
- }
9410
- static from(schema, iterable, ctx) {
9411
- const { replacer } = ctx;
9412
- const set = new this(schema);
9413
- if (iterable && Symbol.iterator in Object(iterable)) for (let value of iterable) {
9414
- if (typeof replacer === "function") value = replacer.call(iterable, value, value);
9415
- set.items.push(createPair(value, null, ctx));
9416
- }
9417
- return set;
9418
- }
9419
- };
9420
- YAMLSet.tag = "tag:yaml.org,2002:set";
9421
- //#endregion
9422
- //#region ../../node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/browser/dist/parse/cst-visit.js
9423
- var BREAK = Symbol("break visit");
9424
- var SKIP = Symbol("skip children");
9425
- var REMOVE = Symbol("remove item");
9426
- /**
9427
- * Apply a visitor to a CST document or item.
9428
- *
9429
- * Walks through the tree (depth-first) starting from the root, calling a
9430
- * `visitor` function with two arguments when entering each item:
9431
- * - `item`: The current item, which included the following members:
9432
- * - `start: SourceToken[]` – Source tokens before the key or value,
9433
- * possibly including its anchor or tag.
9434
- * - `key?: Token | null` – Set for pair values. May then be `null`, if
9435
- * the key before the `:` separator is empty.
9436
- * - `sep?: SourceToken[]` – Source tokens between the key and the value,
9437
- * which should include the `:` map value indicator if `value` is set.
9438
- * - `value?: Token` – The value of a sequence item, or of a map pair.
9439
- * - `path`: The steps from the root to the current node, as an array of
9440
- * `['key' | 'value', number]` tuples.
9441
- *
9442
- * The return value of the visitor may be used to control the traversal:
9443
- * - `undefined` (default): Do nothing and continue
9444
- * - `visit.SKIP`: Do not visit the children of this token, continue with
9445
- * next sibling
9446
- * - `visit.BREAK`: Terminate traversal completely
9447
- * - `visit.REMOVE`: Remove the current item, then continue with the next one
9448
- * - `number`: Set the index of the next step. This is useful especially if
9449
- * the index of the current token has changed.
9450
- * - `function`: Define the next visitor for this item. After the original
9451
- * visitor is called on item entry, next visitors are called after handling
9452
- * a non-empty `key` and when exiting the item.
9453
- */
9454
- function visit(cst, visitor) {
9455
- if ("type" in cst && cst.type === "document") cst = {
9456
- start: cst.start,
9457
- value: cst.value
9458
- };
9459
- _visit(Object.freeze([]), cst, visitor);
9460
- }
9461
- /** Terminate visit traversal completely */
9462
- visit.BREAK = BREAK;
9463
- /** Do not visit the children of the current item */
9464
- visit.SKIP = SKIP;
9465
- /** Remove the current item */
9466
- visit.REMOVE = REMOVE;
9467
- /** Find the item at `path` from `cst` as the root */
9468
- visit.itemAtPath = (cst, path) => {
9469
- let item = cst;
9470
- for (const [field, index] of path) {
9471
- const tok = item?.[field];
9472
- if (tok && "items" in tok) item = tok.items[index];
9473
- else return void 0;
9474
- }
9475
- return item;
9476
- };
9477
- /**
9478
- * Get the immediate parent collection of the item at `path` from `cst` as the root.
9479
- *
9480
- * Throws an error if the collection is not found, which should never happen if the item itself exists.
9481
- */
9482
- visit.parentCollection = (cst, path) => {
9483
- const parent = visit.itemAtPath(cst, path.slice(0, -1));
9484
- const field = path[path.length - 1][0];
9485
- const coll = parent?.[field];
9486
- if (coll && "items" in coll) return coll;
9487
- throw new Error("Parent collection not found");
9488
- };
9489
- function _visit(path, item, visitor) {
9490
- let ctrl = visitor(item, path);
9491
- if (typeof ctrl === "symbol") return ctrl;
9492
- for (const field of ["key", "value"]) {
9493
- const token = item[field];
9494
- if (token && "items" in token) {
9495
- for (let i = 0; i < token.items.length; ++i) {
9496
- const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
9497
- if (typeof ci === "number") i = ci - 1;
9498
- else if (ci === BREAK) return BREAK;
9499
- else if (ci === REMOVE) {
9500
- token.items.splice(i, 1);
9501
- i -= 1;
9502
- }
9503
- }
9504
- if (typeof ctrl === "function" && field === "key") ctrl = ctrl(item, path);
9505
- }
9506
- }
9507
- return typeof ctrl === "function" ? ctrl(item, path) : ctrl;
9508
- }
9509
- //#endregion
9510
- //#region ../compiler/dist/src/yaml/diagnostics.js
9511
- function getLocationInYamlScript(file, path, kind = "value") {
9512
- const node = findYamlNode(file, path, kind);
9513
- return {
9514
- file: file.file,
9515
- pos: node?.range?.[0] ?? 0,
9516
- end: node?.range?.[1] ?? 0
9517
- };
9518
- }
9519
- function findYamlNode(file, path, kind = "value") {
9520
- let current = file.doc.contents;
9521
- for (let i = 0; i < path.length; i++) {
9522
- const key = path[i];
9523
- const isLast = i === path.length - 1;
9524
- if (isScalar(current)) return current;
9525
- else if (isCollection(current)) if (isLast) if (kind === "value" || !isMap(current)) if (Array.isArray(current.items) && current.items.every((item) => isScalar(item))) return current.items.find((m) => m.source && m.source === key);
9526
- else return current.get(key, true);
9527
- else {
9528
- const pair = findPair(current.items, key);
9529
- if (kind === "key") return pair?.key;
9530
- else return pair;
9531
- }
9532
- else current = current.get(key, true);
9533
- else continue;
9822
+ value = it[1];
9823
+ } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
9824
+ else if (it && it instanceof Object) {
9825
+ const keys = Object.keys(it);
9826
+ if (keys.length === 1) {
9827
+ key = keys[0];
9828
+ value = it[key];
9829
+ } else throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
9830
+ } else key = it;
9831
+ pairs.items.push(createPair(key, value, ctx));
9534
9832
  }
9535
- return current ?? void 0;
9833
+ return pairs;
9536
9834
  }
9537
9835
  //#endregion
9538
- //#region ../compiler/dist/src/core/source-file.js
9539
- function createSourceFile(text, path) {
9540
- let lineStarts = void 0;
9541
- return {
9542
- text,
9543
- path,
9544
- getLineStarts,
9545
- getLineAndCharacterOfPosition
9546
- };
9547
- function getLineStarts() {
9548
- return lineStarts = lineStarts ?? scanLineStarts(text);
9549
- }
9550
- function getLineAndCharacterOfPosition(position) {
9551
- const starts = getLineStarts();
9552
- let line = binarySearch(starts, position);
9553
- if (line < 0) line = ~line - 1;
9554
- return {
9555
- line,
9556
- character: position - starts[line]
9557
- };
9836
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
9837
+ var YAMLOMap = class YAMLOMap extends YAMLSeq {
9838
+ constructor() {
9839
+ super();
9840
+ this.add = YAMLMap.prototype.add.bind(this);
9841
+ this.delete = YAMLMap.prototype.delete.bind(this);
9842
+ this.get = YAMLMap.prototype.get.bind(this);
9843
+ this.has = YAMLMap.prototype.has.bind(this);
9844
+ this.set = YAMLMap.prototype.set.bind(this);
9845
+ this.tag = YAMLOMap.tag;
9558
9846
  }
9559
- }
9560
- function scanLineStarts(text) {
9561
- const starts = [];
9562
- let start = 0;
9563
- let pos = 0;
9564
- while (pos < text.length) {
9565
- const ch = text.charCodeAt(pos);
9566
- pos++;
9567
- switch (ch) {
9568
- case 13: if (text.charCodeAt(pos) === 10) pos++;
9569
- case 10:
9570
- starts.push(start);
9571
- start = pos;
9572
- break;
9847
+ /**
9848
+ * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
9849
+ * but TypeScript won't allow widening the signature of a child method.
9850
+ */
9851
+ toJSON(_, ctx) {
9852
+ if (!ctx) return super.toJSON(_);
9853
+ const map = /* @__PURE__ */ new Map();
9854
+ if (ctx?.onCreate) ctx.onCreate(map);
9855
+ for (const pair of this.items) {
9856
+ let key, value;
9857
+ if (isPair(pair)) {
9858
+ key = toJS(pair.key, "", ctx);
9859
+ value = toJS(pair.value, key, ctx);
9860
+ } else key = toJS(pair, "", ctx);
9861
+ if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys");
9862
+ map.set(key, value);
9573
9863
  }
9864
+ return map;
9574
9865
  }
9575
- starts.push(start);
9576
- return starts;
9577
- }
9578
- /**
9579
- * Search sorted array of numbers for the given value. If found, return index
9580
- * in array where value was found. If not found, return a negative number that
9581
- * is the bitwise complement of the index where value would need to be inserted
9582
- * to keep the array sorted.
9583
- */
9584
- function binarySearch(array, value) {
9585
- let low = 0;
9586
- let high = array.length - 1;
9587
- while (low <= high) {
9588
- const middle = low + (high - low >> 1);
9589
- const v = array[middle];
9590
- if (v < value) low = middle + 1;
9591
- else if (v > value) high = middle - 1;
9592
- else return middle;
9866
+ static from(schema, iterable, ctx) {
9867
+ const pairs = createPairs(schema, iterable, ctx);
9868
+ const omap = new this();
9869
+ omap.items = pairs.items;
9870
+ return omap;
9593
9871
  }
9594
- return ~low;
9595
- }
9872
+ };
9873
+ YAMLOMap.tag = "tag:yaml.org,2002:omap";
9596
9874
  //#endregion
9597
- //#region ../compiler/dist/src/core/types.js
9598
- var ResolutionResultFlags;
9599
- (function(ResolutionResultFlags) {
9600
- ResolutionResultFlags[ResolutionResultFlags["None"] = 0] = "None";
9601
- ResolutionResultFlags[ResolutionResultFlags["Resolved"] = 2] = "Resolved";
9602
- ResolutionResultFlags[ResolutionResultFlags["Unknown"] = 4] = "Unknown";
9603
- ResolutionResultFlags[ResolutionResultFlags["Ambiguous"] = 8] = "Ambiguous";
9604
- ResolutionResultFlags[ResolutionResultFlags["NotFound"] = 16] = "NotFound";
9605
- ResolutionResultFlags[ResolutionResultFlags["ResolutionFailed"] = 28] = "ResolutionFailed";
9606
- })(ResolutionResultFlags || (ResolutionResultFlags = {}));
9607
- /**
9608
- * AST types
9609
- */
9610
- var SyntaxKind;
9611
- (function(SyntaxKind) {
9612
- SyntaxKind[SyntaxKind["TypeSpecScript"] = 0] = "TypeSpecScript";
9613
- SyntaxKind[SyntaxKind["JsSourceFile"] = 1] = "JsSourceFile";
9614
- SyntaxKind[SyntaxKind["ImportStatement"] = 2] = "ImportStatement";
9615
- SyntaxKind[SyntaxKind["Identifier"] = 3] = "Identifier";
9616
- SyntaxKind[SyntaxKind["AugmentDecoratorStatement"] = 4] = "AugmentDecoratorStatement";
9617
- SyntaxKind[SyntaxKind["DecoratorExpression"] = 5] = "DecoratorExpression";
9618
- SyntaxKind[SyntaxKind["DirectiveExpression"] = 6] = "DirectiveExpression";
9619
- SyntaxKind[SyntaxKind["MemberExpression"] = 7] = "MemberExpression";
9620
- SyntaxKind[SyntaxKind["NamespaceStatement"] = 8] = "NamespaceStatement";
9621
- SyntaxKind[SyntaxKind["UsingStatement"] = 9] = "UsingStatement";
9622
- SyntaxKind[SyntaxKind["OperationStatement"] = 10] = "OperationStatement";
9623
- SyntaxKind[SyntaxKind["OperationSignatureDeclaration"] = 11] = "OperationSignatureDeclaration";
9624
- SyntaxKind[SyntaxKind["OperationSignatureReference"] = 12] = "OperationSignatureReference";
9625
- SyntaxKind[SyntaxKind["ModelStatement"] = 13] = "ModelStatement";
9626
- SyntaxKind[SyntaxKind["ModelExpression"] = 14] = "ModelExpression";
9627
- SyntaxKind[SyntaxKind["ModelProperty"] = 15] = "ModelProperty";
9628
- SyntaxKind[SyntaxKind["ModelSpreadProperty"] = 16] = "ModelSpreadProperty";
9629
- SyntaxKind[SyntaxKind["ScalarStatement"] = 17] = "ScalarStatement";
9630
- SyntaxKind[SyntaxKind["InterfaceStatement"] = 18] = "InterfaceStatement";
9631
- SyntaxKind[SyntaxKind["UnionStatement"] = 19] = "UnionStatement";
9632
- SyntaxKind[SyntaxKind["UnionVariant"] = 20] = "UnionVariant";
9633
- SyntaxKind[SyntaxKind["EnumStatement"] = 21] = "EnumStatement";
9634
- SyntaxKind[SyntaxKind["EnumMember"] = 22] = "EnumMember";
9635
- SyntaxKind[SyntaxKind["EnumSpreadMember"] = 23] = "EnumSpreadMember";
9636
- SyntaxKind[SyntaxKind["AliasStatement"] = 24] = "AliasStatement";
9637
- SyntaxKind[SyntaxKind["DecoratorDeclarationStatement"] = 25] = "DecoratorDeclarationStatement";
9638
- SyntaxKind[SyntaxKind["FunctionDeclarationStatement"] = 26] = "FunctionDeclarationStatement";
9639
- SyntaxKind[SyntaxKind["FunctionParameter"] = 27] = "FunctionParameter";
9640
- SyntaxKind[SyntaxKind["UnionExpression"] = 28] = "UnionExpression";
9641
- SyntaxKind[SyntaxKind["IntersectionExpression"] = 29] = "IntersectionExpression";
9642
- SyntaxKind[SyntaxKind["TupleExpression"] = 30] = "TupleExpression";
9643
- SyntaxKind[SyntaxKind["ArrayExpression"] = 31] = "ArrayExpression";
9644
- SyntaxKind[SyntaxKind["StringLiteral"] = 32] = "StringLiteral";
9645
- SyntaxKind[SyntaxKind["NumericLiteral"] = 33] = "NumericLiteral";
9646
- SyntaxKind[SyntaxKind["BooleanLiteral"] = 34] = "BooleanLiteral";
9647
- SyntaxKind[SyntaxKind["StringTemplateExpression"] = 35] = "StringTemplateExpression";
9648
- SyntaxKind[SyntaxKind["StringTemplateHead"] = 36] = "StringTemplateHead";
9649
- SyntaxKind[SyntaxKind["StringTemplateMiddle"] = 37] = "StringTemplateMiddle";
9650
- SyntaxKind[SyntaxKind["StringTemplateTail"] = 38] = "StringTemplateTail";
9651
- SyntaxKind[SyntaxKind["StringTemplateSpan"] = 39] = "StringTemplateSpan";
9652
- SyntaxKind[SyntaxKind["ExternKeyword"] = 40] = "ExternKeyword";
9653
- SyntaxKind[SyntaxKind["VoidKeyword"] = 41] = "VoidKeyword";
9654
- SyntaxKind[SyntaxKind["NeverKeyword"] = 42] = "NeverKeyword";
9655
- SyntaxKind[SyntaxKind["UnknownKeyword"] = 43] = "UnknownKeyword";
9656
- SyntaxKind[SyntaxKind["ValueOfExpression"] = 44] = "ValueOfExpression";
9657
- SyntaxKind[SyntaxKind["TypeReference"] = 45] = "TypeReference";
9658
- SyntaxKind[SyntaxKind["TemplateParameterDeclaration"] = 46] = "TemplateParameterDeclaration";
9659
- SyntaxKind[SyntaxKind["EmptyStatement"] = 47] = "EmptyStatement";
9660
- SyntaxKind[SyntaxKind["InvalidStatement"] = 48] = "InvalidStatement";
9661
- SyntaxKind[SyntaxKind["LineComment"] = 49] = "LineComment";
9662
- SyntaxKind[SyntaxKind["BlockComment"] = 50] = "BlockComment";
9663
- SyntaxKind[SyntaxKind["Doc"] = 51] = "Doc";
9664
- SyntaxKind[SyntaxKind["DocText"] = 52] = "DocText";
9665
- SyntaxKind[SyntaxKind["DocParamTag"] = 53] = "DocParamTag";
9666
- SyntaxKind[SyntaxKind["DocPropTag"] = 54] = "DocPropTag";
9667
- SyntaxKind[SyntaxKind["DocReturnsTag"] = 55] = "DocReturnsTag";
9668
- SyntaxKind[SyntaxKind["DocErrorsTag"] = 56] = "DocErrorsTag";
9669
- SyntaxKind[SyntaxKind["DocTemplateTag"] = 57] = "DocTemplateTag";
9670
- SyntaxKind[SyntaxKind["DocUnknownTag"] = 58] = "DocUnknownTag";
9671
- SyntaxKind[SyntaxKind["Return"] = 59] = "Return";
9672
- SyntaxKind[SyntaxKind["JsNamespaceDeclaration"] = 60] = "JsNamespaceDeclaration";
9673
- SyntaxKind[SyntaxKind["TemplateArgument"] = 61] = "TemplateArgument";
9674
- SyntaxKind[SyntaxKind["TypeOfExpression"] = 62] = "TypeOfExpression";
9675
- SyntaxKind[SyntaxKind["ObjectLiteral"] = 63] = "ObjectLiteral";
9676
- SyntaxKind[SyntaxKind["ObjectLiteralProperty"] = 64] = "ObjectLiteralProperty";
9677
- SyntaxKind[SyntaxKind["ObjectLiteralSpreadProperty"] = 65] = "ObjectLiteralSpreadProperty";
9678
- SyntaxKind[SyntaxKind["ArrayLiteral"] = 66] = "ArrayLiteral";
9679
- SyntaxKind[SyntaxKind["ConstStatement"] = 67] = "ConstStatement";
9680
- SyntaxKind[SyntaxKind["CallExpression"] = 68] = "CallExpression";
9681
- SyntaxKind[SyntaxKind["ScalarConstructor"] = 69] = "ScalarConstructor";
9682
- SyntaxKind[SyntaxKind["InternalKeyword"] = 70] = "InternalKeyword";
9683
- SyntaxKind[SyntaxKind["FunctionTypeExpression"] = 71] = "FunctionTypeExpression";
9684
- })(SyntaxKind || (SyntaxKind = {}));
9685
- var IdentifierKind;
9686
- (function(IdentifierKind) {
9687
- IdentifierKind[IdentifierKind["TypeReference"] = 0] = "TypeReference";
9688
- IdentifierKind[IdentifierKind["TemplateArgument"] = 1] = "TemplateArgument";
9689
- IdentifierKind[IdentifierKind["Decorator"] = 2] = "Decorator";
9690
- IdentifierKind[IdentifierKind["Function"] = 3] = "Function";
9691
- IdentifierKind[IdentifierKind["Using"] = 4] = "Using";
9692
- IdentifierKind[IdentifierKind["Declaration"] = 5] = "Declaration";
9693
- IdentifierKind[IdentifierKind["ModelExpressionProperty"] = 6] = "ModelExpressionProperty";
9694
- IdentifierKind[IdentifierKind["ModelStatementProperty"] = 7] = "ModelStatementProperty";
9695
- IdentifierKind[IdentifierKind["ObjectLiteralProperty"] = 8] = "ObjectLiteralProperty";
9696
- IdentifierKind[IdentifierKind["Other"] = 9] = "Other";
9697
- })(IdentifierKind || (IdentifierKind = {}));
9698
- /** Used to explicitly specify that a diagnostic has no target. */
9699
- var NoTarget = Symbol.for("NoTarget");
9700
- var ListenerFlow;
9701
- (function(ListenerFlow) {
9875
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
9876
+ var YAMLSet = class YAMLSet extends YAMLMap {
9877
+ constructor(schema) {
9878
+ super(schema);
9879
+ this.tag = YAMLSet.tag;
9880
+ }
9881
+ add(key) {
9882
+ let pair;
9883
+ if (isPair(key)) pair = key;
9884
+ else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) pair = new Pair(key.key, null);
9885
+ else pair = new Pair(key, null);
9886
+ if (!findPair(this.items, pair.key)) this.items.push(pair);
9887
+ }
9702
9888
  /**
9703
- * Do not navigate any containing or referenced type.
9889
+ * If `keepPair` is `true`, returns the Pair matching `key`.
9890
+ * Otherwise, returns the value of that Pair's key.
9704
9891
  */
9705
- ListenerFlow[ListenerFlow["NoRecursion"] = 1] = "NoRecursion";
9706
- })(ListenerFlow || (ListenerFlow = {}));
9892
+ get(key, keepPair) {
9893
+ const pair = findPair(this.items, key);
9894
+ return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair;
9895
+ }
9896
+ set(key, value) {
9897
+ if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
9898
+ const prev = findPair(this.items, key);
9899
+ if (prev && !value) this.items.splice(this.items.indexOf(prev), 1);
9900
+ else if (!prev && value) this.items.push(new Pair(key));
9901
+ }
9902
+ toJSON(_, ctx) {
9903
+ return super.toJSON(_, ctx, Set);
9904
+ }
9905
+ toString(ctx, onComment, onChompKeep) {
9906
+ if (!ctx) return JSON.stringify(this);
9907
+ if (this.hasAllNullValues(true)) return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
9908
+ else throw new Error("Set items must all have null values");
9909
+ }
9910
+ static from(schema, iterable, ctx) {
9911
+ const { replacer } = ctx;
9912
+ const set = new this(schema);
9913
+ if (iterable && Symbol.iterator in Object(iterable)) for (let value of iterable) {
9914
+ if (typeof replacer === "function") value = replacer.call(iterable, value, value);
9915
+ set.items.push(createPair(value, null, ctx));
9916
+ }
9917
+ return set;
9918
+ }
9919
+ };
9920
+ YAMLSet.tag = "tag:yaml.org,2002:set";
9707
9921
  //#endregion
9708
- //#region ../compiler/dist/src/core/diagnostics.js
9922
+ //#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js
9923
+ var BREAK = Symbol("break visit");
9924
+ var SKIP = Symbol("skip children");
9925
+ var REMOVE = Symbol("remove item");
9709
9926
  /**
9710
- * Find the syntax node for a TypeSpec diagnostic target.
9927
+ * Apply a visitor to a CST document or item.
9711
9928
  *
9712
- * This function extracts the AST node from various types of diagnostic targets:
9713
- * - For template instance targets: returns the node of the template declaration
9714
- * - For symbols: returns the first declaration node (or symbol source for using symbols)
9715
- * - For AST nodes: returns the node itself
9716
- * - For types: returns the node associated with the type
9929
+ * Walks through the tree (depth-first) starting from the root, calling a
9930
+ * `visitor` function with two arguments when entering each item:
9931
+ * - `item`: The current item, which included the following members:
9932
+ * - `start: SourceToken[]` Source tokens before the key or value,
9933
+ * possibly including its anchor or tag.
9934
+ * - `key?: Token | null` – Set for pair values. May then be `null`, if
9935
+ * the key before the `:` separator is empty.
9936
+ * - `sep?: SourceToken[]` – Source tokens between the key and the value,
9937
+ * which should include the `:` map value indicator if `value` is set.
9938
+ * - `value?: Token` – The value of a sequence item, or of a map pair.
9939
+ * - `path`: The steps from the root to the current node, as an array of
9940
+ * `['key' | 'value', number]` tuples.
9717
9941
  *
9718
- * @param target The diagnostic target to extract a node from. Can be a template instance,
9719
- * symbol, AST node, or type.
9720
- * @returns The AST node associated with the target, or undefined if the target is a type
9721
- * or symbol that doesn't have an associated node.
9942
+ * The return value of the visitor may be used to control the traversal:
9943
+ * - `undefined` (default): Do nothing and continue
9944
+ * - `visit.SKIP`: Do not visit the children of this token, continue with
9945
+ * next sibling
9946
+ * - `visit.BREAK`: Terminate traversal completely
9947
+ * - `visit.REMOVE`: Remove the current item, then continue with the next one
9948
+ * - `number`: Set the index of the next step. This is useful especially if
9949
+ * the index of the current token has changed.
9950
+ * - `function`: Define the next visitor for this item. After the original
9951
+ * visitor is called on item entry, next visitors are called after handling
9952
+ * a non-empty `key` and when exiting the item.
9722
9953
  */
9723
- function getNodeForTarget(target) {
9724
- if (!("kind" in target) && !("entityKind" in target)) {
9725
- if (!("declarations" in target)) return target.node;
9726
- if (target.flags & 8192) target = target.symbolSource;
9727
- return target.declarations[0];
9728
- } else if ("kind" in target && typeof target.kind === "number") return target;
9729
- else return target.node;
9730
- }
9731
- function getSourceLocation(target, options = {}) {
9732
- if (target === NoTarget || target === void 0) return;
9733
- if ("file" in target) return target;
9734
- const node = getNodeForTarget(target);
9735
- return node ? getSourceLocationOfNode(node, options) : createSyntheticSourceLocation();
9736
- }
9737
- function createSyntheticSourceLocation(loc = "<unknown location>") {
9738
- return {
9739
- file: createSourceFile("", loc),
9740
- pos: 0,
9741
- end: 0,
9742
- isSynthetic: true
9743
- };
9744
- }
9745
- function getSourceLocationOfNode(node, options) {
9746
- let root = node;
9747
- while (root.parent !== void 0) root = root.parent;
9748
- if (root.kind !== SyntaxKind.TypeSpecScript && root.kind !== SyntaxKind.JsSourceFile) return createSyntheticSourceLocation(node.flags & 8 ? void 0 : "<unknown location - cannot obtain source location of unbound node - file bug at https://github.com/microsoft/typespec>");
9749
- if (options.locateId && "id" in node && node.id !== void 0) node = node.id;
9750
- return {
9751
- file: root.file,
9752
- pos: node.pos,
9753
- end: node.end
9954
+ function visit(cst, visitor) {
9955
+ if ("type" in cst && cst.type === "document") cst = {
9956
+ start: cst.start,
9957
+ value: cst.value
9754
9958
  };
9959
+ _visit(Object.freeze([]), cst, visitor);
9755
9960
  }
9961
+ /** Terminate visit traversal completely */
9962
+ visit.BREAK = BREAK;
9963
+ /** Do not visit the children of the current item */
9964
+ visit.SKIP = SKIP;
9965
+ /** Remove the current item */
9966
+ visit.REMOVE = REMOVE;
9967
+ /** Find the item at `path` from `cst` as the root */
9968
+ visit.itemAtPath = (cst, path) => {
9969
+ let item = cst;
9970
+ for (const [field, index] of path) {
9971
+ const tok = item?.[field];
9972
+ if (tok && "items" in tok) item = tok.items[index];
9973
+ else return void 0;
9974
+ }
9975
+ return item;
9976
+ };
9756
9977
  /**
9757
- * Use this to report bugs in the compiler, and not errors in the source code
9758
- * being compiled.
9759
- *
9760
- * @param condition Throw if this is not true.
9761
- *
9762
- * @param message Error message.
9978
+ * Get the immediate parent collection of the item at `path` from `cst` as the root.
9763
9979
  *
9764
- * @param target Optional location in source code that might give a clue about
9765
- * what got the compiler off track.
9980
+ * Throws an error if the collection is not found, which should never happen if the item itself exists.
9766
9981
  */
9767
- function compilerAssert(condition, message, target) {
9768
- if (condition) return;
9769
- if (target) {
9770
- let location;
9771
- try {
9772
- location = getSourceLocation(target);
9773
- } catch (err) {}
9774
- if (location) {
9775
- const pos = location.file.getLineAndCharacterOfPosition(location.pos);
9776
- const file = location.file.path;
9777
- const line = pos.line + 1;
9778
- const col = pos.character + 1;
9779
- message += `\nOccurred while compiling code in ${file} near line ${line}, column ${col}`;
9982
+ visit.parentCollection = (cst, path) => {
9983
+ const parent = visit.itemAtPath(cst, path.slice(0, -1));
9984
+ const field = path[path.length - 1][0];
9985
+ const coll = parent?.[field];
9986
+ if (coll && "items" in coll) return coll;
9987
+ throw new Error("Parent collection not found");
9988
+ };
9989
+ function _visit(path, item, visitor) {
9990
+ let ctrl = visitor(item, path);
9991
+ if (typeof ctrl === "symbol") return ctrl;
9992
+ for (const field of ["key", "value"]) {
9993
+ const token = item[field];
9994
+ if (token && "items" in token) {
9995
+ for (let i = 0; i < token.items.length; ++i) {
9996
+ const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
9997
+ if (typeof ci === "number") i = ci - 1;
9998
+ else if (ci === BREAK) return BREAK;
9999
+ else if (ci === REMOVE) {
10000
+ token.items.splice(i, 1);
10001
+ i -= 1;
10002
+ }
10003
+ }
10004
+ if (typeof ctrl === "function" && field === "key") ctrl = ctrl(item, path);
9780
10005
  }
9781
10006
  }
9782
- throw new Error(message);
10007
+ return typeof ctrl === "function" ? ctrl(item, path) : ctrl;
9783
10008
  }
9784
- /**
9785
- * Create a new instance of the @see DiagnosticCollector.
9786
- */
9787
- function createDiagnosticCollector() {
9788
- const diagnostics = [];
10009
+ //#endregion
10010
+ //#region ../compiler/dist/src/yaml/diagnostics.js
10011
+ function getLocationInYamlScript(file, path, kind = "value") {
10012
+ const node = findYamlNode(file, path, kind);
9789
10013
  return {
9790
- diagnostics,
9791
- add,
9792
- pipe,
9793
- wrap,
9794
- join
10014
+ file: file.file,
10015
+ pos: node?.range?.[0] ?? 0,
10016
+ end: node?.range?.[1] ?? 0
9795
10017
  };
9796
- function add(diagnostic) {
9797
- diagnostics.push(diagnostic);
9798
- }
9799
- function pipe(result) {
9800
- const [value, diags] = result;
9801
- for (const diag of diags) diagnostics.push(diag);
9802
- return value;
9803
- }
9804
- function wrap(value) {
9805
- return [value, diagnostics];
9806
- }
9807
- function join(result) {
9808
- const [value, diags] = result;
9809
- for (const diag of diags) diagnostics.push(diag);
9810
- return [value, diagnostics];
9811
- }
9812
10018
  }
9813
- /**
9814
- * Ignore the diagnostics emitted by the diagnostic accessor pattern and just return the actual result.
9815
- * @param result Accessor pattern tuple result including the actual result and the list of diagnostics.
9816
- * @returns Actual result.
9817
- */
9818
- function ignoreDiagnostics(result) {
9819
- return result[0];
10019
+ function findYamlNode(file, path, kind = "value") {
10020
+ let current = file.doc.contents;
10021
+ for (let i = 0; i < path.length; i++) {
10022
+ const key = path[i];
10023
+ const isLast = i === path.length - 1;
10024
+ if (isScalar(current)) return current;
10025
+ else if (isCollection(current)) if (isLast) if (kind === "value" || !isMap(current)) if (Array.isArray(current.items) && current.items.every((item) => isScalar(item))) return current.items.find((m) => m.source && m.source === key);
10026
+ else return current.get(key, true);
10027
+ else {
10028
+ const pair = findPair(current.items, key);
10029
+ if (kind === "key") return pair?.key;
10030
+ else return pair;
10031
+ }
10032
+ else current = current.get(key, true);
10033
+ else continue;
10034
+ }
10035
+ return current ?? void 0;
9820
10036
  }
9821
10037
  //#endregion
9822
10038
  //#region ../compiler/dist/src/core/schema-validator.js
@@ -9917,6 +10133,20 @@ var TypeSpecConfigJsonSchema = {
9917
10133
  type: "string",
9918
10134
  nullable: true
9919
10135
  },
10136
+ kind: {
10137
+ type: "string",
10138
+ enum: ["project"],
10139
+ nullable: true
10140
+ },
10141
+ entrypoint: {
10142
+ type: "string",
10143
+ nullable: true
10144
+ },
10145
+ features: {
10146
+ type: "array",
10147
+ nullable: true,
10148
+ items: { type: "string" }
10149
+ },
9920
10150
  "environment-variables": {
9921
10151
  type: "object",
9922
10152
  nullable: true,
@@ -13667,6 +13897,12 @@ function hasVisibility(program, property, modifier) {
13667
13897
  }
13668
13898
  var VISIBILITY_FILTER = Symbol.for("TypeSpec.Core.VisibilityFilter");
13669
13899
  var VisibilityFilter = {
13900
+ /**
13901
+ * Convert a TypeSpec `GeneratedVisibilityFilter` value to a `VisibilityFilter`.
13902
+ *
13903
+ * @param filter - the decorator argument filter to convert
13904
+ * @returns a `VisibilityFilter` object that can be consumed by the visibility APIs
13905
+ */
13670
13906
  fromDecoratorArgument(filter) {
13671
13907
  return filter[VISIBILITY_FILTER] ??= {
13672
13908
  all: filter.all && new Set(filter.all.map((v) => v.value)),
@@ -13674,6 +13910,13 @@ var VisibilityFilter = {
13674
13910
  none: filter.none && new Set(filter.none.map((v) => v.value))
13675
13911
  };
13676
13912
  },
13913
+ /**
13914
+ * Extracts the unique visibility classes referred to by the modifiers in a
13915
+ * visibility filter.
13916
+ *
13917
+ * @param filter - the visibility filter to extract visibility classes from
13918
+ * @returns a set of visibility classes referred to by the filter
13919
+ */
13677
13920
  getVisibilityClasses(filter) {
13678
13921
  const classes = /* @__PURE__ */ new Set();
13679
13922
  if (filter.all) filter.all.forEach((v) => classes.add(v.enum));
@@ -13681,6 +13924,12 @@ var VisibilityFilter = {
13681
13924
  if (filter.none) filter.none.forEach((v) => classes.add(v.enum));
13682
13925
  return classes;
13683
13926
  },
13927
+ /**
13928
+ * Converts a visibility filter into a stable string representation.
13929
+ *
13930
+ * This can be used as a cache key for the filter that will be stable for filters that are not object-identical but
13931
+ * are semantically identical.
13932
+ */
13684
13933
  toCacheKey(program, filter) {
13685
13934
  return visibilityFilterToCacheKey(program, filter);
13686
13935
  }
@@ -13776,13 +14025,6 @@ function getLifecycleVisibilityEnum(program) {
13776
14025
  return type;
13777
14026
  }
13778
14027
  //#endregion
13779
- //#region ../compiler/dist/src/core/helpers/location-context.js
13780
- function getLocationContext(program, type) {
13781
- const sourceLocation = getSourceLocation(type);
13782
- if (sourceLocation.isSynthetic) return { type: "synthetic" };
13783
- return program.getSourceFileLocationContext(sourceLocation.file);
13784
- }
13785
- //#endregion
13786
14028
  //#region ../compiler/dist/src/utils/custom-key-map.js
13787
14029
  /**
13788
14030
  * This is a map type that allows providing a custom keyer function. The keyer
@@ -16167,7 +16409,7 @@ var ResolutionKind;
16167
16409
  var emittedFilesPerProgramKey = Symbol.for("TYPESPEC_EMITTED_FILES_PATHS");
16168
16410
  if (globalThis[emittedFilesPerProgramKey] === void 0) globalThis[emittedFilesPerProgramKey] = /* @__PURE__ */ new WeakMap();
16169
16411
  //#endregion
16170
- //#region ../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/standalone.mjs
16412
+ //#region ../../node_modules/.pnpm/prettier@3.8.3/node_modules/prettier/standalone.mjs
16171
16413
  var Zn = Object.create;
16172
16414
  var Mt = Object.defineProperty;
16173
16415
  var eo = Object.getOwnPropertyDescriptor;
@@ -19610,7 +19852,7 @@ var Wa = {
19610
19852
  replaceEndOfLine: Ju,
19611
19853
  canBreak: Hu
19612
19854
  };
19613
- var Mn = "3.8.1";
19855
+ var Mn = "3.8.3";
19614
19856
  var Pu = {};
19615
19857
  Yt(Pu, {
19616
19858
  addDanglingComment: () => ue,
@@ -19765,7 +20007,7 @@ var fi = me(it, 0), li = {
19765
20007
  printDocToString: me(Ln)
19766
20008
  };
19767
20009
  //#endregion
19768
- //#region ../../node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/doc.mjs
20010
+ //#region ../../node_modules/.pnpm/prettier@3.8.3/node_modules/prettier/doc.mjs
19769
20011
  var __defProp = Object.defineProperty;
19770
20012
  var __export = (target, all) => {
19771
20013
  for (var name in all) __defProp(target, name, {
@@ -20837,9 +21079,13 @@ globalThis[globalLibraryUrlsLoadedSym];
20837
21079
  //#region ../compiler/dist/src/manifest.js
20838
21080
  var manifest;
20839
21081
  try {
20840
- manifest = (await import("../manifest-Vqzuc5uB.js")).default;
21082
+ manifest = (await import("../manifest-Bu4Jq7Zd.js")).default;
20841
21083
  } catch {
20842
- manifest = (await import(["../dist", "manifest.js"].join("/"))).default;
21084
+ manifest = (await import(
21085
+ /* @vite-ignore */
21086
+ /* webpackIgnore: true */
21087
+ ["../dist", "manifest.js"].join("/")
21088
+ )).default;
20843
21089
  }
20844
21090
  manifest.version;
20845
21091
  //#endregion
@@ -22571,7 +22817,7 @@ var require_connection$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
22571
22817
  const toCancel = messageQueue.get(key);
22572
22818
  if (messages_1.Message.isRequest(toCancel)) {
22573
22819
  const strategy = options?.connectionStrategy;
22574
- const response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
22820
+ const response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : void 0;
22575
22821
  if (response && (response.error !== void 0 || response.result !== void 0)) {
22576
22822
  messageQueue.delete(key);
22577
22823
  requestTokens.delete(cancelId);
@@ -29941,120 +30187,6 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports) => {
29941
30187
  resolvePath(void 0, "templates");
29942
30188
  ({ ...TypeSpecConfigJsonSchema });
29943
30189
  //#endregion
29944
- //#region ../../node_modules/.pnpm/change-case@5.4.4/node_modules/change-case/dist/index.js
29945
- var SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
29946
- var SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
29947
- var SPLIT_SEPARATE_NUMBER_RE = /(\d)\p{Ll}|(\p{L})\d/u;
29948
- var DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
29949
- var SPLIT_REPLACE_VALUE = "$1\0$2";
29950
- var DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
29951
- /**
29952
- * Split any cased input strings into an array of words.
29953
- */
29954
- function split(value) {
29955
- let result = value.trim();
29956
- result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
29957
- result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
29958
- let start = 0;
29959
- let end = result.length;
29960
- while (result.charAt(start) === "\0") start++;
29961
- if (start === end) return [];
29962
- while (result.charAt(end - 1) === "\0") end--;
29963
- return result.slice(start, end).split(/\0/g);
29964
- }
29965
- /**
29966
- * Split the input string into an array of words, separating numbers.
29967
- */
29968
- function splitSeparateNumbers(value) {
29969
- const words = split(value);
29970
- for (let i = 0; i < words.length; i++) {
29971
- const word = words[i];
29972
- const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
29973
- if (match) {
29974
- const offset = match.index + (match[1] ?? match[2]).length;
29975
- words.splice(i, 1, word.slice(0, offset), word.slice(offset));
29976
- }
29977
- }
29978
- return words;
29979
- }
29980
- /**
29981
- * Convert a string to space separated lower case (`foo bar`).
29982
- */
29983
- function noCase(input, options) {
29984
- const [prefix, words, suffix] = splitPrefixSuffix(input, options);
29985
- return prefix + words.map(lowerFactory(options?.locale)).join(options?.delimiter ?? " ") + suffix;
29986
- }
29987
- /**
29988
- * Convert a string to camel case (`fooBar`).
29989
- */
29990
- function camelCase(input, options) {
29991
- const [prefix, words, suffix] = splitPrefixSuffix(input, options);
29992
- const lower = lowerFactory(options?.locale);
29993
- const upper = upperFactory(options?.locale);
29994
- const transform = options?.mergeAmbiguousCharacters ? capitalCaseTransformFactory(lower, upper) : pascalCaseTransformFactory(lower, upper);
29995
- return prefix + words.map((word, index) => {
29996
- if (index === 0) return lower(word);
29997
- return transform(word, index);
29998
- }).join(options?.delimiter ?? "") + suffix;
29999
- }
30000
- /**
30001
- * Convert a string to pascal case (`FooBar`).
30002
- */
30003
- function pascalCase(input, options) {
30004
- const [prefix, words, suffix] = splitPrefixSuffix(input, options);
30005
- const lower = lowerFactory(options?.locale);
30006
- const upper = upperFactory(options?.locale);
30007
- const transform = options?.mergeAmbiguousCharacters ? capitalCaseTransformFactory(lower, upper) : pascalCaseTransformFactory(lower, upper);
30008
- return prefix + words.map(transform).join(options?.delimiter ?? "") + suffix;
30009
- }
30010
- /**
30011
- * Convert a string to kebab case (`foo-bar`).
30012
- */
30013
- function kebabCase(input, options) {
30014
- return noCase(input, {
30015
- delimiter: "-",
30016
- ...options
30017
- });
30018
- }
30019
- function lowerFactory(locale) {
30020
- return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
30021
- }
30022
- function upperFactory(locale) {
30023
- return locale === false ? (input) => input.toUpperCase() : (input) => input.toLocaleUpperCase(locale);
30024
- }
30025
- function capitalCaseTransformFactory(lower, upper) {
30026
- return (word) => `${upper(word[0])}${lower(word.slice(1))}`;
30027
- }
30028
- function pascalCaseTransformFactory(lower, upper) {
30029
- return (word, index) => {
30030
- const char0 = word[0];
30031
- return (index > 0 && char0 >= "0" && char0 <= "9" ? "_" + char0 : upper(char0)) + lower(word.slice(1));
30032
- };
30033
- }
30034
- function splitPrefixSuffix(input, options = {}) {
30035
- const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);
30036
- const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
30037
- const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
30038
- let prefixIndex = 0;
30039
- let suffixIndex = input.length;
30040
- while (prefixIndex < input.length) {
30041
- const char = input.charAt(prefixIndex);
30042
- if (!prefixCharacters.includes(char)) break;
30043
- prefixIndex++;
30044
- }
30045
- while (suffixIndex > prefixIndex) {
30046
- const index = suffixIndex - 1;
30047
- const char = input.charAt(index);
30048
- if (!suffixCharacters.includes(char)) break;
30049
- suffixIndex = index;
30050
- }
30051
- return [
30052
- input.slice(0, prefixIndex),
30053
- splitFn(input.slice(prefixIndex, suffixIndex)),
30054
- input.slice(suffixIndex)
30055
- ];
30056
- }
30057
- //#endregion
30058
30190
  //#region ../../node_modules/.pnpm/mustache@4.2.0/node_modules/mustache/mustache.mjs
30059
30191
  /*!
30060
30192
  * mustache.js - Logic-less {{mustache}} templates with JavaScript
@@ -30596,9 +30728,17 @@ var mustache = {
30596
30728
  Scanner: void 0,
30597
30729
  Context: void 0,
30598
30730
  Writer: void 0,
30731
+ /**
30732
+ * Allows a user to override the default caching strategy, by providing an
30733
+ * object with set, get and clear methods. This can also be used to disable
30734
+ * the cache by setting it to the literal `undefined`.
30735
+ */
30599
30736
  set templateCache(cache) {
30600
30737
  defaultWriter.templateCache = cache;
30601
30738
  },
30739
+ /**
30740
+ * Gets the default or overridden caching object from the default writer.
30741
+ */
30602
30742
  get templateCache() {
30603
30743
  return defaultWriter.templateCache;
30604
30744
  }
@@ -30630,28 +30770,6 @@ mustache.escape = escapeHtml;
30630
30770
  mustache.Scanner = Scanner;
30631
30771
  mustache.Context = Context;
30632
30772
  mustache.Writer = Writer;
30633
- createNamingUtils(camelCase), createNamingUtils(kebabCase), createNamingUtils(pascalCase);
30634
- function createNamingUtils(fn) {
30635
- return () => (text, render) => fn(render(text));
30636
- }
30637
- `
30638
- # extends: ../tspconfig.yaml # Extend another config file
30639
- # emit: # Emitter name
30640
- # - "<emitter-name"
30641
- # options: # Emitter options
30642
- # <emitter-name>:
30643
- # "<option-name>": "<option-value>"
30644
- # environment-variables: # Environment variables which can be used to interpolate emitter options
30645
- # <variable-name>:
30646
- # default: "<variable-default>"
30647
- # parameters: # Parameters which can be used to interpolate emitter options
30648
- # <param-name>:
30649
- # default: "<param-default>"
30650
- # trace: # Trace areas to enable tracing
30651
- # - "<trace-name>"
30652
- # warn-as-error: true # Treat warnings as errors
30653
- # output-dir: "{project-root}/_generated" # Configure the base output directory for all emitters
30654
- `.trim();
30655
30773
  `
30656
30774
  # MacOS
30657
30775
  .DS_Store