@uipath/common 1.197.0 → 1.198.0-preview.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3022,9 +3022,47 @@ var TLS_ERROR_CODES = new Set([
3022
3022
  ]);
3023
3023
  var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
3024
3024
  var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
3025
+ function formatErrorChain(error) {
3026
+ const lines = [];
3027
+ const seen = new Set;
3028
+ const visit = (value, depth) => {
3029
+ if (lines.length >= 32)
3030
+ return;
3031
+ const indent = " ".repeat(depth);
3032
+ if (value === null || typeof value !== "object") {
3033
+ lines.push(`${indent}${String(value)}`);
3034
+ return;
3035
+ }
3036
+ if (seen.has(value))
3037
+ return;
3038
+ seen.add(value);
3039
+ const cur = value;
3040
+ const name = typeof cur.name === "string" ? cur.name : "Error";
3041
+ const message = typeof cur.message === "string" ? cur.message : String(value);
3042
+ const code = typeof cur.code === "string" ? ` [${cur.code}]` : "";
3043
+ lines.push(`${indent}${name}: ${message}${code}`);
3044
+ if (cur.cause !== undefined)
3045
+ visit(cur.cause, depth + 1);
3046
+ if (Array.isArray(cur.errors)) {
3047
+ for (const nested of cur.errors) {
3048
+ visit(nested, depth + 1);
3049
+ }
3050
+ }
3051
+ };
3052
+ visit(error, 0);
3053
+ return lines.join(`
3054
+ `);
3055
+ }
3025
3056
  function describeConnectivityError(error) {
3026
- let current = error;
3027
- for (let depth = 0;depth < 5 && current !== null && typeof current === "object"; depth++) {
3057
+ const queue = [error];
3058
+ const seen = new Set;
3059
+ for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
3060
+ const current = queue.shift();
3061
+ if (current === null || typeof current !== "object")
3062
+ continue;
3063
+ if (seen.has(current))
3064
+ continue;
3065
+ seen.add(current);
3028
3066
  const cur = current;
3029
3067
  const code = typeof cur.code === "string" ? cur.code : undefined;
3030
3068
  const message = typeof cur.message === "string" ? cur.message : undefined;
@@ -3044,7 +3082,10 @@ function describeConnectivityError(error) {
3044
3082
  instructions: NETWORK_INSTRUCTIONS
3045
3083
  };
3046
3084
  }
3047
- current = cur.cause;
3085
+ if (cur.cause !== undefined)
3086
+ queue.push(cur.cause);
3087
+ if (Array.isArray(cur.errors))
3088
+ queue.push(...cur.errors);
3048
3089
  }
3049
3090
  return;
3050
3091
  }
@@ -5487,31 +5528,17 @@ function search(data, expression, options) {
5487
5528
  }
5488
5529
 
5489
5530
  // ../../node_modules/js-yaml/dist/js-yaml.mjs
