@jxsuite/parser 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/serialize.js CHANGED
@@ -5607,17 +5607,364 @@ var init_core = __esm(() => {
5607
5607
  subsetToRegexCache = new WeakMap;
5608
5608
  });
5609
5609
 
5610
+ // ../../node_modules/stringify-entities/lib/util/to-hexadecimal.js
5611
+ function toHexadecimal(code2, next, omit) {
5612
+ const value = "&#x" + code2.toString(16).toUpperCase();
5613
+ return omit && next && !hexadecimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
5614
+ }
5615
+ var hexadecimalRegex;
5616
+ var init_to_hexadecimal = __esm(() => {
5617
+ hexadecimalRegex = /[\dA-Fa-f]/;
5618
+ });
5619
+
5620
+ // ../../node_modules/stringify-entities/lib/util/to-decimal.js
5621
+ function toDecimal(code2, next, omit) {
5622
+ const value = "&#" + String(code2);
5623
+ return omit && next && !decimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
5624
+ }
5625
+ var decimalRegex;
5626
+ var init_to_decimal = __esm(() => {
5627
+ decimalRegex = /\d/;
5628
+ });
5629
+
5630
+ // ../../node_modules/character-entities-html4/index.js
5631
+ var characterEntitiesHtml4;
5632
+ var init_character_entities_html4 = __esm(() => {
5633
+ characterEntitiesHtml4 = {
5634
+ nbsp: " ",
5635
+ iexcl: "¡",
5636
+ cent: "¢",
5637
+ pound: "£",
5638
+ curren: "¤",
5639
+ yen: "¥",
5640
+ brvbar: "¦",
5641
+ sect: "§",
5642
+ uml: "¨",
5643
+ copy: "©",
5644
+ ordf: "ª",
5645
+ laquo: "«",
5646
+ not: "¬",
5647
+ shy: "­",
5648
+ reg: "®",
5649
+ macr: "¯",
5650
+ deg: "°",
5651
+ plusmn: "±",
5652
+ sup2: "²",
5653
+ sup3: "³",
5654
+ acute: "´",
5655
+ micro: "µ",
5656
+ para: "¶",
5657
+ middot: "·",
5658
+ cedil: "¸",
5659
+ sup1: "¹",
5660
+ ordm: "º",
5661
+ raquo: "»",
5662
+ frac14: "¼",
5663
+ frac12: "½",
5664
+ frac34: "¾",
5665
+ iquest: "¿",
5666
+ Agrave: "À",
5667
+ Aacute: "Á",
5668
+ Acirc: "Â",
5669
+ Atilde: "Ã",
5670
+ Auml: "Ä",
5671
+ Aring: "Å",
5672
+ AElig: "Æ",
5673
+ Ccedil: "Ç",
5674
+ Egrave: "È",
5675
+ Eacute: "É",
5676
+ Ecirc: "Ê",
5677
+ Euml: "Ë",
5678
+ Igrave: "Ì",
5679
+ Iacute: "Í",
5680
+ Icirc: "Î",
5681
+ Iuml: "Ï",
5682
+ ETH: "Ð",
5683
+ Ntilde: "Ñ",
5684
+ Ograve: "Ò",
5685
+ Oacute: "Ó",
5686
+ Ocirc: "Ô",
5687
+ Otilde: "Õ",
5688
+ Ouml: "Ö",
5689
+ times: "×",
5690
+ Oslash: "Ø",
5691
+ Ugrave: "Ù",
5692
+ Uacute: "Ú",
5693
+ Ucirc: "Û",
5694
+ Uuml: "Ü",
5695
+ Yacute: "Ý",
5696
+ THORN: "Þ",
5697
+ szlig: "ß",
5698
+ agrave: "à",
5699
+ aacute: "á",
5700
+ acirc: "â",
5701
+ atilde: "ã",
5702
+ auml: "ä",
5703
+ aring: "å",
5704
+ aelig: "æ",
5705
+ ccedil: "ç",
5706
+ egrave: "è",
5707
+ eacute: "é",
5708
+ ecirc: "ê",
5709
+ euml: "ë",
5710
+ igrave: "ì",
5711
+ iacute: "í",
5712
+ icirc: "î",
5713
+ iuml: "ï",
5714
+ eth: "ð",
5715
+ ntilde: "ñ",
5716
+ ograve: "ò",
5717
+ oacute: "ó",
5718
+ ocirc: "ô",
5719
+ otilde: "õ",
5720
+ ouml: "ö",
5721
+ divide: "÷",
5722
+ oslash: "ø",
5723
+ ugrave: "ù",
5724
+ uacute: "ú",
5725
+ ucirc: "û",
5726
+ uuml: "ü",
5727
+ yacute: "ý",
5728
+ thorn: "þ",
5729
+ yuml: "ÿ",
5730
+ fnof: "ƒ",
5731
+ Alpha: "Α",
5732
+ Beta: "Β",
5733
+ Gamma: "Γ",
5734
+ Delta: "Δ",
5735
+ Epsilon: "Ε",
5736
+ Zeta: "Ζ",
5737
+ Eta: "Η",
5738
+ Theta: "Θ",
5739
+ Iota: "Ι",
5740
+ Kappa: "Κ",
5741
+ Lambda: "Λ",
5742
+ Mu: "Μ",
5743
+ Nu: "Ν",
5744
+ Xi: "Ξ",
5745
+ Omicron: "Ο",
5746
+ Pi: "Π",
5747
+ Rho: "Ρ",
5748
+ Sigma: "Σ",
5749
+ Tau: "Τ",
5750
+ Upsilon: "Υ",
5751
+ Phi: "Φ",
5752
+ Chi: "Χ",
5753
+ Psi: "Ψ",
5754
+ Omega: "Ω",
5755
+ alpha: "α",
5756
+ beta: "β",
5757
+ gamma: "γ",
5758
+ delta: "δ",
5759
+ epsilon: "ε",
5760
+ zeta: "ζ",
5761
+ eta: "η",
5762
+ theta: "θ",
5763
+ iota: "ι",
5764
+ kappa: "κ",
5765
+ lambda: "λ",
5766
+ mu: "μ",
5767
+ nu: "ν",
5768
+ xi: "ξ",
5769
+ omicron: "ο",
5770
+ pi: "π",
5771
+ rho: "ρ",
5772
+ sigmaf: "ς",
5773
+ sigma: "σ",
5774
+ tau: "τ",
5775
+ upsilon: "υ",
5776
+ phi: "φ",
5777
+ chi: "χ",
5778
+ psi: "ψ",
5779
+ omega: "ω",
5780
+ thetasym: "ϑ",
5781
+ upsih: "ϒ",
5782
+ piv: "ϖ",
5783
+ bull: "•",
5784
+ hellip: "…",
5785
+ prime: "′",
5786
+ Prime: "″",
5787
+ oline: "‾",
5788
+ frasl: "⁄",
5789
+ weierp: "℘",
5790
+ image: "ℑ",
5791
+ real: "ℜ",
5792
+ trade: "™",
5793
+ alefsym: "ℵ",
5794
+ larr: "←",
5795
+ uarr: "↑",
5796
+ rarr: "→",
5797
+ darr: "↓",
5798
+ harr: "↔",
5799
+ crarr: "↵",
5800
+ lArr: "⇐",
5801
+ uArr: "⇑",
5802
+ rArr: "⇒",
5803
+ dArr: "⇓",
5804
+ hArr: "⇔",
5805
+ forall: "∀",
5806
+ part: "∂",
5807
+ exist: "∃",
5808
+ empty: "∅",
5809
+ nabla: "∇",
5810
+ isin: "∈",
5811
+ notin: "∉",
5812
+ ni: "∋",
5813
+ prod: "∏",
5814
+ sum: "∑",
5815
+ minus: "−",
5816
+ lowast: "∗",
5817
+ radic: "√",
5818
+ prop: "∝",
5819
+ infin: "∞",
5820
+ ang: "∠",
5821
+ and: "∧",
5822
+ or: "∨",
5823
+ cap: "∩",
5824
+ cup: "∪",
5825
+ int: "∫",
5826
+ there4: "∴",
5827
+ sim: "∼",
5828
+ cong: "≅",
5829
+ asymp: "≈",
5830
+ ne: "≠",
5831
+ equiv: "≡",
5832
+ le: "≤",
5833
+ ge: "≥",
5834
+ sub: "⊂",
5835
+ sup: "⊃",
5836
+ nsub: "⊄",
5837
+ sube: "⊆",
5838
+ supe: "⊇",
5839
+ oplus: "⊕",
5840
+ otimes: "⊗",
5841
+ perp: "⊥",
5842
+ sdot: "⋅",
5843
+ lceil: "⌈",
5844
+ rceil: "⌉",
5845
+ lfloor: "⌊",
5846
+ rfloor: "⌋",
5847
+ lang: "〈",
5848
+ rang: "〉",
5849
+ loz: "◊",
5850
+ spades: "♠",
5851
+ clubs: "♣",
5852
+ hearts: "♥",
5853
+ diams: "♦",
5854
+ quot: '"',
5855
+ amp: "&",
5856
+ lt: "<",
5857
+ gt: ">",
5858
+ OElig: "Œ",
5859
+ oelig: "œ",
5860
+ Scaron: "Š",
5861
+ scaron: "š",
5862
+ Yuml: "Ÿ",
5863
+ circ: "ˆ",
5864
+ tilde: "˜",
5865
+ ensp: " ",
5866
+ emsp: " ",
5867
+ thinsp: " ",
5868
+ zwnj: "‌",
5869
+ zwj: "‍",
5870
+ lrm: "‎",
5871
+ rlm: "‏",
5872
+ ndash: "–",
5873
+ mdash: "—",
5874
+ lsquo: "‘",
5875
+ rsquo: "’",
5876
+ sbquo: "‚",
5877
+ ldquo: "“",
5878
+ rdquo: "”",
5879
+ bdquo: "„",
5880
+ dagger: "†",
5881
+ Dagger: "‡",
5882
+ permil: "‰",
5883
+ lsaquo: "‹",
5884
+ rsaquo: "›",
5885
+ euro: "€"
5886
+ };
5887
+ });
5888
+
5889
+ // ../../node_modules/stringify-entities/lib/constant/dangerous.js
5890
+ var dangerous;
5891
+ var init_dangerous = __esm(() => {
5892
+ dangerous = [
5893
+ "cent",
5894
+ "copy",
5895
+ "divide",
5896
+ "gt",
5897
+ "lt",
5898
+ "not",
5899
+ "para",
5900
+ "times"
5901
+ ];
5902
+ });
5903
+
5904
+ // ../../node_modules/stringify-entities/lib/util/to-named.js
5905
+ function toNamed(code2, next, omit, attribute) {
5906
+ const character = String.fromCharCode(code2);
5907
+ if (own5.call(characters, character)) {
5908
+ const name = characters[character];
5909
+ const value = "&" + name;
5910
+ if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next && next !== 61 && notAlphanumericRegex.test(String.fromCharCode(next)))) {
5911
+ return value;
5912
+ }
5913
+ return value + ";";
5914
+ }
5915
+ return "";
5916
+ }
5917
+ var own5, characters, key, notAlphanumericRegex;
5918
+ var init_to_named = __esm(() => {
5919
+ init_character_entities_legacy();
5920
+ init_character_entities_html4();
5921
+ init_dangerous();
5922
+ own5 = {}.hasOwnProperty;
5923
+ characters = {};
5924
+ for (key in characterEntitiesHtml4) {
5925
+ if (own5.call(characterEntitiesHtml4, key)) {
5926
+ characters[characterEntitiesHtml4[key]] = key;
5927
+ }
5928
+ }
5929
+ notAlphanumericRegex = /[^\dA-Za-z]/;
5930
+ });
5931
+
5932
+ // ../../node_modules/stringify-entities/lib/util/format-smart.js
5933
+ function formatSmart(code2, next, options) {
5934
+ let numeric = toHexadecimal(code2, next, options.omitOptionalSemicolons);
5935
+ let named;
5936
+ if (options.useNamedReferences || options.useShortestReferences) {
5937
+ named = toNamed(code2, next, options.omitOptionalSemicolons, options.attribute);
5938
+ }
5939
+ if ((options.useShortestReferences || !named) && options.useShortestReferences) {
5940
+ const decimal = toDecimal(code2, next, options.omitOptionalSemicolons);
5941
+ if (decimal.length < numeric.length) {
5942
+ numeric = decimal;
5943
+ }
5944
+ }
5945
+ return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
5946
+ }
5947
+ var init_format_smart = __esm(() => {
5948
+ init_to_hexadecimal();
5949
+ init_to_decimal();
5950
+ init_to_named();
5951
+ });
5952
+
5610
5953
  // ../../node_modules/stringify-entities/lib/util/format-basic.js
5611
5954
  function formatBasic(code2) {
5612
5955
  return "&#x" + code2.toString(16).toUpperCase() + ";";
5613
5956
  }
5614
5957
 
5615
5958
  // ../../node_modules/stringify-entities/lib/index.js
5959
+ function stringifyEntities(value, options) {
5960
+ return core(value, Object.assign({ format: formatSmart }, options));
5961
+ }
5616
5962
  function stringifyEntitiesLight(value, options) {
5617
5963
  return core(value, Object.assign({ format: formatBasic }, options));
5618
5964
  }
5619
5965
  var init_lib11 = __esm(() => {
5620
5966
  init_core();
5967
+ init_format_smart();
5621
5968
  });
5622
5969
 
5623
5970
  // ../../node_modules/stringify-entities/index.js
