vite-plus 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/binding/index.cjs +2 -0
  2. package/binding/index.d.cts +32 -0
  3. package/dist/global/{prompts-CAIahN1u.js → agent-BE4Xze8Q.js} +380 -1280
  4. package/dist/global/{browser-CY4NBwxR.js → browser-CBapUTD0.js} +579 -1023
  5. package/dist/global/{browser-DFpJ6sKb.js → browser-EZnNDcaO.js} +2 -3
  6. package/dist/global/{chunk-CtfvYSle.js → chunk-CgnkrU7a.js} +13 -22
  7. package/dist/global/{cli-truncate-BxinOqz5.js → cli-truncate-Da6Y8aM8.js} +25 -74
  8. package/dist/global/config.js +95 -165
  9. package/dist/global/create.js +353 -496
  10. package/dist/global/{terminal-Cb-NuRkb.js → help-BAGHa8fD.js} +22 -54
  11. package/dist/global/{json-Bfvtp2rL.js → json-BRdVJ52a.js} +24 -58
  12. package/dist/global/{lib-CibYHP32.js → lib-DxappLRQ.js} +19 -43
  13. package/dist/global/{log-update-DdU6_LCN.js → log-update-C8WCYCbc.js} +102 -281
  14. package/dist/global/mcp.js +97 -169
  15. package/dist/global/migrate.js +223 -72
  16. package/dist/global/{package-Pq2biU7_.js → package-YAMvX5PJ.js} +6 -13
  17. package/dist/global/{slice-ansi-BhwAwMdF.js → slice-ansi-Fap0ehe9.js} +21 -52
  18. package/dist/global/{src-C6aLHRsS.js → src-DwSJ0s0I.js} +28 -110
  19. package/dist/global/staged.js +654 -1521
  20. package/dist/global/{strip-ansi-BL-dgd7n.js → strip-ansi-CE-VDMdw.js} +20 -67
  21. package/dist/global/version.js +16 -37
  22. package/dist/global/{workspace-De4OKHV7.js → workspace-lRm8huz4.js} +1645 -2806
  23. package/dist/global/wrap-ansi-Ou9oAs-a.js +3 -0
  24. package/dist/global/{wrap-ansi-Iww6Ak1s.js → wrap-ansi-eywLlPVQ.js} +29 -80
  25. package/dist/index.d.ts +1 -1
  26. package/dist/init-config.js +10 -2
  27. package/dist/run-config.d.ts +17 -0
  28. package/dist/utils/agent.d.ts +15 -1
  29. package/dist/utils/agent.js +104 -20
  30. package/dist/utils/constants.d.ts +1 -0
  31. package/dist/utils/constants.js +2 -0
  32. package/dist/utils/editor.d.ts +16 -3
  33. package/dist/utils/editor.js +55 -17
  34. package/dist/utils/prompts.d.ts +32 -3
  35. package/dist/utils/prompts.js +32 -8
  36. package/dist/utils/skills.js +18 -2
  37. package/dist/utils/tsconfig.d.ts +6 -0
  38. package/dist/utils/tsconfig.js +16 -0
  39. package/package.json +13 -13
  40. package/templates/monorepo/package.json +1 -1
  41. package/dist/global/wrap-ansi-BJxjUEQR.js +0 -4
  42. package/dist/oxlint-config.d.ts +0 -498
  43. package/dist/oxlint-config.js +0 -309
@@ -1,5 +1,4 @@
1
- import { n as __exportAll } from "./chunk-CtfvYSle.js";
2
-
1
+ import { n as __exportAll } from "./chunk-CgnkrU7a.js";
3
2
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/identity.js
4
3
  const ALIAS = Symbol.for("yaml.alias");
5
4
  const DOC = Symbol.for("yaml.document");
@@ -31,7 +30,6 @@ function isNode(node) {
31
30
  return false;
32
31
  }
33
32
  const hasAnchor = (node) => (isScalar$1(node) || isCollection$1(node)) && !!node.anchor;
34
-
35
33
  //#endregion
36
34
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/visit.js
37
35
  const BREAK$1 = Symbol("break visit");
@@ -70,8 +68,7 @@ const REMOVE$1 = Symbol("remove node");
70
68
  function visit$1(node, visitor) {
71
69
  const visitor_ = initVisitor(visitor);
72
70
  if (isDocument(node)) {
73
- const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
74
- if (cd === REMOVE$1) node.contents = null;
71
+ if (visit_(null, node.contents, visitor_, Object.freeze([node])) === REMOVE$1) node.contents = null;
75
72
  } else visit_(null, node, visitor_, Object.freeze([]));
76
73
  }
77
74
  /** Terminate visit traversal completely */
@@ -144,8 +141,7 @@ function visit_(key, node, visitor, path) {
144
141
  async function visitAsync(node, visitor) {
145
142
  const visitor_ = initVisitor(visitor);
146
143
  if (isDocument(node)) {
147
- const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
148
- if (cd === REMOVE$1) node.contents = null;
144
+ if (await visitAsync_(null, node.contents, visitor_, Object.freeze([node])) === REMOVE$1) node.contents = null;
149
145
  } else await visitAsync_(null, node, visitor_, Object.freeze([]));
150
146
  }
151
147
  /** Terminate visit traversal completely */
@@ -185,21 +181,19 @@ async function visitAsync_(key, node, visitor, path) {
185
181
  return ctrl;
186
182
  }
187
183
  function initVisitor(visitor) {
188
- if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) {
189
- return Object.assign({
190
- Alias: visitor.Node,
191
- Map: visitor.Node,
192
- Scalar: visitor.Node,
193
- Seq: visitor.Node
194
- }, visitor.Value && {
195
- Map: visitor.Value,
196
- Scalar: visitor.Value,
197
- Seq: visitor.Value
198
- }, visitor.Collection && {
199
- Map: visitor.Collection,
200
- Seq: visitor.Collection
201
- }, visitor);
202
- }
184
+ if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) return Object.assign({
185
+ Alias: visitor.Node,
186
+ Map: visitor.Node,
187
+ Scalar: visitor.Node,
188
+ Seq: visitor.Node
189
+ }, visitor.Value && {
190
+ Map: visitor.Value,
191
+ Scalar: visitor.Value,
192
+ Seq: visitor.Value
193
+ }, visitor.Collection && {
194
+ Map: visitor.Collection,
195
+ Seq: visitor.Collection
196
+ }, visitor);
203
197
  return visitor;
204
198
  }