5490
- /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
5491
- var __create2 = Object.create;
5492
- var __defProp2 = Object.defineProperty;
5493
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5494
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
5495
- var __getProtoOf2 = Object.getPrototypeOf;
5496
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
5497
- var __commonJSMin = (cb, mod2) => () => (mod2 || (cb((mod2 = { exports: {} }).exports, mod2), cb = null), mod2.exports);
5498
- var __copyProps = (to, from, except, desc) => {
5499
- if (from && typeof from === "object" || typeof from === "function")
5500
- for (var keys = __getOwnPropNames2(from), i = 0, n = keys.length, key;i < n; i++) {
5501
- key = keys[i];
5502
- if (!__hasOwnProp2.call(to, key) && key !== except)
5503
- __defProp2(to, key, {
5504
- get: ((k) => from[k]).bind(null, key),
5505
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
5506
- });
5507
- }
5508
- return to;
5509
- };
5510
- var __toESM2 = (mod2, isNodeMode, target) => (target = mod2 != null ? __create2(__getProtoOf2(mod2)) : {}, __copyProps(isNodeMode || !mod2 || !mod2.__esModule ? __defProp2(target, "default", {
5511
- value: mod2,
5512
- enumerable: true
5513
- }) : target, mod2));
5514
- var require_common = /* @__PURE__ */ __commonJSMin((exports, module) => {
5531
+ function getDefaultExportFromCjs(x) {
5532
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5533
+ }
5534
+ var jsYaml = {};
5535
+ var loader = {};
5536
+ var common = {};
5537
+ var hasRequiredCommon;
5538
+ function requireCommon() {
5539
+ if (hasRequiredCommon)
5540
+ return common;
5541
+ hasRequiredCommon = 1;
5515
5542
  function isNothing(subject) {
5516
5543
  return typeof subject === "undefined" || subject === null;
5517
5544
  }
@@ -5537,55 +5564,71 @@ var require_common = /* @__PURE__ */ __commonJSMin((exports, module) => {
5537
5564
  }
5538
5565
  function repeat(string, count) {
5539
5566
  let result = "";
5540
- for (let cycle = 0;cycle < count; cycle += 1)
5567
+ for (let cycle = 0;cycle < count; cycle += 1) {
5541
5568
  result += string;
5569
+ }
5542
5570
  return result;
5543
5571
  }
5544
5572
  function isNegativeZero(number) {
5545
5573
  return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
5546
5574
  }
5547
- module.exports.isNothing = isNothing;
5548
- module.exports.isObject = isObject2;
5549
- module.exports.toArray = toArray;
5550
- module.exports.repeat = repeat;
5551
- module.exports.isNegativeZero = isNegativeZero;
5552
- module.exports.extend = extend;
5553
- });
5554
- var require_exception = /* @__PURE__ */ __commonJSMin((exports, module) => {
5555
- function formatError(exception, compact) {
5575
+ common.isNothing = isNothing;
5576
+ common.isObject = isObject2;
5577
+ common.toArray = toArray;
5578
+ common.repeat = repeat;
5579
+ common.isNegativeZero = isNegativeZero;
5580
+ common.extend = extend;
5581
+ return common;
5582
+ }
5583
+ var exception;
5584
+ var hasRequiredException;
5585
+ function requireException() {
5586
+ if (hasRequiredException)
5587
+ return exception;
5588
+ hasRequiredException = 1;
5589
+ function formatError(exception2, compact) {
5556
5590
  let where = "";
5557
- const message = exception.reason || "(unknown reason)";
5558
- if (!exception.mark)
5591
+ const message = exception2.reason || "(unknown reason)";
5592
+ if (!exception2.mark)
5559
5593
  return message;
5560
- if (exception.mark.name)
5561
- where += 'in "' + exception.mark.name + '" ';
5562
- where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
5563
- if (!compact && exception.mark.snippet)
5594
+ if (exception2.mark.name) {
5595
+ where += 'in "' + exception2.mark.name + '" ';
5596
+ }
5597
+ where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")";
5598
+ if (!compact && exception2.mark.snippet) {
5564
5599
  where += `
5565
5600
 
5566
- ` + exception.mark.snippet;
5601
+ ` + exception2.mark.snippet;
5602
+ }
5567
5603
  return message + " " + where;
5568
5604
  }
5569
- function YAMLException(reason, mark) {
5605
+ function YAMLException2(reason, mark) {
5570
5606
  Error.call(this);
5571
5607
  this.name = "YAMLException";
5572
5608
  this.reason = reason;
5573
5609
  this.mark = mark;
5574
5610
  this.message = formatError(this, false);
5575
- if (Error.captureStackTrace)
5611
+ if (Error.captureStackTrace) {
5576
5612
  Error.captureStackTrace(this, this.constructor);
5577
- else
5578
- this.stack = (/* @__PURE__ */ new Error()).stack || "";
5613
+ } else {
5614
+ this.stack = new Error().stack || "";
5615
+ }
5579
5616
  }
5580
- YAMLException.prototype = Object.create(Error.prototype);
5581
- YAMLException.prototype.constructor = YAMLException;
5582
- YAMLException.prototype.toString = function toString(compact) {
5617
+ YAMLException2.prototype = Object.create(Error.prototype);
5618
+ YAMLException2.prototype.constructor = YAMLException2;
5619
+ YAMLException2.prototype.toString = function toString(compact) {
5583
5620
  return this.name + ": " + formatError(this, compact);
5584
5621
  };
5585
- module.exports = YAMLException;
5586
- });
5587
- var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
5588
- var common = require_common();
5622
+ exception = YAMLException2;
5623
+ return exception;
5624
+ }
5625
+ var snippet;
5626
+ var hasRequiredSnippet;
5627
+ function requireSnippet() {
5628
+ if (hasRequiredSnippet)
5629
+ return snippet;
5630
+ hasRequiredSnippet = 1;
5631
+ const common2 = requireCommon();
5589
5632
  function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
5590
5633
  let head = "";
5591
5634
  let tail = "";
@@ -5604,7 +5647,7 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
5604
5647
  };
5605
5648
  }
5606
5649
  function padStart(string, max) {
5607
- return common.repeat(" ", max - string.length) + string;
5650
+ return common2.repeat(" ", max - string.length) + string;
5608
5651
  }
5609
5652
  function makeSnippet(mark, options) {
5610
5653
  options = Object.create(options || null);
@@ -5626,8 +5669,9 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
5626
5669
  while (match = re.exec(mark.buffer)) {
5627
5670
  lineEnds.push(match.index);
5628
5671
  lineStarts.push(match.index + match[0].length);
5629
- if (mark.position <= match.index && foundLineNo < 0)
5672
+ if (mark.position <= match.index && foundLineNo < 0) {
5630
5673
  foundLineNo = lineStarts.length - 2;
5674
+ }
5631
5675
  }
5632
5676
  if (foundLineNo < 0)
5633
5677
  foundLineNo = lineStarts.length - 1;
@@ -5638,28 +5682,34 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
5638
5682
  if (foundLineNo - i < 0)
5639
5683
  break;
5640
5684
  const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
5641
- result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + `
5685
+ result = common2.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + `
5642
5686
  ` + result;
5643
5687
  }
5644
5688
  const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
5645
- result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + `
5689
+ result += common2.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + `
5646
5690
  `;
5647
- result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + `^
5691
+ result += common2.repeat("-", options.indent + lineNoLength + 3 + line.pos) + `^
5648
5692
  `;
5649
5693
  for (let i = 1;i <= options.linesAfter; i++) {
5650
5694
  if (foundLineNo + i >= lineEnds.length)
5651
5695
  break;
5652
5696
  const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
5653
- result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + `
5697
+ result += common2.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + `
5654
5698
  `;
5655
5699
  }
5656
5700
  return result.replace(/\n$/, "");
5657
5701
  }
5658
- module.exports = makeSnippet;
5659
- });
5660
- var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
5661
- var YAMLException = require_exception();
5662
- var TYPE_CONSTRUCTOR_OPTIONS = [
5702
+ snippet = makeSnippet;
5703
+ return snippet;
5704
+ }
5705
+ var type;
5706
+ var hasRequiredType;
5707
+ function requireType() {
5708
+ if (hasRequiredType)
5709
+ return type;
5710
+ hasRequiredType = 1;
5711
+ const YAMLException2 = requireException();
5712
+ const TYPE_CONSTRUCTOR_OPTIONS = [
5663
5713
  "kind",
5664
5714
  "multi",
5665
5715
  "resolve",
@@ -5671,26 +5721,28 @@ var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
5671
5721
  "defaultStyle",
5672
5722
  "styleAliases"
5673
5723
  ];
5674
- var YAML_NODE_KINDS = [
5724
+ const YAML_NODE_KINDS = [
5675
5725
  "scalar",
5676
5726
  "sequence",
5677
5727
  "mapping"
5678
5728
  ];
5679
- function compileStyleAliases(map) {
5729
+ function compileStyleAliases(map2) {
5680
5730
  const result = {};
5681
- if (map !== null)
5682
- Object.keys(map).forEach(function(style) {
5683
- map[style].forEach(function(alias) {
5731
+ if (map2 !== null) {
5732
+ Object.keys(map2).forEach(function(style) {
5733
+ map2[style].forEach(function(alias) {
5684
5734
  result[String(alias)] = style;
5685
5735
  });
5686
5736
  });
5737
+ }
5687
5738
  return result;
5688
5739
  }
5689
- function Type(tag, options) {
5740
+ function Type2(tag, options) {
5690
5741
  options = options || {};
5691
5742
  Object.keys(options).forEach(function(name) {
5692
- if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1)
5693
- throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
5743
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
5744
+ throw new YAMLException2('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
5745
+ }
5694
5746
  });
5695
5747
  this.options = options;
5696
5748
  this.tag = tag;
@@ -5708,21 +5760,29 @@ var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
5708
5760
  this.defaultStyle = options["defaultStyle"] || null;
5709
5761
  this.multi = options["multi"] || false;
5710
5762
  this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
5711
- if (YAML_NODE_KINDS.indexOf(this.kind) === -1)
5712
- throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
5713
- }
5714
- module.exports = Type;
5715
- });
5716
- var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
5717
- var YAMLException = require_exception();
5718
- var Type = require_type();
5719
- function compileList(schema, name) {
5763
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
5764
+ throw new YAMLException2('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
5765
+ }
5766
+ }
5767
+ type = Type2;
5768
+ return type;
5769
+ }
5770
+ var schema;
5771
+ var hasRequiredSchema;
5772
+ function requireSchema() {
5773
+ if (hasRequiredSchema)
5774
+ return schema;
5775
+ hasRequiredSchema = 1;
5776
+ const YAMLException2 = requireException();
5777
+ const Type2 = requireType();
5778
+ function compileList(schema2, name) {
5720
5779
  const result = [];
5721
- schema[name].forEach(function(currentType) {
5780
+ schema2[name].forEach(function(currentType) {
5722
5781
  let newIndex = result.length;
5723
5782
  result.forEach(function(previousType, previousIndex) {
5724
- if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi)
5783
+ if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
5725
5784
  newIndex = previousIndex;
5785
+ }
5726
5786
  });
5727
5787
  result[newIndex] = currentType;
5728
5788
  });
@@ -5741,47 +5801,54 @@ var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
5741
5801
  fallback: []
5742
5802
  }
5743
5803
  };
5744
- function collectType(type) {
5745
- if (type.multi) {
5746
- result.multi[type.kind].push(type);
5747
- result.multi["fallback"].push(type);
5748
- } else
5749
- result[type.kind][type.tag] = result["fallback"][type.tag] = type;
5750
- }
5751
- for (let index = 0, length = arguments.length;index < length; index += 1)
5804
+ function collectType(type2) {
5805
+ if (type2.multi) {
5806
+ result.multi[type2.kind].push(type2);
5807
+ result.multi["fallback"].push(type2);
5808
+ } else {
5809
+ result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2;
5810
+ }
5811
+ }
5812
+ for (let index = 0, length = arguments.length;index < length; index += 1) {
5752
5813
  arguments[index].forEach(collectType);
5814
+ }
5753
5815
  return result;
5754
5816
  }
5755
- function Schema(definition) {
5817
+ function Schema2(definition) {
5756
5818
  return this.extend(definition);
5757
5819
  }
5758
- Schema.prototype.extend = function extend(definition) {
5820
+ Schema2.prototype.extend = function extend(definition) {
5759
5821
  let implicit = [];
5760
5822
  let explicit = [];
5761
- if (definition instanceof Type)
5823
+ if (definition instanceof Type2) {
5762
5824
  explicit.push(definition);
5763
- else if (Array.isArray(definition))
5825
+ } else if (Array.isArray(definition)) {
5764
5826
  explicit = explicit.concat(definition);
5765
- else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
5827
+ } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
5766
5828
  if (definition.implicit)
5767
5829
  implicit = implicit.concat(definition.implicit);
5768
5830
  if (definition.explicit)
5769
5831
  explicit = explicit.concat(definition.explicit);
5770
- } else
5771
- throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
5772
- implicit.forEach(function(type) {
5773
- if (!(type instanceof Type))
5774
- throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
5775
- if (type.loadKind && type.loadKind !== "scalar")
5776
- throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
5777
- if (type.multi)
5778
- throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
5832
+ } else {
5833
+ throw new YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
5834
+ }
5835
+ implicit.forEach(function(type2) {
5836
+ if (!(type2 instanceof Type2)) {
5837
+ throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
5838
+ }
5839
+ if (type2.loadKind && type2.loadKind !== "scalar") {
5840
+ throw new YAMLException2("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
5841
+ }
5842
+ if (type2.multi) {
5843
+ throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
5844
+ }
5779
5845
  });
5780
- explicit.forEach(function(type) {
5781
- if (!(type instanceof Type))
5782
- throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
5846
+ explicit.forEach(function(type2) {
5847
+ if (!(type2 instanceof Type2)) {
5848
+ throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
5849
+ }
5783
5850
  });
5784
- const result = Object.create(Schema.prototype);
5851
+ const result = Object.create(Schema2.prototype);
5785
5852
  result.implicit = (this.implicit || []).concat(implicit);
5786
5853
  result.explicit = (this.explicit || []).concat(explicit);
5787
5854
  result.compiledImplicit = compileList(result, "implicit");
@@ -5789,41 +5856,77 @@ var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
5789
5856
  result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
5790
5857
  return result;
5791
5858
  };
5792
- module.exports = Schema;
5793
- });
5794
- var require_str = /* @__PURE__ */ __commonJSMin((exports, module) => {
5795
- module.exports = new (require_type())("tag:yaml.org,2002:str", {
5859
+ schema = Schema2;
5860
+ return schema;
5861
+ }
5862
+ var str;
5863
+ var hasRequiredStr;
5864
+ function requireStr() {
5865
+ if (hasRequiredStr)
5866
+ return str;
5867
+ hasRequiredStr = 1;
5868
+ const Type2 = requireType();
5869
+ str = new Type2("tag:yaml.org,2002:str", {
5796
5870
  kind: "scalar",
5797
5871
  construct: function(data) {
5798
5872
  return data !== null ? data : "";
5799
5873
  }
5800
5874
  });
5801
- });
5802
- var require_seq = /* @__PURE__ */ __commonJSMin((exports, module) => {
5803
- module.exports = new (require_type())("tag:yaml.org,2002:seq", {
5875
+ return str;
5876
+ }
5877
+ var seq;
5878
+ var hasRequiredSeq;
5879
+ function requireSeq() {
5880
+ if (hasRequiredSeq)
5881
+ return seq;
5882
+ hasRequiredSeq = 1;
5883
+ const Type2 = requireType();
5884
+ seq = new Type2("tag:yaml.org,2002:seq", {
5804
5885
  kind: "sequence",
5805
5886
  construct: function(data) {
5806
5887
  return data !== null ? data : [];
5807
5888
  }
5808
5889
  });
5809
- });
5810
- var require_map = /* @__PURE__ */ __commonJSMin((exports, module) => {
5811
- module.exports = new (require_type())("tag:yaml.org,2002:map", {
5890
+ return seq;
5891
+ }
5892
+ var map;
5893
+ var hasRequiredMap;
5894
+ function requireMap() {
5895
+ if (hasRequiredMap)
5896
+ return map;
5897
+ hasRequiredMap = 1;
5898
+ const Type2 = requireType();
5899
+ map = new Type2("tag:yaml.org,2002:map", {
5812
5900
  kind: "mapping",
5813
5901
  construct: function(data) {
5814
5902
  return data !== null ? data : {};
5815
5903
  }
5816
5904
  });
5817
- });
5818
- var require_failsafe = /* @__PURE__ */ __commonJSMin((exports, module) => {
5819
- module.exports = new (require_schema())({ explicit: [
5820
- require_str(),
5821
- require_seq(),
5822
- require_map()
5823
- ] });
5824
- });
5825
- var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
5826
- var Type = require_type();
5905
+ return map;
5906
+ }
5907
+ var failsafe;
5908
+ var hasRequiredFailsafe;
5909
+ function requireFailsafe() {
5910
+ if (hasRequiredFailsafe)
5911
+ return failsafe;
5912
+ hasRequiredFailsafe = 1;
5913
+ const Schema2 = requireSchema();
5914
+ failsafe = new Schema2({
5915
+ explicit: [
5916
+ requireStr(),
5917
+ requireSeq(),
5918
+ requireMap()
5919
+ ]
5920
+ });
5921
+ return failsafe;
5922
+ }
5923
+ var _null;
5924
+ var hasRequired_null;
5925
+ function require_null() {
5926
+ if (hasRequired_null)
5927
+ return _null;
5928
+ hasRequired_null = 1;
5929
+ const Type2 = requireType();
5827
5930
  function resolveYamlNull(data) {
5828
5931
  if (data === null)
5829
5932
  return true;
@@ -5836,7 +5939,7 @@ var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
5836
5939
  function isNull(object) {
5837
5940
  return object === null;
5838
5941
  }
5839
- module.exports = new Type("tag:yaml.org,2002:null", {
5942
+ _null = new Type2("tag:yaml.org,2002:null", {
5840
5943
  kind: "scalar",
5841
5944
  resolve: resolveYamlNull,
5842
5945
  construct: constructYamlNull,
@@ -5860,9 +5963,15 @@ var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
5860
5963
  },
5861
5964
  defaultStyle: "lowercase"
5862
5965
  });
5863
- });
5864
- var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
5865
- var Type = require_type();
5966
+ return _null;
5967
+ }
5968
+ var bool;
5969
+ var hasRequiredBool;
5970
+ function requireBool() {
5971
+ if (hasRequiredBool)
5972
+ return bool;
5973
+ hasRequiredBool = 1;
5974
+ const Type2 = requireType();
5866
5975
  function resolveYamlBoolean(data) {
5867
5976
  if (data === null)
5868
5977
  return false;
@@ -5875,7 +5984,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
5875
5984
  function isBoolean(object) {
5876
5985
  return Object.prototype.toString.call(object) === "[object Boolean]";
5877
5986
  }
5878
- module.exports = new Type("tag:yaml.org,2002:bool", {
5987
+ bool = new Type2("tag:yaml.org,2002:bool", {
5879
5988
  kind: "scalar",
5880
5989
  resolve: resolveYamlBoolean,
5881
5990
  construct: constructYamlBoolean,
@@ -5893,10 +6002,16 @@ var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
5893
6002
  },
5894
6003
  defaultStyle: "lowercase"
5895
6004
  });
5896
- });
5897
- var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
5898
- var common = require_common();
5899
- var Type = require_type();
6005
+ return bool;
6006
+ }
6007
+ var int;
6008
+ var hasRequiredInt;
6009
+ function requireInt() {
6010
+ if (hasRequiredInt)
6011
+ return int;
6012
+ hasRequiredInt = 1;
6013
+ const common2 = requireCommon();
6014
+ const Type2 = requireType();
5900
6015
  function isHexCode(c) {
5901
6016
  return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102;
5902
6017
  }
@@ -5915,8 +6030,9 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
5915
6030
  if (!max)
5916
6031
  return false;
5917
6032
  let ch = data[index];
5918
- if (ch === "-" || ch === "+")
6033
+ if (ch === "-" || ch === "+") {
5919
6034
  ch = data[++index];
6035
+ }
5920
6036
  if (ch === "0") {
5921
6037
  if (index + 1 === max)
5922
6038
  return true;
@@ -5929,7 +6045,7 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
5929
6045
  return false;
5930
6046
  hasDigits = true;
5931
6047
  }
5932
- return hasDigits && Number.isFinite(parseYamlInteger(data));
6048
+ return hasDigits && isFinite(parseYamlInteger(data));
5933
6049
  }
5934
6050
  if (ch === "x") {
5935
6051
  index++;
@@ -5938,7 +6054,7 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
5938
6054
  return false;
5939
6055
  hasDigits = true;
5940
6056
  }
5941
- return hasDigits && Number.isFinite(parseYamlInteger(data));
6057
+ return hasDigits && isFinite(parseYamlInteger(data));
5942
6058
  }
5943
6059
  if (ch === "o") {
5944
6060
  index++;
@@ -5947,17 +6063,18 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
5947
6063
  return false;
5948
6064
  hasDigits = true;
5949
6065
  }
5950
- return hasDigits && Number.isFinite(parseYamlInteger(data));
6066
+ return hasDigits && isFinite(parseYamlInteger(data));
5951
6067
  }
5952
6068
  }
5953
6069
  for (;index < max; index++) {
5954
- if (!isDecCode(data.charCodeAt(index)))
6070
+ if (!isDecCode(data.charCodeAt(index))) {
5955
6071
  return false;
6072
+ }
5956
6073
  hasDigits = true;
5957
6074
  }
5958
6075
  if (!hasDigits)
5959
6076
  return false;
5960
- return Number.isFinite(parseYamlInteger(data));
6077
+ return isFinite(parseYamlInteger(data));
5961
6078
  }
5962
6079
  function parseYamlInteger(data) {
5963
6080
  let value = data;
@@ -5985,9 +6102,9 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
5985
6102
  return parseYamlInteger(data);
5986
6103
  }
5987
6104
  function isInteger(object) {
5988
- return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object);
6105
+ return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common2.isNegativeZero(object));
5989
6106
  }
5990
- module.exports = new Type("tag:yaml.org,2002:int", {
6107
+ int = new Type2("tag:yaml.org,2002:int", {
5991
6108
  kind: "scalar",
5992
6109
  resolve: resolveYamlInteger,
5993
6110
  construct: constructYamlInteger,
@@ -6014,35 +6131,45 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6014
6131
  hexadecimal: [16, "hex"]
6015
6132
  }
6016
6133
  });
6017
- });
6018
- var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6019
- var common = require_common();
6020
- var Type = require_type();
6021
- var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6022
- var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6134
+ return int;
6135
+ }
6136
+ var float;
6137
+ var hasRequiredFloat;
6138
+ function requireFloat() {
6139
+ if (hasRequiredFloat)
6140
+ return float;
6141
+ hasRequiredFloat = 1;
6142
+ const common2 = requireCommon();
6143
+ const Type2 = requireType();
6144
+ const YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6145
+ const YAML_FLOAT_SPECIAL_PATTERN = new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6023
6146
  function resolveYamlFloat(data) {
6024
6147
  if (data === null)
6025
6148
  return false;
6026
- if (!YAML_FLOAT_PATTERN.test(data))
6149
+ if (!YAML_FLOAT_PATTERN.test(data)) {
6027
6150
  return false;
6028
- if (Number.isFinite(parseFloat(data, 10)))
6151
+ }
6152
+ if (isFinite(parseFloat(data, 10))) {
6029
6153
  return true;
6154
+ }
6030
6155
  return YAML_FLOAT_SPECIAL_PATTERN.test(data);
6031
6156
  }
6032
6157
  function constructYamlFloat(data) {
6033
6158
  let value = data.toLowerCase();
6034
6159
  const sign = value[0] === "-" ? -1 : 1;
6035
- if ("+-".indexOf(value[0]) >= 0)
6160
+ if ("+-".indexOf(value[0]) >= 0) {
6036
6161
  value = value.slice(1);
6037
- if (value === ".inf")
6162
+ }
6163
+ if (value === ".inf") {
6038
6164
  return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
6039
- else if (value === ".nan")
6165
+ } else if (value === ".nan") {
6040
6166
  return NaN;
6167
+ }
6041
6168
  return sign * parseFloat(value, 10);
6042
6169
  }
6043
- var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
6170
+ const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
6044
6171
  function representYamlFloat(object, style) {
6045
- if (isNaN(object))
6172
+ if (isNaN(object)) {
6046
6173
  switch (style) {
6047
6174
  case "lowercase":
6048
6175
  return ".nan";
@@ -6051,7 +6178,7 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6051
6178
  case "camelcase":
6052
6179
  return ".NaN";
6053
6180
  }
6054
- else if (Number.POSITIVE_INFINITY === object)
6181
+ } else if (Number.POSITIVE_INFINITY === object) {
6055
6182
  switch (style) {
6056
6183
  case "lowercase":
6057
6184
  return ".inf";
@@ -6060,7 +6187,7 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6060
6187
  case "camelcase":
6061
6188
  return ".Inf";
6062
6189
  }
6063
- else if (Number.NEGATIVE_INFINITY === object)
6190
+ } else if (Number.NEGATIVE_INFINITY === object) {
6064
6191
  switch (style) {
6065
6192
  case "lowercase":
6066
6193
  return "-.inf";
@@ -6069,15 +6196,16 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6069
6196
  case "camelcase":
6070
6197
  return "-.Inf";
6071
6198
  }
6072
- else if (common.isNegativeZero(object))
6199
+ } else if (common2.isNegativeZero(object)) {
6073
6200
  return "-0.0";
6201
+ }
6074
6202
  const res = object.toString(10);
6075
6203
  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
6076
6204
  }
6077
6205
  function isFloat(object) {
6078
- return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
6206
+ return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common2.isNegativeZero(object));
6079
6207
  }
6080
- module.exports = new Type("tag:yaml.org,2002:float", {
6208
+ float = new Type2("tag:yaml.org,2002:float", {
6081
6209
  kind: "scalar",
6082
6210
  resolve: resolveYamlFloat,
6083
6211
  construct: constructYamlFloat,
@@ -6085,22 +6213,42 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6085
6213
  represent: representYamlFloat,
6086
6214
  defaultStyle: "lowercase"
6087
6215
  });
6088
- });
6089
- var require_json = /* @__PURE__ */ __commonJSMin((exports, module) => {
6090
- module.exports = require_failsafe().extend({ implicit: [
6091
- require_null(),
6092
- require_bool(),
6093
- require_int(),
6094
- require_float()
6095
- ] });
6096
- });
6097
- var require_core = /* @__PURE__ */ __commonJSMin((exports, module) => {
6098
- module.exports = require_json();
6099
- });
6100
- var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
6101
- var Type = require_type();
6102
- var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
6103
- var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
6216
+ return float;
6217
+ }
6218
+ var json;
6219
+ var hasRequiredJson;
6220
+ function requireJson() {
6221
+ if (hasRequiredJson)
6222
+ return json;
6223
+ hasRequiredJson = 1;
6224
+ json = requireFailsafe().extend({
6225
+ implicit: [
6226
+ require_null(),
6227
+ requireBool(),
6228
+ requireInt(),
6229
+ requireFloat()
6230
+ ]
6231
+ });
6232
+ return json;
6233
+ }
6234
+ var core;
6235
+ var hasRequiredCore;
6236
+ function requireCore() {
6237
+ if (hasRequiredCore)
6238
+ return core;
6239
+ hasRequiredCore = 1;
6240
+ core = requireJson();
6241
+ return core;
6242
+ }
6243
+ var timestamp;
6244
+ var hasRequiredTimestamp;
6245
+ function requireTimestamp() {
6246
+ if (hasRequiredTimestamp)
6247
+ return timestamp;
6248
+ hasRequiredTimestamp = 1;
6249
+ const Type2 = requireType();
6250
+ const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
6251
+ const YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
6104
6252
  function resolveYamlTimestamp(data) {
6105
6253
  if (data === null)
6106
6254
  return false;
@@ -6121,15 +6269,17 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
6121
6269
  const year = +match[1];
6122
6270
  const month = +match[2] - 1;
6123
6271
  const day = +match[3];
6124
- if (!match[4])
6272
+ if (!match[4]) {
6125
6273
  return new Date(Date.UTC(year, month, day));
6274
+ }
6126
6275
  const hour = +match[4];
6127
6276
  const minute = +match[5];
6128
6277
  const second = +match[6];
6129
6278
  if (match[7]) {
6130
6279
  fraction = match[7].slice(0, 3);
6131
- while (fraction.length < 3)
6280
+ while (fraction.length < 3) {
6132
6281
  fraction += "0";
6282
+ }
6133
6283
  fraction = +fraction;
6134
6284
  }
6135
6285
  if (match[9]) {
@@ -6147,36 +6297,48 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
6147
6297
  function representYamlTimestamp(object) {
6148
6298
  return object.toISOString();
6149
6299
  }
6150
- module.exports = new Type("tag:yaml.org,2002:timestamp", {
6300
+ timestamp = new Type2("tag:yaml.org,2002:timestamp", {
6151
6301
  kind: "scalar",
6152
6302
  resolve: resolveYamlTimestamp,
6153
6303
  construct: constructYamlTimestamp,
6154
6304
  instanceOf: Date,
6155
6305
  represent: representYamlTimestamp
6156
6306
  });
6157
- });
6158
- var require_merge = /* @__PURE__ */ __commonJSMin((exports, module) => {
6159
- var Type = require_type();
6307
+ return timestamp;
6308
+ }
6309
+ var merge;
6310
+ var hasRequiredMerge;
6311
+ function requireMerge() {
6312
+ if (hasRequiredMerge)
6313
+ return merge;
6314
+ hasRequiredMerge = 1;
6315
+ const Type2 = requireType();
6160
6316
  function resolveYamlMerge(data) {
6161
6317
  return data === "<<" || data === null;
6162
6318
  }
6163
- module.exports = new Type("tag:yaml.org,2002:merge", {
6319
+ merge = new Type2("tag:yaml.org,2002:merge", {
6164
6320
  kind: "scalar",
6165
6321
  resolve: resolveYamlMerge
6166
6322
  });
6167
- });
6168
- var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6169
- var Type = require_type();
6170
- var BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
6323
+ return merge;
6324
+ }
6325
+ var binary;
6326
+ var hasRequiredBinary;
6327
+ function requireBinary() {
6328
+ if (hasRequiredBinary)
6329
+ return binary;
6330
+ hasRequiredBinary = 1;
6331
+ const Type2 = requireType();
6332
+ const BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
6171
6333
  \r`;
6172
6334
  function resolveYamlBinary(data) {
6173
6335
  if (data === null)
6174
6336
  return false;
6175
6337
  let bitlen = 0;
6176
6338
  const max = data.length;
6177
- const map = BASE64_MAP;
6339
+ const map2 = BASE64_MAP;
6178
6340
  for (let idx = 0;idx < max; idx++) {
6179
- const code = map.indexOf(data.charAt(idx));
6341
+ const code = map2.indexOf(data.charAt(idx));
6180
6342
  if (code > 64)
6181
6343
  continue;
6182
6344
  if (code < 0)
@@ -6188,7 +6350,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6188
6350
  function constructYamlBinary(data) {
6189
6351
  const input = data.replace(/[\r\n=]/g, "");
6190
6352
  const max = input.length;
6191
- const map = BASE64_MAP;
6353
+ const map2 = BASE64_MAP;
6192
6354
  let bits = 0;
6193
6355
  const result = [];
6194
6356
  for (let idx = 0;idx < max; idx++) {
@@ -6197,7 +6359,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6197
6359
  result.push(bits >> 8 & 255);
6198
6360
  result.push(bits & 255);
6199
6361
  }
6200
- bits = bits << 6 | map.indexOf(input.charAt(idx));
6362
+ bits = bits << 6 | map2.indexOf(input.charAt(idx));
6201
6363
  }
6202
6364
  const tailbits = max % 4 * 6;
6203
6365
  if (tailbits === 0) {
@@ -6207,58 +6369,65 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6207
6369
  } else if (tailbits === 18) {
6208
6370
  result.push(bits >> 10 & 255);
6209
6371
  result.push(bits >> 2 & 255);
6210
- } else if (tailbits === 12)
6372
+ } else if (tailbits === 12) {
6211
6373
  result.push(bits >> 4 & 255);
6374
+ }
6212
6375
  return new Uint8Array(result);
6213
6376
  }
6214
6377
  function representYamlBinary(object) {
6215
6378
  let result = "";
6216
6379
  let bits = 0;
6217
6380
  const max = object.length;
6218
- const map = BASE64_MAP;
6381
+ const map2 = BASE64_MAP;
6219
6382
  for (let idx = 0;idx < max; idx++) {
6220
6383
  if (idx % 3 === 0 && idx) {
6221
- result += map[bits >> 18 & 63];
6222
- result += map[bits >> 12 & 63];
6223
- result += map[bits >> 6 & 63];
6224
- result += map[bits & 63];
6384
+ result += map2[bits >> 18 & 63];
6385
+ result += map2[bits >> 12 & 63];
6386
+ result += map2[bits >> 6 & 63];
6387
+ result += map2[bits & 63];
6225
6388
  }
6226
6389
  bits = (bits << 8) + object[idx];
6227
6390
  }
6228
6391
  const tail = max % 3;
6229
6392
  if (tail === 0) {
6230
- result += map[bits >> 18 & 63];
6231
- result += map[bits >> 12 & 63];
6232
- result += map[bits >> 6 & 63];
6233
- result += map[bits & 63];
6393
+ result += map2[bits >> 18 & 63];
6394
+ result += map2[bits >> 12 & 63];
6395
+ result += map2[bits >> 6 & 63];
6396
+ result += map2[bits & 63];
6234
6397
  } else if (tail === 2) {
6235
- result += map[bits >> 10 & 63];
6236
- result += map[bits >> 4 & 63];
6237
- result += map[bits << 2 & 63];
6238
- result += map[64];
6398
+ result += map2[bits >> 10 & 63];
6399
+ result += map2[bits >> 4 & 63];
6400
+ result += map2[bits << 2 & 63];
6401
+ result += map2[64];
6239
6402
  } else if (tail === 1) {
6240
- result += map[bits >> 2 & 63];
6241
- result += map[bits << 4 & 63];
6242
- result += map[64];
6243
- result += map[64];
6403
+ result += map2[bits >> 2 & 63];
6404
+ result += map2[bits << 4 & 63];
6405
+ result += map2[64];
6406
+ result += map2[64];
6244
6407
  }
6245
6408
  return result;
6246
6409
  }
6247
6410
  function isBinary(obj) {
6248
6411
  return Object.prototype.toString.call(obj) === "[object Uint8Array]";
6249
6412
  }
6250
- module.exports = new Type("tag:yaml.org,2002:binary", {
6413
+ binary = new Type2("tag:yaml.org,2002:binary", {
6251
6414
  kind: "scalar",
6252
6415
  resolve: resolveYamlBinary,
6253
6416
  construct: constructYamlBinary,
6254
6417
  predicate: isBinary,
6255
6418
  represent: representYamlBinary
6256
6419
  });
6257
- });
6258
- var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
6259
- var Type = require_type();
6260
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
6261
- var _toString = Object.prototype.toString;
6420
+ return binary;
6421
+ }
6422
+ var omap;
6423
+ var hasRequiredOmap;
6424
+ function requireOmap() {
6425
+ if (hasRequiredOmap)
6426
+ return omap;
6427
+ hasRequiredOmap = 1;
6428
+ const Type2 = requireType();
6429
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
6430
+ const _toString = Object.prototype.toString;
6262
6431
  function resolveYamlOmap(data) {
6263
6432
  if (data === null)
6264
6433
  return true;
@@ -6270,12 +6439,14 @@ var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
6270
6439
  if (_toString.call(pair) !== "[object Object]")
6271
6440
  return false;
6272
6441
  let pairKey;
6273
- for (pairKey in pair)
6274
- if (_hasOwnProperty.call(pair, pairKey))
6442
+ for (pairKey in pair) {
6443
+ if (_hasOwnProperty.call(pair, pairKey)) {
6275
6444
  if (!pairHasKey)
6276
6445
  pairHasKey = true;
6277
6446
  else
6278
6447
  return false;
6448
+ }
6449
+ }
6279
6450
  if (!pairHasKey)
6280
6451
  return false;
6281
6452
  if (objectKeys.indexOf(pairKey) === -1)
@@ -6288,15 +6459,21 @@ var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
6288
6459
  function constructYamlOmap(data) {
6289
6460
  return data !== null ? data : [];
6290
6461
  }
6291
- module.exports = new Type("tag:yaml.org,2002:omap", {
6462
+ omap = new Type2("tag:yaml.org,2002:omap", {
6292
6463
  kind: "sequence",
6293
6464
  resolve: resolveYamlOmap,
6294
6465
  construct: constructYamlOmap
6295
6466
  });
6296
- });
6297
- var require_pairs = /* @__PURE__ */ __commonJSMin((exports, module) => {
6298
- var Type = require_type();
6299
- var _toString = Object.prototype.toString;
6467
+ return omap;
6468
+ }
6469
+ var pairs;
6470
+ var hasRequiredPairs;
6471
+ function requirePairs() {
6472
+ if (hasRequiredPairs)
6473
+ return pairs;
6474
+ hasRequiredPairs = 1;
6475
+ const Type2 = requireType();
6476
+ const _toString = Object.prototype.toString;
6300
6477
  function resolveYamlPairs(data) {
6301
6478
  if (data === null)
6302
6479
  return true;
@@ -6325,64 +6502,85 @@ var require_pairs = /* @__PURE__ */ __commonJSMin((exports, module) => {
6325
6502
  }
6326
6503
  return result;
6327
6504
  }
6328
- module.exports = new Type("tag:yaml.org,2002:pairs", {
6505
+ pairs = new Type2("tag:yaml.org,2002:pairs", {
6329
6506
  kind: "sequence",
6330
6507
  resolve: resolveYamlPairs,
6331
6508
  construct: constructYamlPairs
6332
6509
  });
6333
- });
6334
- var require_set = /* @__PURE__ */ __commonJSMin((exports, module) => {
6335
- var Type = require_type();
6336
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
6510
+ return pairs;
6511
+ }
6512
+ var set;
6513
+ var hasRequiredSet;
6514
+ function requireSet() {
6515
+ if (hasRequiredSet)
6516
+ return set;
6517
+ hasRequiredSet = 1;
6518
+ const Type2 = requireType();
6519
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
6337
6520
  function resolveYamlSet(data) {
6338
6521
  if (data === null)
6339
6522
  return true;
6340
6523
  const object = data;
6341
- for (const key in object)
6524
+ for (const key in object) {
6342
6525
  if (_hasOwnProperty.call(object, key)) {
6343
6526
  if (object[key] !== null)
6344
6527
  return false;
6345
6528
  }
6529
+ }
6346
6530
  return true;
6347
6531
  }
6348
6532
  function constructYamlSet(data) {
6349
6533
  return data !== null ? data : {};
6350
6534
  }
6351
- module.exports = new Type("tag:yaml.org,2002:set", {
6535
+ set = new Type2("tag:yaml.org,2002:set", {
6352
6536
  kind: "mapping",
6353
6537
  resolve: resolveYamlSet,
6354
6538
  construct: constructYamlSet
6355
6539
  });
6356
- });
6357
- var require_default = /* @__PURE__ */ __commonJSMin((exports, module) => {
6358
- module.exports = require_core().extend({
6359
- implicit: [require_timestamp(), require_merge()],
6540
+ return set;
6541
+ }
6542
+ var _default;
6543
+ var hasRequired_default;
6544
+ function require_default() {
6545
+ if (hasRequired_default)
6546
+ return _default;
6547
+ hasRequired_default = 1;
6548
+ _default = requireCore().extend({
6549
+ implicit: [
6550
+ requireTimestamp(),
6551
+ requireMerge()
6552
+ ],
6360
6553
  explicit: [
6361
- require_binary(),
6362
- require_omap(),
6363
- require_pairs(),
6364
- require_set()
6554
+ requireBinary(),
6555
+ requireOmap(),
6556
+ requirePairs(),
6557
+ requireSet()
6365
6558
  ]
6366
6559
  });
6367
- });
6368
- var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6369
- var common = require_common();
6370
- var YAMLException = require_exception();
6371
- var makeSnippet = require_snippet();
6372
- var DEFAULT_SCHEMA = require_default();
6373
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
6374
- var CONTEXT_FLOW_IN = 1;
6375
- var CONTEXT_FLOW_OUT = 2;
6376
- var CONTEXT_BLOCK_IN = 3;
6377
- var CONTEXT_BLOCK_OUT = 4;
6378
- var CHOMPING_CLIP = 1;
6379
- var CHOMPING_STRIP = 2;
6380
- var CHOMPING_KEEP = 3;
6381
- var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
6382
- var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
6383
- var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
6384
- var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
6385
- var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
6560
+ return _default;
6561
+ }
6562
+ var hasRequiredLoader;
6563
+ function requireLoader() {
6564
+ if (hasRequiredLoader)
6565
+ return loader;
6566
+ hasRequiredLoader = 1;
6567
+ const common2 = requireCommon();
6568
+ const YAMLException2 = requireException();
6569
+ const makeSnippet = requireSnippet();
6570
+ const DEFAULT_SCHEMA2 = require_default();
6571
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
6572
+ const CONTEXT_FLOW_IN = 1;
6573
+ const CONTEXT_FLOW_OUT = 2;
6574
+ const CONTEXT_BLOCK_IN = 3;
6575
+ const CONTEXT_BLOCK_OUT = 4;
6576
+ const CHOMPING_CLIP = 1;
6577
+ const CHOMPING_STRIP = 2;
6578
+ const CHOMPING_KEEP = 3;
6579
+ const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
6580
+ const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
6581
+ const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
6582
+ const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
6583
+ const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
6386
6584
  function _class(obj) {
6387
6585
  return Object.prototype.toString.call(obj);
6388
6586
  }
@@ -6399,25 +6597,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6399
6597
  return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
6400
6598
  }
6401
6599
  function fromHexCode(c) {
6402
- if (c >= 48 && c <= 57)
6600
+ if (c >= 48 && c <= 57) {
6403
6601
  return c - 48;
6602
+ }
6404
6603
  const lc = c | 32;
6405
- if (lc >= 97 && lc <= 102)
6604
+ if (lc >= 97 && lc <= 102) {
6406
6605
  return lc - 97 + 10;
6606
+ }
6407
6607
  return -1;
6408
6608
  }
6409
6609
  function escapedHexLen(c) {
6410
- if (c === 120)
6610
+ if (c === 120) {
6411
6611
  return 2;
6412
- if (c === 117)
6612
+ }
6613
+ if (c === 117) {
6413
6614
  return 4;
6414
- if (c === 85)
6615
+ }
6616
+ if (c === 85) {
6415
6617
  return 8;
6618
+ }
6416
6619
  return 0;
6417
6620
  }
6418
6621
  function fromDecimalCode(c) {
6419
- if (c >= 48 && c <= 57)
6622
+ if (c >= 48 && c <= 57) {
6420
6623
  return c - 48;
6624
+ }
6421
6625
  return -1;
6422
6626
  }
6423
6627
  function simpleEscapeSequence(c) {
@@ -6464,23 +6668,25 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6464
6668
  }
6465
6669
  }
6466
6670
  function charFromCodepoint(c) {
6467
- if (c <= 65535)
6671
+ if (c <= 65535) {
6468
6672
  return String.fromCharCode(c);
6673
+ }
6469
6674
  return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
6470
6675
  }
6471
6676
  function setProperty(object, key, value) {
6472
- if (key === "__proto__")
6677
+ if (key === "__proto__") {
6473
6678
  Object.defineProperty(object, key, {
6474
6679
  configurable: true,
6475
6680
  enumerable: true,
6476
6681
  writable: true,
6477
6682
  value
6478
6683
  });
6479
- else
6684
+ } else {
6480
6685
  object[key] = value;
6686
+ }
6481
6687
  }
6482
- var simpleEscapeCheck = new Array(256);
6483
- var simpleEscapeMap = new Array(256);
6688
+ const simpleEscapeCheck = new Array(256);
6689
+ const simpleEscapeMap = new Array(256);
6484
6690
  for (let i = 0;i < 256; i++) {
6485
6691
  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
6486
6692
  simpleEscapeMap[i] = simpleEscapeSequence(i);
@@ -6488,13 +6694,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6488
6694
  function State(input, options) {
6489
6695
  this.input = input;
6490
6696
  this.filename = options["filename"] || null;
6491
- this.schema = options["schema"] || DEFAULT_SCHEMA;
6697
+ this.schema = options["schema"] || DEFAULT_SCHEMA2;
6492
6698
  this.onWarning = options["onWarning"] || null;
6493
6699
  this.legacy = options["legacy"] || false;
6494
6700
  this.json = options["json"] || false;
6495
6701
  this.listener = options["listener"] || null;
6496
6702
  this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
6497
- this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20;
6703
+ this.maxTotalMergeKeys = typeof options["maxTotalMergeKeys"] === "number" ? options["maxTotalMergeKeys"] : 1e4;
6498
6704
  this.implicitTypes = this.schema.compiledImplicit;
6499
6705
  this.typeMap = this.schema.compiledTypeMap;
6500
6706
  this.length = input.length;
@@ -6503,6 +6709,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6503
6709
  this.lineStart = 0;
6504
6710
  this.lineIndent = 0;
6505
6711
  this.depth = 0;
6712
+ this.totalMergeKeys = 0;
6506
6713
  this.firstTabInLine = -1;
6507
6714
  this.documents = [];
6508
6715
  this.anchorMapTransactions = [];
@@ -6516,29 +6723,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6516
6723
  column: state.position - state.lineStart
6517
6724
  };
6518
6725
  mark.snippet = makeSnippet(mark);
6519
- return new YAMLException(message, mark);
6726
+ return new YAMLException2(message, mark);
6520
6727
  }
6521
6728
  function throwError(state, message) {
6522
6729
  throw generateError(state, message);
6523
6730
  }
6524
6731
  function throwWarning(state, message) {
6525
- if (state.onWarning)
6732
+ if (state.onWarning) {
6526
6733
  state.onWarning.call(null, generateError(state, message));
6734
+ }
6527
6735
  }
6528
6736
  function storeAnchor(state, name, value) {
6529
6737
  const transactions = state.anchorMapTransactions;
6530
6738
  if (transactions.length !== 0) {
6531
6739
  const transaction = transactions[transactions.length - 1];
6532
- if (!_hasOwnProperty.call(transaction, name))
6740
+ if (!_hasOwnProperty.call(transaction, name)) {
6533
6741
  transaction[name] = {
6534
6742
  existed: _hasOwnProperty.call(state.anchorMap, name),
6535
6743
  value: state.anchorMap[name]
6536
6744
  };
6745
+ }
6537
6746
  }
6538
6747
  state.anchorMap[name] = value;
6539
6748
  }
6540
6749
  function beginAnchorTransaction(state) {
6541
- state.anchorMapTransactions.push(Object.create(null));
6750
+ state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
6542
6751
  }
6543
6752
  function commitAnchorTransaction(state) {
6544
6753
  const transaction = state.anchorMapTransactions.pop();
@@ -6549,8 +6758,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6549
6758
  const names = Object.keys(transaction);
6550
6759
  for (let index = 0, length = names.length;index < length; index += 1) {
6551
6760
  const name = names[index];
6552
- if (!_hasOwnProperty.call(parent, name))
6761
+ if (!_hasOwnProperty.call(parent, name)) {
6553
6762
  parent[name] = transaction[name];
6763
+ }
6554
6764
  }
6555
6765
  }
6556
6766
  function rollbackAnchorTransaction(state) {
@@ -6558,10 +6768,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6558
6768
  const names = Object.keys(transaction);
6559
6769
  for (let index = names.length - 1;index >= 0; index -= 1) {
6560
6770
  const entry = transaction[names[index]];
6561
- if (entry.existed)
6771
+ if (entry.existed) {
6562
6772
  state.anchorMap[names[index]] = entry.value;
6563
- else
6773
+ } else {
6564
6774
  delete state.anchorMap[names[index]];
6775
+ }
6565
6776
  }
6566
6777
  }
6567
6778
  function snapshotState(state) {
@@ -6588,36 +6799,45 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6588
6799
  state.kind = snapshot.kind;
6589
6800
  state.result = snapshot.result;
6590
6801
  }
6591
- var directiveHandlers = {
6802
+ const directiveHandlers = {
6592
6803
  YAML: function handleYamlDirective(state, name, args) {
6593
- if (state.version !== null)
6804
+ if (state.version !== null) {
6594
6805
  throwError(state, "duplication of %YAML directive");
6595
- if (args.length !== 1)
6806
+ }
6807
+ if (args.length !== 1) {
6596
6808
  throwError(state, "YAML directive accepts exactly one argument");
6809
+ }
6597
6810
  const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
6598
- if (match === null)
6811
+ if (match === null) {
6599
6812
  throwError(state, "ill-formed argument of the YAML directive");
6813
+ }
6600
6814
  const major = parseInt(match[1], 10);
6601
6815
  const minor = parseInt(match[2], 10);
6602
- if (major !== 1)
6816
+ if (major !== 1) {
6603
6817
  throwError(state, "unacceptable YAML version of the document");
6818
+ }
6604
6819
  state.version = args[0];
6605
6820
  state.checkLineBreaks = minor < 2;
6606
- if (minor !== 1 && minor !== 2)
6821
+ if (minor !== 1 && minor !== 2) {
6607
6822
  throwWarning(state, "unsupported YAML version of the document");
6823
+ }
6608
6824
  },
6609
6825
  TAG: function handleTagDirective(state, name, args) {
6610
6826
  let prefix;
6611
- if (args.length !== 2)
6827
+ if (args.length !== 2) {
6612
6828
  throwError(state, "TAG directive accepts exactly two arguments");
6829
+ }
6613
6830
  const handle = args[0];
6614
6831
  prefix = args[1];
6615
- if (!PATTERN_TAG_HANDLE.test(handle))
6832
+ if (!PATTERN_TAG_HANDLE.test(handle)) {
6616
6833
  throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
6617
- if (_hasOwnProperty.call(state.tagMap, handle))
6834
+ }
6835
+ if (_hasOwnProperty.call(state.tagMap, handle)) {
6618
6836
  throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
6619
- if (!PATTERN_TAG_URI.test(prefix))
6837
+ }
6838
+ if (!PATTERN_TAG_URI.test(prefix)) {
6620
6839
  throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
6840
+ }
6621
6841
  try {
6622
6842
  prefix = decodeURIComponent(prefix);
6623
6843
  } catch (err) {
@@ -6629,23 +6849,29 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6629
6849
  function captureSegment(state, start, end, checkJson) {
6630
6850
  if (start < end) {
6631
6851
  const _result = state.input.slice(start, end);
6632
- if (checkJson)
6852
+ if (checkJson) {
6633
6853
  for (let _position = 0, _length = _result.length;_position < _length; _position += 1) {
6634
6854
  const _character = _result.charCodeAt(_position);
6635
- if (!(_character === 9 || _character >= 32 && _character <= 1114111))
6855
+ if (!(_character === 9 || _character >= 32 && _character <= 1114111)) {
6636
6856
  throwError(state, "expected valid JSON character");
6857
+ }
6637
6858
  }
6638
- else if (PATTERN_NON_PRINTABLE.test(_result))
6859
+ } else if (PATTERN_NON_PRINTABLE.test(_result)) {
6639
6860
  throwError(state, "the stream contains non-printable characters");
6861
+ }
6640
6862
  state.result += _result;
6641
6863
  }
6642
6864
  }
6643
6865
  function mergeMappings(state, destination, source, overridableKeys) {
6644
- if (!common.isObject(source))
6866
+ if (!common2.isObject(source)) {
6645
6867
  throwError(state, "cannot merge mappings; the provided source object is unacceptable");
6868
+ }
6646
6869
  const sourceKeys = Object.keys(source);
6647
6870
  for (let index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
6648
6871
  const key = sourceKeys[index];
6872
+ if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) {
6873
+ throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
6874
+ }
6649
6875
  if (!_hasOwnProperty.call(destination, key)) {
6650
6876
  setProperty(destination, key, source[key]);
6651
6877
  overridableKeys[key] = true;
@@ -6656,32 +6882,30 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6656
6882
  if (Array.isArray(keyNode)) {
6657
6883
  keyNode = Array.prototype.slice.call(keyNode);
6658
6884
  for (let index = 0, quantity = keyNode.length;index < quantity; index += 1) {
6659
- if (Array.isArray(keyNode[index]))
6885
+ if (Array.isArray(keyNode[index])) {
6660
6886
  throwError(state, "nested arrays are not supported inside keys");
6661
- if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]")
6887
+ }
6888
+ if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
6662
6889
  keyNode[index] = "[object Object]";
6890
+ }
6663
6891
  }
6664
6892
  }
6665
- if (typeof keyNode === "object" && _class(keyNode) === "[object Object]")
6893
+ if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
6666
6894
  keyNode = "[object Object]";
6895
+ }
6667
6896
  keyNode = String(keyNode);
6668
- if (_result === null)
6897
+ if (_result === null) {
6669
6898
  _result = {};
6670
- if (keyTag === "tag:yaml.org,2002:merge")
6899
+ }
6900
+ if (keyTag === "tag:yaml.org,2002:merge") {
6671
6901
  if (Array.isArray(valueNode)) {
6672
- if (valueNode.length > state.maxMergeSeqLength)
6673
- throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")");
6674
- const seen = /* @__PURE__ */ new Set;
6675
6902
  for (let index = 0, quantity = valueNode.length;index < quantity; index += 1) {
6676
- const src = valueNode[index];
6677
- if (seen.has(src))
6678
- continue;
6679
- seen.add(src);
6680
- mergeMappings(state, _result, src, overridableKeys);
6903
+ mergeMappings(state, _result, valueNode[index], overridableKeys);
6681
6904
  }
6682
- } else
6905
+ } else {
6683
6906
  mergeMappings(state, _result, valueNode, overridableKeys);
6684
- else {
6907
+ }
6908
+ } else {
6685
6909
  if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
6686
6910
  state.line = startLine || state.line;
6687
6911
  state.lineStart = startLineStart || state.lineStart;
@@ -6695,14 +6919,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6695
6919
  }
6696
6920
  function readLineBreak(state) {
6697
6921
  const ch = state.input.charCodeAt(state.position);
6698
- if (ch === 10)
6922
+ if (ch === 10) {
6699
6923
  state.position++;
6700
- else if (ch === 13) {
6924
+ } else if (ch === 13) {
6701
6925
  state.position++;
6702
- if (state.input.charCodeAt(state.position) === 10)
6926
+ if (state.input.charCodeAt(state.position) === 10) {
6703
6927
  state.position++;
6704
- } else
6928
+ }
6929
+ } else {
6705
6930
  throwError(state, "a line break is expected");
6931
+ }
6706
6932
  state.line += 1;
6707
6933
  state.lineStart = state.position;
6708
6934
  state.firstTabInLine = -1;
@@ -6712,14 +6938,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6712
6938
  let ch = state.input.charCodeAt(state.position);
6713
6939
  while (ch !== 0) {
6714
6940
  while (isWhiteSpace(ch)) {
6715
- if (ch === 9 && state.firstTabInLine === -1)
6941
+ if (ch === 9 && state.firstTabInLine === -1) {
6716
6942
  state.firstTabInLine = state.position;
6943
+ }
6717
6944
  ch = state.input.charCodeAt(++state.position);
6718
6945
  }
6719
- if (allowComments && ch === 35)
6720
- do
6946
+ if (allowComments && ch === 35) {
6947
+ do {
6721
6948
  ch = state.input.charCodeAt(++state.position);
6722
- while (ch !== 10 && ch !== 13 && ch !== 0);
6949
+ } while (ch !== 10 && ch !== 13 && ch !== 0);
6950
+ }
6723
6951
  if (isEol(ch)) {
6724
6952
  readLineBreak(state);
6725
6953
  ch = state.input.charCodeAt(state.position);
@@ -6729,11 +6957,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6729
6957
  state.lineIndent++;
6730
6958
  ch = state.input.charCodeAt(++state.position);
6731
6959
  }
6732
- } else
6960
+ } else {
6733
6961
  break;
6962
+ }
6734
6963
  }
6735
- if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent)
6964
+ if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
6736
6965
  throwWarning(state, "deficient indentation");
6966
+ }
6737
6967
  return lineBreaks;
6738
6968
  }
6739
6969
  function testDocumentSeparator(state) {
@@ -6742,17 +6972,19 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6742
6972
  if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
6743
6973
  _position += 3;
6744
6974
  ch = state.input.charCodeAt(_position);
6745
- if (ch === 0 || isWsOrEol(ch))
6975
+ if (ch === 0 || isWsOrEol(ch)) {
6746
6976
  return true;
6977
+ }
6747
6978
  }
6748
6979
  return false;
6749
6980
  }
6750
6981
  function writeFoldedLines(state, count) {
6751
- if (count === 1)
6982
+ if (count === 1) {
6752
6983
  state.result += " ";
6753
- else if (count > 1)
6754
- state.result += common.repeat(`
6984
+ } else if (count > 1) {
6985
+ state.result += common2.repeat(`
6755
6986
  `, count - 1);
6987
+ }
6756
6988
  }
6757
6989
  function readPlainScalar(state, nodeIndent, withinFlowCollection) {
6758
6990
  let captureStart;
@@ -6764,12 +6996,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6764
6996
  const _kind = state.kind;
6765
6997
  const _result = state.result;
6766
6998
  let ch = state.input.charCodeAt(state.position);
6767
- if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96)
6999
+ if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
6768
7000
  return false;
7001
+ }
6769
7002
  if (ch === 63 || ch === 45) {
6770
7003
  const following = state.input.charCodeAt(state.position + 1);
6771
- if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following))
7004
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
6772
7005
  return false;
7006
+ }
6773
7007
  }
6774
7008
  state.kind = "scalar";
6775
7009
  state.result = "";
@@ -6778,14 +7012,17 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6778
7012
  while (ch !== 0) {
6779
7013
  if (ch === 58) {
6780
7014
  const following = state.input.charCodeAt(state.position + 1);
6781
- if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following))
7015
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
6782
7016
  break;
7017
+ }
6783
7018
  } else if (ch === 35) {
6784
- if (isWsOrEol(state.input.charCodeAt(state.position - 1)))
7019
+ const preceding = state.input.charCodeAt(state.position - 1);
7020
+ if (isWsOrEol(preceding)) {
6785
7021
  break;
6786
- } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch))
7022
+ }
7023
+ } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
6787
7024
  break;
6788
- else if (isEol(ch)) {
7025
+ } else if (isEol(ch)) {
6789
7026
  _line = state.line;
6790
7027
  _lineStart = state.lineStart;
6791
7028
  _lineIndent = state.lineIndent;
@@ -6808,13 +7045,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6808
7045
  captureStart = captureEnd = state.position;
6809
7046
  hasPendingContent = false;
6810
7047
  }
6811
- if (!isWhiteSpace(ch))
7048
+ if (!isWhiteSpace(ch)) {
6812
7049
  captureEnd = state.position + 1;
7050
+ }
6813
7051
  ch = state.input.charCodeAt(++state.position);
6814
7052
  }
6815
7053
  captureSegment(state, captureStart, captureEnd, false);
6816
- if (state.result)
7054
+ if (state.result) {
6817
7055
  return true;
7056
+ }
6818
7057
  state.kind = _kind;
6819
7058
  state.result = _result;
6820
7059
  return false;
@@ -6823,13 +7062,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6823
7062
  let captureStart;
6824
7063
  let captureEnd;
6825
7064
  let ch = state.input.charCodeAt(state.position);
6826
- if (ch !== 39)
7065
+ if (ch !== 39) {
6827
7066
  return false;
7067
+ }
6828
7068
  state.kind = "scalar";
6829
7069
  state.result = "";
6830
7070
  state.position++;
6831
7071
  captureStart = captureEnd = state.position;
6832
- while ((ch = state.input.charCodeAt(state.position)) !== 0)
7072
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
6833
7073
  if (ch === 39) {
6834
7074
  captureSegment(state, captureStart, state.position, true);
6835
7075
  ch = state.input.charCodeAt(++state.position);
@@ -6837,19 +7077,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6837
7077
  captureStart = state.position;
6838
7078
  state.position++;
6839
7079
  captureEnd = state.position;
6840
- } else
7080
+ } else {
6841
7081
  return true;
7082
+ }
6842
7083
  } else if (isEol(ch)) {
6843
7084
  captureSegment(state, captureStart, captureEnd, true);
6844
7085
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
6845
7086
  captureStart = captureEnd = state.position;
6846
- } else if (state.position === state.lineStart && testDocumentSeparator(state))
7087
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
6847
7088
  throwError(state, "unexpected end of the document within a single quoted scalar");
6848
- else {
7089
+ } else {
6849
7090
  state.position++;
6850
- if (!isWhiteSpace(ch))
7091
+ if (!isWhiteSpace(ch)) {
6851
7092
  captureEnd = state.position;
7093
+ }
6852
7094
  }
7095
+ }
6853
7096
  throwError(state, "unexpected end of the stream within a single quoted scalar");
6854
7097
  }
6855
7098
  function readDoubleQuotedScalar(state, nodeIndent) {
@@ -6857,13 +7100,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6857
7100
  let captureEnd;
6858
7101
  let tmp;
6859
7102
  let ch = state.input.charCodeAt(state.position);
6860
- if (ch !== 34)
7103
+ if (ch !== 34) {
6861
7104
  return false;
7105
+ }
6862
7106
  state.kind = "scalar";
6863
7107
  state.result = "";
6864
7108
  state.position++;
6865
7109
  captureStart = captureEnd = state.position;
6866
- while ((ch = state.input.charCodeAt(state.position)) !== 0)
7110
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
6867
7111
  if (ch === 34) {
6868
7112
  captureSegment(state, captureStart, state.position, true);
6869
7113
  state.position++;
@@ -6871,9 +7115,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6871
7115
  } else if (ch === 92) {
6872
7116
  captureSegment(state, captureStart, state.position, true);
6873
7117
  ch = state.input.charCodeAt(++state.position);
6874
- if (isEol(ch))
7118
+ if (isEol(ch)) {
6875
7119
  skipSeparationSpace(state, false, nodeIndent);
6876
- else if (ch < 256 && simpleEscapeCheck[ch]) {
7120
+ } else if (ch < 256 && simpleEscapeCheck[ch]) {
6877
7121
  state.result += simpleEscapeMap[ch];
6878
7122
  state.position++;
6879
7123
  } else if ((tmp = escapedHexLen(ch)) > 0) {
@@ -6881,27 +7125,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6881
7125
  let hexResult = 0;
6882
7126
  for (;hexLength > 0; hexLength--) {
6883
7127
  ch = state.input.charCodeAt(++state.position);
6884
- if ((tmp = fromHexCode(ch)) >= 0)
7128
+ if ((tmp = fromHexCode(ch)) >= 0) {
6885
7129
  hexResult = (hexResult << 4) + tmp;
6886
- else
7130
+ } else {
6887
7131
  throwError(state, "expected hexadecimal character");
7132
+ }
6888
7133
  }
6889
7134
  state.result += charFromCodepoint(hexResult);
6890
7135
  state.position++;
6891
- } else
7136
+ } else {
6892
7137
  throwError(state, "unknown escape sequence");
7138
+ }
6893
7139
  captureStart = captureEnd = state.position;
6894
7140
  } else if (isEol(ch)) {
6895
7141
  captureSegment(state, captureStart, captureEnd, true);
6896
7142
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
6897
7143
  captureStart = captureEnd = state.position;
6898
- } else if (state.position === state.lineStart && testDocumentSeparator(state))
7144
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
6899
7145
  throwError(state, "unexpected end of the document within a double quoted scalar");
6900
- else {
7146
+ } else {
6901
7147
  state.position++;
6902
- if (!isWhiteSpace(ch))
7148
+ if (!isWhiteSpace(ch)) {
6903
7149
  captureEnd = state.position;
7150
+ }
6904
7151
  }
7152
+ }
6905
7153
  throwError(state, "unexpected end of the stream within a double quoted scalar");
6906
7154
  }
6907
7155
  function readFlowCollection(state, nodeIndent) {
@@ -6916,7 +7164,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6916
7164
  let isPair;
6917
7165
  let isExplicitPair;
6918
7166
  let isMapping;
6919
- const overridableKeys = Object.create(null);
7167
+ const overridableKeys = /* @__PURE__ */ Object.create(null);
6920
7168
  let keyNode;
6921
7169
  let keyTag;
6922
7170
  let valueNode;
@@ -6929,10 +7177,12 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6929
7177
  terminator = 125;
6930
7178
  isMapping = true;
6931
7179
  _result = {};
6932
- } else
7180
+ } else {
6933
7181
  return false;
6934
- if (state.anchor !== null)
7182
+ }
7183
+ if (state.anchor !== null) {
6935
7184
  storeAnchor(state, state.anchor, _result);
7185
+ }
6936
7186
  ch = state.input.charCodeAt(++state.position);
6937
7187
  while (ch !== 0) {
6938
7188
  skipSeparationSpace(state, true, nodeIndent);
@@ -6944,14 +7194,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6944
7194
  state.kind = isMapping ? "mapping" : "sequence";
6945
7195
  state.result = _result;
6946
7196
  return true;
6947
- } else if (!readNext)
7197
+ } else if (!readNext) {
6948
7198
  throwError(state, "missed comma between flow collection entries");
6949
- else if (ch === 44)
7199
+ } else if (ch === 44) {
6950
7200
  throwError(state, "expected the node content, but found ','");
7201
+ }
6951
7202
  keyTag = keyNode = valueNode = null;
6952
7203
  isPair = isExplicitPair = false;
6953
7204
  if (ch === 63) {
6954
- if (isWsOrEol(state.input.charCodeAt(state.position + 1))) {
7205
+ const following = state.input.charCodeAt(state.position + 1);
7206
+ if (isWsOrEol(following)) {
6955
7207
  isPair = isExplicitPair = true;
6956
7208
  state.position++;
6957
7209
  skipSeparationSpace(state, true, nodeIndent);
@@ -6972,19 +7224,21 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6972
7224
  composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
6973
7225
  valueNode = state.result;
6974
7226
  }
6975
- if (isMapping)
7227
+ if (isMapping) {
6976
7228
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
6977
- else if (isPair)
7229
+ } else if (isPair) {
6978
7230
  _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
6979
- else
7231
+ } else {
6980
7232
  _result.push(keyNode);
7233
+ }
6981
7234
  skipSeparationSpace(state, true, nodeIndent);
6982
7235
  ch = state.input.charCodeAt(state.position);
6983
7236
  if (ch === 44) {
6984
7237
  readNext = true;
6985
7238
  ch = state.input.charCodeAt(++state.position);
6986
- } else
7239
+ } else {
6987
7240
  readNext = false;
7241
+ }
6988
7242
  }
6989
7243
  throwError(state, "unexpected end of the stream within a flow collection");
6990
7244
  }
@@ -6998,40 +7252,45 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
6998
7252
  let atMoreIndented = false;
6999
7253
  let tmp;
7000
7254
  let ch = state.input.charCodeAt(state.position);
7001
- if (ch === 124)
7255
+ if (ch === 124) {
7002
7256
  folding = false;
7003
- else if (ch === 62)
7257
+ } else if (ch === 62) {
7004
7258
  folding = true;
7005
- else
7259
+ } else {
7006
7260
  return false;
7261
+ }
7007
7262
  state.kind = "scalar";
7008
7263
  state.result = "";
7009
7264
  while (ch !== 0) {
7010
7265
  ch = state.input.charCodeAt(++state.position);
7011
- if (ch === 43 || ch === 45)
7012
- if (CHOMPING_CLIP === chomping)
7266
+ if (ch === 43 || ch === 45) {
7267
+ if (CHOMPING_CLIP === chomping) {
7013
7268
  chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
7014
- else
7269
+ } else {
7015
7270
  throwError(state, "repeat of a chomping mode identifier");
7016
- else if ((tmp = fromDecimalCode(ch)) >= 0)
7017
- if (tmp === 0)
7271
+ }
7272
+ } else if ((tmp = fromDecimalCode(ch)) >= 0) {
7273
+ if (tmp === 0) {
7018
7274
  throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
7019
- else if (!detectedIndent) {
7275
+ } else if (!detectedIndent) {
7020
7276
  textIndent = nodeIndent + tmp - 1;
7021
7277
  detectedIndent = true;
7022
- } else
7278
+ } else {
7023
7279
  throwError(state, "repeat of an indentation width identifier");
7024
- else
7280
+ }
7281
+ } else {
7025
7282
  break;
7283
+ }
7026
7284
  }
7027
7285
  if (isWhiteSpace(ch)) {
7028
- do
7286
+ do {
7029
7287
  ch = state.input.charCodeAt(++state.position);
7030
- while (isWhiteSpace(ch));
7031
- if (ch === 35)
7032
- do
7288
+ } while (isWhiteSpace(ch));
7289
+ if (ch === 35) {
7290
+ do {
7033
7291
  ch = state.input.charCodeAt(++state.position);
7034
- while (!isEol(ch) && ch !== 0);
7292
+ } while (!isEol(ch) && ch !== 0);
7293
+ }
7035
7294
  }
7036
7295
  while (ch !== 0) {
7037
7296
  readLineBreak(state);
@@ -7041,49 +7300,56 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7041
7300
  state.lineIndent++;
7042
7301
  ch = state.input.charCodeAt(++state.position);
7043
7302
  }
7044
- if (!detectedIndent && state.lineIndent > textIndent)
7303
+ if (!detectedIndent && state.lineIndent > textIndent) {
7045
7304
  textIndent = state.lineIndent;
7305
+ }
7046
7306
  if (isEol(ch)) {
7047
7307
  emptyLines++;
7048
7308
  continue;
7049
7309
  }
7050
- if (!detectedIndent && textIndent === 0)
7310
+ if (!detectedIndent && textIndent === 0) {
7051
7311
  throwError(state, "missing indentation for block scalar");
7312
+ }
7052
7313
  if (state.lineIndent < textIndent) {
7053
- if (chomping === CHOMPING_KEEP)
7054
- state.result += common.repeat(`
7314
+ if (chomping === CHOMPING_KEEP) {
7315
+ state.result += common2.repeat(`
7055
7316
  `, didReadContent ? 1 + emptyLines : emptyLines);
7056
- else if (chomping === CHOMPING_CLIP) {
7057
- if (didReadContent)
7317
+ } else if (chomping === CHOMPING_CLIP) {
7318
+ if (didReadContent) {
7058
7319
  state.result += `
7059
7320
  `;
7321
+ }
7060
7322
  }
7061
7323
  break;
7062
7324
  }
7063
- if (folding)
7325
+ if (folding) {
7064
7326
  if (isWhiteSpace(ch)) {
7065
7327
  atMoreIndented = true;
7066
- state.result += common.repeat(`
7328
+ state.result += common2.repeat(`
7067
7329
  `, didReadContent ? 1 + emptyLines : emptyLines);
7068
7330
  } else if (atMoreIndented) {
7069
7331
  atMoreIndented = false;
7070
- state.result += common.repeat(`
7332
+ state.result += common2.repeat(`
7071
7333
  `, emptyLines + 1);
7072
7334
  } else if (emptyLines === 0) {
7073
- if (didReadContent)
7335
+ if (didReadContent) {
7074
7336
  state.result += " ";
7075
- } else
7076
- state.result += common.repeat(`
7337
+ }
7338
+ } else {
7339
+ state.result += common2.repeat(`
7077
7340
  `, emptyLines);
7078
- else
7079
- state.result += common.repeat(`
7341
+ }
7342
+ } else {
7343
+ state.result += common2.repeat(`
7080
7344
  `, didReadContent ? 1 + emptyLines : emptyLines);
7345
+ }
7081
7346
  didReadContent = true;
7082
7347
  detectedIndent = true;
7083
7348
  emptyLines = 0;
7084
7349
  const captureStart = state.position;
7085
- while (!isEol(ch) && ch !== 0)
7350
+ while (!isEol(ch) && ch !== 0) {
7086
7351
  ch = state.input.charCodeAt(++state.position);
7352
+ }
7087
7353
  captureSegment(state, captureStart, state.position, false);
7088
7354
  }
7089
7355
  return true;
@@ -7095,18 +7361,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7095
7361
  let detected = false;
7096
7362
  if (state.firstTabInLine !== -1)
7097
7363
  return false;
7098
- if (state.anchor !== null)
7364
+ if (state.anchor !== null) {
7099
7365
  storeAnchor(state, state.anchor, _result);
7366
+ }
7100
7367
  let ch = state.input.charCodeAt(state.position);
7101
7368
  while (ch !== 0) {
7102
7369
  if (state.firstTabInLine !== -1) {
7103
7370
  state.position = state.firstTabInLine;
7104
7371
  throwError(state, "tab characters must not be used in indentation");
7105
7372
  }
7106
- if (ch !== 45)
7373
+ if (ch !== 45) {
7107
7374
  break;
7108
- if (!isWsOrEol(state.input.charCodeAt(state.position + 1)))
7375
+ }
7376
+ const following = state.input.charCodeAt(state.position + 1);
7377
+ if (!isWsOrEol(following)) {
7109
7378
  break;
7379
+ }
7110
7380
  detected = true;
7111
7381
  state.position++;
7112
7382
  if (skipSeparationSpace(state, true, -1)) {
@@ -7121,10 +7391,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7121
7391
  _result.push(state.result);
7122
7392
  skipSeparationSpace(state, true, -1);
7123
7393
  ch = state.input.charCodeAt(state.position);
7124
- if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0)
7394
+ if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
7125
7395
  throwError(state, "bad indentation of a sequence entry");
7126
- else if (state.lineIndent < nodeIndent)
7396
+ } else if (state.lineIndent < nodeIndent) {
7127
7397
  break;
7398
+ }
7128
7399
  }
7129
7400
  if (detected) {
7130
7401
  state.tag = _tag;
@@ -7143,7 +7414,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7143
7414
  const _tag = state.tag;
7144
7415
  const _anchor = state.anchor;
7145
7416
  const _result = {};
7146
- const overridableKeys = Object.create(null);
7417
+ const overridableKeys = /* @__PURE__ */ Object.create(null);
7147
7418
  let keyTag = null;
7148
7419
  let keyNode = null;
7149
7420
  let valueNode = null;
@@ -7151,8 +7422,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7151
7422
  let detected = false;
7152
7423
  if (state.firstTabInLine !== -1)
7153
7424
  return false;
7154
- if (state.anchor !== null)
7425
+ if (state.anchor !== null) {
7155
7426
  storeAnchor(state, state.anchor, _result);
7427
+ }
7156
7428
  let ch = state.input.charCodeAt(state.position);
7157
7429
  while (ch !== 0) {
7158
7430
  if (!atExplicitKey && state.firstTabInLine !== -1) {
@@ -7173,24 +7445,28 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7173
7445
  } else if (atExplicitKey) {
7174
7446
  atExplicitKey = false;
7175
7447
  allowCompact = true;
7176
- } else
7448
+ } else {
7177
7449
  throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
7450
+ }
7178
7451
  state.position += 1;
7179
7452
  ch = following;
7180
7453
  } else {
7181
7454
  _keyLine = state.line;
7182
7455
  _keyLineStart = state.lineStart;
7183
7456
  _keyPos = state.position;
7184
- if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true))
7457
+ if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
7185
7458
  break;
7459
+ }
7186
7460
  if (state.line === _line) {
7187
7461
  ch = state.input.charCodeAt(state.position);
7188
- while (isWhiteSpace(ch))
7462
+ while (isWhiteSpace(ch)) {
7189
7463
  ch = state.input.charCodeAt(++state.position);
7464
+ }
7190
7465
  if (ch === 58) {
7191
7466
  ch = state.input.charCodeAt(++state.position);
7192
- if (!isWsOrEol(ch))
7467
+ if (!isWsOrEol(ch)) {
7193
7468
  throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
7469
+ }
7194
7470
  if (atExplicitKey) {
7195
7471
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
7196
7472
  keyTag = keyNode = valueNode = null;
@@ -7200,16 +7476,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7200
7476
  allowCompact = false;
7201
7477
  keyTag = state.tag;
7202
7478
  keyNode = state.result;
7203
- } else if (detected)
7479
+ } else if (detected) {
7204
7480
  throwError(state, "can not read an implicit mapping pair; a colon is missed");
7205
- else {
7481
+ } else {
7206
7482
  state.tag = _tag;
7207
7483
  state.anchor = _anchor;
7208
7484
  return true;
7209
7485
  }
7210
- } else if (detected)
7486
+ } else if (detected) {
7211
7487
  throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
7212
- else {
7488
+ } else {
7213
7489
  state.tag = _tag;
7214
7490
  state.anchor = _anchor;
7215
7491
  return true;
@@ -7221,11 +7497,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7221
7497
  _keyLineStart = state.lineStart;
7222
7498
  _keyPos = state.position;
7223
7499
  }
7224
- if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact))
7225
- if (atExplicitKey)
7500
+ if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
7501
+ if (atExplicitKey) {
7226
7502
  keyNode = state.result;
7227
- else
7503
+ } else {
7228
7504
  valueNode = state.result;
7505
+ }
7506
+ }
7229
7507
  if (!atExplicitKey) {
7230
7508
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
7231
7509
  keyTag = keyNode = valueNode = null;
@@ -7233,13 +7511,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7233
7511
  skipSeparationSpace(state, true, -1);
7234
7512
  ch = state.input.charCodeAt(state.position);
7235
7513
  }
7236
- if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0)
7514
+ if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
7237
7515
  throwError(state, "bad indentation of a mapping entry");
7238
- else if (state.lineIndent < nodeIndent)
7516
+ } else if (state.lineIndent < nodeIndent) {
7239
7517
  break;
7518
+ }
7240
7519
  }
7241
- if (atExplicitKey)
7520
+ if (atExplicitKey) {
7242
7521
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
7522
+ }
7243
7523
  if (detected) {
7244
7524
  state.tag = _tag;
7245
7525
  state.anchor = _anchor;
@@ -7256,8 +7536,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7256
7536
  let ch = state.input.charCodeAt(state.position);
7257
7537
  if (ch !== 33)
7258
7538
  return false;
7259
- if (state.tag !== null)
7539
+ if (state.tag !== null) {
7260
7540
  throwError(state, "duplication of a tag property");
7541
+ }
7261
7542
  ch = state.input.charCodeAt(++state.position);
7262
7543
  if (ch === 60) {
7263
7544
  isVerbatim = true;
@@ -7266,66 +7547,77 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7266
7547
  isNamed = true;
7267
7548
  tagHandle = "!!";
7268
7549
  ch = state.input.charCodeAt(++state.position);
7269
- } else
7550
+ } else {
7270
7551
  tagHandle = "!";
7552
+ }
7271
7553
  let _position = state.position;
7272
7554
  if (isVerbatim) {
7273
- do
7555
+ do {
7274
7556
  ch = state.input.charCodeAt(++state.position);
7275
- while (ch !== 0 && ch !== 62);
7557
+ } while (ch !== 0 && ch !== 62);
7276
7558
  if (state.position < state.length) {
7277
7559
  tagName = state.input.slice(_position, state.position);
7278
7560
  ch = state.input.charCodeAt(++state.position);
7279
- } else
7561
+ } else {
7280
7562
  throwError(state, "unexpected end of the stream within a verbatim tag");
7563
+ }
7281
7564
  } else {
7282
7565
  while (ch !== 0 && !isWsOrEol(ch)) {
7283
- if (ch === 33)
7566
+ if (ch === 33) {
7284
7567
  if (!isNamed) {
7285
7568
  tagHandle = state.input.slice(_position - 1, state.position + 1);
7286
- if (!PATTERN_TAG_HANDLE.test(tagHandle))
7569
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
7287
7570
  throwError(state, "named tag handle cannot contain such characters");
7571
+ }
7288
7572
  isNamed = true;
7289
7573
  _position = state.position + 1;
7290
- } else
7574
+ } else {
7291
7575
  throwError(state, "tag suffix cannot contain exclamation marks");
7576
+ }
7577
+ }
7292
7578
  ch = state.input.charCodeAt(++state.position);
7293
7579
  }
7294
7580
  tagName = state.input.slice(_position, state.position);
7295
- if (PATTERN_FLOW_INDICATORS.test(tagName))
7581
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) {
7296
7582
  throwError(state, "tag suffix cannot contain flow indicator characters");
7583
+ }
7297
7584
  }
7298
- if (tagName && !PATTERN_TAG_URI.test(tagName))
7585
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) {
7299
7586
  throwError(state, "tag name cannot contain such characters: " + tagName);
7587
+ }
7300
7588
  try {
7301
7589
  tagName = decodeURIComponent(tagName);
7302
7590
  } catch (err) {
7303
7591
  throwError(state, "tag name is malformed: " + tagName);
7304
7592
  }
7305
- if (isVerbatim)
7593
+ if (isVerbatim) {
7306
7594
  state.tag = tagName;
7307
- else if (_hasOwnProperty.call(state.tagMap, tagHandle))
7595
+ } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
7308
7596
  state.tag = state.tagMap[tagHandle] + tagName;
7309
- else if (tagHandle === "!")
7597
+ } else if (tagHandle === "!") {
7310
7598
  state.tag = "!" + tagName;
7311
- else if (tagHandle === "!!")
7599
+ } else if (tagHandle === "!!") {
7312
7600
  state.tag = "tag:yaml.org,2002:" + tagName;
7313
- else
7601
+ } else {
7314
7602
  throwError(state, 'undeclared tag handle "' + tagHandle + '"');
7603
+ }
7315
7604
  return true;