@@ -5821,13 +6168,13 @@ function directiveToMarkdown(options) {
5821
6168
  let classesFull;
5822
6169
  let classes;
5823
6170
  let id;
5824
- let key;
5825
- for (key in attributes2) {
5826
- if (own5.call(attributes2, key) && attributes2[key] !== undefined && attributes2[key] !== null) {
5827
- const value = String(attributes2[key]);
5828
- if (key === "id") {
6171
+ let key2;
6172
+ for (key2 in attributes2) {
6173
+ if (own6.call(attributes2, key2) && attributes2[key2] !== undefined && attributes2[key2] !== null) {
6174
+ const value = String(attributes2[key2]);
6175
+ if (key2 === "id") {
5829
6176
  id = settings.preferShortcut !== false && shortcut.test(value) ? "#" + value : quoted("id", value, node2, state);
5830
- } else if (key === "class") {
6177
+ } else if (key2 === "class") {
5831
6178
  const list3 = value.split(/[\t\n\r ]+/g);
5832
6179
  const classesFullList = [];
5833
6180
  const classesList = [];
@@ -5838,7 +6185,7 @@ function directiveToMarkdown(options) {
5838
6185
  classesFull = classesFullList.length > 0 ? quoted("class", classesFullList.join(" "), node2, state) : "";
5839
6186
  classes = classesList.length > 0 ? "." + classesList.join(".") : "";
5840
6187
  } else {
5841
- values2.push(quoted(key, value, node2, state));
6188
+ values2.push(quoted(key2, value, node2, state));
5842
6189
  }
5843
6190
  }
5844
6191
  }
@@ -5853,18 +6200,18 @@ function directiveToMarkdown(options) {
5853
6200
  }
5854
6201
  return values2.length > 0 ? "{" + values2.join(" ") + "}" : "";
5855
6202
  }
5856
- function quoted(key, value, node2, state) {
6203
+ function quoted(key2, value, node2, state) {
5857
6204
  if (settings.collapseEmptyAttributes !== false && !value)
5858
- return key;
6205
+ return key2;
5859
6206
  if (settings.preferUnquoted && unquoted.test(value)) {
5860
- return key + "=" + value;
6207
+ return key2 + "=" + value;
5861
6208
  }
5862
6209
  const preferred = settings.quote || state.options.quote || '"';
5863
6210
  const alternative = preferred === '"' ? "'" : '"';
5864
6211
  const appliedQuote = settings.quoteSmart && ccount(value, preferred) > ccount(value, alternative) ? alternative : preferred;
5865
6212
  const subset = node2.type === "textDirective" ? [appliedQuote] : [appliedQuote, `
5866
6213
  `, "\r"];
5867
- return key + "=" + appliedQuote + stringifyEntitiesLight(value, { subset }) + appliedQuote;
6214
+ return key2 + "=" + appliedQuote + stringifyEntitiesLight(value, { subset }) + appliedQuote;
5868
6215
  }
5869
6216
  }
5870
6217
  function enterContainer(token) {
@@ -5974,13 +6321,13 @@ function fence(node2) {
5974
6321
  }
5975
6322
  return ":".repeat(size);
5976
6323
  }
5977
- var own5, emptyOptions2, shortcut, unquoted;
6324
+ var own6, emptyOptions2, shortcut, unquoted;
5978
6325
  var init_lib13 = __esm(() => {
5979
6326
  init_development();
5980
6327
  init_parse_entities();
5981
6328
  init_stringify_entities();
5982
6329
  init_unist_util_visit_parents2();
5983
- own5 = {}.hasOwnProperty;
6330
+ own6 = {}.hasOwnProperty;
5984
6331
  emptyOptions2 = {};
5985
6332
  shortcut = /^[^\t\n\r "#'.<=>`}]+$/;
5986
6333
  unquoted = /^[^\t\n\r "'<=>`}]+$/;
@@ -12024,11 +12371,11 @@ var require_visit = __commonJS((exports) => {
12024
12371
  visit2.BREAK = BREAK;
12025
12372
  visit2.SKIP = SKIP4;
12026
12373
  visit2.REMOVE = REMOVE;
12027
- function visit_(key, node2, visitor, path2) {
12028
- const ctrl = callVisitor(key, node2, visitor, path2);
12374
+ function visit_(key2, node2, visitor, path2) {
12375
+ const ctrl = callVisitor(key2, node2, visitor, path2);
12029
12376
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
12030
- replaceNode(key, path2, ctrl);
12031
- return visit_(key, ctrl, visitor, path2);
12377
+ replaceNode(key2, path2, ctrl);
12378
+ return visit_(key2, ctrl, visitor, path2);
12032
12379
  }
12033
12380
  if (typeof ctrl !== "symbol") {
12034
12381
  if (identity.isCollection(node2)) {
@@ -12072,11 +12419,11 @@ var require_visit = __commonJS((exports) => {
12072
12419
  visitAsync.BREAK = BREAK;
12073
12420
  visitAsync.SKIP = SKIP4;
12074
12421
  visitAsync.REMOVE = REMOVE;
12075
- async function visitAsync_(key, node2, visitor, path2) {
12076
- const ctrl = await callVisitor(key, node2, visitor, path2);
12422
+ async function visitAsync_(key2, node2, visitor, path2) {
12423
+ const ctrl = await callVisitor(key2, node2, visitor, path2);
12077
12424
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
12078
- replaceNode(key, path2, ctrl);
12079
- return visitAsync_(key, ctrl, visitor, path2);
12425
+ replaceNode(key2, path2, ctrl);
12426
+ return visitAsync_(key2, ctrl, visitor, path2);
12080
12427
  }
12081
12428
  if (typeof ctrl !== "symbol") {
12082
12429
  if (identity.isCollection(node2)) {
@@ -12126,27 +12473,27 @@ var require_visit = __commonJS((exports) => {
12126
12473
  }
12127
12474
  return visitor;
12128
12475
  }
12129
- function callVisitor(key, node2, visitor, path2) {
12476
+ function callVisitor(key2, node2, visitor, path2) {
12130
12477
  if (typeof visitor === "function")
12131
- return visitor(key, node2, path2);
12478
+ return visitor(key2, node2, path2);
12132
12479
  if (identity.isMap(node2))
12133
- return visitor.Map?.(key, node2, path2);
12480
+ return visitor.Map?.(key2, node2, path2);
12134
12481
  if (identity.isSeq(node2))
12135
- return visitor.Seq?.(key, node2, path2);
12482
+ return visitor.Seq?.(key2, node2, path2);
12136
12483
  if (identity.isPair(node2))
12137
- return visitor.Pair?.(key, node2, path2);
12484
+ return visitor.Pair?.(key2, node2, path2);
12138
12485
  if (identity.isScalar(node2))
12139
- return visitor.Scalar?.(key, node2, path2);
12486
+ return visitor.Scalar?.(key2, node2, path2);
12140
12487
  if (identity.isAlias(node2))
12141
- return visitor.Alias?.(key, node2, path2);
12488
+ return visitor.Alias?.(key2, node2, path2);
12142
12489
  return;
12143
12490
  }
12144
- function replaceNode(key, path2, node2) {
12491
+ function replaceNode(key2, path2, node2) {
12145
12492
  const parent = path2[path2.length - 1];
12146
12493
  if (identity.isCollection(parent)) {
12147
- parent.items[key] = node2;
12494
+ parent.items[key2] = node2;
12148
12495
  } else if (identity.isPair(parent)) {
12149
- if (key === "key")
12496
+ if (key2 === "key")
12150
12497
  parent.key = node2;
12151
12498
  else
12152
12499
  parent.value = node2;
@@ -12377,7 +12724,7 @@ var require_anchors = __commonJS((exports) => {
12377
12724
 
12378
12725
  // ../../node_modules/yaml/dist/doc/applyReviver.js
12379
12726
  var require_applyReviver = __commonJS((exports) => {
12380
- function applyReviver(reviver, obj, key, val) {
12727
+ function applyReviver(reviver, obj, key2, val) {
12381
12728
  if (val && typeof val === "object") {
12382
12729
  if (Array.isArray(val)) {
12383
12730
  for (let i = 0, len = val.length;i < len; ++i) {
@@ -12417,7 +12764,7 @@ var require_applyReviver = __commonJS((exports) => {
12417
12764
  }
12418
12765
  }
12419
12766
  }
12420
- return reviver.call(obj, key, val);
12767
+ return reviver.call(obj, key2, val);
12421
12768
  }
12422
12769
  exports.applyReviver = applyReviver;
12423
12770
  });
@@ -12748,29 +13095,29 @@ var require_Collection = __commonJS((exports) => {
12748
13095
  if (isEmptyPath(path2))
12749
13096
  this.add(value);
12750
13097
  else {
12751
- const [key, ...rest] = path2;
12752
- const node2 = this.get(key, true);
13098
+ const [key2, ...rest] = path2;
13099
+ const node2 = this.get(key2, true);
12753
13100
  if (identity.isCollection(node2))
12754
13101
  node2.addIn(rest, value);
12755
13102
  else if (node2 === undefined && this.schema)
12756
- this.set(key, collectionFromPath(this.schema, rest, value));
13103
+ this.set(key2, collectionFromPath(this.schema, rest, value));
12757
13104
  else
12758
- throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
13105
+ throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
12759
13106
  }
12760
13107
  }
12761
13108
  deleteIn(path2) {
12762
- const [key, ...rest] = path2;
13109
+ const [key2, ...rest] = path2;
12763
13110
  if (rest.length === 0)
12764
- return this.delete(key);
12765
- const node2 = this.get(key, true);
13111
+ return this.delete(key2);
13112
+ const node2 = this.get(key2, true);
12766
13113
  if (identity.isCollection(node2))
12767
13114
  return node2.deleteIn(rest);
12768
13115
  else
12769
- throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
13116
+ throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
12770
13117
  }
12771
13118
  getIn(path2, keepScalar) {
12772
- const [key, ...rest] = path2;
12773
- const node2 = this.get(key, true);
13119
+ const [key2, ...rest] = path2;
13120
+ const node2 = this.get(key2, true);
12774
13121
  if (rest.length === 0)
12775
13122
  return !keepScalar && identity.isScalar(node2) ? node2.value : node2;
12776
13123
  else
@@ -12785,24 +13132,24 @@ var require_Collection = __commonJS((exports) => {
12785
13132
  });
12786
13133
  }
12787
13134
  hasIn(path2) {
12788
- const [key, ...rest] = path2;
13135
+ const [key2, ...rest] = path2;
12789
13136
  if (rest.length === 0)
12790
- return this.has(key);
12791
- const node2 = this.get(key, true);
13137
+ return this.has(key2);
13138
+ const node2 = this.get(key2, true);
12792
13139
  return identity.isCollection(node2) ? node2.hasIn(rest) : false;
12793
13140
  }
12794
13141
  setIn(path2, value) {
12795
- const [key, ...rest] = path2;
13142
+ const [key2, ...rest] = path2;
12796
13143
  if (rest.length === 0) {
12797
- this.set(key, value);
13144
+ this.set(key2, value);
12798
13145
  } else {
12799
- const node2 = this.get(key, true);
13146
+ const node2 = this.get(key2, true);
12800
13147
  if (identity.isCollection(node2))
12801
13148
  node2.setIn(rest, value);
12802
13149
  else if (node2 === undefined && this.schema)
12803
- this.set(key, collectionFromPath(this.schema, rest, value));
13150
+ this.set(key2, collectionFromPath(this.schema, rest, value));
12804
13151
  else
12805
- throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
13152
+ throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
12806
13153
  }
12807
13154
  }
12808
13155
  }
@@ -13390,19 +13737,19 @@ var require_stringifyPair = __commonJS((exports) => {
13390
13737
  var Scalar = require_Scalar();
13391
13738
  var stringify = require_stringify();
13392
13739
  var stringifyComment = require_stringifyComment();
13393
- function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
13740
+ function stringifyPair({ key: key2, value }, ctx, onComment, onChompKeep) {
13394
13741
  const { allNullValues, doc, indent: indent2, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
13395
- let keyComment = identity.isNode(key) && key.comment || null;
13742
+ let keyComment = identity.isNode(key2) && key2.comment || null;
13396
13743
  if (simpleKeys) {
13397
13744
  if (keyComment) {
13398
13745
  throw new Error("With simple keys, key nodes cannot have comments");
13399
13746
  }
13400
- if (identity.isCollection(key) || !identity.isNode(key) && typeof key === "object") {
13747
+ if (identity.isCollection(key2) || !identity.isNode(key2) && typeof key2 === "object") {
13401
13748
  const msg = "With simple keys, collection cannot be used as a key value";
13402
13749
  throw new Error(msg);
13403
13750
  }
13404
13751
  }
13405
- let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL : typeof key === "object"));
13752
+ let explicitKey = !simpleKeys && (!key2 || keyComment && value == null && !ctx.inFlow || identity.isCollection(key2) || (identity.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "object"));
13406
13753
  ctx = Object.assign({}, ctx, {
13407
13754
  allNullValues: false,
13408
13755
  implicitKey: !explicitKey && (simpleKeys || !allNullValues),
@@ -13410,7 +13757,7 @@ var require_stringifyPair = __commonJS((exports) => {
13410
13757
  });
13411
13758
  let keyCommentDone = false;
13412
13759
  let chompKeep = false;
13413
- let str = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
13760
+ let str = stringify.stringify(key2, ctx, () => keyCommentDone = true, () => chompKeep = true);
13414
13761
  if (!explicitKey && !ctx.inFlow && str.length > 1024) {
13415
13762
  if (simpleKeys)
13416
13763
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
@@ -13554,7 +13901,7 @@ var require_merge = __commonJS((exports) => {
13554
13901
  }),
13555
13902
  stringify: () => MERGE_KEY
13556
13903
  };
13557
- var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
13904
+ var isMergeKey = (ctx, key2) => (merge.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
13558
13905
  function addMergeToJSMap(ctx, map4, value) {
13559
13906
  const source = resolveAliasValue(ctx, value);
13560
13907
  if (identity.isSeq(source))
@@ -13571,14 +13918,14 @@ var require_merge = __commonJS((exports) => {
13571
13918
  if (!identity.isMap(source))
13572
13919
  throw new Error("Merge sources must be maps or map aliases");
13573
13920
  const srcMap = source.toJSON(null, ctx, Map);
13574
- for (const [key, value2] of srcMap) {
13921
+ for (const [key2, value2] of srcMap) {
13575
13922
  if (map4 instanceof Map) {
13576
- if (!map4.has(key))
13577
- map4.set(key, value2);
13923
+ if (!map4.has(key2))
13924
+ map4.set(key2, value2);
13578
13925
  } else if (map4 instanceof Set) {
13579
- map4.add(key);
13580
- } else if (!Object.prototype.hasOwnProperty.call(map4, key)) {
13581
- Object.defineProperty(map4, key, {
13926
+ map4.add(key2);
13927
+ } else if (!Object.prototype.hasOwnProperty.call(map4, key2)) {
13928
+ Object.defineProperty(map4, key2, {
13582
13929
  value: value2,
13583
13930
  writable: true,
13584
13931
  enumerable: true,
@@ -13603,19 +13950,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
13603
13950
  var stringify = require_stringify();
13604
13951
  var identity = require_identity();
13605
13952
  var toJS = require_toJS();
13606
- function addPairToJSMap(ctx, map4, { key, value }) {
13607
- if (identity.isNode(key) && key.addToJSMap)
13608
- key.addToJSMap(ctx, map4, value);
13609
- else if (merge.isMergeKey(ctx, key))
13953
+ function addPairToJSMap(ctx, map4, { key: key2, value }) {
13954
+ if (identity.isNode(key2) && key2.addToJSMap)
13955
+ key2.addToJSMap(ctx, map4, value);
13956
+ else if (merge.isMergeKey(ctx, key2))
13610
13957
  merge.addMergeToJSMap(ctx, map4, value);
13611
13958
  else {
13612
- const jsKey = toJS.toJS(key, "", ctx);
13959
+ const jsKey = toJS.toJS(key2, "", ctx);
13613
13960
  if (map4 instanceof Map) {
13614
13961
  map4.set(jsKey, toJS.toJS(value, jsKey, ctx));
13615
13962
  } else if (map4 instanceof Set) {
13616
13963
  map4.add(jsKey);
13617
13964
  } else {
13618
- const stringKey = stringifyKey(key, jsKey, ctx);
13965
+ const stringKey = stringifyKey(key2, jsKey, ctx);
13619
13966
  const jsValue = toJS.toJS(value, stringKey, ctx);
13620
13967
  if (stringKey in map4)
13621
13968
  Object.defineProperty(map4, stringKey, {
@@ -13630,19 +13977,19 @@ var require_addPairToJSMap = __commonJS((exports) => {
13630
13977
  }
13631
13978
  return map4;
13632
13979
  }
13633
- function stringifyKey(key, jsKey, ctx) {
13980
+ function stringifyKey(key2, jsKey, ctx) {
13634
13981
  if (jsKey === null)
13635
13982
  return "";
13636
13983
  if (typeof jsKey !== "object")
13637
13984
  return String(jsKey);
13638
- if (identity.isNode(key) && ctx?.doc) {
13985
+ if (identity.isNode(key2) && ctx?.doc) {
13639
13986
  const strCtx = stringify.createStringifyContext(ctx.doc, {});
13640
13987
  strCtx.anchors = new Set;
13641
13988
  for (const node2 of ctx.anchors.keys())
13642
13989
  strCtx.anchors.add(node2.anchor);
13643
13990
  strCtx.inFlow = true;
13644
13991
  strCtx.inStringifyKey = true;
13645
- const strKey = key.toString(strCtx);
13992
+ const strKey = key2.toString(strCtx);
13646
13993
  if (!ctx.mapKeyWarned) {
13647
13994
  let jsonStr = JSON.stringify(strKey);
13648
13995
  if (jsonStr.length > 40)
@@ -13663,25 +14010,25 @@ var require_Pair = __commonJS((exports) => {
13663
14010
  var stringifyPair = require_stringifyPair();
13664
14011
  var addPairToJSMap = require_addPairToJSMap();
13665
14012
  var identity = require_identity();
13666
- function createPair(key, value, ctx) {
13667
- const k = createNode.createNode(key, undefined, ctx);
14013
+ function createPair(key2, value, ctx) {
14014
+ const k = createNode.createNode(key2, undefined, ctx);
13668
14015
  const v = createNode.createNode(value, undefined, ctx);
13669
14016
  return new Pair(k, v);
13670
14017
  }
13671
14018
 
13672
14019
  class Pair {
13673
- constructor(key, value = null) {
14020
+ constructor(key2, value = null) {
13674
14021
  Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });
13675
- this.key = key;
14022
+ this.key = key2;
13676
14023
  this.value = value;
13677
14024
  }
13678
14025
  clone(schema) {
13679
- let { key, value } = this;
13680
- if (identity.isNode(key))
13681
- key = key.clone(schema);
14026
+ let { key: key2, value } = this;
14027
+ if (identity.isNode(key2))
14028
+ key2 = key2.clone(schema);
13682
14029
  if (identity.isNode(value))
13683
14030
  value = value.clone(schema);
13684
- return new Pair(key, value);
14031
+ return new Pair(key2, value);
13685
14032
  }
13686
14033
  toJSON(_, ctx) {
13687
14034
  const pair = ctx?.mapAsMap ? new Map : {};
@@ -13855,11 +14202,11 @@ var require_YAMLMap = __commonJS((exports) => {
13855
14202
  var identity = require_identity();
13856
14203
  var Pair = require_Pair();
13857
14204
  var Scalar = require_Scalar();
13858
- function findPair(items, key) {
13859
- const k = identity.isScalar(key) ? key.value : key;
14205
+ function findPair(items, key2) {
14206
+ const k = identity.isScalar(key2) ? key2.value : key2;
13860
14207
  for (const it of items) {
13861
14208
  if (identity.isPair(it)) {
13862
- if (it.key === key || it.key === k)
14209
+ if (it.key === key2 || it.key === k)
13863
14210
  return it;
13864
14211
  if (identity.isScalar(it.key) && it.key.value === k)
13865
14212
  return it;
@@ -13879,20 +14226,20 @@ var require_YAMLMap = __commonJS((exports) => {
13879
14226
  static from(schema, obj, ctx) {
13880
14227
  const { keepUndefined, replacer } = ctx;
13881
14228
  const map4 = new this(schema);
13882
- const add = (key, value) => {
14229
+ const add = (key2, value) => {
13883
14230
  if (typeof replacer === "function")
13884
- value = replacer.call(obj, key, value);
13885
- else if (Array.isArray(replacer) && !replacer.includes(key))
14231
+ value = replacer.call(obj, key2, value);
14232
+ else if (Array.isArray(replacer) && !replacer.includes(key2))
13886
14233
  return;
13887
14234
  if (value !== undefined || keepUndefined)
13888
- map4.items.push(Pair.createPair(key, value, ctx));
14235
+ map4.items.push(Pair.createPair(key2, value, ctx));
13889
14236
  };
13890
14237
  if (obj instanceof Map) {
13891
- for (const [key, value] of obj)
13892
- add(key, value);
14238
+ for (const [key2, value] of obj)
14239
+ add(key2, value);
13893
14240
  } else if (obj && typeof obj === "object") {
13894
- for (const key of Object.keys(obj))
13895
- add(key, obj[key]);
14241
+ for (const key2 of Object.keys(obj))
14242
+ add(key2, obj[key2]);
13896
14243
  }
13897
14244
  if (typeof schema.sortMapEntries === "function") {
13898
14245
  map4.items.sort(schema.sortMapEntries);
@@ -13926,23 +14273,23 @@ var require_YAMLMap = __commonJS((exports) => {
13926
14273
  this.items.push(_pair);
13927
14274
  }
13928
14275
  }
13929
- delete(key) {
13930
- const it = findPair(this.items, key);
14276
+ delete(key2) {
14277
+ const it = findPair(this.items, key2);
13931
14278
  if (!it)
13932
14279
  return false;
13933
14280
  const del = this.items.splice(this.items.indexOf(it), 1);
13934
14281
  return del.length > 0;
13935
14282
  }
13936
- get(key, keepScalar) {
13937
- const it = findPair(this.items, key);
14283
+ get(key2, keepScalar) {
14284
+ const it = findPair(this.items, key2);
13938
14285
  const node2 = it?.value;
13939
14286
  return (!keepScalar && identity.isScalar(node2) ? node2.value : node2) ?? undefined;
13940
14287
  }
13941
- has(key) {
13942
- return !!findPair(this.items, key);
14288
+ has(key2) {
14289
+ return !!findPair(this.items, key2);
13943
14290
  }
13944
- set(key, value) {
13945
- this.add(new Pair.Pair(key, value), true);
14291
+ set(key2, value) {
14292
+ this.add(new Pair.Pair(key2, value), true);
13946
14293
  }
13947
14294
  toJSON(_, ctx, Type) {
13948
14295
  const map4 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
@@ -14013,28 +14360,28 @@ var require_YAMLSeq = __commonJS((exports) => {
14013
14360
  add(value) {
14014
14361
  this.items.push(value);
14015
14362
  }
14016
- delete(key) {
14017
- const idx = asItemIndex(key);
14363
+ delete(key2) {
14364
+ const idx = asItemIndex(key2);
14018
14365
  if (typeof idx !== "number")
14019
14366
  return false;
14020
14367
  const del = this.items.splice(idx, 1);
14021
14368
  return del.length > 0;
14022
14369
  }
14023
- get(key, keepScalar) {
14024
- const idx = asItemIndex(key);
14370
+ get(key2, keepScalar) {
14371
+ const idx = asItemIndex(key2);
14025
14372
  if (typeof idx !== "number")
14026
14373
  return;
14027
14374
  const it = this.items[idx];
14028
14375
  return !keepScalar && identity.isScalar(it) ? it.value : it;
14029
14376
  }
14030
- has(key) {
14031
- const idx = asItemIndex(key);
14377
+ has(key2) {
14378
+ const idx = asItemIndex(key2);
14032
14379
  return typeof idx === "number" && idx < this.items.length;
14033
14380
  }
14034
- set(key, value) {
14035
- const idx = asItemIndex(key);
14381
+ set(key2, value) {
14382
+ const idx = asItemIndex(key2);
14036
14383
  if (typeof idx !== "number")
14037
- throw new Error(`Expected a valid index, not ${key}.`);
14384
+ throw new Error(`Expected a valid index, not ${key2}.`);
14038
14385
  const prev = this.items[idx];
14039
14386
  if (identity.isScalar(prev) && Scalar.isScalarValue(value))
14040
14387
  prev.value = value;
@@ -14068,8 +14415,8 @@ var require_YAMLSeq = __commonJS((exports) => {
14068
14415
  let i = 0;
14069
14416
  for (let it of obj) {
14070
14417
  if (typeof replacer === "function") {
14071
- const key = obj instanceof Set ? it : String(i++);
14072
- it = replacer.call(obj, key, it);
14418
+ const key2 = obj instanceof Set ? it : String(i++);
14419
+ it = replacer.call(obj, key2, it);
14073
14420
  }
14074
14421
  seq.items.push(createNode.createNode(it, undefined, ctx));
14075
14422
  }
@@ -14077,8 +14424,8 @@ var require_YAMLSeq = __commonJS((exports) => {
14077
14424
  return seq;
14078
14425
  }
14079
14426
  }
14080
- function asItemIndex(key) {
14081
- let idx = identity.isScalar(key) ? key.value : key;
14427
+ function asItemIndex(key2) {
14428
+ let idx = identity.isScalar(key2) ? key2.value : key2;
14082
14429
  if (idx && typeof idx === "string")
14083
14430
  idx = Number(idx);
14084
14431
  return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
@@ -14451,25 +14798,25 @@ ${cn.comment}` : item.comment;
14451
14798
  for (let it of iterable) {
14452
14799
  if (typeof replacer === "function")
14453
14800
  it = replacer.call(iterable, String(i++), it);
14454
- let key, value;
14801
+ let key2, value;
14455
14802
  if (Array.isArray(it)) {
14456
14803
  if (it.length === 2) {
14457
- key = it[0];
14804
+ key2 = it[0];
14458
14805
  value = it[1];
14459
14806
  } else
14460
14807
  throw new TypeError(`Expected [key, value] tuple: ${it}`);
14461
14808
  } else if (it && it instanceof Object) {
14462
14809
  const keys = Object.keys(it);
14463
14810
  if (keys.length === 1) {
14464
- key = keys[0];
14465
- value = it[key];
14811
+ key2 = keys[0];
14812
+ value = it[key2];
14466
14813
  } else {
14467
14814
  throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
14468
14815
  }
14469
14816
  } else {
14470
- key = it;
14817
+ key2 = it;
14471
14818
  }
14472
- pairs2.items.push(Pair.createPair(key, value, ctx));
14819
+ pairs2.items.push(Pair.createPair(key2, value, ctx));
14473
14820
  }
14474
14821
  return pairs2;
14475
14822
  }
@@ -14510,16 +14857,16 @@ var require_omap = __commonJS((exports) => {
14510
14857
  if (ctx?.onCreate)
14511
14858
  ctx.onCreate(map4);
14512
14859
  for (const pair of this.items) {
14513
- let key, value;
14860
+ let key2, value;
14514
14861
  if (identity.isPair(pair)) {
14515
- key = toJS.toJS(pair.key, "", ctx);
14516
- value = toJS.toJS(pair.value, key, ctx);
14862
+ key2 = toJS.toJS(pair.key, "", ctx);
14863
+ value = toJS.toJS(pair.value, key2, ctx);
14517
14864
  } else {
14518
- key = toJS.toJS(pair, "", ctx);
14865
+ key2 = toJS.toJS(pair, "", ctx);
14519
14866
  }
14520
- if (map4.has(key))
14867
+ if (map4.has(key2))
14521
14868
  throw new Error("Ordered maps must not include duplicate keys");
14522
- map4.set(key, value);
14869
+ map4.set(key2, value);
14523
14870
  }
14524
14871
  return map4;
14525
14872
  }
@@ -14540,12 +14887,12 @@ var require_omap = __commonJS((exports) => {
14540
14887
  resolve(seq, onError) {
14541
14888
  const pairs$1 = pairs.resolvePairs(seq, onError);
14542
14889
  const seenKeys = [];
14543
- for (const { key } of pairs$1.items) {
14544
- if (identity.isScalar(key)) {
14545
- if (seenKeys.includes(key.value)) {
14546
- onError(`Ordered maps must not include duplicate keys: ${key.value}`);
14890
+ for (const { key: key2 } of pairs$1.items) {
14891
+ if (identity.isScalar(key2)) {
14892
+ if (seenKeys.includes(key2.value)) {
14893
+ onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
14547
14894
  } else {
14548
- seenKeys.push(key.value);
14895
+ seenKeys.push(key2.value);
14549
14896
  }
14550
14897
  }
14551
14898
  }
@@ -14719,30 +15066,30 @@ var require_set = __commonJS((exports) => {
14719
15066
  super(schema);
14720
15067
  this.tag = YAMLSet.tag;
14721
15068
  }
14722
- add(key) {
15069
+ add(key2) {
14723
15070
  let pair;
14724
- if (identity.isPair(key))
14725
- pair = key;
14726
- else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
14727
- pair = new Pair.Pair(key.key, null);
15071
+ if (identity.isPair(key2))
15072
+ pair = key2;
15073
+ else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
15074
+ pair = new Pair.Pair(key2.key, null);
14728
15075
  else
14729
- pair = new Pair.Pair(key, null);
15076
+ pair = new Pair.Pair(key2, null);
14730
15077
  const prev = YAMLMap.findPair(this.items, pair.key);
14731
15078
  if (!prev)
14732
15079
  this.items.push(pair);
14733
15080
  }
14734
- get(key, keepPair) {
14735
- const pair = YAMLMap.findPair(this.items, key);
15081
+ get(key2, keepPair) {
15082
+ const pair = YAMLMap.findPair(this.items, key2);
14736
15083
  return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair;
14737
15084
  }
14738
- set(key, value) {
15085
+ set(key2, value) {
14739
15086
  if (typeof value !== "boolean")
14740
15087
  throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
14741
- const prev = YAMLMap.findPair(this.items, key);
15088
+ const prev = YAMLMap.findPair(this.items, key2);
14742
15089
  if (prev && !value) {
14743
15090
  this.items.splice(this.items.indexOf(prev), 1);
14744
15091
  } else if (!prev && value) {
14745
- this.items.push(new Pair.Pair(key));
15092
+ this.items.push(new Pair.Pair(key2));
14746
15093
  }
14747
15094
  }
14748
15095
  toJSON(_, ctx) {
@@ -14977,7 +15324,7 @@ var require_tags = __commonJS((exports) => {
14977
15324
  if (Array.isArray(customTags))
14978
15325
  tags = [];
14979
15326
  else {
14980
- const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
15327
+ const keys = Array.from(schemas.keys()).filter((key2) => key2 !== "yaml11").map((key2) => JSON.stringify(key2)).join(", ");
14981
15328
  throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
14982
15329
  }
14983
15330
  }
@@ -14993,7 +15340,7 @@ var require_tags = __commonJS((exports) => {
14993
15340
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
14994
15341
  if (!tagObj) {
14995
15342
  const tagName = JSON.stringify(tag);
14996
- const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
15343
+ const keys = Object.keys(tagsByName).map((key2) => JSON.stringify(key2)).join(", ");
14997
15344
  throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
14998
15345
  }
14999
15346
  if (!tags2.includes(tagObj))
@@ -15228,13 +15575,13 @@ var require_Document = __commonJS((exports) => {
15228
15575
  setAnchors();
15229
15576
  return node2;
15230
15577
  }
15231
- createPair(key, value, options = {}) {
15232
- const k = this.createNode(key, null, options);
15578
+ createPair(key2, value, options = {}) {
15579
+ const k = this.createNode(key2, null, options);
15233
15580
  const v = this.createNode(value, null, options);
15234
15581
  return new Pair.Pair(k, v);
15235
15582
  }
15236
- delete(key) {
15237
- return assertCollection(this.contents) ? this.contents.delete(key) : false;
15583
+ delete(key2) {
15584
+ return assertCollection(this.contents) ? this.contents.delete(key2) : false;
15238
15585
  }
15239
15586
  deleteIn(path2) {
15240
15587
  if (Collection.isEmptyPath(path2)) {
@@ -15245,27 +15592,27 @@ var require_Document = __commonJS((exports) => {
15245
15592
  }
15246
15593
  return assertCollection(this.contents) ? this.contents.deleteIn(path2) : false;
15247
15594
  }
15248
- get(key, keepScalar) {
15249
- return identity.isCollection(this.contents) ? this.contents.get(key, keepScalar) : undefined;
15595
+ get(key2, keepScalar) {
15596
+ return identity.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : undefined;
15250
15597
  }
15251
15598
  getIn(path2, keepScalar) {
15252
15599
  if (Collection.isEmptyPath(path2))
15253
15600
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
15254
15601
  return identity.isCollection(this.contents) ? this.contents.getIn(path2, keepScalar) : undefined;
15255
15602
  }
15256
- has(key) {
15257
- return identity.isCollection(this.contents) ? this.contents.has(key) : false;
15603
+ has(key2) {
15604
+ return identity.isCollection(this.contents) ? this.contents.has(key2) : false;
15258
15605
  }
15259
15606
  hasIn(path2) {
15260
15607
  if (Collection.isEmptyPath(path2))
15261
15608
  return this.contents !== undefined;
15262
15609
  return identity.isCollection(this.contents) ? this.contents.hasIn(path2) : false;
15263
15610
  }
15264
- set(key, value) {
15611
+ set(key2, value) {
15265
15612
  if (this.contents == null) {
15266
- this.contents = Collection.collectionFromPath(this.schema, [key], value);
15613
+ this.contents = Collection.collectionFromPath(this.schema, [key2], value);
15267
15614
  } else if (assertCollection(this.contents)) {
15268
- this.contents.set(key, value);
15615
+ this.contents.set(key2, value);
15269
15616
  }
15270
15617
  }
15271
15618
  setIn(path2, value) {
@@ -15547,25 +15894,25 @@ var require_resolve_props = __commonJS((exports) => {
15547
15894
 
15548
15895
  // ../../node_modules/yaml/dist/compose/util-contains-newline.js
15549
15896
  var require_util_contains_newline = __commonJS((exports) => {
15550
- function containsNewline(key) {
15551
- if (!key)
15897
+ function containsNewline(key2) {
15898
+ if (!key2)
15552
15899
  return null;
15553
- switch (key.type) {
15900
+ switch (key2.type) {
15554
15901
  case "alias":
15555
15902
  case "scalar":
15556
15903
  case "double-quoted-scalar":
15557
15904
  case "single-quoted-scalar":
15558
- if (key.source.includes(`
15905
+ if (key2.source.includes(`
15559
15906
  `))
15560
15907
  return true;
15561
- if (key.end) {
15562
- for (const st of key.end)
15908
+ if (key2.end) {
15909
+ for (const st of key2.end)
15563
15910
  if (st.type === "newline")
15564
15911
  return true;
15565
15912
  }
15566
15913
  return false;
15567
15914
  case "flow-collection":
15568
- for (const it of key.items) {
15915
+ for (const it of key2.items) {
15569
15916
  for (const st of it.start)
15570
15917
  if (st.type === "newline")
15571
15918
  return true;
@@ -15630,10 +15977,10 @@ var require_resolve_block_map = __commonJS((exports) => {
15630
15977
  let offset = bm.offset;
15631
15978
  let commentEnd = null;
15632
15979
  for (const collItem of bm.items) {
15633
- const { start, key, sep, value } = collItem;
15980
+ const { start, key: key2, sep, value } = collItem;
15634
15981
  const keyProps = resolveProps.resolveProps(start, {
15635
15982
  indicator: "explicit-key-ind",
15636
- next: key ?? sep?.[0],
15983
+ next: key2 ?? sep?.[0],
15637
15984
  offset,
15638
15985
  onError,
15639
15986
  parentIndent: bm.indent,
@@ -15641,10 +15988,10 @@ var require_resolve_block_map = __commonJS((exports) => {
15641
15988
  });
15642
15989
  const implicitKey = !keyProps.found;
15643
15990
  if (implicitKey) {
15644
- if (key) {
15645
- if (key.type === "block-seq")
15991
+ if (key2) {
15992
+ if (key2.type === "block-seq")
15646
15993
  onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key");
15647
- else if ("indent" in key && key.indent !== bm.indent)
15994
+ else if ("indent" in key2 && key2.indent !== bm.indent)
15648
15995
  onError(offset, "BAD_INDENT", startColMsg);
15649
15996
  }
15650
15997
  if (!keyProps.anchor && !keyProps.tag && !sep) {
@@ -15658,17 +16005,17 @@ var require_resolve_block_map = __commonJS((exports) => {
15658
16005
  }
15659
16006
  continue;
15660
16007
  }
15661
- if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {
15662
- onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
16008
+ if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key2)) {
16009
+ onError(key2 ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
15663
16010
  }
15664
16011
  } else if (keyProps.found?.indent !== bm.indent) {
15665
16012
  onError(offset, "BAD_INDENT", startColMsg);
15666
16013
  }
15667
16014
  ctx.atKey = true;
15668
16015
  const keyStart = keyProps.end;
15669
- const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
16016
+ const keyNode = key2 ? composeNode(ctx, key2, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);
15670
16017
  if (ctx.schema.compat)
15671
- utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);
16018
+ utilFlowIndentCheck.flowIndentCheck(bm.indent, key2, onError);
15672
16019
  ctx.atKey = false;
15673
16020
  if (utilMapIncludes.mapIncludes(ctx, map4.items, keyNode))
15674
16021
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
@@ -15678,7 +16025,7 @@ var require_resolve_block_map = __commonJS((exports) => {
15678
16025
  offset: keyNode.range[2],
15679
16026
  onError,
15680
16027
  parentIndent: bm.indent,
15681
- startOnNewline: !key || key.type === "block-scalar"
16028
+ startOnNewline: !key2 || key2.type === "block-scalar"
15682
16029
  });
15683
16030
  offset = valueProps.end;
15684
16031
  if (valueProps.found) {
@@ -15834,11 +16181,11 @@ var require_resolve_flow_collection = __commonJS((exports) => {
15834
16181
  let offset = fc.offset + fc.start.source.length;
15835
16182
  for (let i = 0;i < fc.items.length; ++i) {
15836
16183
  const collItem = fc.items[i];
15837
- const { start, key, sep, value } = collItem;
16184
+ const { start, key: key2, sep, value } = collItem;
15838
16185
  const props = resolveProps.resolveProps(start, {
15839
16186
  flow: fcName,
15840
16187
  indicator: "explicit-key-ind",
15841
- next: key ?? sep?.[0],
16188
+ next: key2 ?? sep?.[0],
15842
16189
  offset,
15843
16190
  onError,
15844
16191
  parentIndent: fc.indent,
@@ -15860,8 +16207,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
15860
16207
  offset = props.end;
15861
16208
  continue;
15862
16209
  }
15863
- if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))
15864
- onError(key, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
16210
+ if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key2))
16211
+ onError(key2, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
15865
16212
  }
15866
16213
  if (i === 0) {
15867
16214
  if (props.comma)
@@ -15906,8 +16253,8 @@ var require_resolve_flow_collection = __commonJS((exports) => {
15906
16253
  } else {
15907
16254
  ctx.atKey = true;
15908
16255
  const keyStart = props.end;
15909
- const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
15910
- if (isBlock(key))
16256
+ const keyNode = key2 ? composeNode(ctx, key2, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError);
16257
+ if (isBlock(key2))
15911
16258
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
15912
16259
  ctx.atKey = false;
15913
16260
  const valueProps = resolveProps.resolveProps(sep ?? [], {
@@ -17037,9 +17384,9 @@ var require_cst_scalar = __commonJS((exports) => {
17037
17384
  if (!addEndtoBlockProps(props, "end" in token ? token.end : undefined))
17038
17385
  props.push({ type: "newline", offset: -1, indent: indent2, source: `
17039
17386
  ` });
17040
- for (const key of Object.keys(token))
17041
- if (key !== "type" && key !== "offset")
17042
- delete token[key];
17387
+ for (const key2 of Object.keys(token))
17388
+ if (key2 !== "type" && key2 !== "offset")
17389
+ delete token[key2];
17043
17390
  Object.assign(token, { type: "block-scalar", indent: indent2, props, source: body });
17044
17391
  }
17045
17392
  }
@@ -17088,9 +17435,9 @@ var require_cst_scalar = __commonJS((exports) => {
17088
17435
  default: {
17089
17436
  const indent2 = "indent" in token ? token.indent : -1;
17090
17437
  const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st) => st.type === "space" || st.type === "comment" || st.type === "newline") : [];
17091
- for (const key of Object.keys(token))
17092
- if (key !== "type" && key !== "offset")
17093
- delete token[key];
17438
+ for (const key2 of Object.keys(token))
17439
+ if (key2 !== "type" && key2 !== "offset")
17440
+ delete token[key2];
17094
17441
  Object.assign(token, { type, indent: indent2, source, end });
17095
17442
  }
17096
17443
  }
@@ -17142,12 +17489,12 @@ var require_cst_stringify = __commonJS((exports) => {
17142
17489
  }
17143
17490
  }
17144
17491
  }
17145
- function stringifyItem({ start, key, sep, value }) {
17492
+ function stringifyItem({ start, key: key2, sep, value }) {
17146
17493
  let res = "";
17147
17494
  for (const st of start)
17148
17495
  res += st.source;
17149
- if (key)
17150
- res += stringifyToken(key);
17496
+ if (key2)
17497
+ res += stringifyToken(key2);
17151
17498
  if (sep)
17152
17499
  for (const st of sep)
17153
17500
  res += st.source;
@@ -18461,7 +18808,7 @@ var require_parser = __commonJS((exports) => {
18461
18808
  });
18462
18809
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
18463
18810
  const start2 = getFirstKeyStartProps(it.start);
18464
- const key = it.key;
18811
+ const key2 = it.key;
18465
18812
  const sep = it.sep;
18466
18813
  sep.push(this.sourceToken);
18467
18814
  delete it.key;
@@ -18470,7 +18817,7 @@ var require_parser = __commonJS((exports) => {
18470
18817
  type: "block-map",
18471
18818
  offset: this.offset,
18472
18819
  indent: this.indent,
18473
- items: [{ start: start2, key, sep }]
18820
+ items: [{ start: start2, key: key2, sep }]
18474
18821
  });
18475
18822
  } else if (start.length > 0) {
18476
18823
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -19025,9 +19372,9 @@ var init_types2 = __esm(() => {
19025
19372
  });
19026
19373
 
19027
19374
  // ../../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js
19028
- function mark(values2, key, value) {
19375
+ function mark(values2, key2, value) {
19029
19376
  if (value) {
19030
- values2[key] = value;
19377
+ values2[key2] = value;
19031
19378
  }
19032
19379
  }
19033
19380
  var checks, DefinedInfo;
@@ -20145,6 +20492,11 @@ function parse(value) {
20145
20492
  }
20146
20493
  return tokens;
20147
20494
  }
20495
+ function stringify(values2, options) {
20496
+ const settings = options || {};
20497
+ const input = values2[values2.length - 1] === "" ? [...values2, ""] : values2;
20498
+ return input.join((settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")).trim();
20499
+ }
20148
20500
 
20149
20501
  // ../../node_modules/hast-util-parse-selector/lib/index.js
20150
20502
  function parseSelector(selector, defaultTagName) {
@@ -20196,6 +20548,9 @@ function parse2(value) {
20196
20548
  const input = String(value || "").trim();
20197
20549
  return input ? input.split(/[ \t\n\r\f]+/g) : [];
20198
20550
  }
20551
+ function stringify2(values2) {
20552
+ return values2.join(" ").trim();
20553
+ }
20199
20554
 
20200
20555
  // ../../node_modules/hastscript/lib/create-h.js
20201
20556
  function createH(schema, defaultTagName, caseSensitive) {
@@ -20214,8 +20569,8 @@ function createH(schema, defaultTagName, caseSensitive) {
20214
20569
  if (isChild(properties)) {
20215
20570
  children.unshift(properties);
20216
20571
  } else {
20217
- for (const [key, value] of Object.entries(properties)) {
20218
- addProperty(schema, node2.properties, key, value);
20572
+ for (const [key2, value] of Object.entries(properties)) {
20573
+ addProperty(schema, node2.properties, key2, value);
20219
20574
  }
20220
20575
  }
20221
20576
  }
@@ -20238,8 +20593,8 @@ function isChild(value) {
20238
20593
  return false;
20239
20594
  const record = value;
20240
20595
  const keys = Object.keys(value);
20241
- for (const key of keys) {
20242
- const value2 = record[key];
20596
+ for (const key2 of keys) {
20597
+ const value2 = record[key2];
20243
20598
  if (value2 && typeof value2 === "object") {
20244
20599
  if (!Array.isArray(value2))
20245
20600
  return true;
@@ -20256,8 +20611,8 @@ function isChild(value) {
20256
20611
  }
20257
20612
  return false;
20258
20613
  }
20259
- function addProperty(schema, properties, key, value) {
20260
- const info = find(schema, key);
20614
+ function addProperty(schema, properties, key2, value) {
20615
+ const info = find(schema, key2);
20261
20616
  let result;
20262
20617
  if (value === null || value === undefined)
20263
20618
  return;
@@ -20324,8 +20679,8 @@ function parsePrimitive(info, name, value) {
20324
20679
  }
20325
20680
  function style(styles) {
20326
20681
  const result = [];
20327
- for (const [key, value] of Object.entries(styles)) {
20328
- result.push([key, value].join(": "));
20682
+ for (const [key2, value] of Object.entries(styles)) {
20683
+ result.push([key2, value].join(": "));
20329
20684
  }
20330
20685
  return result.join("; ");
20331
20686
  }
@@ -20485,9 +20840,9 @@ var init_types3 = __esm(() => {
20485
20840
  });
20486
20841
 
20487
20842
  // ../../node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/defined-info.js
20488
- function mark2(values2, key, value) {
20843
+ function mark2(values2, key2, value) {
20489
20844
  if (value) {
20490
- values2[key] = value;
20845
+ values2[key2] = value;
20491
20846
  }
20492
20847
  }
20493
20848
  var checks2, DefinedInfo2;
@@ -21728,7 +22083,7 @@ function element(state, node2) {
21728
22083
  while (++index2 < node2.attrs.length) {
21729
22084
  const attribute = node2.attrs[index2];
21730
22085
  const name = (attribute.prefix ? attribute.prefix + ":" : "") + attribute.name;
21731
- if (!own6.call(proto, name)) {
22086
+ if (!own7.call(proto, name)) {
21732
22087
  properties[name] = attribute.value;
21733
22088
  }
21734
22089
  }
@@ -21767,11 +22122,11 @@ function createLocation(state, node2, location2) {
21767
22122
  }
21768
22123
  if (state.verbose) {
21769
22124
  const properties = {};
21770
- let key;
22125
+ let key2;
21771
22126
  if (location2.attrs) {
21772
- for (key in location2.attrs) {
21773
- if (own6.call(location2.attrs, key)) {
21774
- properties[find2(state.schema, key).property] = position2(location2.attrs[key]);
22127
+ for (key2 in location2.attrs) {
22128
+ if (own7.call(location2.attrs, key2)) {
22129
+ properties[find2(state.schema, key2).property] = position2(location2.attrs[key2]);
21775
22130
  }
21776
22131
  }
21777
22132
  }
@@ -21803,14 +22158,14 @@ function position2(loc) {
21803
22158
  function point2(point3) {
21804
22159
  return point3.line && point3.column ? point3 : undefined;
21805
22160
  }
21806
- var own6, proto;
22161
+ var own7, proto;
21807
22162
  var init_lib26 = __esm(() => {
21808
22163
  init_development();
21809
22164
  init_hastscript();
21810
22165
  init_property_information2();
21811
22166
  init_vfile_location();
21812
22167
  init_web_namespaces();
21813
- own6 = {}.hasOwnProperty;
22168
+ own7 = {}.hasOwnProperty;
21814
22169
  proto = Object.prototype;
21815
22170
  });
21816
22171
 
@@ -29828,9 +30183,9 @@ var init_types4 = __esm(() => {
29828
30183
  });
29829
30184
 
29830
30185
  // ../../node_modules/property-information/lib/util/defined-info.js
29831
- function mark3(values2, key, value) {
30186
+ function mark3(values2, key2, value) {
29832
30187
  if (value) {
29833
- values2[key] = value;
30188
+ values2[key2] = value;
29834
30189
  }
29835
30190
  }
29836
30191
  var checks3, DefinedInfo3;
@@ -30985,11 +31340,11 @@ function convertHastNode(node2) {
30985
31340
  function hastPropsToJx(properties) {
30986
31341
  const attrs = {};
30987
31342
  const style2 = {};
30988
- for (const [key, value] of Object.entries(properties)) {
31343
+ for (const [key2, value] of Object.entries(properties)) {
30989
31344
  if (value === false || value === undefined || value === null) {
30990
31345
  continue;
30991
31346
  }
30992
- const info = find3(html7, key);
31347
+ const info = find3(html7, key2);
30993
31348
  const name = info.attribute;
30994
31349
  if (name === "style" && typeof value === "string") {
30995
31350
  parseInlineStyle(value, style2);
@@ -31648,8 +32003,8 @@ var require_common = __commonJS((exports, module) => {
31648
32003
  createDebug.enabled = enabled;
31649
32004
  createDebug.humanize = require_ms();
31650
32005
  createDebug.destroy = destroy;
31651
- Object.keys(env).forEach((key) => {
31652
- createDebug[key] = env[key];
32006
+ Object.keys(env).forEach((key2) => {
32007
+ createDebug[key2] = env[key2];
31653
32008
  });
31654
32009
  createDebug.names = [];
31655
32010
  createDebug.skips = [];
@@ -32176,13 +32531,13 @@ var require_node = __commonJS((exports, module) => {
32176
32531
  ];
32177
32532
  }
32178
32533
  } catch (error) {}
32179
- exports.inspectOpts = Object.keys(process.env).filter((key) => {
32180
- return /^debug_/i.test(key);
32181
- }).reduce((obj, key) => {
32182
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
32534
+ exports.inspectOpts = Object.keys(process.env).filter((key2) => {
32535
+ return /^debug_/i.test(key2);
32536
+ }).reduce((obj, key2) => {
32537
+ const prop = key2.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
32183
32538
  return k.toUpperCase();
32184
32539
  });
32185
- let val = process.env[key];
32540
+ let val = process.env[key2];
32186
32541
  if (/^(yes|on|true|enabled)$/i.test(val)) {
32187
32542
  val = true;
32188
32543
  } else if (/^(no|off|false|disabled)$/i.test(val)) {
@@ -32856,7 +33211,7 @@ function compiler(options) {
32856
33211
  index2 = -1;
32857
33212
  while (++index2 < events.length) {
32858
33213
  const handler = config[events[index2][0]];
32859
- if (own7.call(handler, events[index2][1].type)) {
33214
+ if (own8.call(handler, events[index2][1].type)) {
32860
33215
  handler[events[index2][1].type].call(Object.assign({ sliceSerialize: events[index2][2].sliceSerialize }, context), events[index2][1]);
32861
33216
  }
32862
33217
  }
@@ -33382,29 +33737,29 @@ function configure2(combined, extensions) {
33382
33737
  }
33383
33738
  }
33384
33739
  function extension(combined, extension2) {
33385
- let key;
33386
- for (key in extension2) {
33387
- if (own7.call(extension2, key)) {
33388
- switch (key) {
33740
+ let key2;
33741
+ for (key2 in extension2) {
33742
+ if (own8.call(extension2, key2)) {
33743
+ switch (key2) {
33389
33744
  case "canContainEols": {
33390
- const right = extension2[key];
33745
+ const right = extension2[key2];
33391
33746
  if (right) {
33392
- combined[key].push(...right);
33747
+ combined[key2].push(...right);
33393
33748
  }
33394
33749
  break;
33395
33750
  }
33396
33751
  case "transforms": {
33397
- const right = extension2[key];
33752
+ const right = extension2[key2];
33398
33753
  if (right) {
33399
- combined[key].push(...right);
33754
+ combined[key2].push(...right);
33400
33755
  }
33401
33756
  break;
33402
33757
  }
33403
33758
  case "enter":
33404
33759
  case "exit": {
33405
- const right = extension2[key];
33760
+ const right = extension2[key2];
33406
33761
  if (right) {
33407
- Object.assign(combined[key], right);
33762
+ Object.assign(combined[key2], right);
33408
33763
  }
33409
33764
  break;
33410
33765
  }
@@ -33419,7 +33774,7 @@ function defaultOnError(left, right) {
33419
33774
  throw new Error("Cannot close document, a token (`" + right.type + "`, " + stringifyPosition({ start: right.start, end: right.end }) + ") is still open");
33420
33775
  }
33421
33776
  }
33422
- var own7;
33777
+ var own8;
33423
33778
  var init_lib29 = __esm(() => {
33424
33779
  init_development();
33425
33780
  init_mdast_util_to_string();
@@ -33430,7 +33785,7 @@ var init_lib29 = __esm(() => {
33430
33785
  init_default();
33431
33786
  init_decode_named_character_reference();
33432
33787
  init_unist_util_stringify_position();
33433
- own7 = {}.hasOwnProperty;
33788
+ own8 = {}.hasOwnProperty;
33434
33789
  });
33435
33790
 
33436
33791
  // ../../node_modules/mdast-util-from-markdown/dev/index.js
@@ -33591,25 +33946,25 @@ function toMatters(options) {
33591
33946
  function matter(option) {
33592
33947
  let result = option;
33593
33948
  if (typeof result === "string") {
33594
- if (!own8.call(markers, result)) {
33949
+ if (!own9.call(markers, result)) {
33595
33950
  throw fault("Missing matter definition for `%s`", result);
33596
33951
  }
33597
33952
  result = { type: result, marker: markers[result] };
33598
33953
  } else if (typeof result !== "object") {
33599
33954
  throw fault("Expected matter to be an object, not `%j`", result);
33600
33955
  }
33601
- if (!own8.call(result, "type")) {
33956
+ if (!own9.call(result, "type")) {
33602
33957
  throw fault("Missing `type` in matter `%j`", result);
33603
33958
  }
33604
- if (!own8.call(result, "fence") && !own8.call(result, "marker")) {
33959
+ if (!own9.call(result, "fence") && !own9.call(result, "marker")) {
33605
33960
  throw fault("Missing `marker` or `fence` in matter `%j`", result);
33606
33961
  }
33607
33962
  return result;
33608
33963
  }
33609
- var own8, markers;
33964
+ var own9, markers;
33610
33965
  var init_to_matters = __esm(() => {
33611
33966
  init_fault();
33612
- own8 = {}.hasOwnProperty;
33967
+ own9 = {}.hasOwnProperty;
33613
33968
  markers = { yaml: "-", toml: "+" };
33614
33969
  });
33615
33970
 
@@ -33910,9 +34265,9 @@ var require_convert = __commonJS((exports, module) => {
33910
34265
  function allFactory(test) {
33911
34266
  return all3;
33912
34267
  function all3(node2) {
33913
- var key;
33914
- for (key in test) {
33915
- if (node2[key] !== test[key])
34268
+ var key2;
34269
+ for (key2 in test) {
34270
+ if (node2[key2] !== test[key2])
33916
34271
  return false;
33917
34272
  }
33918
34273
  return true;
@@ -34152,9 +34507,9 @@ var require_lodash = __commonJS((exports, module) => {
34152
34507
  }
34153
34508
  return false;
34154
34509
  }
34155
- function baseProperty(key) {
34510
+ function baseProperty(key2) {
34156
34511
  return function(object) {
34157
- return object == null ? undefined : object[key];
34512
+ return object == null ? undefined : object[key2];
34158
34513
  };
34159
34514
  }
34160
34515
  function baseTimes(n, iteratee2) {
@@ -34169,8 +34524,8 @@ var require_lodash = __commonJS((exports, module) => {
34169
34524
  return func(value2);
34170
34525
  };
34171
34526
  }
34172
- function getValue(object, key) {
34173
- return object == null ? undefined : object[key];
34527
+ function getValue(object, key2) {
34528
+ return object == null ? undefined : object[key2];
34174
34529
  }
34175
34530
  function isHostObject(value2) {
34176
34531
  var result = false;
@@ -34183,8 +34538,8 @@ var require_lodash = __commonJS((exports, module) => {
34183
34538
  }
34184
34539
  function mapToArray(map4) {
34185
34540
  var index2 = -1, result = Array(map4.size);
34186
- map4.forEach(function(value2, key) {
34187
- result[++index2] = [key, value2];
34541
+ map4.forEach(function(value2, key2) {
34542
+ result[++index2] = [key2, value2];
34188
34543
  });
34189
34544
  return result;
34190
34545
  }
@@ -34247,24 +34602,24 @@ var require_lodash = __commonJS((exports, module) => {
34247
34602
  function hashClear() {
34248
34603
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
34249
34604
  }
34250
- function hashDelete(key) {
34251
- return this.has(key) && delete this.__data__[key];
34605
+ function hashDelete(key2) {
34606
+ return this.has(key2) && delete this.__data__[key2];
34252
34607
  }
34253
- function hashGet(key) {
34608
+ function hashGet(key2) {
34254
34609
  var data = this.__data__;
34255
34610
  if (nativeCreate) {
34256
- var result = data[key];
34611
+ var result = data[key2];
34257
34612
  return result === HASH_UNDEFINED ? undefined : result;
34258
34613
  }
34259
- return hasOwnProperty2.call(data, key) ? data[key] : undefined;
34614
+ return hasOwnProperty2.call(data, key2) ? data[key2] : undefined;
34260
34615
  }
34261
- function hashHas(key) {
34616
+ function hashHas(key2) {
34262
34617
  var data = this.__data__;
34263
- return nativeCreate ? data[key] !== undefined : hasOwnProperty2.call(data, key);
34618
+ return nativeCreate ? data[key2] !== undefined : hasOwnProperty2.call(data, key2);
34264
34619
  }
34265
- function hashSet(key, value2) {
34620
+ function hashSet(key2, value2) {
34266
34621
  var data = this.__data__;
34267
- data[key] = nativeCreate && value2 === undefined ? HASH_UNDEFINED : value2;
34622
+ data[key2] = nativeCreate && value2 === undefined ? HASH_UNDEFINED : value2;
34268
34623
  return this;
34269
34624
  }
34270
34625
  Hash.prototype.clear = hashClear;
@@ -34283,8 +34638,8 @@ var require_lodash = __commonJS((exports, module) => {
34283
34638
  function listCacheClear() {
34284
34639
  this.__data__ = [];
34285
34640
  }
34286
- function listCacheDelete(key) {
34287
- var data = this.__data__, index2 = assocIndexOf(data, key);
34641
+ function listCacheDelete(key2) {
34642
+ var data = this.__data__, index2 = assocIndexOf(data, key2);
34288
34643
  if (index2 < 0) {
34289
34644
  return false;
34290
34645
  }
@@ -34296,17 +34651,17 @@ var require_lodash = __commonJS((exports, module) => {
34296
34651
  }
34297
34652
  return true;
34298
34653
  }
34299
- function listCacheGet(key) {
34300
- var data = this.__data__, index2 = assocIndexOf(data, key);
34654
+ function listCacheGet(key2) {
34655
+ var data = this.__data__, index2 = assocIndexOf(data, key2);
34301
34656
  return index2 < 0 ? undefined : data[index2][1];
34302
34657
  }
34303
- function listCacheHas(key) {
34304
- return assocIndexOf(this.__data__, key) > -1;
34658
+ function listCacheHas(key2) {
34659
+ return assocIndexOf(this.__data__, key2) > -1;
34305
34660
  }
34306
- function listCacheSet(key, value2) {
34307
- var data = this.__data__, index2 = assocIndexOf(data, key);
34661
+ function listCacheSet(key2, value2) {
34662
+ var data = this.__data__, index2 = assocIndexOf(data, key2);
34308
34663
  if (index2 < 0) {
34309
- data.push([key, value2]);
34664
+ data.push([key2, value2]);
34310
34665
  } else {
34311
34666
  data[index2][1] = value2;
34312
34667
  }
@@ -34332,17 +34687,17 @@ var require_lodash = __commonJS((exports, module) => {
34332
34687
  string: new Hash
34333
34688
  };
34334
34689
  }
34335
- function mapCacheDelete(key) {
34336
- return getMapData(this, key)["delete"](key);
34690
+ function mapCacheDelete(key2) {
34691
+ return getMapData(this, key2)["delete"](key2);
34337
34692
  }
34338
- function mapCacheGet(key) {
34339
- return getMapData(this, key).get(key);
34693
+ function mapCacheGet(key2) {
34694
+ return getMapData(this, key2).get(key2);
34340
34695
  }
34341
- function mapCacheHas(key) {
34342
- return getMapData(this, key).has(key);
34696
+ function mapCacheHas(key2) {
34697
+ return getMapData(this, key2).has(key2);
34343
34698
  }
34344
- function mapCacheSet(key, value2) {
34345
- getMapData(this, key).set(key, value2);
34699
+ function mapCacheSet(key2, value2) {
34700
+ getMapData(this, key2).set(key2, value2);
34346
34701
  return this;
34347
34702
  }
34348
34703
  MapCache.prototype.clear = mapCacheClear;
@@ -34372,26 +34727,26 @@ var require_lodash = __commonJS((exports, module) => {
34372
34727
  function stackClear() {
34373
34728
  this.__data__ = new ListCache;
34374
34729
  }
34375
- function stackDelete(key) {
34376
- return this.__data__["delete"](key);
34730
+ function stackDelete(key2) {
34731
+ return this.__data__["delete"](key2);
34377
34732
  }
34378
- function stackGet(key) {
34379
- return this.__data__.get(key);
34733
+ function stackGet(key2) {
34734
+ return this.__data__.get(key2);
34380
34735
  }
34381
- function stackHas(key) {
34382
- return this.__data__.has(key);
34736
+ function stackHas(key2) {
34737
+ return this.__data__.has(key2);
34383
34738
  }
34384
- function stackSet(key, value2) {
34739
+ function stackSet(key2, value2) {
34385
34740
  var cache = this.__data__;
34386
34741
  if (cache instanceof ListCache) {
34387
34742
  var pairs = cache.__data__;
34388
34743
  if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
34389
- pairs.push([key, value2]);
34744
+ pairs.push([key2, value2]);
34390
34745
  return this;
34391
34746
  }
34392
34747
  cache = this.__data__ = new MapCache(pairs);
34393
34748
  }
34394
- cache.set(key, value2);
34749
+ cache.set(key2, value2);
34395
34750
  return this;
34396
34751
  }
34397
34752
  Stack.prototype.clear = stackClear;
@@ -34402,23 +34757,23 @@ var require_lodash = __commonJS((exports, module) => {
34402
34757
  function arrayLikeKeys(value2, inherited) {
34403
34758
  var result = isArray(value2) || isArguments(value2) ? baseTimes(value2.length, String) : [];
34404
34759
  var length = result.length, skipIndexes = !!length;
34405
- for (var key in value2) {
34406
- if ((inherited || hasOwnProperty2.call(value2, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
34407
- result.push(key);
34760
+ for (var key2 in value2) {
34761
+ if ((inherited || hasOwnProperty2.call(value2, key2)) && !(skipIndexes && (key2 == "length" || isIndex(key2, length)))) {
34762
+ result.push(key2);
34408
34763
  }
34409
34764
  }
34410
34765
  return result;
34411
34766
  }
34412
- function assignValue(object, key, value2) {
34413
- var objValue = object[key];
34414
- if (!(hasOwnProperty2.call(object, key) && eq(objValue, value2)) || value2 === undefined && !(key in object)) {
34415
- object[key] = value2;
34767
+ function assignValue(object, key2, value2) {
34768
+ var objValue = object[key2];
34769
+ if (!(hasOwnProperty2.call(object, key2) && eq(objValue, value2)) || value2 === undefined && !(key2 in object)) {
34770
+ object[key2] = value2;
34416
34771
  }
34417
34772
  }
34418
- function assocIndexOf(array, key) {
34773
+ function assocIndexOf(array, key2) {
34419
34774
  var length = array.length;
34420
34775
  while (length--) {
34421
- if (eq(array[length][0], key)) {
34776
+ if (eq(array[length][0], key2)) {
34422
34777
  return length;
34423
34778
  }
34424
34779
  }
@@ -34427,10 +34782,10 @@ var require_lodash = __commonJS((exports, module) => {
34427
34782
  function baseAssign(object, source) {
34428
34783
  return object && copyObject(source, keys(source), object);
34429
34784
  }
34430
- function baseClone(value2, isDeep, isFull, customizer, key, object, stack) {
34785
+ function baseClone(value2, isDeep, isFull, customizer, key2, object, stack) {
34431
34786
  var result;
34432
34787
  if (customizer) {
34433
- result = object ? customizer(value2, key, object, stack) : customizer(value2);
34788
+ result = object ? customizer(value2, key2, object, stack) : customizer(value2);
34434
34789
  }
34435
34790
  if (result !== undefined) {
34436
34791
  return result;
@@ -34473,12 +34828,12 @@ var require_lodash = __commonJS((exports, module) => {
34473
34828
  if (!isArr) {
34474
34829
  var props = isFull ? getAllKeys(value2) : keys(value2);
34475
34830
  }
34476
- arrayEach(props || value2, function(subValue, key2) {
34831
+ arrayEach(props || value2, function(subValue, key3) {
34477
34832
  if (props) {
34478
- key2 = subValue;
34479
- subValue = value2[key2];
34833
+ key3 = subValue;
34834
+ subValue = value2[key3];
34480
34835
  }
34481
- assignValue(result, key2, baseClone(subValue, isDeep, isFull, customizer, key2, value2, stack));
34836
+ assignValue(result, key3, baseClone(subValue, isDeep, isFull, customizer, key3, value2, stack));
34482
34837
  });
34483
34838
  return result;
34484
34839
  }
@@ -34500,8 +34855,8 @@ var require_lodash = __commonJS((exports, module) => {
34500
34855
  function baseGetTag(value2) {
34501
34856
  return objectToString.call(value2);
34502
34857
  }
34503
- function baseHasIn(object, key) {
34504
- return object != null && key in Object(object);
34858
+ function baseHasIn(object, key2) {
34859
+ return object != null && key2 in Object(object);
34505
34860
  }
34506
34861
  function baseIsEqual(value2, other, customizer, bitmask, stack) {
34507
34862
  if (value2 === other) {
@@ -34555,15 +34910,15 @@ var require_lodash = __commonJS((exports, module) => {
34555
34910
  }
34556
34911
  while (++index2 < length) {
34557
34912
  data = matchData[index2];
34558
- var key = data[0], objValue = object[key], srcValue = data[1];
34913
+ var key2 = data[0], objValue = object[key2], srcValue = data[1];
34559
34914
  if (noCustomizer && data[2]) {
34560
- if (objValue === undefined && !(key in object)) {
34915
+ if (objValue === undefined && !(key2 in object)) {
34561
34916
  return false;
34562
34917
  }
34563
34918
  } else {
34564
34919
  var stack = new Stack;
34565
34920
  if (customizer) {
34566
- var result = customizer(objValue, srcValue, key, object, source, stack);
34921
+ var result = customizer(objValue, srcValue, key2, object, source, stack);
34567
34922
  }
34568
34923
  if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
34569
34924
  return false;
@@ -34599,9 +34954,9 @@ var require_lodash = __commonJS((exports, module) => {
34599
34954
  return nativeKeys(object);
34600
34955
  }
34601
34956
  var result = [];
34602
- for (var key in Object(object)) {
34603
- if (hasOwnProperty2.call(object, key) && key != "constructor") {
34604
- result.push(key);
34957
+ for (var key2 in Object(object)) {
34958
+ if (hasOwnProperty2.call(object, key2) && key2 != "constructor") {
34959
+ result.push(key2);
34605
34960
  }
34606
34961
  }
34607
34962
  return result;
@@ -34691,9 +35046,9 @@ var require_lodash = __commonJS((exports, module) => {
34691
35046
  object || (object = {});
34692
35047
  var index2 = -1, length = props.length;
34693
35048
  while (++index2 < length) {
34694
- var key = props[index2];
34695
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
34696
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
35049
+ var key2 = props[index2];
35050
+ var newValue = customizer ? customizer(object[key2], source[key2], key2, object, source) : undefined;
35051
+ assignValue(object, key2, newValue === undefined ? source[key2] : newValue);
34697
35052
  }
34698
35053
  return object;
34699
35054
  }
@@ -34795,8 +35150,8 @@ var require_lodash = __commonJS((exports, module) => {
34795
35150
  }
34796
35151
  var index2 = objLength;
34797
35152
  while (index2--) {
34798
- var key = objProps[index2];
34799
- if (!(isPartial ? key in other : hasOwnProperty2.call(other, key))) {
35153
+ var key2 = objProps[index2];
35154
+ if (!(isPartial ? key2 in other : hasOwnProperty2.call(other, key2))) {
34800
35155
  return false;
34801
35156
  }
34802
35157
  }
@@ -34809,16 +35164,16 @@ var require_lodash = __commonJS((exports, module) => {
34809
35164
  stack.set(other, object);
34810
35165
  var skipCtor = isPartial;
34811
35166
  while (++index2 < objLength) {
34812
- key = objProps[index2];
34813
- var objValue = object[key], othValue = other[key];
35167
+ key2 = objProps[index2];
35168
+ var objValue = object[key2], othValue = other[key2];
34814
35169
  if (customizer) {
34815
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
35170
+ var compared = isPartial ? customizer(othValue, objValue, key2, other, object, stack) : customizer(objValue, othValue, key2, object, other, stack);
34816
35171
  }
34817
35172
  if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
34818
35173
  result = false;
34819
35174
  break;
34820
35175
  }
34821
- skipCtor || (skipCtor = key == "constructor");
35176
+ skipCtor || (skipCtor = key2 == "constructor");
34822
35177
  }
34823
35178
  if (result && !skipCtor) {
34824
35179
  var objCtor = object.constructor, othCtor = other.constructor;
@@ -34833,20 +35188,20 @@ var require_lodash = __commonJS((exports, module) => {
34833
35188
  function getAllKeys(object) {
34834
35189
  return baseGetAllKeys(object, keys, getSymbols);
34835
35190
  }
34836
- function getMapData(map4, key) {
35191
+ function getMapData(map4, key2) {
34837
35192
  var data = map4.__data__;
34838
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
35193
+ return isKeyable(key2) ? data[typeof key2 == "string" ? "string" : "hash"] : data.map;
34839
35194
  }
34840
35195
  function getMatchData(object) {
34841
35196
  var result = keys(object), length = result.length;
34842
35197
  while (length--) {
34843
- var key = result[length], value2 = object[key];
34844
- result[length] = [key, value2, isStrictComparable(value2)];
35198
+ var key2 = result[length], value2 = object[key2];
35199
+ result[length] = [key2, value2, isStrictComparable(value2)];
34845
35200
  }
34846
35201
  return result;
34847
35202
  }
34848
- function getNative(object, key) {
34849
- var value2 = getValue(object, key);
35203
+ function getNative(object, key2) {
35204
+ var value2 = getValue(object, key2);
34850
35205
  return baseIsNative(value2) ? value2 : undefined;
34851
35206
  }
34852
35207
  var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
@@ -34875,17 +35230,17 @@ var require_lodash = __commonJS((exports, module) => {
34875
35230
  path2 = isKey(path2, object) ? [path2] : castPath(path2);
34876
35231
  var result, index2 = -1, length = path2.length;
34877
35232
  while (++index2 < length) {
34878
- var key = toKey(path2[index2]);
34879
- if (!(result = object != null && hasFunc(object, key))) {
35233
+ var key2 = toKey(path2[index2]);
35234
+ if (!(result = object != null && hasFunc(object, key2))) {
34880
35235
  break;
34881
35236
  }
34882
- object = object[key];
35237
+ object = object[key2];
34883
35238
  }
34884
35239
  if (result) {
34885
35240
  return result;
34886
35241
  }
34887
35242
  var length = object ? object.length : 0;
34888
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
35243
+ return !!length && isLength(length) && isIndex(key2, length) && (isArray(object) || isArguments(object));
34889
35244
  }
34890
35245
  function initCloneArray(array) {
34891
35246
  var length = array.length, result = array.constructor(length);
@@ -34959,12 +35314,12 @@ var require_lodash = __commonJS((exports, module) => {
34959
35314
  function isStrictComparable(value2) {
34960
35315
  return value2 === value2 && !isObject(value2);
34961
35316
  }
34962
- function matchesStrictComparable(key, srcValue) {
35317
+ function matchesStrictComparable(key2, srcValue) {
34963
35318
  return function(object) {
34964
35319
  if (object == null) {
34965
35320
  return false;
34966
35321
  }
34967
- return object[key] === srcValue && (srcValue !== undefined || (key in Object(object)));
35322
+ return object[key2] === srcValue && (srcValue !== undefined || (key2 in Object(object)));
34968
35323
  };
34969
35324
  }
34970
35325
  var stringToPath = memoize(function(string3) {
@@ -35001,12 +35356,12 @@ var require_lodash = __commonJS((exports, module) => {
35001
35356
  throw new TypeError(FUNC_ERROR_TEXT);
35002
35357
  }
35003
35358
  var memoized = function() {
35004
- var args = arguments, key = resolver2 ? resolver2.apply(this, args) : args[0], cache = memoized.cache;
35005
- if (cache.has(key)) {
35006
- return cache.get(key);
35359
+ var args = arguments, key2 = resolver2 ? resolver2.apply(this, args) : args[0], cache = memoized.cache;
35360
+ if (cache.has(key2)) {
35361
+ return cache.get(key2);
35007
35362
  }
35008
35363
  var result = func.apply(this, args);
35009
- memoized.cache = cache.set(key, result);
35364
+ memoized.cache = cache.set(key2, result);
35010
35365
  return result;
35011
35366
  };
35012
35367
  memoized.cache = new (memoize.Cache || MapCache);
@@ -35438,14 +35793,14 @@ ${offset}${err}${errEnd}`;
35438
35793
  this.type = type;
35439
35794
  this.value = null;
35440
35795
  }
35441
- getPropValue(idx, key, skipKey) {
35796
+ getPropValue(idx, key2, skipKey) {
35442
35797
  if (!this.context)
35443
35798
  return null;
35444
35799
  const {
35445
35800
  src
35446
35801
  } = this.context;
35447
35802
  const prop = this.props[idx];
35448
- return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;
35803
+ return prop && src[prop.start] === key2 ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;
35449
35804
  }
35450
35805
  get anchor() {
35451
35806
  for (let i = 0;i < this.props.length; ++i) {
@@ -37395,27 +37750,27 @@ ${indent2}${str}`;
37395
37750
  if (isEmptyPath(path2))
37396
37751
  this.add(value2);
37397
37752
  else {
37398
- const [key, ...rest] = path2;
37399
- const node2 = this.get(key, true);
37753
+ const [key2, ...rest] = path2;
37754
+ const node2 = this.get(key2, true);
37400
37755
  if (node2 instanceof Collection)
37401
37756
  node2.addIn(rest, value2);
37402
37757
  else if (node2 === undefined && this.schema)
37403
- this.set(key, collectionFromPath(this.schema, rest, value2));
37758
+ this.set(key2, collectionFromPath(this.schema, rest, value2));
37404
37759
  else
37405
- throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
37760
+ throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
37406
37761
  }
37407
37762
  }
37408
- deleteIn([key, ...rest]) {
37763
+ deleteIn([key2, ...rest]) {
37409
37764
  if (rest.length === 0)
37410
- return this.delete(key);
37411
- const node2 = this.get(key, true);
37765
+ return this.delete(key2);
37766
+ const node2 = this.get(key2, true);
37412
37767
  if (node2 instanceof Collection)
37413
37768
  return node2.deleteIn(rest);
37414
37769
  else
37415
- throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
37770
+ throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
37416
37771
  }
37417
- getIn([key, ...rest], keepScalar) {
37418
- const node2 = this.get(key, true);
37772
+ getIn([key2, ...rest], keepScalar) {
37773
+ const node2 = this.get(key2, true);
37419
37774
  if (rest.length === 0)
37420
37775
  return !keepScalar && node2 instanceof Scalar2 ? node2.value : node2;
37421
37776
  else
@@ -37429,23 +37784,23 @@ ${indent2}${str}`;
37429
37784
  return n == null || n instanceof Scalar2 && n.value == null && !n.commentBefore && !n.comment && !n.tag;
37430
37785
  });
37431
37786
  }
37432
- hasIn([key, ...rest]) {
37787
+ hasIn([key2, ...rest]) {
37433
37788
  if (rest.length === 0)
37434
- return this.has(key);
37435
- const node2 = this.get(key, true);
37789
+ return this.has(key2);
37790
+ const node2 = this.get(key2, true);
37436
37791
  return node2 instanceof Collection ? node2.hasIn(rest) : false;
37437
37792
  }
37438
- setIn([key, ...rest], value2) {
37793
+ setIn([key2, ...rest], value2) {
37439
37794
  if (rest.length === 0) {
37440
- this.set(key, value2);
37795
+ this.set(key2, value2);
37441
37796
  } else {
37442
- const node2 = this.get(key, true);
37797
+ const node2 = this.get(key2, true);
37443
37798
  if (node2 instanceof Collection)
37444
37799
  node2.setIn(rest, value2);
37445
37800
  else if (node2 === undefined && this.schema)
37446
- this.set(key, collectionFromPath(this.schema, rest, value2));
37801
+ this.set(key2, collectionFromPath(this.schema, rest, value2));
37447
37802
  else
37448
- throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
37803
+ throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
37449
37804
  }
37450
37805
  }
37451
37806
  toJSON() {
@@ -37460,7 +37815,7 @@ ${indent2}${str}`;
37460
37815
  const {
37461
37816
  indent: indent2,
37462
37817
  indentStep,
37463
- stringify
37818
+ stringify: stringify3
37464
37819
  } = ctx;
37465
37820
  const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow;
37466
37821
  if (inFlow)
@@ -37495,7 +37850,7 @@ ${indent2}${str}`;
37495
37850
  hasItemWithNewLine = true;
37496
37851
  }
37497
37852
  chompKeep = false;
37498
- let str2 = stringify(item, ctx, () => comment = null, () => chompKeep = true);
37853
+ let str2 = stringify3(item, ctx, () => comment = null, () => chompKeep = true);
37499
37854
  if (inFlow && !hasItemWithNewLine && str2.includes(`
37500
37855
  `))
37501
37856
  hasItemWithNewLine = true;
@@ -37550,8 +37905,8 @@ ${indent2}${s2}` : `
37550
37905
  }
37551
37906
  }
37552
37907
  PlainValue._defineProperty(Collection, "maxFlowStringSingleLineLength", 60);
37553
- function asItemIndex(key) {
37554
- let idx = key instanceof Scalar2 ? key.value : key;
37908
+ function asItemIndex(key2) {
37909
+ let idx = key2 instanceof Scalar2 ? key2.value : key2;
37555
37910
  if (idx && typeof idx === "string")
37556
37911
  idx = Number(idx);
37557
37912
  return Number.isInteger(idx) && idx >= 0 ? idx : null;
@@ -37561,28 +37916,28 @@ ${indent2}${s2}` : `
37561
37916
  add(value2) {
37562
37917
  this.items.push(value2);
37563
37918
  }
37564
- delete(key) {
37565
- const idx = asItemIndex(key);
37919
+ delete(key2) {
37920
+ const idx = asItemIndex(key2);
37566
37921
  if (typeof idx !== "number")
37567
37922
  return false;
37568
37923
  const del = this.items.splice(idx, 1);
37569
37924
  return del.length > 0;
37570
37925
  }
37571
- get(key, keepScalar) {
37572
- const idx = asItemIndex(key);
37926
+ get(key2, keepScalar) {
37927
+ const idx = asItemIndex(key2);
37573
37928
  if (typeof idx !== "number")
37574
37929
  return;
37575
37930
  const it = this.items[idx];
37576
37931
  return !keepScalar && it instanceof Scalar2 ? it.value : it;
37577
37932
  }
37578
- has(key) {
37579
- const idx = asItemIndex(key);
37933
+ has(key2) {
37934
+ const idx = asItemIndex(key2);
37580
37935
  return typeof idx === "number" && idx < this.items.length;
37581
37936
  }
37582
- set(key, value2) {
37583
- const idx = asItemIndex(key);
37937
+ set(key2, value2) {
37938
+ const idx = asItemIndex(key2);
37584
37939
  if (typeof idx !== "number")
37585
- throw new Error(`Expected a valid index, not ${key}.`);
37940
+ throw new Error(`Expected a valid index, not ${key2}.`);
37586
37941
  this.items[idx] = value2;
37587
37942
  }
37588
37943
  toJSON(_, ctx) {
@@ -37608,13 +37963,13 @@ ${indent2}${s2}` : `
37608
37963
  }, onComment, onChompKeep);
37609
37964
  }
37610
37965
  }
37611
- var stringifyKey = (key, jsKey, ctx) => {
37966
+ var stringifyKey = (key2, jsKey, ctx) => {
37612
37967
  if (jsKey === null)
37613
37968
  return "";
37614
37969
  if (typeof jsKey !== "object")
37615
37970
  return String(jsKey);
37616
- if (key instanceof Node && ctx && ctx.doc)
37617
- return key.toString({
37971
+ if (key2 instanceof Node && ctx && ctx.doc)
37972
+ return key2.toString({
37618
37973
  anchors: Object.create(null),
37619
37974
  doc: ctx.doc,
37620
37975
  indent: "",
@@ -37627,9 +37982,9 @@ ${indent2}${s2}` : `
37627
37982
  };
37628
37983
 
37629
37984
  class Pair2 extends Node {
37630
- constructor(key, value2 = null) {
37985
+ constructor(key2, value2 = null) {
37631
37986
  super();
37632
- this.key = key;
37987
+ this.key = key2;
37633
37988
  this.value = value2;
37634
37989
  this.type = Pair2.Type.PAIR;
37635
37990
  }
@@ -37647,14 +38002,14 @@ ${indent2}${s2}` : `
37647
38002
  }
37648
38003
  }
37649
38004
  addToJSMap(ctx, map4) {
37650
- const key = toJSON(this.key, "", ctx);
38005
+ const key2 = toJSON(this.key, "", ctx);
37651
38006
  if (map4 instanceof Map) {
37652
- const value2 = toJSON(this.value, key, ctx);
37653
- map4.set(key, value2);
38007
+ const value2 = toJSON(this.value, key2, ctx);
38008
+ map4.set(key2, value2);
37654
38009
  } else if (map4 instanceof Set) {
37655
- map4.add(key);
38010
+ map4.add(key2);
37656
38011
  } else {
37657
- const stringKey = stringifyKey(this.key, key, ctx);
38012
+ const stringKey = stringifyKey(this.key, key2, ctx);
37658
38013
  const value2 = toJSON(this.value, stringKey, ctx);
37659
38014
  if (stringKey in map4)
37660
38015
  Object.defineProperty(map4, stringKey, {
@@ -37681,32 +38036,32 @@ ${indent2}${s2}` : `
37681
38036
  simpleKeys
37682
38037
  } = ctx.doc.options;
37683
38038
  let {
37684
- key,
38039
+ key: key2,
37685
38040
  value: value2
37686
38041
  } = this;
37687
- let keyComment = key instanceof Node && key.comment;
38042
+ let keyComment = key2 instanceof Node && key2.comment;
37688
38043
  if (simpleKeys) {
37689
38044
  if (keyComment) {
37690
38045
  throw new Error("With simple keys, key nodes cannot have comments");
37691
38046
  }
37692
- if (key instanceof Collection) {
38047
+ if (key2 instanceof Collection) {
37693
38048
  const msg = "With simple keys, collection cannot be used as a key value";
37694
38049
  throw new Error(msg);
37695
38050
  }
37696
38051
  }
37697
- let explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL : typeof key === "object"));
38052
+ let explicitKey = !simpleKeys && (!key2 || keyComment || (key2 instanceof Node ? key2 instanceof Collection || key2.type === PlainValue.Type.BLOCK_FOLDED || key2.type === PlainValue.Type.BLOCK_LITERAL : typeof key2 === "object"));
37698
38053
  const {
37699
38054
  doc,
37700
38055
  indent: indent2,
37701
38056
  indentStep,
37702
- stringify
38057
+ stringify: stringify3
37703
38058
  } = ctx;
37704
38059
  ctx = Object.assign({}, ctx, {
37705
38060
  implicitKey: !explicitKey,
37706
38061
  indent: indent2 + indentStep
37707
38062
  });
37708
38063
  let chompKeep = false;
37709
- let str = stringify(key, ctx, () => keyComment = null, () => chompKeep = true);
38064
+ let str = stringify3(key2, ctx, () => keyComment = null, () => chompKeep = true);
37710
38065
  str = addComment(str, ctx.indent, keyComment);
37711
38066
  if (!explicitKey && str.length > 1024) {
37712
38067
  if (simpleKeys)
@@ -37751,7 +38106,7 @@ ${cs}`;
37751
38106
  if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value2 instanceof YAMLSeq2 && value2.type !== PlainValue.Type.FLOW_SEQ && !value2.tag && !doc.anchors.getName(value2)) {
37752
38107
  ctx.indent = ctx.indent.substr(2);
37753
38108
  }
37754
- const valueStr = stringify(value2, ctx, () => valueComment = null, () => chompKeep = true);
38109
+ const valueStr = stringify3(value2, ctx, () => valueComment = null, () => chompKeep = true);
37755
38110
  let ws = " ";
37756
38111
  if (vcb || this.comment) {
37757
38112
  ws = `${vcb}
@@ -37854,11 +38209,11 @@ ${ctx.indent}`;
37854
38209
  }
37855
38210
  }
37856
38211
  PlainValue._defineProperty(Alias2, "default", true);
37857
- function findPair(items, key) {
37858
- const k = key instanceof Scalar2 ? key.value : key;
38212
+ function findPair(items, key2) {
38213
+ const k = key2 instanceof Scalar2 ? key2.value : key2;
37859
38214
  for (const it of items) {
37860
38215
  if (it instanceof Pair2) {
37861
- if (it.key === key || it.key === k)
38216
+ if (it.key === key2 || it.key === k)
37862
38217
  return it;
37863
38218
  if (it.key && it.key.value === k)
37864
38219
  return it;
@@ -37890,23 +38245,23 @@ ${ctx.indent}`;
37890
38245
  this.items.push(pair);
37891
38246
  }
37892
38247
  }
37893
- delete(key) {
37894
- const it = findPair(this.items, key);
38248
+ delete(key2) {
38249
+ const it = findPair(this.items, key2);
37895
38250
  if (!it)
37896
38251
  return false;
37897
38252
  const del = this.items.splice(this.items.indexOf(it), 1);
37898
38253
  return del.length > 0;
37899
38254
  }
37900
- get(key, keepScalar) {
37901
- const it = findPair(this.items, key);
38255
+ get(key2, keepScalar) {
38256
+ const it = findPair(this.items, key2);
37902
38257
  const node2 = it && it.value;
37903
38258
  return !keepScalar && node2 instanceof Scalar2 ? node2.value : node2;
37904
38259
  }
37905
- has(key) {
37906
- return !!findPair(this.items, key);
38260
+ has(key2) {
38261
+ return !!findPair(this.items, key2);
37907
38262
  }
37908
- set(key, value2) {
37909
- this.add(new Pair2(key, value2), true);
38263
+ set(key2, value2) {
38264
+ this.add(new Pair2(key2, value2), true);
37910
38265
  }
37911
38266
  toJSON(_, ctx, Type) {
37912
38267
  const map4 = Type ? new Type : ctx && ctx.mapAsMap ? new Map : {};
@@ -37959,14 +38314,14 @@ ${ctx.indent}`;
37959
38314
  if (!(source instanceof YAMLMap2))
37960
38315
  throw new Error("Merge sources must be maps");
37961
38316
  const srcMap = source.toJSON(null, ctx, Map);
37962
- for (const [key, value2] of srcMap) {
38317
+ for (const [key2, value2] of srcMap) {
37963
38318
  if (map4 instanceof Map) {
37964
- if (!map4.has(key))
37965
- map4.set(key, value2);
38319
+ if (!map4.has(key2))
38320
+ map4.set(key2, value2);
37966
38321
  } else if (map4 instanceof Set) {
37967
- map4.add(key);
37968
- } else if (!Object.prototype.hasOwnProperty.call(map4, key)) {
37969
- Object.defineProperty(map4, key, {
38322
+ map4.add(key2);
38323
+ } else if (!Object.prototype.hasOwnProperty.call(map4, key2)) {
38324
+ Object.defineProperty(map4, key2, {
37970
38325
  value: value2,
37971
38326
  writable: true,
37972
38327
  enumerable: true,
@@ -38510,8 +38865,8 @@ ${indent2}`);
38510
38865
  errors3.push(new PlainValue.YAMLSemanticError(comment, msg));
38511
38866
  }
38512
38867
  }
38513
- function getLongKeyError(source, key) {
38514
- const sk = String(key);
38868
+ function getLongKeyError(source, key2) {
38869
+ const sk = String(key2);
38515
38870
  const k = sk.substr(0, 8) + "..." + sk.substr(-8);
38516
38871
  return new PlainValue.YAMLSemanticError(source, `The "${k}" key is too long`);
38517
38872
  }
@@ -38939,36 +39294,36 @@ ${ca}` : ca;
38939
39294
  function resolveBlockMapItems(doc, cst2) {
38940
39295
  const comments = [];
38941
39296
  const items = [];
38942
- let key = undefined;
39297
+ let key2 = undefined;
38943
39298
  let keyStart = null;
38944
39299
  for (let i = 0;i < cst2.items.length; ++i) {
38945
39300
  const item = cst2.items[i];
38946
39301
  switch (item.type) {
38947
39302
  case PlainValue.Type.BLANK_LINE:
38948
39303
  comments.push({
38949
- afterKey: !!key,
39304
+ afterKey: !!key2,
38950
39305
  before: items.length
38951
39306
  });
38952
39307
  break;
38953
39308
  case PlainValue.Type.COMMENT:
38954
39309
  comments.push({
38955
- afterKey: !!key,
39310
+ afterKey: !!key2,
38956
39311
  before: items.length,
38957
39312
  comment: item.comment
38958
39313
  });
38959
39314
  break;
38960
39315
  case PlainValue.Type.MAP_KEY:
38961
- if (key !== undefined)
38962
- items.push(new Pair2(key));
39316
+ if (key2 !== undefined)
39317
+ items.push(new Pair2(key2));
38963
39318
  if (item.error)
38964
39319
  doc.errors.push(item.error);
38965
- key = resolveNode(doc, item.node);
39320
+ key2 = resolveNode(doc, item.node);
38966
39321
  keyStart = null;
38967
39322
  break;
38968
39323
  case PlainValue.Type.MAP_VALUE:
38969
39324
  {
38970
- if (key === undefined)
38971
- key = null;
39325
+ if (key2 === undefined)
39326
+ key2 = null;
38972
39327
  if (item.error)
38973
39328
  doc.errors.push(item.error);
38974
39329
  if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) {
@@ -38997,21 +39352,21 @@ ${ca}` : ca;
38997
39352
  valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos;
38998
39353
  }
38999
39354
  }
39000
- const pair = new Pair2(key, resolveNode(doc, valueNode));
39355
+ const pair = new Pair2(key2, resolveNode(doc, valueNode));
39001
39356
  resolvePairComment(item, pair);
39002
39357
  items.push(pair);
39003
- if (key && typeof keyStart === "number") {
39358
+ if (key2 && typeof keyStart === "number") {
39004
39359
  if (item.range.start > keyStart + 1024)
39005
- doc.errors.push(getLongKeyError(cst2, key));
39360
+ doc.errors.push(getLongKeyError(cst2, key2));
39006
39361
  }
39007
- key = undefined;
39362
+ key2 = undefined;
39008
39363
  keyStart = null;
39009
39364
  }
39010
39365
  break;
39011
39366
  default:
39012
- if (key !== undefined)
39013
- items.push(new Pair2(key));
39014
- key = resolveNode(doc, item);
39367
+ if (key2 !== undefined)
39368
+ items.push(new Pair2(key2));
39369
+ key2 = resolveNode(doc, item);
39015
39370
  keyStart = item.range.start;
39016
39371
  if (item.error)
39017
39372
  doc.errors.push(item.error);
@@ -39037,8 +39392,8 @@ ${ca}` : ca;
39037
39392
  }
39038
39393
  }
39039
39394
  }
39040
- if (key !== undefined)
39041
- items.push(new Pair2(key));
39395
+ if (key2 !== undefined)
39396
+ items.push(new Pair2(key2));
39042
39397
  return {
39043
39398
  comments,
39044
39399
  items
@@ -39047,7 +39402,7 @@ ${ca}` : ca;
39047
39402
  function resolveFlowMapItems(doc, cst2) {
39048
39403
  const comments = [];
39049
39404
  const items = [];
39050
- let key = undefined;
39405
+ let key2 = undefined;
39051
39406
  let explicitKey = false;
39052
39407
  let next2 = "{";
39053
39408
  for (let i = 0;i < cst2.items.length; ++i) {
@@ -39057,27 +39412,27 @@ ${ca}` : ca;
39057
39412
  char,
39058
39413
  offset
39059
39414
  } = item;
39060
- if (char === "?" && key === undefined && !explicitKey) {
39415
+ if (char === "?" && key2 === undefined && !explicitKey) {
39061
39416
  explicitKey = true;
39062
39417
  next2 = ":";
39063
39418
  continue;
39064
39419
  }
39065
39420
  if (char === ":") {
39066
- if (key === undefined)
39067
- key = null;
39421
+ if (key2 === undefined)
39422
+ key2 = null;
39068
39423
  if (next2 === ":") {
39069
39424
  next2 = ",";
39070
39425
  continue;
39071
39426
  }
39072
39427
  } else {
39073
39428
  if (explicitKey) {
39074
- if (key === undefined && char !== ",")
39075
- key = null;
39429
+ if (key2 === undefined && char !== ",")
39430
+ key2 = null;
39076
39431
  explicitKey = false;
39077
39432
  }
39078
- if (key !== undefined) {
39079
- items.push(new Pair2(key));
39080
- key = undefined;
39433
+ if (key2 !== undefined) {
39434
+ items.push(new Pair2(key2));
39435
+ key2 = undefined;
39081
39436
  if (char === ",") {
39082
39437
  next2 = ":";
39083
39438
  continue;
@@ -39097,31 +39452,31 @@ ${ca}` : ca;
39097
39452
  doc.errors.push(err);
39098
39453
  } else if (item.type === PlainValue.Type.BLANK_LINE) {
39099
39454
  comments.push({
39100
- afterKey: !!key,
39455
+ afterKey: !!key2,
39101
39456
  before: items.length
39102
39457
  });
39103
39458
  } else if (item.type === PlainValue.Type.COMMENT) {
39104
39459
  checkFlowCommentSpace(doc.errors, item);
39105
39460
  comments.push({
39106
- afterKey: !!key,
39461
+ afterKey: !!key2,
39107
39462
  before: items.length,
39108
39463
  comment: item.comment
39109
39464
  });
39110
- } else if (key === undefined) {
39465
+ } else if (key2 === undefined) {
39111
39466
  if (next2 === ",")
39112
39467
  doc.errors.push(new PlainValue.YAMLSemanticError(item, "Separator , missing in flow map"));
39113
- key = resolveNode(doc, item);
39468
+ key2 = resolveNode(doc, item);
39114
39469
  } else {
39115
39470
  if (next2 !== ",")
39116
39471
  doc.errors.push(new PlainValue.YAMLSemanticError(item, "Indicator : missing in flow map entry"));
39117
- items.push(new Pair2(key, resolveNode(doc, item)));
39118
- key = undefined;
39472
+ items.push(new Pair2(key2, resolveNode(doc, item)));
39473
+ key2 = undefined;
39119
39474
  explicitKey = false;
39120
39475
  }
39121
39476
  }
39122
39477
  checkFlowCollectionEnd(doc.errors, cst2);
39123
- if (key !== undefined)
39124
- items.push(new Pair2(key));
39478
+ if (key2 !== undefined)
39479
+ items.push(new Pair2(key2));
39125
39480
  return {
39126
39481
  comments,
39127
39482
  items
@@ -39188,7 +39543,7 @@ ${ca}` : ca;
39188
39543
  const comments = [];
39189
39544
  const items = [];
39190
39545
  let explicitKey = false;
39191
- let key = undefined;
39546
+ let key2 = undefined;
39192
39547
  let keyStart = null;
39193
39548
  let next2 = "[";
39194
39549
  let prevItem = null;
@@ -39199,22 +39554,22 @@ ${ca}` : ca;
39199
39554
  char,
39200
39555
  offset
39201
39556
  } = item;
39202
- if (char !== ":" && (explicitKey || key !== undefined)) {
39203
- if (explicitKey && key === undefined)
39204
- key = next2 ? items.pop() : null;
39205
- items.push(new Pair2(key));
39557
+ if (char !== ":" && (explicitKey || key2 !== undefined)) {
39558
+ if (explicitKey && key2 === undefined)
39559
+ key2 = next2 ? items.pop() : null;
39560
+ items.push(new Pair2(key2));
39206
39561
  explicitKey = false;
39207
- key = undefined;
39562
+ key2 = undefined;
39208
39563
  keyStart = null;
39209
39564
  }
39210
39565
  if (char === next2) {
39211
39566
  next2 = null;
39212
39567
  } else if (!next2 && char === "?") {
39213
39568
  explicitKey = true;
39214
- } else if (next2 !== "[" && char === ":" && key === undefined) {
39569
+ } else if (next2 !== "[" && char === ":" && key2 === undefined) {
39215
39570
  if (next2 === ",") {
39216
- key = items.pop();
39217
- if (key instanceof Pair2) {
39571
+ key2 = items.pop();
39572
+ if (key2 instanceof Pair2) {
39218
39573
  const msg = "Chaining flow sequence pairs is invalid";
39219
39574
  const err = new PlainValue.YAMLSemanticError(cst2, msg);
39220
39575
  err.offset = offset;
@@ -39223,7 +39578,7 @@ ${ca}` : ca;
39223
39578
  if (!explicitKey && typeof keyStart === "number") {
39224
39579
  const keyEnd = item.range ? item.range.start : item.offset;
39225
39580
  if (keyEnd > keyStart + 1024)
39226
- doc.errors.push(getLongKeyError(cst2, key));
39581
+ doc.errors.push(getLongKeyError(cst2, key2));
39227
39582
  const {
39228
39583
  src
39229
39584
  } = prevItem.context;
@@ -39236,7 +39591,7 @@ ${ca}` : ca;
39236
39591
  }
39237
39592
  }
39238
39593
  } else {
39239
- key = null;
39594
+ key2 = null;
39240
39595
  }
39241
39596
  keyStart = null;
39242
39597
  explicitKey = false;
@@ -39263,20 +39618,20 @@ ${ca}` : ca;
39263
39618
  doc.errors.push(new PlainValue.YAMLSemanticError(item, msg));
39264
39619
  }
39265
39620
  const value2 = resolveNode(doc, item);
39266
- if (key === undefined) {
39621
+ if (key2 === undefined) {
39267
39622
  items.push(value2);
39268
39623
  prevItem = item;
39269
39624
  } else {
39270
- items.push(new Pair2(key, value2));
39271
- key = undefined;
39625
+ items.push(new Pair2(key2, value2));
39626
+ key2 = undefined;
39272
39627
  }
39273
39628
  keyStart = item.range.start;
39274
39629
  next2 = ",";
39275
39630
  }
39276
39631
  }
39277
39632
  checkFlowCollectionEnd(doc.errors, cst2);
39278
- if (key !== undefined)
39279
- items.push(new Pair2(key));
39633
+ if (key2 !== undefined)
39634
+ items.push(new Pair2(key2));
39280
39635
  return {
39281
39636
  comments,
39282
39637
  items
@@ -39399,24 +39754,24 @@ ${pair.comment}` : item.comment;
39399
39754
  const pairs2 = new resolveSeq.YAMLSeq(schema);
39400
39755
  pairs2.tag = "tag:yaml.org,2002:pairs";
39401
39756
  for (const it of iterable) {
39402
- let key, value2;
39757
+ let key2, value2;
39403
39758
  if (Array.isArray(it)) {
39404
39759
  if (it.length === 2) {
39405
- key = it[0];
39760
+ key2 = it[0];
39406
39761
  value2 = it[1];
39407
39762
  } else
39408
39763
  throw new TypeError(`Expected [key, value] tuple: ${it}`);
39409
39764
  } else if (it && it instanceof Object) {
39410
39765
  const keys = Object.keys(it);
39411
39766
  if (keys.length === 1) {
39412
- key = keys[0];
39413
- value2 = it[key];
39767
+ key2 = keys[0];
39768
+ value2 = it[key2];
39414
39769
  } else
39415
39770
  throw new TypeError(`Expected { key: value } tuple: ${it}`);
39416
39771
  } else {
39417
- key = it;
39772
+ key2 = it;
39418
39773
  }
39419
- const pair = schema.createPair(key, value2, ctx);
39774
+ const pair = schema.createPair(key2, value2, ctx);
39420
39775
  pairs2.items.push(pair);
39421
39776
  }
39422
39777
  return pairs2;
@@ -39443,16 +39798,16 @@ ${pair.comment}` : item.comment;
39443
39798
  if (ctx && ctx.onCreate)
39444
39799
  ctx.onCreate(map4);
39445
39800
  for (const pair of this.items) {
39446
- let key, value2;
39801
+ let key2, value2;
39447
39802
  if (pair instanceof resolveSeq.Pair) {
39448
- key = resolveSeq.toJSON(pair.key, "", ctx);
39449
- value2 = resolveSeq.toJSON(pair.value, key, ctx);
39803
+ key2 = resolveSeq.toJSON(pair.key, "", ctx);
39804
+ value2 = resolveSeq.toJSON(pair.value, key2, ctx);
39450
39805
  } else {
39451
- key = resolveSeq.toJSON(pair, "", ctx);
39806
+ key2 = resolveSeq.toJSON(pair, "", ctx);
39452
39807
  }
39453
- if (map4.has(key))
39808
+ if (map4.has(key2))
39454
39809
  throw new Error("Ordered maps must not include duplicate keys");
39455
- map4.set(key, value2);
39810
+ map4.set(key2, value2);
39456
39811
  }
39457
39812
  return map4;
39458
39813
  }
@@ -39462,14 +39817,14 @@ ${pair.comment}` : item.comment;
39462
39817
  const pairs2 = parsePairs(doc, cst2);
39463
39818
  const seenKeys = [];
39464
39819
  for (const {
39465
- key
39820
+ key: key2
39466
39821
  } of pairs2.items) {
39467
- if (key instanceof resolveSeq.Scalar) {
39468
- if (seenKeys.includes(key.value)) {
39822
+ if (key2 instanceof resolveSeq.Scalar) {
39823
+ if (seenKeys.includes(key2.value)) {
39469
39824
  const msg = "Ordered maps must not include duplicate keys";
39470
39825
  throw new PlainValue.YAMLSemanticError(cst2, msg);
39471
39826
  } else {
39472
- seenKeys.push(key.value);
39827
+ seenKeys.push(key2.value);
39473
39828
  }
39474
39829
  }
39475
39830
  }
@@ -39495,24 +39850,24 @@ ${pair.comment}` : item.comment;
39495
39850
  super();
39496
39851
  this.tag = YAMLSet.tag;
39497
39852
  }
39498
- add(key) {
39499
- const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key);
39853
+ add(key2) {
39854
+ const pair = key2 instanceof resolveSeq.Pair ? key2 : new resolveSeq.Pair(key2);
39500
39855
  const prev = resolveSeq.findPair(this.items, pair.key);
39501
39856
  if (!prev)
39502
39857
  this.items.push(pair);
39503
39858
  }
39504
- get(key, keepPair) {
39505
- const pair = resolveSeq.findPair(this.items, key);
39859
+ get(key2, keepPair) {
39860
+ const pair = resolveSeq.findPair(this.items, key2);
39506
39861
  return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair;
39507
39862
  }
39508
- set(key, value2) {
39863
+ set(key2, value2) {
39509
39864
  if (typeof value2 !== "boolean")
39510
39865
  throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value2}`);
39511
- const prev = resolveSeq.findPair(this.items, key);
39866
+ const prev = resolveSeq.findPair(this.items, key2);
39512
39867
  if (prev && !value2) {
39513
39868
  this.items.splice(this.items.indexOf(prev), 1);
39514
39869
  } else if (!prev && value2) {
39515
- this.items.push(new resolveSeq.Pair(key));
39870
+ this.items.push(new resolveSeq.Pair(key2));
39516
39871
  }
39517
39872
  }
39518
39873
  toJSON(_, ctx) {
@@ -39670,11 +40025,11 @@ var require_Schema_bcc6c2d7 = __commonJS((exports) => {
39670
40025
  function createMap(schema, obj, ctx) {
39671
40026
  const map5 = new resolveSeq.YAMLMap(schema);
39672
40027
  if (obj instanceof Map) {
39673
- for (const [key, value2] of obj)
39674
- map5.items.push(schema.createPair(key, value2, ctx));
40028
+ for (const [key2, value2] of obj)
40029
+ map5.items.push(schema.createPair(key2, value2, ctx));
39675
40030
  } else if (obj && typeof obj === "object") {
39676
- for (const key of Object.keys(obj))
39677
- map5.items.push(schema.createPair(key, obj[key], ctx));
40031
+ for (const key2 of Object.keys(obj))
40032
+ map5.items.push(schema.createPair(key2, obj[key2], ctx));
39678
40033
  }
39679
40034
  if (typeof schema.sortMapEntries === "function") {
39680
40035
  map5.items.sort(schema.sortMapEntries);
@@ -40062,7 +40417,7 @@ var require_Schema_bcc6c2d7 = __commonJS((exports) => {
40062
40417
  function getSchemaTags(schemas2, knownTags, customTags, schemaId) {
40063
40418
  let tags2 = schemas2[schemaId.replace(/\W/g, "")];
40064
40419
  if (!tags2) {
40065
- const keys = Object.keys(schemas2).map((key) => JSON.stringify(key)).join(", ");
40420
+ const keys = Object.keys(schemas2).map((key2) => JSON.stringify(key2)).join(", ");
40066
40421
  throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`);
40067
40422
  }
40068
40423
  if (Array.isArray(customTags)) {
@@ -40076,7 +40431,7 @@ var require_Schema_bcc6c2d7 = __commonJS((exports) => {
40076
40431
  if (typeof tag === "string") {
40077
40432
  const tagObj = knownTags[tag];
40078
40433
  if (!tagObj) {
40079
- const keys = Object.keys(knownTags).map((key) => JSON.stringify(key)).join(", ");
40434
+ const keys = Object.keys(knownTags).map((key2) => JSON.stringify(key2)).join(", ");
40080
40435
  throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`);
40081
40436
  }
40082
40437
  tags2[i] = tagObj;
@@ -40110,12 +40465,12 @@ var require_Schema_bcc6c2d7 = __commonJS((exports) => {
40110
40465
  const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;
40111
40466
  return createNode(value2, tagName, createCtx);
40112
40467
  }
40113
- createPair(key, value2, ctx) {
40468
+ createPair(key2, value2, ctx) {
40114
40469
  if (!ctx)
40115
40470
  ctx = {
40116
40471
  wrapScalars: true
40117
40472
  };
40118
- const k = this.createNode(key, ctx.wrapScalars, null, ctx);
40473
+ const k = this.createNode(key2, ctx.wrapScalars, null, ctx);
40119
40474
  const v = this.createNode(value2, ctx.wrapScalars, null, ctx);
40120
40475
  return new resolveSeq.Pair(k, v);
40121
40476
  }
@@ -40276,7 +40631,7 @@ var require_Document_a8d0fbf9 = __commonJS((exports) => {
40276
40631
  }
40277
40632
  return props.join(" ");
40278
40633
  }
40279
- function stringify(item, ctx, onComment, onChompKeep) {
40634
+ function stringify3(item, ctx, onComment, onChompKeep) {
40280
40635
  const {
40281
40636
  anchors,
40282
40637
  schema
@@ -40582,9 +40937,9 @@ ${cbNode.commentBefore}` : cb;
40582
40937
  assertCollection(this.contents);
40583
40938
  this.contents.addIn(path2, value2);
40584
40939
  }
40585
- delete(key) {
40940
+ delete(key2) {
40586
40941
  assertCollection(this.contents);
40587
- return this.contents.delete(key);
40942
+ return this.contents.delete(key2);
40588
40943
  }
40589
40944
  deleteIn(path2) {
40590
40945
  if (resolveSeq.isEmptyPath(path2)) {
@@ -40599,25 +40954,25 @@ ${cbNode.commentBefore}` : cb;
40599
40954
  getDefaults() {
40600
40955
  return Document2.defaults[this.version] || Document2.defaults[this.options.version] || {};
40601
40956
  }
40602
- get(key, keepScalar) {
40603
- return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : undefined;
40957
+ get(key2, keepScalar) {
40958
+ return this.contents instanceof resolveSeq.Collection ? this.contents.get(key2, keepScalar) : undefined;
40604
40959
  }
40605
40960
  getIn(path2, keepScalar) {
40606
40961
  if (resolveSeq.isEmptyPath(path2))
40607
40962
  return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents;
40608
40963
  return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path2, keepScalar) : undefined;
40609
40964
  }
40610
- has(key) {
40611
- return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false;
40965
+ has(key2) {
40966
+ return this.contents instanceof resolveSeq.Collection ? this.contents.has(key2) : false;
40612
40967
  }
40613
40968
  hasIn(path2) {
40614
40969
  if (resolveSeq.isEmptyPath(path2))
40615
40970
  return this.contents !== undefined;
40616
40971
  return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path2) : false;
40617
40972
  }
40618
- set(key, value2) {
40973
+ set(key2, value2) {
40619
40974
  assertCollection(this.contents);
40620
- this.contents.set(key, value2);
40975
+ this.contents.set(key2, value2);
40621
40976
  }
40622
40977
  setIn(path2, value2) {
40623
40978
  if (resolveSeq.isEmptyPath(path2))
@@ -40713,7 +41068,7 @@ ${cbNode.commentBefore}` : cb;
40713
41068
  keep,
40714
41069
  mapAsMap: keep && !!mapAsMap,
40715
41070
  maxAliasCount,
40716
- stringify
41071
+ stringify: stringify3
40717
41072
  };
40718
41073
  const anchorNames = Object.keys(this.anchors.map);
40719
41074
  if (anchorNames.length > 0)
@@ -40775,7 +41130,7 @@ ${cbNode.commentBefore}` : cb;
40775
41130
  doc: this,
40776
41131
  indent: "",
40777
41132
  indentStep: " ".repeat(indentSize),
40778
- stringify
41133
+ stringify: stringify3
40779
41134
  };
40780
41135
  let chompKeep = false;
40781
41136
  let contentComment = null;
@@ -40789,10 +41144,10 @@ ${cbNode.commentBefore}` : cb;
40789
41144
  contentComment = this.contents.comment;
40790
41145
  }
40791
41146
  const onChompKeep = contentComment ? null : () => chompKeep = true;
40792
- const body = stringify(this.contents, ctx, () => contentComment = null, onChompKeep);
41147
+ const body = stringify3(this.contents, ctx, () => contentComment = null, onChompKeep);
40793
41148
  lines.push(resolveSeq.addComment(body, "", contentComment));
40794
41149
  } else if (this.contents !== undefined) {
40795
- lines.push(stringify(this.contents, ctx));
41150
+ lines.push(stringify3(this.contents, ctx));
40796
41151
  }
40797
41152
  if (this.comment) {
40798
41153
  if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "")
@@ -40860,7 +41215,7 @@ var require_dist = __commonJS((exports) => {
40860
41215
  throw doc.errors[0];
40861
41216
  return doc.toJSON();
40862
41217
  }
40863
- function stringify(value2, options) {
41218
+ function stringify3(value2, options) {
40864
41219
  const doc = new Document2(options);
40865
41220
  doc.contents = value2;
40866
41221
  return String(doc);
@@ -40874,7 +41229,7 @@ var require_dist = __commonJS((exports) => {
40874
41229
  parseCST: parseCst.parse,
40875
41230
  parseDocument,
40876
41231
  scalarOptions: Document$1.scalarOptions,
40877
- stringify
41232
+ stringify: stringify3
40878
41233
  };
40879
41234
  exports.YAML = YAML;
40880
41235
  });
@@ -41150,10 +41505,10 @@ var require_revalidator = __commonJS((exports, module) => {
41150
41505
  return true;
41151
41506
  var h2 = {};
41152
41507
  for (var i2 = 0, l2 = a.length;i2 < l2; i2++) {
41153
- var key = JSON.stringify(a[i2]);
41154
- if (h2[key])
41508
+ var key2 = JSON.stringify(a[i2]);
41509
+ if (h2[key2])
41155
41510
  return false;
41156
- h2[key] = true;
41511
+ h2[key2] = true;
41157
41512
  }
41158
41513
  return true;
41159
41514
  });
@@ -41259,33 +41614,33 @@ var require_dist2 = __commonJS((exports, module) => {
41259
41614
  });
41260
41615
 
41261
41616
  // src/transpile.ts
41262
- function jxKey(key) {
41263
- if (JX_DOLLAR_KEYS.has(key)) {
41264
- return `$${key}`;
41617
+ function jxKey(key2) {
41618
+ if (JX_DOLLAR_KEYS.has(key2)) {
41619
+ return `$${key2}`;
41265
41620
  }
41266
- if (key.startsWith("--") && JX_ANNOTATION_KEYS.has(key.slice(2))) {
41267
- return `$${key.slice(2)}`;
41621
+ if (key2.startsWith("--") && JX_ANNOTATION_KEYS.has(key2.slice(2))) {
41622
+ return `$${key2.slice(2)}`;
41268
41623
  }
41269
- return key;
41624
+ return key2;
41270
41625
  }
41271
- function mdKey(key) {
41272
- if (key.startsWith("$") && JX_DOLLAR_KEYS.has(key.slice(1))) {
41273
- return key.slice(1);
41626
+ function mdKey(key2) {
41627
+ if (key2.startsWith("$") && JX_DOLLAR_KEYS.has(key2.slice(1))) {
41628
+ return key2.slice(1);
41274
41629
  }
41275
- if (key.startsWith("$") && JX_ANNOTATION_KEYS.has(key.slice(1))) {
41276
- return `--${key.slice(1)}`;
41630
+ if (key2.startsWith("$") && JX_ANNOTATION_KEYS.has(key2.slice(1))) {
41631
+ return `--${key2.slice(1)}`;
41277
41632
  }
41278
- return key;
41633
+ return key2;
41279
41634
  }
41280
41635
  function expandDotPaths(attrs) {
41281
41636
  const result = {};
41282
- for (const [key, value2] of Object.entries(attrs)) {
41283
- const dotIndex = key.indexOf(".");
41637
+ for (const [key2, value2] of Object.entries(attrs)) {
41638
+ const dotIndex = key2.indexOf(".");
41284
41639
  if (dotIndex === -1) {
41285
- result[jxKey(key)] = value2;
41640
+ result[jxKey(key2)] = value2;
41286
41641
  continue;
41287
41642
  }
41288
- const segments = key.split(".");
41643
+ const segments = key2.split(".");
41289
41644
  let target = result;
41290
41645
  for (let i = 0;i < segments.length - 1; i++) {
41291
41646
  const seg = jxKey(segments[i]);
@@ -41301,8 +41656,8 @@ function expandDotPaths(attrs) {
41301
41656
  function collapseDotPaths(obj) {
41302
41657
  const result = {};
41303
41658
  function walk(node2, prefix) {
41304
- for (const [key, value2] of Object.entries(node2)) {
41305
- const path2 = prefix ? `${prefix}.${key}` : key;
41659
+ for (const [key2, value2] of Object.entries(node2)) {
41660
+ const path2 = prefix ? `${prefix}.${key2}` : key2;
41306
41661
  if (value2 && typeof value2 === "object" && !Array.isArray(value2)) {
41307
41662
  walk(value2, path2);
41308
41663
  } else {
@@ -41315,13 +41670,13 @@ function collapseDotPaths(obj) {
41315
41670
  }
41316
41671
  function applyStyleKeyMapping(styleObj) {
41317
41672
  const result = {};
41318
- for (const [key, value2] of Object.entries(styleObj)) {
41319
- if (CSS_PSEUDO_NAMES.has(key)) {
41320
- result[`:${key}`] = value2;
41321
- } else if (key.startsWith("--")) {
41322
- result[`@${key}`] = value2;
41673
+ for (const [key2, value2] of Object.entries(styleObj)) {
41674
+ if (CSS_PSEUDO_NAMES.has(key2)) {
41675
+ result[`:${key2}`] = value2;
41676
+ } else if (key2.startsWith("--")) {
41677
+ result[`@${key2}`] = value2;
41323
41678
  } else {
41324
- result[key] = value2;
41679
+ result[key2] = value2;
41325
41680
  }
41326
41681
  }
41327
41682
  return result;
@@ -41331,13 +41686,13 @@ function expandStylePaths(attrs) {
41331
41686
  }
41332
41687
  function collapseStylePaths(styleObj) {
41333
41688
  const normalized = {};
41334
- for (const [key, value2] of Object.entries(styleObj)) {
41335
- if (key.startsWith(":") && CSS_PSEUDO_NAMES.has(key.slice(1))) {
41336
- normalized[key.slice(1)] = value2;
41337
- } else if (key.startsWith("@--")) {
41338
- normalized[key.slice(1)] = value2;
41689
+ for (const [key2, value2] of Object.entries(styleObj)) {
41690
+ if (key2.startsWith(":") && CSS_PSEUDO_NAMES.has(key2.slice(1))) {
41691
+ normalized[key2.slice(1)] = value2;
41692
+ } else if (key2.startsWith("@--")) {
41693
+ normalized[key2.slice(1)] = value2;
41339
41694
  } else {
41340
- normalized[key] = value2;
41695
+ normalized[key2] = value2;
41341
41696
  }
41342
41697
  }
41343
41698
  return collapseDotPaths(normalized);
@@ -41356,11 +41711,11 @@ function routeAttributes(attrs) {
41356
41711
  }
41357
41712
  const props = {};
41358
41713
  const attributes4 = {};
41359
- for (const [key, value2] of Object.entries(expanded)) {
41360
- if (HTML_ATTR_PATTERN.test(key)) {
41361
- attributes4[key] = value2;
41714
+ for (const [key2, value2] of Object.entries(expanded)) {
41715
+ if (HTML_ATTR_PATTERN.test(key2)) {
41716
+ attributes4[key2] = value2;
41362
41717
  } else {
41363
- props[key] = value2;
41718
+ props[key2] = value2;
41364
41719
  }
41365
41720
  }
41366
41721
  return { attributes: attributes4, props };
@@ -41468,6 +41823,14 @@ function mdastNodeToJx(node2) {
41468
41823
  }
41469
41824
  case "table": {
41470
41825
  const rows = convertChildren(node2.children ?? []);
41826
+ const [headerRow] = rows;
41827
+ if (headerRow && typeof headerRow === "object" && Array.isArray(headerRow.children)) {
41828
+ for (const cell of headerRow.children) {
41829
+ if (cell && typeof cell === "object" && cell.tagName === "td") {
41830
+ cell.tagName = "th";
41831
+ }
41832
+ }
41833
+ }
41471
41834
  const thead = rows.length > 0 ? { children: [rows[0]], tagName: "thead" } : null;
41472
41835
  const tbody = rows.length > 1 ? { children: rows.slice(1), tagName: "tbody" } : null;
41473
41836
  el.children = [thead, tbody].filter(Boolean);
@@ -41488,27 +41851,27 @@ function directiveToJx(node2) {
41488
41851
  const { props, attributes: attributes4 } = routeAttributes(node2.attributes);
41489
41852
  const isCustomElement = node2.name.includes("-");
41490
41853
  if (isCustomElement) {
41491
- for (const [key, value2] of Object.entries(props)) {
41492
- if (key === "style" || key === "children" || key === "textContent" || key === "innerHTML" || key.startsWith("$")) {
41493
- el[key] = value2;
41494
- } else if (key === "props") {
41854
+ for (const [key2, value2] of Object.entries(props)) {
41855
+ if (key2 === "style" || key2 === "children" || key2 === "textContent" || key2 === "innerHTML" || key2.startsWith("$")) {
41856
+ el[key2] = value2;
41857
+ } else if (key2 === "props") {
41495
41858
  el.$props = value2;
41496
41859
  } else {
41497
41860
  if (!el.attributes) {
41498
41861
  el.attributes = {};
41499
41862
  }
41500
- el.attributes[key] = value2;
41863
+ el.attributes[key2] = value2;
41501
41864
  }
41502
41865
  }
41503
41866
  } else {
41504
- for (const [key, value2] of Object.entries(props)) {
41505
- if (key === "style" || key === "children" || key === "textContent" || key === "innerHTML" || key === "id" || key === "className" || key === "hidden" || key === "tabIndex" || key === "lang" || key === "dir" || key.startsWith("$") || key.startsWith("on")) {
41506
- el[key] = value2;
41867
+ for (const [key2, value2] of Object.entries(props)) {
41868
+ if (key2 === "style" || key2 === "children" || key2 === "textContent" || key2 === "innerHTML" || key2 === "id" || key2 === "className" || key2 === "hidden" || key2 === "tabIndex" || key2 === "lang" || key2 === "dir" || key2.startsWith("$") || key2.startsWith("on")) {
41869
+ el[key2] = value2;
41507
41870
  } else {
41508
41871
  if (!el.attributes) {
41509
41872
  el.attributes = {};
41510
41873
  }
41511
- el.attributes[key] = value2;
41874
+ el.attributes[key2] = value2;
41512
41875
  }
41513
41876
  }
41514
41877
  }
@@ -41570,11 +41933,11 @@ function prototypeDirectiveToJx(node2) {
41570
41933
  const el = { $prototype: node2.name };
41571
41934
  if (node2.attributes && Object.keys(node2.attributes).length > 0) {
41572
41935
  const expanded = expandDotPaths(node2.attributes);
41573
- for (const [key, value2] of Object.entries(expanded)) {
41574
- if (key === "$prototype") {
41936
+ for (const [key2, value2] of Object.entries(expanded)) {
41937
+ if (key2 === "$prototype") {
41575
41938
  continue;
41576
41939
  }
41577
- el[key] = value2;
41940
+ el[key2] = value2;
41578
41941
  }
41579
41942
  }
41580
41943
  const children = convertChildren(node2.children ?? []);
@@ -41597,8 +41960,8 @@ function transpileJxMarkdown(source) {
41597
41960
  processor.runSync(tree, vfile2);
41598
41961
  const frontmatter2 = vfile2.data?.frontmatter ?? {};
41599
41962
  const doc = {};
41600
- for (const [key, value2] of Object.entries(frontmatter2)) {
41601
- doc[key] = value2;
41963
+ for (const [key2, value2] of Object.entries(frontmatter2)) {
41964
+ doc[key2] = value2;
41602
41965
  }
41603
41966
  const bodyNodes = tree.children.filter((n) => n.type !== "yaml" && n.type !== "toml");
41604
41967
  const children = [];
@@ -41618,7 +41981,55 @@ function transpileJxMarkdown(source) {
41618
41981
  }
41619
41982
  return doc;
41620
41983
  }
41621
- var import_remark_parse_frontmatter, JX_DOLLAR_KEYS, PROTOTYPE_DIRECTIVE_NAMES, JX_ANNOTATION_KEYS, CSS_PSEUDO_NAMES, HTML_ATTR_PATTERN, PHRASING_ELEMENTS, JX_TAG_MAP;
41984
+ function slugifyHeading(text5) {
41985
+ return text5.toLowerCase().replaceAll(/[^\w\s-]/g, "").replaceAll(/\s+/g, "-").replaceAll(/-+/g, "-").replaceAll(/^-|-$/g, "");
41986
+ }
41987
+ function jxNodeText(node2) {
41988
+ if (typeof node2 === "string") {
41989
+ return node2;
41990
+ }
41991
+ let out = typeof node2.textContent === "string" ? node2.textContent : "";
41992
+ if (Array.isArray(node2.children)) {
41993
+ for (const child of node2.children) {
41994
+ out += jxNodeText(child);
41995
+ }
41996
+ }
41997
+ return out;
41998
+ }
41999
+ function assignHeadingIds(children) {
42000
+ const entries = [];
42001
+ const seen = new Map;
42002
+ function walk(nodes) {
42003
+ for (const node2 of nodes) {
42004
+ if (typeof node2 !== "object" || node2 === null) {
42005
+ continue;
42006
+ }
42007
+ const tag = node2.tagName;
42008
+ if (tag && HEADING_TAGS.has(tag)) {
42009
+ const text5 = jxNodeText(node2).trim();
42010
+ let id = typeof node2.id === "string" && node2.id.length > 0 ? node2.id : "";
42011
+ if (id) {
42012
+ seen.set(id, (seen.get(id) ?? 0) + 1);
42013
+ } else {
42014
+ const base2 = slugifyHeading(text5) || "section";
42015
+ const count = seen.get(base2) ?? 0;
42016
+ id = count === 0 ? base2 : `${base2}-${count + 1}`;
42017
+ seen.set(base2, count + 1);
42018
+ node2.id = id;
42019
+ }
42020
+ entries.push({ depth: Number(tag.slice(1)), id, text: text5 });
42021
+ }
42022
+ if (Array.isArray(node2.children)) {
42023
+ walk(node2.children);
42024
+ }
42025
+ }
42026
+ }
42027
+ if (children) {
42028
+ walk(children);
42029
+ }
42030
+ return entries;
42031
+ }
42032
+ var import_remark_parse_frontmatter, JX_DOLLAR_KEYS, PROTOTYPE_DIRECTIVE_NAMES, JX_ANNOTATION_KEYS, CSS_PSEUDO_NAMES, HTML_ATTR_PATTERN, PHRASING_ELEMENTS, JX_TAG_MAP, HEADING_TAGS;
41622
42033
  var init_transpile = __esm(() => {
41623
42034
  init_unified();
41624
42035
  init_remark_parse();
@@ -41707,6 +42118,7 @@ var init_transpile = __esm(() => {
41707
42118
  tableRow: () => "tr",
41708
42119
  thematicBreak: () => "hr"
41709
42120
  };
42121
+ HEADING_TAGS = new Set(["h1", "h2", "h3", "h4", "h5", "h6"]);
41710
42122
  });
41711
42123
 
41712
42124
  // src/serialize.ts
@@ -41857,11 +42269,11 @@ function prototypeDirectiveToJx2(node2) {
41857
42269
  const el = { $prototype: node2.name };
41858
42270
  if (node2.attributes && Object.keys(node2.attributes).length > 0) {
41859
42271
  const expanded = expandDotPaths(node2.attributes);
41860
- for (const [key, value2] of Object.entries(expanded)) {
41861
- if (key === "$prototype") {
42272
+ for (const [key2, value2] of Object.entries(expanded)) {
42273
+ if (key2 === "$prototype") {
41862
42274
  continue;
41863
42275
  }
41864
- el[key] = value2;
42276
+ el[key2] = value2;
41865
42277
  }
41866
42278
  }
41867
42279
  if (node2.children?.length) {
@@ -41886,8 +42298,8 @@ function normalizeAllowlist(allowlist) {
41886
42298
  return allowlist instanceof Set ? allowlist : new Set(allowlist);
41887
42299
  }
41888
42300
  function hasJxProps(el) {
41889
- for (const key of Object.keys(el)) {
41890
- if (key === "tagName" || key === "children" || key === "textContent" || key === "innerHTML" || key === "attributes") {
42301
+ for (const key2 of Object.keys(el)) {
42302
+ if (key2 === "tagName" || key2 === "children" || key2 === "textContent" || key2 === "innerHTML" || key2 === "attributes") {
41891
42303
  continue;
41892
42304
  }
41893
42305
  return true;
@@ -42032,21 +42444,21 @@ function convertJxNode(el, isBlock, allowlist) {
42032
42444
  }
42033
42445
  function collectDirectiveAttrs(el) {
42034
42446
  const propsObj = {};
42035
- for (const [key, value2] of Object.entries(el)) {
42036
- if (key === "tagName" || key === "textContent" || key === "innerHTML" || key === "attributes") {
42447
+ for (const [key2, value2] of Object.entries(el)) {
42448
+ if (key2 === "tagName" || key2 === "textContent" || key2 === "innerHTML" || key2 === "attributes") {
42037
42449
  continue;
42038
42450
  }
42039
- if (key === "children") {
42451
+ if (key2 === "children") {
42040
42452
  if (value2 && typeof value2 === "object" && !Array.isArray(value2)) {
42041
42453
  propsObj.children = value2;
42042
42454
  }
42043
42455
  continue;
42044
42456
  }
42045
- propsObj[key] = value2;
42457
+ propsObj[key2] = value2;
42046
42458
  }
42047
42459
  if (el.attributes) {
42048
- for (const [key, value2] of Object.entries(el.attributes)) {
42049
- propsObj[key] = value2;
42460
+ for (const [key2, value2] of Object.entries(el.attributes)) {
42461
+ propsObj[key2] = value2;
42050
42462
  }
42051
42463
  }
42052
42464
  return collapsePropsToAttrMap(propsObj);
@@ -42099,11 +42511,11 @@ function convertToDirective(el, isBlock, allowlist) {
42099
42511
  }
42100
42512
  function prototypeToDirective(el, isBlock, allowlist) {
42101
42513
  const propsObj = {};
42102
- for (const [key, value2] of Object.entries(el)) {
42103
- if (key === "$prototype" || key === "map" || key === "tagName") {
42514
+ for (const [key2, value2] of Object.entries(el)) {
42515
+ if (key2 === "$prototype" || key2 === "map" || key2 === "tagName") {
42104
42516
  continue;
42105
42517
  }
42106
- propsObj[key] = value2;
42518
+ propsObj[key2] = value2;
42107
42519
  }
42108
42520
  const attrs = collapsePropsToAttrMap(propsObj);
42109
42521
  const mapNode = el.map ? convertJxNode(el.map, isBlock, allowlist) : null;
@@ -42118,25 +42530,25 @@ function prototypeToDirective(el, isBlock, allowlist) {
42118
42530
  function collapsePropsToAttrMap(propsObj) {
42119
42531
  const result = {};
42120
42532
  function walk(obj, prefix) {
42121
- for (const [key, value2] of Object.entries(obj)) {
42122
- let mdAttrKey = key;
42123
- if (JX_DOLLAR_KEYS2.has(key)) {
42124
- mdAttrKey = key.slice(1);
42533
+ for (const [key2, value2] of Object.entries(obj)) {
42534
+ let mdAttrKey = key2;
42535
+ if (JX_DOLLAR_KEYS2.has(key2)) {
42536
+ mdAttrKey = key2.slice(1);
42125
42537
  }
42126
- if (JX_ANNOTATION_KEYS2.has(key)) {
42127
- mdAttrKey = `--${key.slice(1)}`;
42538
+ if (JX_ANNOTATION_KEYS2.has(key2)) {
42539
+ mdAttrKey = `--${key2.slice(1)}`;
42128
42540
  }
42129
- if (key.startsWith(":") && CSS_PSEUDO_NAMES2.has(key.slice(1))) {
42130
- mdAttrKey = key.slice(1);
42541
+ if (key2.startsWith(":") && CSS_PSEUDO_NAMES2.has(key2.slice(1))) {
42542
+ mdAttrKey = key2.slice(1);
42131
42543
  }
42132
- if (key === "@") {
42544
+ if (key2 === "@") {
42133
42545
  if (value2 && typeof value2 === "object" && !Array.isArray(value2)) {
42134
42546
  walk(value2, prefix);
42135
42547
  }
42136
42548
  continue;
42137
42549
  }
42138
- if (key.startsWith("@--")) {
42139
- mdAttrKey = key.slice(1);
42550
+ if (key2.startsWith("@--")) {
42551
+ mdAttrKey = key2.slice(1);
42140
42552
  }
42141
42553
  const fullKey = prefix ? `${prefix}.${mdAttrKey}` : mdAttrKey;
42142
42554
  if (value2 && typeof value2 === "object" && !Array.isArray(value2)) {
@@ -42308,12 +42720,12 @@ function inlineComponent(node2, tag, ctx) {
42308
42720
  }
42309
42721
  const props = node2.$props ?? {};
42310
42722
  const stateDefs = { ...def.state };
42311
- for (const [key, value2] of Object.entries(props)) {
42312
- if (key in stateDefs) {
42313
- const existing = stateDefs[key];
42314
- stateDefs[key] = existing && typeof existing === "object" && !Array.isArray(existing) && "default" in existing ? { ...existing, default: value2 } : value2;
42723
+ for (const [key2, value2] of Object.entries(props)) {
42724
+ if (key2 in stateDefs) {
42725
+ const existing = stateDefs[key2];
42726
+ stateDefs[key2] = existing && typeof existing === "object" && !Array.isArray(existing) && "default" in existing ? { ...existing, default: value2 } : value2;
42315
42727
  } else {
42316
- stateDefs[key] = value2;
42728
+ stateDefs[key2] = value2;
42317
42729
  }
42318
42730
  }
42319
42731
  const scope = ctx.buildScope?.(stateDefs) ?? null;
@@ -42399,12 +42811,12 @@ function resolveMapNode(node2, item) {
42399
42811
  return node2;
42400
42812
  }
42401
42813
  const result = { ...node2 };
42402
- for (const [key, value2] of Object.entries(result)) {
42814
+ for (const [key2, value2] of Object.entries(result)) {
42403
42815
  if (value2 && typeof value2 === "object" && value2.$ref) {
42404
42816
  const ref = value2.$ref;
42405
42817
  if (ref.startsWith("$map/")) {
42406
42818
  const path2 = ref.slice("$map/".length);
42407
- result[key] = resolvePath(item, path2.startsWith("item/") ? path2.slice("item/".length) : path2);
42819
+ result[key2] = resolvePath(item, path2.startsWith("item/") ? path2.slice("item/".length) : path2);
42408
42820
  }
42409
42821
  }
42410
42822
  }
@@ -42719,11 +43131,11 @@ function serializeRoundtrip(doc, opts) {
42719
43131
  const lines = [];
42720
43132
  if (opts.frontmatter !== false) {
42721
43133
  const frontmatter2 = {};
42722
- for (const [key, value2] of Object.entries(doc)) {
42723
- if (key === "children") {
43134
+ for (const [key2, value2] of Object.entries(doc)) {
43135
+ if (key2 === "children") {
42724
43136
  continue;
42725
43137
  }
42726
- frontmatter2[key] = value2;
43138
+ frontmatter2[key2] = value2;
42727
43139
  }
42728
43140
  if (Object.keys(frontmatter2).length > 0) {
42729
43141
  lines.push("---", $stringify(frontmatter2).trim(), "---", "");