mystmd 1.1.53__py3-none-any.whl → 1.1.55__py3-none-any.whl

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.
mystmd_py/myst.cjs CHANGED
@@ -2150,7 +2150,7 @@ var require_es_json_stringify = __commonJS({
2150
2150
  if ($stringify) {
2151
2151
  $2({ target: "JSON", stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
2152
2152
  // eslint-disable-next-line no-unused-vars -- required for `.length`
2153
- stringify: function stringify4(it, replacer, space2) {
2153
+ stringify: function stringify4(it, replacer, space3) {
2154
2154
  var args = arraySlice(arguments);
2155
2155
  var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
2156
2156
  return ILL_FORMED_UNICODE && typeof result == "string" ? replace(result, tester, fixIllFormed) : result;
@@ -17922,7 +17922,7 @@ var require_esnext_json_parse = __commonJS({
17922
17922
  return 1 / nativeParse("-0 ") !== -Infinity;
17923
17923
  });
17924
17924
  $2({ target: "JSON", stat: true, forced: NO_SOURCE_SUPPORT }, {
17925
- parse: function parse12(text7, reviver) {
17925
+ parse: function parse13(text7, reviver) {
17926
17926
  return PROPER_BASE_PARSE && !isCallable(reviver) ? nativeParse(text7) : $parse(text7, reviver);
17927
17927
  }
17928
17928
  });
@@ -17949,7 +17949,7 @@ var require_esnext_json_raw_json = __commonJS({
17949
17949
  var setInternalState = require_internal_state().set;
17950
17950
  var $String = String;
17951
17951
  var $SyntaxError = SyntaxError;
17952
- var parse12 = getBuiltIn("JSON", "parse");
17952
+ var parse13 = getBuiltIn("JSON", "parse");
17953
17953
  var $stringify = getBuiltIn("JSON", "stringify");
17954
17954
  var create3 = getBuiltIn("Object", "create");
17955
17955
  var freeze2 = getBuiltIn("Object", "freeze");
@@ -17967,7 +17967,7 @@ var require_esnext_json_raw_json = __commonJS({
17967
17967
  if (jsonString == "" || exec3(IS_WHITESPACE, at(jsonString, 0)) || exec3(IS_WHITESPACE, at(jsonString, jsonString.length - 1))) {
17968
17968
  throw $SyntaxError(ERROR_MESSAGE);
17969
17969
  }
17970
- var parsed = parse12(jsonString);
17970
+ var parsed = parse13(jsonString);
17971
17971
  if (typeof parsed == "object" && parsed !== null)
17972
17972
  throw $SyntaxError(ERROR_MESSAGE);
17973
17973
  var obj = create3(null);
@@ -17978,13 +17978,13 @@ var require_esnext_json_raw_json = __commonJS({
17978
17978
  });
17979
17979
  if ($stringify)
17980
17980
  $2({ target: "JSON", stat: true, arity: 3, forced: !NATIVE_RAW_JSON }, {
17981
- stringify: function stringify4(text7, replacer, space2) {
17981
+ stringify: function stringify4(text7, replacer, space3) {
17982
17982
  var replacerFunction = getReplacerFunction(replacer);
17983
17983
  var rawStrings = [];
17984
17984
  var json2 = $stringify(text7, function(key2, value) {
17985
17985
  var v = isCallable(replacerFunction) ? call(replacerFunction, this, $String(key2), value) : value;
17986
17986
  return isRawJSON(v) ? MARK + (push(rawStrings, v.rawJSON) - 1) : v;
17987
- }, space2);
17987
+ }, space3);
17988
17988
  if (typeof json2 != "string")
17989
17989
  return json2;
17990
17990
  var result = "";
@@ -23034,9 +23034,9 @@ var require_spdx_expression_parse = __commonJS({
23034
23034
  "../../node_modules/spdx-expression-parse/index.js"(exports2, module2) {
23035
23035
  "use strict";
23036
23036
  var scan2 = require_scan();
23037
- var parse12 = require_parse();
23037
+ var parse13 = require_parse();
23038
23038
  module2.exports = function(source2) {
23039
- return parse12(scan2(source2));
23039
+ return parse13(scan2(source2));
23040
23040
  };
23041
23041
  }
23042
23042
  });
@@ -23044,11 +23044,11 @@ var require_spdx_expression_parse = __commonJS({
23044
23044
  // ../../node_modules/spdx-correct/index.js
23045
23045
  var require_spdx_correct = __commonJS({
23046
23046
  "../../node_modules/spdx-correct/index.js"(exports2, module2) {
23047
- var parse12 = require_spdx_expression_parse();
23047
+ var parse13 = require_spdx_expression_parse();
23048
23048
  var spdxLicenseIds = require_spdx_license_ids();
23049
23049
  function valid2(string2) {
23050
23050
  try {
23051
- parse12(string2);
23051
+ parse13(string2);
23052
23052
  return true;
23053
23053
  } catch (error) {
23054
23054
  return false;
@@ -23684,7 +23684,7 @@ var require_parser_context = __commonJS({
23684
23684
  }
23685
23685
  return result;
23686
23686
  }
23687
- function parse12() {
23687
+ function parse13() {
23688
23688
  var res = parseSelector3();
23689
23689
  if (pos < l) {
23690
23690
  throw Error('Rule expected but "' + str2.charAt(pos) + '" found.');
@@ -23879,7 +23879,7 @@ var require_parser_context = __commonJS({
23879
23879
  }
23880
23880
  return rule;
23881
23881
  }
23882
- return parse12();
23882
+ return parse13();
23883
23883
  }
23884
23884
  exports2.parseCssSelector = parseCssSelector;
23885
23885
  }
@@ -38543,8 +38543,8 @@ var require_empty = __commonJS({
38543
38543
  Object.defineProperty(exports2, "__esModule", {
38544
38544
  value: true
38545
38545
  });
38546
- exports2.parse = parse12;
38547
- function parse12() {
38546
+ exports2.parse = parse13;
38547
+ function parse13() {
38548
38548
  return [];
38549
38549
  }
38550
38550
  }
@@ -38587,8 +38587,8 @@ var require_jquery = __commonJS({
38587
38587
  Object.defineProperty(exports2, "__esModule", {
38588
38588
  value: true
38589
38589
  });
38590
- exports2.parse = parse12;
38591
- function parse12(input3) {
38590
+ exports2.parse = parse13;
38591
+ function parse13(input3) {
38592
38592
  return input3.val() || input3.text() || input3.html();
38593
38593
  }
38594
38594
  }
@@ -38601,8 +38601,8 @@ var require_html3 = __commonJS({
38601
38601
  Object.defineProperty(exports2, "__esModule", {
38602
38602
  value: true
38603
38603
  });
38604
- exports2.parse = parse12;
38605
- function parse12(input3) {
38604
+ exports2.parse = parse13;
38605
+ function parse13(input3) {
38606
38606
  return input3.value || input3.textContent;
38607
38607
  }
38608
38608
  }
@@ -46655,7 +46655,7 @@ var require_container = __commonJS({
46655
46655
  var Declaration = require_declaration();
46656
46656
  var Comment = require_comment();
46657
46657
  var Node = require_node2();
46658
- var parse12;
46658
+ var parse13;
46659
46659
  var Rule;
46660
46660
  var AtRule;
46661
46661
  var Root;
@@ -46808,7 +46808,7 @@ var require_container = __commonJS({
46808
46808
  }
46809
46809
  normalize(nodes, sample2) {
46810
46810
  if (typeof nodes === "string") {
46811
- nodes = cleanSource(parse12(nodes).nodes);
46811
+ nodes = cleanSource(parse13(nodes).nodes);
46812
46812
  } else if (Array.isArray(nodes)) {
46813
46813
  nodes = nodes.slice(0);
46814
46814
  for (let i2 of nodes) {
@@ -47013,7 +47013,7 @@ var require_container = __commonJS({
47013
47013
  }
47014
47014
  };
47015
47015
  Container.registerParse = (dependant) => {
47016
- parse12 = dependant;
47016
+ parse13 = dependant;
47017
47017
  };
47018
47018
  Container.registerRule = (dependant) => {
47019
47019
  Rule = dependant;
@@ -47897,7 +47897,7 @@ var require_parse3 = __commonJS({
47897
47897
  var Container = require_container();
47898
47898
  var Parser3 = require_parser3();
47899
47899
  var Input = require_input4();
47900
- function parse12(css, opts) {
47900
+ function parse13(css, opts) {
47901
47901
  let input3 = new Input(css, opts);
47902
47902
  let parser3 = new Parser3(input3);
47903
47903
  try {
@@ -47918,9 +47918,9 @@ var require_parse3 = __commonJS({
47918
47918
  }
47919
47919
  return parser3.root;
47920
47920
  }
47921
- module2.exports = parse12;
47922
- parse12.default = parse12;
47923
- Container.registerParse(parse12);
47921
+ module2.exports = parse13;
47922
+ parse13.default = parse13;
47923
+ Container.registerParse(parse13);
47924
47924
  }
47925
47925
  });
47926
47926
 
@@ -47935,7 +47935,7 @@ var require_lazy_result = __commonJS({
47935
47935
  var Document2 = require_document();
47936
47936
  var warnOnce = require_warn_once();
47937
47937
  var Result = require_result();
47938
- var parse12 = require_parse3();
47938
+ var parse13 = require_parse3();
47939
47939
  var Root = require_root();
47940
47940
  var TYPE_TO_CLASS_NAME = {
47941
47941
  atrule: "AtRule",
@@ -48038,7 +48038,7 @@ var require_lazy_result = __commonJS({
48038
48038
  opts.map.prev = css.map;
48039
48039
  }
48040
48040
  } else {
48041
- let parser3 = parse12;
48041
+ let parser3 = parse13;
48042
48042
  if (opts.syntax)
48043
48043
  parser3 = opts.syntax.parse;
48044
48044
  if (opts.parser)
@@ -48425,7 +48425,7 @@ var require_no_work_result = __commonJS({
48425
48425
  var MapGenerator = require_map_generator();
48426
48426
  var stringify4 = require_stringify2();
48427
48427
  var warnOnce = require_warn_once();
48428
- var parse12 = require_parse3();
48428
+ var parse13 = require_parse3();
48429
48429
  var Result = require_result();
48430
48430
  var NoWorkResult = class {
48431
48431
  constructor(processor2, css, opts) {
@@ -48514,7 +48514,7 @@ var require_no_work_result = __commonJS({
48514
48514
  return this._root;
48515
48515
  }
48516
48516
  let root6;
48517
- let parser3 = parse12;
48517
+ let parser3 = parse13;
48518
48518
  try {
48519
48519
  root6 = parser3(this._css, this._opts);
48520
48520
  } catch (error) {
@@ -48668,7 +48668,7 @@ var require_postcss = __commonJS({
48668
48668
  var AtRule = require_at_rule();
48669
48669
  var Result = require_result();
48670
48670
  var Input = require_input4();
48671
- var parse12 = require_parse3();
48671
+ var parse13 = require_parse3();
48672
48672
  var list6 = require_list();
48673
48673
  var Rule = require_rule();
48674
48674
  var Root = require_root();
@@ -48712,7 +48712,7 @@ var require_postcss = __commonJS({
48712
48712
  return creator;
48713
48713
  };
48714
48714
  postcss.stringify = stringify4;
48715
- postcss.parse = parse12;
48715
+ postcss.parse = parse13;
48716
48716
  postcss.fromJSON = fromJSON;
48717
48717
  postcss.list = list6;
48718
48718
  postcss.comment = (defaults4) => new Comment(defaults4);
@@ -48901,12 +48901,12 @@ and ensure you are accounting for this risk.
48901
48901
  });
48902
48902
  const transformTagsMap = {};
48903
48903
  let transformTagsAll;
48904
- each2(options.transformTags, function(transform2, tag) {
48904
+ each2(options.transformTags, function(transform3, tag) {
48905
48905
  let transFun;
48906
- if (typeof transform2 === "function") {
48907
- transFun = transform2;
48908
- } else if (typeof transform2 === "string") {
48909
- transFun = sanitizeHtml2.simpleTransform(transform2);
48906
+ if (typeof transform3 === "function") {
48907
+ transFun = transform3;
48908
+ } else if (typeof transform3 === "string") {
48909
+ transFun = sanitizeHtml2.simpleTransform(transform3);
48910
48910
  }
48911
48911
  if (tag === "*") {
48912
48912
  transformTagsAll = transFun;
@@ -50123,13 +50123,13 @@ var require_moo = __commonJS({
50123
50123
  var lineBreaks = 0;
50124
50124
  if (group3.lineBreaks) {
50125
50125
  var matchNL = /\n/g;
50126
- var nl = 1;
50126
+ var nl3 = 1;
50127
50127
  if (text7 === "\n") {
50128
50128
  lineBreaks = 1;
50129
50129
  } else {
50130
50130
  while (matchNL.exec(text7)) {
50131
50131
  lineBreaks++;
50132
- nl = matchNL.lastIndex;
50132
+ nl3 = matchNL.lastIndex;
50133
50133
  }
50134
50134
  }
50135
50135
  }
@@ -50147,7 +50147,7 @@ var require_moo = __commonJS({
50147
50147
  this.index += size;
50148
50148
  this.line += lineBreaks;
50149
50149
  if (lineBreaks !== 0) {
50150
- this.col = size - nl + 1;
50150
+ this.col = size - nl3 + 1;
50151
50151
  } else {
50152
50152
  this.col += size;
50153
50153
  }
@@ -50583,7 +50583,7 @@ var require_file = __commonJS({
50583
50583
  value: true
50584
50584
  });
50585
50585
  exports2.bibtexGrammar = void 0;
50586
- exports2.parse = parse12;
50586
+ exports2.parse = parse13;
50587
50587
  var _core3 = require_lib6();
50588
50588
  var _moo = _interopRequireDefault3(require_moo());
50589
50589
  var _constants = require_constants();
@@ -50860,7 +50860,7 @@ var require_file = __commonJS({
50860
50860
  }, {
50861
50861
  strings: _constants.defaultStrings
50862
50862
  });
50863
- function parse12(text7) {
50863
+ function parse13(text7) {
50864
50864
  return bibtexGrammar.parse(lexer.reset(text7));
50865
50865
  }
50866
50866
  }
@@ -52698,7 +52698,7 @@ var require_mapping = __commonJS({
52698
52698
  });
52699
52699
  exports2.format = format;
52700
52700
  exports2.formatBibtex = formatBibtex;
52701
- exports2.parse = parse12;
52701
+ exports2.parse = parse13;
52702
52702
  exports2.parseBibtex = parseBibtex;
52703
52703
  var _shared = require_shared3();
52704
52704
  var _biblatex = _interopRequireDefault3(require_biblatex());
@@ -52818,7 +52818,7 @@ var require_mapping = __commonJS({
52818
52818
  function formatBibtex(input3) {
52819
52819
  return _format(input3, _bibtex.default);
52820
52820
  }
52821
- function parse12(input3) {
52821
+ function parse13(input3) {
52822
52822
  return _parse(input3, _biblatex.default);
52823
52823
  }
52824
52824
  function format(input3) {
@@ -52937,7 +52937,7 @@ var require_value = __commonJS({
52937
52937
  Object.defineProperty(exports2, "__esModule", {
52938
52938
  value: true
52939
52939
  });
52940
- exports2.parse = parse12;
52940
+ exports2.parse = parse13;
52941
52941
  exports2.valueGrammar = void 0;
52942
52942
  var _core3 = require_lib6();
52943
52943
  var _moo = _interopRequireDefault3(require_moo());
@@ -53416,7 +53416,7 @@ var require_value = __commonJS({
53416
53416
  return "stringLiteral";
53417
53417
  }
53418
53418
  }
53419
- function parse12(text8, field, languages = []) {
53419
+ function parse13(text8, field, languages = []) {
53420
53420
  const fieldType = constants2.fieldTypes[field] || [];
53421
53421
  return valueGrammar.parse(lexer.reset(text8, {
53422
53422
  state: getLexerState(fieldType),
@@ -53434,7 +53434,7 @@ var require_entries = __commonJS({
53434
53434
  Object.defineProperty(exports2, "__esModule", {
53435
53435
  value: true
53436
53436
  });
53437
- exports2.parse = parse12;
53437
+ exports2.parse = parse13;
53438
53438
  exports2.parseBibtex = parseBibtex;
53439
53439
  var _config2 = _interopRequireDefault3(require_config2());
53440
53440
  var _index4 = require_mapping();
@@ -53532,7 +53532,7 @@ var require_entries = __commonJS({
53532
53532
  properties: output2
53533
53533
  });
53534
53534
  }
53535
- function parse12(entries2) {
53535
+ function parse13(entries2) {
53536
53536
  if (_config2.default.parse.strict) {
53537
53537
  validate5(entries2, _constants.required.biblatex);
53538
53538
  }
@@ -57645,18 +57645,18 @@ var require_citeproc_commonjs = __commonJS({
57645
57645
  item.locator = Item.section;
57646
57646
  } else {
57647
57647
  var m2 = item.locator.match(/^([^ ]*)\s*(.*)/);
57648
- var space2 = " ";
57648
+ var space3 = " ";
57649
57649
  if (m2) {
57650
57650
  if (m2[1] === "p." && sectionMasterLabel !== "p.") {
57651
57651
  item.locator = m2[2];
57652
57652
  }
57653
57653
  if (["[", "(", ".", ",", ";", ":", "?"].indexOf(item.locator.slice(0, 1)) > -1) {
57654
- space2 = "";
57654
+ space3 = "";
57655
57655
  }
57656
57656
  } else {
57657
- space2 = "";
57657
+ space3 = "";
57658
57658
  }
57659
- item.locator = Item.section + space2 + item.locator;
57659
+ item.locator = Item.section + space3 + item.locator;
57660
57660
  }
57661
57661
  }
57662
57662
  item.label = "";
@@ -64581,13 +64581,13 @@ var require_citeproc_commonjs = __commonJS({
64581
64581
  if (second.strings.prefix) {
64582
64582
  name3["comma-dropping-particle"] = "";
64583
64583
  }
64584
- var space2;
64584
+ var space3;
64585
64585
  if (this.state.inheritOpt(this.name, "initialize-with") && this.state.inheritOpt(this.name, "initialize-with").match(/[\u00a0\ufeff]/) && givenInfo.initializationLevel === 1) {
64586
- space2 = nbspace;
64586
+ space3 = nbspace;
64587
64587
  } else {
64588
- space2 = " ";
64588
+ space3 = " ";
64589
64589
  }
64590
- blob = this._join([given, second], name3["comma-dropping-particle"] + space2);
64590
+ blob = this._join([given, second], name3["comma-dropping-particle"] + space3);
64591
64591
  }
64592
64592
  this.state.tmp.group_context.tip.variable_success = true;
64593
64593
  this.state.tmp.can_substitute.replace(false, CSL.LITERAL);
@@ -90006,8 +90006,8 @@ var require_semver = __commonJS({
90006
90006
  }
90007
90007
  }
90008
90008
  var i2;
90009
- exports2.parse = parse12;
90010
- function parse12(version4, options) {
90009
+ exports2.parse = parse13;
90010
+ function parse13(version4, options) {
90011
90011
  if (!options || typeof options !== "object") {
90012
90012
  options = {
90013
90013
  loose: !!options,
@@ -90035,12 +90035,12 @@ var require_semver = __commonJS({
90035
90035
  }
90036
90036
  exports2.valid = valid2;
90037
90037
  function valid2(version4, options) {
90038
- var v = parse12(version4, options);
90038
+ var v = parse13(version4, options);
90039
90039
  return v ? v.version : null;
90040
90040
  }
90041
90041
  exports2.clean = clean3;
90042
90042
  function clean3(version4, options) {
90043
- var s5 = parse12(version4.trim().replace(/^[=v]+/, ""), options);
90043
+ var s5 = parse13(version4.trim().replace(/^[=v]+/, ""), options);
90044
90044
  return s5 ? s5.version : null;
90045
90045
  }
90046
90046
  exports2.SemVer = SemVer;
@@ -90272,8 +90272,8 @@ var require_semver = __commonJS({
90272
90272
  if (eq(version1, version22)) {
90273
90273
  return null;
90274
90274
  } else {
90275
- var v1 = parse12(version1);
90276
- var v2 = parse12(version22);
90275
+ var v1 = parse13(version1);
90276
+ var v2 = parse13(version22);
90277
90277
  var prefix2 = "";
90278
90278
  if (v1.prerelease.length || v2.prerelease.length) {
90279
90279
  prefix2 = "pre";
@@ -90977,7 +90977,7 @@ var require_semver = __commonJS({
90977
90977
  }
90978
90978
  exports2.prerelease = prerelease;
90979
90979
  function prerelease(version4, options) {
90980
- var parsed = parse12(version4, options);
90980
+ var parsed = parse13(version4, options);
90981
90981
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
90982
90982
  }
90983
90983
  exports2.intersects = intersects;
@@ -91014,7 +91014,7 @@ var require_semver = __commonJS({
91014
91014
  if (match3 === null) {
91015
91015
  return null;
91016
91016
  }
91017
- return parse12(match3[2] + "." + (match3[3] || "0") + "." + (match3[4] || "0"), options);
91017
+ return parse13(match3[2] + "." + (match3[3] || "0") + "." + (match3[4] || "0"), options);
91018
91018
  }
91019
91019
  }
91020
91020
  });
@@ -99619,17 +99619,17 @@ var require_ponyfill_es2018 = __commonJS({
99619
99619
  throw streamBrandCheckException$1("pipeThrough");
99620
99620
  }
99621
99621
  assertRequiredArgument(rawTransform, 1, "pipeThrough");
99622
- const transform2 = convertReadableWritablePair(rawTransform, "First parameter");
99622
+ const transform3 = convertReadableWritablePair(rawTransform, "First parameter");
99623
99623
  const options = convertPipeOptions(rawOptions, "Second parameter");
99624
99624
  if (IsReadableStreamLocked(this)) {
99625
99625
  throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");
99626
99626
  }
99627
- if (IsWritableStreamLocked(transform2.writable)) {
99627
+ if (IsWritableStreamLocked(transform3.writable)) {
99628
99628
  throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");
99629
99629
  }
99630
- const promise = ReadableStreamPipeTo(this, transform2.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
99630
+ const promise = ReadableStreamPipeTo(this, transform3.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
99631
99631
  setPromiseIsHandledToTrue(promise);
99632
- return transform2.readable;
99632
+ return transform3.readable;
99633
99633
  }
99634
99634
  pipeTo(destination, rawOptions = {}) {
99635
99635
  if (!IsReadableStream(this)) {
@@ -99922,13 +99922,13 @@ var require_ponyfill_es2018 = __commonJS({
99922
99922
  const flush = original === null || original === void 0 ? void 0 : original.flush;
99923
99923
  const readableType = original === null || original === void 0 ? void 0 : original.readableType;
99924
99924
  const start = original === null || original === void 0 ? void 0 : original.start;
99925
- const transform2 = original === null || original === void 0 ? void 0 : original.transform;
99925
+ const transform3 = original === null || original === void 0 ? void 0 : original.transform;
99926
99926
  const writableType = original === null || original === void 0 ? void 0 : original.writableType;
99927
99927
  return {
99928
99928
  flush: flush === void 0 ? void 0 : convertTransformerFlushCallback(flush, original, `${context} has member 'flush' that`),
99929
99929
  readableType,
99930
99930
  start: start === void 0 ? void 0 : convertTransformerStartCallback(start, original, `${context} has member 'start' that`),
99931
- transform: transform2 === void 0 ? void 0 : convertTransformerTransformCallback(transform2, original, `${context} has member 'transform' that`),
99931
+ transform: transform3 === void 0 ? void 0 : convertTransformerTransformCallback(transform3, original, `${context} has member 'transform' that`),
99932
99932
  writableType
99933
99933
  };
99934
99934
  }
@@ -101154,7 +101154,7 @@ var require_vary = __commonJS({
101154
101154
  if (!field) {
101155
101155
  throw new TypeError("field argument is required");
101156
101156
  }
101157
- var fields = !Array.isArray(field) ? parse12(String(field)) : field;
101157
+ var fields = !Array.isArray(field) ? parse13(String(field)) : field;
101158
101158
  for (var j = 0; j < fields.length; j++) {
101159
101159
  if (!FIELD_NAME_REGEXP.test(fields[j])) {
101160
101160
  throw new TypeError("field argument contains an invalid header name");
@@ -101164,7 +101164,7 @@ var require_vary = __commonJS({
101164
101164
  return header;
101165
101165
  }
101166
101166
  var val = header;
101167
- var vals = parse12(header.toLowerCase());
101167
+ var vals = parse13(header.toLowerCase());
101168
101168
  if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) {
101169
101169
  return "*";
101170
101170
  }
@@ -101177,7 +101177,7 @@ var require_vary = __commonJS({
101177
101177
  }
101178
101178
  return val;
101179
101179
  }
101180
- function parse12(header) {
101180
+ function parse13(header) {
101181
101181
  var end = 0;
101182
101182
  var list6 = [];
101183
101183
  var start = 0;
@@ -101733,7 +101733,7 @@ var require_bytes = __commonJS({
101733
101733
  "use strict";
101734
101734
  module2.exports = bytes;
101735
101735
  module2.exports.format = format;
101736
- module2.exports.parse = parse12;
101736
+ module2.exports.parse = parse13;
101737
101737
  var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
101738
101738
  var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
101739
101739
  var map14 = {
@@ -101747,7 +101747,7 @@ var require_bytes = __commonJS({
101747
101747
  var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
101748
101748
  function bytes(value, options) {
101749
101749
  if (typeof value === "string") {
101750
- return parse12(value);
101750
+ return parse13(value);
101751
101751
  }
101752
101752
  if (typeof value === "number") {
101753
101753
  return format(value, options);
@@ -101791,7 +101791,7 @@ var require_bytes = __commonJS({
101791
101791
  }
101792
101792
  return str2 + unitSeparator + unit;
101793
101793
  }
101794
- function parse12(val) {
101794
+ function parse13(val) {
101795
101795
  if (typeof val === "number" && !isNaN(val)) {
101796
101796
  return val;
101797
101797
  }
@@ -101827,7 +101827,7 @@ var require_content_type = __commonJS({
101827
101827
  var QUOTE_REGEXP = /([\\"])/g;
101828
101828
  var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
101829
101829
  exports2.format = format;
101830
- exports2.parse = parse12;
101830
+ exports2.parse = parse13;
101831
101831
  function format(obj) {
101832
101832
  if (!obj || typeof obj !== "object") {
101833
101833
  throw new TypeError("argument obj is required");
@@ -101851,7 +101851,7 @@ var require_content_type = __commonJS({
101851
101851
  }
101852
101852
  return string2;
101853
101853
  }
101854
- function parse12(string2) {
101854
+ function parse13(string2) {
101855
101855
  if (!string2) {
101856
101856
  throw new TypeError("argument string is required");
101857
101857
  }
@@ -102318,7 +102318,7 @@ var require_ms = __commonJS({
102318
102318
  options = options || {};
102319
102319
  var type2 = typeof val;
102320
102320
  if (type2 === "string" && val.length > 0) {
102321
- return parse12(val);
102321
+ return parse13(val);
102322
102322
  } else if (type2 === "number" && isNaN(val) === false) {
102323
102323
  return options.long ? fmtLong(val) : fmtShort(val);
102324
102324
  }
@@ -102326,7 +102326,7 @@ var require_ms = __commonJS({
102326
102326
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
102327
102327
  );
102328
102328
  };
102329
- function parse12(str2) {
102329
+ function parse13(str2) {
102330
102330
  str2 = String(str2);
102331
102331
  if (str2.length > 100) {
102332
102332
  return;
@@ -106682,7 +106682,7 @@ var require_read = __commonJS({
106682
106682
  var unpipe = require_unpipe();
106683
106683
  var zlib3 = require("zlib");
106684
106684
  module2.exports = read;
106685
- function read(req, res, next, parse12, debug, options) {
106685
+ function read(req, res, next, parse13, debug, options) {
106686
106686
  var length;
106687
106687
  var opts = options;
106688
106688
  var stream3;
@@ -106741,7 +106741,7 @@ var require_read = __commonJS({
106741
106741
  try {
106742
106742
  debug("parse body");
106743
106743
  str2 = typeof body3 !== "string" && encoding !== null ? iconv.decode(body3, encoding) : body3;
106744
- req.body = parse12(str2);
106744
+ req.body = parse13(str2);
106745
106745
  } catch (err) {
106746
106746
  next(createError(400, err, {
106747
106747
  body: str2,
@@ -106809,7 +106809,7 @@ var require_media_typer = __commonJS({
106809
106809
  var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/;
106810
106810
  var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
106811
106811
  exports2.format = format;
106812
- exports2.parse = parse12;
106812
+ exports2.parse = parse13;
106813
106813
  function format(obj) {
106814
106814
  if (!obj || typeof obj !== "object") {
106815
106815
  throw new TypeError("argument obj is required");
@@ -106844,7 +106844,7 @@ var require_media_typer = __commonJS({
106844
106844
  }
106845
106845
  return string2;
106846
106846
  }
106847
- function parse12(string2) {
106847
+ function parse13(string2) {
106848
106848
  if (!string2) {
106849
106849
  throw new TypeError("argument string is required");
106850
106850
  }
@@ -107050,7 +107050,7 @@ var require_json4 = __commonJS({
107050
107050
  throw new TypeError("option verify must be function");
107051
107051
  }
107052
107052
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
107053
- function parse12(body3) {
107053
+ function parse13(body3) {
107054
107054
  if (body3.length === 0) {
107055
107055
  return {};
107056
107056
  }
@@ -107098,7 +107098,7 @@ var require_json4 = __commonJS({
107098
107098
  }));
107099
107099
  return;
107100
107100
  }
107101
- read(req, res, next, parse12, debug, {
107101
+ read(req, res, next, parse13, debug, {
107102
107102
  encoding: charset,
107103
107103
  inflate,
107104
107104
  limit,
@@ -107169,7 +107169,7 @@ var require_raw = __commonJS({
107169
107169
  throw new TypeError("option verify must be function");
107170
107170
  }
107171
107171
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
107172
- function parse12(buf) {
107172
+ function parse13(buf) {
107173
107173
  return buf;
107174
107174
  }
107175
107175
  return function rawParser(req, res, next) {
@@ -107190,7 +107190,7 @@ var require_raw = __commonJS({
107190
107190
  next();
107191
107191
  return;
107192
107192
  }
107193
- read(req, res, next, parse12, debug, {
107193
+ read(req, res, next, parse13, debug, {
107194
107194
  encoding: null,
107195
107195
  inflate,
107196
107196
  limit,
@@ -107227,7 +107227,7 @@ var require_text3 = __commonJS({
107227
107227
  throw new TypeError("option verify must be function");
107228
107228
  }
107229
107229
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
107230
- function parse12(buf) {
107230
+ function parse13(buf) {
107231
107231
  return buf;
107232
107232
  }
107233
107233
  return function textParser(req, res, next) {
@@ -107249,7 +107249,7 @@ var require_text3 = __commonJS({
107249
107249
  return;
107250
107250
  }
107251
107251
  var charset = getCharset(req) || defaultCharset;
107252
- read(req, res, next, parse12, debug, {
107252
+ read(req, res, next, parse13, debug, {
107253
107253
  encoding: charset,
107254
107254
  inflate,
107255
107255
  limit,
@@ -109359,11 +109359,11 @@ var require_lib19 = __commonJS({
109359
109359
  "../../node_modules/qs/lib/index.js"(exports2, module2) {
109360
109360
  "use strict";
109361
109361
  var stringify4 = require_stringify3();
109362
- var parse12 = require_parse4();
109362
+ var parse13 = require_parse4();
109363
109363
  var formats = require_formats();
109364
109364
  module2.exports = {
109365
109365
  formats,
109366
- parse: parse12,
109366
+ parse: parse13,
109367
109367
  stringify: stringify4
109368
109368
  };
109369
109369
  }
@@ -109397,7 +109397,7 @@ var require_urlencoded = __commonJS({
109397
109397
  }
109398
109398
  var queryparse = extended ? extendedparser(opts) : simpleparser(opts);
109399
109399
  var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2;
109400
- function parse12(body3) {
109400
+ function parse13(body3) {
109401
109401
  return body3.length ? queryparse(body3) : {};
109402
109402
  }
109403
109403
  return function urlencodedParser(req, res, next) {
@@ -109427,7 +109427,7 @@ var require_urlencoded = __commonJS({
109427
109427
  }));
109428
109428
  return;
109429
109429
  }
109430
- read(req, res, next, parse12, debug, {
109430
+ read(req, res, next, parse13, debug, {
109431
109431
  debug,
109432
109432
  encoding: charset,
109433
109433
  inflate,
@@ -109438,7 +109438,7 @@ var require_urlencoded = __commonJS({
109438
109438
  }
109439
109439
  function extendedparser(options) {
109440
109440
  var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
109441
- var parse12 = parser3("qs");
109441
+ var parse13 = parser3("qs");
109442
109442
  if (isNaN(parameterLimit) || parameterLimit < 1) {
109443
109443
  throw new TypeError("option parameterLimit must be a positive number");
109444
109444
  }
@@ -109455,7 +109455,7 @@ var require_urlencoded = __commonJS({
109455
109455
  }
109456
109456
  var arrayLimit = Math.max(100, paramCount);
109457
109457
  debug("parse extended urlencoding");
109458
- return parse12(body3, {
109458
+ return parse13(body3, {
109459
109459
  allowPrototypes: true,
109460
109460
  arrayLimit,
109461
109461
  depth: Infinity,
@@ -109500,7 +109500,7 @@ var require_urlencoded = __commonJS({
109500
109500
  }
109501
109501
  function simpleparser(options) {
109502
109502
  var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3;
109503
- var parse12 = parser3("querystring");
109503
+ var parse13 = parser3("querystring");
109504
109504
  if (isNaN(parameterLimit) || parameterLimit < 1) {
109505
109505
  throw new TypeError("option parameterLimit must be a positive number");
109506
109506
  }
@@ -109516,7 +109516,7 @@ var require_urlencoded = __commonJS({
109516
109516
  });
109517
109517
  }
109518
109518
  debug("parse urlencoding");
109519
- return parse12(body3, void 0, void 0, { maxKeys: parameterLimit });
109519
+ return parse13(body3, void 0, void 0, { maxKeys: parameterLimit });
109520
109520
  };
109521
109521
  }
109522
109522
  function typeChecker(type2) {
@@ -109645,7 +109645,7 @@ var require_ms2 = __commonJS({
109645
109645
  options = options || {};
109646
109646
  var type2 = typeof val;
109647
109647
  if (type2 === "string" && val.length > 0) {
109648
- return parse12(val);
109648
+ return parse13(val);
109649
109649
  } else if (type2 === "number" && isNaN(val) === false) {
109650
109650
  return options.long ? fmtLong(val) : fmtShort(val);
109651
109651
  }
@@ -109653,7 +109653,7 @@ var require_ms2 = __commonJS({
109653
109653
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
109654
109654
  );
109655
109655
  };
109656
- function parse12(str2) {
109656
+ function parse13(str2) {
109657
109657
  str2 = String(str2);
109658
109658
  if (str2.length > 100) {
109659
109659
  return;
@@ -110133,7 +110133,7 @@ var require_parseurl = __commonJS({
110133
110133
  "../../node_modules/parseurl/index.js"(exports2, module2) {
110134
110134
  "use strict";
110135
110135
  var url = require("url");
110136
- var parse12 = url.parse;
110136
+ var parse13 = url.parse;
110137
110137
  var Url = url.Url;
110138
110138
  module2.exports = parseurl;
110139
110139
  module2.exports.original = originalurl;
@@ -110165,7 +110165,7 @@ var require_parseurl = __commonJS({
110165
110165
  }
110166
110166
  function fastparse(str2) {
110167
110167
  if (typeof str2 !== "string" || str2.charCodeAt(0) !== 47) {
110168
- return parse12(str2);
110168
+ return parse13(str2);
110169
110169
  }
110170
110170
  var pathname = str2;
110171
110171
  var query = null;
@@ -110187,7 +110187,7 @@ var require_parseurl = __commonJS({
110187
110187
  case 35:
110188
110188
  case 160:
110189
110189
  case 65279:
110190
- return parse12(str2);
110190
+ return parse13(str2);
110191
110191
  }
110192
110192
  }
110193
110193
  var url2 = Url !== void 0 ? new Url() : {};
@@ -110364,7 +110364,7 @@ var require_ms3 = __commonJS({
110364
110364
  options = options || {};
110365
110365
  var type2 = typeof val;
110366
110366
  if (type2 === "string" && val.length > 0) {
110367
- return parse12(val);
110367
+ return parse13(val);
110368
110368
  } else if (type2 === "number" && isNaN(val) === false) {
110369
110369
  return options.long ? fmtLong(val) : fmtShort(val);
110370
110370
  }
@@ -110372,7 +110372,7 @@ var require_ms3 = __commonJS({
110372
110372
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
110373
110373
  );
110374
110374
  };
110375
- function parse12(str2) {
110375
+ function parse13(str2) {
110376
110376
  str2 = String(str2);
110377
110377
  if (str2.length > 100) {
110378
110378
  return;
@@ -111742,7 +111742,7 @@ var require_content_disposition = __commonJS({
111742
111742
  "../../node_modules/content-disposition/index.js"(exports2, module2) {
111743
111743
  "use strict";
111744
111744
  module2.exports = contentDisposition;
111745
- module2.exports.parse = parse12;
111745
+ module2.exports.parse = parse13;
111746
111746
  var basename3 = require("path").basename;
111747
111747
  var Buffer6 = require_safe_buffer().Buffer;
111748
111748
  var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
@@ -111833,7 +111833,7 @@ var require_content_disposition = __commonJS({
111833
111833
  function getlatin1(val) {
111834
111834
  return String(val).replace(NON_LATIN1_REGEXP, "?");
111835
111835
  }
111836
- function parse12(string2) {
111836
+ function parse13(string2) {
111837
111837
  if (!string2 || typeof string2 !== "string") {
111838
111838
  throw new TypeError("argument string is required");
111839
111839
  }
@@ -111912,7 +111912,7 @@ var require_ms4 = __commonJS({
111912
111912
  options = options || {};
111913
111913
  var type2 = typeof val;
111914
111914
  if (type2 === "string" && val.length > 0) {
111915
- return parse12(val);
111915
+ return parse13(val);
111916
111916
  } else if (type2 === "number" && isNaN(val) === false) {
111917
111917
  return options.long ? fmtLong(val) : fmtShort(val);
111918
111918
  }
@@ -111920,7 +111920,7 @@ var require_ms4 = __commonJS({
111920
111920
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
111921
111921
  );
111922
111922
  };
111923
- function parse12(str2) {
111923
+ function parse13(str2) {
111924
111924
  str2 = String(str2);
111925
111925
  if (str2.length > 100) {
111926
111926
  return;
@@ -112523,7 +112523,7 @@ var require_ms5 = __commonJS({
112523
112523
  options = options || {};
112524
112524
  var type2 = typeof val;
112525
112525
  if (type2 === "string" && val.length > 0) {
112526
- return parse12(val);
112526
+ return parse13(val);
112527
112527
  } else if (type2 === "number" && isFinite(val)) {
112528
112528
  return options.long ? fmtLong(val) : fmtShort(val);
112529
112529
  }
@@ -112531,7 +112531,7 @@ var require_ms5 = __commonJS({
112531
112531
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
112532
112532
  );
112533
112533
  };
112534
- function parse12(str2) {
112534
+ function parse13(str2) {
112535
112535
  str2 = String(str2);
112536
112536
  if (str2.length > 100) {
112537
112537
  return;
@@ -113270,7 +113270,7 @@ var require_forwarded = __commonJS({
113270
113270
  if (!req) {
113271
113271
  throw new TypeError("argument req is required");
113272
113272
  }
113273
- var proxyAddrs = parse12(req.headers["x-forwarded-for"] || "");
113273
+ var proxyAddrs = parse13(req.headers["x-forwarded-for"] || "");
113274
113274
  var socketAddr = getSocketAddr(req);
113275
113275
  var addrs = [socketAddr].concat(proxyAddrs);
113276
113276
  return addrs;
@@ -113278,7 +113278,7 @@ var require_forwarded = __commonJS({
113278
113278
  function getSocketAddr(req) {
113279
113279
  return req.socket ? req.socket.remoteAddress : req.connection.remoteAddress;
113280
113280
  }
113281
- function parse12(header) {
113281
+ function parse13(header) {
113282
113282
  var end = header.length;
113283
113283
  var list6 = [];
113284
113284
  var start = header.length;
@@ -115106,7 +115106,7 @@ var require_request = __commonJS({
115106
115106
  var http5 = require("http");
115107
115107
  var fresh = require_fresh();
115108
115108
  var parseRange = require_range_parser();
115109
- var parse12 = require_parseurl();
115109
+ var parse13 = require_parseurl();
115110
115110
  var proxyaddr = require_proxy_addr();
115111
115111
  var req = Object.create(http5.IncomingMessage.prototype);
115112
115112
  module2.exports = req;
@@ -115216,7 +115216,7 @@ var require_request = __commonJS({
115216
115216
  return subdomains2.slice(offset);
115217
115217
  });
115218
115218
  defineGetter(req, "path", function path42() {
115219
- return parse12(this).pathname;
115219
+ return parse13(this).pathname;
115220
115220
  });
115221
115221
  defineGetter(req, "hostname", function hostname() {
115222
115222
  var trust = this.app.get("trust proxy fn");
@@ -115295,11 +115295,11 @@ var require_cookie_signature = __commonJS({
115295
115295
  var require_cookie = __commonJS({
115296
115296
  "../../node_modules/cookie/index.js"(exports2) {
115297
115297
  "use strict";
115298
- exports2.parse = parse12;
115298
+ exports2.parse = parse13;
115299
115299
  exports2.serialize = serialize3;
115300
115300
  var __toString = Object.prototype.toString;
115301
115301
  var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
115302
- function parse12(str2, options) {
115302
+ function parse13(str2, options) {
115303
115303
  if (typeof str2 !== "string") {
115304
115304
  throw new TypeError("argument str must be a string");
115305
115305
  }
@@ -118176,7 +118176,7 @@ var require_extension = __commonJS({
118176
118176
  else
118177
118177
  dest[name3].push(elem);
118178
118178
  }
118179
- function parse12(header) {
118179
+ function parse13(header) {
118180
118180
  const offers = /* @__PURE__ */ Object.create(null);
118181
118181
  let params = /* @__PURE__ */ Object.create(null);
118182
118182
  let mustUnescape = false;
@@ -118331,7 +118331,7 @@ var require_extension = __commonJS({
118331
118331
  }).join(", ");
118332
118332
  }).join(", ");
118333
118333
  }
118334
- module2.exports = { format, parse: parse12 };
118334
+ module2.exports = { format, parse: parse13 };
118335
118335
  }
118336
118336
  });
118337
118337
 
@@ -118363,7 +118363,7 @@ var require_websocket = __commonJS({
118363
118363
  var {
118364
118364
  EventTarget: { addEventListener, removeEventListener }
118365
118365
  } = require_event_target();
118366
- var { format, parse: parse12 } = require_extension();
118366
+ var { format, parse: parse13 } = require_extension();
118367
118367
  var { toBuffer } = require_buffer_util();
118368
118368
  var closeTimeout = 30 * 1e3;
118369
118369
  var kAborted = Symbol("kAborted");
@@ -119038,7 +119038,7 @@ var require_websocket = __commonJS({
119038
119038
  }
119039
119039
  let extensions;
119040
119040
  try {
119041
- extensions = parse12(secWebSocketExtensions);
119041
+ extensions = parse13(secWebSocketExtensions);
119042
119042
  } catch (err) {
119043
119043
  const message = "Invalid Sec-WebSocket-Extensions header";
119044
119044
  abortHandshake(websocket, socket, message);
@@ -119212,7 +119212,7 @@ var require_subprotocol = __commonJS({
119212
119212
  "../../node_modules/ws/lib/subprotocol.js"(exports2, module2) {
119213
119213
  "use strict";
119214
119214
  var { tokenChars } = require_validation();
119215
- function parse12(header) {
119215
+ function parse13(header) {
119216
119216
  const protocols = /* @__PURE__ */ new Set();
119217
119217
  let start = -1;
119218
119218
  let end = -1;
@@ -119251,7 +119251,7 @@ var require_subprotocol = __commonJS({
119251
119251
  protocols.add(protocol);
119252
119252
  return protocols;
119253
119253
  }
119254
- module2.exports = { parse: parse12 };
119254
+ module2.exports = { parse: parse13 };
119255
119255
  }
119256
119256
  });
119257
119257
 
@@ -120641,7 +120641,7 @@ var require_parse5 = __commonJS({
120641
120641
  var syntaxError = (type2, char) => {
120642
120642
  return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`;
120643
120643
  };
120644
- var parse12 = (input3, options) => {
120644
+ var parse13 = (input3, options) => {
120645
120645
  if (typeof input3 !== "string") {
120646
120646
  throw new TypeError("Expected a string");
120647
120647
  }
@@ -120791,7 +120791,7 @@ var require_parse5 = __commonJS({
120791
120791
  output2 = token.close = `)$))${extglobStar}`;
120792
120792
  }
120793
120793
  if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
120794
- const expression = parse12(rest, { ...options, fastpaths: false }).output;
120794
+ const expression = parse13(rest, { ...options, fastpaths: false }).output;
120795
120795
  output2 = token.close = `)${expression})${extglobStar})`;
120796
120796
  }
120797
120797
  if (token.prev.type === "bos") {
@@ -121320,7 +121320,7 @@ var require_parse5 = __commonJS({
121320
121320
  }
121321
121321
  return state;
121322
121322
  };
121323
- parse12.fastpaths = (input3, options) => {
121323
+ parse13.fastpaths = (input3, options) => {
121324
121324
  const opts = { ...options };
121325
121325
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
121326
121326
  const len = input3.length;
@@ -121389,7 +121389,7 @@ var require_parse5 = __commonJS({
121389
121389
  }
121390
121390
  return source2;
121391
121391
  };
121392
- module2.exports = parse12;
121392
+ module2.exports = parse13;
121393
121393
  }
121394
121394
  });
121395
121395
 
@@ -121399,7 +121399,7 @@ var require_picomatch = __commonJS({
121399
121399
  "use strict";
121400
121400
  var path42 = require("path");
121401
121401
  var scan2 = require_scan2();
121402
- var parse12 = require_parse5();
121402
+ var parse13 = require_parse5();
121403
121403
  var utils2 = require_utils13();
121404
121404
  var constants2 = require_constants4();
121405
121405
  var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val);
@@ -121489,7 +121489,7 @@ var require_picomatch = __commonJS({
121489
121489
  picomatch.parse = (pattern, options) => {
121490
121490
  if (Array.isArray(pattern))
121491
121491
  return pattern.map((p5) => picomatch.parse(p5, options));
121492
- return parse12(pattern, { ...options, fastpaths: false });
121492
+ return parse13(pattern, { ...options, fastpaths: false });
121493
121493
  };
121494
121494
  picomatch.scan = (input3, options) => scan2(input3, options);
121495
121495
  picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
@@ -121515,10 +121515,10 @@ var require_picomatch = __commonJS({
121515
121515
  }
121516
121516
  let parsed = { negated: false, fastpaths: true };
121517
121517
  if (options.fastpaths !== false && (input3[0] === "." || input3[0] === "*")) {
121518
- parsed.output = parse12.fastpaths(input3, options);
121518
+ parsed.output = parse13.fastpaths(input3, options);
121519
121519
  }
121520
121520
  if (!parsed.output) {
121521
- parsed = parse12(input3, options);
121521
+ parsed = parse13(input3, options);
121522
121522
  }
121523
121523
  return picomatch.compileRe(parsed, options, returnOutput, returnState);
121524
121524
  };
@@ -122406,7 +122406,7 @@ var require_fill_range = __commonJS({
122406
122406
  var util3 = require("util");
122407
122407
  var toRegexRange = require_to_regex_range();
122408
122408
  var isObject2 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
122409
- var transform2 = (toNumber) => {
122409
+ var transform3 = (toNumber) => {
122410
122410
  return (value) => toNumber === true ? Number(value) : String(value);
122411
122411
  };
122412
122412
  var isValidValue = (value) => {
@@ -122527,7 +122527,7 @@ var require_fill_range = __commonJS({
122527
122527
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
122528
122528
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
122529
122529
  let toNumber = padded === false && stringify4(start, end, options) === false;
122530
- let format = options.transform || transform2(toNumber);
122530
+ let format = options.transform || transform3(toNumber);
122531
122531
  if (options.toRegex && step === 1) {
122532
122532
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
122533
122533
  }
@@ -122888,7 +122888,7 @@ var require_parse6 = __commonJS({
122888
122888
  CHAR_NO_BREAK_SPACE,
122889
122889
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
122890
122890
  } = require_constants5();
122891
- var parse12 = (input3, options = {}) => {
122891
+ var parse13 = (input3, options = {}) => {
122892
122892
  if (typeof input3 !== "string") {
122893
122893
  throw new TypeError("Expected a string");
122894
122894
  }
@@ -123094,7 +123094,7 @@ var require_parse6 = __commonJS({
123094
123094
  push({ type: "eos" });
123095
123095
  return ast;
123096
123096
  };
123097
- module2.exports = parse12;
123097
+ module2.exports = parse13;
123098
123098
  }
123099
123099
  });
123100
123100
 
@@ -123105,7 +123105,7 @@ var require_braces = __commonJS({
123105
123105
  var stringify4 = require_stringify4();
123106
123106
  var compile2 = require_compile();
123107
123107
  var expand2 = require_expand();
123108
- var parse12 = require_parse6();
123108
+ var parse13 = require_parse6();
123109
123109
  var braces = (input3, options = {}) => {
123110
123110
  let output2 = [];
123111
123111
  if (Array.isArray(input3)) {
@@ -123125,7 +123125,7 @@ var require_braces = __commonJS({
123125
123125
  }
123126
123126
  return output2;
123127
123127
  };
123128
- braces.parse = (input3, options = {}) => parse12(input3, options);
123128
+ braces.parse = (input3, options = {}) => parse13(input3, options);
123129
123129
  braces.stringify = (input3, options = {}) => {
123130
123130
  if (typeof input3 === "string") {
123131
123131
  return stringify4(braces.parse(input3, options), options);
@@ -124234,7 +124234,7 @@ var require_fsevents_handler = __commonJS({
124234
124234
  * @param {Function} globFilter - path filter in case a glob pattern was provided
124235
124235
  * @returns {Function} closer for the watcher instance
124236
124236
  */
124237
- _watchWithFsEvents(watchPath, realPath, transform2, globFilter) {
124237
+ _watchWithFsEvents(watchPath, realPath, transform3, globFilter) {
124238
124238
  if (this.fsw.closed || this.fsw._isIgnored(watchPath))
124239
124239
  return;
124240
124240
  const opts = this.fsw.options;
@@ -124243,7 +124243,7 @@ var require_fsevents_handler = __commonJS({
124243
124243
  return;
124244
124244
  if (opts.depth !== void 0 && calcDepth(fullPath2, realPath) > opts.depth)
124245
124245
  return;
124246
- const path42 = transform2(sysPath.join(
124246
+ const path42 = transform3(sysPath.join(
124247
124247
  watchPath,
124248
124248
  sysPath.relative(watchPath, fullPath2)
124249
124249
  ));
@@ -124301,7 +124301,7 @@ var require_fsevents_handler = __commonJS({
124301
124301
  * @param {Number} curDepth level of subdirectories traversed to where symlink is
124302
124302
  * @returns {Promise<void>}
124303
124303
  */
124304
- async _handleFsEventsSymlink(linkPath, fullPath2, transform2, curDepth) {
124304
+ async _handleFsEventsSymlink(linkPath, fullPath2, transform3, curDepth) {
124305
124305
  if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath2))
124306
124306
  return;
124307
124307
  this.fsw._symlinkPaths.set(fullPath2, true);
@@ -124321,7 +124321,7 @@ var require_fsevents_handler = __commonJS({
124321
124321
  } else if (path42 !== DOT_SLASH) {
124322
124322
  aliasedPath = sysPath.join(linkPath, path42);
124323
124323
  }
124324
- return transform2(aliasedPath);
124324
+ return transform3(aliasedPath);
124325
124325
  }, false, curDepth);
124326
124326
  } catch (error) {
124327
124327
  if (this.fsw._handleError(error)) {
@@ -124367,12 +124367,12 @@ var require_fsevents_handler = __commonJS({
124367
124367
  * @param {Number=} priorDepth Level of subdirectories already traversed.
124368
124368
  * @returns {Promise<void>}
124369
124369
  */
124370
- async _addToFsEvents(path42, transform2, forceAdd, priorDepth) {
124370
+ async _addToFsEvents(path42, transform3, forceAdd, priorDepth) {
124371
124371
  if (this.fsw.closed) {
124372
124372
  return;
124373
124373
  }
124374
124374
  const opts = this.fsw.options;
124375
- const processPath = typeof transform2 === FUNCTION_TYPE ? transform2 : IDENTITY_FN;
124375
+ const processPath = typeof transform3 === FUNCTION_TYPE ? transform3 : IDENTITY_FN;
124376
124376
  const wh = this.fsw._getWatchHelpers(path42);
124377
124377
  try {
124378
124378
  const stats = await statMethods[wh.statMethod](wh.watchPath);
@@ -124418,7 +124418,7 @@ var require_fsevents_handler = __commonJS({
124418
124418
  }
124419
124419
  }
124420
124420
  if (opts.persistent && forceAdd !== true) {
124421
- if (typeof transform2 === FUNCTION_TYPE) {
124421
+ if (typeof transform3 === FUNCTION_TYPE) {
124422
124422
  this.initWatch(void 0, path42, wh, processPath);
124423
124423
  } else {
124424
124424
  let realPath;
@@ -126565,8 +126565,8 @@ var require_nodes = __commonJS({
126565
126565
  if (line2 && (inline && i2 > 0 || !inline)) {
126566
126566
  process.stdout.write(" ".repeat(indent2));
126567
126567
  }
126568
- var nl = i2 === lines.length - 1 ? "" : "\n";
126569
- process.stdout.write("" + line2 + nl);
126568
+ var nl3 = i2 === lines.length - 1 ? "" : "\n";
126569
+ process.stdout.write("" + line2 + nl3);
126570
126570
  });
126571
126571
  }
126572
126572
  function printNodes(node3, indent2) {
@@ -127588,7 +127588,7 @@ var require_parser4 = __commonJS({
127588
127588
  }
127589
127589
  return buf;
127590
127590
  };
127591
- _proto.parse = function parse12() {
127591
+ _proto.parse = function parse13() {
127592
127592
  return new nodes.NodeList(0, 0, this.parseNodes());
127593
127593
  };
127594
127594
  _proto.parseAsRoot = function parseAsRoot() {
@@ -127597,7 +127597,7 @@ var require_parser4 = __commonJS({
127597
127597
  return Parser4;
127598
127598
  }(Obj);
127599
127599
  module2.exports = {
127600
- parse: function parse12(src, extensions, opts) {
127600
+ parse: function parse13(src, extensions, opts) {
127601
127601
  var p5 = new Parser3(lexer.lex(src, opts));
127602
127602
  if (extensions !== void 0) {
127603
127603
  p5.extensions = extensions;
@@ -127761,11 +127761,11 @@ var require_transformer = __commonJS({
127761
127761
  function cps(ast, asyncFilters) {
127762
127762
  return convertStatements(liftSuper(liftFilters(ast, asyncFilters)));
127763
127763
  }
127764
- function transform2(ast, asyncFilters) {
127764
+ function transform3(ast, asyncFilters) {
127765
127765
  return cps(ast, asyncFilters || []);
127766
127766
  }
127767
127767
  module2.exports = {
127768
- transform: transform2
127768
+ transform: transform3
127769
127769
  };
127770
127770
  }
127771
127771
  });
@@ -136903,7 +136903,7 @@ var require_build = __commonJS({
136903
136903
  var n = {};
136904
136904
  return (() => {
136905
136905
  "use strict";
136906
- r2.r(n), r2.d(n, { AbstractNumbering: () => Ji, Alignment: () => D2, AlignmentAttributes: () => L, AlignmentType: () => m2, Attributes: () => a2, BaseEmphasisMark: () => Q, BaseXmlComponent: () => e3, Body: () => un, Bookmark: () => Or, BookmarkEnd: () => Lr, BookmarkStart: () => kr, Border: () => B, BorderElement: () => P, BorderStyle: () => w, Column: () => hn, ColumnAttributes: () => ln, ColumnBreak: () => pr, Columns: () => jr, ColumnsAttributes: () => zr, Comment: () => cr, CommentRangeEnd: () => or, CommentRangeStart: () => ir, CommentReference: () => ar, Comments: () => ur, ConcreteHyperlink: () => Sr, ConcreteNumbering: () => to, DeletedTextRun: () => na, DocGridAttributes: () => Wr, Document: () => Ho, DocumentAttributes: () => pn, DocumentBackground: () => fn, DocumentBackgroundAttributes: () => dn, DocumentDefaults: () => Bo, DocumentGrid: () => Kr, DocumentGridType: () => Pe, DotEmphasisMark: () => te, Drawing: () => Xt, DropCapType: () => vn, EMPTY_OBJECT: () => t3, EmphasisMark: () => ee, EmphasisMarkType: () => E, ExternalHyperlink: () => Rr, File: () => Ho, FootNoteReferenceRunAttributes: () => qo, FootNotes: () => ki, Footer: () => Xo, FooterWrapper: () => _i, FootnoteReference: () => Zo, FootnoteReferenceRun: () => Yo, FrameAnchorType: () => _n, FrameProperties: () => An, FramePropertiesAttributes: () => Tn, FrameWrap: () => En, GridSpan: () => ks, Header: () => $o, HeaderFooterReference: () => Hr, HeaderFooterReferenceType: () => Le, HeaderFooterType: () => De, HeaderWrapper: () => Fi, HeadingLevel: () => Se, HeightRule: () => $s, HorizontalPosition: () => Ze, HorizontalPositionAlign: () => y, HorizontalPositionRelativeFrom: () => xe, HpsMeasureElement: () => R, HyperlinkType: () => Oe, IgnoreIfEmptyXmlComponent: () => i2, ImageRun: () => qt, ImportDotx: () => wa, ImportedRootElementAttributes: () => p5, ImportedXmlComponent: () => h4, Indent: () => H, InitializableXmlComponent: () => f3, InsertedTextRun: () => Jo, InternalHyperlink: () => Ir, LeaderType: () => Re, Level: () => Xi, LevelBase: () => $i, LevelForOverride: () => qi, LevelFormat: () => Ui, LevelOverride: () => no, LevelSuffix: () => Hi, LineNumberAttributes: () => Gr, LineNumberRestartFormat: () => Fe, LineNumberType: () => Vr, LineRuleType: () => Ae, Math: () => Rn, MathAccentCharacter: () => Pn, MathAngledBrackets: () => bs, MathBase: () => Fn, MathCurlyBrackets: () => ys, MathDegree: () => ns, MathDenominator: () => On, MathFraction: () => Ln, MathFunction: () => ls, MathFunctionName: () => cs, MathFunctionProperties: () => us, MathIntegral: () => $n, MathLimitLocation: () => Mn, MathNAryProperties: () => Wn, MathNumerator: () => kn, MathPreSubSuperScript: () => ts, MathPreSubSuperScriptProperties: () => es, MathRadical: () => as, MathRadicalProperties: () => os10, MathRoundBrackets: () => ws, MathRun: () => Cn, MathSquareBrackets: () => gs, MathSubScript: () => Yn, MathSubScriptElement: () => Kn, MathSubScriptProperties: () => Zn, MathSubSuperScript: () => Qn, MathSubSuperScriptProperties: () => Jn, MathSum: () => Vn, MathSuperScript: () => qn, MathSuperScriptElement: () => Gn, MathSuperScriptProperties: () => Xn, Media: () => Bi, NumberFormat: () => x2, NumberProperties: () => xr, NumberValueElement: () => C, Numbering: () => oo, OnOffElement: () => I, OutlineLevel: () => Dr, OverlapType: () => Gs, Packer: () => pa, PageBorderDisplay: () => Be, PageBorderOffsetFrom: () => Me, PageBorderZOrder: () => Ue, PageBorders: () => Xr, PageBreak: () => hr2, PageBreakBefore: () => dr, PageMargin: () => Zr, PageMarginAttributes: () => qr, PageNumber: () => A2, PageNumberSeparator: () => He, PageNumberType: () => Jr, PageNumberTypeAttributes: () => Yr, PageOrientation: () => ze, PageReference: () => Fr, PageSize: () => en, PageSizeAttributes: () => Qr, PageTextDirection: () => rn, PageTextDirectionType: () => je, Paragraph: () => In, ParagraphProperties: () => Sn, ParagraphPropertiesDefaults: () => Po, PrettifyType: () => la, RelativeHorizontalPosition: () => Ws, RelativeVerticalPosition: () => Ks, Run: () => me, RunFonts: () => ae, RunProperties: () => pe, RunPropertiesChange: () => de, RunPropertiesDefaults: () => Fo, SectionProperties: () => cn, SectionType: () => We, SectionTypeAttributes: () => nn, SequentialIdentifier: () => Yt, Shading: () => Y, ShadingType: () => _3, SimpleField: () => er, SimpleMailMergeField: () => tr3, SimplePos: () => Ve, SpaceType: () => v, Spacing: () => mr, StringContainer: () => k, StringEnumValueElement: () => O, StringValueElement: () => N, Style: () => wr, StyleForCharacter: () => bo, StyleForParagraph: () => yo, StyleLevel: () => Vo, Styles: () => Do, SymbolRun: () => be, TDirection: () => Fs, Tab: () => Jt, TabAttributes: () => yr, TabStop: () => gr, TabStopItem: () => br3, TabStopPosition: () => Ne, TabStopType: () => Ie, Table: () => ei, TableAnchorType: () => js, TableBorders: () => zs, TableCell: () => Ms, TableCellBorders: () => Cs, TableFloatOptionsAttributes: () => qs, TableFloatProperties: () => Zs, TableLayout: () => Js, TableLayoutType: () => Vs, TableOfContents: () => Go, TableProperties: () => Qs, TableRow: () => si, TableRowHeight: () => ri, TableRowHeightAttributes: () => ti, TableRowProperties: () => ni, TableWidthElement: () => Rs, TextDirection: () => Ss, TextRun: () => we, TextWrappingSide: () => Ee, TextWrappingType: () => _e, ThematicBreak: () => M, Type: () => sn, Underline: () => he2, UnderlineType: () => T2, VerticalAlign: () => ke, VerticalAlignAttributes: () => Br, VerticalAlignElement: () => Mr, VerticalMerge: () => Ds, VerticalMergeType: () => As, VerticalPosition: () => Je, VerticalPositionAlign: () => b, VerticalPositionRelativeFrom: () => ve, WORKAROUND: () => zo, WORKAROUND2: () => Mi, WORKAROUND3: () => d, WORKAROUND4: () => rs, WidthType: () => Es, WrapNone: () => Rt, WrapSquare: () => Ct, WrapTight: () => kt, WrapTopAndBottom: () => Dt, XmlAttributeComponent: () => o, XmlComponent: () => s5, convertInchesToTwip: () => ga.convertInchesToTwip, convertMillimetersToTwip: () => ga.convertMillimetersToTwip, convertToXmlComponent: () => u3, dateTimeValue: () => ga.dateTimeValue, decimalNumber: () => ga.decimalNumber, eighthPointMeasureValue: () => ga.eighthPointMeasureValue, hexColorValue: () => ga.hexColorValue, hpsMeasureValue: () => ga.hpsMeasureValue, longHexNumber: () => ga.longHexNumber, measurementOrPercentValue: () => ga.measurementOrPercentValue, percentageValue: () => ga.percentageValue, pointMeasureValue: () => ga.pointMeasureValue, positiveUniversalMeasureValue: () => ga.positiveUniversalMeasureValue, sectionMarginDefaults: () => on, sectionPageSizeDefaults: () => an, shortHexNumber: () => ga.shortHexNumber, signedHpsMeasureValue: () => ga.signedHpsMeasureValue, signedTwipsMeasureValue: () => ga.signedTwipsMeasureValue, twipsMeasureValue: () => ga.twipsMeasureValue, uCharHexNumber: () => ga.uCharHexNumber, uniqueId: () => ga.uniqueId, uniqueNumericId: () => ga.uniqueNumericId, universalMeasureValue: () => ga.universalMeasureValue, unsignedDecimalNumber: () => ga.unsignedDecimalNumber });
136906
+ r2.r(n), r2.d(n, { AbstractNumbering: () => Ji, Alignment: () => D2, AlignmentAttributes: () => L, AlignmentType: () => m2, Attributes: () => a2, BaseEmphasisMark: () => Q, BaseXmlComponent: () => e3, Body: () => un, Bookmark: () => Or, BookmarkEnd: () => Lr, BookmarkStart: () => kr, Border: () => B, BorderElement: () => P, BorderStyle: () => w, Column: () => hn, ColumnAttributes: () => ln, ColumnBreak: () => pr, Columns: () => jr, ColumnsAttributes: () => zr, Comment: () => cr3, CommentRangeEnd: () => or, CommentRangeStart: () => ir, CommentReference: () => ar, Comments: () => ur, ConcreteHyperlink: () => Sr, ConcreteNumbering: () => to, DeletedTextRun: () => na, DocGridAttributes: () => Wr, Document: () => Ho, DocumentAttributes: () => pn, DocumentBackground: () => fn, DocumentBackgroundAttributes: () => dn, DocumentDefaults: () => Bo, DocumentGrid: () => Kr, DocumentGridType: () => Pe, DotEmphasisMark: () => te, Drawing: () => Xt, DropCapType: () => vn, EMPTY_OBJECT: () => t3, EmphasisMark: () => ee, EmphasisMarkType: () => E, ExternalHyperlink: () => Rr, File: () => Ho, FootNoteReferenceRunAttributes: () => qo, FootNotes: () => ki, Footer: () => Xo, FooterWrapper: () => _i, FootnoteReference: () => Zo, FootnoteReferenceRun: () => Yo, FrameAnchorType: () => _n, FrameProperties: () => An, FramePropertiesAttributes: () => Tn, FrameWrap: () => En, GridSpan: () => ks, Header: () => $o, HeaderFooterReference: () => Hr, HeaderFooterReferenceType: () => Le, HeaderFooterType: () => De, HeaderWrapper: () => Fi, HeadingLevel: () => Se, HeightRule: () => $s, HorizontalPosition: () => Ze, HorizontalPositionAlign: () => y, HorizontalPositionRelativeFrom: () => xe, HpsMeasureElement: () => R, HyperlinkType: () => Oe, IgnoreIfEmptyXmlComponent: () => i2, ImageRun: () => qt, ImportDotx: () => wa, ImportedRootElementAttributes: () => p5, ImportedXmlComponent: () => h4, Indent: () => H, InitializableXmlComponent: () => f3, InsertedTextRun: () => Jo, InternalHyperlink: () => Ir, LeaderType: () => Re, Level: () => Xi, LevelBase: () => $i, LevelForOverride: () => qi, LevelFormat: () => Ui, LevelOverride: () => no, LevelSuffix: () => Hi, LineNumberAttributes: () => Gr, LineNumberRestartFormat: () => Fe, LineNumberType: () => Vr, LineRuleType: () => Ae, Math: () => Rn, MathAccentCharacter: () => Pn, MathAngledBrackets: () => bs, MathBase: () => Fn, MathCurlyBrackets: () => ys, MathDegree: () => ns, MathDenominator: () => On, MathFraction: () => Ln, MathFunction: () => ls, MathFunctionName: () => cs, MathFunctionProperties: () => us, MathIntegral: () => $n, MathLimitLocation: () => Mn, MathNAryProperties: () => Wn, MathNumerator: () => kn, MathPreSubSuperScript: () => ts, MathPreSubSuperScriptProperties: () => es, MathRadical: () => as, MathRadicalProperties: () => os10, MathRoundBrackets: () => ws, MathRun: () => Cn, MathSquareBrackets: () => gs, MathSubScript: () => Yn, MathSubScriptElement: () => Kn, MathSubScriptProperties: () => Zn, MathSubSuperScript: () => Qn, MathSubSuperScriptProperties: () => Jn, MathSum: () => Vn, MathSuperScript: () => qn, MathSuperScriptElement: () => Gn, MathSuperScriptProperties: () => Xn, Media: () => Bi, NumberFormat: () => x2, NumberProperties: () => xr, NumberValueElement: () => C, Numbering: () => oo, OnOffElement: () => I, OutlineLevel: () => Dr, OverlapType: () => Gs, Packer: () => pa, PageBorderDisplay: () => Be, PageBorderOffsetFrom: () => Me, PageBorderZOrder: () => Ue, PageBorders: () => Xr, PageBreak: () => hr2, PageBreakBefore: () => dr, PageMargin: () => Zr, PageMarginAttributes: () => qr, PageNumber: () => A2, PageNumberSeparator: () => He, PageNumberType: () => Jr, PageNumberTypeAttributes: () => Yr, PageOrientation: () => ze, PageReference: () => Fr, PageSize: () => en, PageSizeAttributes: () => Qr, PageTextDirection: () => rn, PageTextDirectionType: () => je, Paragraph: () => In, ParagraphProperties: () => Sn, ParagraphPropertiesDefaults: () => Po, PrettifyType: () => la, RelativeHorizontalPosition: () => Ws, RelativeVerticalPosition: () => Ks, Run: () => me, RunFonts: () => ae, RunProperties: () => pe, RunPropertiesChange: () => de, RunPropertiesDefaults: () => Fo, SectionProperties: () => cn, SectionType: () => We, SectionTypeAttributes: () => nn, SequentialIdentifier: () => Yt, Shading: () => Y, ShadingType: () => _3, SimpleField: () => er, SimpleMailMergeField: () => tr3, SimplePos: () => Ve, SpaceType: () => v, Spacing: () => mr, StringContainer: () => k, StringEnumValueElement: () => O, StringValueElement: () => N, Style: () => wr, StyleForCharacter: () => bo, StyleForParagraph: () => yo, StyleLevel: () => Vo, Styles: () => Do, SymbolRun: () => be, TDirection: () => Fs, Tab: () => Jt, TabAttributes: () => yr, TabStop: () => gr, TabStopItem: () => br3, TabStopPosition: () => Ne, TabStopType: () => Ie, Table: () => ei, TableAnchorType: () => js, TableBorders: () => zs, TableCell: () => Ms, TableCellBorders: () => Cs, TableFloatOptionsAttributes: () => qs, TableFloatProperties: () => Zs, TableLayout: () => Js, TableLayoutType: () => Vs, TableOfContents: () => Go, TableProperties: () => Qs, TableRow: () => si, TableRowHeight: () => ri, TableRowHeightAttributes: () => ti, TableRowProperties: () => ni, TableWidthElement: () => Rs, TextDirection: () => Ss, TextRun: () => we, TextWrappingSide: () => Ee, TextWrappingType: () => _e, ThematicBreak: () => M, Type: () => sn, Underline: () => he2, UnderlineType: () => T2, VerticalAlign: () => ke, VerticalAlignAttributes: () => Br, VerticalAlignElement: () => Mr, VerticalMerge: () => Ds, VerticalMergeType: () => As, VerticalPosition: () => Je, VerticalPositionAlign: () => b, VerticalPositionRelativeFrom: () => ve, WORKAROUND: () => zo, WORKAROUND2: () => Mi, WORKAROUND3: () => d, WORKAROUND4: () => rs, WidthType: () => Es, WrapNone: () => Rt, WrapSquare: () => Ct, WrapTight: () => kt, WrapTopAndBottom: () => Dt, XmlAttributeComponent: () => o, XmlComponent: () => s5, convertInchesToTwip: () => ga.convertInchesToTwip, convertMillimetersToTwip: () => ga.convertMillimetersToTwip, convertToXmlComponent: () => u3, dateTimeValue: () => ga.dateTimeValue, decimalNumber: () => ga.decimalNumber, eighthPointMeasureValue: () => ga.eighthPointMeasureValue, hexColorValue: () => ga.hexColorValue, hpsMeasureValue: () => ga.hpsMeasureValue, longHexNumber: () => ga.longHexNumber, measurementOrPercentValue: () => ga.measurementOrPercentValue, percentageValue: () => ga.percentageValue, pointMeasureValue: () => ga.pointMeasureValue, positiveUniversalMeasureValue: () => ga.positiveUniversalMeasureValue, sectionMarginDefaults: () => on, sectionPageSizeDefaults: () => an, shortHexNumber: () => ga.shortHexNumber, signedHpsMeasureValue: () => ga.signedHpsMeasureValue, signedTwipsMeasureValue: () => ga.signedTwipsMeasureValue, twipsMeasureValue: () => ga.twipsMeasureValue, uCharHexNumber: () => ga.uCharHexNumber, uniqueId: () => ga.uniqueId, uniqueNumericId: () => ga.uniqueNumericId, universalMeasureValue: () => ga.universalMeasureValue, unsignedDecimalNumber: () => ga.unsignedDecimalNumber });
136907
136907
  class e3 {
136908
136908
  constructor(e4) {
136909
136909
  this.rootKey = e4;
@@ -137718,7 +137718,7 @@ var require_build = __commonJS({
137718
137718
  super("w:commentReference"), this.root.push(new nr({ id: e4 }));
137719
137719
  }
137720
137720
  }
137721
- class cr extends s5 {
137721
+ class cr3 extends s5 {
137722
137722
  constructor({ id: e4, initials: t4, author: r3, date: n2 = /* @__PURE__ */ new Date(), text: s6 }) {
137723
137723
  super("w:comment"), this.root.push(new rr({ id: e4, initials: t4, author: r3, date: n2.toISOString() })), this.root.push(new In({ children: [new we(s6)] }));
137724
137724
  }
@@ -137727,7 +137727,7 @@ var require_build = __commonJS({
137727
137727
  constructor({ children: e4 }) {
137728
137728
  super("w:comments"), this.root.push(new sr({ "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex", "xmlns:cx1": "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex", "xmlns:cx2": "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex", "xmlns:cx3": "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex", "xmlns:cx4": "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex", "xmlns:cx5": "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex", "xmlns:cx6": "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex", "xmlns:cx7": "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex", "xmlns:cx8": "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex", "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", "xmlns:aink": "http://schemas.microsoft.com/office/drawing/2016/ink", "xmlns:am3d": "http://schemas.microsoft.com/office/drawing/2017/model3d", "xmlns:o": "urn:schemas-microsoft-com:office:office", "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "xmlns:m": "http://schemas.openxmlformats.org/officeDocument/2006/math", "xmlns:v": "urn:schemas-microsoft-com:vml", "xmlns:wp14": "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing", "xmlns:wp": "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", "xmlns:w10": "urn:schemas-microsoft-com:office:word", "xmlns:w": "http://schemas.openxmlformats.org/wordprocessingml/2006/main", "xmlns:w14": "http://schemas.microsoft.com/office/word/2010/wordml", "xmlns:w15": "http://schemas.microsoft.com/office/word/2012/wordml", "xmlns:w16cex": "http://schemas.microsoft.com/office/word/2018/wordml/cex", "xmlns:w16cid": "http://schemas.microsoft.com/office/word/2016/wordml/cid", "xmlns:w16": "http://schemas.microsoft.com/office/word/2018/wordml", "xmlns:w16sdtdh": "http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash", "xmlns:w16se": "http://schemas.microsoft.com/office/word/2015/wordml/symex", "xmlns:wpg": "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup", "xmlns:wpi": "http://schemas.microsoft.com/office/word/2010/wordprocessingInk", "xmlns:wne": "http://schemas.microsoft.com/office/word/2006/wordml", "xmlns:wps": "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" }));
137729
137729
  for (const t4 of e4)
137730
- this.root.push(new cr(t4));
137730
+ this.root.push(new cr3(t4));
137731
137731
  }
137732
137732
  }
137733
137733
  !function(e4) {
@@ -152585,7 +152585,7 @@ var require_overRest = __commonJS({
152585
152585
  "../../node_modules/lodash/_overRest.js"(exports2, module2) {
152586
152586
  var apply = require_apply();
152587
152587
  var nativeMax = Math.max;
152588
- function overRest(func, start, transform2) {
152588
+ function overRest(func, start, transform3) {
152589
152589
  start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
152590
152590
  return function() {
152591
152591
  var args = arguments, index4 = -1, length = nativeMax(args.length - start, 0), array = Array(length);
@@ -152597,7 +152597,7 @@ var require_overRest = __commonJS({
152597
152597
  while (++index4 < start) {
152598
152598
  otherArgs[index4] = args[index4];
152599
152599
  }
152600
- otherArgs[start] = transform2(array);
152600
+ otherArgs[start] = transform3(array);
152601
152601
  return apply(func, this, otherArgs);
152602
152602
  };
152603
152603
  }
@@ -153807,9 +153807,9 @@ var require_copyObject = __commonJS({
153807
153807
  // ../../node_modules/lodash/_overArg.js
153808
153808
  var require_overArg = __commonJS({
153809
153809
  "../../node_modules/lodash/_overArg.js"(exports2, module2) {
153810
- function overArg(func, transform2) {
153810
+ function overArg(func, transform3) {
153811
153811
  return function(arg2) {
153812
- return func(transform2(arg2));
153812
+ return func(transform3(arg2));
153813
153813
  };
153814
153814
  }
153815
153815
  module2.exports = overArg;
@@ -175178,7 +175178,7 @@ var require_ini = __commonJS({
175178
175178
  var parts = dotSplit(k);
175179
175179
  var p6 = out;
175180
175180
  var l = parts.pop();
175181
- var nl = l.replace(/\\\./g, ".");
175181
+ var nl3 = l.replace(/\\\./g, ".");
175182
175182
  parts.forEach(function(part, _4, __2) {
175183
175183
  if (part === "__proto__")
175184
175184
  return;
@@ -175186,9 +175186,9 @@ var require_ini = __commonJS({
175186
175186
  p6[part] = {};
175187
175187
  p6 = p6[part];
175188
175188
  });
175189
- if (p6 === out && nl === l)
175189
+ if (p6 === out && nl3 === l)
175190
175190
  return false;
175191
- p6[nl] = out[k];
175191
+ p6[nl3] = out[k];
175192
175192
  return true;
175193
175193
  }).forEach(function(del2, _3, __) {
175194
175194
  delete out[del2];
@@ -175312,7 +175312,7 @@ var require_utils15 = __commonJS({
175312
175312
  var ini = require_ini();
175313
175313
  var path42 = require("path");
175314
175314
  var stripJsonComments = require_strip_json_comments();
175315
- var parse12 = exports2.parse = function(content3) {
175315
+ var parse13 = exports2.parse = function(content3) {
175316
175316
  if (/^\s*{/.test(content3))
175317
175317
  return JSON.parse(stripJsonComments(content3));
175318
175318
  return ini.parse(content3);
@@ -175334,7 +175334,7 @@ var require_utils15 = __commonJS({
175334
175334
  };
175335
175335
  var json2 = exports2.json = function() {
175336
175336
  var content3 = file.apply(null, arguments);
175337
- return content3 ? parse12(content3) : null;
175337
+ return content3 ? parse13(content3) : null;
175338
175338
  };
175339
175339
  var env7 = exports2.env = function(prefix2, env8) {
175340
175340
  env8 = env8 || process.env;
@@ -175691,13 +175691,13 @@ var require_rc = __commonJS({
175691
175691
  var etc = "/etc";
175692
175692
  var win = process.platform === "win32";
175693
175693
  var home = win ? process.env.USERPROFILE : process.env.HOME;
175694
- module2.exports = function(name3, defaults4, argv, parse12) {
175694
+ module2.exports = function(name3, defaults4, argv, parse13) {
175695
175695
  if ("string" !== typeof name3)
175696
175696
  throw new Error("rc(name): name *must* be string");
175697
175697
  if (!argv)
175698
175698
  argv = require_minimist()(process.argv.slice(2));
175699
175699
  defaults4 = ("string" === typeof defaults4 ? cc.json(defaults4) : defaults4) || {};
175700
- parse12 = parse12 || cc.parse;
175700
+ parse13 = parse13 || cc.parse;
175701
175701
  var env7 = cc.env(name3 + "_");
175702
175702
  var configs = [defaults4];
175703
175703
  var configFiles = [];
@@ -175706,7 +175706,7 @@ var require_rc = __commonJS({
175706
175706
  return;
175707
175707
  var fileConfig = cc.file(file);
175708
175708
  if (fileConfig) {
175709
- configs.push(parse12(fileConfig));
175709
+ configs.push(parse13(fileConfig));
175710
175710
  configFiles.push(file);
175711
175711
  }
175712
175712
  }
@@ -176732,7 +176732,7 @@ var require_config_chain = __commonJS({
176732
176732
  }
176733
176733
  return find3(__dirname, rel2);
176734
176734
  };
176735
- var parse12 = exports2.parse = function(content3, file, type2) {
176735
+ var parse13 = exports2.parse = function(content3, file, type2) {
176736
176736
  content3 = "" + content3;
176737
176737
  if (!type2) {
176738
176738
  try {
@@ -176765,7 +176765,7 @@ var require_config_chain = __commonJS({
176765
176765
  } catch (err) {
176766
176766
  return;
176767
176767
  }
176768
- return parse12(content3, file, "json");
176768
+ return parse13(content3, file, "json");
176769
176769
  };
176770
176770
  var env7 = exports2.env = function(prefix2, env8) {
176771
176771
  env8 = env8 || process.env;
@@ -178148,7 +178148,7 @@ var require_semver2 = __commonJS({
178148
178148
  var require_parse7 = __commonJS({
178149
178149
  "../../node_modules/semver/functions/parse.js"(exports2, module2) {
178150
178150
  var SemVer = require_semver2();
178151
- var parse12 = (version4, options, throwErrors = false) => {
178151
+ var parse13 = (version4, options, throwErrors = false) => {
178152
178152
  if (version4 instanceof SemVer) {
178153
178153
  return version4;
178154
178154
  }
@@ -178161,16 +178161,16 @@ var require_parse7 = __commonJS({
178161
178161
  throw er;
178162
178162
  }
178163
178163
  };
178164
- module2.exports = parse12;
178164
+ module2.exports = parse13;
178165
178165
  }
178166
178166
  });
178167
178167
 
178168
178168
  // ../../node_modules/semver/functions/valid.js
178169
178169
  var require_valid = __commonJS({
178170
178170
  "../../node_modules/semver/functions/valid.js"(exports2, module2) {
178171
- var parse12 = require_parse7();
178171
+ var parse13 = require_parse7();
178172
178172
  var valid2 = (version4, options) => {
178173
- const v = parse12(version4, options);
178173
+ const v = parse13(version4, options);
178174
178174
  return v ? v.version : null;
178175
178175
  };
178176
178176
  module2.exports = valid2;
@@ -178180,9 +178180,9 @@ var require_valid = __commonJS({
178180
178180
  // ../../node_modules/semver/functions/clean.js
178181
178181
  var require_clean = __commonJS({
178182
178182
  "../../node_modules/semver/functions/clean.js"(exports2, module2) {
178183
- var parse12 = require_parse7();
178183
+ var parse13 = require_parse7();
178184
178184
  var clean3 = (version4, options) => {
178185
- const s5 = parse12(version4.trim().replace(/^[=v]+/, ""), options);
178185
+ const s5 = parse13(version4.trim().replace(/^[=v]+/, ""), options);
178186
178186
  return s5 ? s5.version : null;
178187
178187
  };
178188
178188
  module2.exports = clean3;
@@ -178215,10 +178215,10 @@ var require_inc = __commonJS({
178215
178215
  // ../../node_modules/semver/functions/diff.js
178216
178216
  var require_diff = __commonJS({
178217
178217
  "../../node_modules/semver/functions/diff.js"(exports2, module2) {
178218
- var parse12 = require_parse7();
178218
+ var parse13 = require_parse7();
178219
178219
  var diff = (version1, version22) => {
178220
- const v1 = parse12(version1, null, true);
178221
- const v2 = parse12(version22, null, true);
178220
+ const v1 = parse13(version1, null, true);
178221
+ const v2 = parse13(version22, null, true);
178222
178222
  const comparison = v1.compare(v2);
178223
178223
  if (comparison === 0) {
178224
178224
  return null;
@@ -178286,9 +178286,9 @@ var require_patch = __commonJS({
178286
178286
  // ../../node_modules/semver/functions/prerelease.js
178287
178287
  var require_prerelease = __commonJS({
178288
178288
  "../../node_modules/semver/functions/prerelease.js"(exports2, module2) {
178289
- var parse12 = require_parse7();
178289
+ var parse13 = require_parse7();
178290
178290
  var prerelease = (version4, options) => {
178291
- const parsed = parse12(version4, options);
178291
+ const parsed = parse13(version4, options);
178292
178292
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
178293
178293
  };
178294
178294
  module2.exports = prerelease;
@@ -178460,7 +178460,7 @@ var require_cmp = __commonJS({
178460
178460
  var require_coerce = __commonJS({
178461
178461
  "../../node_modules/semver/functions/coerce.js"(exports2, module2) {
178462
178462
  var SemVer = require_semver2();
178463
- var parse12 = require_parse7();
178463
+ var parse13 = require_parse7();
178464
178464
  var { safeRe: re, t: t2 } = require_re2();
178465
178465
  var coerce = (version4, options) => {
178466
178466
  if (version4 instanceof SemVer) {
@@ -178489,7 +178489,7 @@ var require_coerce = __commonJS({
178489
178489
  if (match3 === null) {
178490
178490
  return null;
178491
178491
  }
178492
- return parse12(`${match3[2]}.${match3[3] || "0"}.${match3[4] || "0"}`, options);
178492
+ return parse13(`${match3[2]}.${match3[3] || "0"}.${match3[4] || "0"}`, options);
178493
178493
  };
178494
178494
  module2.exports = coerce;
178495
178495
  }
@@ -180086,7 +180086,7 @@ var require_semver3 = __commonJS({
180086
180086
  var constants2 = require_constants7();
180087
180087
  var SemVer = require_semver2();
180088
180088
  var identifiers = require_identifiers();
180089
- var parse12 = require_parse7();
180089
+ var parse13 = require_parse7();
180090
180090
  var valid2 = require_valid();
180091
180091
  var clean3 = require_clean();
180092
180092
  var inc = require_inc();
@@ -180124,7 +180124,7 @@ var require_semver3 = __commonJS({
180124
180124
  var simplifyRange = require_simplify();
180125
180125
  var subset = require_subset();
180126
180126
  module2.exports = {
180127
- parse: parse12,
180127
+ parse: parse13,
180128
180128
  valid: valid2,
180129
180129
  clean: clean3,
180130
180130
  inc,
@@ -180503,7 +180503,7 @@ var require_ms6 = __commonJS({
180503
180503
  options = options || {};
180504
180504
  var type2 = typeof val;
180505
180505
  if (type2 === "string" && val.length > 0) {
180506
- return parse12(val);
180506
+ return parse13(val);
180507
180507
  } else if (type2 === "number" && isFinite(val)) {
180508
180508
  return options.long ? fmtLong(val) : fmtShort(val);
180509
180509
  }
@@ -180511,7 +180511,7 @@ var require_ms6 = __commonJS({
180511
180511
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
180512
180512
  );
180513
180513
  };
180514
- function parse12(str2) {
180514
+ function parse13(str2) {
180515
180515
  str2 = String(str2);
180516
180516
  if (str2.length > 100) {
180517
180517
  return;
@@ -183790,7 +183790,7 @@ var require_url_parse = __commonJS({
183790
183790
  if (!(this instanceof Url)) {
183791
183791
  return new Url(address, location4, parser3);
183792
183792
  }
183793
- var relative4, extracted, parse12, instruction, index4, key2, instructions = rules.slice(), type2 = typeof location4, url = this, i2 = 0;
183793
+ var relative4, extracted, parse13, instruction, index4, key2, instructions = rules.slice(), type2 = typeof location4, url = this, i2 = 0;
183794
183794
  if ("object" !== type2 && "string" !== type2) {
183795
183795
  parser3 = location4;
183796
183796
  location4 = null;
@@ -183812,12 +183812,12 @@ var require_url_parse = __commonJS({
183812
183812
  address = instruction(address, url);
183813
183813
  continue;
183814
183814
  }
183815
- parse12 = instruction[0];
183815
+ parse13 = instruction[0];
183816
183816
  key2 = instruction[1];
183817
- if (parse12 !== parse12) {
183817
+ if (parse13 !== parse13) {
183818
183818
  url[key2] = address;
183819
- } else if ("string" === typeof parse12) {
183820
- index4 = parse12 === "@" ? address.lastIndexOf(parse12) : address.indexOf(parse12);
183819
+ } else if ("string" === typeof parse13) {
183820
+ index4 = parse13 === "@" ? address.lastIndexOf(parse13) : address.indexOf(parse13);
183821
183821
  if (~index4) {
183822
183822
  if ("number" === typeof instruction[2]) {
183823
183823
  url[key2] = address.slice(0, index4);
@@ -183827,7 +183827,7 @@ var require_url_parse = __commonJS({
183827
183827
  address = address.slice(0, index4);
183828
183828
  }
183829
183829
  }
183830
- } else if (index4 = parse12.exec(address)) {
183830
+ } else if (index4 = parse13.exec(address)) {
183831
183831
  url[key2] = index4[1];
183832
183832
  address = address.slice(0, index4.index);
183833
183833
  }
@@ -183987,7 +183987,7 @@ var require_url = __commonJS({
183987
183987
  var url_parse_1 = __importDefault2(require_url_parse());
183988
183988
  var URLExt;
183989
183989
  (function(URLExt2) {
183990
- function parse12(url) {
183990
+ function parse13(url) {
183991
183991
  if (typeof document !== "undefined" && document) {
183992
183992
  const a2 = document.createElement("a");
183993
183993
  a2.href = url;
@@ -183995,13 +183995,13 @@ var require_url = __commonJS({
183995
183995
  }
183996
183996
  return (0, url_parse_1.default)(url);
183997
183997
  }
183998
- URLExt2.parse = parse12;
183998
+ URLExt2.parse = parse13;
183999
183999
  function getHostName(url) {
184000
184000
  return (0, url_parse_1.default)(url).hostname;
184001
184001
  }
184002
184002
  URLExt2.getHostName = getHostName;
184003
184003
  function normalize6(url) {
184004
- return url && parse12(url).toString();
184004
+ return url && parse13(url).toString();
184005
184005
  }
184006
184006
  URLExt2.normalize = normalize6;
184007
184007
  function join21(...parts) {
@@ -184041,7 +184041,7 @@ var require_url = __commonJS({
184041
184041
  }
184042
184042
  URLExt2.queryStringToObject = queryStringToObject;
184043
184043
  function isLocal(url, allowRoot = false) {
184044
- const { protocol } = parse12(url);
184044
+ const { protocol } = parse13(url);
184045
184045
  return (!protocol || url.toLowerCase().indexOf(protocol) !== 0) && (allowRoot ? url.indexOf("//") !== 0 : url.indexOf("/") !== 0);
184046
184046
  }
184047
184047
  URLExt2.isLocal = isLocal;
@@ -191769,12 +191769,12 @@ var require_statedb = __commonJS({
191769
191769
  */
191770
191770
  constructor(options = {}) {
191771
191771
  this._changed = new signaling_1.Signal(this);
191772
- const { connector, transform: transform2 } = options;
191772
+ const { connector, transform: transform3 } = options;
191773
191773
  this._connector = connector || new StateDB.Connector();
191774
- if (!transform2) {
191774
+ if (!transform3) {
191775
191775
  this._ready = Promise.resolve(void 0);
191776
191776
  } else {
191777
- this._ready = transform2.then((transformation) => {
191777
+ this._ready = transform3.then((transformation) => {
191778
191778
  const { contents, type: type2 } = transformation;
191779
191779
  switch (type2) {
191780
191780
  case "cancel":
@@ -193279,7 +193279,7 @@ var {
193279
193279
  } = import_index.default;
193280
193280
 
193281
193281
  // src/version.ts
193282
- var version = "1.1.53";
193282
+ var version = "1.1.55";
193283
193283
  var version_default = version;
193284
193284
 
193285
193285
  // ../myst-cli/dist/build/build.js
@@ -194861,6 +194861,8 @@ var FRONTMATTER_ALIASES = {
194861
194861
  part: "parts",
194862
194862
  ack: "acknowledgments",
194863
194863
  acknowledgements: "acknowledgments",
194864
+ acknowledgment: "acknowledgments",
194865
+ acknowledgement: "acknowledgments",
194864
194866
  availability: "data_availability",
194865
194867
  dataAvailability: "data_availability",
194866
194868
  "data-availability": "data_availability",
@@ -198266,7 +198268,7 @@ function validatePageFrontmatterKeys(value, opts) {
198266
198268
  const partsOptions = incrementOptions("parts", opts);
198267
198269
  let parts;
198268
198270
  if (defined(value.parts)) {
198269
- parts = validateObject(value.parts, partsOptions);
198271
+ parts = validateObjectKeys(value.parts, { optional: PAGE_KNOWN_PARTS, alias: FRONTMATTER_ALIASES }, { keepExtraKeys: true, suppressWarnings: true, ...partsOptions });
198270
198272
  }
198271
198273
  PAGE_KNOWN_PARTS.forEach((partKey) => {
198272
198274
  if (defined(value[partKey])) {
@@ -199295,7 +199297,7 @@ function mergeTextNodes(node3) {
199295
199297
  return node3;
199296
199298
  }
199297
199299
  function admonitionKindToTitle(kind) {
199298
- const transform2 = {
199300
+ const transform3 = {
199299
199301
  attention: "Attention",
199300
199302
  caution: "Caution",
199301
199303
  danger: "Danger",
@@ -199307,7 +199309,7 @@ function admonitionKindToTitle(kind) {
199307
199309
  tip: "Tip",
199308
199310
  warning: "Warning"
199309
199311
  };
199310
- return transform2[kind] || `Unknown Admonition "${kind}"`;
199312
+ return transform3[kind] || `Unknown Admonition "${kind}"`;
199311
199313
  }
199312
199314
  function writeTexLabelledComment(title, commands, commentLength2) {
199313
199315
  if (!commands || (commands === null || commands === void 0 ? void 0 : commands.length) === 0)
@@ -199320,6 +199322,18 @@ function writeTexLabelledComment(title, commands, commentLength2) {
199320
199322
  return `${titleBlock}${commands.join("\n")}
199321
199323
  `;
199322
199324
  }
199325
+ function getMetadataTags(node3) {
199326
+ var _a6;
199327
+ if (!node3.data)
199328
+ return [];
199329
+ const tags = (_a6 = node3.data.tags) !== null && _a6 !== void 0 ? _a6 : [];
199330
+ Object.entries(node3.data).forEach(([key2, val]) => {
199331
+ if (val === true || typeof val === "string" && val.toLowerCase() === "true") {
199332
+ tags.push(key2);
199333
+ }
199334
+ });
199335
+ return tags.map((tag) => tag.toLowerCase());
199336
+ }
199323
199337
 
199324
199338
  // ../myst-common/dist/plural.js
199325
199339
  function plural(f3, count2) {
@@ -199958,7 +199972,21 @@ function coercePart(part) {
199958
199972
  if (!part) {
199959
199973
  return [];
199960
199974
  }
199961
- return typeof part === "string" ? [part.toLowerCase()] : part.map((s5) => s5.toLowerCase());
199975
+ if (typeof part === "string")
199976
+ return coercePart([part]);
199977
+ const parts = [];
199978
+ part.map((p5) => p5.toLowerCase()).forEach((p5) => {
199979
+ parts.push(p5);
199980
+ Object.entries(FRONTMATTER_ALIASES).forEach(([alias, value]) => {
199981
+ if (p5 === alias || p5 === value) {
199982
+ if (!parts.includes(value))
199983
+ parts.unshift(value);
199984
+ if (!parts.includes(alias))
199985
+ parts.push(alias);
199986
+ }
199987
+ });
199988
+ });
199989
+ return parts;
199962
199990
  }
199963
199991
  function selectBlockParts(tree, part) {
199964
199992
  const parts = coercePart(part);
@@ -202921,9 +202949,55 @@ var jsYaml = {
202921
202949
  };
202922
202950
  var js_yaml_default = jsYaml;
202923
202951
 
202952
+ // ../myst-config/dist/errorRules/validators.js
202953
+ var ERROR_RULE_KEY_OBJECT = {
202954
+ required: ["id"],
202955
+ optional: ["severity", "keys"],
202956
+ alias: {
202957
+ rule: "id",
202958
+ key: "keys"
202959
+ }
202960
+ };
202961
+ function validateErrorRule(input3, opts) {
202962
+ if (typeof input3 === "string") {
202963
+ input3 = { id: input3 };
202964
+ }
202965
+ const value = validateObjectKeys(input3, ERROR_RULE_KEY_OBJECT, {
202966
+ ...opts
202967
+ });
202968
+ if (value === void 0)
202969
+ return void 0;
202970
+ const id = validateString(value.id, incrementOptions("id", opts));
202971
+ const severity = validateChoice(value.severity || "ignore", {
202972
+ ...incrementOptions("severity", opts),
202973
+ choices: ["ignore", "warn", "error"]
202974
+ });
202975
+ if (!id || !severity)
202976
+ return void 0;
202977
+ const output2 = { id, severity };
202978
+ if (!defined(value.keys))
202979
+ return [output2];
202980
+ const keyList = validateList(value.keys, { ...incrementOptions("keys", opts), coerce: true }, (key2, ind) => {
202981
+ return validateString(key2, incrementOptions(`keys.${ind}`, opts));
202982
+ });
202983
+ if (!keyList)
202984
+ return void 0;
202985
+ return keyList.map((key2) => ({ ...output2, key: key2 }));
202986
+ }
202987
+ function validateErrorRuleList(input3, opts) {
202988
+ if (input3 === void 0)
202989
+ return void 0;
202990
+ const output2 = validateList(input3, { coerce: true, ...incrementOptions("error_rules", opts) }, (exp, ind) => {
202991
+ return validateErrorRule(exp, incrementOptions(`error_rules.${ind}`, opts));
202992
+ });
202993
+ if (!output2)
202994
+ return void 0;
202995
+ return output2.flat();
202996
+ }
202997
+
202924
202998
  // ../myst-config/dist/project/validators.js
202925
202999
  var PROJECT_CONFIG_KEYS = {
202926
- optional: ["remote", "index", "exclude", "plugins", ...PROJECT_FRONTMATTER_KEYS],
203000
+ optional: ["remote", "index", "exclude", "plugins", "error_rules", ...PROJECT_FRONTMATTER_KEYS],
202927
203001
  alias: FRONTMATTER_ALIASES
202928
203002
  };
202929
203003
  function validateProjectConfigKeys(value, opts) {
@@ -202944,6 +203018,11 @@ function validateProjectConfigKeys(value, opts) {
202944
203018
  return validateString(file, incrementOptions(`plugins.${index4}`, opts));
202945
203019
  });
202946
203020
  }
203021
+ if (defined(value.error_rules)) {
203022
+ const error_rules = validateErrorRuleList(value.error_rules, opts);
203023
+ if (error_rules)
203024
+ output2.error_rules = error_rules;
203025
+ }
202947
203026
  return output2;
202948
203027
  }
202949
203028
  function validateProjectConfig(input3, opts) {
@@ -203875,7 +203954,7 @@ function base() {
203875
203954
  processor2.freeze = freeze2;
203876
203955
  processor2.attachers = attachers;
203877
203956
  processor2.use = use;
203878
- processor2.parse = parse12;
203957
+ processor2.parse = parse13;
203879
203958
  processor2.stringify = stringify4;
203880
203959
  processor2.run = run;
203881
203960
  processor2.runSync = runSync;
@@ -203998,7 +204077,7 @@ function base() {
203998
204077
  }
203999
204078
  }
204000
204079
  }
204001
- function parse12(doc) {
204080
+ function parse13(doc) {
204002
204081
  processor2.freeze();
204003
204082
  const file = vfile(doc);
204004
204083
  const Parser3 = processor2.Parser;
@@ -206263,11 +206342,11 @@ var Schema2 = class {
206263
206342
  * @param {Normal} normal
206264
206343
  * @param {string} [space]
206265
206344
  */
206266
- constructor(property, normal, space2) {
206345
+ constructor(property, normal, space3) {
206267
206346
  this.property = property;
206268
206347
  this.normal = normal;
206269
- if (space2) {
206270
- this.space = space2;
206348
+ if (space3) {
206349
+ this.space = space3;
206271
206350
  }
206272
206351
  }
206273
206352
  };
@@ -206276,7 +206355,7 @@ Schema2.prototype.normal = {};
206276
206355
  Schema2.prototype.space = null;
206277
206356
 
206278
206357
  // ../../node_modules/property-information/lib/util/merge.js
206279
- function merge2(definitions2, space2) {
206358
+ function merge2(definitions2, space3) {
206280
206359
  const property = {};
206281
206360
  const normal = {};
206282
206361
  let index4 = -1;
@@ -206284,7 +206363,7 @@ function merge2(definitions2, space2) {
206284
206363
  Object.assign(property, definitions2[index4].property);
206285
206364
  Object.assign(normal, definitions2[index4].normal);
206286
206365
  }
206287
- return new Schema2(property, normal, space2);
206366
+ return new Schema2(property, normal, space3);
206288
206367
  }
206289
206368
 
206290
206369
  // ../../node_modules/property-information/lib/normalize.js
@@ -206348,10 +206427,10 @@ var DefinedInfo = class extends Info {
206348
206427
  * @param {number|null} [mask]
206349
206428
  * @param {string} [space]
206350
206429
  */
206351
- constructor(property, attribute2, mask2, space2) {
206430
+ constructor(property, attribute2, mask2, space3) {
206352
206431
  let index4 = -1;
206353
206432
  super(property, attribute2);
206354
- mark(this, "space", space2);
206433
+ mark(this, "space", space3);
206355
206434
  if (typeof mask2 === "number") {
206356
206435
  while (++index4 < checks.length) {
206357
206436
  const check2 = checks[index4];
@@ -220455,6 +220534,14 @@ var defaultHtmlToMdastOptions = {
220455
220534
  _brKeep(h4, node3) {
220456
220535
  return h4(node3, "_break");
220457
220536
  },
220537
+ span(h4, node3) {
220538
+ const attrs = addClassAndIdentifier(node3);
220539
+ return h4(node3, "span", attrs, all5(h4, node3));
220540
+ },
220541
+ div(h4, node3) {
220542
+ const attrs = addClassAndIdentifier(node3);
220543
+ return h4(node3, "div", attrs, all5(h4, node3));
220544
+ },
220458
220545
  a(h4, node3) {
220459
220546
  const attrs = addClassAndIdentifier(node3);
220460
220547
  attrs.url = String(node3.properties.href || "");
@@ -225827,9 +225914,9 @@ var buildExpression$1 = function buildExpression(expression, options, isRealGrou
225827
225914
  traverseNonSpaceNodes(groups, (node4, prev) => {
225828
225915
  var prevType = getTypeOfDomTree(prev);
225829
225916
  var type2 = getTypeOfDomTree(node4);
225830
- var space2 = prevType && type2 ? node4.hasClass("mtight") ? tightSpacings[prevType][type2] : spacings[prevType][type2] : null;
225831
- if (space2) {
225832
- return buildCommon.makeGlue(space2, glueOptions);
225917
+ var space3 = prevType && type2 ? node4.hasClass("mtight") ? tightSpacings[prevType][type2] : spacings[prevType][type2] : null;
225918
+ if (space3) {
225919
+ return buildCommon.makeGlue(space3, glueOptions);
225833
225920
  }
225834
225921
  }, {
225835
225922
  node: dummyPrev
@@ -234084,12 +234171,12 @@ var Parser2 = class {
234084
234171
  this.gullet.macros.set("\\color", "\\textcolor");
234085
234172
  }
234086
234173
  try {
234087
- var parse12 = this.parseExpression(false);
234174
+ var parse13 = this.parseExpression(false);
234088
234175
  this.expect("EOF");
234089
234176
  if (!this.settings.globalGroup) {
234090
234177
  this.gullet.endGroup();
234091
234178
  }
234092
- return parse12;
234179
+ return parse13;
234093
234180
  } finally {
234094
234181
  this.gullet.endGroups();
234095
234182
  }
@@ -234103,10 +234190,10 @@ var Parser2 = class {
234103
234190
  this.consume();
234104
234191
  this.gullet.pushToken(new Token("}"));
234105
234192
  this.gullet.pushTokens(tokens);
234106
- var parse12 = this.parseExpression(false);
234193
+ var parse13 = this.parseExpression(false);
234107
234194
  this.expect("}");
234108
234195
  this.nextToken = oldToken;
234109
- return parse12;
234196
+ return parse13;
234110
234197
  }
234111
234198
  /**
234112
234199
  * Parses an "expression", which is a list of atoms.
@@ -235529,7 +235616,7 @@ function blockToFigureTransform(mdast2, opts) {
235529
235616
  const blocks2 = selectAll("block", mdast2);
235530
235617
  const parser3 = (_a6 = opts === null || opts === void 0 ? void 0 : opts.parser) !== null && _a6 !== void 0 ? _a6 : defaultParser;
235531
235618
  blocks2.forEach((block5) => {
235532
- var _a7, _b, _c, _d2, _e, _f, _g, _h, _j, _k;
235619
+ var _a7, _b, _c, _d2, _e, _f, _g, _h, _j;
235533
235620
  const caption3 = (_d2 = (_b = (_a7 = block5.data) === null || _a7 === void 0 ? void 0 : _a7.caption) !== null && _b !== void 0 ? _b : (_c = block5.data) === null || _c === void 0 ? void 0 : _c["fig-cap"]) !== null && _d2 !== void 0 ? _d2 : (_e = block5.data) === null || _e === void 0 ? void 0 : _e["tbl-cap"];
235534
235621
  if (caption3) {
235535
235622
  const kind = (_g = (_f = block5.data) === null || _f === void 0 ? void 0 : _f.kind) !== null && _g !== void 0 ? _g : ((_h = block5.data) === null || _h === void 0 ? void 0 : _h["tbl-cap"]) ? "table" : "figure";
@@ -235542,7 +235629,7 @@ function blockToFigureTransform(mdast2, opts) {
235542
235629
  identifier: block5.identifier,
235543
235630
  children
235544
235631
  };
235545
- if (((_k = block5.data) === null || _k === void 0 ? void 0 : _k.type) === NotebookCell.code) {
235632
+ if (block5.kind === NotebookCell.code) {
235546
235633
  container4.noSubcontainers = true;
235547
235634
  }
235548
235635
  block5.children = [container4];
@@ -235744,14 +235831,14 @@ function linksTransform(mdast2, file, opts) {
235744
235831
  formatLinkText(link4);
235745
235832
  if (!link4.urlSource)
235746
235833
  link4.urlSource = link4.url;
235747
- const transform2 = opts.transformers.find((t2) => t2.test(link4.urlSource));
235748
- if (!transform2)
235834
+ const transform3 = opts.transformers.find((t2) => t2.test(link4.urlSource));
235835
+ if (!transform3)
235749
235836
  return;
235750
- const result = transform2.transform(link4, file);
235837
+ const result = transform3.transform(link4, file);
235751
235838
  if (result) {
235752
235839
  delete link4.error;
235753
- if (transform2.protocol) {
235754
- link4.protocol = transform2.protocol;
235840
+ if (transform3.protocol) {
235841
+ link4.protocol = transform3.protocol;
235755
235842
  }
235756
235843
  } else {
235757
235844
  link4.error = true;
@@ -236414,6 +236501,7 @@ var SUBFIGURE_TYPES = [
236414
236501
  "block",
236415
236502
  "container",
236416
236503
  "image",
236504
+ "mermaid",
236417
236505
  "iframe",
236418
236506
  "table",
236419
236507
  "code",
@@ -238862,7 +238950,7 @@ function createReducer(initialState, mapOrBuilderCallback) {
238862
238950
  }) => matcher(action)).map(({
238863
238951
  reducer: reducer2
238864
238952
  }) => reducer2)];
238865
- if (caseReducers.filter((cr) => !!cr).length === 0) {
238953
+ if (caseReducers.filter((cr3) => !!cr3).length === 0) {
238866
238954
  caseReducers = [finalDefaultCaseReducer];
238867
238955
  }
238868
238956
  return caseReducers.reduce((previousState, caseReducer) => {
@@ -239600,8 +239688,8 @@ var rootReducer = combineReducers({
239600
239688
  });
239601
239689
 
239602
239690
  // ../myst-cli/dist/utils/addWarningForFile.js
239603
- function addWarningForFile(session, file, message, kind = "warn", opts) {
239604
- var _a6, _b, _c;
239691
+ function addWarningForFile(session, file, message, severity = "warn", opts) {
239692
+ var _a6, _b, _c, _d2, _e;
239605
239693
  const line2 = ((_a6 = opts === null || opts === void 0 ? void 0 : opts.position) === null || _a6 === void 0 ? void 0 : _a6.start.line) ? `:${opts === null || opts === void 0 ? void 0 : opts.position.start.line}` : "";
239606
239694
  const column = ((_b = opts === null || opts === void 0 ? void 0 : opts.position) === null || _b === void 0 ? void 0 : _b.start.column) && ((_c = opts === null || opts === void 0 ? void 0 : opts.position) === null || _c === void 0 ? void 0 : _c.start.column) > 1 ? `:${opts === null || opts === void 0 ? void 0 : opts.position.start.column}` : "";
239607
239695
  const note = (opts === null || opts === void 0 ? void 0 : opts.note) ? `
@@ -239611,7 +239699,23 @@ function addWarningForFile(session, file, message, kind = "warn", opts) {
239611
239699
  `) : "";
239612
239700
  const prefix2 = file ? `${file}${line2}${column} ` : "";
239613
239701
  const formatted = `${message}${note}${url}`;
239614
- switch (kind) {
239702
+ if (opts === null || opts === void 0 ? void 0 : opts.ruleId) {
239703
+ const config2 = selectCurrentProjectConfig(session.store.getState());
239704
+ const handler = (_d2 = config2 === null || config2 === void 0 ? void 0 : config2.error_rules) === null || _d2 === void 0 ? void 0 : _d2.find((rule) => {
239705
+ if (rule.key) {
239706
+ return rule.id === opts.ruleId && rule.key === opts.key;
239707
+ }
239708
+ return rule.id === opts.ruleId;
239709
+ });
239710
+ if (handler) {
239711
+ if (handler.severity === "ignore") {
239712
+ session.log.debug(`${prefix2}${formatted}`);
239713
+ return;
239714
+ }
239715
+ severity = (_e = handler.severity) !== null && _e !== void 0 ? _e : severity;
239716
+ }
239717
+ }
239718
+ switch (severity) {
239615
239719
  case "info":
239616
239720
  session.log.info(`\u2139\uFE0F ${prefix2}${formatted}`);
239617
239721
  break;
@@ -239623,11 +239727,14 @@ function addWarningForFile(session, file, message, kind = "warn", opts) {
239623
239727
  session.log.warn(`\u26A0\uFE0F ${prefix2}${formatted}`);
239624
239728
  break;
239625
239729
  }
239730
+ if (opts === null || opts === void 0 ? void 0 : opts.ruleId) {
239731
+ session.log.debug(`To suppress this message, add rule: "${opts.ruleId}"${opts.key ? ` with key: "${opts.key}"` : ""} to "error_rules" in your project config`);
239732
+ }
239626
239733
  if (file) {
239627
239734
  session.store.dispatch(warnings.actions.addWarning({
239628
239735
  file,
239629
239736
  message,
239630
- kind,
239737
+ kind: severity,
239631
239738
  url: opts === null || opts === void 0 ? void 0 : opts.url,
239632
239739
  note: opts === null || opts === void 0 ? void 0 : opts.note,
239633
239740
  position: opts === null || opts === void 0 ? void 0 : opts.position,
@@ -248402,10 +248509,10 @@ var pgfkeys_default = (
248402
248509
  var peg$f8 = function(x2) {
248403
248510
  return x2;
248404
248511
  };
248405
- var peg$f9 = function(space2, x2) {
248512
+ var peg$f9 = function(space3, x2) {
248406
248513
  return {
248407
248514
  trailingComment: x2,
248408
- leadingParbreak: space2.parbreak > 0
248515
+ leadingParbreak: space3.parbreak > 0
248409
248516
  };
248410
248517
  };
248411
248518
  var peg$f10 = function(list6) {
@@ -264510,13 +264617,13 @@ var require_standalone = __commonJS3({
264510
264617
  return zo(e2) == "String" ? Xo(e2, "") : Hr(e2);
264511
264618
  } : Hr;
264512
264619
  });
264513
- var cr = xe((p0, Bu) => {
264620
+ var cr3 = xe((p0, Bu) => {
264514
264621
  Bu.exports = function(e2) {
264515
264622
  return e2 == null;
264516
264623
  };
264517
264624
  });
264518
264625
  var Gr = xe((f0, Nu) => {
264519
- var Ko = cr(), Yo = TypeError;
264626
+ var Ko = cr3(), Yo = TypeError;
264520
264627
  Nu.exports = function(e2) {
264521
264628
  if (Ko(e2))
264522
264629
  throw Yo("Can't call method on " + e2);
@@ -264550,8 +264657,8 @@ var require_standalone = __commonJS3({
264550
264657
  };
264551
264658
  });
264552
264659
  var Wt = xe((y0, ju) => {
264553
- var zr = pt(), nl = ot(), ul = function(e2) {
264554
- return nl(e2) ? e2 : void 0;
264660
+ var zr = pt(), nl3 = ot(), ul = function(e2) {
264661
+ return nl3(e2) ? e2 : void 0;
264555
264662
  };
264556
264663
  ju.exports = function(e2, r2) {
264557
264664
  return arguments.length < 2 ? ul(zr[e2]) : zr[e2] && zr[e2][r2];
@@ -264610,7 +264717,7 @@ var require_standalone = __commonJS3({
264610
264717
  };
264611
264718
  });
264612
264719
  var mr = xe((b0, es) => {
264613
- var hl = Ht(), vl = cr();
264720
+ var hl = Ht(), vl = cr3();
264614
264721
  es.exports = function(e2, r2) {
264615
264722
  var t2 = e2[r2];
264616
264723
  return vl(t2) ? void 0 : hl(t2);
@@ -264878,9 +264985,9 @@ var require_standalone = __commonJS3({
264878
264985
  };
264879
264986
  });
264880
264987
  var ai = xe((ry, ii) => {
264881
- var np = Sr(), up2 = Math.min;
264988
+ var np2 = Sr(), up2 = Math.min;
264882
264989
  ii.exports = function(e2) {
264883
- return e2 > 0 ? up2(np(e2), 9007199254740991) : 0;
264990
+ return e2 > 0 ? up2(np2(e2), 9007199254740991) : 0;
264884
264991
  };
264885
264992
  });
264886
264993
  var kt = xe((ny, oi) => {
@@ -265090,7 +265197,7 @@ var require_standalone = __commonJS3({
265090
265197
  };
265091
265198
  });
265092
265199
  var In = xe((Ty, ua) => {
265093
- var Nf = Nn(), na = mr(), wf = cr(), _f = Pn(), Pf = bt(), If = Pf("iterator");
265200
+ var Nf = Nn(), na = mr(), wf = cr3(), _f = Pn(), Pf = bt(), If = Pf("iterator");
265094
265201
  ua.exports = function(e2) {
265095
265202
  if (!wf(e2))
265096
265203
  return na(e2, If) || na(e2, "@@iterator") || _f[Nf(e2)];
@@ -277903,8 +278010,8 @@ var SIUNITX_HANDLERS = {
277903
278010
  const { units, alt, organized } = createSiUnitNode(state.file, node3, 1);
277904
278011
  const number2 = texToText(getArguments(node3, "group")[0]);
277905
278012
  const translated = organized.map(unitToString).join(NARROW_NO_BREAK_SPACE);
277906
- const space2 = translated.startsWith("\xB0") ? "" : NARROW_NO_BREAK_SPACE;
277907
- const value = `${number2}${space2}${translated}`;
278013
+ const space3 = translated.startsWith("\xB0") ? "" : NARROW_NO_BREAK_SPACE;
278014
+ const value = `${number2}${space3}${translated}`;
277908
278015
  state.addLeaf("si", {
277909
278016
  number: number2,
277910
278017
  unit: translated,
@@ -277931,8 +278038,8 @@ var SIUNITX_HANDLERS = {
277931
278038
  const { units, alt, organized } = createSiUnitNode(state.file, node3, 1);
277932
278039
  const number2 = texToText(getArguments(node3, "group")[0]);
277933
278040
  const translated = organized.map(unitToString).join(NARROW_NO_BREAK_SPACE);
277934
- const space2 = translated.startsWith("\xB0") ? "" : NARROW_NO_BREAK_SPACE;
277935
- const value = `${number2}${space2}${translated}`;
278041
+ const space3 = translated.startsWith("\xB0") ? "" : NARROW_NO_BREAK_SPACE;
278042
+ const value = `${number2}${space3}${translated}`;
277936
278043
  state.addLeaf("si", {
277937
278044
  number: number2,
277938
278045
  unit: translated,
@@ -279416,6 +279523,42 @@ var CODE_DIRECTIVE_OPTIONS = {
279416
279523
  // doc: 'Ignore minor errors on highlighting',
279417
279524
  // },
279418
279525
  };
279526
+ function parseTags(input3, vfile2, node3) {
279527
+ var _a6, _b;
279528
+ if (!input3)
279529
+ return void 0;
279530
+ if (typeof input3 === "string" && input3.startsWith("[") && input3.endsWith("]")) {
279531
+ try {
279532
+ return parseTags(js_yaml_default.load(input3), vfile2, node3);
279533
+ } catch (error) {
279534
+ fileError(vfile2, "Could not load tags for code-cell directive", {
279535
+ node: (_a6 = select('mystDirectiveOption[name="tags"]', node3)) !== null && _a6 !== void 0 ? _a6 : node3,
279536
+ source: "code-cell:tags",
279537
+ ruleId: RuleId.directiveOptionsCorrect
279538
+ });
279539
+ return void 0;
279540
+ }
279541
+ }
279542
+ if (typeof input3 === "string") {
279543
+ const tags2 = input3.split(/[,\s]/).map((t2) => t2.trim()).filter((t2) => !!t2);
279544
+ return tags2.length > 0 ? tags2 : void 0;
279545
+ }
279546
+ if (!Array.isArray(input3))
279547
+ return void 0;
279548
+ const tags = input3;
279549
+ if (tags && Array.isArray(tags) && tags.every((t2) => typeof t2 === "string")) {
279550
+ if (tags.length > 0) {
279551
+ return tags.map((t2) => t2.trim()).filter((t2) => !!t2);
279552
+ }
279553
+ } else if (tags) {
279554
+ fileWarn(vfile2, "tags in code-cell directive must be a list of strings", {
279555
+ node: (_b = select('mystDirectiveOption[name="tags"]', node3)) !== null && _b !== void 0 ? _b : node3,
279556
+ source: "code-cell:tags",
279557
+ ruleId: RuleId.directiveOptionsCorrect
279558
+ });
279559
+ return void 0;
279560
+ }
279561
+ }
279419
279562
  var codeDirective = {
279420
279563
  name: "code",
279421
279564
  doc: "A code-block environment with a language as the argument, and options for highlighting, showing line numbers, and an optional filename.",
@@ -279476,50 +279619,35 @@ var codeDirective = {
279476
279619
  };
279477
279620
  var codeCellDirective = {
279478
279621
  name: "code-cell",
279622
+ doc: "An executable code cell",
279479
279623
  arg: {
279480
- type: String
279624
+ type: String,
279625
+ doc: "Language for execution and display, for example `python`. It will default to the language of the notebook or containing markdown file."
279481
279626
  },
279482
279627
  options: {
279628
+ label: {
279629
+ type: String,
279630
+ alias: ["name"]
279631
+ },
279483
279632
  tags: {
279484
- type: String
279633
+ type: String,
279634
+ alias: ["tag"],
279635
+ doc: "A comma-separated list of tags to add to the cell, for example, `remove-input` or `hide-cell`."
279485
279636
  }
279486
279637
  },
279487
279638
  body: {
279488
- type: String
279639
+ type: String,
279640
+ doc: "The code to be executed and displayed."
279489
279641
  },
279490
279642
  run(data, vfile2) {
279491
- var _a6, _b, _c, _d2, _e;
279643
+ var _a6, _b, _c;
279644
+ const { label, identifier } = normalizeLabel((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.label) || {};
279492
279645
  const code7 = {
279493
279646
  type: "code",
279494
279647
  lang: data.arg,
279495
279648
  executable: true,
279496
- value: (_a6 = data.body) !== null && _a6 !== void 0 ? _a6 : ""
279649
+ value: (_b = data.body) !== null && _b !== void 0 ? _b : ""
279497
279650
  };
279498
- let tags;
279499
- if (typeof ((_b = data.options) === null || _b === void 0 ? void 0 : _b.tags) === "string") {
279500
- try {
279501
- tags = js_yaml_default.load(data.options.tags);
279502
- } catch (error) {
279503
- fileError(vfile2, "Could not load tags for code-cell directive", {
279504
- node: (_c = select('mystDirectiveOption[name="tags"]', data.node)) !== null && _c !== void 0 ? _c : data.node,
279505
- source: "code-cell:tags",
279506
- ruleId: RuleId.directiveOptionsCorrect
279507
- });
279508
- }
279509
- } else if (((_d2 = data.options) === null || _d2 === void 0 ? void 0 : _d2.tags) && Array.isArray(data.options.tags)) {
279510
- tags = data.options.tags;
279511
- }
279512
- if (tags && Array.isArray(tags) && tags.every((t2) => typeof t2 === "string")) {
279513
- if (tags && tags.length > 0) {
279514
- code7.data = { tags: tags.map((t2) => t2.trim()) };
279515
- }
279516
- } else if (tags) {
279517
- fileWarn(vfile2, "tags in code-cell directive must be a list of strings", {
279518
- node: (_e = select('mystDirectiveOption[name="tags"]', data.node)) !== null && _e !== void 0 ? _e : data.node,
279519
- source: "code-cell:tags",
279520
- ruleId: RuleId.directiveOptionsCorrect
279521
- });
279522
- }
279523
279651
  const output2 = {
279524
279652
  type: "output",
279525
279653
  id: nanoid(),
@@ -279527,12 +279655,15 @@ var codeCellDirective = {
279527
279655
  };
279528
279656
  const block5 = {
279529
279657
  type: "block",
279530
- meta: void 0,
279658
+ kind: NotebookCell.code,
279659
+ label,
279660
+ identifier,
279531
279661
  children: [code7, output2],
279532
- data: {
279533
- type: "notebook-code"
279534
- }
279662
+ data: {}
279535
279663
  };
279664
+ const tags = parseTags((_c = data.options) === null || _c === void 0 ? void 0 : _c.tags, vfile2, data.node);
279665
+ if (tags)
279666
+ block5.data.tags = tags;
279536
279667
  return [block5];
279537
279668
  }
279538
279669
  };
@@ -280026,11 +280157,1303 @@ function extToLanguage(ext2) {
280026
280157
  }[ext2 !== null && ext2 !== void 0 ? ext2 : ""]) !== null && _a6 !== void 0 ? _a6 : ext2;
280027
280158
  }
280028
280159
 
280160
+ // ../myst-directives/node_modules/csv-parse/lib/api/CsvError.js
280161
+ var CsvError = class extends Error {
280162
+ constructor(code7, message, options, ...contexts) {
280163
+ if (Array.isArray(message))
280164
+ message = message.join(" ").trim();
280165
+ super(message);
280166
+ if (Error.captureStackTrace !== void 0) {
280167
+ Error.captureStackTrace(this, CsvError);
280168
+ }
280169
+ this.code = code7;
280170
+ for (const context of contexts) {
280171
+ for (const key2 in context) {
280172
+ const value = context[key2];
280173
+ this[key2] = Buffer.isBuffer(value) ? value.toString(options.encoding) : value == null ? value : JSON.parse(JSON.stringify(value));
280174
+ }
280175
+ }
280176
+ }
280177
+ };
280178
+
280179
+ // ../myst-directives/node_modules/csv-parse/lib/utils/is_object.js
280180
+ var is_object = function(obj) {
280181
+ return typeof obj === "object" && obj !== null && !Array.isArray(obj);
280182
+ };
280183
+
280184
+ // ../myst-directives/node_modules/csv-parse/lib/api/normalize_columns_array.js
280185
+ var normalize_columns_array = function(columns) {
280186
+ const normalizedColumns = [];
280187
+ for (let i2 = 0, l = columns.length; i2 < l; i2++) {
280188
+ const column = columns[i2];
280189
+ if (column === void 0 || column === null || column === false) {
280190
+ normalizedColumns[i2] = { disabled: true };
280191
+ } else if (typeof column === "string") {
280192
+ normalizedColumns[i2] = { name: column };
280193
+ } else if (is_object(column)) {
280194
+ if (typeof column.name !== "string") {
280195
+ throw new CsvError("CSV_OPTION_COLUMNS_MISSING_NAME", [
280196
+ "Option columns missing name:",
280197
+ `property "name" is required at position ${i2}`,
280198
+ "when column is an object literal"
280199
+ ]);
280200
+ }
280201
+ normalizedColumns[i2] = column;
280202
+ } else {
280203
+ throw new CsvError("CSV_INVALID_COLUMN_DEFINITION", [
280204
+ "Invalid column definition:",
280205
+ "expect a string or a literal object,",
280206
+ `got ${JSON.stringify(column)} at position ${i2}`
280207
+ ]);
280208
+ }
280209
+ }
280210
+ return normalizedColumns;
280211
+ };
280212
+
280213
+ // ../myst-directives/node_modules/csv-parse/lib/utils/ResizeableBuffer.js
280214
+ var ResizeableBuffer = class {
280215
+ constructor(size = 100) {
280216
+ this.size = size;
280217
+ this.length = 0;
280218
+ this.buf = Buffer.allocUnsafe(size);
280219
+ }
280220
+ prepend(val) {
280221
+ if (Buffer.isBuffer(val)) {
280222
+ const length = this.length + val.length;
280223
+ if (length >= this.size) {
280224
+ this.resize();
280225
+ if (length >= this.size) {
280226
+ throw Error("INVALID_BUFFER_STATE");
280227
+ }
280228
+ }
280229
+ const buf = this.buf;
280230
+ this.buf = Buffer.allocUnsafe(this.size);
280231
+ val.copy(this.buf, 0);
280232
+ buf.copy(this.buf, val.length);
280233
+ this.length += val.length;
280234
+ } else {
280235
+ const length = this.length++;
280236
+ if (length === this.size) {
280237
+ this.resize();
280238
+ }
280239
+ const buf = this.clone();
280240
+ this.buf[0] = val;
280241
+ buf.copy(this.buf, 1, 0, length);
280242
+ }
280243
+ }
280244
+ append(val) {
280245
+ const length = this.length++;
280246
+ if (length === this.size) {
280247
+ this.resize();
280248
+ }
280249
+ this.buf[length] = val;
280250
+ }
280251
+ clone() {
280252
+ return Buffer.from(this.buf.slice(0, this.length));
280253
+ }
280254
+ resize() {
280255
+ const length = this.length;
280256
+ this.size = this.size * 2;
280257
+ const buf = Buffer.allocUnsafe(this.size);
280258
+ this.buf.copy(buf, 0, 0, length);
280259
+ this.buf = buf;
280260
+ }
280261
+ toString(encoding) {
280262
+ if (encoding) {
280263
+ return this.buf.slice(0, this.length).toString(encoding);
280264
+ } else {
280265
+ return Uint8Array.prototype.slice.call(this.buf.slice(0, this.length));
280266
+ }
280267
+ }
280268
+ toJSON() {
280269
+ return this.toString("utf8");
280270
+ }
280271
+ reset() {
280272
+ this.length = 0;
280273
+ }
280274
+ };
280275
+ var ResizeableBuffer_default = ResizeableBuffer;
280276
+
280277
+ // ../myst-directives/node_modules/csv-parse/lib/api/init_state.js
280278
+ var np = 12;
280279
+ var cr = 13;
280280
+ var nl = 10;
280281
+ var space2 = 32;
280282
+ var tab2 = 9;
280283
+ var init_state = function(options) {
280284
+ return {
280285
+ bomSkipped: false,
280286
+ bufBytesStart: 0,
280287
+ castField: options.cast_function,
280288
+ commenting: false,
280289
+ // Current error encountered by a record
280290
+ error: void 0,
280291
+ enabled: options.from_line === 1,
280292
+ escaping: false,
280293
+ escapeIsQuote: Buffer.isBuffer(options.escape) && Buffer.isBuffer(options.quote) && Buffer.compare(options.escape, options.quote) === 0,
280294
+ // columns can be `false`, `true`, `Array`
280295
+ expectedRecordLength: Array.isArray(options.columns) ? options.columns.length : void 0,
280296
+ field: new ResizeableBuffer_default(20),
280297
+ firstLineToHeaders: options.cast_first_line_to_header,
280298
+ needMoreDataSize: Math.max(
280299
+ // Skip if the remaining buffer smaller than comment
280300
+ options.comment !== null ? options.comment.length : 0,
280301
+ ...options.delimiter.map((delimiter2) => delimiter2.length),
280302
+ // Skip if the remaining buffer can be escape sequence
280303
+ options.quote !== null ? options.quote.length : 0
280304
+ ),
280305
+ previousBuf: void 0,
280306
+ quoting: false,
280307
+ stop: false,
280308
+ rawBuffer: new ResizeableBuffer_default(100),
280309
+ record: [],
280310
+ recordHasError: false,
280311
+ record_length: 0,
280312
+ recordDelimiterMaxLength: options.record_delimiter.length === 0 ? 0 : Math.max(...options.record_delimiter.map((v) => v.length)),
280313
+ trimChars: [Buffer.from(" ", options.encoding)[0], Buffer.from(" ", options.encoding)[0]],
280314
+ wasQuoting: false,
280315
+ wasRowDelimiter: false,
280316
+ timchars: [
280317
+ Buffer.from(Buffer.from([cr], "utf8").toString(), options.encoding),
280318
+ Buffer.from(Buffer.from([nl], "utf8").toString(), options.encoding),
280319
+ Buffer.from(Buffer.from([np], "utf8").toString(), options.encoding),
280320
+ Buffer.from(Buffer.from([space2], "utf8").toString(), options.encoding),
280321
+ Buffer.from(Buffer.from([tab2], "utf8").toString(), options.encoding)
280322
+ ]
280323
+ };
280324
+ };
280325
+
280326
+ // ../myst-directives/node_modules/csv-parse/lib/utils/underscore.js
280327
+ var underscore = function(str2) {
280328
+ return str2.replace(/([A-Z])/g, function(_3, match3) {
280329
+ return "_" + match3.toLowerCase();
280330
+ });
280331
+ };
280332
+
280333
+ // ../myst-directives/node_modules/csv-parse/lib/api/normalize_options.js
280334
+ var normalize_options = function(opts) {
280335
+ const options = {};
280336
+ for (const opt in opts) {
280337
+ options[underscore(opt)] = opts[opt];
280338
+ }
280339
+ if (options.encoding === void 0 || options.encoding === true) {
280340
+ options.encoding = "utf8";
280341
+ } else if (options.encoding === null || options.encoding === false) {
280342
+ options.encoding = null;
280343
+ } else if (typeof options.encoding !== "string" && options.encoding !== null) {
280344
+ throw new CsvError("CSV_INVALID_OPTION_ENCODING", [
280345
+ "Invalid option encoding:",
280346
+ "encoding must be a string or null to return a buffer,",
280347
+ `got ${JSON.stringify(options.encoding)}`
280348
+ ], options);
280349
+ }
280350
+ if (options.bom === void 0 || options.bom === null || options.bom === false) {
280351
+ options.bom = false;
280352
+ } else if (options.bom !== true) {
280353
+ throw new CsvError("CSV_INVALID_OPTION_BOM", [
280354
+ "Invalid option bom:",
280355
+ "bom must be true,",
280356
+ `got ${JSON.stringify(options.bom)}`
280357
+ ], options);
280358
+ }
280359
+ options.cast_function = null;
280360
+ if (options.cast === void 0 || options.cast === null || options.cast === false || options.cast === "") {
280361
+ options.cast = void 0;
280362
+ } else if (typeof options.cast === "function") {
280363
+ options.cast_function = options.cast;
280364
+ options.cast = true;
280365
+ } else if (options.cast !== true) {
280366
+ throw new CsvError("CSV_INVALID_OPTION_CAST", [
280367
+ "Invalid option cast:",
280368
+ "cast must be true or a function,",
280369
+ `got ${JSON.stringify(options.cast)}`
280370
+ ], options);
280371
+ }
280372
+ if (options.cast_date === void 0 || options.cast_date === null || options.cast_date === false || options.cast_date === "") {
280373
+ options.cast_date = false;
280374
+ } else if (options.cast_date === true) {
280375
+ options.cast_date = function(value) {
280376
+ const date = Date.parse(value);
280377
+ return !isNaN(date) ? new Date(date) : value;
280378
+ };
280379
+ } else if (typeof options.cast_date !== "function") {
280380
+ throw new CsvError("CSV_INVALID_OPTION_CAST_DATE", [
280381
+ "Invalid option cast_date:",
280382
+ "cast_date must be true or a function,",
280383
+ `got ${JSON.stringify(options.cast_date)}`
280384
+ ], options);
280385
+ }
280386
+ options.cast_first_line_to_header = null;
280387
+ if (options.columns === true) {
280388
+ options.cast_first_line_to_header = void 0;
280389
+ } else if (typeof options.columns === "function") {
280390
+ options.cast_first_line_to_header = options.columns;
280391
+ options.columns = true;
280392
+ } else if (Array.isArray(options.columns)) {
280393
+ options.columns = normalize_columns_array(options.columns);
280394
+ } else if (options.columns === void 0 || options.columns === null || options.columns === false) {
280395
+ options.columns = false;
280396
+ } else {
280397
+ throw new CsvError("CSV_INVALID_OPTION_COLUMNS", [
280398
+ "Invalid option columns:",
280399
+ "expect an array, a function or true,",
280400
+ `got ${JSON.stringify(options.columns)}`
280401
+ ], options);
280402
+ }
280403
+ if (options.group_columns_by_name === void 0 || options.group_columns_by_name === null || options.group_columns_by_name === false) {
280404
+ options.group_columns_by_name = false;
280405
+ } else if (options.group_columns_by_name !== true) {
280406
+ throw new CsvError("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME", [
280407
+ "Invalid option group_columns_by_name:",
280408
+ "expect an boolean,",
280409
+ `got ${JSON.stringify(options.group_columns_by_name)}`
280410
+ ], options);
280411
+ } else if (options.columns === false) {
280412
+ throw new CsvError("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME", [
280413
+ "Invalid option group_columns_by_name:",
280414
+ "the `columns` mode must be activated."
280415
+ ], options);
280416
+ }
280417
+ if (options.comment === void 0 || options.comment === null || options.comment === false || options.comment === "") {
280418
+ options.comment = null;
280419
+ } else {
280420
+ if (typeof options.comment === "string") {
280421
+ options.comment = Buffer.from(options.comment, options.encoding);
280422
+ }
280423
+ if (!Buffer.isBuffer(options.comment)) {
280424
+ throw new CsvError("CSV_INVALID_OPTION_COMMENT", [
280425
+ "Invalid option comment:",
280426
+ "comment must be a buffer or a string,",
280427
+ `got ${JSON.stringify(options.comment)}`
280428
+ ], options);
280429
+ }
280430
+ }
280431
+ if (options.comment_no_infix === void 0 || options.comment_no_infix === null || options.comment_no_infix === false) {
280432
+ options.comment_no_infix = false;
280433
+ } else if (options.comment_no_infix !== true) {
280434
+ throw new CsvError("CSV_INVALID_OPTION_COMMENT", [
280435
+ "Invalid option comment_no_infix:",
280436
+ "value must be a boolean,",
280437
+ `got ${JSON.stringify(options.comment_no_infix)}`
280438
+ ], options);
280439
+ }
280440
+ const delimiter_json = JSON.stringify(options.delimiter);
280441
+ if (!Array.isArray(options.delimiter))
280442
+ options.delimiter = [options.delimiter];
280443
+ if (options.delimiter.length === 0) {
280444
+ throw new CsvError("CSV_INVALID_OPTION_DELIMITER", [
280445
+ "Invalid option delimiter:",
280446
+ "delimiter must be a non empty string or buffer or array of string|buffer,",
280447
+ `got ${delimiter_json}`
280448
+ ], options);
280449
+ }
280450
+ options.delimiter = options.delimiter.map(function(delimiter2) {
280451
+ if (delimiter2 === void 0 || delimiter2 === null || delimiter2 === false) {
280452
+ return Buffer.from(",", options.encoding);
280453
+ }
280454
+ if (typeof delimiter2 === "string") {
280455
+ delimiter2 = Buffer.from(delimiter2, options.encoding);
280456
+ }
280457
+ if (!Buffer.isBuffer(delimiter2) || delimiter2.length === 0) {
280458
+ throw new CsvError("CSV_INVALID_OPTION_DELIMITER", [
280459
+ "Invalid option delimiter:",
280460
+ "delimiter must be a non empty string or buffer or array of string|buffer,",
280461
+ `got ${delimiter_json}`
280462
+ ], options);
280463
+ }
280464
+ return delimiter2;
280465
+ });
280466
+ if (options.escape === void 0 || options.escape === true) {
280467
+ options.escape = Buffer.from('"', options.encoding);
280468
+ } else if (typeof options.escape === "string") {
280469
+ options.escape = Buffer.from(options.escape, options.encoding);
280470
+ } else if (options.escape === null || options.escape === false) {
280471
+ options.escape = null;
280472
+ }
280473
+ if (options.escape !== null) {
280474
+ if (!Buffer.isBuffer(options.escape)) {
280475
+ throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(options.escape)}`);
280476
+ }
280477
+ }
280478
+ if (options.from === void 0 || options.from === null) {
280479
+ options.from = 1;
280480
+ } else {
280481
+ if (typeof options.from === "string" && /\d+/.test(options.from)) {
280482
+ options.from = parseInt(options.from);
280483
+ }
280484
+ if (Number.isInteger(options.from)) {
280485
+ if (options.from < 0) {
280486
+ throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(opts.from)}`);
280487
+ }
280488
+ } else {
280489
+ throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(options.from)}`);
280490
+ }
280491
+ }
280492
+ if (options.from_line === void 0 || options.from_line === null) {
280493
+ options.from_line = 1;
280494
+ } else {
280495
+ if (typeof options.from_line === "string" && /\d+/.test(options.from_line)) {
280496
+ options.from_line = parseInt(options.from_line);
280497
+ }
280498
+ if (Number.isInteger(options.from_line)) {
280499
+ if (options.from_line <= 0) {
280500
+ throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(opts.from_line)}`);
280501
+ }
280502
+ } else {
280503
+ throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(opts.from_line)}`);
280504
+ }
280505
+ }
280506
+ if (options.ignore_last_delimiters === void 0 || options.ignore_last_delimiters === null) {
280507
+ options.ignore_last_delimiters = false;
280508
+ } else if (typeof options.ignore_last_delimiters === "number") {
280509
+ options.ignore_last_delimiters = Math.floor(options.ignore_last_delimiters);
280510
+ if (options.ignore_last_delimiters === 0) {
280511
+ options.ignore_last_delimiters = false;
280512
+ }
280513
+ } else if (typeof options.ignore_last_delimiters !== "boolean") {
280514
+ throw new CsvError("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS", [
280515
+ "Invalid option `ignore_last_delimiters`:",
280516
+ "the value must be a boolean value or an integer,",
280517
+ `got ${JSON.stringify(options.ignore_last_delimiters)}`
280518
+ ], options);
280519
+ }
280520
+ if (options.ignore_last_delimiters === true && options.columns === false) {
280521
+ throw new CsvError("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS", [
280522
+ "The option `ignore_last_delimiters`",
280523
+ "requires the activation of the `columns` option"
280524
+ ], options);
280525
+ }
280526
+ if (options.info === void 0 || options.info === null || options.info === false) {
280527
+ options.info = false;
280528
+ } else if (options.info !== true) {
280529
+ throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(options.info)}`);
280530
+ }
280531
+ if (options.max_record_size === void 0 || options.max_record_size === null || options.max_record_size === false) {
280532
+ options.max_record_size = 0;
280533
+ } else if (Number.isInteger(options.max_record_size) && options.max_record_size >= 0) {
280534
+ } else if (typeof options.max_record_size === "string" && /\d+/.test(options.max_record_size)) {
280535
+ options.max_record_size = parseInt(options.max_record_size);
280536
+ } else {
280537
+ throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(options.max_record_size)}`);
280538
+ }
280539
+ if (options.objname === void 0 || options.objname === null || options.objname === false) {
280540
+ options.objname = void 0;
280541
+ } else if (Buffer.isBuffer(options.objname)) {
280542
+ if (options.objname.length === 0) {
280543
+ throw new Error(`Invalid Option: objname must be a non empty buffer`);
280544
+ }
280545
+ if (options.encoding === null) {
280546
+ } else {
280547
+ options.objname = options.objname.toString(options.encoding);
280548
+ }
280549
+ } else if (typeof options.objname === "string") {
280550
+ if (options.objname.length === 0) {
280551
+ throw new Error(`Invalid Option: objname must be a non empty string`);
280552
+ }
280553
+ } else if (typeof options.objname === "number") {
280554
+ } else {
280555
+ throw new Error(`Invalid Option: objname must be a string or a buffer, got ${options.objname}`);
280556
+ }
280557
+ if (options.objname !== void 0) {
280558
+ if (typeof options.objname === "number") {
280559
+ if (options.columns !== false) {
280560
+ throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field");
280561
+ }
280562
+ } else {
280563
+ if (options.columns === false) {
280564
+ throw Error("Invalid Option: objname field must be combined with columns or be defined as an index");
280565
+ }
280566
+ }
280567
+ }
280568
+ if (options.on_record === void 0 || options.on_record === null) {
280569
+ options.on_record = void 0;
280570
+ } else if (typeof options.on_record !== "function") {
280571
+ throw new CsvError("CSV_INVALID_OPTION_ON_RECORD", [
280572
+ "Invalid option `on_record`:",
280573
+ "expect a function,",
280574
+ `got ${JSON.stringify(options.on_record)}`
280575
+ ], options);
280576
+ }
280577
+ if (options.quote === null || options.quote === false || options.quote === "") {
280578
+ options.quote = null;
280579
+ } else {
280580
+ if (options.quote === void 0 || options.quote === true) {
280581
+ options.quote = Buffer.from('"', options.encoding);
280582
+ } else if (typeof options.quote === "string") {
280583
+ options.quote = Buffer.from(options.quote, options.encoding);
280584
+ }
280585
+ if (!Buffer.isBuffer(options.quote)) {
280586
+ throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(options.quote)}`);
280587
+ }
280588
+ }
280589
+ if (options.raw === void 0 || options.raw === null || options.raw === false) {
280590
+ options.raw = false;
280591
+ } else if (options.raw !== true) {
280592
+ throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(options.raw)}`);
280593
+ }
280594
+ if (options.record_delimiter === void 0) {
280595
+ options.record_delimiter = [];
280596
+ } else if (typeof options.record_delimiter === "string" || Buffer.isBuffer(options.record_delimiter)) {
280597
+ if (options.record_delimiter.length === 0) {
280598
+ throw new CsvError("CSV_INVALID_OPTION_RECORD_DELIMITER", [
280599
+ "Invalid option `record_delimiter`:",
280600
+ "value must be a non empty string or buffer,",
280601
+ `got ${JSON.stringify(options.record_delimiter)}`
280602
+ ], options);
280603
+ }
280604
+ options.record_delimiter = [options.record_delimiter];
280605
+ } else if (!Array.isArray(options.record_delimiter)) {
280606
+ throw new CsvError("CSV_INVALID_OPTION_RECORD_DELIMITER", [
280607
+ "Invalid option `record_delimiter`:",
280608
+ "value must be a string, a buffer or array of string|buffer,",
280609
+ `got ${JSON.stringify(options.record_delimiter)}`
280610
+ ], options);
280611
+ }
280612
+ options.record_delimiter = options.record_delimiter.map(function(rd, i2) {
280613
+ if (typeof rd !== "string" && !Buffer.isBuffer(rd)) {
280614
+ throw new CsvError("CSV_INVALID_OPTION_RECORD_DELIMITER", [
280615
+ "Invalid option `record_delimiter`:",
280616
+ "value must be a string, a buffer or array of string|buffer",
280617
+ `at index ${i2},`,
280618
+ `got ${JSON.stringify(rd)}`
280619
+ ], options);
280620
+ } else if (rd.length === 0) {
280621
+ throw new CsvError("CSV_INVALID_OPTION_RECORD_DELIMITER", [
280622
+ "Invalid option `record_delimiter`:",
280623
+ "value must be a non empty string or buffer",
280624
+ `at index ${i2},`,
280625
+ `got ${JSON.stringify(rd)}`
280626
+ ], options);
280627
+ }
280628
+ if (typeof rd === "string") {
280629
+ rd = Buffer.from(rd, options.encoding);
280630
+ }
280631
+ return rd;
280632
+ });
280633
+ if (typeof options.relax_column_count === "boolean") {
280634
+ } else if (options.relax_column_count === void 0 || options.relax_column_count === null) {
280635
+ options.relax_column_count = false;
280636
+ } else {
280637
+ throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(options.relax_column_count)}`);
280638
+ }
280639
+ if (typeof options.relax_column_count_less === "boolean") {
280640
+ } else if (options.relax_column_count_less === void 0 || options.relax_column_count_less === null) {
280641
+ options.relax_column_count_less = false;
280642
+ } else {
280643
+ throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(options.relax_column_count_less)}`);
280644
+ }
280645
+ if (typeof options.relax_column_count_more === "boolean") {
280646
+ } else if (options.relax_column_count_more === void 0 || options.relax_column_count_more === null) {
280647
+ options.relax_column_count_more = false;
280648
+ } else {
280649
+ throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(options.relax_column_count_more)}`);
280650
+ }
280651
+ if (typeof options.relax_quotes === "boolean") {
280652
+ } else if (options.relax_quotes === void 0 || options.relax_quotes === null) {
280653
+ options.relax_quotes = false;
280654
+ } else {
280655
+ throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(options.relax_quotes)}`);
280656
+ }
280657
+ if (typeof options.skip_empty_lines === "boolean") {
280658
+ } else if (options.skip_empty_lines === void 0 || options.skip_empty_lines === null) {
280659
+ options.skip_empty_lines = false;
280660
+ } else {
280661
+ throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(options.skip_empty_lines)}`);
280662
+ }
280663
+ if (typeof options.skip_records_with_empty_values === "boolean") {
280664
+ } else if (options.skip_records_with_empty_values === void 0 || options.skip_records_with_empty_values === null) {
280665
+ options.skip_records_with_empty_values = false;
280666
+ } else {
280667
+ throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(options.skip_records_with_empty_values)}`);
280668
+ }
280669
+ if (typeof options.skip_records_with_error === "boolean") {
280670
+ } else if (options.skip_records_with_error === void 0 || options.skip_records_with_error === null) {
280671
+ options.skip_records_with_error = false;
280672
+ } else {
280673
+ throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(options.skip_records_with_error)}`);
280674
+ }
280675
+ if (options.rtrim === void 0 || options.rtrim === null || options.rtrim === false) {
280676
+ options.rtrim = false;
280677
+ } else if (options.rtrim !== true) {
280678
+ throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(options.rtrim)}`);
280679
+ }
280680
+ if (options.ltrim === void 0 || options.ltrim === null || options.ltrim === false) {
280681
+ options.ltrim = false;
280682
+ } else if (options.ltrim !== true) {
280683
+ throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(options.ltrim)}`);
280684
+ }
280685
+ if (options.trim === void 0 || options.trim === null || options.trim === false) {
280686
+ options.trim = false;
280687
+ } else if (options.trim !== true) {
280688
+ throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(options.trim)}`);
280689
+ }
280690
+ if (options.trim === true && opts.ltrim !== false) {
280691
+ options.ltrim = true;
280692
+ } else if (options.ltrim !== true) {
280693
+ options.ltrim = false;
280694
+ }
280695
+ if (options.trim === true && opts.rtrim !== false) {
280696
+ options.rtrim = true;
280697
+ } else if (options.rtrim !== true) {
280698
+ options.rtrim = false;
280699
+ }
280700
+ if (options.to === void 0 || options.to === null) {
280701
+ options.to = -1;
280702
+ } else {
280703
+ if (typeof options.to === "string" && /\d+/.test(options.to)) {
280704
+ options.to = parseInt(options.to);
280705
+ }
280706
+ if (Number.isInteger(options.to)) {
280707
+ if (options.to <= 0) {
280708
+ throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(opts.to)}`);
280709
+ }
280710
+ } else {
280711
+ throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(opts.to)}`);
280712
+ }
280713
+ }
280714
+ if (options.to_line === void 0 || options.to_line === null) {
280715
+ options.to_line = -1;
280716
+ } else {
280717
+ if (typeof options.to_line === "string" && /\d+/.test(options.to_line)) {
280718
+ options.to_line = parseInt(options.to_line);
280719
+ }
280720
+ if (Number.isInteger(options.to_line)) {
280721
+ if (options.to_line <= 0) {
280722
+ throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(opts.to_line)}`);
280723
+ }
280724
+ } else {
280725
+ throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(opts.to_line)}`);
280726
+ }
280727
+ }
280728
+ return options;
280729
+ };
280730
+
280731
+ // ../myst-directives/node_modules/csv-parse/lib/api/index.js
280732
+ var isRecordEmpty = function(record) {
280733
+ return record.every((field) => field == null || field.toString && field.toString().trim() === "");
280734
+ };
280735
+ var cr2 = 13;
280736
+ var nl2 = 10;
280737
+ var boms = {
280738
+ // Note, the following are equals:
280739
+ // Buffer.from("\ufeff")
280740
+ // Buffer.from([239, 187, 191])
280741
+ // Buffer.from('EFBBBF', 'hex')
280742
+ "utf8": Buffer.from([239, 187, 191]),
280743
+ // Note, the following are equals:
280744
+ // Buffer.from "\ufeff", 'utf16le
280745
+ // Buffer.from([255, 254])
280746
+ "utf16le": Buffer.from([255, 254])
280747
+ };
280748
+ var transform2 = function(original_options = {}) {
280749
+ const info = {
280750
+ bytes: 0,
280751
+ comment_lines: 0,
280752
+ empty_lines: 0,
280753
+ invalid_field_length: 0,
280754
+ lines: 1,
280755
+ records: 0
280756
+ };
280757
+ const options = normalize_options(original_options);
280758
+ return {
280759
+ info,
280760
+ original_options,
280761
+ options,
280762
+ state: init_state(options),
280763
+ __needMoreData: function(i2, bufLen, end) {
280764
+ if (end)
280765
+ return false;
280766
+ const { encoding, escape: escape5, quote } = this.options;
280767
+ const { quoting, needMoreDataSize, recordDelimiterMaxLength } = this.state;
280768
+ const numOfCharLeft = bufLen - i2 - 1;
280769
+ const requiredLength = Math.max(
280770
+ needMoreDataSize,
280771
+ // Skip if the remaining buffer smaller than record delimiter
280772
+ // If "record_delimiter" is yet to be discovered:
280773
+ // 1. It is equals to `[]` and "recordDelimiterMaxLength" equals `0`
280774
+ // 2. We set the length to windows line ending in the current encoding
280775
+ // Note, that encoding is known from user or bom discovery at that point
280776
+ // recordDelimiterMaxLength,
280777
+ recordDelimiterMaxLength === 0 ? Buffer.from("\r\n", encoding).length : recordDelimiterMaxLength,
280778
+ // Skip if remaining buffer can be an escaped quote
280779
+ quoting ? (escape5 === null ? 0 : escape5.length) + quote.length : 0,
280780
+ // Skip if remaining buffer can be record delimiter following the closing quote
280781
+ quoting ? quote.length + recordDelimiterMaxLength : 0
280782
+ );
280783
+ return numOfCharLeft < requiredLength;
280784
+ },
280785
+ // Central parser implementation
280786
+ parse: function(nextBuf, end, push, close2) {
280787
+ const { bom, comment_no_infix, encoding, from_line, ltrim, max_record_size, raw: raw2, relax_quotes, rtrim, skip_empty_lines, to, to_line } = this.options;
280788
+ let { comment: comment7, escape: escape5, quote, record_delimiter } = this.options;
280789
+ const { bomSkipped, previousBuf, rawBuffer, escapeIsQuote } = this.state;
280790
+ let buf;
280791
+ if (previousBuf === void 0) {
280792
+ if (nextBuf === void 0) {
280793
+ close2();
280794
+ return;
280795
+ } else {
280796
+ buf = nextBuf;
280797
+ }
280798
+ } else if (previousBuf !== void 0 && nextBuf === void 0) {
280799
+ buf = previousBuf;
280800
+ } else {
280801
+ buf = Buffer.concat([previousBuf, nextBuf]);
280802
+ }
280803
+ if (bomSkipped === false) {
280804
+ if (bom === false) {
280805
+ this.state.bomSkipped = true;
280806
+ } else if (buf.length < 3) {
280807
+ if (end === false) {
280808
+ this.state.previousBuf = buf;
280809
+ return;
280810
+ }
280811
+ } else {
280812
+ for (const encoding2 in boms) {
280813
+ if (boms[encoding2].compare(buf, 0, boms[encoding2].length) === 0) {
280814
+ const bomLength = boms[encoding2].length;
280815
+ this.state.bufBytesStart += bomLength;
280816
+ buf = buf.slice(bomLength);
280817
+ this.options = normalize_options({ ...this.original_options, encoding: encoding2 });
280818
+ ({ comment: comment7, escape: escape5, quote } = this.options);
280819
+ break;
280820
+ }
280821
+ }
280822
+ this.state.bomSkipped = true;
280823
+ }
280824
+ }
280825
+ const bufLen = buf.length;
280826
+ let pos;
280827
+ for (pos = 0; pos < bufLen; pos++) {
280828
+ if (this.__needMoreData(pos, bufLen, end)) {
280829
+ break;
280830
+ }
280831
+ if (this.state.wasRowDelimiter === true) {
280832
+ this.info.lines++;
280833
+ this.state.wasRowDelimiter = false;
280834
+ }
280835
+ if (to_line !== -1 && this.info.lines > to_line) {
280836
+ this.state.stop = true;
280837
+ close2();
280838
+ return;
280839
+ }
280840
+ if (this.state.quoting === false && record_delimiter.length === 0) {
280841
+ const record_delimiterCount = this.__autoDiscoverRecordDelimiter(buf, pos);
280842
+ if (record_delimiterCount) {
280843
+ record_delimiter = this.options.record_delimiter;
280844
+ }
280845
+ }
280846
+ const chr = buf[pos];
280847
+ if (raw2 === true) {
280848
+ rawBuffer.append(chr);
280849
+ }
280850
+ if ((chr === cr2 || chr === nl2) && this.state.wasRowDelimiter === false) {
280851
+ this.state.wasRowDelimiter = true;
280852
+ }
280853
+ if (this.state.escaping === true) {
280854
+ this.state.escaping = false;
280855
+ } else {
280856
+ if (escape5 !== null && this.state.quoting === true && this.__isEscape(buf, pos, chr) && pos + escape5.length < bufLen) {
280857
+ if (escapeIsQuote) {
280858
+ if (this.__isQuote(buf, pos + escape5.length)) {
280859
+ this.state.escaping = true;
280860
+ pos += escape5.length - 1;
280861
+ continue;
280862
+ }
280863
+ } else {
280864
+ this.state.escaping = true;
280865
+ pos += escape5.length - 1;
280866
+ continue;
280867
+ }
280868
+ }
280869
+ if (this.state.commenting === false && this.__isQuote(buf, pos)) {
280870
+ if (this.state.quoting === true) {
280871
+ const nextChr = buf[pos + quote.length];
280872
+ const isNextChrTrimable = rtrim && this.__isCharTrimable(buf, pos + quote.length);
280873
+ const isNextChrComment = comment7 !== null && this.__compareBytes(comment7, buf, pos + quote.length, nextChr);
280874
+ const isNextChrDelimiter = this.__isDelimiter(buf, pos + quote.length, nextChr);
280875
+ const isNextChrRecordDelimiter = record_delimiter.length === 0 ? this.__autoDiscoverRecordDelimiter(buf, pos + quote.length) : this.__isRecordDelimiter(nextChr, buf, pos + quote.length);
280876
+ if (escape5 !== null && this.__isEscape(buf, pos, chr) && this.__isQuote(buf, pos + escape5.length)) {
280877
+ pos += escape5.length - 1;
280878
+ } else if (!nextChr || isNextChrDelimiter || isNextChrRecordDelimiter || isNextChrComment || isNextChrTrimable) {
280879
+ this.state.quoting = false;
280880
+ this.state.wasQuoting = true;
280881
+ pos += quote.length - 1;
280882
+ continue;
280883
+ } else if (relax_quotes === false) {
280884
+ const err = this.__error(
280885
+ new CsvError("CSV_INVALID_CLOSING_QUOTE", [
280886
+ "Invalid Closing Quote:",
280887
+ `got "${String.fromCharCode(nextChr)}"`,
280888
+ `at line ${this.info.lines}`,
280889
+ "instead of delimiter, record delimiter, trimable character",
280890
+ "(if activated) or comment"
280891
+ ], this.options, this.__infoField())
280892
+ );
280893
+ if (err !== void 0)
280894
+ return err;
280895
+ } else {
280896
+ this.state.quoting = false;
280897
+ this.state.wasQuoting = true;
280898
+ this.state.field.prepend(quote);
280899
+ pos += quote.length - 1;
280900
+ }
280901
+ } else {
280902
+ if (this.state.field.length !== 0) {
280903
+ if (relax_quotes === false) {
280904
+ const info2 = this.__infoField();
280905
+ const bom2 = Object.keys(boms).map((b) => boms[b].equals(this.state.field.toString()) ? b : false).filter(Boolean)[0];
280906
+ const err = this.__error(
280907
+ new CsvError("INVALID_OPENING_QUOTE", [
280908
+ "Invalid Opening Quote:",
280909
+ `a quote is found on field ${JSON.stringify(info2.column)} at line ${info2.lines}, value is ${JSON.stringify(this.state.field.toString(encoding))}`,
280910
+ bom2 ? `(${bom2} bom)` : void 0
280911
+ ], this.options, info2, {
280912
+ field: this.state.field
280913
+ })
280914
+ );
280915
+ if (err !== void 0)
280916
+ return err;
280917
+ }
280918
+ } else {
280919
+ this.state.quoting = true;
280920
+ pos += quote.length - 1;
280921
+ continue;
280922
+ }
280923
+ }
280924
+ }
280925
+ if (this.state.quoting === false) {
280926
+ const recordDelimiterLength = this.__isRecordDelimiter(chr, buf, pos);
280927
+ if (recordDelimiterLength !== 0) {
280928
+ const skipCommentLine = this.state.commenting && (this.state.wasQuoting === false && this.state.record.length === 0 && this.state.field.length === 0);
280929
+ if (skipCommentLine) {
280930
+ this.info.comment_lines++;
280931
+ } else {
280932
+ if (this.state.enabled === false && this.info.lines + (this.state.wasRowDelimiter === true ? 1 : 0) >= from_line) {
280933
+ this.state.enabled = true;
280934
+ this.__resetField();
280935
+ this.__resetRecord();
280936
+ pos += recordDelimiterLength - 1;
280937
+ continue;
280938
+ }
280939
+ if (skip_empty_lines === true && this.state.wasQuoting === false && this.state.record.length === 0 && this.state.field.length === 0) {
280940
+ this.info.empty_lines++;
280941
+ pos += recordDelimiterLength - 1;
280942
+ continue;
280943
+ }
280944
+ this.info.bytes = this.state.bufBytesStart + pos;
280945
+ const errField = this.__onField();
280946
+ if (errField !== void 0)
280947
+ return errField;
280948
+ this.info.bytes = this.state.bufBytesStart + pos + recordDelimiterLength;
280949
+ const errRecord = this.__onRecord(push);
280950
+ if (errRecord !== void 0)
280951
+ return errRecord;
280952
+ if (to !== -1 && this.info.records >= to) {
280953
+ this.state.stop = true;
280954
+ close2();
280955
+ return;
280956
+ }
280957
+ }
280958
+ this.state.commenting = false;
280959
+ pos += recordDelimiterLength - 1;
280960
+ continue;
280961
+ }
280962
+ if (this.state.commenting) {
280963
+ continue;
280964
+ }
280965
+ if (comment7 !== null && (comment_no_infix === false || this.state.record.length === 0 && this.state.field.length === 0)) {
280966
+ const commentCount = this.__compareBytes(comment7, buf, pos, chr);
280967
+ if (commentCount !== 0) {
280968
+ this.state.commenting = true;
280969
+ continue;
280970
+ }
280971
+ }
280972
+ const delimiterLength = this.__isDelimiter(buf, pos, chr);
280973
+ if (delimiterLength !== 0) {
280974
+ this.info.bytes = this.state.bufBytesStart + pos;
280975
+ const errField = this.__onField();
280976
+ if (errField !== void 0)
280977
+ return errField;
280978
+ pos += delimiterLength - 1;
280979
+ continue;
280980
+ }
280981
+ }
280982
+ }
280983
+ if (this.state.commenting === false) {
280984
+ if (max_record_size !== 0 && this.state.record_length + this.state.field.length > max_record_size) {
280985
+ return this.__error(
280986
+ new CsvError("CSV_MAX_RECORD_SIZE", [
280987
+ "Max Record Size:",
280988
+ "record exceed the maximum number of tolerated bytes",
280989
+ `of ${max_record_size}`,
280990
+ `at line ${this.info.lines}`
280991
+ ], this.options, this.__infoField())
280992
+ );
280993
+ }
280994
+ }
280995
+ const lappend = ltrim === false || this.state.quoting === true || this.state.field.length !== 0 || !this.__isCharTrimable(buf, pos);
280996
+ const rappend = rtrim === false || this.state.wasQuoting === false;
280997
+ if (lappend === true && rappend === true) {
280998
+ this.state.field.append(chr);
280999
+ } else if (rtrim === true && !this.__isCharTrimable(buf, pos)) {
281000
+ return this.__error(
281001
+ new CsvError("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE", [
281002
+ "Invalid Closing Quote:",
281003
+ "found non trimable byte after quote",
281004
+ `at line ${this.info.lines}`
281005
+ ], this.options, this.__infoField())
281006
+ );
281007
+ } else {
281008
+ if (lappend === false) {
281009
+ pos += this.__isCharTrimable(buf, pos) - 1;
281010
+ }
281011
+ continue;
281012
+ }
281013
+ }
281014
+ if (end === true) {
281015
+ if (this.state.quoting === true) {
281016
+ const err = this.__error(
281017
+ new CsvError("CSV_QUOTE_NOT_CLOSED", [
281018
+ "Quote Not Closed:",
281019
+ `the parsing is finished with an opening quote at line ${this.info.lines}`
281020
+ ], this.options, this.__infoField())
281021
+ );
281022
+ if (err !== void 0)
281023
+ return err;
281024
+ } else {
281025
+ if (this.state.wasQuoting === true || this.state.record.length !== 0 || this.state.field.length !== 0) {
281026
+ this.info.bytes = this.state.bufBytesStart + pos;
281027
+ const errField = this.__onField();
281028
+ if (errField !== void 0)
281029
+ return errField;
281030
+ const errRecord = this.__onRecord(push);
281031
+ if (errRecord !== void 0)
281032
+ return errRecord;
281033
+ } else if (this.state.wasRowDelimiter === true) {
281034
+ this.info.empty_lines++;
281035
+ } else if (this.state.commenting === true) {
281036
+ this.info.comment_lines++;
281037
+ }
281038
+ }
281039
+ } else {
281040
+ this.state.bufBytesStart += pos;
281041
+ this.state.previousBuf = buf.slice(pos);
281042
+ }
281043
+ if (this.state.wasRowDelimiter === true) {
281044
+ this.info.lines++;
281045
+ this.state.wasRowDelimiter = false;
281046
+ }
281047
+ },
281048
+ __onRecord: function(push) {
281049
+ const { columns, group_columns_by_name, encoding, info: info2, from: from3, relax_column_count, relax_column_count_less, relax_column_count_more, raw: raw2, skip_records_with_empty_values } = this.options;
281050
+ const { enabled, record } = this.state;
281051
+ if (enabled === false) {
281052
+ return this.__resetRecord();
281053
+ }
281054
+ const recordLength = record.length;
281055
+ if (columns === true) {
281056
+ if (skip_records_with_empty_values === true && isRecordEmpty(record)) {
281057
+ this.__resetRecord();
281058
+ return;
281059
+ }
281060
+ return this.__firstLineToColumns(record);
281061
+ }
281062
+ if (columns === false && this.info.records === 0) {
281063
+ this.state.expectedRecordLength = recordLength;
281064
+ }
281065
+ if (recordLength !== this.state.expectedRecordLength) {
281066
+ const err = columns === false ? new CsvError("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH", [
281067
+ "Invalid Record Length:",
281068
+ `expect ${this.state.expectedRecordLength},`,
281069
+ `got ${recordLength} on line ${this.info.lines}`
281070
+ ], this.options, this.__infoField(), {
281071
+ record
281072
+ }) : new CsvError("CSV_RECORD_INCONSISTENT_COLUMNS", [
281073
+ "Invalid Record Length:",
281074
+ `columns length is ${columns.length},`,
281075
+ // rename columns
281076
+ `got ${recordLength} on line ${this.info.lines}`
281077
+ ], this.options, this.__infoField(), {
281078
+ record
281079
+ });
281080
+ if (relax_column_count === true || relax_column_count_less === true && recordLength < this.state.expectedRecordLength || relax_column_count_more === true && recordLength > this.state.expectedRecordLength) {
281081
+ this.info.invalid_field_length++;
281082
+ this.state.error = err;
281083
+ } else {
281084
+ const finalErr = this.__error(err);
281085
+ if (finalErr)
281086
+ return finalErr;
281087
+ }
281088
+ }
281089
+ if (skip_records_with_empty_values === true && isRecordEmpty(record)) {
281090
+ this.__resetRecord();
281091
+ return;
281092
+ }
281093
+ if (this.state.recordHasError === true) {
281094
+ this.__resetRecord();
281095
+ this.state.recordHasError = false;
281096
+ return;
281097
+ }
281098
+ this.info.records++;
281099
+ if (from3 === 1 || this.info.records >= from3) {
281100
+ const { objname } = this.options;
281101
+ if (columns !== false) {
281102
+ const obj = {};
281103
+ for (let i2 = 0, l = record.length; i2 < l; i2++) {
281104
+ if (columns[i2] === void 0 || columns[i2].disabled)
281105
+ continue;
281106
+ if (group_columns_by_name === true && obj[columns[i2].name] !== void 0) {
281107
+ if (Array.isArray(obj[columns[i2].name])) {
281108
+ obj[columns[i2].name] = obj[columns[i2].name].concat(record[i2]);
281109
+ } else {
281110
+ obj[columns[i2].name] = [obj[columns[i2].name], record[i2]];
281111
+ }
281112
+ } else {
281113
+ obj[columns[i2].name] = record[i2];
281114
+ }
281115
+ }
281116
+ if (raw2 === true || info2 === true) {
281117
+ const extRecord = Object.assign(
281118
+ { record: obj },
281119
+ raw2 === true ? { raw: this.state.rawBuffer.toString(encoding) } : {},
281120
+ info2 === true ? { info: this.__infoRecord() } : {}
281121
+ );
281122
+ const err = this.__push(
281123
+ objname === void 0 ? extRecord : [obj[objname], extRecord],
281124
+ push
281125
+ );
281126
+ if (err) {
281127
+ return err;
281128
+ }
281129
+ } else {
281130
+ const err = this.__push(
281131
+ objname === void 0 ? obj : [obj[objname], obj],
281132
+ push
281133
+ );
281134
+ if (err) {
281135
+ return err;
281136
+ }
281137
+ }
281138
+ } else {
281139
+ if (raw2 === true || info2 === true) {
281140
+ const extRecord = Object.assign(
281141
+ { record },
281142
+ raw2 === true ? { raw: this.state.rawBuffer.toString(encoding) } : {},
281143
+ info2 === true ? { info: this.__infoRecord() } : {}
281144
+ );
281145
+ const err = this.__push(
281146
+ objname === void 0 ? extRecord : [record[objname], extRecord],
281147
+ push
281148
+ );
281149
+ if (err) {
281150
+ return err;
281151
+ }
281152
+ } else {
281153
+ const err = this.__push(
281154
+ objname === void 0 ? record : [record[objname], record],
281155
+ push
281156
+ );
281157
+ if (err) {
281158
+ return err;
281159
+ }
281160
+ }
281161
+ }
281162
+ }
281163
+ this.__resetRecord();
281164
+ },
281165
+ __firstLineToColumns: function(record) {
281166
+ const { firstLineToHeaders } = this.state;
281167
+ try {
281168
+ const headers = firstLineToHeaders === void 0 ? record : firstLineToHeaders.call(null, record);
281169
+ if (!Array.isArray(headers)) {
281170
+ return this.__error(
281171
+ new CsvError("CSV_INVALID_COLUMN_MAPPING", [
281172
+ "Invalid Column Mapping:",
281173
+ "expect an array from column function,",
281174
+ `got ${JSON.stringify(headers)}`
281175
+ ], this.options, this.__infoField(), {
281176
+ headers
281177
+ })
281178
+ );
281179
+ }
281180
+ const normalizedHeaders = normalize_columns_array(headers);
281181
+ this.state.expectedRecordLength = normalizedHeaders.length;
281182
+ this.options.columns = normalizedHeaders;
281183
+ this.__resetRecord();
281184
+ return;
281185
+ } catch (err) {
281186
+ return err;
281187
+ }
281188
+ },
281189
+ __resetRecord: function() {
281190
+ if (this.options.raw === true) {
281191
+ this.state.rawBuffer.reset();
281192
+ }
281193
+ this.state.error = void 0;
281194
+ this.state.record = [];
281195
+ this.state.record_length = 0;
281196
+ },
281197
+ __onField: function() {
281198
+ const { cast, encoding, rtrim, max_record_size } = this.options;
281199
+ const { enabled, wasQuoting } = this.state;
281200
+ if (enabled === false) {
281201
+ return this.__resetField();
281202
+ }
281203
+ let field = this.state.field.toString(encoding);
281204
+ if (rtrim === true && wasQuoting === false) {
281205
+ field = field.trimRight();
281206
+ }
281207
+ if (cast === true) {
281208
+ const [err, f3] = this.__cast(field);
281209
+ if (err !== void 0)
281210
+ return err;
281211
+ field = f3;
281212
+ }
281213
+ this.state.record.push(field);
281214
+ if (max_record_size !== 0 && typeof field === "string") {
281215
+ this.state.record_length += field.length;
281216
+ }
281217
+ this.__resetField();
281218
+ },
281219
+ __resetField: function() {
281220
+ this.state.field.reset();
281221
+ this.state.wasQuoting = false;
281222
+ },
281223
+ __push: function(record, push) {
281224
+ const { on_record } = this.options;
281225
+ if (on_record !== void 0) {
281226
+ const info2 = this.__infoRecord();
281227
+ try {
281228
+ record = on_record.call(null, record, info2);
281229
+ } catch (err) {
281230
+ return err;
281231
+ }
281232
+ if (record === void 0 || record === null) {
281233
+ return;
281234
+ }
281235
+ }
281236
+ push(record);
281237
+ },
281238
+ // Return a tuple with the error and the casted value
281239
+ __cast: function(field) {
281240
+ const { columns, relax_column_count } = this.options;
281241
+ const isColumns = Array.isArray(columns);
281242
+ if (isColumns === true && relax_column_count && this.options.columns.length <= this.state.record.length) {
281243
+ return [void 0, void 0];
281244
+ }
281245
+ if (this.state.castField !== null) {
281246
+ try {
281247
+ const info2 = this.__infoField();
281248
+ return [void 0, this.state.castField.call(null, field, info2)];
281249
+ } catch (err) {
281250
+ return [err];
281251
+ }
281252
+ }
281253
+ if (this.__isFloat(field)) {
281254
+ return [void 0, parseFloat(field)];
281255
+ } else if (this.options.cast_date !== false) {
281256
+ const info2 = this.__infoField();
281257
+ return [void 0, this.options.cast_date.call(null, field, info2)];
281258
+ }
281259
+ return [void 0, field];
281260
+ },
281261
+ // Helper to test if a character is a space or a line delimiter
281262
+ __isCharTrimable: function(buf, pos) {
281263
+ const isTrim = (buf2, pos2) => {
281264
+ const { timchars } = this.state;
281265
+ loop1:
281266
+ for (let i2 = 0; i2 < timchars.length; i2++) {
281267
+ const timchar = timchars[i2];
281268
+ for (let j = 0; j < timchar.length; j++) {
281269
+ if (timchar[j] !== buf2[pos2 + j])
281270
+ continue loop1;
281271
+ }
281272
+ return timchar.length;
281273
+ }
281274
+ return 0;
281275
+ };
281276
+ return isTrim(buf, pos);
281277
+ },
281278
+ // Keep it in case we implement the `cast_int` option
281279
+ // __isInt(value){
281280
+ // // return Number.isInteger(parseInt(value))
281281
+ // // return !isNaN( parseInt( obj ) );
281282
+ // return /^(\-|\+)?[1-9][0-9]*$/.test(value)
281283
+ // }
281284
+ __isFloat: function(value) {
281285
+ return value - parseFloat(value) + 1 >= 0;
281286
+ },
281287
+ __compareBytes: function(sourceBuf, targetBuf, targetPos, firstByte) {
281288
+ if (sourceBuf[0] !== firstByte)
281289
+ return 0;
281290
+ const sourceLength = sourceBuf.length;
281291
+ for (let i2 = 1; i2 < sourceLength; i2++) {
281292
+ if (sourceBuf[i2] !== targetBuf[targetPos + i2])
281293
+ return 0;
281294
+ }
281295
+ return sourceLength;
281296
+ },
281297
+ __isDelimiter: function(buf, pos, chr) {
281298
+ const { delimiter: delimiter2, ignore_last_delimiters } = this.options;
281299
+ if (ignore_last_delimiters === true && this.state.record.length === this.options.columns.length - 1) {
281300
+ return 0;
281301
+ } else if (ignore_last_delimiters !== false && typeof ignore_last_delimiters === "number" && this.state.record.length === ignore_last_delimiters - 1) {
281302
+ return 0;
281303
+ }
281304
+ loop1:
281305
+ for (let i2 = 0; i2 < delimiter2.length; i2++) {
281306
+ const del2 = delimiter2[i2];
281307
+ if (del2[0] === chr) {
281308
+ for (let j = 1; j < del2.length; j++) {
281309
+ if (del2[j] !== buf[pos + j])
281310
+ continue loop1;
281311
+ }
281312
+ return del2.length;
281313
+ }
281314
+ }
281315
+ return 0;
281316
+ },
281317
+ __isRecordDelimiter: function(chr, buf, pos) {
281318
+ const { record_delimiter } = this.options;
281319
+ const recordDelimiterLength = record_delimiter.length;
281320
+ loop1:
281321
+ for (let i2 = 0; i2 < recordDelimiterLength; i2++) {
281322
+ const rd = record_delimiter[i2];
281323
+ const rdLength = rd.length;
281324
+ if (rd[0] !== chr) {
281325
+ continue;
281326
+ }
281327
+ for (let j = 1; j < rdLength; j++) {
281328
+ if (rd[j] !== buf[pos + j]) {
281329
+ continue loop1;
281330
+ }
281331
+ }
281332
+ return rd.length;
281333
+ }
281334
+ return 0;
281335
+ },
281336
+ __isEscape: function(buf, pos, chr) {
281337
+ const { escape: escape5 } = this.options;
281338
+ if (escape5 === null)
281339
+ return false;
281340
+ const l = escape5.length;
281341
+ if (escape5[0] === chr) {
281342
+ for (let i2 = 0; i2 < l; i2++) {
281343
+ if (escape5[i2] !== buf[pos + i2]) {
281344
+ return false;
281345
+ }
281346
+ }
281347
+ return true;
281348
+ }
281349
+ return false;
281350
+ },
281351
+ __isQuote: function(buf, pos) {
281352
+ const { quote } = this.options;
281353
+ if (quote === null)
281354
+ return false;
281355
+ const l = quote.length;
281356
+ for (let i2 = 0; i2 < l; i2++) {
281357
+ if (quote[i2] !== buf[pos + i2]) {
281358
+ return false;
281359
+ }
281360
+ }
281361
+ return true;
281362
+ },
281363
+ __autoDiscoverRecordDelimiter: function(buf, pos) {
281364
+ const { encoding } = this.options;
281365
+ const rds = [
281366
+ // Important, the windows line ending must be before mac os 9
281367
+ Buffer.from("\r\n", encoding),
281368
+ Buffer.from("\n", encoding),
281369
+ Buffer.from("\r", encoding)
281370
+ ];
281371
+ loop:
281372
+ for (let i2 = 0; i2 < rds.length; i2++) {
281373
+ const l = rds[i2].length;
281374
+ for (let j = 0; j < l; j++) {
281375
+ if (rds[i2][j] !== buf[pos + j]) {
281376
+ continue loop;
281377
+ }
281378
+ }
281379
+ this.options.record_delimiter.push(rds[i2]);
281380
+ this.state.recordDelimiterMaxLength = rds[i2].length;
281381
+ return rds[i2].length;
281382
+ }
281383
+ return 0;
281384
+ },
281385
+ __error: function(msg) {
281386
+ const { encoding, raw: raw2, skip_records_with_error } = this.options;
281387
+ const err = typeof msg === "string" ? new Error(msg) : msg;
281388
+ if (skip_records_with_error) {
281389
+ this.state.recordHasError = true;
281390
+ if (this.options.on_skip !== void 0) {
281391
+ this.options.on_skip(err, raw2 ? this.state.rawBuffer.toString(encoding) : void 0);
281392
+ }
281393
+ return void 0;
281394
+ } else {
281395
+ return err;
281396
+ }
281397
+ },
281398
+ __infoDataSet: function() {
281399
+ return {
281400
+ ...this.info,
281401
+ columns: this.options.columns
281402
+ };
281403
+ },
281404
+ __infoRecord: function() {
281405
+ const { columns, raw: raw2, encoding } = this.options;
281406
+ return {
281407
+ ...this.__infoDataSet(),
281408
+ error: this.state.error,
281409
+ header: columns === true,
281410
+ index: this.state.record.length,
281411
+ raw: raw2 ? this.state.rawBuffer.toString(encoding) : void 0
281412
+ };
281413
+ },
281414
+ __infoField: function() {
281415
+ const { columns } = this.options;
281416
+ const isColumns = Array.isArray(columns);
281417
+ return {
281418
+ ...this.__infoRecord(),
281419
+ column: isColumns === true ? columns.length > this.state.record.length ? columns[this.state.record.length].name : null : this.state.record.length,
281420
+ quoting: this.state.wasQuoting
281421
+ };
281422
+ }
281423
+ };
281424
+ };
281425
+
281426
+ // ../myst-directives/node_modules/csv-parse/lib/sync.js
281427
+ var parse9 = function(data, opts = {}) {
281428
+ if (typeof data === "string") {
281429
+ data = Buffer.from(data);
281430
+ }
281431
+ const records = opts && opts.objname ? {} : [];
281432
+ const parser3 = transform2(opts);
281433
+ const push = (record) => {
281434
+ if (parser3.options.objname === void 0)
281435
+ records.push(record);
281436
+ else {
281437
+ records[record[0]] = record[1];
281438
+ }
281439
+ };
281440
+ const close2 = () => {
281441
+ };
281442
+ const err1 = parser3.parse(data, false, push, close2);
281443
+ if (err1 !== void 0)
281444
+ throw err1;
281445
+ const err2 = parser3.parse(void 0, true, push, close2);
281446
+ if (err2 !== void 0)
281447
+ throw err2;
281448
+ return records;
281449
+ };
281450
+
280029
281451
  // ../myst-directives/dist/table.js
280030
281452
  var tableDirective = {
280031
281453
  name: "table",
280032
281454
  arg: {
280033
- type: "myst"
281455
+ type: "myst",
281456
+ doc: "An optional table caption"
280034
281457
  },
280035
281458
  options: {
280036
281459
  label: {
@@ -280078,7 +281501,8 @@ var tableDirective = {
280078
281501
  var listTableDirective = {
280079
281502
  name: "list-table",
280080
281503
  arg: {
280081
- type: "myst"
281504
+ type: "myst",
281505
+ doc: "An optional table caption"
280082
281506
  },
280083
281507
  options: {
280084
281508
  label: {
@@ -280188,20 +281612,188 @@ var listTableDirective = {
280188
281612
  return [container4];
280189
281613
  }
280190
281614
  };
281615
+ function parseCSV(data, ctx, opts) {
281616
+ var _a6, _b, _c;
281617
+ const delimiter2 = (_a6 = opts === null || opts === void 0 ? void 0 : opts.delim) !== null && _a6 !== void 0 ? _a6 : ",";
281618
+ const records = parse9(data, {
281619
+ delimiter: delimiter2 === "tab" ? " " : delimiter2 === "space" ? " " : delimiter2,
281620
+ ltrim: !(opts === null || opts === void 0 ? void 0 : opts.keepspace),
281621
+ escape: (_b = opts === null || opts === void 0 ? void 0 : opts.escape) !== null && _b !== void 0 ? _b : '"',
281622
+ quote: (_c = opts === null || opts === void 0 ? void 0 : opts.quote) !== null && _c !== void 0 ? _c : '"'
281623
+ });
281624
+ return records.map((record, recordIndex) => {
281625
+ return record.map((cell3) => {
281626
+ const mdast2 = ctx.parseMyst(cell3, recordIndex);
281627
+ const paragraph4 = select("*:root > paragraph:only-child", mdast2);
281628
+ if (paragraph4 === void 0) {
281629
+ throw new Error(`Expected a root element containing a paragraph, found: ${cell3}`);
281630
+ }
281631
+ return paragraph4;
281632
+ });
281633
+ });
281634
+ }
281635
+ var csvTableDirective = {
281636
+ name: "csv-table",
281637
+ doc: 'The "csv-table" directive is used to create a table from CSV (comma-separated values) data.',
281638
+ arg: {
281639
+ type: "myst",
281640
+ doc: "An optional table caption"
281641
+ },
281642
+ options: {
281643
+ label: {
281644
+ type: String,
281645
+ alias: ["name"]
281646
+ },
281647
+ // file: {
281648
+ // type: String,
281649
+ // doc: 'The local filesystem path to a CSV data file.',
281650
+ // alias: ['url'],
281651
+ // Add this to the description for the directive:
281652
+ // The data may be internal (an integral part of the document) or external (a separate file).
281653
+ // },
281654
+ header: {
281655
+ type: String,
281656
+ // nonnegative int
281657
+ doc: "Supplemental data for the table header, added independently of and before any header-rows from the main CSV data. Must use the same CSV format as the main CSV data."
281658
+ },
281659
+ "header-rows": {
281660
+ type: Number,
281661
+ // nonnegative int
281662
+ doc: "The number of rows of CSV data to use in the table header. Defaults to 0."
281663
+ },
281664
+ class: {
281665
+ type: String,
281666
+ // class_option: list of strings?
281667
+ doc: `CSS classes to add to your table. Special classes include:
281668
+
281669
+ - \`full-width\`: changes the table environment to cover two columns in LaTeX`
281670
+ },
281671
+ align: {
281672
+ type: String
281673
+ // choice(['left', 'center', 'right'])
281674
+ },
281675
+ delim: {
281676
+ type: String,
281677
+ doc: 'The character used to separate data fields. The special values "tab" and "space" are converted to the respective whitespace characters. Defaults to "," (comma)'
281678
+ },
281679
+ keepspace: {
281680
+ type: Boolean,
281681
+ doc: "Treat whitespace immediately following the delimiter as significant. The default is to ignore such whitespace."
281682
+ },
281683
+ quote: {
281684
+ type: String,
281685
+ doc: 'The character used to quote fields containing special characters, such as the delimiter, quotes, or new-line characters. Must be a single character, defaults to `"` (a double quote)\\\nFor example, `First cell, "These commas, for example, are escaped", Next cell`'
281686
+ },
281687
+ escape: {
281688
+ type: String,
281689
+ doc: 'A character used to escape the delimiter or quote characters from the CSV parser. Must be a single character, defaults to `"` (a double quote) default is a double quote\\\nFor example, `First cell, "These quotes"", for example, are escaped", Next cell`'
281690
+ }
281691
+ },
281692
+ body: {
281693
+ type: String,
281694
+ doc: "The CSV content",
281695
+ required: true
281696
+ },
281697
+ run(data, vfile2, ctx) {
281698
+ var _a6, _b, _c, _d2, _e, _f, _g, _h;
281699
+ const { label, identifier } = normalizeLabel((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.label) || {};
281700
+ const rows = [];
281701
+ if (((_b = data.options) === null || _b === void 0 ? void 0 : _b.header) !== void 0) {
281702
+ let headerCells = [];
281703
+ try {
281704
+ headerCells = parseCSV(data.options.header, ctx, data.options);
281705
+ } catch (error) {
281706
+ fileError(vfile2, "csv-table directive header must be valid CSV-formatted MyST", {
281707
+ node: (_c = select('mystDirectiveOption[name="header"]', data.node)) !== null && _c !== void 0 ? _c : data.node,
281708
+ ruleId: RuleId.directiveOptionsCorrect
281709
+ });
281710
+ }
281711
+ rows.push(...headerCells.map((parsedRow) => ({
281712
+ type: "tableRow",
281713
+ children: parsedRow.map((parsedCell) => ({
281714
+ type: "tableCell",
281715
+ header: true,
281716
+ children: parsedCell.children
281717
+ }))
281718
+ })));
281719
+ }
281720
+ let bodyCells = [];
281721
+ try {
281722
+ bodyCells = parseCSV(data.body, ctx, data.options);
281723
+ } catch (error) {
281724
+ fileError(vfile2, "csv-table directive body must be valid CSV-formatted MyST", {
281725
+ node: (_d2 = select("mystDirectiveBody", data.node)) !== null && _d2 !== void 0 ? _d2 : data.node,
281726
+ ruleId: RuleId.directiveBodyCorrect
281727
+ });
281728
+ }
281729
+ let headerCount = ((_e = data.options) === null || _e === void 0 ? void 0 : _e["header-rows"]) || 0;
281730
+ rows.push(...bodyCells.map((parsedRow) => {
281731
+ const row2 = {
281732
+ type: "tableRow",
281733
+ children: parsedRow.map((parsedCell) => ({
281734
+ type: "tableCell",
281735
+ header: headerCount > 0 ? true : void 0,
281736
+ children: parsedCell.children
281737
+ }))
281738
+ };
281739
+ headerCount -= 1;
281740
+ return row2;
281741
+ }));
281742
+ const table5 = {
281743
+ type: "table",
281744
+ align: (_f = data.options) === null || _f === void 0 ? void 0 : _f.align,
281745
+ children: rows
281746
+ };
281747
+ const container4 = {
281748
+ type: "container",
281749
+ kind: "table",
281750
+ identifier,
281751
+ label,
281752
+ class: (_g = data.options) === null || _g === void 0 ? void 0 : _g.class,
281753
+ children: [...(_h = data.arg) !== null && _h !== void 0 ? _h : [], table5]
281754
+ };
281755
+ return [container4];
281756
+ }
281757
+ };
280191
281758
 
280192
281759
  // ../myst-directives/dist/aside.js
280193
281760
  var asideDirective = {
280194
281761
  name: "aside",
280195
- alias: ["margin", "sidebar"],
281762
+ alias: ["margin", "sidebar", "topic"],
281763
+ arg: {
281764
+ type: "myst",
281765
+ doc: "An optional title"
281766
+ },
281767
+ options: {
281768
+ label: {
281769
+ type: String,
281770
+ alias: ["name"]
281771
+ },
281772
+ class: {
281773
+ type: String
281774
+ }
281775
+ },
280196
281776
  body: {
280197
281777
  type: "myst",
280198
281778
  required: true
280199
281779
  },
280200
281780
  run(data) {
281781
+ var _a6, _b;
281782
+ const { label, identifier } = normalizeLabel((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.label) || {};
281783
+ const children = [...data.body];
281784
+ if (data.arg) {
281785
+ children.unshift({
281786
+ type: "admonitionTitle",
281787
+ children: data.arg
281788
+ });
281789
+ }
280201
281790
  const aside = {
280202
281791
  type: "aside",
280203
281792
  kind: data.name == "aside" || data.name == "margin" ? void 0 : data.name,
280204
- children: data.body
281793
+ children,
281794
+ class: (_b = data.options) === null || _b === void 0 ? void 0 : _b.class,
281795
+ label,
281796
+ identifier
280205
281797
  };
280206
281798
  return [aside];
280207
281799
  }
@@ -280411,10 +282003,41 @@ var rawDirective = {
280411
282003
  }
280412
282004
  };
280413
282005
 
282006
+ // ../myst-directives/dist/div.js
282007
+ var divDirective = {
282008
+ name: "div",
282009
+ options: {
282010
+ label: {
282011
+ type: String,
282012
+ alias: ["name"]
282013
+ },
282014
+ class: {
282015
+ type: String
282016
+ }
282017
+ },
282018
+ body: {
282019
+ type: "myst",
282020
+ required: true
282021
+ },
282022
+ run(data) {
282023
+ var _a6, _b;
282024
+ const { label, identifier } = normalizeLabel((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.label) || {};
282025
+ const div2 = {
282026
+ type: "div",
282027
+ children: data.body,
282028
+ class: (_b = data.options) === null || _b === void 0 ? void 0 : _b.class,
282029
+ label,
282030
+ identifier
282031
+ };
282032
+ return [div2];
282033
+ }
282034
+ };
282035
+
280414
282036
  // ../myst-directives/dist/index.js
280415
282037
  var defaultDirectives = [
280416
282038
  admonitionDirective,
280417
282039
  bibliographyDirective,
282040
+ csvTableDirective,
280418
282041
  codeDirective,
280419
282042
  codeCellDirective,
280420
282043
  dropdownDirective,
@@ -280433,7 +282056,8 @@ var defaultDirectives = [
280433
282056
  mermaidDirective,
280434
282057
  mystdemoDirective,
280435
282058
  outputDirective,
280436
- rawDirective
282059
+ rawDirective,
282060
+ divDirective
280437
282061
  ];
280438
282062
 
280439
282063
  // ../myst-roles/dist/abbreviation.js
@@ -282591,7 +284215,8 @@ var defaultMdast = {
282591
284215
  args: (_a6 = t2.meta) === null || _a6 === void 0 ? void 0 : _a6.arg,
282592
284216
  options: (_b = t2.meta) === null || _b === void 0 ? void 0 : _b.options,
282593
284217
  value: t2.content || void 0,
282594
- tight: ((_c = t2.meta) === null || _c === void 0 ? void 0 : _c.tight) || void 0
284218
+ tight: ((_c = t2.meta) === null || _c === void 0 ? void 0 : _c.tight) || void 0,
284219
+ processed: false
282595
284220
  };
282596
284221
  }
282597
284222
  },
@@ -282629,7 +284254,8 @@ var defaultMdast = {
282629
284254
  getAttrs(t2) {
282630
284255
  return {
282631
284256
  name: t2.info,
282632
- value: t2.content
284257
+ value: t2.content,
284258
+ processed: false
282633
284259
  };
282634
284260
  }
282635
284261
  },
@@ -282852,8 +284478,9 @@ function applyRoles(tree, specs, vfile2) {
282852
284478
  }
282853
284479
  });
282854
284480
  });
282855
- const nodes = selectAll("mystRole", tree);
284481
+ const nodes = selectAll("mystRole[processed=false]", tree);
282856
284482
  nodes.forEach((node3) => {
284483
+ delete node3.processed;
282857
284484
  const { name: name3 } = node3;
282858
284485
  const spec = specLookup[name3];
282859
284486
  if (!spec) {
@@ -282896,7 +284523,7 @@ function applyRoles(tree, specs, vfile2) {
282896
284523
  }
282897
284524
 
282898
284525
  // ../myst-parser/dist/directives.js
282899
- function applyDirectives(tree, specs, vfile2) {
284526
+ function applyDirectives(tree, specs, vfile2, ctx) {
282900
284527
  const specLookup = {};
282901
284528
  specs.forEach((spec) => {
282902
284529
  const names = [spec.name];
@@ -282913,9 +284540,10 @@ function applyDirectives(tree, specs, vfile2) {
282913
284540
  }
282914
284541
  });
282915
284542
  });
282916
- const nodes = selectAll("mystDirective", tree);
284543
+ const nodes = selectAll("mystDirective[processed=false]", tree);
282917
284544
  nodes.forEach((node3) => {
282918
284545
  var _a6, _b, _c, _d2;
284546
+ delete node3.processed;
282919
284547
  const { name: name3 } = node3;
282920
284548
  const spec = specLookup[name3];
282921
284549
  if (!spec) {
@@ -283042,7 +284670,10 @@ ${node3.value}` : "";
283042
284670
  if (validate5) {
283043
284671
  data = validate5(data, vfile2);
283044
284672
  }
283045
- node3.children = run(data, vfile2);
284673
+ node3.children = run(data, vfile2, {
284674
+ // Implement a parseMyst function that accepts _relative_ line numbers
284675
+ parseMyst: (source2, offset = 0) => ctx.parseMyst(source2, offset + node3.position.start.line)
284676
+ });
283046
284677
  });
283047
284678
  }
283048
284679
 
@@ -283120,7 +284751,18 @@ function mystParse(content3, opts) {
283120
284751
  const parsedOpts = parseOptions(opts);
283121
284752
  const tokenizer = createTokenizer(parsedOpts);
283122
284753
  const tree = tokensToMyst(content3, tokenizer.parse(content3, { vfile: vfile2 }), parsedOpts.mdast);
283123
- applyDirectives(tree, parsedOpts.directives, parsedOpts.vfile);
284754
+ applyDirectives(tree, parsedOpts.directives, parsedOpts.vfile, {
284755
+ parseMyst: (source2, offset = 0) => {
284756
+ const mdast2 = mystParse(source2, opts);
284757
+ visit(mdast2, (node3) => {
284758
+ if (node3.position) {
284759
+ node3.position.start.line += offset;
284760
+ node3.position.end.line += offset;
284761
+ }
284762
+ });
284763
+ return mdast2;
284764
+ }
284765
+ });
283124
284766
  applyRoles(tree, parsedOpts.roles, parsedOpts.vfile);
283125
284767
  return tree;
283126
284768
  }
@@ -283295,6 +284937,12 @@ function splitChildrenOnBlockBreak(children) {
283295
284937
  }
283296
284938
 
283297
284939
  // ../myst-ext-grid/dist/index.js
284940
+ function getColumns(columnString) {
284941
+ const columns = (columnString !== null && columnString !== void 0 ? columnString : "1 2 2 3").split(/\s/).map((s5) => Number(s5.trim())).filter((n) => !Number.isNaN(n)).map((n) => Math.min(Math.max(Math.floor(n), 1), 12));
284942
+ if (columns.length === 0 || columns.length > 4)
284943
+ return [1, 2, 2, 3];
284944
+ return columns;
284945
+ }
283298
284946
  var gridDirective = {
283299
284947
  name: "grid",
283300
284948
  arg: {
@@ -283323,12 +284971,35 @@ var gridDirective = {
283323
284971
  ];
283324
284972
  }
283325
284973
  };
283326
- function getColumns(columnString) {
283327
- const columns = (columnString !== null && columnString !== void 0 ? columnString : "1 2 2 3").split(/\s/).map((s5) => Number(s5.trim())).filter((n) => !Number.isNaN(n)).map((n) => Math.min(Math.max(Math.floor(n), 1), 12));
283328
- if (columns.length === 0 || columns.length > 4)
283329
- return [1, 2, 2, 3];
283330
- return columns;
283331
- }
284974
+ var gridItemDirective = {
284975
+ name: "grid-item",
284976
+ options: {
284977
+ label: {
284978
+ type: String,
284979
+ alias: ["name"]
284980
+ },
284981
+ class: {
284982
+ type: String
284983
+ }
284984
+ },
284985
+ body: {
284986
+ type: "myst",
284987
+ required: true
284988
+ },
284989
+ run(data) {
284990
+ var _a6, _b;
284991
+ const { label, identifier } = normalizeLabel((_a6 = data.options) === null || _a6 === void 0 ? void 0 : _a6.label) || {};
284992
+ const div2 = {
284993
+ type: "div",
284994
+ children: data.body,
284995
+ class: (_b = data.options) === null || _b === void 0 ? void 0 : _b.class,
284996
+ label,
284997
+ identifier
284998
+ };
284999
+ return [div2];
285000
+ }
285001
+ };
285002
+ var gridDirectives = [gridDirective, gridItemDirective];
283332
285003
 
283333
285004
  // ../myst-ext-proof/dist/proof.js
283334
285005
  var proofDirective = {
@@ -283641,7 +285312,7 @@ function parseMyst(session, content3, file, opts) {
283641
285312
  markdownit: { linkify: true },
283642
285313
  directives: [
283643
285314
  cardDirective,
283644
- gridDirective,
285315
+ ...gridDirectives,
283645
285316
  reactiveDirective,
283646
285317
  proofDirective,
283647
285318
  ...exerciseDirectives,
@@ -283668,7 +285339,7 @@ var import_node_path17 = __toESM(require("path"), 1);
283668
285339
  var import_nbtx = __toESM(require_cjs2(), 1);
283669
285340
 
283670
285341
  // ../myst-cli/dist/version.js
283671
- var version2 = "1.1.53";
285342
+ var version2 = "1.1.55";
283672
285343
  var version_default2 = version2;
283673
285344
 
283674
285345
  // ../myst-cli/dist/utils/headers.js
@@ -283943,10 +285614,10 @@ function validateTOC(session, path42) {
283943
285614
  }
283944
285615
 
283945
285616
  // ../myst-cli/dist/utils/uniqueArray.js
283946
- function uniqueArray(array, transform2) {
283947
- if (transform2) {
283948
- const transformedArray = array.map(transform2);
283949
- return array.filter((v, i2) => transformedArray.indexOf(transform2(v)) === i2);
285617
+ function uniqueArray(array, transform3) {
285618
+ if (transform3) {
285619
+ const transformedArray = array.map(transform3);
285620
+ return array.filter((v, i2) => transformedArray.indexOf(transform3(v)) === i2);
283950
285621
  }
283951
285622
  return array.filter((v, i2) => array.indexOf(v) === i2);
283952
285623
  }
@@ -284714,8 +286385,8 @@ function transformRenderInlineExpressions(mdast2, file) {
284714
286385
 
284715
286386
  // ../myst-cli/dist/process/notebook.js
284716
286387
  function blockParent(cell3, children) {
284717
- const type2 = cell3.cell_type === import_nbtx2.CELL_TYPES.code ? NotebookCell.code : NotebookCell.content;
284718
- return { type: "block", data: copyNode({ type: type2, ...cell3.metadata }), children };
286388
+ const kind = cell3.cell_type === import_nbtx2.CELL_TYPES.code ? NotebookCell.code : NotebookCell.content;
286389
+ return { type: "block", kind, data: JSON.parse(JSON.stringify(cell3.metadata)), children };
284719
286390
  }
284720
286391
  function replaceAttachmentsTransform(session, mdast2, attachments, file) {
284721
286392
  const vfile2 = new VFile();
@@ -295803,7 +297474,8 @@ async function checkLinksTransform(session, file, mdast2) {
295803
297474
  const status = check2.status ? ` (${check2.status}, ${check2.statusText})` : "";
295804
297475
  addWarningForFile(session, file, `Link for "${url}" did not resolve.${status}`, "error", {
295805
297476
  position: position6,
295806
- ruleId: RuleId.linkResolves
297477
+ ruleId: RuleId.linkResolves,
297478
+ key: url
295807
297479
  });
295808
297480
  return url;
295809
297481
  })));
@@ -296231,7 +297903,7 @@ function applyComputedOutputsToNodes(nodes, computedResult) {
296231
297903
  async function kernelExecutionTransform(tree, vfile2, opts) {
296232
297904
  var _a6, _b, _c, _d2;
296233
297905
  const log = (_a6 = opts.log) !== null && _a6 !== void 0 ? _a6 : console;
296234
- const executableNodes = selectAll("block:has(code[executable=true]):has(output),inlineExpression", tree);
297906
+ const executableNodes = selectAll(`block[kind=${NotebookCell.code}],inlineExpression`, tree);
296235
297907
  if (executableNodes.length === 0) {
296236
297908
  return;
296237
297909
  }
@@ -296247,7 +297919,7 @@ async function kernelExecutionTransform(tree, vfile2, opts) {
296247
297919
  } else {
296248
297920
  let sessionConnection;
296249
297921
  const sessionOpts = {
296250
- path: vfile2.path,
297922
+ path: import_node_path36.default.relative(opts.basePath, vfile2.path),
296251
297923
  type: "notebook",
296252
297924
  name: import_node_path36.default.basename(vfile2.path),
296253
297925
  kernel: {
@@ -296812,12 +298484,16 @@ async function launchJupyterServer(contentPath, log) {
296812
298484
  const pythonPath = import_which3.default.sync("python");
296813
298485
  const proc2 = (0, import_node_child_process.spawn)(pythonPath, ["-m", "jupyter_server", "--ServerApp.root_dir", contentPath]);
296814
298486
  const reader = proc2.stderr;
298487
+ let timerID;
296815
298488
  const settings = await new Promise((resolve7, reject) => {
296816
- const id = setTimeout(() => {
296817
- log.error(`\u{1FA90} ${source_default3.redBright("Jupyter server did not respond")}
296818
- ${source_default3.dim(url)}`);
298489
+ timerID = setTimeout(() => {
298490
+ log.error(`\u{1FA90} ${source_default3.redBright("Jupyter server did not respond")}`);
296819
298491
  reject();
296820
298492
  }, 2e4);
298493
+ proc2.on("exit", () => {
298494
+ log.error(`\u{1FA90} ${source_default3.redBright("Jupyter server did not start")}`);
298495
+ reject();
298496
+ });
296821
298497
  reader.on("data", (buf) => {
296822
298498
  const data = buf.toString();
296823
298499
  const match3 = data.match(/([^\s]*?)\?token=([^\s]*)/);
@@ -296825,7 +298501,6 @@ async function launchJupyterServer(contentPath, log) {
296825
298501
  return;
296826
298502
  }
296827
298503
  const [, addr, token] = match3;
296828
- clearTimeout(id);
296829
298504
  resolve7({
296830
298505
  baseUrl: addr,
296831
298506
  token
@@ -296833,7 +298508,13 @@ async function launchJupyterServer(contentPath, log) {
296833
298508
  });
296834
298509
  }).finally(
296835
298510
  // Don't keep listening to messages
296836
- () => reader.removeAllListeners("data")
298511
+ () => {
298512
+ reader.removeAllListeners("data");
298513
+ proc2.removeAllListeners("exit");
298514
+ if (timerID !== void 0) {
298515
+ clearTimeout(timerID);
298516
+ }
298517
+ }
296837
298518
  );
296838
298519
  const url = `${settings.baseUrl}?token=${settings.token}`;
296839
298520
  log.info(`\u{1FA90} ${source_default3.greenBright("Jupyter server started")}
@@ -296969,6 +298650,7 @@ async function transformMdast(session, opts) {
296969
298650
  if (execute) {
296970
298651
  const cachePath = import_node_path38.default.join(session.buildPath(), "execute");
296971
298652
  await kernelExecutionTransform(mdast2, vfile2, {
298653
+ basePath: session.sourcePath(),
296972
298654
  cache: new LocalDiskCache(cachePath),
296973
298655
  sessionFactory: () => session.jupyterSessionManager(),
296974
298656
  frontmatter,
@@ -297007,8 +298689,8 @@ async function transformMdast(session, opts) {
297007
298689
  if (cachedMdast)
297008
298690
  cachedMdast.post = data;
297009
298691
  if (extraTransforms) {
297010
- await Promise.all(extraTransforms.map(async (transform2) => {
297011
- await transform2(session, opts);
298692
+ await Promise.all(extraTransforms.map(async (transform3) => {
298693
+ await transform3(session, opts);
297012
298694
  }));
297013
298695
  }
297014
298696
  logMessagesFromVFile(session, vfile2);
@@ -297380,7 +299062,8 @@ ${page.file}
297380
299062
  if (hasWarnings[0] > 0) {
297381
299063
  const pluralE = hasWarnings[0] > 1 ? "s" : "";
297382
299064
  const pluralW = hasWarnings[1] > 1 ? "s" : "";
297383
- throw new Error(`Site has ${hasWarnings[0]} error${pluralE} and ${hasWarnings[1]} warning${pluralW}, stopping build.`);
299065
+ session.log.error(`Site has ${hasWarnings[0]} error${pluralE} and ${hasWarnings[1]} warning${pluralW}, stopping build.`);
299066
+ process.exit(1);
297384
299067
  }
297385
299068
  }
297386
299069
  if ((_b = opts === null || opts === void 0 ? void 0 : opts.writeFiles) !== null && _b !== void 0 ? _b : true) {
@@ -297714,7 +299397,7 @@ async function currentSiteRoutes(session, host, baseurl, opts) {
297714
299397
  };
297715
299398
  }),
297716
299399
  // Download other assets
297717
- ...["robots.txt", "sitemap.xml", "sitemap_style.xsl"].map((asset) => ({
299400
+ ...["favicon.ico", "robots.txt"].map((asset) => ({
297718
299401
  url: `${host}/${asset}`,
297719
299402
  path: asset
297720
299403
  }))
@@ -297740,14 +299423,24 @@ function rewriteAssetsFolder(directory, baseurl) {
297740
299423
  import_fs_extra.default.writeFileSync(file, modified);
297741
299424
  });
297742
299425
  }
297743
- async function buildHtml(session, opts) {
297744
- const template = await getMystTemplate(session, opts);
297745
- const baseurl = process.env.BASE_URL;
299426
+ function get_baseurl(session) {
299427
+ let baseurl;
299428
+ if (baseurl = process.env.BASE_URL) {
299429
+ session.log.info("BASE_URL environment overwrite is set");
299430
+ } else if (baseurl = process.env.READTHEDOCS_CANONICAL_URL) {
299431
+ baseurl = new URL(baseurl).pathname.replace(/\/$/, "");
299432
+ session.log.info(`Building inside a ReadTheDocs environment for ${process.env.READTHEDOCS_CANONICAL_URL}`);
299433
+ }
297746
299434
  if (baseurl) {
297747
299435
  session.log.info(`Building the site with a baseurl of "${baseurl}"`);
297748
299436
  } else {
297749
299437
  session.log.info('Building the base site.\nTo set a baseurl (e.g. GitHub pages) use "BASE_URL" environment variable.');
297750
299438
  }
299439
+ return baseurl;
299440
+ }
299441
+ async function buildHtml(session, opts) {
299442
+ const template = await getMystTemplate(session, opts);
299443
+ const baseurl = get_baseurl(session);
297751
299444
  const htmlDir = import_node_path42.default.join(session.buildPath(), "html");
297752
299445
  import_fs_extra.default.rmSync(htmlDir, { recursive: true, force: true });
297753
299446
  import_fs_extra.default.mkdirSync(htmlDir, { recursive: true });
@@ -297909,7 +299602,7 @@ function renderImports(kind, output2, imports, packages, preamble) {
297909
299602
  }
297910
299603
 
297911
299604
  // ../jtex/dist/version.js
297912
- var version3 = "1.0.16";
299605
+ var version3 = "1.0.17";
297913
299606
  var version_default3 = version3;
297914
299607
 
297915
299608
  // ../jtex/dist/jtex.js
@@ -298502,8 +300195,8 @@ function stringToLatexText(text7) {
298502
300195
  function stringToLatexMath(text7) {
298503
300196
  const replaced = Array.from(text7 !== null && text7 !== void 0 ? text7 : "").reduce((s5, char) => {
298504
300197
  if (mathReplacements[char]) {
298505
- const space2 = s5.slice(-1) === " " ? "" : " ";
298506
- return `${s5}${space2}${mathReplacements[char]}`;
300198
+ const space3 = s5.slice(-1) === " " ? "" : " ";
300199
+ return `${s5}${space3}${mathReplacements[char]}`;
298507
300200
  }
298508
300201
  return s5 + char;
298509
300202
  }, "");
@@ -298950,14 +300643,15 @@ var handlers3 = {
298950
300643
  state.closeBlock(node3);
298951
300644
  },
298952
300645
  block(node3, state) {
298953
- var _a6, _b, _c, _d2, _e;
300646
+ var _a6, _b;
300647
+ const metadataTags = getMetadataTags(node3);
298954
300648
  if (state.options.beamer) {
298955
- if ((_a6 = node3.data) === null || _a6 === void 0 ? void 0 : _a6.outline) {
300649
+ if (metadataTags.includes("outline")) {
298956
300650
  state.data.nextHeadingIsFrameTitle = false;
298957
300651
  state.renderChildren(node3, false);
298958
300652
  return;
298959
300653
  }
298960
- if (((_c = (_b = node3.children) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.type) === "heading") {
300654
+ if (((_b = (_a6 = node3.children) === null || _a6 === void 0 ? void 0 : _a6[0]) === null || _b === void 0 ? void 0 : _b.type) === "heading") {
298961
300655
  state.data.nextHeadingIsFrameTitle = true;
298962
300656
  }
298963
300657
  state.write("\n\n\\begin{frame}\n");
@@ -298967,8 +300661,15 @@ var handlers3 = {
298967
300661
  }
298968
300662
  if (node3.visibility === "remove")
298969
300663
  return;
298970
- if ((_e = (_d2 = node3.data) === null || _d2 === void 0 ? void 0 : _d2.tags) === null || _e === void 0 ? void 0 : _e.includes("no-tex"))
300664
+ if (metadataTags.includes("no-tex"))
298971
300665
  return;
300666
+ if (metadataTags.includes("no-pdf"))
300667
+ return;
300668
+ if (metadataTags.includes("new-page")) {
300669
+ state.write("\\newpage\n");
300670
+ } else if (metadataTags.includes("page-break")) {
300671
+ state.write("\\pagebreak\n");
300672
+ }
298972
300673
  state.renderChildren(node3, false);
298973
300674
  },
298974
300675
  blockquote(node3, state) {
@@ -299991,8 +301692,8 @@ function stringToTypstText(text7) {
299991
301692
  function stringToTypstMath(text7) {
299992
301693
  const replaced = Array.from(text7 !== null && text7 !== void 0 ? text7 : "").reduce((s5, char) => {
299993
301694
  if (mathReplacements2[char]) {
299994
- const space2 = s5.slice(-1) === " " ? "" : " ";
299995
- return `${s5}${space2}${mathReplacements2[char]}`;
301695
+ const space3 = s5.slice(-1) === " " ? "" : " ";
301696
+ return `${s5}${space3}${mathReplacements2[char]}`;
299996
301697
  }
299997
301698
  return s5 + char;
299998
301699
  }, "");
@@ -300520,8 +302221,16 @@ var handlers4 = {
300520
302221
  state.write("\n\n");
300521
302222
  },
300522
302223
  block(node3, state) {
302224
+ const metadataTags = getMetadataTags(node3);
302225
+ if (metadataTags.includes("no-typst"))
302226
+ return;
302227
+ if (metadataTags.includes("no-pdf"))
302228
+ return;
300523
302229
  if (node3.visibility === "remove")
300524
302230
  return;
302231
+ if (metadataTags.includes("page-break") || metadataTags.includes("new-page")) {
302232
+ state.write("#pagebreak(weak: true)\n");
302233
+ }
300525
302234
  state.renderChildren(node3, 2);
300526
302235
  },
300527
302236
  blockquote(node3, state) {
@@ -301287,6 +302996,10 @@ var paragraph2 = (state, node3) => {
301287
302996
  var block3 = (state, node3) => {
301288
302997
  if (node3.visibility === "remove")
301289
302998
  return;
302999
+ const metadataTags = getMetadataTags(node3);
303000
+ if (metadataTags.includes("page-break") || metadataTags.includes("new-page")) {
303001
+ state.current.push(new import_docx3.PageBreak());
303002
+ }
301290
303003
  state.renderChildren(node3);
301291
303004
  };
301292
303005
  var heading4 = (state, node3) => {
@@ -303226,8 +304939,8 @@ function tableTransform(mdast2) {
303226
304939
  // ../myst-to-jats/dist/transforms/sections.js
303227
304940
  function sectionAttrsFromBlock(node3) {
303228
304941
  const output2 = {};
303229
- if (node3.data) {
303230
- const blockType = node3.data.type;
304942
+ if (node3.kind) {
304943
+ const blockType = node3.kind;
303231
304944
  if (Object.values(NotebookCell).includes(blockType)) {
303232
304945
  output2["sec-type"] = blockType;
303233
304946
  }
@@ -312418,6 +314131,7 @@ var SITE_CONFIG = `site:
312418
314131
  template: book-theme
312419
314132
  # title:
312420
314133
  # options:
314134
+ # favicon: favicon.ico
312421
314135
  # logo: site_logo.png
312422
314136
  nav: []
312423
314137
  actions:
@@ -312517,18 +314231,30 @@ async function init(session, opts) {
312517
314231
  // ../myst-cli/dist/plugins.js
312518
314232
  var import_node_fs42 = __toESM(require("fs"), 1);
312519
314233
  async function loadPlugins(session) {
312520
- var _a6, _b;
312521
- const config2 = selectCurrentProjectConfig(session.store.getState());
314234
+ let configPlugins = [];
314235
+ const state = session.store.getState();
314236
+ const projConfig = selectors_exports.selectCurrentProjectConfig(state);
314237
+ if (projConfig === null || projConfig === void 0 ? void 0 : projConfig.plugins)
314238
+ configPlugins.push(...projConfig.plugins);
314239
+ const siteConfig = selectors_exports.selectCurrentSiteConfig(state);
314240
+ if (siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.projects) {
314241
+ siteConfig.projects.filter((project) => !!project.path).forEach((project) => {
314242
+ const siteProjConfig = selectors_exports.selectLocalProjectConfig(state, project.path);
314243
+ if (siteProjConfig === null || siteProjConfig === void 0 ? void 0 : siteProjConfig.plugins)
314244
+ configPlugins.push(...siteProjConfig.plugins);
314245
+ });
314246
+ }
314247
+ configPlugins = [...new Set(configPlugins)];
312522
314248
  const plugins2 = {
312523
314249
  directives: [],
312524
314250
  roles: [],
312525
314251
  transforms: []
312526
314252
  };
312527
- if (!(config2 === null || config2 === void 0 ? void 0 : config2.plugins) || config2.plugins.length === 0) {
314253
+ if (configPlugins.length === 0) {
312528
314254
  return plugins2;
312529
314255
  }
312530
- session.log.debug(`Loading plugins: "${(_a6 = config2 === null || config2 === void 0 ? void 0 : config2.plugins) === null || _a6 === void 0 ? void 0 : _a6.join('", "')}"`);
312531
- const modules = await Promise.all((_b = config2 === null || config2 === void 0 ? void 0 : config2.plugins) === null || _b === void 0 ? void 0 : _b.map(async (filename) => {
314256
+ session.log.debug(`Loading plugins: "${configPlugins.join('", "')}"`);
314257
+ const modules = await Promise.all(configPlugins.map(async (filename) => {
312532
314258
  if (!import_node_fs42.default.statSync(filename).isFile || !filename.endsWith(".mjs")) {
312533
314259
  addWarningForFile(session, filename, `Unknown plugin "${filename}", it must be an mjs file`, "error", {
312534
314260
  ruleId: RuleId.pluginLoads
@@ -312552,14 +314278,14 @@ ${error === null || error === void 0 ? void 0 : error.stack}
312552
314278
  return { filename, module: module2 };
312553
314279
  }));
312554
314280
  modules.forEach((pluginLoader) => {
312555
- var _a7;
314281
+ var _a6;
312556
314282
  if (!pluginLoader)
312557
314283
  return;
312558
314284
  const plugin5 = pluginLoader.module.default || pluginLoader.module.plugin;
312559
314285
  const directives = plugin5.directives || pluginLoader.module.directives;
312560
314286
  const roles = plugin5.roles || pluginLoader.module.roles;
312561
314287
  const transforms = plugin5.transforms || pluginLoader.module.transforms;
312562
- session.log.info(`\u{1F50C} ${(_a7 = plugin5 === null || plugin5 === void 0 ? void 0 : plugin5.name) !== null && _a7 !== void 0 ? _a7 : "Unnamed Plugin"} (${pluginLoader.filename}) loaded: ${plural("%s directive(s)", directives)}, ${plural("%s role(s)", roles)}, ${plural("%s transform(s)", transforms)}`);
314288
+ session.log.info(`\u{1F50C} ${(_a6 = plugin5 === null || plugin5 === void 0 ? void 0 : plugin5.name) !== null && _a6 !== void 0 ? _a6 : "Unnamed Plugin"} (${pluginLoader.filename}) loaded: ${plural("%s directive(s)", directives)}, ${plural("%s role(s)", roles)}, ${plural("%s transform(s)", transforms)}`);
312563
314289
  if (directives) {
312564
314290
  plugins2.directives.push(...directives);
312565
314291
  }