7316
7605
  }
7317
7606
  function readAnchorProperty(state) {
7318
7607
  let ch = state.input.charCodeAt(state.position);
7319
7608
  if (ch !== 38)
7320
7609
  return false;
7321
- if (state.anchor !== null)
7610
+ if (state.anchor !== null) {
7322
7611
  throwError(state, "duplication of an anchor property");
7612
+ }
7323
7613
  ch = state.input.charCodeAt(++state.position);
7324
7614
  const _position = state.position;
7325
- while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch))
7615
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
7326
7616
  ch = state.input.charCodeAt(++state.position);
7327
- if (state.position === _position)
7617
+ }
7618
+ if (state.position === _position) {
7328
7619
  throwError(state, "name of an anchor node must contain at least one character");
7620
+ }
7329
7621
  state.anchor = state.input.slice(_position, state.position);
7330
7622
  return true;
7331
7623
  }
@@ -7335,13 +7627,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7335
7627
  return false;
7336
7628
  ch = state.input.charCodeAt(++state.position);
7337
7629
  const _position = state.position;
7338
- while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch))
7630
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
7339
7631
  ch = state.input.charCodeAt(++state.position);
7340
- if (state.position === _position)
7632
+ }
7633
+ if (state.position === _position) {
7341
7634
  throwError(state, "name of an alias node must contain at least one character");
7635
+ }
7342
7636
  const alias = state.input.slice(_position, state.position);