205
199
  function callVisitor(key, node, visitor, path) {
@@ -209,23 +203,18 @@ function callVisitor(key, node, visitor, path) {
209
203
  if (isPair(node)) return visitor.Pair?.(key, node, path);
210
204
  if (isScalar$1(node)) return visitor.Scalar?.(key, node, path);
211
205
  if (isAlias(node)) return visitor.Alias?.(key, node, path);
212
- return undefined;
213
206
  }
214
207
  function replaceNode(key, path, node) {
215
208
  const parent = path[path.length - 1];
216
- if (isCollection$1(parent)) {
217
- parent.items[key] = node;
218
- } else if (isPair(parent)) {
219
- if (key === "key") parent.key = node;
220
- else parent.value = node;
221
- } else if (isDocument(parent)) {
222
- parent.contents = node;
223
- } else {
209
+ if (isCollection$1(parent)) parent.items[key] = node;
210
+ else if (isPair(parent)) if (key === "key") parent.key = node;
211
+ else parent.value = node;
212
+ else if (isDocument(parent)) parent.contents = node;
213
+ else {
224
214
  const pt = isAlias(parent) ? "alias" : "scalar";
225
215
  throw new Error(`Cannot replace node with ${pt} parent`);
226
216
  }
227
217
  }
228
-
229
218
  //#endregion
230
219
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/directives.js
231
220
  const escapeChars = {
@@ -345,13 +334,11 @@ var Directives = class Directives {
345
334
  const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
346
335
  if (!suffix) onError(`The ${source} tag has no suffix`);
347
336
  const prefix = this.tags[handle];
348
- if (prefix) {
349
- try {
350
- return prefix + decodeURIComponent(suffix);
351
- } catch (error) {
352
- onError(String(error));
353
- return null;
354
- }
337
+ if (prefix) try {
338
+ return prefix + decodeURIComponent(suffix);
339
+ } catch (error) {
340
+ onError(String(error));
341
+ return null;
355
342
  }
356
343
  if (handle === "!") return source;
357
344
  onError(`Could not resolve tag: ${source}`);
@@ -362,9 +349,7 @@ var Directives = class Directives {
362
349
  * taking into account current tag prefixes and defaults.
363
350
  */
364
351
  tagString(tag) {
365
- for (const [handle, prefix] of Object.entries(this.tags)) {
366
- if (tag.startsWith(prefix)) return handle + escapeTagName(tag.substring(prefix.length));
367
- }
352
+ for (const [handle, prefix] of Object.entries(this.tags)) if (tag.startsWith(prefix)) return handle + escapeTagName(tag.substring(prefix.length));
368
353
  return tag[0] === "!" ? tag : `!<${tag}>`;
369
354
  }
370
355
  toString(doc) {
@@ -390,7 +375,6 @@ Directives.defaultYaml = {
390
375
  version: "1.2"
391
376
  };
392
377
  Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
393
-
394
378
  //#endregion
395
379
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/anchors.js
396
380
  /**
@@ -400,14 +384,13 @@ Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
400
384
  */
401
385
  function anchorIsValid(anchor) {
402
386
  if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
403
- const sa = JSON.stringify(anchor);
404
- const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
387
+ const msg = `Anchor must not contain whitespace or control characters: ${JSON.stringify(anchor)}`;
405
388
  throw new Error(msg);
406
389
  }
407
390
  return true;
408
391
  }
409
392
  function anchorNames(root) {
410
- const anchors = new Set();
393
+ const anchors = /* @__PURE__ */ new Set();
411
394
  visit$1(root, { Value(_key, node) {
412
395
  if (node.anchor) anchors.add(node.anchor);
413
396
  } });
@@ -415,14 +398,14 @@ function anchorNames(root) {
415
398
  }
416
399
  /** Find a new anchor name with the given `prefix` and a one-indexed suffix. */
417
400
  function findNewAnchor(prefix, exclude) {
418
- for (let i = 1; true; ++i) {
401
+ for (let i = 1;; ++i) {
419
402
  const name = `${prefix}${i}`;
420
403
  if (!exclude.has(name)) return name;
421
404
  }
422
405
  }
423
406
  function createNodeAnchors(doc, prefix) {
424
407
  const aliasObjects = [];
425
- const sourceObjects = new Map();
408
+ const sourceObjects = /* @__PURE__ */ new Map();
426
409
  let prevAnchors = null;
427
410
  return {
428
411
  onAnchor: (source) => {
@@ -435,10 +418,9 @@ function createNodeAnchors(doc, prefix) {
435
418
  setAnchors: () => {
436
419
  for (const source of aliasObjects) {
437
420
  const ref = sourceObjects.get(source);
438
- if (typeof ref === "object" && ref.anchor && (isScalar$1(ref.node) || isCollection$1(ref.node))) {
439
- ref.node.anchor = ref.anchor;
440
- } else {
441
- const error = new Error("Failed to resolve repeated object (this should not happen)");
421
+ if (typeof ref === "object" && ref.anchor && (isScalar$1(ref.node) || isCollection$1(ref.node))) ref.node.anchor = ref.anchor;
422
+ else {
423
+ const error = /* @__PURE__ */ new Error("Failed to resolve repeated object (this should not happen)");
442
424
  error.source = source;
443
425
  throw error;
444
426
  }
@@ -447,7 +429,6 @@ function createNodeAnchors(doc, prefix) {
447
429
  sourceObjects
448
430
  };
449
431
  }
450
-
451
432
  //#endregion
452
433
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/applyReviver.js
453
434
  /**
@@ -458,41 +439,33 @@ function createNodeAnchors(doc, prefix) {
458
439
  * Includes extensions for handling Map and Set objects.
459
440
  */
460
441
  function applyReviver(reviver, obj, key, val) {
461
- if (val && typeof val === "object") {
462
- if (Array.isArray(val)) {
463
- for (let i = 0, len = val.length; i < len; ++i) {
464
- const v0 = val[i];
465
- const v1 = applyReviver(reviver, val, String(i), v0);
466
- if (v1 === undefined) delete val[i];
467
- else if (v1 !== v0) val[i] = v1;
468
- }
469
- } else if (val instanceof Map) {
470
- for (const k of Array.from(val.keys())) {
471
- const v0 = val.get(k);
472
- const v1 = applyReviver(reviver, val, k, v0);
473
- if (v1 === undefined) val.delete(k);
474
- else if (v1 !== v0) val.set(k, v1);
475
- }
476
- } else if (val instanceof Set) {
477
- for (const v0 of Array.from(val)) {
478
- const v1 = applyReviver(reviver, val, v0, v0);
479
- if (v1 === undefined) val.delete(v0);
480
- else if (v1 !== v0) {
481
- val.delete(v0);
482
- val.add(v1);
483
- }
484
- }
485
- } else {
486
- for (const [k, v0] of Object.entries(val)) {
487
- const v1 = applyReviver(reviver, val, k, v0);
488
- if (v1 === undefined) delete val[k];
489
- else if (v1 !== v0) val[k] = v1;
490
- }
491
- }
442
+ if (val && typeof val === "object") if (Array.isArray(val)) for (let i = 0, len = val.length; i < len; ++i) {
443
+ const v0 = val[i];
444
+ const v1 = applyReviver(reviver, val, String(i), v0);
445
+ if (v1 === void 0) delete val[i];
446
+ else if (v1 !== v0) val[i] = v1;
447
+ }
448
+ else if (val instanceof Map) for (const k of Array.from(val.keys())) {
449
+ const v0 = val.get(k);
450
+ const v1 = applyReviver(reviver, val, k, v0);
451
+ if (v1 === void 0) val.delete(k);
452
+ else if (v1 !== v0) val.set(k, v1);
453
+ }
454
+ else if (val instanceof Set) for (const v0 of Array.from(val)) {
455
+ const v1 = applyReviver(reviver, val, v0, v0);
456
+ if (v1 === void 0) val.delete(v0);
457
+ else if (v1 !== v0) {
458
+ val.delete(v0);
459
+ val.add(v1);
460
+ }
461
+ }
462
+ else for (const [k, v0] of Object.entries(val)) {
463
+ const v1 = applyReviver(reviver, val, k, v0);
464
+ if (v1 === void 0) delete val[k];
465
+ else if (v1 !== v0) val[k] = v1;
492
466
  }
493
467
  return reviver.call(obj, key, val);
494
468
  }
495
-
496
469
  //#endregion
497
470
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/toJS.js
498
471
  /**
@@ -512,7 +485,7 @@ function toJS(value, arg, ctx) {
512
485
  const data = {
513
486
  aliasCount: 0,
514
487
  count: 1,
515
- res: undefined
488
+ res: void 0
516
489
  };
517
490
  ctx.anchors.set(value, data);
518
491
  ctx.onCreate = (res) => {
@@ -526,7 +499,6 @@ function toJS(value, arg, ctx) {
526
499
  if (typeof value === "bigint" && !ctx?.keep) return Number(value);
527
500
  return value;
528
501
  }
529
-
530
502
  //#endregion
531
503
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Node.js
532
504
  var NodeBase = class {
@@ -543,7 +515,7 @@ var NodeBase = class {
543
515
  toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
544
516
  if (!isDocument(doc)) throw new TypeError("A document argument is required");
545
517
  const ctx = {
546
- anchors: new Map(),
518
+ anchors: /* @__PURE__ */ new Map(),
547
519
  doc,
548
520
  keep: true,
549
521
  mapAsMap: mapAsMap === true,
@@ -555,7 +527,6 @@ var NodeBase = class {
555
527
  return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res;
556
528
  }
557
529
  };
558
-
559
530
  //#endregion
560
531
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Alias.js
561
532
  var Alias = class extends NodeBase {
@@ -572,16 +543,15 @@ var Alias = class extends NodeBase {
572
543
  */
573
544
  resolve(doc, ctx) {
574
545
  let nodes;
575
- if (ctx?.aliasResolveCache) {
576
- nodes = ctx.aliasResolveCache;
577
- } else {
546
+ if (ctx?.aliasResolveCache) nodes = ctx.aliasResolveCache;
547
+ else {
578
548
  nodes = [];
579
549
  visit$1(doc, { Node: (_key, node) => {
580
550
  if (isAlias(node) || hasAnchor(node)) nodes.push(node);
581
551
  } });
582
552
  if (ctx) ctx.aliasResolveCache = nodes;
583
553
  }
584
- let found = undefined;
554
+ let found = void 0;
585
555
  for (const node of nodes) {
586
556
  if (node === this) break;
587
557
  if (node.anchor === this.source) found = node;
@@ -602,17 +572,11 @@ var Alias = class extends NodeBase {
602
572
  data = anchors.get(source);
603
573
  }
604
574
  /* istanbul ignore if */
605
- if (data?.res === undefined) {
606
- const msg = "This should not happen: Alias anchor was not resolved?";
607
- throw new ReferenceError(msg);
608
- }
575
+ if (data?.res === void 0) throw new ReferenceError("This should not happen: Alias anchor was not resolved?");
609
576
  if (maxAliasCount >= 0) {
610
577
  data.count += 1;
611
578
  if (data.aliasCount === 0) data.aliasCount = getAliasCount(doc, source, anchors);
612
- if (data.count * data.aliasCount > maxAliasCount) {
613
- const msg = "Excessive alias count indicates a resource exhaustion attack";
614
- throw new ReferenceError(msg);
615
- }
579
+ if (data.count * data.aliasCount > maxAliasCount) throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");
616
580
  }
617
581
  return data.res;
618
582
  }
@@ -648,7 +612,6 @@ function getAliasCount(doc, node, anchors) {
648
612
  }
649
613
  return 1;
650
614
  }
651
-
652
615
  //#endregion
653
616
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Scalar.js
654
617
  const isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
@@ -669,7 +632,6 @@ Scalar.BLOCK_LITERAL = "BLOCK_LITERAL";
669
632
  Scalar.PLAIN = "PLAIN";
670
633
  Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
671
634
  Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
672
-
673
635
  //#endregion
674
636
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/createNode.js
675
637
  const defaultTagPrefix = "tag:yaml.org,2002:";
@@ -690,11 +652,9 @@ function createNode(value, tagName, ctx) {
690
652
  map.items.push(value);
691
653
  return map;
692
654
  }
693
- if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
694
- value = value.valueOf();
695
- }
655
+ if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) value = value.valueOf();
696
656
  const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;
697
- let ref = undefined;
657
+ let ref = void 0;
698
658
  if (aliasDuplicateObjects && value && typeof value === "object") {
699
659
  ref = sourceObjects.get(value);
700
660
  if (ref) {
@@ -711,9 +671,7 @@ function createNode(value, tagName, ctx) {
711
671
  if (tagName?.startsWith("!!")) tagName = defaultTagPrefix + tagName.slice(2);
712
672
  let tagObj = findTagObject(value, tagName, schema.tags);
713
673
  if (!tagObj) {
714
- if (value && typeof value.toJSON === "function") {
715
- value = value.toJSON();
716
- }
674
+ if (value && typeof value.toJSON === "function") value = value.toJSON();
717
675
  if (!value || typeof value !== "object") {
718
676
  const node = new Scalar(value);
719
677
  if (ref) ref.node = node;
@@ -731,7 +689,6 @@ function createNode(value, tagName, ctx) {
731
689
  if (ref) ref.node = node;
732
690
  return node;
733
691
  }
734
-
735
692
  //#endregion
736
693
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Collection.js
737
694
  function collectionFromPath(schema, path, value) {
@@ -742,18 +699,16 @@ function collectionFromPath(schema, path, value) {
742
699
  const a = [];
743
700
  a[k] = v;
744
701
  v = a;
745
- } else {
746
- v = new Map([[k, v]]);
747
- }
702
+ } else v = new Map([[k, v]]);
748
703
  }
749
- return createNode(v, undefined, {
704
+ return createNode(v, void 0, {
750
705
  aliasDuplicateObjects: false,
751
706
  keepUndefined: false,
752
707
  onAnchor: () => {
753
708
  throw new Error("This should not happen, please report a bug.");
754
709
  },
755
710
  schema,
756
- sourceObjects: new Map()
711
+ sourceObjects: /* @__PURE__ */ new Map()
757
712
  });
758
713
  }
759
714
  const isEmptyPath = (path) => path == null || typeof path === "object" && !!path[Symbol.iterator]().next().done;
@@ -790,7 +745,7 @@ var Collection = class extends NodeBase {
790
745
  const [key, ...rest] = path;
791
746
  const node = this.get(key, true);
792
747
  if (isCollection$1(node)) node.addIn(rest, value);
793
- else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));
748
+ else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));
794
749
  else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
795
750
  }
796
751
  }
@@ -814,7 +769,7 @@ var Collection = class extends NodeBase {
814
769
  const [key, ...rest] = path;
815
770
  const node = this.get(key, true);
816
771
  if (rest.length === 0) return !keepScalar && isScalar$1(node) ? node.value : node;
817
- else return isCollection$1(node) ? node.getIn(rest, keepScalar) : undefined;
772
+ else return isCollection$1(node) ? node.getIn(rest, keepScalar) : void 0;
818
773
  }
819
774
  hasAllNullValues(allowScalar) {
820
775
  return this.items.every((node) => {
@@ -838,17 +793,15 @@ var Collection = class extends NodeBase {
838
793
  */
839
794
  setIn(path, value) {
840
795
  const [key, ...rest] = path;
841
- if (rest.length === 0) {
842
- this.set(key, value);
843
- } else {
796
+ if (rest.length === 0) this.set(key, value);
797
+ else {
844
798
  const node = this.get(key, true);
845
799
  if (isCollection$1(node)) node.setIn(rest, value);
846
- else if (node === undefined && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));
800
+ else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));
847
801
  else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
848
802
  }
849
803
  }
850
804
  };
851
-
852
805
  //#endregion
853
806
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyComment.js
854
807
  /**
@@ -864,7 +817,6 @@ function indentComment(comment, indent) {
864
817
  return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
865
818
  }
866
819
  const lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
867
-
868
820
  //#endregion
869
821
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/foldFlowLines.js
870
822
  const FOLD_FLOW = "flow";
@@ -883,22 +835,20 @@ function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth =
883
835
  const folds = [];
884
836
  const escapedFolds = {};
885
837
  let end = lineWidth - indent.length;
886
- if (typeof indentAtStart === "number") {
887
- if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
888
- else end = lineWidth - indentAtStart;
889
- }
890
- let split = undefined;
891
- let prev = undefined;
838
+ if (typeof indentAtStart === "number") if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
839
+ else end = lineWidth - indentAtStart;
840
+ let split = void 0;
841
+ let prev = void 0;
892
842
  let overflow = false;
893
843
  let i = -1;
894
844
  let escStart = -1;
895
845
  let escEnd = -1;
896
- if (mode === FOLD_BLOCK) {
846
+ if (mode === "block") {
897
847
  i = consumeMoreIndentedLines(text, i, indent.length);
898
848
  if (i !== -1) end = i + endStep;
899
849
  }
900
850
  for (let ch; ch = text[i += 1];) {
901
- if (mode === FOLD_QUOTED && ch === "\\") {
851
+ if (mode === "quoted" && ch === "\\") {
902
852
  escStart = i;
903
853
  switch (text[i + 1]) {
904
854
  case "x":
@@ -915,35 +865,31 @@ function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth =
915
865
  escEnd = i;
916
866
  }
917
867
  if (ch === "\n") {
918
- if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i, indent.length);
868
+ if (mode === "block") i = consumeMoreIndentedLines(text, i, indent.length);
919
869
  end = i + indent.length + endStep;
920
- split = undefined;
870
+ split = void 0;
921
871
  } else {
922
872
  if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
923
873
  const next = text[i + 1];
924
874
  if (next && next !== " " && next !== "\n" && next !== " ") split = i;
925
875
  }
926
- if (i >= end) {
927
- if (split) {
928
- folds.push(split);
929
- end = split + endStep;
930
- split = undefined;
931
- } else if (mode === FOLD_QUOTED) {
932
- while (prev === " " || prev === " ") {
933
- prev = ch;
934
- ch = text[i += 1];
935
- overflow = true;
936
- }
937
- const j = i > escEnd + 1 ? i - 2 : escStart - 1;
938
- if (escapedFolds[j]) return text;
939
- folds.push(j);
940
- escapedFolds[j] = true;
941
- end = j + endStep;
942
- split = undefined;
943
- } else {
876
+ if (i >= end) if (split) {
877
+ folds.push(split);
878
+ end = split + endStep;
879
+ split = void 0;
880
+ } else if (mode === "quoted") {
881
+ while (prev === " " || prev === " ") {
882
+ prev = ch;
883
+ ch = text[i += 1];
944
884
  overflow = true;
945
885
  }
946
- }
886
+ const j = i > escEnd + 1 ? i - 2 : escStart - 1;
887
+ if (escapedFolds[j]) return text;
888
+ folds.push(j);
889
+ escapedFolds[j] = true;
890
+ end = j + endStep;
891
+ split = void 0;
892
+ } else overflow = true;
947
893
  }
948
894
  prev = ch;
949
895
  }
@@ -956,7 +902,7 @@ function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth =
956
902
  const end = folds[i + 1] || text.length;
957
903
  if (fold === 0) res = `\n${indent}${text.slice(0, end)}`;
958
904
  else {
959
- if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`;
905
+ if (mode === "quoted" && escapedFolds[fold]) res += `${text[fold]}\\`;
960
906
  res += `\n${indent}${text.slice(fold + 1, end)}`;
961
907
  }
962
908
  }
@@ -970,21 +916,17 @@ function consumeMoreIndentedLines(text, i, indent) {
970
916
  let end = i;
971
917
  let start = i + 1;
972
918
  let ch = text[start];
973
- while (ch === " " || ch === " ") {
974
- if (i < start + indent) {
919
+ while (ch === " " || ch === " ") if (i < start + indent) ch = text[++i];
920
+ else {
921
+ do
975
922
  ch = text[++i];
976
- } else {
977
- do {
978
- ch = text[++i];
979
- } while (ch && ch !== "\n");
980
- end = i;
981
- start = i + 1;
982
- ch = text[start];
983
- }
923
+ while (ch && ch !== "\n");
924
+ end = i;
925
+ start = i + 1;
926
+ ch = text[start];
984
927
  }
985
928
  return end;
986
929
  }
987
-
988
930
  //#endregion
989
931
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyString.js
990
932
  const getFoldOptions = (ctx, isBlock) => ({
@@ -998,12 +940,10 @@ function lineLengthOverLimit(str, lineWidth, indentLength) {
998
940
  const limit = lineWidth - indentLength;
999
941
  const strLen = str.length;
1000
942
  if (strLen <= limit) return false;
1001
- for (let i = 0, start = 0; i < strLen; ++i) {
1002
- if (str[i] === "\n") {
1003
- if (i - start > limit) return true;
1004
- start = i + 1;
1005
- if (strLen - start <= limit) return false;
1006
- }
943
+ for (let i = 0, start = 0; i < strLen; ++i) if (str[i] === "\n") {
944
+ if (i - start > limit) return true;
945
+ start = i + 1;
946
+ if (strLen - start <= limit) return false;
1007
947
  }
1008
948
  return true;
1009
949
  }
@@ -1060,9 +1000,8 @@ function doubleQuotedString(value, ctx) {
1060
1000
  }
1061
1001
  break;
1062
1002
  case "n":
1063
- if (implicitKey || json[i + 2] === "\"" || json.length < minMultiLineLength) {
1064
- i += 1;
1065
- } else {
1003
+ if (implicitKey || json[i + 2] === "\"" || json.length < minMultiLineLength) i += 1;
1004
+ else {
1066
1005
  str += json.slice(start, i) + "\n\n";
1067
1006
  while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== "\"") {
1068
1007
  str += "\n";
@@ -1101,15 +1040,13 @@ function quotedString(value, ctx) {
1101
1040
  }
1102
1041
  let blockEndNewlines;
1103
1042
  try {
1104
- blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
1043
+ blockEndNewlines = /* @__PURE__ */ new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
1105
1044
  } catch {
1106
1045
  blockEndNewlines = /\n+(?!\n|$)/g;
1107
1046
  }
1108
1047
  function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
1109
1048
  const { blockQuote, commentString, lineWidth } = ctx.options;
1110
- if (!blockQuote || /\n[\t ]+$/.test(value)) {
1111
- return quotedString(value, ctx);
1112
- }
1049
+ if (!blockQuote || /\n[\t ]+$/.test(value)) return quotedString(value, ctx);
1113
1050
  const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
1114
1051
  const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
1115
1052
  if (!value) return literal ? "|\n" : ">\n";
@@ -1121,14 +1058,11 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
1121
1058
  }
1122
1059
  let end = value.substring(endStart);
1123
1060
  const endNlPos = end.indexOf("\n");
1124
- if (endNlPos === -1) {
1125
- chomp = "-";
1126
- } else if (value === end || endNlPos !== end.length - 1) {
1061
+ if (endNlPos === -1) chomp = "-";
1062
+ else if (value === end || endNlPos !== end.length - 1) {
1127
1063
  chomp = "+";
1128
1064
  if (onChompKeep) onChompKeep();
1129
- } else {
1130
- chomp = "";
1131
- }
1065
+ } else chomp = "";
1132
1066
  if (end) {
1133
1067
  value = value.slice(0, -end.length);
1134
1068
  if (end[end.length - 1] === "\n") end = end.slice(0, -1);
@@ -1148,8 +1082,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
1148
1082
  value = value.substring(start.length);
1149
1083
  start = start.replace(/\n+/g, `$&${indent}`);
1150
1084
  }
1151
- const indentSize = indent ? "2" : "1";
1152
- let header = (startWithSpace ? indentSize : "") + chomp;
1085
+ let header = (startWithSpace ? indent ? "2" : "1" : "") + chomp;
1153
1086
  if (comment) {
1154
1087
  header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
1155
1088
  if (onComment) onComment();
@@ -1158,11 +1091,9 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
1158
1091
  const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
1159
1092
  let literalFallback = false;
1160
1093
  const foldOptions = getFoldOptions(ctx, true);
1161
- if (blockQuote !== "folded" && type !== Scalar.BLOCK_FOLDED) {
1162
- foldOptions.onOverflow = () => {
1163
- literalFallback = true;
1164
- };
1165
- }
1094
+ if (blockQuote !== "folded" && type !== Scalar.BLOCK_FOLDED) foldOptions.onOverflow = () => {
1095
+ literalFallback = true;
1096
+ };
1166
1097
  const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);
1167
1098
  if (!literalFallback) return `>${header}\n${indent}${body}`;
1168
1099
  }
@@ -1172,22 +1103,14 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
1172
1103
  function plainString(item, ctx, onComment, onChompKeep) {
1173
1104
  const { type, value } = item;
1174
1105
  const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
1175
- if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) {
1176
- return quotedString(value, ctx);
1177
- }
1178
- if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
1179
- return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
1180
- }
1181
- if (!implicitKey && !inFlow && type !== Scalar.PLAIN && value.includes("\n")) {
1182
- return blockString(item, ctx, onComment, onChompKeep);
1183
- }
1106
+ if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) return quotedString(value, ctx);
1107
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
1108
+ if (!implicitKey && !inFlow && type !== Scalar.PLAIN && value.includes("\n")) return blockString(item, ctx, onComment, onChompKeep);
1184
1109
  if (containsDocumentMarker(value)) {
1185
1110
  if (indent === "") {
1186
1111
  ctx.forceBlockIndent = true;
1187
1112
  return blockString(item, ctx, onComment, onChompKeep);
1188
- } else if (implicitKey && indent === indentStep) {
1189
- return quotedString(value, ctx);
1190
- }
1113
+ } else if (implicitKey && indent === indentStep) return quotedString(value, ctx);
1191
1114
  }
1192
1115
  const str = value.replace(/\n+/g, `$&\n${indent}`);
1193
1116
  if (actualString) {
@@ -1223,7 +1146,6 @@ function stringifyString(item, ctx, onComment, onChompKeep) {
1223
1146
  }
1224
1147
  return res;
1225
1148
  }
1226
-
1227
1149
  //#endregion
1228
1150
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringify.js
1229
1151
  function createStringifyContext(doc, options) {
@@ -1257,7 +1179,7 @@ function createStringifyContext(doc, options) {
1257
1179
  default: inFlow = null;
1258
1180
  }
1259
1181
  return {
1260
- anchors: new Set(),
1182
+ anchors: /* @__PURE__ */ new Set(),
1261
1183
  doc,
1262
1184
  flowCollectionPadding: opt.flowCollectionPadding ? " " : "",
1263
1185
  indent: "",
@@ -1271,7 +1193,7 @@ function getTagObject(tags, item) {
1271
1193
  const match = tags.filter((t) => t.tag === item.tag);
1272
1194
  if (match.length > 0) return match.find((t) => t.format === item.format) ?? match[0];
1273
1195
  }
1274
- let tagObj = undefined;
1196
+ let tagObj = void 0;
1275
1197
  let obj;
1276
1198
  if (isScalar$1(item)) {
1277
1199
  obj = item.value;
@@ -1307,15 +1229,14 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
1307
1229
  if (isPair(item)) return item.toString(ctx, onComment, onChompKeep);
1308
1230
  if (isAlias(item)) {
1309
1231
  if (ctx.doc.directives) return item.toString(ctx);
1310
- if (ctx.resolvedAliases?.has(item)) {
1311
- throw new TypeError(`Cannot stringify circular structure without alias nodes`);
1312
- } else {
1232
+ if (ctx.resolvedAliases?.has(item)) throw new TypeError(`Cannot stringify circular structure without alias nodes`);
1233
+ else {
1313
1234
  if (ctx.resolvedAliases) ctx.resolvedAliases.add(item);
1314
1235
  else ctx.resolvedAliases = new Set([item]);
1315
1236
  item = item.resolve(ctx.doc);
1316
1237
  }
1317
1238
  }
1318
- let tagObj = undefined;
1239
+ let tagObj = void 0;
1319
1240
  const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
1320
1241
  tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
1321
1242
  const props = stringifyProps(node, tagObj, ctx);
@@ -1324,20 +1245,14 @@ function stringify$2(item, ctx, onComment, onChompKeep) {
1324
1245
  if (!props) return str;
1325
1246
  return isScalar$1(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}\n${ctx.indent}${str}`;
1326
1247
  }
1327
-
1328
1248
  //#endregion
1329
1249
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyPair.js
1330
1250
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1331
1251
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
1332
1252
  let keyComment = isNode(key) && key.comment || null;
1333
1253
  if (simpleKeys) {
1334
- if (keyComment) {
1335
- throw new Error("With simple keys, key nodes cannot have comments");
1336
- }
1337
- if (isCollection$1(key) || !isNode(key) && typeof key === "object") {
1338
- const msg = "With simple keys, collection cannot be used as a key value";
1339
- throw new Error(msg);
1340
- }
1254
+ if (keyComment) throw new Error("With simple keys, key nodes cannot have comments");
1255
+ if (isCollection$1(key) || !isNode(key) && typeof key === "object") throw new Error("With simple keys, collection cannot be used as a key value");
1341
1256
  }
1342
1257
  let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || isCollection$1(key) || (isScalar$1(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object"));
1343
1258
  ctx = Object.assign({}, ctx, {
@@ -1359,9 +1274,8 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1359
1274
  }
1360
1275
  } else if (allNullValues && !simpleKeys || value == null && explicitKey) {
1361
1276
  str = `? ${str}`;
1362
- if (keyComment && !keyCommentDone) {
1363
- str += lineComment(str, ctx.indent, commentString(keyComment));
1364
- } else if (chompKeep && onChompKeep) onChompKeep();
1277
+ if (keyComment && !keyCommentDone) str += lineComment(str, ctx.indent, commentString(keyComment));
1278
+ else if (chompKeep && onChompKeep) onChompKeep();
1365
1279
  return str;
1366
1280
  }
1367
1281
  if (keyCommentDone) keyComment = null;
@@ -1386,9 +1300,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1386
1300
  ctx.implicitKey = false;
1387
1301
  if (!explicitKey && !keyComment && isScalar$1(value)) ctx.indentAtStart = str.length + 1;
1388
1302
  chompKeep = false;
1389
- if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
1390
- ctx.indent = ctx.indent.substring(2);
1391
- }
1303
+ if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) ctx.indent = ctx.indent.substring(2);
1392
1304
  let valueCommentDone = false;
1393
1305
  const valueStr = stringify$2(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
1394
1306
  let ws = " ";
@@ -1400,9 +1312,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1400
1312
  }
1401
1313
  if (valueStr === "" && !ctx.inFlow) {
1402
1314
  if (ws === "\n" && valueComment) ws = "\n\n";
1403
- } else {
1404
- ws += `\n${ctx.indent}`;
1405
- }
1315
+ } else ws += `\n${ctx.indent}`;
1406
1316
  } else if (!explicitKey && isCollection$1(value)) {
1407
1317
  const vs0 = valueStr[0];
1408
1318
  const nl0 = valueStr.indexOf("\n");
@@ -1412,38 +1322,22 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1412
1322
  let hasPropsLine = false;
1413
1323
  if (hasNewline && (vs0 === "&" || vs0 === "!")) {
1414
1324
  let sp0 = valueStr.indexOf(" ");
1415
- if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") {
1416
- sp0 = valueStr.indexOf(" ", sp0 + 1);
1417
- }
1325
+ if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") sp0 = valueStr.indexOf(" ", sp0 + 1);
1418
1326
  if (sp0 === -1 || nl0 < sp0) hasPropsLine = true;
1419
1327
  }
1420
1328
  if (!hasPropsLine) ws = `\n${ctx.indent}`;
1421
1329
  }
1422
- } else if (valueStr === "" || valueStr[0] === "\n") {
1423
- ws = "";
1424
- }
1330
+ } else if (valueStr === "" || valueStr[0] === "\n") ws = "";
1425
1331
  str += ws + valueStr;
1426
1332
  if (ctx.inFlow) {
1427
1333
  if (valueCommentDone && onComment) onComment();
1428
- } else if (valueComment && !valueCommentDone) {
1429
- str += lineComment(str, ctx.indent, commentString(valueComment));
1430
- } else if (chompKeep && onChompKeep) {
1431
- onChompKeep();
1432
- }
1334
+ } else if (valueComment && !valueCommentDone) str += lineComment(str, ctx.indent, commentString(valueComment));
1335
+ else if (chompKeep && onChompKeep) onChompKeep();
1433
1336
  return str;
1434
1337
  }
1435
-
1436
- //#endregion
1437
- //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/log.js
1438
- function debug(logLevel, ...messages) {
1439
- if (logLevel === "debug") console.log(...messages);
1440
- }
1441
1338
  function warn(logLevel, warning) {
1442
- if (logLevel === "debug" || logLevel === "warn") {
1443
- console.warn(warning);
1444
- }
1339
+ if (logLevel === "debug" || logLevel === "warn") console.warn(warning);
1445
1340
  }
1446
-
1447
1341
  //#endregion
1448
1342
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
1449
1343
  const MERGE_KEY = "<<";
@@ -1466,23 +1360,17 @@ function mergeValue(ctx, map, value) {
1466
1360
  const source = ctx && isAlias(value) ? value.resolve(ctx.doc) : value;
1467
1361
  if (!isMap(source)) throw new Error("Merge sources must be maps or map aliases");
1468
1362
  const srcMap = source.toJSON(null, ctx, Map);
1469
- for (const [key, value] of srcMap) {
1470
- if (map instanceof Map) {
1471
- if (!map.has(key)) map.set(key, value);
1472
- } else if (map instanceof Set) {
1473
- map.add(key);
1474
- } else if (!Object.prototype.hasOwnProperty.call(map, key)) {
1475
- Object.defineProperty(map, key, {
1476
- value,
1477
- writable: true,
1478
- enumerable: true,
1479
- configurable: true
1480
- });
1481
- }
1482
- }
1363
+ for (const [key, value] of srcMap) if (map instanceof Map) {
1364
+ if (!map.has(key)) map.set(key, value);
1365
+ } else if (map instanceof Set) map.add(key);
1366
+ else if (!Object.prototype.hasOwnProperty.call(map, key)) Object.defineProperty(map, key, {
1367
+ value,
1368
+ writable: true,
1369
+ enumerable: true,
1370
+ configurable: true
1371
+ });
1483
1372
  return map;
1484
1373
  }
1485
-
1486
1374
  //#endregion
1487
1375
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
1488
1376
  function addPairToJSMap(ctx, map, { key, value }) {
@@ -1490,11 +1378,9 @@ function addPairToJSMap(ctx, map, { key, value }) {
1490
1378
  else if (isMergeKey(ctx, key)) addMergeToJSMap(ctx, map, value);
1491
1379
  else {
1492
1380
  const jsKey = toJS(key, "", ctx);
1493
- if (map instanceof Map) {
1494
- map.set(jsKey, toJS(value, jsKey, ctx));
1495
- } else if (map instanceof Set) {
1496
- map.add(jsKey);
1497
- } else {
1381
+ if (map instanceof Map) map.set(jsKey, toJS(value, jsKey, ctx));
1382
+ else if (map instanceof Set) map.add(jsKey);
1383
+ else {
1498
1384
  const stringKey = stringifyKey(key, jsKey, ctx);
1499
1385
  const jsValue = toJS(value, stringKey, ctx);
1500
1386
  if (stringKey in map) Object.defineProperty(map, stringKey, {
@@ -1513,7 +1399,7 @@ function stringifyKey(key, jsKey, ctx) {
1513
1399
  if (typeof jsKey !== "object") return String(jsKey);
1514
1400
  if (isNode(key) && ctx?.doc) {
1515
1401
  const strCtx = createStringifyContext(ctx.doc, {});
1516
- strCtx.anchors = new Set();
1402
+ strCtx.anchors = /* @__PURE__ */ new Set();
1517
1403
  for (const node of ctx.anchors.keys()) strCtx.anchors.add(node.anchor);
1518
1404
  strCtx.inFlow = true;
1519
1405
  strCtx.inStringifyKey = true;
@@ -1528,13 +1414,10 @@ function stringifyKey(key, jsKey, ctx) {
1528
1414
  }
1529
1415
  return JSON.stringify(jsKey);
1530
1416
  }
1531
-
1532
1417
  //#endregion
1533
1418
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/Pair.js
1534
1419
  function createPair(key, value, ctx) {
1535
- const k = createNode(key, undefined, ctx);
1536
- const v = createNode(value, undefined, ctx);
1537
- return new Pair(k, v);
1420
+ return new Pair(createNode(key, void 0, ctx), createNode(value, void 0, ctx));
1538
1421
  }
1539
1422
  var Pair = class Pair {
1540
1423
  constructor(key, value = null) {
@@ -1549,20 +1432,16 @@ var Pair = class Pair {
1549
1432
  return new Pair(key, value);
1550
1433
  }
1551
1434
  toJSON(_, ctx) {
1552
- const pair = ctx?.mapAsMap ? new Map() : {};
1553
- return addPairToJSMap(ctx, pair, this);
1435
+ return addPairToJSMap(ctx, ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
1554
1436
  }
1555
1437
  toString(ctx, onComment, onChompKeep) {
1556
1438
  return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);
1557
1439
  }
1558
1440
  };
1559
-
1560
1441
  //#endregion
1561
1442
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
1562
1443
  function stringifyCollection(collection, ctx, options) {
1563
- const flow = ctx.inFlow ?? collection.flow;
1564
- const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
1565
- return stringify(collection, ctx, options);
1444
+ return (ctx.inFlow ?? collection.flow ? stringifyFlowCollection : stringifyBlockCollection)(collection, ctx, options);
1566
1445
  }
1567
1446
  function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
1568
1447
  const { indent, options: { commentString } } = ctx;
@@ -1593,9 +1472,8 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl
1593
1472
  lines.push(blockItemPrefix + str);
1594
1473
  }
1595
1474
  let str;
1596
- if (lines.length === 0) {
1597
- str = flowChars.start + flowChars.end;
1598
- } else {
1475
+ if (lines.length === 0) str = flowChars.start + flowChars.end;
1476
+ else {
1599
1477
  str = lines[0];
1600
1478
  for (let i = 1; i < lines.length; ++i) {
1601
1479
  const line = lines[i];
@@ -1637,9 +1515,7 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
1637
1515
  if (iv) {
1638
1516
  if (iv.comment) comment = iv.comment;
1639
1517
  if (iv.commentBefore) reqNewline = true;
1640
- } else if (item.value == null && ik?.comment) {
1641
- comment = ik.comment;
1642
- }
1518
+ } else if (item.value == null && ik?.comment) comment = ik.comment;
1643
1519
  }
1644
1520
  if (comment) reqNewline = true;
1645
1521
  let str = stringify$2(item, itemCtx, () => comment = null);
@@ -1650,9 +1526,8 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
1650
1526
  linesAtValue = lines.length;
1651
1527
  }
1652
1528
  const { start, end } = flowChars;
1653
- if (lines.length === 0) {
1654
- return start + end;
1655
- } else {
1529
+ if (lines.length === 0) return start + end;
1530
+ else {
1656
1531
  if (!reqNewline) {
1657
1532
  const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
1658
1533
  reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
@@ -1661,9 +1536,7 @@ function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
1661
1536
  let str = start;
1662
1537
  for (const line of lines) str += line ? `\n${indentStep}${indent}${line}` : "\n";
1663
1538
  return `${str}\n${indent}${end}`;
1664
- } else {
1665
- return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
1666
- }
1539
+ } else return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
1667
1540
  }
1668
1541
  }
1669
1542
  function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
@@ -1673,18 +1546,14 @@ function addCommentBefore({ indent, options: { commentString } }, lines, comment
1673
1546
  lines.push(ic.trimStart());
1674
1547
  }
1675
1548
  }
1676
-
1677
1549
  //#endregion
1678
1550
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLMap.js
1679
1551
  function findPair(items, key) {
1680
1552
  const k = isScalar$1(key) ? key.value : key;
1681
- for (const it of items) {
1682
- if (isPair(it)) {
1683
- if (it.key === key || it.key === k) return it;
1684
- if (isScalar$1(it.key) && it.key.value === k) return it;
1685
- }
1553
+ for (const it of items) if (isPair(it)) {
1554
+ if (it.key === key || it.key === k) return it;
1555
+ if (isScalar$1(it.key) && it.key.value === k) return it;
1686
1556
  }
1687
- return undefined;
1688
1557
  }
1689
1558
  var YAMLMap = class extends Collection {
1690
1559
  static get tagName() {
@@ -1704,16 +1573,11 @@ var YAMLMap = class extends Collection {
1704
1573
  const add = (key, value) => {
1705
1574
  if (typeof replacer === "function") value = replacer.call(obj, key, value);
1706
1575
  else if (Array.isArray(replacer) && !replacer.includes(key)) return;
1707
- if (value !== undefined || keepUndefined) map.items.push(createPair(key, value, ctx));
1576
+ if (value !== void 0 || keepUndefined) map.items.push(createPair(key, value, ctx));
1708
1577
  };
1709
- if (obj instanceof Map) {
1710
- for (const [key, value] of obj) add(key, value);
1711
- } else if (obj && typeof obj === "object") {
1712
- for (const key of Object.keys(obj)) add(key, obj[key]);
1713
- }
1714
- if (typeof schema.sortMapEntries === "function") {
1715
- map.items.sort(schema.sortMapEntries);
1716
- }
1578
+ if (obj instanceof Map) for (const [key, value] of obj) add(key, value);
1579
+ else if (obj && typeof obj === "object") for (const key of Object.keys(obj)) add(key, obj[key]);
1580
+ if (typeof schema.sortMapEntries === "function") map.items.sort(schema.sortMapEntries);
1717
1581
  return map;
1718
1582
  }
1719
1583
  /**
@@ -1725,9 +1589,8 @@ var YAMLMap = class extends Collection {
1725
1589
  add(pair, overwrite) {
1726
1590
  let _pair;
1727
1591
  if (isPair(pair)) _pair = pair;
1728
- else if (!pair || typeof pair !== "object" || !("key" in pair)) {
1729
- _pair = new Pair(pair, pair?.value);
1730
- } else _pair = new Pair(pair.key, pair.value);
1592
+ else if (!pair || typeof pair !== "object" || !("key" in pair)) _pair = new Pair(pair, pair?.value);
1593
+ else _pair = new Pair(pair.key, pair.value);
1731
1594
  const prev = findPair(this.items, _pair.key);
1732
1595
  const sortEntries = this.schema?.sortMapEntries;
1733
1596
  if (prev) {
@@ -1738,20 +1601,16 @@ var YAMLMap = class extends Collection {
1738
1601
  const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0);
1739
1602
  if (i === -1) this.items.push(_pair);
1740
1603
  else this.items.splice(i, 0, _pair);
1741
- } else {
1742
- this.items.push(_pair);
1743
- }
1604
+ } else this.items.push(_pair);
1744
1605
  }
1745
1606
  delete(key) {
1746
1607
  const it = findPair(this.items, key);
1747
1608
  if (!it) return false;
1748
- const del = this.items.splice(this.items.indexOf(it), 1);
1749
- return del.length > 0;
1609
+ return this.items.splice(this.items.indexOf(it), 1).length > 0;
1750
1610
  }
1751
1611
  get(key, keepScalar) {
1752
- const it = findPair(this.items, key);
1753
- const node = it?.value;
1754
- return (!keepScalar && isScalar$1(node) ? node.value : node) ?? undefined;
1612
+ const node = findPair(this.items, key)?.value;
1613
+ return (!keepScalar && isScalar$1(node) ? node.value : node) ?? void 0;
1755
1614
  }
1756
1615
  has(key) {
1757
1616
  return !!findPair(this.items, key);
@@ -1765,16 +1624,14 @@ var YAMLMap = class extends Collection {
1765
1624
  * @returns Instance of Type, Map, or Object
1766
1625
  */
1767
1626
  toJSON(_, ctx, Type) {
1768
- const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};
1627
+ const map = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1769
1628
  if (ctx?.onCreate) ctx.onCreate(map);
1770
1629
  for (const item of this.items) addPairToJSMap(ctx, map, item);
1771
1630
  return map;
1772
1631
  }
1773
1632
  toString(ctx, onComment, onChompKeep) {
1774
1633
  if (!ctx) return JSON.stringify(this);
1775
- for (const item of this.items) {
1776
- if (!isPair(item)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
1777
- }
1634
+ for (const item of this.items) if (!isPair(item)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
1778
1635
  if (!ctx.allNullValues && this.hasAllNullValues(false)) ctx = Object.assign({}, ctx, { allNullValues: true });
1779
1636
  return stringifyCollection(this, ctx, {
1780
1637
  blockItemPrefix: "",
@@ -1788,7 +1645,6 @@ var YAMLMap = class extends Collection {
1788
1645
  });
1789
1646
  }
1790
1647
  };
1791
-
1792
1648
  //#endregion
1793
1649
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/map.js
1794
1650
  const map = {
@@ -1802,7 +1658,6 @@ const map = {
1802
1658
  },
1803
1659
  createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx)
1804
1660
  };
1805
-
1806
1661
  //#endregion
1807
1662
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/nodes/YAMLSeq.js
1808
1663
  var YAMLSeq = class extends Collection {
@@ -1827,12 +1682,11 @@ var YAMLSeq = class extends Collection {
1827
1682
  delete(key) {
1828
1683
  const idx = asItemIndex(key);
1829
1684
  if (typeof idx !== "number") return false;
1830
- const del = this.items.splice(idx, 1);
1831
- return del.length > 0;
1685
+ return this.items.splice(idx, 1).length > 0;
1832
1686
  }
1833
1687
  get(key, keepScalar) {
1834
1688
  const idx = asItemIndex(key);
1835
- if (typeof idx !== "number") return undefined;
1689
+ if (typeof idx !== "number") return void 0;
1836
1690
  const it = this.items[idx];
1837
1691
  return !keepScalar && isScalar$1(it) ? it.value : it;
1838
1692
  }
@@ -1890,7 +1744,7 @@ var YAMLSeq = class extends Collection {
1890
1744
  const key = obj instanceof Set ? it : String(i++);
1891
1745
  it = replacer.call(obj, key, it);
1892
1746
  }
1893
- seq.items.push(createNode(it, undefined, ctx));
1747
+ seq.items.push(createNode(it, void 0, ctx));
1894
1748
  }
1895
1749
  }
1896
1750
  return seq;
@@ -1901,7 +1755,6 @@ function asItemIndex(key) {
1901
1755
  if (idx && typeof idx === "string") idx = Number(idx);
1902
1756
  return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
1903
1757
  }
1904
-
1905
1758
  //#endregion
1906
1759
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/seq.js
1907
1760
  const seq = {
@@ -1915,7 +1768,6 @@ const seq = {
1915
1768
  },
1916
1769
  createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx)
1917
1770
  };
1918
-
1919
1771
  //#endregion
1920
1772
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/string.js
1921
1773
  const string = {
@@ -1928,7 +1780,6 @@ const string = {
1928
1780
  return stringifyString(item, ctx, onComment, onChompKeep);
1929
1781
  }
1930
1782
  };
1931
-
1932
1783
  //#endregion
1933
1784
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/common/null.js
1934
1785
  const nullTag = {
@@ -1940,7 +1791,6 @@ const nullTag = {
1940
1791
  resolve: () => new Scalar(null),
1941
1792
  stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr
1942
1793
  };
1943
-
1944
1794
  //#endregion
1945
1795
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/bool.js
1946
1796
  const boolTag = {
@@ -1951,13 +1801,11 @@ const boolTag = {
1951
1801
  resolve: (str) => new Scalar(str[0] === "t" || str[0] === "T"),
1952
1802
  stringify({ source, value }, ctx) {
1953
1803
  if (source && boolTag.test.test(source)) {
1954
- const sv = source[0] === "t" || source[0] === "T";
1955
- if (value === sv) return source;
1804
+ if (value === (source[0] === "t" || source[0] === "T")) return source;
1956
1805
  }
1957
1806
  return value ? ctx.options.trueStr : ctx.options.falseStr;
1958
1807
  }
1959
1808
  };
1960
-
1961
1809
  //#endregion
1962
1810
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyNumber.js
1963
1811
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
@@ -1976,7 +1824,6 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
1976
1824
  }
1977
1825
  return n;
1978
1826
  }
1979
-
1980
1827
  //#endregion
1981
1828
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/float.js
1982
1829
  const floatNaN$1 = {
@@ -2012,7 +1859,6 @@ const float$1 = {
2012
1859
  },
2013
1860
  stringify: stringifyNumber
2014
1861
  };
2015
-
2016
1862
  //#endregion
2017
1863
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/int.js
2018
1864
  const intIdentify$2 = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -2048,7 +1894,6 @@ const intHex$1 = {
2048
1894
  resolve: (str, _onError, opt) => intResolve$1(str, 2, 16, opt),
2049
1895
  stringify: (node) => intStringify$1(node, 16, "0x")
2050
1896
  };
2051
-
2052
1897
  //#endregion
2053
1898
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/core/schema.js
2054
1899
  const schema$2 = [
@@ -2064,7 +1909,6 @@ const schema$2 = [
2064
1909
  floatExp$1,
2065
1910
  float$1
2066
1911
  ];
2067
-
2068
1912
  //#endregion
2069
1913
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/json/schema.js
2070
1914
  function intIdentify$1(value) {
@@ -2113,7 +1957,7 @@ const jsonScalars = [
2113
1957
  stringify: stringifyJSON
2114
1958
  }
2115
1959
  ];
2116
- const jsonError = {
1960
+ const schema$1 = [map, seq].concat(jsonScalars, {
2117
1961
  default: true,
2118
1962
  tag: "",
2119
1963
  test: /^/,
@@ -2121,9 +1965,7 @@ const jsonError = {
2121
1965
  onError(`Unresolved plain scalar ${JSON.stringify(str)}`);
2122
1966
  return str;
2123
1967
  }
2124
- };
2125
- const schema$1 = [map, seq].concat(jsonScalars, jsonError);
2126
-
1968
+ });
2127
1969
  //#endregion
2128
1970
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
2129
1971
  const binary = {
@@ -2149,17 +1991,13 @@ const binary = {
2149
1991
  let s = "";
2150
1992
  for (let i = 0; i < buf.length; ++i) s += String.fromCharCode(buf[i]);
2151
1993
  str = btoa(s);
2152
- } else {
2153
- throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
2154
- }
1994
+ } else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
2155
1995
  type ?? (type = Scalar.BLOCK_LITERAL);
2156
1996
  if (type !== Scalar.QUOTE_DOUBLE) {
2157
1997
  const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
2158
1998
  const n = Math.ceil(str.length / lineWidth);
2159
1999
  const lines = new Array(n);
2160
- for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
2161
- lines[i] = str.substr(o, lineWidth);
2162
- }
2000
+ for (let i = 0, o = 0; i < n; ++i, o += lineWidth) lines[i] = str.substr(o, lineWidth);
2163
2001
  str = lines.join(type === Scalar.BLOCK_LITERAL ? "\n" : " ");
2164
2002
  }
2165
2003
  return stringifyString({
@@ -2169,27 +2007,25 @@ const binary = {
2169
2007
  }, ctx, onComment, onChompKeep);
2170
2008
  }
2171
2009
  };
2172
-
2173
2010
  //#endregion
2174
2011
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
2175
2012
  function resolvePairs(seq, onError) {
2176
- if (isSeq(seq)) {
2177
- for (let i = 0; i < seq.items.length; ++i) {
2178
- let item = seq.items[i];
2179
- if (isPair(item)) continue;
2180
- else if (isMap(item)) {
2181
- if (item.items.length > 1) onError("Each pair must have its own sequence indicator");
2182
- const pair = item.items[0] || new Pair(new Scalar(null));
2183
- if (item.commentBefore) pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore}\n${pair.key.commentBefore}` : item.commentBefore;
2184
- if (item.comment) {
2185
- const cn = pair.value ?? pair.key;
2186
- cn.comment = cn.comment ? `${item.comment}\n${cn.comment}` : item.comment;
2187
- }
2188
- item = pair;
2013
+ if (isSeq(seq)) for (let i = 0; i < seq.items.length; ++i) {
2014
+ let item = seq.items[i];
2015
+ if (isPair(item)) continue;
2016
+ else if (isMap(item)) {
2017
+ if (item.items.length > 1) onError("Each pair must have its own sequence indicator");
2018
+ const pair = item.items[0] || new Pair(new Scalar(null));
2019
+ if (item.commentBefore) pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore}\n${pair.key.commentBefore}` : item.commentBefore;
2020
+ if (item.comment) {
2021
+ const cn = pair.value ?? pair.key;
2022
+ cn.comment = cn.comment ? `${item.comment}\n${cn.comment}` : item.comment;
2189
2023
  }
2190
- seq.items[i] = isPair(item) ? item : new Pair(item);
2024
+ item = pair;
2191
2025
  }
2192
- } else onError("Expected a sequence for this tag");
2026
+ seq.items[i] = isPair(item) ? item : new Pair(item);
2027
+ }
2028
+ else onError("Expected a sequence for this tag");
2193
2029
  return seq;
2194
2030
  }
2195
2031
  function createPairs(schema, iterable, ctx) {
@@ -2200,22 +2036,17 @@ function createPairs(schema, iterable, ctx) {
2200
2036
  if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) {
2201
2037
  if (typeof replacer === "function") it = replacer.call(iterable, String(i++), it);
2202
2038
  let key, value;
2203
- if (Array.isArray(it)) {
2204
- if (it.length === 2) {
2205
- key = it[0];
2206
- value = it[1];
2207
- } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
2208
- } else if (it && it instanceof Object) {
2039
+ if (Array.isArray(it)) if (it.length === 2) {
2040
+ key = it[0];
2041
+ value = it[1];
2042
+ } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
2043
+ else if (it && it instanceof Object) {
2209
2044
  const keys = Object.keys(it);
2210
2045
  if (keys.length === 1) {
2211
2046
  key = keys[0];
2212
2047
  value = it[key];
2213
- } else {
2214
- throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
2215
- }
2216
- } else {
2217
- key = it;
2218
- }
2048
+ } else throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
2049
+ } else key = it;
2219
2050
  pairs.items.push(createPair(key, value, ctx));
2220
2051
  }
2221
2052
  return pairs;
@@ -2227,7 +2058,6 @@ const pairs = {
2227
2058
  resolve: resolvePairs,
2228
2059
  createNode: createPairs
2229
2060
  };
2230
-
2231
2061
  //#endregion
2232
2062
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
2233
2063
  var YAMLOMap = class YAMLOMap extends YAMLSeq {
@@ -2246,16 +2076,14 @@ var YAMLOMap = class YAMLOMap extends YAMLSeq {
2246
2076
  */
2247
2077
  toJSON(_, ctx) {
2248
2078
  if (!ctx) return super.toJSON(_);
2249
- const map = new Map();
2079
+ const map = /* @__PURE__ */ new Map();
2250
2080
  if (ctx?.onCreate) ctx.onCreate(map);
2251
2081
  for (const pair of this.items) {
2252
2082
  let key, value;
2253
2083
  if (isPair(pair)) {
2254
2084
  key = toJS(pair.key, "", ctx);
2255
2085
  value = toJS(pair.value, key, ctx);
2256
- } else {
2257
- key = toJS(pair, "", ctx);
2258
- }
2086
+ } else key = toJS(pair, "", ctx);
2259
2087
  if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys");
2260
2088
  map.set(key, value);
2261
2089
  }
@@ -2278,25 +2106,16 @@ const omap = {
2278
2106
  resolve(seq, onError) {
2279
2107
  const pairs = resolvePairs(seq, onError);
2280
2108
  const seenKeys = [];
2281
- for (const { key } of pairs.items) {
2282
- if (isScalar$1(key)) {
2283
- if (seenKeys.includes(key.value)) {
2284
- onError(`Ordered maps must not include duplicate keys: ${key.value}`);
2285
- } else {
2286
- seenKeys.push(key.value);
2287
- }
2288
- }
2289
- }
2109
+ for (const { key } of pairs.items) if (isScalar$1(key)) if (seenKeys.includes(key.value)) onError(`Ordered maps must not include duplicate keys: ${key.value}`);
2110
+ else seenKeys.push(key.value);
2290
2111
  return Object.assign(new YAMLOMap(), pairs);
2291
2112
  },
2292
2113
  createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
2293
2114
  };
2294
-
2295
2115
  //#endregion
2296
2116
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
2297
2117
  function boolStringify({ value, source }, ctx) {
2298
- const boolObj = value ? trueTag : falseTag;
2299
- if (source && boolObj.test.test(source)) return source;
2118
+ if (source && (value ? trueTag : falseTag).test.test(source)) return source;
2300
2119
  return value ? ctx.options.trueStr : ctx.options.falseStr;
2301
2120
  }
2302
2121
  const trueTag = {
@@ -2315,7 +2134,6 @@ const falseTag = {
2315
2134
  resolve: () => new Scalar(false),
2316
2135
  stringify: boolStringify
2317
2136
  };
2318
-
2319
2137
  //#endregion
2320
2138
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js
2321
2139
  const floatNaN = {
@@ -2354,7 +2172,6 @@ const float = {
2354
2172
  },
2355
2173
  stringify: stringifyNumber
2356
2174
  };
2357
-
2358
2175
  //#endregion
2359
2176
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js
2360
2177
  const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -2423,7 +2240,6 @@ const intHex = {
2423
2240
  resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
2424
2241
  stringify: (node) => intStringify(node, 16, "0x")
2425
2242
  };
2426
-
2427
2243
  //#endregion
2428
2244
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
2429
2245
  var YAMLSet = class YAMLSet extends YAMLMap {
@@ -2436,8 +2252,7 @@ var YAMLSet = class YAMLSet extends YAMLMap {
2436
2252
  if (isPair(key)) pair = key;
2437
2253
  else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) pair = new Pair(key.key, null);
2438
2254
  else pair = new Pair(key, null);
2439
- const prev = findPair(this.items, pair.key);
2440
- if (!prev) this.items.push(pair);
2255
+ if (!findPair(this.items, pair.key)) this.items.push(pair);
2441
2256
  }
2442
2257
  /**
2443
2258
  * If `keepPair` is `true`, returns the Pair matching `key`.
@@ -2450,11 +2265,8 @@ var YAMLSet = class YAMLSet extends YAMLMap {
2450
2265
  set(key, value) {
2451
2266
  if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
2452
2267
  const prev = findPair(this.items, key);
2453
- if (prev && !value) {
2454
- this.items.splice(this.items.indexOf(prev), 1);
2455
- } else if (!prev && value) {
2456
- this.items.push(new Pair(key));
2457
- }
2268
+ if (prev && !value) this.items.splice(this.items.indexOf(prev), 1);
2269
+ else if (!prev && value) this.items.push(new Pair(key));
2458
2270
  }
2459
2271
  toJSON(_, ctx) {
2460
2272
  return super.toJSON(_, ctx, Set);
@@ -2483,14 +2295,12 @@ const set = {
2483
2295
  tag: "tag:yaml.org,2002:set",
2484
2296
  createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
2485
2297
  resolve(map, onError) {
2486
- if (isMap(map)) {
2487
- if (map.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map);
2488
- else onError("Set items must all have null values");
2489
- } else onError("Expected a mapping for this tag");
2298
+ if (isMap(map)) if (map.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map);
2299
+ else onError("Set items must all have null values");
2300
+ else onError("Expected a mapping for this tag");
2490
2301
  return map;
2491
2302
  }
2492
2303
  };
2493
-
2494
2304
  //#endregion
2495
2305
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
2496
2306
  /** Internal types handle bigint as number, because TS can't figure it out. */
@@ -2518,9 +2328,8 @@ function stringifySexagesimal(node) {
2518
2328
  }
2519
2329
  const _60 = num(60);
2520
2330
  const parts = [value % _60];
2521
- if (value < 60) {
2522
- parts.unshift(0);
2523
- } else {
2331
+ if (value < 60) parts.unshift(0);
2332
+ else {
2524
2333
  value = (value - parts[0]) / _60;
2525
2334
  parts.unshift(value % _60);
2526
2335
  if (value >= 60) {
@@ -2552,7 +2361,7 @@ const timestamp = {
2552
2361
  identify: (value) => value instanceof Date,
2553
2362
  default: true,
2554
2363
  tag: "tag:yaml.org,2002:timestamp",
2555
- test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})" + "(?:" + "(?:t|T|[ \\t]+)" + "([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)" + "(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?" + ")?$"),
2364
+ test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
2556
2365
  resolve(str) {
2557
2366
  const match = str.match(timestamp.test);
2558
2367
  if (!match) throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
@@ -2569,7 +2378,6 @@ const timestamp = {
2569
2378
  },
2570
2379
  stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
2571
2380
  };
2572
-
2573
2381
  //#endregion
2574
2382
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js
2575
2383
  const schema = [
@@ -2595,7 +2403,6 @@ const schema = [
2595
2403
  floatTime,
2596
2404
  timestamp
2597
2405
  ];
2598
-
2599
2406
  //#endregion
2600
2407
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/tags.js
2601
2408
  const schemas = new Map([
@@ -2639,22 +2446,15 @@ const coreKnownTags = {
2639
2446
  };
2640
2447
  function getTags(customTags, schemaName, addMergeTag) {
2641
2448
  const schemaTags = schemas.get(schemaName);
2642
- if (schemaTags && !customTags) {
2643
- return addMergeTag && !schemaTags.includes(merge) ? schemaTags.concat(merge) : schemaTags.slice();
2644
- }
2449
+ if (schemaTags && !customTags) return addMergeTag && !schemaTags.includes(merge) ? schemaTags.concat(merge) : schemaTags.slice();
2645
2450
  let tags = schemaTags;
2646
- if (!tags) {
2647
- if (Array.isArray(customTags)) tags = [];
2648
- else {
2649
- const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
2650
- throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
2651
- }
2652
- }
2653
- if (Array.isArray(customTags)) {
2654
- for (const tag of customTags) tags = tags.concat(tag);
2655
- } else if (typeof customTags === "function") {
2656
- tags = customTags(tags.slice());
2451
+ if (!tags) if (Array.isArray(customTags)) tags = [];
2452
+ else {
2453
+ const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
2454
+ throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
2657
2455
  }
2456
+ if (Array.isArray(customTags)) for (const tag of customTags) tags = tags.concat(tag);
2457
+ else if (typeof customTags === "function") tags = customTags(tags.slice());
2658
2458
  if (addMergeTag) tags = tags.concat(merge);
2659
2459
  return tags.reduce((tags, tag) => {
2660
2460
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
@@ -2667,7 +2467,6 @@ function getTags(customTags, schemaName, addMergeTag) {
2667
2467
  return tags;
2668
2468
  }, []);
2669
2469
  }
2670
-
2671
2470
  //#endregion
2672
2471
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/schema/Schema.js
2673
2472
  const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
@@ -2689,7 +2488,6 @@ var Schema = class Schema {
2689
2488
  return copy;
2690
2489
  }
2691
2490
  };
2692
-
2693
2491
  //#endregion
2694
2492
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/stringify/stringifyDocument.js
2695
2493
  function stringifyDocument(doc, options) {
@@ -2722,28 +2520,20 @@ function stringifyDocument(doc, options) {
2722
2520
  ctx.forceBlockIndent = !!doc.comment;
2723
2521
  contentComment = doc.contents.comment;
2724
2522
  }
2725
- const onChompKeep = contentComment ? undefined : () => chompKeep = true;
2523
+ const onChompKeep = contentComment ? void 0 : () => chompKeep = true;
2726
2524
  let body = stringify$2(doc.contents, ctx, () => contentComment = null, onChompKeep);
2727
2525
  if (contentComment) body += lineComment(body, "", commentString(contentComment));
2728
- if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") {
2729
- lines[lines.length - 1] = `--- ${body}`;
2730
- } else lines.push(body);
2731
- } else {
2732
- lines.push(stringify$2(doc.contents, ctx));
2733
- }
2734
- if (doc.directives?.docEnd) {
2735
- if (doc.comment) {
2736
- const cs = commentString(doc.comment);
2737
- if (cs.includes("\n")) {
2738
- lines.push("...");
2739
- lines.push(indentComment(cs, ""));
2740
- } else {
2741
- lines.push(`... ${cs}`);
2742
- }
2743
- } else {
2526
+ if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") lines[lines.length - 1] = `--- ${body}`;
2527
+ else lines.push(body);
2528
+ } else lines.push(stringify$2(doc.contents, ctx));
2529
+ if (doc.directives?.docEnd) if (doc.comment) {
2530
+ const cs = commentString(doc.comment);
2531
+ if (cs.includes("\n")) {
2744
2532
  lines.push("...");
2745
- }
2746
- } else {
2533
+ lines.push(indentComment(cs, ""));
2534
+ } else lines.push(`... ${cs}`);
2535
+ } else lines.push("...");
2536
+ else {
2747
2537
  let dc = doc.comment;
2748
2538
  if (dc && chompKeep) dc = dc.replace(/^\n+/, "");
2749
2539
  if (dc) {
@@ -2753,7 +2543,6 @@ function stringifyDocument(doc, options) {
2753
2543
  }
2754
2544
  return lines.join("\n") + "\n";
2755
2545
  }
2756
-
2757
2546
  //#endregion
2758
2547
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/doc/Document.js
2759
2548
  var Document = class Document {
@@ -2768,11 +2557,10 @@ var Document = class Document {
2768
2557
  this.warnings = [];
2769
2558
  Object.defineProperty(this, NODE_TYPE, { value: DOC });
2770
2559
  let _replacer = null;
2771
- if (typeof replacer === "function" || Array.isArray(replacer)) {
2772
- _replacer = replacer;
2773
- } else if (options === undefined && replacer) {
2560
+ if (typeof replacer === "function" || Array.isArray(replacer)) _replacer = replacer;
2561
+ else if (options === void 0 && replacer) {
2774
2562
  options = replacer;
2775
- replacer = undefined;
2563
+ replacer = void 0;
2776
2564
  }
2777
2565
  const opt = Object.assign({
2778
2566
  intAsBigInt: false,
@@ -2791,7 +2579,7 @@ var Document = class Document {
2791
2579
  if (this.directives.yaml.explicit) version = this.directives.yaml.version;
2792
2580
  } else this.directives = new Directives({ version });
2793
2581
  this.setSchema(version, options);
2794
- this.contents = value === undefined ? null : this.createNode(value, _replacer, options);
2582
+ this.contents = value === void 0 ? null : this.createNode(value, _replacer, options);
2795
2583
  }
2796
2584
  /**
2797
2585
  * Create a deep copy of this Document and its contents.
@@ -2836,7 +2624,7 @@ var Document = class Document {
2836
2624
  return new Alias(node.anchor);
2837
2625
  }
2838
2626
  createNode(value, replacer, options) {
2839
- let _replacer = undefined;
2627
+ let _replacer = void 0;
2840
2628
  if (typeof replacer === "function") {
2841
2629
  value = replacer.call({ "": value }, "", value);
2842
2630
  _replacer = replacer;
@@ -2845,9 +2633,9 @@ var Document = class Document {
2845
2633
  const asStr = replacer.filter(keyToStr).map(String);
2846
2634
  if (asStr.length > 0) replacer = replacer.concat(asStr);
2847
2635
  _replacer = replacer;
2848
- } else if (options === undefined && replacer) {
2636
+ } else if (options === void 0 && replacer) {
2849
2637
  options = replacer;
2850
- replacer = undefined;
2638
+ replacer = void 0;
2851
2639
  }
2852
2640
  const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};
2853
2641
  const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors(this, anchorPrefix || "a");
@@ -2870,9 +2658,7 @@ var Document = class Document {
2870
2658
  * recursively wrapping all values as `Scalar` or `Collection` nodes.
2871
2659
  */
2872
2660
  createPair(key, value, options = {}) {
2873
- const k = this.createNode(key, null, options);
2874
- const v = this.createNode(value, null, options);
2875
- return new Pair(k, v);
2661
+ return new Pair(this.createNode(key, null, options), this.createNode(value, null, options));
2876
2662
  }
2877
2663
  /**
2878
2664
  * Removes a value from the document.
@@ -2899,7 +2685,7 @@ var Document = class Document {
2899
2685
  * `true` (collections are always returned intact).
2900
2686
  */
2901
2687
  get(key, keepScalar) {
2902
- return isCollection$1(this.contents) ? this.contents.get(key, keepScalar) : undefined;
2688
+ return isCollection$1(this.contents) ? this.contents.get(key, keepScalar) : void 0;
2903
2689
  }
2904
2690
  /**
2905
2691
  * Returns item at `path`, or `undefined` if not found. By default unwraps
@@ -2908,7 +2694,7 @@ var Document = class Document {
2908
2694
  */
2909
2695
  getIn(path, keepScalar) {
2910
2696
  if (isEmptyPath(path)) return !keepScalar && isScalar$1(this.contents) ? this.contents.value : this.contents;
2911
- return isCollection$1(this.contents) ? this.contents.getIn(path, keepScalar) : undefined;
2697
+ return isCollection$1(this.contents) ? this.contents.getIn(path, keepScalar) : void 0;
2912
2698
  }
2913
2699
  /**
2914
2700
  * Checks if the document includes a value with the key `key`.
@@ -2920,7 +2706,7 @@ var Document = class Document {
2920
2706
  * Checks if the document includes a value at `path`.
2921
2707
  */
2922
2708
  hasIn(path) {
2923
- if (isEmptyPath(path)) return this.contents !== undefined;
2709
+ if (isEmptyPath(path)) return this.contents !== void 0;
2924
2710
  return isCollection$1(this.contents) ? this.contents.hasIn(path) : false;
2925
2711
  }
2926
2712
  /**
@@ -2928,24 +2714,17 @@ var Document = class Document {
2928
2714
  * boolean to add/remove the item from the set.
2929
2715
  */
2930
2716
  set(key, value) {
2931
- if (this.contents == null) {
2932
- this.contents = collectionFromPath(this.schema, [key], value);
2933
- } else if (assertCollection(this.contents)) {
2934
- this.contents.set(key, value);
2935
- }
2717
+ if (this.contents == null) this.contents = collectionFromPath(this.schema, [key], value);
2718
+ else if (assertCollection(this.contents)) this.contents.set(key, value);
2936
2719
  }
2937
2720
  /**
2938
2721
  * Sets a value in this document. For `!!set`, `value` needs to be a
2939
2722
  * boolean to add/remove the item from the set.
2940
2723
  */
2941
2724
  setIn(path, value) {
2942
- if (isEmptyPath(path)) {
2943
- this.contents = value;
2944
- } else if (this.contents == null) {
2945
- this.contents = collectionFromPath(this.schema, Array.from(path), value);
2946
- } else if (assertCollection(this.contents)) {
2947
- this.contents.setIn(path, value);
2948
- }
2725
+ if (isEmptyPath(path)) this.contents = value;
2726
+ else if (this.contents == null) this.contents = collectionFromPath(this.schema, Array.from(path), value);
2727
+ else if (assertCollection(this.contents)) this.contents.setIn(path, value);
2949
2728
  }
2950
2729
  /**
2951
2730
  * Change the YAML version and schema used by the document.
@@ -2990,7 +2769,7 @@ var Document = class Document {
2990
2769
  }
2991
2770
  toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
2992
2771
  const ctx = {
2993
- anchors: new Map(),
2772
+ anchors: /* @__PURE__ */ new Map(),
2994
2773
  doc: this,
2995
2774
  keep: !json,
2996
2775
  mapAsMap: mapAsMap === true,
@@ -3029,7 +2808,6 @@ function assertCollection(contents) {
3029
2808
  if (isCollection$1(contents)) return true;
3030
2809
  throw new Error("Expected a YAML collection as document contents");
3031
2810
  }
3032
-
3033
2811
  //#endregion
3034
2812
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/errors.js
3035
2813
  var YAMLError = class extends Error {
@@ -3072,14 +2850,11 @@ const prettifyError = (src, lc) => (error) => {
3072
2850
  if (/[^ ]/.test(lineStr)) {
3073
2851
  let count = 1;
3074
2852
  const end = error.linePos[1];
3075
- if (end?.line === line && end.col > col) {
3076
- count = Math.max(1, Math.min(end.col - col, 80 - ci));
3077
- }
2853
+ if (end?.line === line && end.col > col) count = Math.max(1, Math.min(end.col - col, 80 - ci));
3078
2854
  const pointer = " ".repeat(ci) + "^".repeat(count);
3079
2855
  error.message += `:\n\n${lineStr}\n${pointer}\n`;
3080
2856
  }
3081
2857
  };
3082
-
3083
2858
  //#endregion
3084
2859
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-props.js
3085
2860
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
@@ -3103,16 +2878,12 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
3103
2878
  reqSpace = false;
3104
2879
  }
3105
2880
  if (tab) {
3106
- if (atNewline && token.type !== "comment" && token.type !== "newline") {
3107
- onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
3108
- }
2881
+ if (atNewline && token.type !== "comment" && token.type !== "newline") onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
3109
2882
  tab = null;
3110
2883
  }
3111
2884
  switch (token.type) {
3112
2885
  case "space":
3113
- if (!flow && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) {
3114
- tab = token;
3115
- }
2886
+ if (!flow && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) tab = token;
3116
2887
  hasSpace = true;
3117
2888
  break;
3118
2889
  case "comment": {
@@ -3143,7 +2914,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
3143
2914
  hasSpace = false;
3144
2915
  reqSpace = true;
3145
2916
  break;
3146
- case "tag": {
2917
+ case "tag":
3147
2918
  if (tag) onError(token, "MULTIPLE_TAGS", "A node can have at most one tag");
3148
2919
  tag = token;
3149
2920
  start ?? (start = token.offset);
@@ -3151,7 +2922,6 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
3151
2922
  hasSpace = false;
3152
2923
  reqSpace = true;
3153
2924
  break;
3154
- }
3155
2925
  case indicator:
3156
2926
  if (anchor || tag) onError(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`);
3157
2927
  if (found) onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow ?? "collection"}`);
@@ -3174,9 +2944,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
3174
2944
  }
3175
2945
  const last = tokens[tokens.length - 1];
3176
2946
  const end = last ? last.offset + last.source.length : offset;
3177
- if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) {
3178
- onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space");
3179
- }
2947
+ if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space");
3180
2948
  if (tab && (atNewline && tab.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq")) onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation");
3181
2949
  return {
3182
2950
  comma,
@@ -3191,7 +2959,6 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
3191
2959
  start: start ?? end
3192
2960
  };
3193
2961
  }
3194
-
3195
2962
  //#endregion
3196
2963
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-contains-newline.js
3197
2964
  function containsNewline(key) {
@@ -3218,19 +2985,14 @@ function containsNewline(key) {
3218
2985
  default: return true;
3219
2986
  }
3220
2987
  }
3221
-
3222
2988
  //#endregion
3223
2989
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
3224
2990
  function flowIndentCheck(indent, fc, onError) {
3225
2991
  if (fc?.type === "flow-collection") {
3226
2992
  const end = fc.end[0];
3227
- if (end.indent === indent && (end.source === "]" || end.source === "}") && containsNewline(fc)) {
3228
- const msg = "Flow end indicator should be more indented than parent";
3229
- onError(end, "BAD_INDENT", msg, true);
3230
- }
2993
+ if (end.indent === indent && (end.source === "]" || end.source === "}") && containsNewline(fc)) onError(end, "BAD_INDENT", "Flow end indicator should be more indented than parent", true);
3231
2994
  }
3232
2995
  }
3233
-
3234
2996
  //#endregion
3235
2997
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-map-includes.js
3236
2998
  function mapIncludes(ctx, items, search) {
@@ -3239,13 +3001,11 @@ function mapIncludes(ctx, items, search) {
3239
3001
  const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || isScalar$1(a) && isScalar$1(b) && a.value === b.value;
3240
3002
  return items.some((pair) => isEqual(pair.key, search));
3241
3003
  }
3242
-
3243
3004
  //#endregion
3244
3005
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-map.js
3245
3006
  const startColMsg = "All mapping items must start at the same column";
3246
3007
  function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
3247
- const NodeClass = tag?.nodeClass ?? YAMLMap;
3248
- const map = new NodeClass(ctx.schema);
3008
+ const map = new (tag?.nodeClass ?? YAMLMap)(ctx.schema);
3249
3009
  if (ctx.atRoot) ctx.atRoot = false;
3250
3010
  let offset = bm.offset;
3251
3011
  let commentEnd = null;
@@ -3267,18 +3027,12 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta
3267
3027
  }
3268
3028
  if (!keyProps.anchor && !keyProps.tag && !sep) {
3269
3029
  commentEnd = keyProps.end;
3270
- if (keyProps.comment) {
3271
- if (map.comment) map.comment += "\n" + keyProps.comment;
3272
- else map.comment = keyProps.comment;
3273
- }
3030
+ if (keyProps.comment) if (map.comment) map.comment += "\n" + keyProps.comment;
3031
+ else map.comment = keyProps.comment;
3274
3032
  continue;
3275
3033
  }
3276
- if (keyProps.newlineAfterProp || containsNewline(key)) {
3277
- onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
3278
- }
3279
- } else if (keyProps.found?.indent !== bm.indent) {
3280
- onError(offset, "BAD_INDENT", startColMsg);
3281
- }
3034
+ if (keyProps.newlineAfterProp || containsNewline(key)) onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
3035
+ } else if (keyProps.found?.indent !== bm.indent) onError(offset, "BAD_INDENT", startColMsg);
3282
3036
  ctx.atKey = true;
3283
3037
  const keyStart = keyProps.end;
3284
3038
  const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
@@ -3307,10 +3061,8 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta
3307
3061
  map.items.push(pair);
3308
3062
  } else {
3309
3063
  if (implicitKey) onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values");
3310
- if (valueProps.comment) {
3311
- if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3312
- else keyNode.comment = valueProps.comment;
3313
- }
3064
+ if (valueProps.comment) if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3065
+ else keyNode.comment = valueProps.comment;
3314
3066
  const pair = new Pair(keyNode);
3315
3067
  if (ctx.options.keepSourceTokens) pair.srcToken = collItem;
3316
3068
  map.items.push(pair);
@@ -3324,12 +3076,10 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta
3324
3076
  ];
3325
3077
  return map;
3326
3078
  }
3327
-
3328
3079
  //#endregion
3329
3080
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-seq.js
3330
3081
  function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
3331
- const NodeClass = tag?.nodeClass ?? YAMLSeq;
3332
- const seq = new NodeClass(ctx.schema);
3082
+ const seq = new (tag?.nodeClass ?? YAMLSeq)(ctx.schema);
3333
3083
  if (ctx.atRoot) ctx.atRoot = false;
3334
3084
  if (ctx.atKey) ctx.atKey = false;
3335
3085
  let offset = bs.offset;
@@ -3343,15 +3093,12 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, ta
3343
3093
  parentIndent: bs.indent,
3344
3094
  startOnNewline: true
3345
3095
  });
3346
- if (!props.found) {
3347
- if (props.anchor || props.tag || value) {
3348
- if (value?.type === "block-seq") onError(props.end, "BAD_INDENT", "All sequence items must start at the same column");
3349
- else onError(offset, "MISSING_CHAR", "Sequence item without - indicator");
3350
- } else {
3351
- commentEnd = props.end;
3352
- if (props.comment) seq.comment = props.comment;
3353
- continue;
3354
- }
3096
+ if (!props.found) if (props.anchor || props.tag || value) if (value?.type === "block-seq") onError(props.end, "BAD_INDENT", "All sequence items must start at the same column");
3097
+ else onError(offset, "MISSING_CHAR", "Sequence item without - indicator");
3098
+ else {
3099
+ commentEnd = props.end;
3100
+ if (props.comment) seq.comment = props.comment;
3101
+ continue;
3355
3102
  }
3356
3103
  const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
3357
3104
  if (ctx.schema.compat) flowIndentCheck(bs.indent, value, onError);
@@ -3365,7 +3112,6 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, ta
3365
3112
  ];
3366
3113
  return seq;
3367
3114
  }
3368
-
3369
3115
  //#endregion
3370
3116
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-end.js
3371
3117
  function resolveEnd(end, offset, reqSpace, onError) {
@@ -3401,7 +3147,6 @@ function resolveEnd(end, offset, reqSpace, onError) {
3401
3147
  offset
3402
3148
  };
3403
3149
  }
3404
-
3405
3150
  //#endregion
3406
3151
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
3407
3152
  const blockMsg = "Block collections are not allowed within flow collections";
@@ -3409,8 +3154,7 @@ const isBlock = (token) => token && (token.type === "block-map" || token.type ==
3409
3154
  function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {
3410
3155
  const isMap = fc.start.source === "{";
3411
3156
  const fcName = isMap ? "flow map" : "flow sequence";
3412
- const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq);
3413
- const coll = new NodeClass(ctx.schema);
3157
+ const coll = new (tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq))(ctx.schema);
3414
3158
  coll.flow = true;
3415
3159
  const atRoot = ctx.atRoot;
3416
3160
  if (atRoot) ctx.atRoot = false;
@@ -3432,10 +3176,8 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
3432
3176
  if (!props.anchor && !props.tag && !sep && !value) {
3433
3177
  if (i === 0 && props.comma) onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
3434
3178
  else if (i < fc.items.length - 1) onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`);
3435
- if (props.comment) {
3436
- if (coll.comment) coll.comment += "\n" + props.comment;
3437
- else coll.comment = props.comment;
3438
- }
3179
+ if (props.comment) if (coll.comment) coll.comment += "\n" + props.comment;
3180
+ else coll.comment = props.comment;
3439
3181
  offset = props.end;
3440
3182
  continue;
3441
3183
  }
@@ -3447,15 +3189,13 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
3447
3189
  if (!props.comma) onError(props.start, "MISSING_CHAR", `Missing , between ${fcName} items`);
3448
3190
  if (props.comment) {
3449
3191
  let prevItemComment = "";
3450
- loop: for (const st of start) {
3451
- switch (st.type) {
3452
- case "comma":
3453
- case "space": break;
3454
- case "comment":
3455
- prevItemComment = st.source.substring(1);
3456
- break loop;
3457
- default: break loop;
3458
- }
3192
+ loop: for (const st of start) switch (st.type) {
3193
+ case "comma":
3194
+ case "space": break;
3195
+ case "comment":
3196
+ prevItemComment = st.source.substring(1);
3197
+ break loop;
3198
+ default: break loop;
3459
3199
  }
3460
3200
  if (prevItemComment) {
3461
3201
  let prev = coll.items[coll.items.length - 1];
@@ -3497,17 +3237,13 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
3497
3237
  }
3498
3238
  if (props.start < valueProps.found.offset - 1024) onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
3499
3239
  }
3500
- } else if (value) {
3501
- if ("source" in value && value.source?.[0] === ":") onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
3502
- else onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
3503
- }
3240
+ } else if (value) if ("source" in value && value.source?.[0] === ":") onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
3241
+ else onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
3504
3242
  const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
3505
3243
  if (valueNode) {
3506
3244
  if (isBlock(value)) onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
3507
- } else if (valueProps.comment) {
3508
- if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3509
- else keyNode.comment = valueProps.comment;
3510
- }
3245
+ } else if (valueProps.comment) if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3246
+ else keyNode.comment = valueProps.comment;
3511
3247
  const pair = new Pair(keyNode, valueNode);
3512
3248
  if (ctx.options.keepSourceTokens) pair.srcToken = collItem;
3513
3249
  if (isMap) {
@@ -3541,25 +3277,20 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
3541
3277
  }
3542
3278
  if (ee.length > 0) {
3543
3279
  const end = resolveEnd(ee, cePos, ctx.options.strict, onError);
3544
- if (end.comment) {
3545
- if (coll.comment) coll.comment += "\n" + end.comment;
3546
- else coll.comment = end.comment;
3547
- }
3280
+ if (end.comment) if (coll.comment) coll.comment += "\n" + end.comment;
3281
+ else coll.comment = end.comment;
3548
3282
  coll.range = [
3549
3283
  fc.offset,
3550
3284
  cePos,
3551
3285
  end.offset
3552
3286
  ];
3553
- } else {
3554
- coll.range = [
3555
- fc.offset,
3556
- cePos,
3557
- cePos
3558
- ];
3559
- }
3287
+ } else coll.range = [
3288
+ fc.offset,
3289
+ cePos,
3290
+ cePos
3291
+ ];
3560
3292
  return coll;
3561
3293
  }
3562
-
3563
3294
  //#endregion
3564
3295
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-collection.js
3565
3296
  function resolveCollection(CN, ctx, token, onError, tagName, tag) {
@@ -3578,15 +3309,10 @@ function composeCollection(CN, ctx, token, props, onError) {
3578
3309
  if (token.type === "block-seq") {
3579
3310
  const { anchor, newlineAfterProp: nl } = props;
3580
3311
  const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken;
3581
- if (lastProp && (!nl || nl.offset < lastProp.offset)) {
3582
- const message = "Missing newline after block sequence props";
3583
- onError(lastProp, "MISSING_CHAR", message);
3584
- }
3312
+ if (lastProp && (!nl || nl.offset < lastProp.offset)) onError(lastProp, "MISSING_CHAR", "Missing newline after block sequence props");
3585
3313
  }
3586
3314
  const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq";
3587
- if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.tagName && expType === "seq") {
3588
- return resolveCollection(CN, ctx, token, onError, tagName);
3589
- }
3315
+ if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.tagName && expType === "seq") return resolveCollection(CN, ctx, token, onError, tagName);
3590
3316
  let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);
3591
3317
  if (!tag) {
3592
3318
  const kt = ctx.schema.knownTags[tagName];
@@ -3594,11 +3320,8 @@ function composeCollection(CN, ctx, token, props, onError) {
3594
3320
  ctx.schema.tags.push(Object.assign({}, kt, { default: false }));
3595
3321
  tag = kt;
3596
3322
  } else {
3597
- if (kt) {
3598
- onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true);
3599
- } else {
3600
- onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true);
3601
- }
3323
+ if (kt) onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true);
3324
+ else onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true);
3602
3325
  return resolveCollection(CN, ctx, token, onError, tagName);
3603
3326
  }
3604
3327
  }
@@ -3610,7 +3333,6 @@ function composeCollection(CN, ctx, token, props, onError) {
3610
3333
  if (tag?.format) node.format = tag.format;
3611
3334
  return node;
3612
3335
  }
3613
-
3614
3336
  //#endregion
3615
3337
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
3616
3338
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -3657,23 +3379,15 @@ function resolveBlockScalar(ctx, scalar, onError) {
3657
3379
  if (content === "" || content === "\r") {
3658
3380
  if (header.indent === 0 && indent.length > trimIndent) trimIndent = indent.length;
3659
3381
  } else {
3660
- if (indent.length < trimIndent) {
3661
- const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator";
3662
- onError(offset + indent.length, "MISSING_CHAR", message);
3663
- }
3382
+ if (indent.length < trimIndent) onError(offset + indent.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator");
3664
3383
  if (header.indent === 0) trimIndent = indent.length;
3665
3384
  contentStart = i;
3666
- if (trimIndent === 0 && !ctx.atRoot) {
3667
- const message = "Block scalar values in collections must be indented";
3668
- onError(offset, "BAD_INDENT", message);
3669
- }
3385
+ if (trimIndent === 0 && !ctx.atRoot) onError(offset, "BAD_INDENT", "Block scalar values in collections must be indented");
3670
3386
  break;
3671
3387
  }
3672
3388
  offset += indent.length + content.length + 1;
3673
3389
  }
3674
- for (let i = lines.length - 1; i >= chompStart; --i) {
3675
- if (lines[i][0].length > trimIndent) chompStart = i + 1;
3676
- }
3390
+ for (let i = lines.length - 1; i >= chompStart; --i) if (lines[i][0].length > trimIndent) chompStart = i + 1;
3677
3391
  let value = "";
3678
3392
  let sep = "";
3679
3393
  let prevMoreIndented = false;
@@ -3685,8 +3399,7 @@ function resolveBlockScalar(ctx, scalar, onError) {
3685
3399
  if (crlf) content = content.slice(0, -1);
3686
3400
  /* istanbul ignore if already caught in lexer */
3687
3401
  if (content && indent.length < trimIndent) {
3688
- const src = header.indent ? "explicit indentation indicator" : "first line";
3689
- const message = `Block scalar lines must not be less indented than their ${src}`;
3402
+ const message = `Block scalar lines must not be less indented than their ${header.indent ? "explicit indentation indicator" : "first line"}`;
3690
3403
  onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message);
3691
3404
  indent = "";
3692
3405
  }
@@ -3699,10 +3412,9 @@ function resolveBlockScalar(ctx, scalar, onError) {
3699
3412
  value += sep + indent.slice(trimIndent) + content;
3700
3413
  sep = "\n";
3701
3414
  prevMoreIndented = true;
3702
- } else if (content === "") {
3703
- if (sep === "\n") value += "\n";
3704
- else sep = "\n";
3705
- } else {
3415
+ } else if (content === "") if (sep === "\n") value += "\n";
3416
+ else sep = "\n";
3417
+ else {
3706
3418
  value += sep + content;
3707
3419
  sep = " ";
3708
3420
  prevMoreIndented = false;
@@ -3760,10 +3472,7 @@ function parseBlockScalarHeader({ offset, props }, strict, onError) {
3760
3472
  length += token.source.length;
3761
3473
  break;
3762
3474
  case "comment":
3763
- if (strict && !hasSpace) {
3764
- const message = "Comments must be separated from other tokens by white space characters";
3765
- onError(token, "MISSING_CHAR", message);
3766
- }
3475
+ if (strict && !hasSpace) onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
3767
3476
  length += token.source.length;
3768
3477
  comment = token.source.substring(1);
3769
3478
  break;
@@ -3772,8 +3481,7 @@ function parseBlockScalarHeader({ offset, props }, strict, onError) {
3772
3481
  length += token.source.length;
3773
3482
  break;
3774
3483
  default: {
3775
- const message = `Unexpected token in block scalar header: ${token.type}`;
3776
- onError(token, "UNEXPECTED_TOKEN", message);
3484
+ onError(token, "UNEXPECTED_TOKEN", `Unexpected token in block scalar header: ${token.type}`);
3777
3485
  const ts = token.source;
3778
3486
  if (ts && typeof ts === "string") length += ts.length;
3779
3487
  }
@@ -3792,12 +3500,10 @@ function splitLines(source) {
3792
3500
  const split = source.split(/\n( *)/);
3793
3501
  const first = split[0];
3794
3502
  const m = first.match(/^( *)/);
3795
- const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
3796
- const lines = [line0];
3503
+ const lines = [m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first]];
3797
3504
  for (let i = 1; i < split.length; i += 2) lines.push([split[i], split[i + 1]]);
3798
3505
  return lines;
3799
3506
  }
3800
-
3801
3507
  //#endregion
3802
3508
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
3803
3509
  function resolveFlowScalar(scalar, strict, onError) {
@@ -3857,15 +3563,13 @@ function plainValue(source, onError) {
3857
3563
  badChar = "directive indicator character %";
3858
3564
  break;
3859
3565
  case "|":
3860
- case ">": {
3566
+ case ">":
3861
3567
  badChar = `block scalar indicator ${source[0]}`;
3862
3568
  break;
3863
- }
3864
3569
  case "@":
3865
- case "`": {
3570
+ case "`":
3866
3571
  badChar = `reserved character ${source[0]}`;
3867
3572
  break;
3868
- }
3869
3573
  }
3870
3574
  if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
3871
3575
  return foldLines(source);
@@ -3884,8 +3588,8 @@ function foldLines(source) {
3884
3588
  */
3885
3589
  let first, line;
3886
3590
  try {
3887
- first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
3888
- line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
3591
+ first = /* @__PURE__ */ new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
3592
+ line = /* @__PURE__ */ new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
3889
3593
  } catch {
3890
3594
  first = /(.*?)[ \t]*\r?\n/sy;
3891
3595
  line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
@@ -3897,10 +3601,9 @@ function foldLines(source) {
3897
3601
  let pos = first.lastIndex;
3898
3602
  line.lastIndex = pos;
3899
3603
  while (match = line.exec(source)) {
3900
- if (match[1] === "") {
3901
- if (sep === "\n") res += sep;
3902
- else sep = "\n";
3903
- } else {
3604
+ if (match[1] === "") if (sep === "\n") res += sep;
3605
+ else sep = "\n";
3606
+ else {
3904
3607
  res += sep + match[1];
3905
3608
  sep = " ";
3906
3609
  }
@@ -3948,9 +3651,7 @@ function doubleQuotedValue(source, onError) {
3948
3651
  let next = source[i + 1];
3949
3652
  while (next === " " || next === " ") next = source[++i + 1];
3950
3653
  if (next !== "\n" && !(next === "\r" && source[i + 2] === "\n")) res += i > wsStart ? source.slice(wsStart, i + 1) : ch;
3951
- } else {
3952
- res += ch;
3953
- }
3654
+ } else res += ch;
3954
3655
  }
3955
3656
  if (source[source.length - 1] !== "\"" || source.length === 1) onError(source.length, "MISSING_CHAR", "Missing closing \"quote");
3956
3657
  return res;
@@ -3996,8 +3697,7 @@ const escapeCodes = {
3996
3697
  };
3997
3698
  function parseCharCode(source, offset, length, onError) {
3998
3699
  const cc = source.substr(offset, length);
3999
- const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
4000
- const code = ok ? parseInt(cc, 16) : NaN;
3700
+ const code = cc.length === length && /^[0-9a-fA-F]+$/.test(cc) ? parseInt(cc, 16) : NaN;
4001
3701
  if (isNaN(code)) {
4002
3702
  const raw = source.substr(offset - 2, length + 2);
4003
3703
  onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
@@ -4005,16 +3705,14 @@ function parseCharCode(source, offset, length, onError) {
4005
3705
  }
4006
3706
  return String.fromCodePoint(code);
4007
3707
  }
4008
-
4009
3708
  //#endregion
4010
3709
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-scalar.js
4011
3710
  function composeScalar(ctx, token, tagToken, onError) {
4012
3711
  const { value, type, comment, range } = token.type === "block-scalar" ? resolveBlockScalar(ctx, token, onError) : resolveFlowScalar(token, ctx.options.strict, onError);
4013
3712
  const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
4014
3713
  let tag;
4015
- if (ctx.options.stringKeys && ctx.atKey) {
4016
- tag = ctx.schema[SCALAR$1];
4017
- } else if (tagName) tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);
3714
+ if (ctx.options.stringKeys && ctx.atKey) tag = ctx.schema[SCALAR$1];
3715
+ else if (tagName) tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);
4018
3716
  else if (token.type === "scalar") tag = findScalarTagByTest(ctx, value, token, onError);
4019
3717
  else tag = ctx.schema[SCALAR$1];
4020
3718
  let scalar;
@@ -4037,18 +3735,14 @@ function composeScalar(ctx, token, tagToken, onError) {
4037
3735
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
4038
3736
  if (tagName === "!") return schema[SCALAR$1];
4039
3737
  const matchWithTest = [];
4040
- for (const tag of schema.tags) {
4041
- if (!tag.collection && tag.tag === tagName) {
4042
- if (tag.default && tag.test) matchWithTest.push(tag);
4043
- else return tag;
4044
- }
4045
- }
3738
+ for (const tag of schema.tags) if (!tag.collection && tag.tag === tagName) if (tag.default && tag.test) matchWithTest.push(tag);
3739
+ else return tag;
4046
3740
  for (const tag of matchWithTest) if (tag.test?.test(value)) return tag;
4047
3741
  const kt = schema.knownTags[tagName];
4048
3742
  if (kt && !kt.collection) {
4049
3743
  schema.tags.push(Object.assign({}, kt, {
4050
3744
  default: false,
4051
- test: undefined
3745
+ test: void 0
4052
3746
  }));
4053
3747
  return kt;
4054
3748
  }
@@ -4059,16 +3753,10 @@ function findScalarTagByTest({ atKey, directives, schema }, value, token, onErro
4059
3753
  const tag = schema.tags.find((tag) => (tag.default === true || atKey && tag.default === "key") && tag.test?.test(value)) || schema[SCALAR$1];
4060
3754
  if (schema.compat) {
4061
3755
  const compat = schema.compat.find((tag) => tag.default && tag.test?.test(value)) ?? schema[SCALAR$1];
4062
- if (tag.tag !== compat.tag) {
4063
- const ts = directives.tagString(tag.tag);
4064
- const cs = directives.tagString(compat.tag);
4065
- const msg = `Value may be parsed as either ${ts} or ${cs}`;
4066
- onError(token, "TAG_RESOLVE_FAILED", msg, true);
4067
- }
3756
+ if (tag.tag !== compat.tag) onError(token, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${directives.tagString(tag.tag)} or ${directives.tagString(compat.tag)}`, true);
4068
3757
  }
4069
3758
  return tag;
4070
3759
  }
4071
-
4072
3760
  //#endregion
4073
3761
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
4074
3762
  function emptyScalarPosition(offset, before, pos) {
@@ -4093,7 +3781,6 @@ function emptyScalarPosition(offset, before, pos) {
4093
3781
  }
4094
3782
  return offset;
4095
3783
  }
4096
-
4097
3784
  //#endregion
4098
3785
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-node.js
4099
3786
  const CN = {
@@ -4123,34 +3810,26 @@ function composeNode(ctx, token, props, onError) {
4123
3810
  node = composeCollection(CN, ctx, token, props, onError);
4124
3811
  if (anchor) node.anchor = anchor.source.substring(1);
4125
3812
  break;
4126
- default: {
4127
- const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
4128
- onError(token, "UNEXPECTED_TOKEN", message);
4129
- node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
3813
+ default:
3814
+ onError(token, "UNEXPECTED_TOKEN", token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`);
3815
+ node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError);
4130
3816
  isSrcToken = false;
4131
- }
4132
3817
  }
4133
3818
  if (anchor && node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
4134
- if (atKey && ctx.options.stringKeys && (!isScalar$1(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
4135
- const msg = "With stringKeys, all keys must be strings";
4136
- onError(tag ?? token, "NON_STRING_KEY", msg);
4137
- }
3819
+ if (atKey && ctx.options.stringKeys && (!isScalar$1(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) onError(tag ?? token, "NON_STRING_KEY", "With stringKeys, all keys must be strings");
4138
3820
  if (spaceBefore) node.spaceBefore = true;
4139
- if (comment) {
4140
- if (token.type === "scalar" && token.source === "") node.comment = comment;
4141
- else node.commentBefore = comment;
4142
- }
3821
+ if (comment) if (token.type === "scalar" && token.source === "") node.comment = comment;
3822
+ else node.commentBefore = comment;
4143
3823
  if (ctx.options.keepSourceTokens && isSrcToken) node.srcToken = token;
4144
3824
  return node;
4145
3825
  }
4146
3826
  function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
4147
- const token = {
3827
+ const node = composeScalar(ctx, {
4148
3828
  type: "scalar",
4149
3829
  offset: emptyScalarPosition(offset, before, pos),
4150
3830
  indent: -1,
4151
3831
  source: ""
4152
- };
4153
- const node = composeScalar(ctx, token, tag, onError);
3832
+ }, tag, onError);
4154
3833
  if (anchor) {
4155
3834
  node.anchor = anchor.source.substring(1);
4156
3835
  if (node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
@@ -4176,12 +3855,10 @@ function composeAlias({ options }, { offset, source, end }, onError) {
4176
3855
  if (re.comment) alias.comment = re.comment;
4177
3856
  return alias;
4178
3857
  }
4179
-
4180
3858
  //#endregion
4181
3859
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/compose-doc.js
4182
3860
  function composeDoc(options, directives, { offset, start, value, end }, onError) {
4183
- const opts = Object.assign({ _directives: directives }, options);
4184
- const doc = new Document(undefined, opts);
3861
+ const doc = new Document(void 0, Object.assign({ _directives: directives }, options));
4185
3862
  const ctx = {
4186
3863
  atKey: false,
4187
3864
  atRoot: true,
@@ -4212,7 +3889,6 @@ function composeDoc(options, directives, { offset, start, value, end }, onError)
4212
3889
  ];
4213
3890
  return doc;
4214
3891
  }
4215
-
4216
3892
  //#endregion
4217
3893
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/compose/composer.js
4218
3894
  function getErrorPos(src) {
@@ -4277,11 +3953,9 @@ var Composer = class {
4277
3953
  const { comment, afterEmptyLine } = parsePrelude(this.prelude);
4278
3954
  if (comment) {
4279
3955
  const dc = doc.contents;
4280
- if (afterDoc) {
4281
- doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;
4282
- } else if (afterEmptyLine || doc.directives.docStart || !dc) {
4283
- doc.commentBefore = comment;
4284
- } else if (isCollection$1(dc) && !dc.flow && dc.items.length > 0) {
3956
+ if (afterDoc) doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;
3957
+ else if (afterEmptyLine || doc.directives.docStart || !dc) doc.commentBefore = comment;
3958
+ else if (isCollection$1(dc) && !dc.flow && dc.items.length > 0) {
4285
3959
  let it = dc.items[0];
4286
3960
  if (isPair(it)) it = it.key;
4287
3961
  const cb = it.commentBefore;
@@ -4361,8 +4035,7 @@ var Composer = class {
4361
4035
  }
4362
4036
  case "doc-end": {
4363
4037
  if (!this.doc) {
4364
- const msg = "Unexpected doc-end without preceding document";
4365
- this.errors.push(new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
4038
+ this.errors.push(new YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
4366
4039
  break;
4367
4040
  }
4368
4041
  this.doc.directives.docEnd = true;
@@ -4390,8 +4063,7 @@ var Composer = class {
4390
4063
  yield this.doc;
4391
4064
  this.doc = null;
4392
4065
  } else if (forceDoc) {
4393
- const opts = Object.assign({ _directives: this.directives }, this.options);
4394
- const doc = new Document(undefined, opts);
4066
+ const doc = new Document(void 0, Object.assign({ _directives: this.directives }, this.options));
4395
4067
  if (this.atDirectives) this.onError(endOffset, "MISSING_CHAR", "Missing directives-end indicator line");
4396
4068
  doc.range = [
4397
4069
  0,
@@ -4403,7 +4075,6 @@ var Composer = class {
4403
4075
  }
4404
4076
  }
4405
4077
  };
4406
-
4407
4078
  //#endregion
4408
4079
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst-scalar.js
4409
4080
  function resolveAsScalar(token, strict = true, onError) {
@@ -4584,7 +4255,7 @@ function setBlockScalarValue(token, source) {
4584
4255
  indent,
4585
4256
  source: head
4586
4257
  }];
4587
- if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined)) props.push({
4258
+ if (!addEndtoBlockProps(props, "end" in token ? token.end : void 0)) props.push({
4588
4259
  type: "newline",
4589
4260
  offset: -1,
4590
4261
  indent,
@@ -4635,10 +4306,9 @@ function setFlowScalarValue(token, source, type) {
4635
4306
  }
4636
4307
  case "block-map":
4637
4308
  case "block-seq": {
4638
- const offset = token.offset + source.length;
4639
4309
  const nl = {
4640
4310
  type: "newline",
4641
- offset,
4311
+ offset: token.offset + source.length,
4642
4312
  indent: token.indent,
4643
4313
  source: "\n"
4644
4314
  };
@@ -4663,7 +4333,6 @@ function setFlowScalarValue(token, source, type) {
4663
4333
  }
4664
4334
  }
4665
4335
  }
4666
-
4667
4336
  //#endregion
4668
4337
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst-stringify.js
4669
4338
  /**
@@ -4712,7 +4381,6 @@ function stringifyItem({ start, key, sep, value }) {
4712
4381
  if (value) res += stringifyToken(value);
4713
4382
  return res;
4714
4383
  }
4715
-
4716
4384
  //#endregion
4717
4385
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst-visit.js
4718
4386
  const BREAK = Symbol("break visit");
@@ -4764,9 +4432,8 @@ visit.itemAtPath = (cst, path) => {
4764
4432
  let item = cst;
4765
4433
  for (const [field, index] of path) {
4766
4434
  const tok = item?.[field];
4767
- if (tok && "items" in tok) {
4768
- item = tok.items[index];
4769
- } else return undefined;
4435
+ if (tok && "items" in tok) item = tok.items[index];
4436
+ else return void 0;
4770
4437
  }
4771
4438
  return item;
4772
4439
  };
@@ -4802,14 +4469,13 @@ function _visit(path, item, visitor) {
4802
4469
  }
4803
4470
  return typeof ctrl === "function" ? ctrl(item, path) : ctrl;
4804
4471
  }
4805
-
4806
4472
  //#endregion
4807
4473
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/cst.js
4808
4474
  var cst_exports = /* @__PURE__ */ __exportAll({
4809
- BOM: () => BOM,
4810
- DOCUMENT: () => DOCUMENT,
4811
- FLOW_END: () => FLOW_END,
4812
- SCALAR: () => SCALAR,
4475
+ BOM: () => "",
4476
+ DOCUMENT: () => "",
4477
+ FLOW_END: () => "",
4478
+ SCALAR: () => "",
4813
4479
  createScalarToken: () => createScalarToken,
4814
4480
  isCollection: () => isCollection,
4815
4481
  isScalar: () => isScalar,
@@ -4820,14 +4486,6 @@ var cst_exports = /* @__PURE__ */ __exportAll({
4820
4486
  tokenType: () => tokenType,
4821
4487
  visit: () => visit
4822
4488
  });
4823
- /** The byte order mark */
4824
- const BOM = "";
4825
- /** Start of doc-mode */
4826
- const DOCUMENT = "";
4827
- /** Unexpected end of flow-mode */
4828
- const FLOW_END = "";
4829
- /** Next token is a scalar value */
4830
- const SCALAR = "";
4831
4489
  /** @returns `true` if `token` is a flow or block collection */
4832
4490
  const isCollection = (token) => !!token && "items" in token;
4833
4491
  /** @returns `true` if `token` is a flow or block scalar; not an alias */
@@ -4836,20 +4494,20 @@ const isScalar = (token) => !!token && (token.type === "scalar" || token.type ==
4836
4494
  /** Get a printable representation of a lexer token */
4837
4495
  function prettyToken(token) {
4838
4496
  switch (token) {
4839
- case BOM: return "<BOM>";
4840
- case DOCUMENT: return "<DOC>";
4841
- case FLOW_END: return "<FLOW_END>";
4842
- case SCALAR: return "<SCALAR>";
4497
+ case "": return "<BOM>";
4498
+ case "": return "<DOC>";
4499
+ case "": return "<FLOW_END>";
4500
+ case "": return "<SCALAR>";
4843
4501
  default: return JSON.stringify(token);
4844
4502
  }
4845
4503
  }
4846
4504
  /** Identify the type of a lexer token. May return `null` for unknown tokens. */
4847
4505
  function tokenType(source) {
4848
4506
  switch (source) {
4849
- case BOM: return "byte-order-mark";
4850
- case DOCUMENT: return "doc-mode";
4851
- case FLOW_END: return "flow-error-end";
4852
- case SCALAR: return "scalar";
4507
+ case "": return "byte-order-mark";
4508
+ case "": return "doc-mode";
4509
+ case "": return "flow-error-end";
4510
+ case "": return "scalar";
4853
4511
  case "---": return "doc-start";
4854
4512
  case "...": return "doc-end";
4855
4513
  case "":
@@ -4879,12 +4537,11 @@ function tokenType(source) {
4879
4537
  }
4880
4538
  return null;
4881
4539
  }
4882
-
4883
4540
  //#endregion
4884
4541
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/lexer.js
4885
4542
  function isEmpty(ch) {
4886
4543
  switch (ch) {
4887
- case undefined:
4544
+ case void 0:
4888
4545
  case " ":
4889
4546
  case "\n":
4890
4547
  case "\r":
@@ -4892,10 +4549,10 @@ function isEmpty(ch) {
4892
4549
  default: return false;
4893
4550
  }
4894
4551
  }
4895
- const hexDigits = new Set("0123456789ABCDEFabcdef");
4896
- const tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
4897
- const flowIndicatorChars = new Set(",[]{}");
4898
- const invalidAnchorChars = new Set(" ,[]{}\n\r ");
4552
+ const hexDigits = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef");
4553
+ const tagChars = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
4554
+ const flowIndicatorChars = /* @__PURE__ */ new Set(",[]{}");
4555
+ const invalidAnchorChars = /* @__PURE__ */ new Set(" ,[]{}\n\r ");
4899
4556
  const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);
4900
4557
  /**
4901
4558
  * Splits an input string into lexical tokens, i.e. smaller strings that are
@@ -5036,7 +4693,7 @@ var Lexer = class {
5036
4693
  *parseStream() {
5037
4694
  let line = this.getLine();
5038
4695
  if (line === null) return this.setNext("stream");
5039
- if (line[0] === BOM) {
4696
+ if (line[0] === "") {
5040
4697
  yield* this.pushCount(1);
5041
4698
  line = line.substring(1);
5042
4699
  }
@@ -5048,9 +4705,7 @@ var Lexer = class {
5048
4705
  if (ch === " " || ch === " ") {
5049
4706
  dirEnd = cs - 1;
5050
4707
  break;
5051
- } else {
5052
- cs = line.indexOf("#", cs + 1);
5053
- }
4708
+ } else cs = line.indexOf("#", cs + 1);
5054
4709
  }
5055
4710
  while (true) {
5056
4711
  const ch = line[dirEnd - 1];
@@ -5068,7 +4723,7 @@ var Lexer = class {
5068
4723
  yield* this.pushNewline();
5069
4724
  return "stream";
5070
4725
  }
5071
- yield DOCUMENT;
4726
+ yield "";
5072
4727
  return yield* this.parseLineStart();
5073
4728
  }
5074
4729
  *parseLineStart() {
@@ -5106,7 +4761,7 @@ var Lexer = class {
5106
4761
  let n = yield* this.pushIndicators();
5107
4762
  switch (line[n]) {
5108
4763
  case "#": yield* this.pushCount(line.length - n);
5109
- case undefined:
4764
+ case void 0:
5110
4765
  yield* this.pushNewline();
5111
4766
  return yield* this.parseLineStart();
5112
4767
  case "{":
@@ -5142,18 +4797,15 @@ var Lexer = class {
5142
4797
  if (nl > 0) {
5143
4798
  sp = yield* this.pushSpaces(false);
5144
4799
  this.indentValue = indent = sp;
5145
- } else {
5146
- sp = 0;
5147
- }
4800
+ } else sp = 0;
5148
4801
  sp += yield* this.pushSpaces(true);
5149
4802
  } while (nl + sp > 0);
5150
4803
  const line = this.getLine();
5151
4804
  if (line === null) return this.setNext("flow");
5152
4805
  if (indent !== -1 && indent < this.indentNext && line[0] !== "#" || indent === 0 && (line.startsWith("---") || line.startsWith("...")) && isEmpty(line[3])) {
5153
- const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}");
5154
- if (!atFlowEndMarker) {
4806
+ if (!(indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}"))) {
5155
4807
  this.flowLevel = 0;
5156
- yield FLOW_END;
4808
+ yield "";
5157
4809
  return yield* this.parseLineStart();
5158
4810
  }
5159
4811
  }
@@ -5165,7 +4817,7 @@ var Lexer = class {
5165
4817
  }
5166
4818
  n += yield* this.pushIndicators();
5167
4819
  switch (line[n]) {
5168
- case undefined: return "flow";
4820
+ case void 0: return "flow";
5169
4821
  case "#":
5170
4822
  yield* this.pushCount(line.length - n);
5171
4823
  return "flow";
@@ -5205,15 +4857,12 @@ var Lexer = class {
5205
4857
  *parseQuotedScalar() {
5206
4858
  const quote = this.charAt(0);
5207
4859
  let end = this.buffer.indexOf(quote, this.pos + 1);
5208
- if (quote === "'") {
5209
- while (end !== -1 && this.buffer[end + 1] === "'") end = this.buffer.indexOf("'", end + 2);
5210
- } else {
5211
- while (end !== -1) {
5212
- let n = 0;
5213
- while (this.buffer[end - 1 - n] === "\\") n += 1;
5214
- if (n % 2 === 0) break;
5215
- end = this.buffer.indexOf("\"", end + 1);
5216
- }
4860
+ if (quote === "'") while (end !== -1 && this.buffer[end + 1] === "'") end = this.buffer.indexOf("'", end + 2);
4861
+ else while (end !== -1) {
4862
+ let n = 0;
4863
+ while (this.buffer[end - 1 - n] === "\\") n += 1;
4864
+ if (n % 2 === 0) break;
4865
+ end = this.buffer.indexOf("\"", end + 1);
5217
4866
  }
5218
4867
  const qb = this.buffer.substring(0, end);
5219
4868
  let nl = qb.indexOf("\n", this.pos);
@@ -5223,9 +4872,7 @@ var Lexer = class {
5223
4872
  if (cs === -1) break;
5224
4873
  nl = qb.indexOf("\n", cs);
5225
4874
  }
5226
- if (nl !== -1) {
5227
- end = nl - (qb[nl - 1] === "\r" ? 2 : 1);
5228
- }
4875
+ if (nl !== -1) end = nl - (qb[nl - 1] === "\r" ? 2 : 1);
5229
4876
  }
5230
4877
  if (end === -1) {
5231
4878
  if (!this.atEnd) return this.setNext("quoted-scalar");
@@ -5250,29 +4897,25 @@ var Lexer = class {
5250
4897
  let nl = this.pos - 1;
5251
4898
  let indent = 0;
5252
4899
  let ch;
5253
- loop: for (let i = this.pos; ch = this.buffer[i]; ++i) {
5254
- switch (ch) {
5255
- case " ":
5256
- indent += 1;
5257
- break;
5258
- case "\n":
5259
- nl = i;
5260
- indent = 0;
5261
- break;
5262
- case "\r": {
5263
- const next = this.buffer[i + 1];
5264
- if (!next && !this.atEnd) return this.setNext("block-scalar");
5265
- if (next === "\n") break;
5266
- }
5267
- default: break loop;
4900
+ loop: for (let i = this.pos; ch = this.buffer[i]; ++i) switch (ch) {
4901
+ case " ":
4902
+ indent += 1;
4903
+ break;
4904
+ case "\n":
4905
+ nl = i;
4906
+ indent = 0;
4907
+ break;
4908
+ case "\r": {
4909
+ const next = this.buffer[i + 1];
4910
+ if (!next && !this.atEnd) return this.setNext("block-scalar");
4911
+ if (next === "\n") break;
5268
4912
  }
4913
+ default: break loop;
5269
4914
  }
5270
4915
  if (!ch && !this.atEnd) return this.setNext("block-scalar");
5271
4916
  if (indent >= this.indentNext) {
5272
4917
  if (this.blockScalarIndent === -1) this.indentNext = indent;
5273
- else {
5274
- this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
5275
- }
4918
+ else this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
5276
4919
  do {
5277
4920
  const cs = this.continueScalar(nl + 1);
5278
4921
  if (cs === -1) break;
@@ -5289,18 +4932,16 @@ var Lexer = class {
5289
4932
  if (ch === " ") {
5290
4933
  while (ch === " " || ch === " " || ch === "\r" || ch === "\n") ch = this.buffer[++i];
5291
4934
  nl = i - 1;
5292
- } else if (!this.blockScalarKeep) {
5293
- do {
5294
- let i = nl - 1;
5295
- let ch = this.buffer[i];
5296
- if (ch === "\r") ch = this.buffer[--i];
5297
- const lastChar = i;
5298
- while (ch === " ") ch = this.buffer[--i];
5299
- if (ch === "\n" && i >= this.pos && i + 1 + indent > lastChar) nl = i;
5300
- else break;
5301
- } while (true);
5302
- }
5303
- yield SCALAR;
4935
+ } else if (!this.blockScalarKeep) do {
4936
+ let i = nl - 1;
4937
+ let ch = this.buffer[i];
4938
+ if (ch === "\r") ch = this.buffer[--i];
4939
+ const lastChar = i;
4940
+ while (ch === " ") ch = this.buffer[--i];
4941
+ if (ch === "\n" && i >= this.pos && i + 1 + indent > lastChar) nl = i;
4942
+ else break;
4943
+ } while (true);
4944
+ yield "";
5304
4945
  yield* this.pushToIndex(nl + 1, true);
5305
4946
  return yield* this.parseLineStart();
5306
4947
  }
@@ -5309,33 +4950,29 @@ var Lexer = class {
5309
4950
  let end = this.pos - 1;
5310
4951
  let i = this.pos - 1;
5311
4952
  let ch;
5312
- while (ch = this.buffer[++i]) {
5313
- if (ch === ":") {
5314
- const next = this.buffer[i + 1];
5315
- if (isEmpty(next) || inFlow && flowIndicatorChars.has(next)) break;
5316
- end = i;
5317
- } else if (isEmpty(ch)) {
5318
- let next = this.buffer[i + 1];
5319
- if (ch === "\r") {
5320
- if (next === "\n") {
5321
- i += 1;
5322
- ch = "\n";
5323
- next = this.buffer[i + 1];
5324
- } else end = i;
5325
- }
5326
- if (next === "#" || inFlow && flowIndicatorChars.has(next)) break;
5327
- if (ch === "\n") {
5328
- const cs = this.continueScalar(i + 1);
5329
- if (cs === -1) break;
5330
- i = Math.max(i, cs - 2);
5331
- }
5332
- } else {
5333
- if (inFlow && flowIndicatorChars.has(ch)) break;
5334
- end = i;
4953
+ while (ch = this.buffer[++i]) if (ch === ":") {
4954
+ const next = this.buffer[i + 1];
4955
+ if (isEmpty(next) || inFlow && flowIndicatorChars.has(next)) break;
4956
+ end = i;
4957
+ } else if (isEmpty(ch)) {
4958
+ let next = this.buffer[i + 1];
4959
+ if (ch === "\r") if (next === "\n") {
4960
+ i += 1;
4961
+ ch = "\n";
4962
+ next = this.buffer[i + 1];
4963
+ } else end = i;
4964
+ if (next === "#" || inFlow && flowIndicatorChars.has(next)) break;
4965
+ if (ch === "\n") {
4966
+ const cs = this.continueScalar(i + 1);
4967
+ if (cs === -1) break;
4968
+ i = Math.max(i, cs - 2);
5335
4969
  }
4970
+ } else {
4971
+ if (inFlow && flowIndicatorChars.has(ch)) break;
4972
+ end = i;
5336
4973
  }
5337
4974
  if (!ch && !this.atEnd) return this.setNext("plain-scalar");
5338
- yield SCALAR;
4975
+ yield "";
5339
4976
  yield* this.pushToIndex(end + 1, true);
5340
4977
  return inFlow ? "flow" : "doc";
5341
4978
  }
@@ -5383,12 +5020,9 @@ var Lexer = class {
5383
5020
  } else {
5384
5021
  let i = this.pos + 1;
5385
5022
  let ch = this.buffer[i];
5386
- while (ch) {
5387
- if (tagChars.has(ch)) ch = this.buffer[++i];
5388
- else if (ch === "%" && hexDigits.has(this.buffer[i + 1]) && hexDigits.has(this.buffer[i + 2])) {
5389
- ch = this.buffer[i += 3];
5390
- } else break;
5391
- }
5023
+ while (ch) if (tagChars.has(ch)) ch = this.buffer[++i];
5024
+ else if (ch === "%" && hexDigits.has(this.buffer[i + 1]) && hexDigits.has(this.buffer[i + 2])) ch = this.buffer[i += 3];
5025
+ else break;
5392
5026
  return yield* this.pushToIndex(i, false);
5393
5027
  }
5394
5028
  }
@@ -5401,9 +5035,9 @@ var Lexer = class {
5401
5035
  *pushSpaces(allowTabs) {
5402
5036
  let i = this.pos - 1;
5403
5037
  let ch;
5404
- do {
5038
+ do
5405
5039
  ch = this.buffer[++i];
5406
- } while (ch === " " || allowTabs && ch === " ");
5040
+ while (ch === " " || allowTabs && ch === " ");
5407
5041
  const n = i - this.pos;
5408
5042
  if (n > 0) {
5409
5043
  yield this.buffer.substr(this.pos, n);
@@ -5418,7 +5052,6 @@ var Lexer = class {
5418
5052
  return yield* this.pushToIndex(i, false);
5419
5053
  }
5420
5054
  };
5421
-
5422
5055
  //#endregion
5423
5056
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/line-counter.js
5424
5057
  /**
@@ -5463,7 +5096,6 @@ var LineCounter = class {
5463
5096
  };
5464
5097
  }
5465
5098
  };
5466
-
5467
5099
  //#endregion
5468
5100
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/parse/parser.js
5469
5101
  function includesToken(list, type) {
@@ -5471,13 +5103,11 @@ function includesToken(list, type) {
5471
5103
  return false;
5472
5104
  }
5473
5105
  function findNonEmptyIndex(list) {
5474
- for (let i = 0; i < list.length; ++i) {
5475
- switch (list[i].type) {
5476
- case "space":
5477
- case "comment":
5478
- case "newline": break;
5479
- default: return i;
5480
- }
5106
+ for (let i = 0; i < list.length; ++i) switch (list[i].type) {
5107
+ case "space":
5108
+ case "comment":
5109
+ case "newline": break;
5110
+ default: return i;
5481
5111
  }
5482
5112
  return -1;
5483
5113
  }
@@ -5506,30 +5136,25 @@ function getPrevProps(parent) {
5506
5136
  function getFirstKeyStartProps(prev) {
5507
5137
  if (prev.length === 0) return [];
5508
5138
  let i = prev.length;
5509
- loop: while (--i >= 0) {
5510
- switch (prev[i].type) {
5511
- case "doc-start":
5512
- case "explicit-key-ind":
5513
- case "map-value-ind":
5514
- case "seq-item-ind":
5515
- case "newline": break loop;
5516
- }
5517
- }
5518
- while (prev[++i]?.type === "space") {}
5139
+ loop: while (--i >= 0) switch (prev[i].type) {
5140
+ case "doc-start":
5141
+ case "explicit-key-ind":
5142
+ case "map-value-ind":
5143
+ case "seq-item-ind":
5144
+ case "newline": break loop;
5145
+ }
5146
+ while (prev[++i]?.type === "space");
5519
5147
  return prev.splice(i, prev.length);
5520
5148
  }
5521
5149
  function fixFlowSeqItems(fc) {
5522
5150
  if (fc.start.type === "flow-seq-start") {
5523
- for (const it of fc.items) {
5524
- if (it.sep && !it.value && !includesToken(it.start, "explicit-key-ind") && !includesToken(it.sep, "map-value-ind")) {
5525
- if (it.key) it.value = it.key;
5526
- delete it.key;
5527
- if (isFlowToken(it.value)) {
5528
- if (it.value.end) Array.prototype.push.apply(it.value.end, it.sep);
5529
- else it.value.end = it.sep;
5530
- } else Array.prototype.push.apply(it.start, it.sep);
5531
- delete it.sep;
5532
- }
5151
+ for (const it of fc.items) if (it.sep && !it.value && !includesToken(it.start, "explicit-key-ind") && !includesToken(it.sep, "map-value-ind")) {
5152
+ if (it.key) it.value = it.key;
5153
+ delete it.key;
5154
+ if (isFlowToken(it.value)) if (it.value.end) Array.prototype.push.apply(it.value.end, it.sep);
5155
+ else it.value.end = it.sep;
5156
+ else Array.prototype.push.apply(it.start, it.sep);
5157
+ delete it.sep;
5533
5158
  }
5534
5159
  }
5535
5160
  }
@@ -5652,13 +5277,12 @@ var Parser = class {
5652
5277
  while (this.stack.length > 0) yield* this.pop();
5653
5278
  }
5654
5279
  get sourceToken() {
5655
- const st = {
5280
+ return {
5656
5281
  type: this.type,
5657
5282
  offset: this.offset,
5658
5283
  indent: this.indent,
5659
5284
  source: this.source
5660
5285
  };
5661
- return st;
5662
5286
  }
5663
5287
  *step() {
5664
5288
  const top = this.peek(1);
@@ -5693,23 +5317,17 @@ var Parser = class {
5693
5317
  *pop(error) {
5694
5318
  const token = error ?? this.stack.pop();
5695
5319
  /* istanbul ignore if should not happen */
5696
- if (!token) {
5697
- const message = "Tried to pop an empty stack";
5698
- yield {
5699
- type: "error",
5700
- offset: this.offset,
5701
- source: "",
5702
- message
5703
- };
5704
- } else if (this.stack.length === 0) {
5705
- yield token;
5706
- } else {
5320
+ if (!token) yield {
5321
+ type: "error",
5322
+ offset: this.offset,
5323
+ source: "",
5324
+ message: "Tried to pop an empty stack"
5325
+ };
5326
+ else if (this.stack.length === 0) yield token;
5327
+ else {
5707
5328
  const top = this.peek(1);
5708
- if (token.type === "block-scalar") {
5709
- token.indent = "indent" in top ? top.indent : 0;
5710
- } else if (token.type === "flow-collection" && top.type === "document") {
5711
- token.indent = 0;
5712
- }
5329
+ if (token.type === "block-scalar") token.indent = "indent" in top ? top.indent : 0;
5330
+ else if (token.type === "flow-collection" && top.type === "document") token.indent = 0;
5713
5331
  if (token.type === "flow-collection") fixFlowSeqItems(token);
5714
5332
  switch (top.type) {
5715
5333
  case "document":
@@ -5728,9 +5346,8 @@ var Parser = class {
5728
5346
  });
5729
5347
  this.onKeyLine = true;
5730
5348
  return;
5731
- } else if (it.sep) {
5732
- it.value = token;
5733
- } else {
5349
+ } else if (it.sep) it.value = token;
5350
+ else {
5734
5351
  Object.assign(it, {
5735
5352
  key: token,
5736
5353
  sep: []
@@ -5814,13 +5431,12 @@ var Parser = class {
5814
5431
  *document(doc) {
5815
5432
  if (doc.value) return yield* this.lineEnd(doc);
5816
5433
  switch (this.type) {
5817
- case "doc-start": {
5434
+ case "doc-start":
5818
5435
  if (findNonEmptyIndex(doc.start) !== -1) {
5819
5436
  yield* this.pop();
5820
5437
  yield* this.step();
5821
5438
  } else doc.start.push(this.sourceToken);
5822
5439
  return;
5823
- }
5824
5440
  case "anchor":
5825
5441
  case "tag":
5826
5442
  case "space":
@@ -5831,19 +5447,16 @@ var Parser = class {
5831
5447
  }
5832
5448
  const bv = this.startBlockValue(doc);
5833
5449
  if (bv) this.stack.push(bv);
5834
- else {
5835
- yield {
5836
- type: "error",
5837
- offset: this.offset,
5838
- message: `Unexpected ${this.type} token in YAML document`,
5839
- source: this.source
5840
- };
5841
- }
5450
+ else yield {
5451
+ type: "error",
5452
+ offset: this.offset,
5453
+ message: `Unexpected ${this.type} token in YAML document`,
5454
+ source: this.source
5455
+ };
5842
5456
  }
5843
5457
  *scalar(scalar) {
5844
5458
  if (this.type === "map-value-ind") {
5845
- const prev = getPrevProps(this.peek(2));
5846
- const start = getFirstKeyStartProps(prev);
5459
+ const start = getFirstKeyStartProps(getPrevProps(this.peek(2)));
5847
5460
  let sep;
5848
5461
  if (scalar.end) {
5849
5462
  sep = scalar.end;
@@ -5895,26 +5508,19 @@ var Parser = class {
5895
5508
  case "newline":
5896
5509
  this.onKeyLine = false;
5897
5510
  if (it.value) {
5898
- const end = "end" in it.value ? it.value.end : undefined;
5899
- const last = Array.isArray(end) ? end[end.length - 1] : undefined;
5900
- if (last?.type === "comment") end?.push(this.sourceToken);
5511
+ const end = "end" in it.value ? it.value.end : void 0;
5512
+ if ((Array.isArray(end) ? end[end.length - 1] : void 0)?.type === "comment") end?.push(this.sourceToken);
5901
5513
  else map.items.push({ start: [this.sourceToken] });
5902
- } else if (it.sep) {
5903
- it.sep.push(this.sourceToken);
5904
- } else {
5905
- it.start.push(this.sourceToken);
5906
- }
5514
+ } else if (it.sep) it.sep.push(this.sourceToken);
5515
+ else it.start.push(this.sourceToken);
5907
5516
  return;
5908
5517
  case "space":
5909
5518
  case "comment":
5910
- if (it.value) {
5911
- map.items.push({ start: [this.sourceToken] });
5912
- } else if (it.sep) {
5913
- it.sep.push(this.sourceToken);
5914
- } else {
5519
+ if (it.value) map.items.push({ start: [this.sourceToken] });
5520
+ else if (it.sep) it.sep.push(this.sourceToken);
5521
+ else {
5915
5522
  if (this.atIndentedComment(it.start, map.indent)) {
5916
- const prev = map.items[map.items.length - 2];
5917
- const end = prev?.value?.end;
5523
+ const end = map.items[map.items.length - 2]?.value?.end;
5918
5524
  if (Array.isArray(end)) {
5919
5525
  Array.prototype.push.apply(end, it.start);
5920
5526
  end.push(this.sourceToken);
@@ -5954,11 +5560,8 @@ var Parser = class {
5954
5560
  start.push(this.sourceToken);
5955
5561
  map.items.push({ start });
5956
5562
  this.onKeyLine = true;
5957
- } else if (it.sep) {
5958
- it.sep.push(this.sourceToken);
5959
- } else {
5960
- it.start.push(this.sourceToken);
5961
- }
5563
+ } else if (it.sep) it.sep.push(this.sourceToken);
5564
+ else it.start.push(this.sourceToken);
5962
5565
  return;
5963
5566
  case "explicit-key-ind":
5964
5567
  if (!it.sep && !it.explicitKey) {
@@ -5970,106 +5573,89 @@ var Parser = class {
5970
5573
  start,
5971
5574
  explicitKey: true
5972
5575
  });
5973
- } else {
5576
+ } else this.stack.push({
5577
+ type: "block-map",
5578
+ offset: this.offset,
5579
+ indent: this.indent,
5580
+ items: [{
5581
+ start: [this.sourceToken],
5582
+ explicitKey: true
5583
+ }]
5584
+ });
5585
+ this.onKeyLine = true;
5586
+ return;
5587
+ case "map-value-ind":
5588
+ if (it.explicitKey) if (!it.sep) if (includesToken(it.start, "newline")) Object.assign(it, {
5589
+ key: null,
5590
+ sep: [this.sourceToken]
5591
+ });
5592
+ else {
5593
+ const start = getFirstKeyStartProps(it.start);
5974
5594
  this.stack.push({
5975
5595
  type: "block-map",
5976
5596
  offset: this.offset,
5977
5597
  indent: this.indent,
5978
5598
  items: [{
5979
- start: [this.sourceToken],
5980
- explicitKey: true
5981
- }]
5982
- });
5983
- }
5984
- this.onKeyLine = true;
5985
- return;
5986
- case "map-value-ind":
5987
- if (it.explicitKey) {
5988
- if (!it.sep) {
5989
- if (includesToken(it.start, "newline")) {
5990
- Object.assign(it, {
5991
- key: null,
5992
- sep: [this.sourceToken]
5993
- });
5994
- } else {
5995
- const start = getFirstKeyStartProps(it.start);
5996
- this.stack.push({
5997
- type: "block-map",
5998
- offset: this.offset,
5999
- indent: this.indent,
6000
- items: [{
6001
- start,
6002
- key: null,
6003
- sep: [this.sourceToken]
6004
- }]
6005
- });
6006
- }
6007
- } else if (it.value) {
6008
- map.items.push({
6009
- start: [],
6010
- key: null,
6011
- sep: [this.sourceToken]
6012
- });
6013
- } else if (includesToken(it.sep, "map-value-ind")) {
6014
- this.stack.push({
6015
- type: "block-map",
6016
- offset: this.offset,
6017
- indent: this.indent,
6018
- items: [{
6019
- start,
6020
- key: null,
6021
- sep: [this.sourceToken]
6022
- }]
6023
- });
6024
- } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6025
- const start = getFirstKeyStartProps(it.start);
6026
- const key = it.key;
6027
- const sep = it.sep;
6028
- sep.push(this.sourceToken);
6029
- delete it.key;
6030
- delete it.sep;
6031
- this.stack.push({
6032
- type: "block-map",
6033
- offset: this.offset,
6034
- indent: this.indent,
6035
- items: [{
6036
- start,
6037
- key,
6038
- sep
6039
- }]
6040
- });
6041
- } else if (start.length > 0) {
6042
- it.sep = it.sep.concat(start, this.sourceToken);
6043
- } else {
6044
- it.sep.push(this.sourceToken);
6045
- }
6046
- } else {
6047
- if (!it.sep) {
6048
- Object.assign(it, {
6049
- key: null,
6050
- sep: [this.sourceToken]
6051
- });
6052
- } else if (it.value || atNextItem) {
6053
- map.items.push({
6054
5599
  start,
6055
5600
  key: null,
6056
5601
  sep: [this.sourceToken]
6057
- });
6058
- } else if (includesToken(it.sep, "map-value-ind")) {
6059
- this.stack.push({
6060
- type: "block-map",
6061
- offset: this.offset,
6062
- indent: this.indent,
6063
- items: [{
6064
- start: [],
6065
- key: null,
6066
- sep: [this.sourceToken]
6067
- }]
6068
- });
6069
- } else {
6070
- it.sep.push(this.sourceToken);
6071
- }
5602
+ }]
5603
+ });
6072
5604
  }
5605
+ else if (it.value) map.items.push({
5606
+ start: [],
5607
+ key: null,
5608
+ sep: [this.sourceToken]
5609
+ });
5610
+ else if (includesToken(it.sep, "map-value-ind")) this.stack.push({
5611
+ type: "block-map",
5612
+ offset: this.offset,
5613
+ indent: this.indent,
5614
+ items: [{
5615
+ start,
5616
+ key: null,
5617
+ sep: [this.sourceToken]
5618
+ }]
5619
+ });
5620
+ else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
5621
+ const start = getFirstKeyStartProps(it.start);
5622
+ const key = it.key;
5623
+ const sep = it.sep;
5624
+ sep.push(this.sourceToken);
5625
+ delete it.key;
5626
+ delete it.sep;
5627
+ this.stack.push({
5628
+ type: "block-map",
5629
+ offset: this.offset,
5630
+ indent: this.indent,
5631
+ items: [{
5632
+ start,
5633
+ key,
5634
+ sep
5635
+ }]
5636
+ });
5637
+ } else if (start.length > 0) it.sep = it.sep.concat(start, this.sourceToken);
5638
+ else it.sep.push(this.sourceToken);
5639
+ else if (!it.sep) Object.assign(it, {
5640
+ key: null,
5641
+ sep: [this.sourceToken]
5642
+ });
5643
+ else if (it.value || atNextItem) map.items.push({
5644
+ start,
5645
+ key: null,
5646
+ sep: [this.sourceToken]
5647
+ });
5648
+ else if (includesToken(it.sep, "map-value-ind")) this.stack.push({
5649
+ type: "block-map",
5650
+ offset: this.offset,
5651
+ indent: this.indent,
5652
+ items: [{
5653
+ start: [],
5654
+ key: null,
5655
+ sep: [this.sourceToken]
5656
+ }]
5657
+ });
5658
+ else it.sep.push(this.sourceToken);
6073
5659
  this.onKeyLine = true;
6074
5660
  return;
6075
5661
  case "alias":
@@ -6084,9 +5670,8 @@ var Parser = class {
6084
5670
  sep: []
6085
5671
  });
6086
5672
  this.onKeyLine = true;
6087
- } else if (it.sep) {
6088
- this.stack.push(fs);
6089
- } else {
5673
+ } else if (it.sep) this.stack.push(fs);
5674
+ else {
6090
5675
  Object.assign(it, {
6091
5676
  key: fs,
6092
5677
  sep: []
@@ -6108,9 +5693,7 @@ var Parser = class {
6108
5693
  });
6109
5694
  return;
6110
5695
  }
6111
- } else if (atMapIndent) {
6112
- map.items.push({ start });
6113
- }
5696
+ } else if (atMapIndent) map.items.push({ start });
6114
5697
  this.stack.push(bv);
6115
5698
  return;
6116
5699
  }
@@ -6125,9 +5708,8 @@ var Parser = class {
6125
5708
  switch (this.type) {
6126
5709
  case "newline":
6127
5710
  if (it.value) {
6128
- const end = "end" in it.value ? it.value.end : undefined;
6129
- const last = Array.isArray(end) ? end[end.length - 1] : undefined;
6130
- if (last?.type === "comment") end?.push(this.sourceToken);
5711
+ const end = "end" in it.value ? it.value.end : void 0;
5712
+ if ((Array.isArray(end) ? end[end.length - 1] : void 0)?.type === "comment") end?.push(this.sourceToken);
6131
5713
  else seq.items.push({ start: [this.sourceToken] });
6132
5714
  } else it.start.push(this.sourceToken);
6133
5715
  return;
@@ -6136,8 +5718,7 @@ var Parser = class {
6136
5718
  if (it.value) seq.items.push({ start: [this.sourceToken] });
6137
5719
  else {
6138
5720
  if (this.atIndentedComment(it.start, seq.indent)) {
6139
- const prev = seq.items[seq.items.length - 2];
6140
- const end = prev?.value?.end;
5721
+ const end = seq.items[seq.items.length - 2]?.value?.end;
6141
5722
  if (Array.isArray(end)) {
6142
5723
  Array.prototype.push.apply(end, it.start);
6143
5724
  end.push(this.sourceToken);
@@ -6240,8 +5821,7 @@ var Parser = class {
6240
5821
  yield* this.pop();
6241
5822
  yield* this.step();
6242
5823
  } else if (this.type === "map-value-ind" && parent.type !== "flow-collection") {
6243
- const prev = getPrevProps(parent);
6244
- const start = getFirstKeyStartProps(prev);
5824
+ const start = getFirstKeyStartProps(getPrevProps(parent));
6245
5825
  fixFlowSeqItems(fc);
6246
5826
  const sep = fc.end.splice(1, fc.end.length);
6247
5827
  sep.push(this.sourceToken);
@@ -6257,9 +5837,7 @@ var Parser = class {
6257
5837
  };
6258
5838
  this.onKeyLine = true;
6259
5839
  this.stack[this.stack.length - 1] = map;
6260
- } else {
6261
- yield* this.lineEnd(fc);
6262
- }
5840
+ } else yield* this.lineEnd(fc);
6263
5841
  }
6264
5842
  }
6265
5843
  flowScalar(type) {
@@ -6307,8 +5885,7 @@ var Parser = class {
6307
5885
  };
6308
5886
  case "explicit-key-ind": {
6309
5887
  this.onKeyLine = true;
6310
- const prev = getPrevProps(parent);
6311
- const start = getFirstKeyStartProps(prev);
5888
+ const start = getFirstKeyStartProps(getPrevProps(parent));
6312
5889
  start.push(this.sourceToken);
6313
5890
  return {
6314
5891
  type: "block-map",
@@ -6322,8 +5899,7 @@ var Parser = class {
6322
5899
  }
6323
5900
  case "map-value-ind": {
6324
5901
  this.onKeyLine = true;
6325
- const prev = getPrevProps(parent);
6326
- const start = getFirstKeyStartProps(prev);
5902
+ const start = getFirstKeyStartProps(getPrevProps(parent));
6327
5903
  return {
6328
5904
  type: "block-map",
6329
5905
  offset: this.offset,
@@ -6362,8 +5938,6 @@ var Parser = class {
6362
5938
  yield* this.step();
6363
5939
  break;
6364
5940
  case "newline": this.onKeyLine = false;
6365
- case "space":
6366
- case "comment":
6367
5941
  default:
6368
5942
  if (token.end) token.end.push(this.sourceToken);
6369
5943
  else token.end = [this.sourceToken];
@@ -6371,14 +5945,12 @@ var Parser = class {
6371
5945
  }
6372
5946
  }
6373
5947
  };
6374
-
6375
5948
  //#endregion
6376
5949
  //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/public-api.js
6377
5950
  function parseOptions(options) {
6378
5951
  const prettyErrors = options.prettyErrors !== false;
6379
- const lineCounter = options.lineCounter || prettyErrors && new LineCounter() || null;
6380
5952
  return {
6381
- lineCounter,
5953
+ lineCounter: options.lineCounter || prettyErrors && new LineCounter() || null,
6382
5954
  prettyErrors
6383
5955
  };
6384
5956
  }
@@ -6409,12 +5981,10 @@ function parseDocument(source, options = {}) {
6409
5981
  const parser = new Parser(lineCounter?.addNewLine);
6410
5982
  const composer = new Composer(options);
6411
5983
  let doc = null;
6412
- for (const _doc of composer.compose(parser.parse(source), true, source.length)) {
6413
- if (!doc) doc = _doc;
6414
- else if (doc.options.logLevel !== "silent") {
6415
- doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
6416
- break;
6417
- }
5984
+ for (const _doc of composer.compose(parser.parse(source), true, source.length)) if (!doc) doc = _doc;
5985
+ else if (doc.options.logLevel !== "silent") {
5986
+ doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
5987
+ break;
6418
5988
  }
6419
5989
  if (prettyErrors && lineCounter) {
6420
5990
  doc.errors.forEach(prettifyError(source, lineCounter));
@@ -6423,44 +5993,35 @@ function parseDocument(source, options = {}) {
6423
5993
  return doc;
6424
5994
  }
6425
5995
  function parse(src, reviver, options) {
6426
- let _reviver = undefined;
6427
- if (typeof reviver === "function") {
6428
- _reviver = reviver;
6429
- } else if (options === undefined && reviver && typeof reviver === "object") {
6430
- options = reviver;
6431
- }
5996
+ let _reviver = void 0;
5997
+ if (typeof reviver === "function") _reviver = reviver;
5998
+ else if (options === void 0 && reviver && typeof reviver === "object") options = reviver;
6432
5999
  const doc = parseDocument(src, options);
6433
6000
  if (!doc) return null;
6434
6001
  doc.warnings.forEach((warning) => warn(doc.options.logLevel, warning));
6435
- if (doc.errors.length > 0) {
6436
- if (doc.options.logLevel !== "silent") throw doc.errors[0];
6437
- else doc.errors = [];
6438
- }
6002
+ if (doc.errors.length > 0) if (doc.options.logLevel !== "silent") throw doc.errors[0];
6003
+ else doc.errors = [];
6439
6004
  return doc.toJS(Object.assign({ reviver: _reviver }, options));
6440
6005
  }
6441
6006
  function stringify(value, replacer, options) {
6442
6007
  let _replacer = null;
6443
- if (typeof replacer === "function" || Array.isArray(replacer)) {
6444
- _replacer = replacer;
6445
- } else if (options === undefined && replacer) {
6446
- options = replacer;
6447
- }
6008
+ if (typeof replacer === "function" || Array.isArray(replacer)) _replacer = replacer;
6009
+ else if (options === void 0 && replacer) options = replacer;
6448
6010
  if (typeof options === "string") options = options.length;
6449
6011
  if (typeof options === "number") {
6450
6012
  const indent = Math.round(options);
6451
- options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };
6013
+ options = indent < 1 ? void 0 : indent > 8 ? { indent: 8 } : { indent };
6452
6014
  }
6453
- if (value === undefined) {
6015
+ if (value === void 0) {
6454
6016
  const { keepUndefined } = options ?? replacer ?? {};
6455
- if (!keepUndefined) return undefined;
6017
+ if (!keepUndefined) return void 0;
6456
6018
  }
6457
6019
  if (isDocument(value) && !_replacer) return value.toString(options);
6458
6020
  return new Document(value, _replacer, options).toString(options);
6459
6021
  }
6460
-
6461
6022
  //#endregion
6462
- //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/dist/index.js
6463
- var dist_exports = /* @__PURE__ */ __exportAll({
6023
+ //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/index.js
6024
+ var browser_default = /* @__PURE__ */ __exportAll({
6464
6025
  Alias: () => Alias,
6465
6026
  CST: () => cst_exports,
6466
6027
  Composer: () => Composer,
@@ -6491,10 +6052,5 @@ var dist_exports = /* @__PURE__ */ __exportAll({
6491
6052
  visit: () => visit$1,
6492
6053
  visitAsync: () => visitAsync
6493
6054
  });
6494
-
6495
- //#endregion
6496
- //#region ../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/browser/index.js
6497
- var browser_default = dist_exports;
6498
-
6499
6055
  //#endregion
6500
- export { isSeq as A, isAlias as C, isNode as D, isMap as E, isPair as O, visitAsync as S, isDocument as T, YAMLMap as _, stringify as a, Alias as b, Lexer as c, YAMLError as d, YAMLParseError as f, YAMLSeq as g, Schema as h, parseDocument as i, isScalar$1 as k, cst_exports as l, Document as m, parse as n, Parser as o, YAMLWarning as p, parseAllDocuments as r, LineCounter as s, browser_default as t, Composer as u, Pair as v, isCollection$1 as w, visit$1 as x, Scalar as y };
6056
+ export { isSeq as A, isAlias as C, isNode as D, isMap as E, isPair as O, visitAsync as S, isDocument as T, YAMLMap as _, stringify as a, Alias as b, Lexer as c, YAMLError as d, YAMLParseError as f, YAMLSeq as g, Schema as h, parseDocument as i, isScalar$1 as k, cst_exports as l, Document as m, parse as n, Parser as o, YAMLWarning as p, parseAllDocuments as r, LineCounter as s, browser_default as t, Composer as u, Pair as v, isCollection$1 as w, visit$1 as x, Scalar as y };