7343
- if (!_hasOwnProperty.call(state.anchorMap, alias))
7637
+ if (!_hasOwnProperty.call(state.anchorMap, alias)) {
7344
7638
  throwError(state, 'unidentified alias "' + alias + '"');
7639
+ }
7345
7640
  state.result = state.anchorMap[alias];
7346
7641
  skipSeparationSpace(state, true, -1);
7347
7642
  return true;
@@ -7369,14 +7664,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7369
7664
  let atNewLine = false;
7370
7665
  let hasContent = false;
7371
7666
  let propertyStart = null;
7372
- let type;
7667
+ let type2;
7373
7668
  let flowIndent;
7374
7669
  let blockIndent;
7375
- if (state.depth >= state.maxDepth)
7670
+ if (state.depth >= state.maxDepth) {
7376
7671
  throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
7672
+ }
7377
7673
  state.depth += 1;
7378
- if (state.listener !== null)
7674
+ if (state.listener !== null) {
7379
7675
  state.listener("open", state);
7676
+ }
7380
7677
  state.tag = null;
7381
7678
  state.anchor = null;
7382
7679
  state.kind = null;
@@ -7385,110 +7682,131 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7385
7682
  if (allowToSeek) {
7386
7683
  if (skipSeparationSpace(state, true, -1)) {
7387
7684
  atNewLine = true;
7388
- if (state.lineIndent > parentIndent)
7685
+ if (state.lineIndent > parentIndent) {
7389
7686
  indentStatus = 1;
7390
- else if (state.lineIndent === parentIndent)
7687
+ } else if (state.lineIndent === parentIndent) {
7391
7688
  indentStatus = 0;
7392
- else if (state.lineIndent < parentIndent)
7689
+ } else if (state.lineIndent < parentIndent) {
7393
7690
  indentStatus = -1;
7691
+ }
7394
7692
  }
7395
7693
  }
7396
- if (indentStatus === 1)
7694
+ if (indentStatus === 1) {
7397
7695
  while (true) {
7398
7696
  const ch = state.input.charCodeAt(state.position);
7399
7697
  const propertyState = snapshotState(state);
7400
- if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null))
7698
+ if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) {
7401
7699
  break;
7402
- if (!readTagProperty(state) && !readAnchorProperty(state))
7700
+ }
7701
+ if (!readTagProperty(state) && !readAnchorProperty(state)) {
7403
7702
  break;
7404
- if (propertyStart === null)
7703
+ }
7704
+ if (propertyStart === null) {
7405
7705
  propertyStart = propertyState;
7706
+ }
7406
7707
  if (skipSeparationSpace(state, true, -1)) {
7407
7708
  atNewLine = true;
7408
7709
  allowBlockCollections = allowBlockStyles;
7409
- if (state.lineIndent > parentIndent)
7710
+ if (state.lineIndent > parentIndent) {
7410
7711
  indentStatus = 1;
7411
- else if (state.lineIndent === parentIndent)
7712
+ } else if (state.lineIndent === parentIndent) {
7412
7713
  indentStatus = 0;
7413
- else if (state.lineIndent < parentIndent)
7714
+ } else if (state.lineIndent < parentIndent) {
7414
7715
  indentStatus = -1;
7415
- } else
7716
+ }
7717
+ } else {
7416
7718
  allowBlockCollections = false;
7719
+ }
7417
7720
  }
7418
- if (allowBlockCollections)
7721
+ }
7722
+ if (allowBlockCollections) {
7419
7723
  allowBlockCollections = atNewLine || allowCompact;
7724
+ }
7420
7725
  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
7421
- if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext)
7726
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
7422
7727
  flowIndent = parentIndent;
7423
- else
7728
+ } else {
7424
7729
  flowIndent = parentIndent + 1;
7730
+ }
7425
7731
  blockIndent = state.position - state.lineStart;
7426
- if (indentStatus === 1)
7427
- if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent))
7732
+ if (indentStatus === 1) {
7733
+ if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
7428
7734
  hasContent = true;
7429
- else {
7735
+ } else {
7430
7736
  const ch = state.input.charCodeAt(state.position);
7431
- if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent))
7737
+ if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) {
7432
7738
  hasContent = true;
7433
- else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent))
7739
+ } else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
7434
7740
  hasContent = true;
7435
- else if (readAlias(state)) {
7741
+ } else if (readAlias(state)) {
7436
7742
  hasContent = true;
7437
- if (state.tag !== null || state.anchor !== null)
7743
+ if (state.tag !== null || state.anchor !== null) {
7438
7744
  throwError(state, "alias node should not have any properties");
7745
+ }
7439
7746
  } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
7440
7747
  hasContent = true;
7441
- if (state.tag === null)
7748
+ if (state.tag === null) {
7442
7749
  state.tag = "?";
7750
+ }
7443
7751
  }
7444
- if (state.anchor !== null)
7752
+ if (state.anchor !== null) {
7445
7753
  storeAnchor(state, state.anchor, state.result);
7754
+ }
7446
7755
  }
7447
- else if (indentStatus === 0)
7756
+ } else if (indentStatus === 0) {
7448
7757
  hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
7758
+ }
7449
7759
  }
7450
7760
  if (state.tag === null) {
7451
- if (state.anchor !== null)
7761
+ if (state.anchor !== null) {
7452
7762
  storeAnchor(state, state.anchor, state.result);
7763
+ }
7453
7764
  } else if (state.tag === "?") {
7454
- if (state.result !== null && state.kind !== "scalar")
7765
+ if (state.result !== null && state.kind !== "scalar") {
7455
7766
  throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
7767
+ }
7456
7768
  for (let typeIndex = 0, typeQuantity = state.implicitTypes.length;typeIndex < typeQuantity; typeIndex += 1) {
7457
- type = state.implicitTypes[typeIndex];
7458
- if (type.resolve(state.result)) {
7459
- state.result = type.construct(state.result);
7460
- state.tag = type.tag;
7461
- if (state.anchor !== null)
7769
+ type2 = state.implicitTypes[typeIndex];
7770
+ if (type2.resolve(state.result)) {
7771
+ state.result = type2.construct(state.result);
7772
+ state.tag = type2.tag;
7773
+ if (state.anchor !== null) {
7462
7774
  storeAnchor(state, state.anchor, state.result);
7775
+ }
7463
7776
  break;
7464
7777
  }
7465
7778
  }
7466
7779
  } else if (state.tag !== "!") {
7467
- if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag))
7468
- type = state.typeMap[state.kind || "fallback"][state.tag];
7469
- else {
7470
- type = null;
7780
+ if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
7781
+ type2 = state.typeMap[state.kind || "fallback"][state.tag];
7782
+ } else {
7783
+ type2 = null;
7471
7784
  const typeList = state.typeMap.multi[state.kind || "fallback"];
7472
- for (let typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1)
7785
+ for (let typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1) {
7473
7786
  if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
7474
- type = typeList[typeIndex];
7787
+ type2 = typeList[typeIndex];
7475
7788
  break;
7476
7789
  }
7790
+ }
7477
7791
  }
7478
- if (!type)
7792
+ if (!type2) {
7479
7793
  throwError(state, "unknown tag !<" + state.tag + ">");
7480
- if (state.result !== null && type.kind !== state.kind)
7481
- throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
7482
- if (!type.resolve(state.result, state.tag))
7794
+ }
7795
+ if (state.result !== null && type2.kind !== state.kind) {
7796
+ throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"');
7797
+ }
7798
+ if (!type2.resolve(state.result, state.tag)) {
7483
7799
  throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
7484
- else {
7485
- state.result = type.construct(state.result, state.tag);
7486
- if (state.anchor !== null)
7800
+ } else {
7801
+ state.result = type2.construct(state.result, state.tag);
7802
+ if (state.anchor !== null) {
7487
7803
  storeAnchor(state, state.anchor, state.result);
7804
+ }
7488
7805
  }
7489
7806
  }
7490
- if (state.listener !== null)
7807
+ if (state.listener !== null) {
7491
7808
  state.listener("close", state);
7809
+ }
7492
7810
  state.depth -= 1;
7493
7811
  return state.tag !== null || state.anchor !== null || hasContent;
7494
7812
  }
@@ -7498,55 +7816,63 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7498
7816
  let ch;
7499
7817
  state.version = null;
7500
7818
  state.checkLineBreaks = state.legacy;
7501
- state.tagMap = Object.create(null);
7502
- state.anchorMap = Object.create(null);
7819
+ state.tagMap = /* @__PURE__ */ Object.create(null);
7820
+ state.anchorMap = /* @__PURE__ */ Object.create(null);
7503
7821
  while ((ch = state.input.charCodeAt(state.position)) !== 0) {
7504
7822
  skipSeparationSpace(state, true, -1);
7505
7823
  ch = state.input.charCodeAt(state.position);
7506
- if (state.lineIndent > 0 || ch !== 37)
7824
+ if (state.lineIndent > 0 || ch !== 37) {
7507
7825
  break;
7826
+ }
7508
7827
  hasDirectives = true;
7509
7828
  ch = state.input.charCodeAt(++state.position);
7510
7829
  let _position = state.position;
7511
- while (ch !== 0 && !isWsOrEol(ch))
7830
+ while (ch !== 0 && !isWsOrEol(ch)) {
7512
7831
  ch = state.input.charCodeAt(++state.position);
7832
+ }
7513
7833
  const directiveName = state.input.slice(_position, state.position);
7514
7834
  const directiveArgs = [];
7515
- if (directiveName.length < 1)
7835
+ if (directiveName.length < 1) {
7516
7836
  throwError(state, "directive name must not be less than one character in length");
7837
+ }
7517
7838
  while (ch !== 0) {
7518
- while (isWhiteSpace(ch))
7839
+ while (isWhiteSpace(ch)) {
7519
7840
  ch = state.input.charCodeAt(++state.position);
7841
+ }
7520
7842
  if (ch === 35) {
7521
- do
7843
+ do {
7522
7844
  ch = state.input.charCodeAt(++state.position);
7523
- while (ch !== 0 && !isEol(ch));
7845
+ } while (ch !== 0 && !isEol(ch));
7524
7846
  break;
7525
7847
  }
7526
7848
  if (isEol(ch))
7527
7849
  break;
7528
7850
  _position = state.position;
7529
- while (ch !== 0 && !isWsOrEol(ch))
7851
+ while (ch !== 0 && !isWsOrEol(ch)) {
7530
7852
  ch = state.input.charCodeAt(++state.position);
7853
+ }
7531
7854
  directiveArgs.push(state.input.slice(_position, state.position));
7532
7855
  }
7533
7856
  if (ch !== 0)
7534
7857
  readLineBreak(state);
7535
- if (_hasOwnProperty.call(directiveHandlers, directiveName))
7858
+ if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
7536
7859
  directiveHandlers[directiveName](state, directiveName, directiveArgs);
7537
- else
7860
+ } else {
7538
7861
  throwWarning(state, 'unknown document directive "' + directiveName + '"');
7862
+ }
7539
7863
  }
7540
7864
  skipSeparationSpace(state, true, -1);
7541
7865
  if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
7542
7866
  state.position += 3;
7543
7867
  skipSeparationSpace(state, true, -1);
7544
- } else if (hasDirectives)
7868
+ } else if (hasDirectives) {
7545
7869
  throwError(state, "directives end mark is expected");
7870
+ }
7546
7871
  composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
7547
7872
  skipSeparationSpace(state, true, -1);
7548
- if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position)))
7873
+ if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
7549
7874
  throwWarning(state, "non-ASCII line breaks are interpreted as content");
7875
+ }
7550
7876
  state.documents.push(state.result);
7551
7877
  if (state.position === state.lineStart && testDocumentSeparator(state)) {
7552
7878
  if (state.input.charCodeAt(state.position) === 46) {
@@ -7555,18 +7881,21 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7555
7881
  }
7556
7882
  return;
7557
7883
  }
7558
- if (state.position < state.length - 1)
7884
+ if (state.position < state.length - 1) {
7559
7885
  throwError(state, "end of the stream or a document separator is expected");
7886
+ }
7560
7887
  }
7561
7888
  function loadDocuments(input, options) {
7562
7889
  input = String(input);
7563
7890
  options = options || {};
7564
7891
  if (input.length !== 0) {
7565
- if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13)
7892
+ if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
7566
7893
  input += `
7567
7894
  `;
7568
- if (input.charCodeAt(0) === 65279)
7895
+ }
7896
+ if (input.charCodeAt(0) === 65279) {
7569
7897
  input = input.slice(1);
7898
+ }
7570
7899
  }
7571
7900
  const state = new State(input, options);
7572
7901
  const nullpos = input.indexOf("\x00");
@@ -7579,64 +7908,74 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7579
7908
  state.lineIndent += 1;
7580
7909
  state.position += 1;
7581
7910
  }
7582
- while (state.position < state.length - 1)
7911
+ while (state.position < state.length - 1) {
7583
7912
  readDocument(state);
7913
+ }
7584
7914
  return state.documents;
7585
7915
  }
7586
- function loadAll(input, iterator, options) {
7916
+ function loadAll2(input, iterator, options) {
7587
7917
  if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
7588
7918
  options = iterator;
7589
7919
  iterator = null;
7590
7920
  }
7591
7921
  const documents = loadDocuments(input, options);
7592
- if (typeof iterator !== "function")
7922
+ if (typeof iterator !== "function") {
7593
7923
  return documents;
7594
- for (let index = 0, length = documents.length;index < length; index += 1)
7924
+ }
7925
+ for (let index = 0, length = documents.length;index < length; index += 1) {
7595
7926
  iterator(documents[index]);
7927
+ }
7596
7928
  }
7597
- function load(input, options) {
7929
+ function load2(input, options) {
7598
7930
  const documents = loadDocuments(input, options);
7599
- if (documents.length === 0)
7931
+ if (documents.length === 0) {
7600
7932
  return;
7601
- else if (documents.length === 1)
7933
+ } else if (documents.length === 1) {
7602
7934
  return documents[0];
7603
- throw new YAMLException("expected a single document in the stream, but found more");
7604
- }
7605
- module.exports.loadAll = loadAll;
7606
- module.exports.load = load;
7607
- });
7608
- var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7609
- var common = require_common();
7610
- var YAMLException = require_exception();
7611
- var DEFAULT_SCHEMA = require_default();
7612
- var _toString = Object.prototype.toString;
7613
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
7614
- var CHAR_BOM = 65279;
7615
- var CHAR_TAB = 9;
7616
- var CHAR_LINE_FEED = 10;
7617
- var CHAR_CARRIAGE_RETURN = 13;
7618
- var CHAR_SPACE = 32;
7619
- var CHAR_EXCLAMATION = 33;
7620
- var CHAR_DOUBLE_QUOTE = 34;
7621
- var CHAR_SHARP = 35;
7622
- var CHAR_PERCENT = 37;
7623
- var CHAR_AMPERSAND = 38;
7624
- var CHAR_SINGLE_QUOTE = 39;
7625
- var CHAR_ASTERISK = 42;
7626
- var CHAR_COMMA = 44;
7627
- var CHAR_MINUS = 45;
7628
- var CHAR_COLON = 58;
7629
- var CHAR_EQUALS = 61;
7630
- var CHAR_GREATER_THAN = 62;
7631
- var CHAR_QUESTION = 63;
7632
- var CHAR_COMMERCIAL_AT = 64;
7633
- var CHAR_LEFT_SQUARE_BRACKET = 91;
7634
- var CHAR_RIGHT_SQUARE_BRACKET = 93;
7635
- var CHAR_GRAVE_ACCENT = 96;
7636
- var CHAR_LEFT_CURLY_BRACKET = 123;
7637
- var CHAR_VERTICAL_LINE = 124;
7638
- var CHAR_RIGHT_CURLY_BRACKET = 125;
7639
- var ESCAPE_SEQUENCES = {};
7935
+ }
7936
+ throw new YAMLException2("expected a single document in the stream, but found more");
7937
+ }
7938
+ loader.loadAll = loadAll2;
7939
+ loader.load = load2;
7940
+ return loader;
7941
+ }
7942
+ var dumper = {};
7943
+ var hasRequiredDumper;
7944
+ function requireDumper() {
7945
+ if (hasRequiredDumper)
7946
+ return dumper;
7947
+ hasRequiredDumper = 1;
7948
+ const common2 = requireCommon();
7949
+ const YAMLException2 = requireException();
7950
+ const DEFAULT_SCHEMA2 = require_default();
7951
+ const _toString = Object.prototype.toString;
7952
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
7953
+ const CHAR_BOM = 65279;
7954
+ const CHAR_TAB = 9;
7955
+ const CHAR_LINE_FEED = 10;
7956
+ const CHAR_CARRIAGE_RETURN = 13;
7957
+ const CHAR_SPACE = 32;
7958
+ const CHAR_EXCLAMATION = 33;
7959
+ const CHAR_DOUBLE_QUOTE = 34;
7960
+ const CHAR_SHARP = 35;
7961
+ const CHAR_PERCENT = 37;
7962
+ const CHAR_AMPERSAND = 38;
7963
+ const CHAR_SINGLE_QUOTE = 39;
7964
+ const CHAR_ASTERISK = 42;
7965
+ const CHAR_COMMA = 44;
7966
+ const CHAR_MINUS = 45;
7967
+ const CHAR_COLON = 58;
7968
+ const CHAR_EQUALS = 61;
7969
+ const CHAR_GREATER_THAN = 62;
7970
+ const CHAR_QUESTION = 63;
7971
+ const CHAR_COMMERCIAL_AT = 64;
7972
+ const CHAR_LEFT_SQUARE_BRACKET = 91;
7973
+ const CHAR_RIGHT_SQUARE_BRACKET = 93;
7974
+ const CHAR_GRAVE_ACCENT = 96;
7975
+ const CHAR_LEFT_CURLY_BRACKET = 123;
7976
+ const CHAR_VERTICAL_LINE = 124;
7977
+ const CHAR_RIGHT_CURLY_BRACKET = 125;
7978
+ const ESCAPE_SEQUENCES = {};
7640
7979
  ESCAPE_SEQUENCES[0] = "\\0";
7641
7980
  ESCAPE_SEQUENCES[7] = "\\a";
7642
7981
  ESCAPE_SEQUENCES[8] = "\\b";
@@ -7652,7 +7991,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7652
7991
  ESCAPE_SEQUENCES[160] = "\\_";
7653
7992
  ESCAPE_SEQUENCES[8232] = "\\L";
7654
7993
  ESCAPE_SEQUENCES[8233] = "\\P";
7655
- var DEPRECATED_BOOLEANS_SYNTAX = [
7994
+ const DEPRECATED_BOOLEANS_SYNTAX = [
7656
7995
  "y",
7657
7996
  "Y",
7658
7997
  "yes",
@@ -7670,20 +8009,22 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7670
8009
  "Off",
7671
8010
  "OFF"
7672
8011
  ];
7673
- var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
7674
- function compileStyleMap(schema, map) {
7675
- if (map === null)
8012
+ const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
8013
+ function compileStyleMap(schema2, map2) {
8014
+ if (map2 === null)
7676
8015
  return {};
7677
8016
  const result = {};
7678
- const keys = Object.keys(map);
8017
+ const keys = Object.keys(map2);
7679
8018
  for (let index = 0, length = keys.length;index < length; index += 1) {
7680
8019
  let tag = keys[index];
7681
- let style = String(map[tag]);
7682
- if (tag.slice(0, 2) === "!!")
8020
+ let style = String(map2[tag]);
8021
+ if (tag.slice(0, 2) === "!!") {
7683
8022
  tag = "tag:yaml.org,2002:" + tag.slice(2);
7684
- const type = schema.compiledTypeMap["fallback"][tag];
7685
- if (type && _hasOwnProperty.call(type.styleAliases, style))
7686
- style = type.styleAliases[style];
8023
+ }
8024
+ const type2 = schema2.compiledTypeMap["fallback"][tag];
8025
+ if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) {
8026
+ style = type2.styleAliases[style];
8027
+ }
7687
8028
  result[tag] = style;
7688
8029
  }
7689
8030
  return result;
@@ -7701,18 +8042,19 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7701
8042
  } else if (character <= 4294967295) {
7702
8043
  handle = "U";
7703
8044
  length = 8;
7704
- } else
7705
- throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
7706
- return "\\" + handle + common.repeat("0", length - string.length) + string;
8045
+ } else {
8046
+ throw new YAMLException2("code point within a string may not be greater than 0xFFFFFFFF");
8047
+ }
8048
+ return "\\" + handle + common2.repeat("0", length - string.length) + string;
7707
8049
  }
7708
- var QUOTING_TYPE_SINGLE = 1;
7709
- var QUOTING_TYPE_DOUBLE = 2;
8050
+ const QUOTING_TYPE_SINGLE = 1;
8051
+ const QUOTING_TYPE_DOUBLE = 2;
7710
8052
  function State(options) {
7711
- this.schema = options["schema"] || DEFAULT_SCHEMA;
8053
+ this.schema = options["schema"] || DEFAULT_SCHEMA2;
7712
8054
  this.indent = Math.max(1, options["indent"] || 2);
7713
8055
  this.noArrayIndent = options["noArrayIndent"] || false;
7714
8056
  this.skipInvalid = options["skipInvalid"] || false;
7715
- this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
8057
+ this.flowLevel = common2.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
7716
8058
  this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
7717
8059
  this.sortKeys = options["sortKeys"] || false;
7718
8060
  this.lineWidth = options["lineWidth"] || 80;
@@ -7730,7 +8072,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7730
8072
  this.usedDuplicates = null;
7731
8073
  }
7732
8074
  function indentString(string, spaces) {
7733
- const ind = common.repeat(" ", spaces);
8075
+ const ind = common2.repeat(" ", spaces);
7734
8076
  let position = 0;
7735
8077
  let result = "";
7736
8078
  const length = string.length;
@@ -7754,12 +8096,15 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7754
8096
  }
7755
8097
  function generateNextLine(state, level) {
7756
8098
  return `
7757
- ` + common.repeat(" ", state.indent * level);
8099
+ ` + common2.repeat(" ", state.indent * level);
7758
8100
  }
7759
- function testImplicitResolving(state, str) {
7760
- for (let index = 0, length = state.implicitTypes.length;index < length; index += 1)
7761
- if (state.implicitTypes[index].resolve(str))
8101
+ function testImplicitResolving(state, str2) {
8102
+ for (let index = 0, length = state.implicitTypes.length;index < length; index += 1) {
8103
+ const type2 = state.implicitTypes[index];
8104
+ if (type2.resolve(str2)) {
7762
8105
  return true;
8106
+ }
8107
+ }
7763
8108
  return false;
7764
8109
  }
7765
8110
  function isWhitespace(c) {
@@ -7787,19 +8132,21 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7787
8132
  let second;
7788
8133
  if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
7789
8134
  second = string.charCodeAt(pos + 1);
7790
- if (second >= 56320 && second <= 57343)
8135
+ if (second >= 56320 && second <= 57343) {
7791
8136
  return (first - 55296) * 1024 + second - 56320 + 65536;
8137
+ }
7792
8138
  }
7793
8139
  return first;
7794
8140
  }
7795
8141
  function needIndentIndicator(string) {
7796
- return /^\n* /.test(string);
7797
- }
7798
- var STYLE_PLAIN = 1;
7799
- var STYLE_SINGLE = 2;
7800
- var STYLE_LITERAL = 3;
7801
- var STYLE_FOLDED = 4;
7802
- var STYLE_DOUBLE = 5;
8142
+ const leadingSpaceRe = /^\n* /;
8143
+ return leadingSpaceRe.test(string);
8144
+ }
8145
+ const STYLE_PLAIN = 1;
8146
+ const STYLE_SINGLE = 2;
8147
+ const STYLE_LITERAL = 3;
8148
+ const STYLE_FOLDED = 4;
8149
+ const STYLE_DOUBLE = 5;
7803
8150
  function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
7804
8151
  let i;
7805
8152
  let char = 0;
@@ -7809,15 +8156,16 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7809
8156
  const shouldTrackWidth = lineWidth !== -1;
7810
8157
  let previousLineBreak = -1;
7811
8158
  let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
7812
- if (singleLineOnly || forceQuotes)
8159
+ if (singleLineOnly || forceQuotes) {
7813
8160
  for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
7814
8161
  char = codePointAt(string, i);
7815
- if (!isPrintable(char))
8162
+ if (!isPrintable(char)) {
7816
8163
  return STYLE_DOUBLE;
8164
+ }
7817
8165
  plain = plain && isPlainSafe(char, prevChar, inblock);
7818
8166
  prevChar = char;
7819
8167
  }
7820
- else {
8168
+ } else {
7821
8169
  for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
7822
8170
  char = codePointAt(string, i);
7823
8171
  if (char === CHAR_LINE_FEED) {
@@ -7826,31 +8174,37 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7826
8174
  hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
7827
8175
  previousLineBreak = i;
7828
8176
  }
7829
- } else if (!isPrintable(char))
8177
+ } else if (!isPrintable(char)) {
7830
8178
  return STYLE_DOUBLE;
8179
+ }
7831
8180
  plain = plain && isPlainSafe(char, prevChar, inblock);
7832
8181
  prevChar = char;
7833
8182
  }
7834
- hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
8183
+ hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
7835
8184
  }
7836
8185
  if (!hasLineBreak && !hasFoldableLine) {
7837
- if (plain && !forceQuotes && !testAmbiguousType(string))
8186
+ if (plain && !forceQuotes && !testAmbiguousType(string)) {
7838
8187
  return STYLE_PLAIN;
8188
+ }
7839
8189
  return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
7840
8190
  }
7841
- if (indentPerLevel > 9 && needIndentIndicator(string))
8191
+ if (indentPerLevel > 9 && needIndentIndicator(string)) {
7842
8192
  return STYLE_DOUBLE;
7843
- if (!forceQuotes)
8193
+ }
8194
+ if (!forceQuotes) {
7844
8195
  return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
8196
+ }
7845
8197
  return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
7846
8198
  }
7847
8199
  function writeScalar(state, string, level, iskey, inblock) {
7848
8200
  state.dump = function() {
7849
- if (string.length === 0)
8201
+ if (string.length === 0) {
7850
8202
  return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
8203
+ }
7851
8204
  if (!state.noCompatMode) {
7852
- if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string))
8205
+ if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
7853
8206
  return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
8207
+ }
7854
8208
  }
7855
8209
  const indent = state.indent * Math.max(1, level);
7856
8210
  const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
@@ -7868,9 +8222,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7868
8222
  case STYLE_FOLDED:
7869
8223
  return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
7870
8224
  case STYLE_DOUBLE:
7871
- return '"' + escapeString(string, lineWidth) + '"';
8225
+ return '"' + escapeString(string) + '"';
7872
8226
  default:
7873
- throw new YAMLException("impossible error: invalid scalar style");
8227
+ throw new YAMLException2("impossible error: invalid scalar style");
7874
8228
  }
7875
8229
  }();
7876
8230
  }
@@ -7878,9 +8232,11 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7878
8232
  const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
7879
8233
  const clip = string[string.length - 1] === `
7880
8234
  `;
7881
- return indentIndicator + (clip && (string[string.length - 2] === `
8235
+ const keep = clip && (string[string.length - 2] === `
7882
8236
  ` || string === `
7883
- `) ? "+" : clip ? "" : "-") + `
8237
+ `);
8238
+ const chomp = keep ? "+" : clip ? "" : "-";
8239
+ return indentIndicator + chomp + `
7884
8240
  `;
7885
8241
  }
7886
8242
  function dropEndingNewline(string) {
@@ -7932,11 +8288,12 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7932
8288
  }
7933
8289
  result += `
7934
8290
  `;
7935
- if (line.length - start > width && curr > start)
8291
+ if (line.length - start > width && curr > start) {
7936
8292
  result += line.slice(start, curr) + `
7937
8293
  ` + line.slice(curr + 1);
7938
- else
8294
+ } else {
7939
8295
  result += line.slice(start);
8296
+ }
7940
8297
  return result.slice(1);
7941
8298
  }
7942
8299
  function escapeString(string) {
@@ -7949,8 +8306,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7949
8306
  result += string[i];
7950
8307
  if (char >= 65536)
7951
8308
  result += string[i + 1];
7952
- } else
8309
+ } else {
7953
8310
  result += escapeSeq || encodeHex(char);
8311
+ }
7954
8312
  }
7955
8313
  return result;
7956
8314
  }
@@ -7959,8 +8317,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7959
8317
  const _tag = state.tag;
7960
8318
  for (let index = 0, length = object.length;index < length; index += 1) {
7961
8319
  let value = object[index];
7962
- if (state.replacer)
8320
+ if (state.replacer) {
7963
8321
  value = state.replacer.call(object, String(index), value);
8322
+ }
7964
8323
  if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
7965
8324
  if (_result !== "")
7966
8325
  _result += "," + (!state.condenseFlow ? " " : "");
@@ -7975,15 +8334,18 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
7975
8334
  const _tag = state.tag;
7976
8335
  for (let index = 0, length = object.length;index < length; index += 1) {
7977
8336
  let value = object[index];
7978
- if (state.replacer)
8337
+ if (state.replacer) {
7979
8338
  value = state.replacer.call(object, String(index), value);
8339
+ }
7980
8340
  if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
7981
- if (!compact || _result !== "")
8341
+ if (!compact || _result !== "") {
7982
8342
  _result += generateNextLine(state, level);
7983
- if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
8343
+ }
8344
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
7984
8345
  _result += "-";
7985
- else
8346
+ } else {
7986
8347
  _result += "- ";
8348
+ }
7987
8349
  _result += state.dump;
7988
8350
  }
7989
8351
  }
@@ -8002,15 +8364,18 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8002
8364
  pairBuffer += '"';
8003
8365
  const objectKey = objectKeyList[index];
8004
8366
  let objectValue = object[objectKey];
8005
- if (state.replacer)
8367
+ if (state.replacer) {
8006
8368
  objectValue = state.replacer.call(object, objectKey, objectValue);
8007
- if (!writeNode(state, level, objectKey, false, false))
8369
+ }
8370
+ if (!writeNode(state, level, objectKey, false, false)) {
8008
8371
  continue;
8372
+ }
8009
8373
  if (state.dump.length > 1024)
8010
8374
  pairBuffer += "? ";
8011
8375
  pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
8012
- if (!writeNode(state, level, objectValue, false, false))
8376
+ if (!writeNode(state, level, objectValue, false, false)) {
8013
8377
  continue;
8378
+ }
8014
8379
  pairBuffer += state.dump;
8015
8380
  _result += pairBuffer;
8016
8381
  }
@@ -8021,37 +8386,46 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8021
8386
  let _result = "";
8022
8387
  const _tag = state.tag;
8023
8388
  const objectKeyList = Object.keys(object);
8024
- if (state.sortKeys === true)
8389
+ if (state.sortKeys === true) {
8025
8390
  objectKeyList.sort();
8026
- else if (typeof state.sortKeys === "function")
8391
+ } else if (typeof state.sortKeys === "function") {
8027
8392
  objectKeyList.sort(state.sortKeys);
8028
- else if (state.sortKeys)
8029
- throw new YAMLException("sortKeys must be a boolean or a function");
8393
+ } else if (state.sortKeys) {
8394
+ throw new YAMLException2("sortKeys must be a boolean or a function");
8395
+ }
8030
8396
  for (let index = 0, length = objectKeyList.length;index < length; index += 1) {
8031
8397
  let pairBuffer = "";
8032
- if (!compact || _result !== "")
8398
+ if (!compact || _result !== "") {
8033
8399
  pairBuffer += generateNextLine(state, level);
8400
+ }
8034
8401
  const objectKey = objectKeyList[index];
8035
8402
  let objectValue = object[objectKey];
8036
- if (state.replacer)
8403
+ if (state.replacer) {
8037
8404
  objectValue = state.replacer.call(object, objectKey, objectValue);
8038
- if (!writeNode(state, level + 1, objectKey, true, true, true))
8405
+ }
8406
+ if (!writeNode(state, level + 1, objectKey, true, true, true)) {
8039
8407
  continue;
8408
+ }
8040
8409
  const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
8041
- if (explicitPair)
8042
- if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
8410
+ if (explicitPair) {
8411
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
8043
8412
  pairBuffer += "?";
8044
- else
8413
+ } else {
8045
8414
  pairBuffer += "? ";
8415
+ }
8416
+ }
8046
8417
  pairBuffer += state.dump;
8047
- if (explicitPair)
8418
+ if (explicitPair) {
8048
8419
  pairBuffer += generateNextLine(state, level);
8049
- if (!writeNode(state, level + 1, objectValue, true, explicitPair))
8420
+ }
8421
+ if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
8050
8422
  continue;
8051
- if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
8423
+ }
8424
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
8052
8425
  pairBuffer += ":";
8053
- else
8426
+ } else {
8054
8427
  pairBuffer += ": ";
8428
+ }
8055
8429
  pairBuffer += state.dump;
8056
8430
  _result += pairBuffer;
8057
8431
  }
@@ -8061,24 +8435,27 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8061
8435
  function detectType(state, object, explicit) {
8062
8436
  const typeList = explicit ? state.explicitTypes : state.implicitTypes;
8063
8437
  for (let index = 0, length = typeList.length;index < length; index += 1) {
8064
- const type = typeList[index];
8065
- if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
8066
- if (explicit)
8067
- if (type.multi && type.representName)
8068
- state.tag = type.representName(object);
8069
- else
8070
- state.tag = type.tag;
8071
- else
8438
+ const type2 = typeList[index];
8439
+ if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) {
8440
+ if (explicit) {
8441
+ if (type2.multi && type2.representName) {
8442
+ state.tag = type2.representName(object);
8443
+ } else {
8444
+ state.tag = type2.tag;
8445
+ }
8446
+ } else {
8072
8447
  state.tag = "?";
8073
- if (type.represent) {
8074
- const style = state.styleMap[type.tag] || type.defaultStyle;
8448
+ }
8449
+ if (type2.represent) {
8450
+ const style = state.styleMap[type2.tag] || type2.defaultStyle;
8075
8451
  let _result;
8076
- if (_toString.call(type.represent) === "[object Function]")
8077
- _result = type.represent(object, style);
8078
- else if (_hasOwnProperty.call(type.represent, style))
8079
- _result = type.represent[style](object, style);
8080
- else
8081
- throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
8452
+ if (_toString.call(type2.represent) === "[object Function]") {
8453
+ _result = type2.represent(object, style);
8454
+ } else if (_hasOwnProperty.call(type2.represent, style)) {
8455
+ _result = type2.represent[style](object, style);
8456
+ } else {
8457
+ throw new YAMLException2("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style');
8458
+ }
8082
8459
  state.dump = _result;
8083
8460
  }
8084
8461
  return true;
@@ -8089,67 +8466,78 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8089
8466
  function writeNode(state, level, object, block, compact, iskey, isblockseq) {
8090
8467
  state.tag = null;
8091
8468
  state.dump = object;
8092
- if (!detectType(state, object, false))
8469
+ if (!detectType(state, object, false)) {
8093
8470
  detectType(state, object, true);
8094
- const type = _toString.call(state.dump);
8471
+ }
8472
+ const type2 = _toString.call(state.dump);
8095
8473
  const inblock = block;
8096
- if (block)
8474
+ if (block) {
8097
8475
  block = state.flowLevel < 0 || state.flowLevel > level;
8098
- const objectOrArray = type === "[object Object]" || type === "[object Array]";
8476
+ }
8477
+ const objectOrArray = type2 === "[object Object]" || type2 === "[object Array]";
8099
8478
  let duplicateIndex;
8100
8479
  let duplicate;
8101
8480
  if (objectOrArray) {
8102
8481
  duplicateIndex = state.duplicates.indexOf(object);
8103
8482
  duplicate = duplicateIndex !== -1;
8104
8483
  }
8105
- if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0)
8484
+ if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
8106
8485
  compact = false;
8107
- if (duplicate && state.usedDuplicates[duplicateIndex])
8486
+ }
8487
+ if (duplicate && state.usedDuplicates[duplicateIndex]) {
8108
8488
  state.dump = "*ref_" + duplicateIndex;
8109
- else {
8110
- if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex])
8489
+ } else {
8490
+ if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
8111
8491
  state.usedDuplicates[duplicateIndex] = true;
8112
- if (type === "[object Object]")
8492
+ }
8493
+ if (type2 === "[object Object]") {
8113
8494
  if (block && Object.keys(state.dump).length !== 0) {
8114
8495
  writeBlockMapping(state, level, state.dump, compact);
8115
- if (duplicate)
8496
+ if (duplicate) {
8116
8497
  state.dump = "&ref_" + duplicateIndex + state.dump;
8498
+ }
8117
8499
  } else {
8118
8500
  writeFlowMapping(state, level, state.dump);
8119
- if (duplicate)
8501
+ if (duplicate) {
8120
8502
  state.dump = "&ref_" + duplicateIndex + " " + state.dump;
8503
+ }
8121
8504
  }
8122
- else if (type === "[object Array]")
8505
+ } else if (type2 === "[object Array]") {
8123
8506
  if (block && state.dump.length !== 0) {
8124
- if (state.noArrayIndent && !isblockseq && level > 0)
8507
+ if (state.noArrayIndent && !isblockseq && level > 0) {
8125
8508
  writeBlockSequence(state, level - 1, state.dump, compact);
8126
- else
8509
+ } else {
8127
8510
  writeBlockSequence(state, level, state.dump, compact);
8128
- if (duplicate)
8511
+ }
8512
+ if (duplicate) {
8129
8513
  state.dump = "&ref_" + duplicateIndex + state.dump;
8514
+ }
8130
8515
  } else {
8131
8516
  writeFlowSequence(state, level, state.dump);
8132
- if (duplicate)
8517
+ if (duplicate) {
8133
8518
  state.dump = "&ref_" + duplicateIndex + " " + state.dump;
8519
+ }
8134
8520
  }
8135
- else if (type === "[object String]") {
8136
- if (state.tag !== "?")
8521
+ } else if (type2 === "[object String]") {
8522
+ if (state.tag !== "?") {
8137
8523
  writeScalar(state, state.dump, level, iskey, inblock);
8138
- } else if (type === "[object Undefined]")
8524
+ }
8525
+ } else if (type2 === "[object Undefined]") {
8139
8526
  return false;
8140
- else {
8527
+ } else {
8141
8528
  if (state.skipInvalid)
8142
8529
  return false;
8143
- throw new YAMLException("unacceptable kind of an object to dump " + type);
8530
+ throw new YAMLException2("unacceptable kind of an object to dump " + type2);
8144
8531
  }
8145
8532
  if (state.tag !== null && state.tag !== "?") {
8146
8533
  let tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
8147
- if (state.tag[0] === "!")
8534
+ if (state.tag[0] === "!") {
8148
8535
  tagStr = "!" + tagStr;
8149
- else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:")
8536
+ } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
8150
8537
  tagStr = "!!" + tagStr.slice(18);
8151
- else
8538
+ } else {
8152
8539
  tagStr = "!<" + tagStr + ">";
8540
+ }
8153
8541
  state.dump = tagStr + " " + state.dump;
8154
8542
  }
8155
8543
  }
@@ -8160,83 +8548,110 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8160
8548
  const duplicatesIndexes = [];
8161
8549
  inspectNode(object, objects, duplicatesIndexes);
8162
8550
  const length = duplicatesIndexes.length;
8163
- for (let index = 0;index < length; index += 1)
8551
+ for (let index = 0;index < length; index += 1) {
8164
8552
  state.duplicates.push(objects[duplicatesIndexes[index]]);
8553
+ }
8165
8554
  state.usedDuplicates = new Array(length);
8166
8555
  }
8167
8556
  function inspectNode(object, objects, duplicatesIndexes) {
8168
8557
  if (object !== null && typeof object === "object") {
8169
8558
  const index = objects.indexOf(object);
8170
8559
  if (index !== -1) {
8171
- if (duplicatesIndexes.indexOf(index) === -1)
8560
+ if (duplicatesIndexes.indexOf(index) === -1) {
8172
8561
  duplicatesIndexes.push(index);
8562
+ }
8173
8563
  } else {
8174
8564
  objects.push(object);
8175
- if (Array.isArray(object))
8176
- for (let i = 0, length = object.length;i < length; i += 1)
8565
+ if (Array.isArray(object)) {
8566
+ for (let i = 0, length = object.length;i < length; i += 1) {
8177
8567
  inspectNode(object[i], objects, duplicatesIndexes);
8178
- else {
8568
+ }
8569
+ } else {
8179
8570
  const objectKeyList = Object.keys(object);
8180
- for (let i = 0, length = objectKeyList.length;i < length; i += 1)
8571
+ for (let i = 0, length = objectKeyList.length;i < length; i += 1) {
8181
8572
  inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes);
8573
+ }
8182
8574
  }
8183
8575
  }
8184
8576
  }
8185
8577
  }
8186
- function dump(input, options) {
8578
+ function dump2(input, options) {
8187
8579
  options = options || {};
8188
8580
  const state = new State(options);
8189
8581
  if (!state.noRefs)
8190
8582
  getDuplicateReferences(input, state);
8191
8583
  let value = input;
8192
- if (state.replacer)
8584
+ if (state.replacer) {
8193
8585
  value = state.replacer.call({ "": value }, "", value);
8586
+ }
8194
8587
  if (writeNode(state, 0, value, true, true))
8195
8588
  return state.dump + `
8196
8589
  `;
8197
8590
  return "";
8198
8591
  }
8199
- module.exports.dump = dump;
8200
- });
8201
- var import_js_yaml = /* @__PURE__ */ __toESM2((/* @__PURE__ */ __commonJSMin((exports, module) => {
8202
- var loader = require_loader();
8203
- var dumper = require_dumper();
8592
+ dumper.dump = dump2;
8593
+ return dumper;
8594
+ }
8595
+ var hasRequiredJsYaml;
8596
+ function requireJsYaml() {
8597
+ if (hasRequiredJsYaml)
8598
+ return jsYaml;
8599
+ hasRequiredJsYaml = 1;
8600
+ const loader2 = requireLoader();
8601
+ const dumper2 = requireDumper();
8204
8602
  function renamed(from, to) {
8205
8603
  return function() {
8206
8604
  throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
8207
8605
  };
8208
8606
  }
8209
- module.exports.Type = require_type();
8210
- module.exports.Schema = require_schema();
8211
- module.exports.FAILSAFE_SCHEMA = require_failsafe();
8212
- module.exports.JSON_SCHEMA = require_json();
8213
- module.exports.CORE_SCHEMA = require_core();
8214
- module.exports.DEFAULT_SCHEMA = require_default();
8215
- module.exports.load = loader.load;
8216
- module.exports.loadAll = loader.loadAll;
8217
- module.exports.dump = dumper.dump;
8218
- module.exports.YAMLException = require_exception();
8219
- module.exports.types = {
8220
- binary: require_binary(),
8221
- float: require_float(),
8222
- map: require_map(),
8607
+ jsYaml.Type = requireType();
8608
+ jsYaml.Schema = requireSchema();
8609
+ jsYaml.FAILSAFE_SCHEMA = requireFailsafe();
8610
+ jsYaml.JSON_SCHEMA = requireJson();
8611
+ jsYaml.CORE_SCHEMA = requireCore();
8612
+ jsYaml.DEFAULT_SCHEMA = require_default();
8613
+ jsYaml.load = loader2.load;
8614
+ jsYaml.loadAll = loader2.loadAll;
8615
+ jsYaml.dump = dumper2.dump;
8616
+ jsYaml.YAMLException = requireException();
8617
+ jsYaml.types = {
8618
+ binary: requireBinary(),
8619
+ float: requireFloat(),
8620
+ map: requireMap(),
8223
8621
  null: require_null(),
8224
- pairs: require_pairs(),
8225
- set: require_set(),
8226
- timestamp: require_timestamp(),
8227
- bool: require_bool(),
8228
- int: require_int(),
8229
- merge: require_merge(),
8230
- omap: require_omap(),
8231
- seq: require_seq(),
8232
- str: require_str()
8622
+ pairs: requirePairs(),
8623
+ set: requireSet(),
8624
+ timestamp: requireTimestamp(),
8625
+ bool: requireBool(),
8626
+ int: requireInt(),
8627
+ merge: requireMerge(),
8628
+ omap: requireOmap(),
8629
+ seq: requireSeq(),
8630
+ str: requireStr()
8233
8631
  };
8234
- module.exports.safeLoad = renamed("safeLoad", "load");
8235
- module.exports.safeLoadAll = renamed("safeLoadAll", "loadAll");
8236
- module.exports.safeDump = renamed("safeDump", "dump");
8237
- }))(), 1);
8238
- var { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump } = import_js_yaml.default;
8239
- var index_vite_proxy_tmp_default = import_js_yaml.default;
8632
+ jsYaml.safeLoad = renamed("safeLoad", "load");
8633
+ jsYaml.safeLoadAll = renamed("safeLoadAll", "loadAll");
8634
+ jsYaml.safeDump = renamed("safeDump", "dump");
8635
+ return jsYaml;
8636
+ }
8637
+ var jsYamlExports = requireJsYaml();
8638
+ var yaml = /* @__PURE__ */ getDefaultExportFromCjs(jsYamlExports);
8639
+ var {
8640
+ Type,
8641
+ Schema,
8642
+ FAILSAFE_SCHEMA,
8643
+ JSON_SCHEMA,
8644
+ CORE_SCHEMA,
8645
+ DEFAULT_SCHEMA,
8646
+ load,
8647
+ loadAll,
8648
+ dump,
8649
+ YAMLException,
8650
+ types,
8651
+ safeLoad,
8652
+ safeLoadAll,
8653
+ safeDump
8654
+ } = yaml;
8240
8655
 
8241
8656
  // src/logger.ts
8242
8657
  var logFilePathSlot = singleton("logFilePath");
@@ -8319,11 +8734,11 @@ class SimpleLogger {
8319
8734
  const path3 = this.logFilePath || getGlobalLogFilePath();
8320
8735
  if (!path3)
8321
8736
  return;
8322
- const timestamp = new Date().toISOString();
8737
+ const timestamp2 = new Date().toISOString();
8323
8738
  this.pendingWrites = Promise.all([
8324
8739
  this.pendingWrites,
8325
8740
  this.pendingInit
8326
- ]).then(() => getFileSystem().appendFile(path3, `${timestamp} ${formatted}`).catch(() => {}));
8741
+ ]).then(() => getFileSystem().appendFile(path3, `${timestamp2} ${formatted}`).catch(() => {}));
8327
8742
  }
8328
8743
  debug(message, ...args) {
8329
8744
  if (this.level > 0 /* DEBUG */)
@@ -8456,6 +8871,7 @@ function configureLogger(config) {
8456
8871
  // src/output-format-context.ts
8457
8872
  var formatSlot = singleton("OutputFormat");
8458
8873
  var formatExplicitSlot = singleton("OutputFormatExplicit");
8874
+ var helpRequestedSlot = singleton("HelpRequested");
8459
8875
  var filterSlot = singleton("OutputFilter");
8460
8876
  function setOutputFormat(format) {
8461
8877
  formatSlot.set(format);
@@ -8469,6 +8885,12 @@ function setOutputFormatExplicit(explicit) {
8469
8885
  function getOutputFormatExplicit() {
8470
8886
  return formatExplicitSlot.get(false) ?? false;
8471
8887
  }
8888
+ function setHelpRequested(requested) {
8889
+ helpRequestedSlot.set(requested);
8890
+ }
8891
+ function getHelpRequested() {
8892
+ return helpRequestedSlot.get(false) ?? false;
8893
+ }
8472
8894
  function setOutputFilter(filter) {
8473
8895
  filterSlot.set(filter);
8474
8896
  }
@@ -8748,10 +9170,10 @@ class LoggerTelemetryProvider {
8748
9170
  success
8749
9171
  })));
8750
9172
  }
8751
- async trackDependency(name, type, duration, success, properties) {
9173
+ async trackDependency(name, type2, duration, success, properties) {
8752
9174
  logger.debug(formatMessage("Dependency", name, this.enrich({
8753
9175
  ...properties,
8754
- type,
9176
+ type: type2,
8755
9177
  duration: `${duration}ms`,
8756
9178
  success
8757
9179
  })));
@@ -8779,8 +9201,8 @@ class DebugTelemetryProvider {
8779
9201
  async trackRequest(name, duration, success, _properties) {
8780
9202
  logger.debug(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
8781
9203
  }
8782
- async trackDependency(name, type, duration, success, _properties) {
8783
- logger.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
9204
+ async trackDependency(name, type2, duration, success, _properties) {
9205
+ logger.debug(`[Telemetry] Dependency: ${name} [${type2}] (${duration}ms, ${success ? "ok" : "fail"})`);
8784
9206
  }
8785
9207
  }
8786
9208
  // src/telemetry/detect-agent.ts
@@ -9005,11 +9427,36 @@ class NodeContextStorage {
9005
9427
  return this.storage.getStore();
9006
9428
  }
9007
9429
  }
9430
+ // src/telemetry/trace-context.ts
9431
+ var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
9432
+ var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
9433
+ function getProcessEnv() {
9434
+ return globalThis.process?.env;
9435
+ }
9436
+ function parseInboundTraceparent(value) {
9437
+ if (!value) {
9438
+ return;
9439
+ }
9440
+ const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
9441
+ if (!match) {
9442
+ return;
9443
+ }
9444
+ const [, traceId, parentSpanId] = match;
9445
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
9446
+ return;
9447
+ }
9448
+ return { traceId, parentSpanId };
9449
+ }
9450
+ function getInboundTraceContext() {
9451
+ return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
9452
+ }
9453
+
9008
9454
  // src/telemetry/session-id.ts
9009
9455
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
9010
9456
  var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
9011
9457
  var telemetrySessionIdSlot = singleton("TelemetrySessionId");
9012
- function getProcessEnv() {
9458
+ var telemetryOperationIdSlot = singleton("TelemetryOperationId");
9459
+ function getProcessEnv2() {
9013
9460
  return globalThis.process?.env;
9014
9461
  }
9015
9462
  function normalizeSessionId(value) {
@@ -9020,7 +9467,7 @@ function normalizeSessionId(value) {
9020
9467
  return trimmed || undefined;
9021
9468
  }
9022
9469
  function getConfiguredTelemetrySessionId() {
9023
- return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
9470
+ return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
9024
9471
  }
9025
9472
  function getTelemetrySessionId() {
9026
9473
  const envSessionId = getConfiguredTelemetrySessionId();
@@ -9038,6 +9485,16 @@ function getTelemetrySessionId() {
9038
9485
  function resolveTelemetrySessionId(existingSessionId) {
9039
9486
  return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
9040
9487
  }
9488
+ function getTelemetryOperationId() {
9489
+ const existing = telemetryOperationIdSlot.get();
9490
+ if (existing) {
9491
+ return existing;
9492
+ }
9493
+ const inboundTraceId = getInboundTraceContext()?.traceId;
9494
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
9495
+ telemetryOperationIdSlot.set(generated);
9496
+ return generated;
9497
+ }
9041
9498
  // src/telemetry/global-telemetry-properties.ts
9042
9499
  var telemetryPropsSlot = singleton("TelemetryDefaultProps");
9043
9500
  function setGlobalTelemetryProperties(properties) {
@@ -9048,7 +9505,144 @@ function getGlobalTelemetryProperties() {
9048
9505
  return telemetryPropsSlot.get();
9049
9506
  }
9050
9507
 
9508
+ // src/telemetry/pii-redactor.ts
9509
+ var REDACTED = "[REDACTED]";
9510
+ var MAX_VALUE_LENGTH = 200;
9511
+ var SENSITIVE_NAME_TOKENS = new Set([
9512
+ "token",
9513
+ "tokens",
9514
+ "secret",
9515
+ "secrets",
9516
+ "password",
9517
+ "passwords",
9518
+ "pwd",
9519
+ "credential",
9520
+ "credentials",
9521
+ "auth",
9522
+ "authentication",
9523
+ "authorization",
9524
+ "authority",
9525
+ "cert",
9526
+ "certificate",
9527
+ "certificates"
9528
+ ]);
9529
+ var SENSITIVE_KEY_PREFIXES = new Set([
9530
+ "api",
9531
+ "access",
9532
+ "client",
9533
+ "private",
9534
+ "public",
9535
+ "signing",
9536
+ "encryption",
9537
+ "session",
9538
+ "master",
9539
+ "shared",
9540
+ "root",
9541
+ "ssh",
9542
+ "rsa",
9543
+ "aes",
9544
+ "hmac",
9545
+ "oauth"
9546
+ ]);
9547
+ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
9548
+ var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
9549
+ var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
9550
+ var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
9551
+ var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
9552
+ var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
9553
+ var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
9554
+ function shortHash(input) {
9555
+ let hash = 2166136261;
9556
+ for (let i = 0;i < input.length; i++) {
9557
+ hash ^= input.charCodeAt(i);
9558
+ hash = Math.imul(hash, 16777619);
9559
+ }
9560
+ return (hash >>> 0).toString(16).padStart(8, "0");
9561
+ }
9562
+ function redactUrl(raw) {
9563
+ try {
9564
+ const url = new URL(raw);
9565
+ return `${url.protocol}//${url.host}`;
9566
+ } catch {
9567
+ return `url#${shortHash(raw)}`;
9568
+ }
9569
+ }
9570
+ function redactValueDetectors(value) {
9571
+ let out = value;
9572
+ out = out.replace(JWT_PATTERN, () => REDACTED);
9573
+ out = out.replace(URL_PATTERN, (match) => {
9574
+ const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
9575
+ const core2 = trailing ? match.slice(0, -trailing.length) : match;
9576
+ return `${redactUrl(core2)}${trailing}`;
9577
+ });
9578
+ out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
9579
+ out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
9580
+ out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
9581
+ out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
9582
+ if (out.length > MAX_VALUE_LENGTH) {
9583
+ out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
9584
+ }
9585
+ return out;
9586
+ }
9587
+ function redactValue(value) {
9588
+ return redactValueDetectors(value);
9589
+ }
9590
+ function redactError(error) {
9591
+ const safe = new Error(redactValueDetectors(error.message ?? ""));
9592
+ safe.name = error.name;
9593
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
9594
+ return safe;
9595
+ }
9596
+ function nameTokens(name) {
9597
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
9598
+ }
9599
+ function isSensitiveName(name) {
9600
+ const tokens = nameTokens(name);
9601
+ for (let i = 0;i < tokens.length; i++) {
9602
+ const token = tokens[i];
9603
+ if (SENSITIVE_NAME_TOKENS.has(token)) {
9604
+ return true;
9605
+ }
9606
+ if (token === "key" || token === "keys") {
9607
+ const prev = tokens[i - 1];
9608
+ if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
9609
+ return true;
9610
+ }
9611
+ }
9612
+ }
9613
+ return false;
9614
+ }
9615
+ function redactProperty(name, value) {
9616
+ if (value === undefined || value === null) {
9617
+ return;
9618
+ }
9619
+ if (isSensitiveName(name)) {
9620
+ return REDACTED;
9621
+ }
9622
+ if (typeof value === "boolean" || typeof value === "number") {
9623
+ return value;
9624
+ }
9625
+ if (typeof value !== "string") {
9626
+ return "[OBJECT]";
9627
+ }
9628
+ return redactValueDetectors(value);
9629
+ }
9630
+ function redactProperties(properties) {
9631
+ const out = {};
9632
+ for (const [name, value] of Object.entries(properties)) {
9633
+ const redacted = redactProperty(name, value);
9634
+ if (redacted !== undefined) {
9635
+ out[name] = redacted;
9636
+ }
9637
+ }
9638
+ return out;
9639
+ }
9640
+
9051
9641
  // src/telemetry/telemetry-service.ts
9642
+ var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
9643
+ var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
9644
+ var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
9645
+
9052
9646
  class TelemetryService {
9053
9647
  telemetryProvider;
9054
9648
  contextStorage;
@@ -9075,11 +9669,15 @@ class TelemetryService {
9075
9669
  trackException(error, properties) {
9076
9670
  const context = this.getCurrentContext();
9077
9671
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
9078
- this.telemetryProvider.trackException(error, enrichedProperties);
9672
+ this.telemetryProvider.trackException(redactError(error), enrichedProperties);
9079
9673
  }
9080
9674
  async trackRequest(name, fn, properties) {
9675
+ const parentContext = this.getCurrentContext();
9676
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
9677
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
9081
9678
  const context = {
9082
- operationId: this.operationId ?? this.generateId(),
9679
+ operationId,
9680
+ ...parentId !== undefined ? { parentId } : {},
9083
9681
  id: this.generateId()
9084
9682
  };
9085
9683
  const startTime = performance.now();
@@ -9097,7 +9695,46 @@ class TelemetryService {
9097
9695
  throw error;
9098
9696
  }
9099
9697
  }
9100
- async trackDependencyOperation(name, type, fn, properties) {
9698
+ trackRequestResult(name, durationMs, success, properties, context) {
9699
+ const requestContext = context ?? {
9700
+ operationId: this.operationId ?? getTelemetryOperationId(),
9701
+ id: this.generateId()
9702
+ };
9703
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
9704
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
9705
+ }
9706
+ createRequestContext() {
9707
+ const operationId = this.operationId ?? getTelemetryOperationId();
9708
+ const parentId = this.inboundParentIdFor(operationId);
9709
+ return {
9710
+ operationId,
9711
+ ...parentId !== undefined ? { parentId } : {},
9712
+ id: this.generateId()
9713
+ };
9714
+ }
9715
+ inboundParentIdFor(operationId) {
9716
+ const inbound = getInboundTraceContext();
9717
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
9718
+ }
9719
+ runWithContext(context, fn) {
9720
+ return this.contextStorage.run(context, fn);
9721
+ }
9722
+ createDependencyContext() {
9723
+ const parentContext = this.getCurrentContext();
9724
+ if (!parentContext) {
9725
+ return;
9726
+ }
9727
+ return {
9728
+ operationId: parentContext.operationId,
9729
+ parentId: parentContext.id,
9730
+ id: this.generateId()
9731
+ };
9732
+ }
9733
+ trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
9734
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
9735
+ this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
9736
+ }
9737
+ async trackDependencyOperation(name, type2, fn, properties) {
9101
9738
  const parentContext = this.getCurrentContext();
9102
9739
  if (!parentContext) {
9103
9740
  throw new Error("trackDependencyOperation must be called within a trackRequest block.");
@@ -9112,13 +9749,13 @@ class TelemetryService {
9112
9749
  const result = await this.contextStorage.run(childContext, fn);
9113
9750
  const durationMs = performance.now() - startTime;
9114
9751
  const enrichedProperties = this.enrichPropertiesWithContext(properties, childContext);
9115
- await this.telemetryProvider.trackDependency(name, type, durationMs, true, enrichedProperties);
9752
+ await this.telemetryProvider.trackDependency(name, type2, durationMs, true, enrichedProperties);
9116
9753
  return result;
9117
9754
  } catch (error) {
9118
9755
  const durationMs = performance.now() - startTime;
9119
9756
  const err = error instanceof Error ? error : new Error(String(error));
9120
9757
  const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, childContext);
9121
- await this.telemetryProvider.trackDependency(name, type, durationMs, false, enrichedProperties);
9758
+ await this.telemetryProvider.trackDependency(name, type2, durationMs, false, enrichedProperties);
9122
9759
  throw error;
9123
9760
  }
9124
9761
  }
@@ -9133,8 +9770,12 @@ class TelemetryService {
9133
9770
  ...getExecutionContextTelemetryProperties(),
9134
9771
  ...globalProperties,
9135
9772
  ...this.defaultProperties,
9136
- ...properties,
9137
- ...context
9773
+ ...redactProperties(properties ?? {}),
9774
+ ...context ? {
9775
+ [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
9776
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
9777
+ [TELEMETRY_SPAN_ID_PROPERTY]: context.id
9778
+ } : {}
9138
9779
  };
9139
9780
  if (sessionId === undefined) {
9140
9781
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
@@ -9144,8 +9785,83 @@ class TelemetryService {
9144
9785
  return enriched;
9145
9786
  }
9146
9787
  generateId() {
9147
- return crypto.randomUUID().replaceAll("-", "");
9788
+ const bytes = new Uint8Array(8);
9789
+ let hex = "";
9790
+ do {
9791
+ crypto.getRandomValues(bytes);
9792
+ hex = "";
9793
+ for (const byte of bytes) {
9794
+ hex += byte.toString(16).padStart(2, "0");
9795
+ }
9796
+ } while (/^0+$/.test(hex));
9797
+ return hex;
9798
+ }
9799
+ }
9800
+ // src/telemetry/tracked-fetch.ts
9801
+ var W3C_TRACE_FLAGS_SAMPLED = "01";
9802
+ function makeTrackedFetch(realFetch) {
9803
+ return async (input, init) => {
9804
+ const context = telemetry.createDependencyContext();
9805
+ const url = resolveUrl(input);
9806
+ if (!context || !url) {
9807
+ return realFetch(input, init);
9808
+ }
9809
+ const method = resolveMethod(input, init).toUpperCase();
9810
+ const headers = mergeHeaders(input, init);
9811
+ if (!headers.has("traceparent")) {
9812
+ headers.set("traceparent", `00-${context.operationId}-${context.id}-${W3C_TRACE_FLAGS_SAMPLED}`);
9813
+ }
9814
+ const name = `${method} ${url.pathname}`;
9815
+ const startTime = performance.now();
9816
+ try {
9817
+ const response = await realFetch(input, { ...init, headers });
9818
+ telemetry.trackDependencyResult(name, "HTTP", performance.now() - startTime, response.ok, {
9819
+ "server.address": url.host,
9820
+ "http.request.method": method,
9821
+ "http.response.status_code": response.status
9822
+ }, context, String(response.status));
9823
+ return response;
9824
+ } catch (error) {
9825
+ telemetry.trackDependencyResult(name, "HTTP", performance.now() - startTime, false, {
9826
+ "server.address": url.host,
9827
+ "http.request.method": method,
9828
+ errorMessage: error instanceof Error ? error.message : String(error)
9829
+ }, context);
9830
+ throw error;
9831
+ }
9832
+ };
9833
+ }
9834
+ function resolveUrl(input) {
9835
+ try {
9836
+ if (typeof input === "string")
9837
+ return new URL(input);
9838
+ if (input instanceof URL)
9839
+ return input;
9840
+ if (input instanceof Request)
9841
+ return new URL(input.url);
9842
+ } catch {}
9843
+ return;
9844
+ }
9845
+ function resolveMethod(input, init) {
9846
+ if (init?.method)
9847
+ return init.method;
9848
+ if (input instanceof Request)
9849
+ return input.method;
9850
+ return "GET";
9851
+ }
9852
+ function mergeHeaders(input, init) {
9853
+ const headers = new Headers;
9854
+ if (input instanceof Request) {
9855
+ input.headers.forEach((value, key) => {
9856
+ headers.set(key, value);
9857
+ });
9148
9858
  }
9859
+ if (init?.headers) {
9860
+ new Headers(init.headers).forEach((value, key) => {
9861
+ headers.set(key, value);
9862
+ });
9863
+ }
9864
+ return headers;
9149
9865
  }
9150
9866
  // src/telemetry/node-appinsights-telemetry-provider.ts
9151
9867
  var providerSlot = singleton("TelemetryProvider");
@@ -9292,6 +10008,57 @@ class NodeAppInsightsTelemetryProvider {
9292
10008
  ...properties
9293
10009
  };
9294
10010
  }
10011
+ consumeCorrelation(properties) {
10012
+ const operationId = properties?.[TELEMETRY_OPERATION_ID_PROPERTY] || getTelemetryOperationId();
10013
+ const parentId = properties?.[TELEMETRY_PARENT_ID_PROPERTY];
10014
+ const spanId = properties?.[TELEMETRY_SPAN_ID_PROPERTY];
10015
+ if (properties) {
10016
+ delete properties[TELEMETRY_OPERATION_ID_PROPERTY];
10017
+ delete properties[TELEMETRY_PARENT_ID_PROPERTY];
10018
+ delete properties[TELEMETRY_SPAN_ID_PROPERTY];
10019
+ }
10020
+ return { operationId, parentId, spanId };
10021
+ }
10022
+ promoteSessionTag(merged, tags) {
10023
+ const client = this.client;
10024
+ if (!client || !merged)
10025
+ return;
10026
+ const sessionId = merged[TELEMETRY_SESSION_ID_PROPERTY];
10027
+ delete merged[TELEMETRY_SESSION_ID_PROPERTY];
10028
+ if (sessionId) {
10029
+ tags[client.context.keys.sessionId] = sessionId;
10030
+ }
10031
+ }
10032
+ leafTagOverrides(properties) {
10033
+ const client = this.client;
10034
+ if (!client)
10035
+ return;
10036
+ const keys = client.context.keys;
10037
+ const { operationId, spanId } = this.consumeCorrelation(properties);
10038
+ const tags = {
10039
+ [keys.operationId]: operationId
10040
+ };
10041
+ if (spanId) {
10042
+ tags[keys.operationParentId] = spanId;
10043
+ }
10044
+ this.promoteSessionTag(properties, tags);
10045
+ return tags;
10046
+ }
10047
+ operationCorrelation(properties) {
10048
+ const client = this.client;
10049
+ if (!client)
10050
+ return { tagOverrides: undefined, id: undefined };
10051
+ const keys = client.context.keys;
10052
+ const { operationId, parentId, spanId } = this.consumeCorrelation(properties);
10053
+ const tagOverrides = {
10054
+ [keys.operationId]: operationId
10055
+ };
10056
+ if (parentId) {
10057
+ tagOverrides[keys.operationParentId] = parentId;
10058
+ }
10059
+ this.promoteSessionTag(properties, tagOverrides);
10060
+ return { tagOverrides, id: spanId };
10061
+ }
9295
10062
  async trackEvent(eventName, properties) {
9296
10063
  const client = this.client;
9297
10064
  if (!client)
@@ -9299,7 +10066,8 @@ class NodeAppInsightsTelemetryProvider {
9299
10066
  const merged = this.mergeProperties(properties);
9300
10067
  const [error] = catchError(() => client.trackEvent({
9301
10068
  name: eventName,
9302
- properties: merged
10069
+ properties: merged,
10070
+ tagOverrides: this.leafTagOverrides(merged)
9303
10071
  }));
9304
10072
  if (error) {
9305
10073
  logger.debug(`[AppInsights] trackEvent failed for: ${eventName}`);
@@ -9312,7 +10080,8 @@ class NodeAppInsightsTelemetryProvider {
9312
10080
  const merged = this.mergeProperties(properties);
9313
10081
  const [trackError] = catchError(() => client.trackException({
9314
10082
  exception: error,
9315
- properties: merged
10083
+ properties: merged,
10084
+ tagOverrides: this.leafTagOverrides(merged)
9316
10085
  }));
9317
10086
  if (trackError) {
9318
10087
  logger.debug(`[AppInsights] trackException failed for: ${error.message}`);
@@ -9323,31 +10092,40 @@ class NodeAppInsightsTelemetryProvider {
9323
10092
  if (!client)
9324
10093
  return;
9325
10094
  const merged = this.mergeProperties(properties);
10095
+ const { tagOverrides, id } = this.operationCorrelation(merged);
9326
10096
  const [trackError] = catchError(() => client.trackRequest({
9327
10097
  name,
9328
10098
  url: toOperationUrn(name),
9329
10099
  duration,
9330
10100
  resultCode: success ? "200" : "500",
9331
10101
  success,
9332
- properties: merged
10102
+ ...id ? { id } : {},
10103
+ properties: merged,
10104
+ tagOverrides
9333
10105
  }));
9334
10106
  if (trackError) {
9335
10107
  logger.debug(`[AppInsights] trackRequest failed for: ${name}`);
9336
10108
  }
9337
10109
  }
9338
- async trackDependency(name, type, duration, success, properties) {
10110
+ async trackDependency(name, type2, duration, success, properties, resultCode) {
9339
10111
  const client = this.client;
9340
10112
  if (!client)
9341
10113
  return;
9342
10114
  const merged = this.mergeProperties(properties);
9343
- client.trackDependency({
10115
+ const { tagOverrides, id } = this.operationCorrelation(merged);
10116
+ const [trackError] = catchError(() => client.trackDependency({
9344
10117
  name,
9345
- dependencyTypeName: type,
10118
+ dependencyTypeName: type2,
9346
10119
  duration,
9347
- resultCode: success ? "200" : "500",
10120
+ resultCode: resultCode ?? (success ? "200" : "500"),
9348
10121
  success,
9349
- properties: merged
9350
- });
10122
+ ...id ? { id } : {},
10123
+ properties: merged,
10124
+ tagOverrides
10125
+ }));
10126
+ if (trackError) {
10127
+ logger.debug(`[AppInsights] trackDependency failed for: ${name}`);
10128
+ }
9351
10129
  }
9352
10130
  async flush() {
9353
10131
  const client = this.client;
@@ -9738,8 +10516,8 @@ function printOutput(data, format = "json", logFn, asciiSafe = false) {
9738
10516
  }
9739
10517
  switch (format) {
9740
10518
  case "json": {
9741
- const json = JSON.stringify(data, null, 2);
9742
- logFn(asciiSafe ? escapeNonAscii(json) : json);
10519
+ const json2 = JSON.stringify(data, null, 2);
10520
+ logFn(asciiSafe ? escapeNonAscii(json2) : json2);
9743
10521
  break;
9744
10522
  }
9745
10523
  case "yaml":
@@ -10073,6 +10851,9 @@ var OutputFormatter;
10073
10851
  if (opts?.warning) {
10074
10852
  data.Warning = opts.warning;
10075
10853
  }
10854
+ if (opts?.pagination) {
10855
+ data.Pagination = opts.pagination;
10856
+ }
10076
10857
  success(data);
10077
10858
  }
10078
10859
  OutputFormatter.emitList = emitList;
@@ -10081,8 +10862,8 @@ var OutputFormatter;
10081
10862
  const sink = getOutputSink();
10082
10863
  const normalized = toPascalCaseData(data);
10083
10864
  if (format === "json") {
10084
- const json = JSON.stringify(normalized);
10085
- const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json) : json;
10865
+ const json2 = JSON.stringify(normalized);
10866
+ const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json2) : json2;
10086
10867
  sink.writeErr(`${safe}
10087
10868
  `);
10088
10869
  } else {
@@ -10280,134 +11061,11 @@ function buildSkillEventTelemetryAttribution(skillSource, uipSubcommand) {
10280
11061
  };
10281
11062
  }
10282
11063
 
10283
- // src/telemetry/pii-redactor.ts
10284
- var REDACTED = "[REDACTED]";
10285
- var MAX_VALUE_LENGTH = 200;
10286
- var SENSITIVE_NAME_TOKENS = new Set([
10287
- "token",
10288
- "tokens",
10289
- "secret",
10290
- "secrets",
10291
- "password",
10292
- "passwords",
10293
- "pwd",
10294
- "credential",
10295
- "credentials",
10296
- "auth",
10297
- "authentication",
10298
- "authorization",
10299
- "authority",
10300
- "cert",
10301
- "certificate",
10302
- "certificates"
10303
- ]);
10304
- var SENSITIVE_KEY_PREFIXES = new Set([
10305
- "api",
10306
- "access",
10307
- "client",
10308
- "private",
10309
- "public",
10310
- "signing",
10311
- "encryption",
10312
- "session",
10313
- "master",
10314
- "shared",
10315
- "root",
10316
- "ssh",
10317
- "rsa",
10318
- "aes",
10319
- "hmac",
10320
- "oauth"
10321
- ]);
10322
- var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
10323
- var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
10324
- var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
10325
- var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
10326
- var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
10327
- var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
10328
- var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
10329
- function shortHash(input) {
10330
- let hash = 2166136261;
10331
- for (let i = 0;i < input.length; i++) {
10332
- hash ^= input.charCodeAt(i);
10333
- hash = Math.imul(hash, 16777619);
10334
- }
10335
- return (hash >>> 0).toString(16).padStart(8, "0");
10336
- }
10337
- function redactUrl(raw) {
10338
- try {
10339
- const url = new URL(raw);
10340
- return `${url.protocol}//${url.host}`;
10341
- } catch {
10342
- return `url#${shortHash(raw)}`;
10343
- }
10344
- }
10345
- function redactValueDetectors(value) {
10346
- let out = value;
10347
- out = out.replace(JWT_PATTERN, () => REDACTED);
10348
- out = out.replace(URL_PATTERN, (match) => {
10349
- const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
10350
- const core = trailing ? match.slice(0, -trailing.length) : match;
10351
- return `${redactUrl(core)}${trailing}`;
10352
- });
10353
- out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
10354
- out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
10355
- out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
10356
- out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
10357
- if (out.length > MAX_VALUE_LENGTH) {
10358
- out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
10359
- }
10360
- return out;
10361
- }
10362
- function nameTokens(name) {
10363
- return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t) => t.toLowerCase()).filter(Boolean);
10364
- }
10365
- function isSensitiveName(name) {
10366
- const tokens = nameTokens(name);
10367
- for (let i = 0;i < tokens.length; i++) {
10368
- const token = tokens[i];
10369
- if (SENSITIVE_NAME_TOKENS.has(token)) {
10370
- return true;
10371
- }
10372
- if (token === "key" || token === "keys") {
10373
- const prev = tokens[i - 1];
10374
- if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
10375
- return true;
10376
- }
10377
- }
10378
- }
10379
- return false;
10380
- }
10381
- function redactProperty(name, value) {
10382
- if (value === undefined || value === null) {
10383
- return;
10384
- }
10385
- if (isSensitiveName(name)) {
10386
- return REDACTED;
10387
- }
10388
- if (typeof value === "boolean" || typeof value === "number") {
10389
- return value;
10390
- }
10391
- if (typeof value !== "string") {
10392
- return "[OBJECT]";
10393
- }
10394
- return redactValueDetectors(value);
10395
- }
10396
- function redactProperties(properties) {
10397
- const out = {};
10398
- for (const [name, value] of Object.entries(properties)) {
10399
- const redacted = redactProperty(name, value);
10400
- if (redacted !== undefined) {
10401
- out[name] = redacted;
10402
- }
10403
- }
10404
- return out;
10405
- }
10406
-
10407
11064
  // src/trackedAction.ts
10408
11065
  var pollSignalSlot = singleton("PollSignal");
10409
11066
  var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
10410
11067
  var retryHintValues = new Set(RETRY_HINTS);
11068
+ var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
10411
11069
  var processContext = {
10412
11070
  exit: (code) => {
10413
11071
  process.exitCode = code;
@@ -10421,22 +11079,18 @@ function setProcessContextPollSignal(signal) {
10421
11079
  }
10422
11080
  function extractCommandParams(cmd) {
10423
11081
  const params = {};
11082
+ const add2 = (name, value) => {
11083
+ if (name && value !== undefined) {
11084
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
11085
+ }
11086
+ };
10424
11087
  const registered = cmd.registeredArguments ?? [];
10425
11088
  const processed = cmd.processedArgs ?? [];
10426
11089
  for (let i = 0;i < registered.length; i++) {
10427
- const value = processed[i];
10428
- if (value === undefined) {
10429
- continue;
10430
- }
10431
- const name = registered[i].name();
10432
- if (name) {
10433
- params[name] = value;
10434
- }
11090
+ add2(registered[i].name(), processed[i]);
10435
11091
  }
10436
11092
  for (const [key, value] of Object.entries(cmd.opts())) {
10437
- if (value !== undefined) {
10438
- params[key] = value;
10439
- }
11093
+ add2(key, value);
10440
11094
  }
10441
11095
  return params;
10442
11096
  }
@@ -10479,11 +11133,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
10479
11133
  return this.action(async (...args) => {
10480
11134
  const telemetryName = deriveCommandPath(command);
10481
11135
  const props = typeof properties === "function" ? properties(...args) : properties;
11136
+ const requestContext = telemetry.createRequestContext();
10482
11137
  const startTime = performance.now();
10483
11138
  let errorMessage;
10484
11139
  let fallbackExitCode = EXIT_CODES.Success;
10485
11140
  clearRecordedCommandFailureTelemetry();
10486
- const [error] = await catchError(fn(...args));
11141
+ const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
10487
11142
  if (error) {
10488
11143
  errorMessage = error instanceof Error ? error.message : String(error);
10489
11144
  logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
@@ -10519,16 +11174,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
10519
11174
  recordedFailure,
10520
11175
  pollSignal: context.pollSignal
10521
11176
  });
10522
- telemetry.trackEvent(telemetryName, redactProperties({
10523
- ...extractCommandParams(command),
11177
+ const commandParams = extractCommandParams(command);
11178
+ if (props) {
11179
+ for (const key of Object.keys(props)) {
11180
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
11181
+ }
11182
+ }
11183
+ const baseProperties = redactProperties({
11184
+ ...commandParams,
10524
11185
  ...props,
10525
11186
  ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
10526
11187
  command: "true",
10527
- duration: String(durationMs),
10528
- success: String(success),
10529
11188
  ...terminalTelemetry,
10530
11189
  ...errorMessage ? { errorMessage } : {}
10531
- }));
11190
+ });
11191
+ telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
10532
11192
  });
10533
11193
  };
10534
11194
 
@@ -10730,12 +11390,19 @@ function isGuid(value) {
10730
11390
  }
10731
11391
  // src/interactivity-context.ts
10732
11392
  var modeSlot = singleton("InteractivityMode");
11393
+ var interactiveFlagSlot = singleton("InteractiveFlag");
10733
11394
  function setInteractivityMode(mode) {
10734
11395
  modeSlot.set(mode);
10735
11396
  }
10736
11397
  function getInteractivityMode() {
10737
11398
  return modeSlot.get("auto") ?? "auto";
10738
11399
  }
11400
+ function setInteractiveFlag(passed) {
11401
+ interactiveFlagSlot.set(passed);
11402
+ }
11403
+ function wasInteractiveFlagPassed() {
11404
+ return interactiveFlagSlot.get(false) ?? false;
11405
+ }
10739
11406
  function canPrompt() {
10740
11407
  const mode = getInteractivityMode();
10741
11408
  if (mode === "always") {
@@ -11529,6 +12196,22 @@ async function readStdin() {
11529
12196
  process.stdin.on("error", reject);
11530
12197
  });
11531
12198
  }
12199
+ async function readStdinWithTimeout(timeoutMs) {
12200
+ let timer;
12201
+ const timeout = new Promise((resolve2) => {
12202
+ timer = setTimeout(() => {
12203
+ process.stdin.unref?.();
12204
+ resolve2(null);
12205
+ }, timeoutMs);
12206
+ });
12207
+ try {
12208
+ return await Promise.race([readStdin(), timeout]);
12209
+ } finally {
12210
+ if (timer) {
12211
+ clearTimeout(timer);
12212
+ }
12213
+ }
12214
+ }
11532
12215
  // src/telemetry/browser-context-storage.ts
11533
12216
  class BrowserContextStorage {
11534
12217
  contextStack = [];
@@ -11563,8 +12246,8 @@ class ConsoleTelemetryProvider {
11563
12246
  async trackRequest(name, duration, success, _properties) {
11564
12247
  console.debug(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
11565
12248
  }
11566
- async trackDependency(name, type, duration, success, _properties) {
11567
- console.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
12249
+ async trackDependency(name, type2, duration, success, _properties) {
12250
+ console.debug(`[Telemetry] Dependency: ${name} [${type2}] (${duration}ms, ${success ? "ok" : "fail"})`);
11568
12251
  }
11569
12252
  }
11570
12253
  // src/telemetry/ship-succeeded.ts
@@ -11611,6 +12294,7 @@ async function ensurePackagerFactory(verb) {
11611
12294
  }
11612
12295
  export {
11613
12296
  withCompleter,
12297
+ wasInteractiveFlagPassed,
11614
12298
  warnDeprecatedTenantOption,
11615
12299
  warnDeprecatedOptionAlias,
11616
12300
  validateOutputFilter,
@@ -11628,6 +12312,8 @@ export {
11628
12312
  setOutputFormat,
11629
12313
  setOutputFilter,
11630
12314
  setInteractivityMode,
12315
+ setInteractiveFlag,
12316
+ setHelpRequested,
11631
12317
  setGlobalTelemetryProperties,
11632
12318
  setGlobalSink,
11633
12319
  setGlobalLogFilePath,
@@ -11641,9 +12327,12 @@ export {
11641
12327
  resetLoggerInstance,
11642
12328
  requireConfirmation,
11643
12329
  registerPackageMetadataOptions,
12330
+ redactValue,
11644
12331
  redactProperty,
11645
12332
  redactProperties,
12333
+ redactError,
11646
12334
  recordCommandFailureTelemetry,
12335
+ readStdinWithTimeout,
11647
12336
  readStdin,
11648
12337
  readRegistryValue,
11649
12338
  processContext,
@@ -11653,6 +12342,7 @@ export {
11653
12342
  parseOffset,
11654
12343
  parseNonNegativeInteger,
11655
12344
  parseLimit,
12345
+ parseInboundTraceparent,
11656
12346
  parseBoundedInt,
11657
12347
  parseAttachmentSpec,
11658
12348
  normalizeSkillName,
@@ -11661,6 +12351,7 @@ export {
11661
12351
  msToDuration,
11662
12352
  mapPollFailure,
11663
12353
  mapPackageMetadataOptions,
12354
+ makeTrackedFetch,
11664
12355
  logger,
11665
12356
  isTerminalStatus,
11666
12357
  isTelemetryDisabled,
@@ -11683,11 +12374,14 @@ export {
11683
12374
  getOutputFilter,
11684
12375
  getLogFilePath,
11685
12376
  getInteractivityMode,
12377
+ getInboundTraceContext,
12378
+ getHelpRequested,
11686
12379
  getGlobalLogFilePath,
11687
12380
  getExecutionContextTelemetryProperties,
11688
12381
  getConfiguredTelemetrySessionId,
11689
12382
  getCompleter,
11690
12383
  getCommandExamples,
12384
+ formatErrorChain,
11691
12385
  extractFormatFromArgs,
11692
12386
  extractErrorMessageSync,
11693
12387
  extractErrorMessage,
@@ -11721,8 +12415,13 @@ export {
11721
12415
  addHiddenDeprecatedTenantOption,
11722
12416
  UIPATH_HOME_DIR,
11723
12417
  TelemetryService,
12418
+ TELEMETRY_TRACEPARENT_ENV,
12419
+ TELEMETRY_SPAN_ID_PROPERTY,
11724
12420
  TELEMETRY_SESSION_ID_PROPERTY,
11725
12421
  TELEMETRY_SESSION_ID_ENV,
12422
+ TELEMETRY_PARENT_ID_PROPERTY,
12423
+ TELEMETRY_OPERATION_ID_PROPERTY,
12424
+ TELEMETRY_COMMAND_ARG_PREFIX,
11726
12425
  SuccessOutput,
11727
12426
  ScreenLogger,
11728
12427
  RETRY_HINTS,
@@ -11757,4 +12456,4 @@ export {
11757
12456
  ATTACHMENT_INSTRUCTIONS
11758
12457
  };
11759
12458
 
11760
- //# debugId=619EF92A7A37ECCD64756E2164756E21
12459
+ //# debugId=770AFB2BE9F8C7B964756E2164756E21