@harbour-enterprises/superdoc 0.29.0-next.9 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/chunks/{PdfViewer-BV-ij_Jn.es.js → PdfViewer-DQhcHGV_.es.js} +2 -2
  2. package/dist/chunks/{PdfViewer-DpviVXfb.cjs → PdfViewer-qQqnhYEQ.cjs} +2 -2
  3. package/dist/chunks/{eventemitter3-BvTILlBo.cjs → eventemitter3-DmHNHvFX.cjs} +1 -1
  4. package/dist/chunks/{eventemitter3-D4gv5QOO.es.js → eventemitter3-hYlnBzSA.es.js} +1 -1
  5. package/dist/chunks/{index-B5hIswvq.cjs → index-CaDbRGFF.cjs} +6 -6
  6. package/dist/chunks/{index-sJFE-5Sw-Chv1r9bA.cjs → index-DldNo6-E-B0LsewRn.cjs} +1 -1
  7. package/dist/chunks/{index-sJFE-5Sw-r5deiWbP.es.js → index-DldNo6-E-lpDwRf2x.es.js} +1 -1
  8. package/dist/chunks/{index-UVpS_47e.es.js → index-G6IpAZy0.es.js} +6 -6
  9. package/dist/chunks/{jszip-B0BPx_cv.cjs → jszip-BP2FTbpi.cjs} +7 -7
  10. package/dist/chunks/{jszip-Bhl-Iudl.es.js → jszip-jKrsZoMS.es.js} +7 -7
  11. package/dist/chunks/{super-editor.es-C9OTu_pS.es.js → super-editor.es-D2S9NC5U.es.js} +710 -673
  12. package/dist/chunks/{super-editor.es-Cw1FmXd7.cjs → super-editor.es-DISiPGag.cjs} +757 -720
  13. package/dist/chunks/{vue-D1vcEBAQ.es.js → vue-CKmzTNVs.es.js} +2 -2
  14. package/dist/chunks/{vue-BQxRC6G7.cjs → vue-Cwv-wUpm.cjs} +2 -2
  15. package/dist/chunks/xml-js-BSDu25I7.cjs +3 -0
  16. package/dist/chunks/xml-js-CBrRls0f.es.js +2 -0
  17. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  18. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  19. package/dist/style.css +2 -0
  20. package/dist/super-editor/ai-writer.es.js +2 -2
  21. package/dist/super-editor/chunks/{converter-D6qfGG_6.js → converter-DgrhVpVg.js} +440 -403
  22. package/dist/super-editor/chunks/{docx-zipper-BqmHhBsY.js → docx-zipper-rQGWdry3.js} +2 -2
  23. package/dist/super-editor/chunks/{editor-5q11lIMq.js → editor-CClqHaHN.js} +5 -5
  24. package/dist/super-editor/chunks/{index-sJFE-5Sw.js → index-DldNo6-E.js} +1 -1
  25. package/dist/super-editor/chunks/{toolbar-BV-1nlen.js → toolbar-DMCudruT.js} +2 -2
  26. package/dist/super-editor/converter.es.js +1 -1
  27. package/dist/super-editor/docx-zipper.es.js +2 -2
  28. package/dist/super-editor/editor.es.js +3 -3
  29. package/dist/super-editor/file-zipper.es.js +1 -1
  30. package/dist/super-editor/style.css +2 -0
  31. package/dist/super-editor/super-editor/src/core/super-converter/relationship-helpers.d.ts.map +1 -1
  32. package/dist/super-editor/super-editor/src/extensions/index.d.ts +2 -2
  33. package/dist/super-editor/super-editor/src/extensions/index.d.ts.map +1 -1
  34. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
  35. package/dist/super-editor/super-editor.es.js +6 -6
  36. package/dist/super-editor/toolbar.es.js +2 -2
  37. package/dist/super-editor.cjs +2 -2
  38. package/dist/super-editor.es.js +2 -2
  39. package/dist/superdoc.cjs +2 -2
  40. package/dist/superdoc.es.js +2 -2
  41. package/dist/superdoc.umd.js +645 -608
  42. package/dist/superdoc.umd.js.map +1 -1
  43. package/package.json +2 -5
  44. package/dist/chunks/xml-js-cO2Q8Wfu.cjs +0 -3
  45. package/dist/chunks/xml-js-jMPlIVKT.es.js +0 -2
@@ -187,15 +187,15 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
187
187
  * @author Feross Aboukhadijeh <https://feross.org>
188
188
  * @license MIT
189
189
  */
190
- (function(exports) {
190
+ (function(exports$1) {
191
191
  const base64 = base64Js;
192
192
  const ieee754$1 = ieee754;
193
193
  const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
194
- exports.Buffer = Buffer3;
195
- exports.SlowBuffer = SlowBuffer;
196
- exports.INSPECT_MAX_BYTES = 50;
194
+ exports$1.Buffer = Buffer3;
195
+ exports$1.SlowBuffer = SlowBuffer;
196
+ exports$1.INSPECT_MAX_BYTES = 50;
197
197
  const K_MAX_LENGTH = 2147483647;
198
- exports.kMaxLength = K_MAX_LENGTH;
198
+ exports$1.kMaxLength = K_MAX_LENGTH;
199
199
  const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
200
200
  Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();
201
201
  if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
@@ -413,17 +413,17 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
413
413
  );
414
414
  }
415
415
  if (a === b2) return 0;
416
- let x = a.length;
416
+ let x2 = a.length;
417
417
  let y2 = b2.length;
418
- for (let i = 0, len = Math.min(x, y2); i < len; ++i) {
418
+ for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
419
419
  if (a[i] !== b2[i]) {
420
- x = a[i];
420
+ x2 = a[i];
421
421
  y2 = b2[i];
422
422
  break;
423
423
  }
424
424
  }
425
- if (x < y2) return -1;
426
- if (y2 < x) return 1;
425
+ if (x2 < y2) return -1;
426
+ if (y2 < x2) return 1;
427
427
  return 0;
428
428
  };
429
429
  Buffer3.isEncoding = function isEncoding(encoding) {
@@ -626,7 +626,7 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
626
626
  };
627
627
  Buffer3.prototype.inspect = function inspect() {
628
628
  let str = "";
629
- const max2 = exports.INSPECT_MAX_BYTES;
629
+ const max2 = exports$1.INSPECT_MAX_BYTES;
630
630
  str = this.toString("hex", 0, max2).replace(/(.{2})/g, "$1 ").trim();
631
631
  if (this.length > max2) str += " ... ";
632
632
  return "<Buffer " + str + ">";
@@ -672,20 +672,20 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
672
672
  thisStart >>>= 0;
673
673
  thisEnd >>>= 0;
674
674
  if (this === target) return 0;
675
- let x = thisEnd - thisStart;
675
+ let x2 = thisEnd - thisStart;
676
676
  let y2 = end - start;
677
- const len = Math.min(x, y2);
677
+ const len = Math.min(x2, y2);
678
678
  const thisCopy = this.slice(thisStart, thisEnd);
679
679
  const targetCopy = target.slice(start, end);
680
680
  for (let i = 0; i < len; ++i) {
681
681
  if (thisCopy[i] !== targetCopy[i]) {
682
- x = thisCopy[i];
682
+ x2 = thisCopy[i];
683
683
  y2 = targetCopy[i];
684
684
  break;
685
685
  }
686
686
  }
687
- if (x < y2) return -1;
688
- if (y2 < x) return 1;
687
+ if (x2 < y2) return -1;
688
+ if (y2 < x2) return 1;
689
689
  return 0;
690
690
  };
691
691
  function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {
@@ -1775,8 +1775,8 @@ ieee754.write = function(buffer2, value, offset, isLE, mLen, nBytes) {
1775
1775
  })(buffer);
1776
1776
  const Buffer2 = buffer.Buffer;
1777
1777
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1778
- function getDefaultExportFromCjs$2(x) {
1779
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1778
+ function getDefaultExportFromCjs$2(x2) {
1779
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
1780
1780
  }
1781
1781
  var sax = {};
1782
1782
  var events = { exports: {} };
@@ -1784,13 +1784,13 @@ var hasRequiredEvents;
1784
1784
  function requireEvents() {
1785
1785
  if (hasRequiredEvents) return events.exports;
1786
1786
  hasRequiredEvents = 1;
1787
- var R2 = typeof Reflect === "object" ? Reflect : null;
1788
- var ReflectApply = R2 && typeof R2.apply === "function" ? R2.apply : function ReflectApply2(target, receiver, args) {
1787
+ var R = typeof Reflect === "object" ? Reflect : null;
1788
+ var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
1789
1789
  return Function.prototype.apply.call(target, receiver, args);
1790
1790
  };
1791
1791
  var ReflectOwnKeys;
1792
- if (R2 && typeof R2.ownKeys === "function") {
1793
- ReflectOwnKeys = R2.ownKeys;
1792
+ if (R && typeof R.ownKeys === "function") {
1793
+ ReflectOwnKeys = R.ownKeys;
1794
1794
  } else if (Object.getOwnPropertySymbols) {
1795
1795
  ReflectOwnKeys = function ReflectOwnKeys2(target) {
1796
1796
  return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
@@ -2180,8 +2180,8 @@ function requireInherits_browser() {
2180
2180
  }
2181
2181
  return inherits_browser.exports;
2182
2182
  }
2183
- function getDefaultExportFromCjs$1(x) {
2184
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2183
+ function getDefaultExportFromCjs$1(x2) {
2184
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
2185
2185
  }
2186
2186
  var browser$1 = { exports: {} };
2187
2187
  var process = browser$1.exports = {};
@@ -2355,8 +2355,8 @@ var hasRequiredDist;
2355
2355
  function requireDist() {
2356
2356
  if (hasRequiredDist) return dist;
2357
2357
  hasRequiredDist = 1;
2358
- (function(exports) {
2359
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2358
+ (function(exports$1) {
2359
+ Object.defineProperties(exports$1, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2360
2360
  var buffer2 = {};
2361
2361
  var base64Js2 = {};
2362
2362
  base64Js2.byteLength = byteLength2;
@@ -2536,15 +2536,15 @@ function requireDist() {
2536
2536
  * @author Feross Aboukhadijeh <https://feross.org>
2537
2537
  * @license MIT
2538
2538
  */
2539
- (function(exports2) {
2539
+ (function(exports$12) {
2540
2540
  const base64 = base64Js2;
2541
2541
  const ieee754$1 = ieee7542;
2542
2542
  const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null;
2543
- exports2.Buffer = Buffer4;
2544
- exports2.SlowBuffer = SlowBuffer;
2545
- exports2.INSPECT_MAX_BYTES = 50;
2543
+ exports$12.Buffer = Buffer4;
2544
+ exports$12.SlowBuffer = SlowBuffer;
2545
+ exports$12.INSPECT_MAX_BYTES = 50;
2546
2546
  const K_MAX_LENGTH = 2147483647;
2547
- exports2.kMaxLength = K_MAX_LENGTH;
2547
+ exports$12.kMaxLength = K_MAX_LENGTH;
2548
2548
  const { Uint8Array: GlobalUint8Array, ArrayBuffer: GlobalArrayBuffer, SharedArrayBuffer: GlobalSharedArrayBuffer } = globalThis;
2549
2549
  Buffer4.TYPED_ARRAY_SUPPORT = typedArraySupport();
2550
2550
  if (!Buffer4.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
@@ -2762,17 +2762,17 @@ function requireDist() {
2762
2762
  );
2763
2763
  }
2764
2764
  if (a === b2) return 0;
2765
- let x = a.length;
2765
+ let x2 = a.length;
2766
2766
  let y2 = b2.length;
2767
- for (let i2 = 0, len2 = Math.min(x, y2); i2 < len2; ++i2) {
2767
+ for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
2768
2768
  if (a[i2] !== b2[i2]) {
2769
- x = a[i2];
2769
+ x2 = a[i2];
2770
2770
  y2 = b2[i2];
2771
2771
  break;
2772
2772
  }
2773
2773
  }
2774
- if (x < y2) return -1;
2775
- if (y2 < x) return 1;
2774
+ if (x2 < y2) return -1;
2775
+ if (y2 < x2) return 1;
2776
2776
  return 0;
2777
2777
  };
2778
2778
  Buffer4.isEncoding = function isEncoding(encoding) {
@@ -2975,7 +2975,7 @@ function requireDist() {
2975
2975
  };
2976
2976
  Buffer4.prototype.inspect = function inspect() {
2977
2977
  let str = "";
2978
- const max2 = exports2.INSPECT_MAX_BYTES;
2978
+ const max2 = exports$12.INSPECT_MAX_BYTES;
2979
2979
  str = this.toString("hex", 0, max2).replace(/(.{2})/g, "$1 ").trim();
2980
2980
  if (this.length > max2) str += " ... ";
2981
2981
  return "<Buffer " + str + ">";
@@ -3021,20 +3021,20 @@ function requireDist() {
3021
3021
  thisStart >>>= 0;
3022
3022
  thisEnd >>>= 0;
3023
3023
  if (this === target) return 0;
3024
- let x = thisEnd - thisStart;
3024
+ let x2 = thisEnd - thisStart;
3025
3025
  let y2 = end - start;
3026
- const len2 = Math.min(x, y2);
3026
+ const len2 = Math.min(x2, y2);
3027
3027
  const thisCopy = this.slice(thisStart, thisEnd);
3028
3028
  const targetCopy = target.slice(start, end);
3029
3029
  for (let i2 = 0; i2 < len2; ++i2) {
3030
3030
  if (thisCopy[i2] !== targetCopy[i2]) {
3031
- x = thisCopy[i2];
3031
+ x2 = thisCopy[i2];
3032
3032
  y2 = targetCopy[i2];
3033
3033
  break;
3034
3034
  }
3035
3035
  }
3036
- if (x < y2) return -1;
3037
- if (y2 < x) return 1;
3036
+ if (x2 < y2) return -1;
3037
+ if (y2 < x2) return 1;
3038
3038
  return 0;
3039
3039
  };
3040
3040
  function bidirectionalIndexOf(buffer3, val, byteOffset, encoding, dir) {
@@ -4123,24 +4123,24 @@ function requireDist() {
4123
4123
  }
4124
4124
  })(buffer2);
4125
4125
  const Buffer3 = buffer2.Buffer;
4126
- exports.Blob = buffer2.Blob;
4127
- exports.BlobOptions = buffer2.BlobOptions;
4128
- exports.Buffer = buffer2.Buffer;
4129
- exports.File = buffer2.File;
4130
- exports.FileOptions = buffer2.FileOptions;
4131
- exports.INSPECT_MAX_BYTES = buffer2.INSPECT_MAX_BYTES;
4132
- exports.SlowBuffer = buffer2.SlowBuffer;
4133
- exports.TranscodeEncoding = buffer2.TranscodeEncoding;
4134
- exports.atob = buffer2.atob;
4135
- exports.btoa = buffer2.btoa;
4136
- exports.constants = buffer2.constants;
4137
- exports.default = Buffer3;
4138
- exports.isAscii = buffer2.isAscii;
4139
- exports.isUtf8 = buffer2.isUtf8;
4140
- exports.kMaxLength = buffer2.kMaxLength;
4141
- exports.kStringMaxLength = buffer2.kStringMaxLength;
4142
- exports.resolveObjectURL = buffer2.resolveObjectURL;
4143
- exports.transcode = buffer2.transcode;
4126
+ exports$1.Blob = buffer2.Blob;
4127
+ exports$1.BlobOptions = buffer2.BlobOptions;
4128
+ exports$1.Buffer = buffer2.Buffer;
4129
+ exports$1.File = buffer2.File;
4130
+ exports$1.FileOptions = buffer2.FileOptions;
4131
+ exports$1.INSPECT_MAX_BYTES = buffer2.INSPECT_MAX_BYTES;
4132
+ exports$1.SlowBuffer = buffer2.SlowBuffer;
4133
+ exports$1.TranscodeEncoding = buffer2.TranscodeEncoding;
4134
+ exports$1.atob = buffer2.atob;
4135
+ exports$1.btoa = buffer2.btoa;
4136
+ exports$1.constants = buffer2.constants;
4137
+ exports$1.default = Buffer3;
4138
+ exports$1.isAscii = buffer2.isAscii;
4139
+ exports$1.isUtf8 = buffer2.isUtf8;
4140
+ exports$1.kMaxLength = buffer2.kMaxLength;
4141
+ exports$1.kStringMaxLength = buffer2.kStringMaxLength;
4142
+ exports$1.resolveObjectURL = buffer2.resolveObjectURL;
4143
+ exports$1.transcode = buffer2.transcode;
4144
4144
  })(dist);
4145
4145
  return dist;
4146
4146
  }
@@ -4606,15 +4606,15 @@ function requireGetProto() {
4606
4606
  var reflectGetProto = requireReflect_getPrototypeOf();
4607
4607
  var originalGetProto = requireObject_getPrototypeOf();
4608
4608
  var getDunderProto = /* @__PURE__ */ requireGet();
4609
- getProto = reflectGetProto ? function getProto2(O2) {
4610
- return reflectGetProto(O2);
4611
- } : originalGetProto ? function getProto2(O2) {
4612
- if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
4609
+ getProto = reflectGetProto ? function getProto2(O) {
4610
+ return reflectGetProto(O);
4611
+ } : originalGetProto ? function getProto2(O) {
4612
+ if (!O || typeof O !== "object" && typeof O !== "function") {
4613
4613
  throw new TypeError("getProto: not an object");
4614
4614
  }
4615
- return originalGetProto(O2);
4616
- } : getDunderProto ? function getProto2(O2) {
4617
- return getDunderProto(O2);
4615
+ return originalGetProto(O);
4616
+ } : getDunderProto ? function getProto2(O) {
4617
+ return getDunderProto(O);
4618
4618
  } : null;
4619
4619
  return getProto;
4620
4620
  }
@@ -5282,18 +5282,18 @@ function requireForEach() {
5282
5282
  }
5283
5283
  };
5284
5284
  var forEachObject = function forEachObject2(object, iterator, receiver) {
5285
- for (var k in object) {
5286
- if (hasOwnProperty.call(object, k)) {
5285
+ for (var k2 in object) {
5286
+ if (hasOwnProperty.call(object, k2)) {
5287
5287
  if (receiver == null) {
5288
- iterator(object[k], k, object);
5288
+ iterator(object[k2], k2, object);
5289
5289
  } else {
5290
- iterator.call(receiver, object[k], k, object);
5290
+ iterator.call(receiver, object[k2], k2, object);
5291
5291
  }
5292
5292
  }
5293
5293
  }
5294
5294
  };
5295
- function isArray(x) {
5296
- return toStr.call(x) === "[object Array]";
5295
+ function isArray(x2) {
5296
+ return toStr.call(x2) === "[object Array]";
5297
5297
  }
5298
5298
  forEach = function forEach2(list, iterator, thisArg) {
5299
5299
  if (!isCallable2(iterator)) {
@@ -5642,7 +5642,7 @@ var hasRequiredTypes;
5642
5642
  function requireTypes() {
5643
5643
  if (hasRequiredTypes) return types;
5644
5644
  hasRequiredTypes = 1;
5645
- (function(exports) {
5645
+ (function(exports$1) {
5646
5646
  var isArgumentsObject = /* @__PURE__ */ requireIsArguments();
5647
5647
  var isGeneratorFunction2 = requireIsGeneratorFunction();
5648
5648
  var whichTypedArray2 = /* @__PURE__ */ requireWhichTypedArray();
@@ -5673,64 +5673,64 @@ function requireTypes() {
5673
5673
  return false;
5674
5674
  }
5675
5675
  }
5676
- exports.isArgumentsObject = isArgumentsObject;
5677
- exports.isGeneratorFunction = isGeneratorFunction2;
5678
- exports.isTypedArray = isTypedArray2;
5676
+ exports$1.isArgumentsObject = isArgumentsObject;
5677
+ exports$1.isGeneratorFunction = isGeneratorFunction2;
5678
+ exports$1.isTypedArray = isTypedArray2;
5679
5679
  function isPromise(input) {
5680
5680
  return typeof Promise !== "undefined" && input instanceof Promise || input !== null && typeof input === "object" && typeof input.then === "function" && typeof input.catch === "function";
5681
5681
  }
5682
- exports.isPromise = isPromise;
5682
+ exports$1.isPromise = isPromise;
5683
5683
  function isArrayBufferView(value) {
5684
5684
  if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
5685
5685
  return ArrayBuffer.isView(value);
5686
5686
  }
5687
5687
  return isTypedArray2(value) || isDataView(value);
5688
5688
  }
5689
- exports.isArrayBufferView = isArrayBufferView;
5689
+ exports$1.isArrayBufferView = isArrayBufferView;
5690
5690
  function isUint8Array(value) {
5691
5691
  return whichTypedArray2(value) === "Uint8Array";
5692
5692
  }
5693
- exports.isUint8Array = isUint8Array;
5693
+ exports$1.isUint8Array = isUint8Array;
5694
5694
  function isUint8ClampedArray(value) {
5695
5695
  return whichTypedArray2(value) === "Uint8ClampedArray";
5696
5696
  }
5697
- exports.isUint8ClampedArray = isUint8ClampedArray;
5697
+ exports$1.isUint8ClampedArray = isUint8ClampedArray;
5698
5698
  function isUint16Array(value) {
5699
5699
  return whichTypedArray2(value) === "Uint16Array";
5700
5700
  }
5701
- exports.isUint16Array = isUint16Array;
5701
+ exports$1.isUint16Array = isUint16Array;
5702
5702
  function isUint32Array(value) {
5703
5703
  return whichTypedArray2(value) === "Uint32Array";
5704
5704
  }
5705
- exports.isUint32Array = isUint32Array;
5705
+ exports$1.isUint32Array = isUint32Array;
5706
5706
  function isInt8Array(value) {
5707
5707
  return whichTypedArray2(value) === "Int8Array";
5708
5708
  }
5709
- exports.isInt8Array = isInt8Array;
5709
+ exports$1.isInt8Array = isInt8Array;
5710
5710
  function isInt16Array(value) {
5711
5711
  return whichTypedArray2(value) === "Int16Array";
5712
5712
  }
5713
- exports.isInt16Array = isInt16Array;
5713
+ exports$1.isInt16Array = isInt16Array;
5714
5714
  function isInt32Array(value) {
5715
5715
  return whichTypedArray2(value) === "Int32Array";
5716
5716
  }
5717
- exports.isInt32Array = isInt32Array;
5717
+ exports$1.isInt32Array = isInt32Array;
5718
5718
  function isFloat32Array(value) {
5719
5719
  return whichTypedArray2(value) === "Float32Array";
5720
5720
  }
5721
- exports.isFloat32Array = isFloat32Array;
5721
+ exports$1.isFloat32Array = isFloat32Array;
5722
5722
  function isFloat64Array(value) {
5723
5723
  return whichTypedArray2(value) === "Float64Array";
5724
5724
  }
5725
- exports.isFloat64Array = isFloat64Array;
5725
+ exports$1.isFloat64Array = isFloat64Array;
5726
5726
  function isBigInt64Array(value) {
5727
5727
  return whichTypedArray2(value) === "BigInt64Array";
5728
5728
  }
5729
- exports.isBigInt64Array = isBigInt64Array;
5729
+ exports$1.isBigInt64Array = isBigInt64Array;
5730
5730
  function isBigUint64Array(value) {
5731
5731
  return whichTypedArray2(value) === "BigUint64Array";
5732
5732
  }
5733
- exports.isBigUint64Array = isBigUint64Array;
5733
+ exports$1.isBigUint64Array = isBigUint64Array;
5734
5734
  function isMapToString(value) {
5735
5735
  return ObjectToString(value) === "[object Map]";
5736
5736
  }
@@ -5741,7 +5741,7 @@ function requireTypes() {
5741
5741
  }
5742
5742
  return isMapToString.working ? isMapToString(value) : value instanceof Map;
5743
5743
  }
5744
- exports.isMap = isMap;
5744
+ exports$1.isMap = isMap;
5745
5745
  function isSetToString(value) {
5746
5746
  return ObjectToString(value) === "[object Set]";
5747
5747
  }
@@ -5752,7 +5752,7 @@ function requireTypes() {
5752
5752
  }
5753
5753
  return isSetToString.working ? isSetToString(value) : value instanceof Set;
5754
5754
  }
5755
- exports.isSet = isSet;
5755
+ exports$1.isSet = isSet;
5756
5756
  function isWeakMapToString(value) {
5757
5757
  return ObjectToString(value) === "[object WeakMap]";
5758
5758
  }
@@ -5763,7 +5763,7 @@ function requireTypes() {
5763
5763
  }
5764
5764
  return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;
5765
5765
  }
5766
- exports.isWeakMap = isWeakMap;
5766
+ exports$1.isWeakMap = isWeakMap;
5767
5767
  function isWeakSetToString(value) {
5768
5768
  return ObjectToString(value) === "[object WeakSet]";
5769
5769
  }
@@ -5771,7 +5771,7 @@ function requireTypes() {
5771
5771
  function isWeakSet(value) {
5772
5772
  return isWeakSetToString(value);
5773
5773
  }
5774
- exports.isWeakSet = isWeakSet;
5774
+ exports$1.isWeakSet = isWeakSet;
5775
5775
  function isArrayBufferToString(value) {
5776
5776
  return ObjectToString(value) === "[object ArrayBuffer]";
5777
5777
  }
@@ -5782,7 +5782,7 @@ function requireTypes() {
5782
5782
  }
5783
5783
  return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;
5784
5784
  }
5785
- exports.isArrayBuffer = isArrayBuffer;
5785
+ exports$1.isArrayBuffer = isArrayBuffer;
5786
5786
  function isDataViewToString(value) {
5787
5787
  return ObjectToString(value) === "[object DataView]";
5788
5788
  }
@@ -5793,7 +5793,7 @@ function requireTypes() {
5793
5793
  }
5794
5794
  return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;
5795
5795
  }
5796
- exports.isDataView = isDataView;
5796
+ exports$1.isDataView = isDataView;
5797
5797
  var SharedArrayBufferCopy = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : void 0;
5798
5798
  function isSharedArrayBufferToString(value) {
5799
5799
  return ObjectToString(value) === "[object SharedArrayBuffer]";
@@ -5807,57 +5807,57 @@ function requireTypes() {
5807
5807
  }
5808
5808
  return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;
5809
5809
  }
5810
- exports.isSharedArrayBuffer = isSharedArrayBuffer;
5810
+ exports$1.isSharedArrayBuffer = isSharedArrayBuffer;
5811
5811
  function isAsyncFunction(value) {
5812
5812
  return ObjectToString(value) === "[object AsyncFunction]";
5813
5813
  }
5814
- exports.isAsyncFunction = isAsyncFunction;
5814
+ exports$1.isAsyncFunction = isAsyncFunction;
5815
5815
  function isMapIterator(value) {
5816
5816
  return ObjectToString(value) === "[object Map Iterator]";
5817
5817
  }
5818
- exports.isMapIterator = isMapIterator;
5818
+ exports$1.isMapIterator = isMapIterator;
5819
5819
  function isSetIterator(value) {
5820
5820
  return ObjectToString(value) === "[object Set Iterator]";
5821
5821
  }
5822
- exports.isSetIterator = isSetIterator;
5822
+ exports$1.isSetIterator = isSetIterator;
5823
5823
  function isGeneratorObject(value) {
5824
5824
  return ObjectToString(value) === "[object Generator]";
5825
5825
  }
5826
- exports.isGeneratorObject = isGeneratorObject;
5826
+ exports$1.isGeneratorObject = isGeneratorObject;
5827
5827
  function isWebAssemblyCompiledModule(value) {
5828
5828
  return ObjectToString(value) === "[object WebAssembly.Module]";
5829
5829
  }
5830
- exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
5830
+ exports$1.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
5831
5831
  function isNumberObject(value) {
5832
5832
  return checkBoxedPrimitive(value, numberValue);
5833
5833
  }
5834
- exports.isNumberObject = isNumberObject;
5834
+ exports$1.isNumberObject = isNumberObject;
5835
5835
  function isStringObject(value) {
5836
5836
  return checkBoxedPrimitive(value, stringValue);
5837
5837
  }
5838
- exports.isStringObject = isStringObject;
5838
+ exports$1.isStringObject = isStringObject;
5839
5839
  function isBooleanObject(value) {
5840
5840
  return checkBoxedPrimitive(value, booleanValue);
5841
5841
  }
5842
- exports.isBooleanObject = isBooleanObject;
5842
+ exports$1.isBooleanObject = isBooleanObject;
5843
5843
  function isBigIntObject(value) {
5844
5844
  return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
5845
5845
  }
5846
- exports.isBigIntObject = isBigIntObject;
5846
+ exports$1.isBigIntObject = isBigIntObject;
5847
5847
  function isSymbolObject(value) {
5848
5848
  return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
5849
5849
  }
5850
- exports.isSymbolObject = isSymbolObject;
5850
+ exports$1.isSymbolObject = isSymbolObject;
5851
5851
  function isBoxedPrimitive(value) {
5852
5852
  return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);
5853
5853
  }
5854
- exports.isBoxedPrimitive = isBoxedPrimitive;
5854
+ exports$1.isBoxedPrimitive = isBoxedPrimitive;
5855
5855
  function isAnyArrayBuffer(value) {
5856
5856
  return typeof Uint8Array !== "undefined" && (isArrayBuffer(value) || isSharedArrayBuffer(value));
5857
5857
  }
5858
- exports.isAnyArrayBuffer = isAnyArrayBuffer;
5858
+ exports$1.isAnyArrayBuffer = isAnyArrayBuffer;
5859
5859
  ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(method) {
5860
- Object.defineProperty(exports, method, {
5860
+ Object.defineProperty(exports$1, method, {
5861
5861
  enumerable: false,
5862
5862
  value: function() {
5863
5863
  throw new Error(method + " is not supported in userland");
@@ -5881,7 +5881,7 @@ var hasRequiredUtil;
5881
5881
  function requireUtil() {
5882
5882
  if (hasRequiredUtil) return util;
5883
5883
  hasRequiredUtil = 1;
5884
- (function(exports) {
5884
+ (function(exports$1) {
5885
5885
  var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(obj) {
5886
5886
  var keys2 = Object.keys(obj);
5887
5887
  var descriptors = {};
@@ -5891,7 +5891,7 @@ function requireUtil() {
5891
5891
  return descriptors;
5892
5892
  };
5893
5893
  var formatRegExp = /%[sdj%]/g;
5894
- exports.format = function(f) {
5894
+ exports$1.format = function(f) {
5895
5895
  if (!isString(f)) {
5896
5896
  var objects = [];
5897
5897
  for (var i = 0; i < arguments.length; i++) {
@@ -5902,10 +5902,10 @@ function requireUtil() {
5902
5902
  var i = 1;
5903
5903
  var args = arguments;
5904
5904
  var len = args.length;
5905
- var str = String(f).replace(formatRegExp, function(x2) {
5906
- if (x2 === "%%") return "%";
5907
- if (i >= len) return x2;
5908
- switch (x2) {
5905
+ var str = String(f).replace(formatRegExp, function(x3) {
5906
+ if (x3 === "%%") return "%";
5907
+ if (i >= len) return x3;
5908
+ switch (x3) {
5909
5909
  case "%s":
5910
5910
  return String(args[i++]);
5911
5911
  case "%d":
@@ -5917,25 +5917,25 @@ function requireUtil() {
5917
5917
  return "[Circular]";
5918
5918
  }
5919
5919
  default:
5920
- return x2;
5920
+ return x3;
5921
5921
  }
5922
5922
  });
5923
- for (var x = args[i]; i < len; x = args[++i]) {
5924
- if (isNull(x) || !isObject(x)) {
5925
- str += " " + x;
5923
+ for (var x2 = args[i]; i < len; x2 = args[++i]) {
5924
+ if (isNull(x2) || !isObject(x2)) {
5925
+ str += " " + x2;
5926
5926
  } else {
5927
- str += " " + inspect(x);
5927
+ str += " " + inspect(x2);
5928
5928
  }
5929
5929
  }
5930
5930
  return str;
5931
5931
  };
5932
- exports.deprecate = function(fn, msg) {
5932
+ exports$1.deprecate = function(fn, msg) {
5933
5933
  if (typeof process$1 !== "undefined" && process$1.noDeprecation === true) {
5934
5934
  return fn;
5935
5935
  }
5936
5936
  if (typeof process$1 === "undefined") {
5937
5937
  return function() {
5938
- return exports.deprecate(fn, msg).apply(this, arguments);
5938
+ return exports$1.deprecate(fn, msg).apply(this, arguments);
5939
5939
  };
5940
5940
  }
5941
5941
  var warned = false;
@@ -5961,13 +5961,13 @@ function requireUtil() {
5961
5961
  debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase();
5962
5962
  debugEnvRegex = new RegExp("^" + debugEnv + "$", "i");
5963
5963
  }
5964
- exports.debuglog = function(set) {
5964
+ exports$1.debuglog = function(set) {
5965
5965
  set = set.toUpperCase();
5966
5966
  if (!debugs[set]) {
5967
5967
  if (debugEnvRegex.test(set)) {
5968
5968
  var pid = process$1.pid;
5969
5969
  debugs[set] = function() {
5970
- var msg = exports.format.apply(exports, arguments);
5970
+ var msg = exports$1.format.apply(exports$1, arguments);
5971
5971
  console.error("%s %d: %s", set, pid, msg);
5972
5972
  };
5973
5973
  } else {
@@ -5987,7 +5987,7 @@ function requireUtil() {
5987
5987
  if (isBoolean(opts)) {
5988
5988
  ctx.showHidden = opts;
5989
5989
  } else if (opts) {
5990
- exports._extend(ctx, opts);
5990
+ exports$1._extend(ctx, opts);
5991
5991
  }
5992
5992
  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
5993
5993
  if (isUndefined(ctx.depth)) ctx.depth = 2;
@@ -5996,7 +5996,7 @@ function requireUtil() {
5996
5996
  if (ctx.colors) ctx.stylize = stylizeWithColor;
5997
5997
  return formatValue(ctx, obj, ctx.depth);
5998
5998
  }
5999
- exports.inspect = inspect;
5999
+ exports$1.inspect = inspect;
6000
6000
  inspect.colors = {
6001
6001
  "bold": [1, 22],
6002
6002
  "italic": [3, 23],
@@ -6043,7 +6043,7 @@ function requireUtil() {
6043
6043
  }
6044
6044
  function formatValue(ctx, value, recurseTimes) {
6045
6045
  if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special
6046
- value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check.
6046
+ value.inspect !== exports$1.inspect && // Also filter out any prototype objects using the circular check.
6047
6047
  !(value.constructor && value.constructor.prototype === value)) {
6048
6048
  var ret = value.inspect(recurseTimes, ctx);
6049
6049
  if (!isString(ret)) {
@@ -6229,68 +6229,68 @@ function requireUtil() {
6229
6229
  }
6230
6230
  return braces[0] + base + " " + output.join(", ") + " " + braces[1];
6231
6231
  }
6232
- exports.types = requireTypes();
6232
+ exports$1.types = requireTypes();
6233
6233
  function isArray(ar) {
6234
6234
  return Array.isArray(ar);
6235
6235
  }
6236
- exports.isArray = isArray;
6236
+ exports$1.isArray = isArray;
6237
6237
  function isBoolean(arg) {
6238
6238
  return typeof arg === "boolean";
6239
6239
  }
6240
- exports.isBoolean = isBoolean;
6240
+ exports$1.isBoolean = isBoolean;
6241
6241
  function isNull(arg) {
6242
6242
  return arg === null;
6243
6243
  }
6244
- exports.isNull = isNull;
6244
+ exports$1.isNull = isNull;
6245
6245
  function isNullOrUndefined(arg) {
6246
6246
  return arg == null;
6247
6247
  }
6248
- exports.isNullOrUndefined = isNullOrUndefined;
6248
+ exports$1.isNullOrUndefined = isNullOrUndefined;
6249
6249
  function isNumber(arg) {
6250
6250
  return typeof arg === "number";
6251
6251
  }
6252
- exports.isNumber = isNumber;
6252
+ exports$1.isNumber = isNumber;
6253
6253
  function isString(arg) {
6254
6254
  return typeof arg === "string";
6255
6255
  }
6256
- exports.isString = isString;
6256
+ exports$1.isString = isString;
6257
6257
  function isSymbol(arg) {
6258
6258
  return typeof arg === "symbol";
6259
6259
  }
6260
- exports.isSymbol = isSymbol;
6260
+ exports$1.isSymbol = isSymbol;
6261
6261
  function isUndefined(arg) {
6262
6262
  return arg === void 0;
6263
6263
  }
6264
- exports.isUndefined = isUndefined;
6264
+ exports$1.isUndefined = isUndefined;
6265
6265
  function isRegExp2(re2) {
6266
6266
  return isObject(re2) && objectToString(re2) === "[object RegExp]";
6267
6267
  }
6268
- exports.isRegExp = isRegExp2;
6269
- exports.types.isRegExp = isRegExp2;
6268
+ exports$1.isRegExp = isRegExp2;
6269
+ exports$1.types.isRegExp = isRegExp2;
6270
6270
  function isObject(arg) {
6271
6271
  return typeof arg === "object" && arg !== null;
6272
6272
  }
6273
- exports.isObject = isObject;
6273
+ exports$1.isObject = isObject;
6274
6274
  function isDate(d2) {
6275
6275
  return isObject(d2) && objectToString(d2) === "[object Date]";
6276
6276
  }
6277
- exports.isDate = isDate;
6278
- exports.types.isDate = isDate;
6277
+ exports$1.isDate = isDate;
6278
+ exports$1.types.isDate = isDate;
6279
6279
  function isError(e) {
6280
6280
  return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
6281
6281
  }
6282
- exports.isError = isError;
6283
- exports.types.isNativeError = isError;
6282
+ exports$1.isError = isError;
6283
+ exports$1.types.isNativeError = isError;
6284
6284
  function isFunction(arg) {
6285
6285
  return typeof arg === "function";
6286
6286
  }
6287
- exports.isFunction = isFunction;
6287
+ exports$1.isFunction = isFunction;
6288
6288
  function isPrimitive(arg) {
6289
6289
  return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
6290
6290
  typeof arg === "undefined";
6291
6291
  }
6292
- exports.isPrimitive = isPrimitive;
6293
- exports.isBuffer = requireIsBufferBrowser();
6292
+ exports$1.isPrimitive = isPrimitive;
6293
+ exports$1.isBuffer = requireIsBufferBrowser();
6294
6294
  function objectToString(o) {
6295
6295
  return Object.prototype.toString.call(o);
6296
6296
  }
@@ -6320,11 +6320,11 @@ function requireUtil() {
6320
6320
  ].join(":");
6321
6321
  return [d2.getDate(), months[d2.getMonth()], time].join(" ");
6322
6322
  }
6323
- exports.log = function() {
6324
- console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
6323
+ exports$1.log = function() {
6324
+ console.log("%s - %s", timestamp(), exports$1.format.apply(exports$1, arguments));
6325
6325
  };
6326
- exports.inherits = requireInherits_browser();
6327
- exports._extend = function(origin, add) {
6326
+ exports$1.inherits = requireInherits_browser();
6327
+ exports$1._extend = function(origin, add) {
6328
6328
  if (!add || !isObject(add)) return origin;
6329
6329
  var keys2 = Object.keys(add);
6330
6330
  var i = keys2.length;
@@ -6337,7 +6337,7 @@ function requireUtil() {
6337
6337
  return Object.prototype.hasOwnProperty.call(obj, prop);
6338
6338
  }
6339
6339
  var kCustomPromisifiedSymbol = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : void 0;
6340
- exports.promisify = function promisify(original) {
6340
+ exports$1.promisify = function promisify(original) {
6341
6341
  if (typeof original !== "function")
6342
6342
  throw new TypeError('The "original" argument must be of type Function');
6343
6343
  if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
@@ -6389,7 +6389,7 @@ function requireUtil() {
6389
6389
  getOwnPropertyDescriptors(original)
6390
6390
  );
6391
6391
  };
6392
- exports.promisify.custom = kCustomPromisifiedSymbol;
6392
+ exports$1.promisify.custom = kCustomPromisifiedSymbol;
6393
6393
  function callbackifyOnRejected(reason, cb) {
6394
6394
  if (!reason) {
6395
6395
  var newReason = new Error("Promise was rejected with a falsy value");
@@ -6431,7 +6431,7 @@ function requireUtil() {
6431
6431
  );
6432
6432
  return callbackified;
6433
6433
  }
6434
- exports.callbackify = callbackify;
6434
+ exports$1.callbackify = callbackify;
6435
6435
  })(util);
6436
6436
  return util;
6437
6437
  }
@@ -7489,11 +7489,12 @@ function require_stream_duplex() {
7489
7489
  }
7490
7490
  var string_decoder = {};
7491
7491
  var safeBuffer = { exports: {} };
7492
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
7492
7493
  var hasRequiredSafeBuffer;
7493
7494
  function requireSafeBuffer() {
7494
7495
  if (hasRequiredSafeBuffer) return safeBuffer.exports;
7495
7496
  hasRequiredSafeBuffer = 1;
7496
- (function(module, exports) {
7497
+ (function(module, exports$1) {
7497
7498
  var buffer2 = requireDist();
7498
7499
  var Buffer3 = buffer2.Buffer;
7499
7500
  function copyProps(src, dst) {
@@ -7504,12 +7505,13 @@ function requireSafeBuffer() {
7504
7505
  if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {
7505
7506
  module.exports = buffer2;
7506
7507
  } else {
7507
- copyProps(buffer2, exports);
7508
- exports.Buffer = SafeBuffer;
7508
+ copyProps(buffer2, exports$1);
7509
+ exports$1.Buffer = SafeBuffer;
7509
7510
  }
7510
7511
  function SafeBuffer(arg, encodingOrOffset, length) {
7511
7512
  return Buffer3(arg, encodingOrOffset, length);
7512
7513
  }
7514
+ SafeBuffer.prototype = Object.create(Buffer3.prototype);
7513
7515
  copyProps(Buffer3, SafeBuffer);
7514
7516
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
7515
7517
  if (typeof arg === "number") {
@@ -8787,9 +8789,9 @@ function require_stream_readable() {
8787
8789
  return from(Readable, iterable, opts);
8788
8790
  };
8789
8791
  }
8790
- function indexOf(xs, x) {
8792
+ function indexOf(xs, x2) {
8791
8793
  for (var i = 0, l3 = xs.length; i < l3; i++) {
8792
- if (xs[i] === x) return i;
8794
+ if (xs[i] === x2) return i;
8793
8795
  }
8794
8796
  return -1;
8795
8797
  }
@@ -9074,7 +9076,7 @@ var hasRequiredSax;
9074
9076
  function requireSax() {
9075
9077
  if (hasRequiredSax) return sax;
9076
9078
  hasRequiredSax = 1;
9077
- (function(exports) {
9079
+ (function(exports$1) {
9078
9080
  (function(sax2) {
9079
9081
  sax2.parser = function(strict, opt) {
9080
9082
  return new SAXParser(strict, opt);
@@ -9247,27 +9249,27 @@ function requireSax() {
9247
9249
  this._parser = new SAXParser(strict, opt);
9248
9250
  this.writable = true;
9249
9251
  this.readable = true;
9250
- var me = this;
9252
+ var me2 = this;
9251
9253
  this._parser.onend = function() {
9252
- me.emit("end");
9254
+ me2.emit("end");
9253
9255
  };
9254
9256
  this._parser.onerror = function(er) {
9255
- me.emit("error", er);
9256
- me._parser.error = null;
9257
+ me2.emit("error", er);
9258
+ me2._parser.error = null;
9257
9259
  };
9258
9260
  this._decoder = null;
9259
9261
  streamWraps.forEach(function(ev) {
9260
- Object.defineProperty(me, "on" + ev, {
9262
+ Object.defineProperty(me2, "on" + ev, {
9261
9263
  get: function() {
9262
- return me._parser["on" + ev];
9264
+ return me2._parser["on" + ev];
9263
9265
  },
9264
- set: function(h2) {
9265
- if (!h2) {
9266
- me.removeAllListeners(ev);
9267
- me._parser["on" + ev] = h2;
9268
- return h2;
9266
+ set: function(h) {
9267
+ if (!h) {
9268
+ me2.removeAllListeners(ev);
9269
+ me2._parser["on" + ev] = h;
9270
+ return h;
9269
9271
  }
9270
- me.on(ev, h2);
9272
+ me2.on(ev, h);
9271
9273
  },
9272
9274
  enumerable: true,
9273
9275
  configurable: false
@@ -9299,15 +9301,15 @@ function requireSax() {
9299
9301
  return true;
9300
9302
  };
9301
9303
  SAXStream.prototype.on = function(ev, handler2) {
9302
- var me = this;
9303
- if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9304
- me._parser["on" + ev] = function() {
9304
+ var me2 = this;
9305
+ if (!me2._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) {
9306
+ me2._parser["on" + ev] = function() {
9305
9307
  var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
9306
9308
  args.splice(0, 0, ev);
9307
- me.emit.apply(me, args);
9309
+ me2.emit.apply(me2, args);
9308
9310
  };
9309
9311
  }
9310
- return Stream.prototype.on.call(me, ev, handler2);
9312
+ return Stream.prototype.on.call(me2, ev, handler2);
9311
9313
  };
9312
9314
  var CDATA = "[CDATA[";
9313
9315
  var DOCTYPE = "DOCTYPE";
@@ -9899,9 +9901,9 @@ function requireSax() {
9899
9901
  var tag = parser.tag = parser.tags.pop();
9900
9902
  parser.tagName = parser.tag.name;
9901
9903
  emitNode(parser, "onclosetag", parser.tagName);
9902
- var x = {};
9904
+ var x2 = {};
9903
9905
  for (var i in tag.ns) {
9904
- x[i] = tag.ns[i];
9906
+ x2[i] = tag.ns[i];
9905
9907
  }
9906
9908
  var parent = parser.tags[parser.tags.length - 1] || parser;
9907
9909
  if (parser.opt.xmlns && tag.ns !== parent.ns) {
@@ -10552,7 +10554,7 @@ function requireSax() {
10552
10554
  }
10553
10555
  })();
10554
10556
  }
10555
- })(exports);
10557
+ })(exports$1);
10556
10558
  })(sax);
10557
10559
  return sax;
10558
10560
  }
@@ -10958,8 +10960,8 @@ function requireXml2json() {
10958
10960
  js = xml2js2(xml, options);
10959
10961
  parentKey = "compact" in options && options.compact ? "_parent" : "parent";
10960
10962
  if ("addParent" in options && options.addParent) {
10961
- json = JSON.stringify(js, function(k, v2) {
10962
- return k === parentKey ? "_" : v2;
10963
+ json = JSON.stringify(js, function(k2, v2) {
10964
+ return k2 === parentKey ? "_" : v2;
10963
10965
  }, options.spaces);
10964
10966
  } else {
10965
10967
  json = JSON.stringify(js, null, options.spaces);
@@ -11381,8 +11383,8 @@ function v4(options, buf, offset) {
11381
11383
  rnds[8] = rnds[8] & 63 | 128;
11382
11384
  return unsafeStringify(rnds);
11383
11385
  }
11384
- function getDefaultExportFromCjs(x) {
11385
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
11386
+ function getDefaultExportFromCjs(x2) {
11387
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
11386
11388
  }
11387
11389
  const CRC_TABLE = new Int32Array([
11388
11390
  0,
@@ -15198,8 +15200,8 @@ function polygonToObj(polygonNode) {
15198
15200
  const points = [];
15199
15201
  polygonNode.elements.forEach((element) => {
15200
15202
  if (["wp:start", "wp:lineTo"].includes(element.name)) {
15201
- const { x, y: y2 } = element.attributes;
15202
- points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15203
+ const { x: x2, y: y2 } = element.attributes;
15204
+ points.push([polygonUnitsToPixels(x2), polygonUnitsToPixels(y2)]);
15203
15205
  }
15204
15206
  });
15205
15207
  if (points.length > 1) {
@@ -15222,13 +15224,13 @@ function objToPolygon(points) {
15222
15224
  elements: []
15223
15225
  };
15224
15226
  points.forEach((point, index2) => {
15225
- const [x, y2] = point;
15227
+ const [x2, y2] = point;
15226
15228
  const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15227
15229
  const pointNode = {
15228
15230
  name: tagName,
15229
15231
  type: tagName,
15230
15232
  attributes: {
15231
- x: pixelsToPolygonUnits(x),
15233
+ x: pixelsToPolygonUnits(x2),
15232
15234
  y: pixelsToPolygonUnits(y2)
15233
15235
  }
15234
15236
  };
@@ -17445,13 +17447,17 @@ function canCut(node, start, end) {
17445
17447
  function liftTarget(range2) {
17446
17448
  let parent = range2.parent;
17447
17449
  let content = parent.content.cutByIndex(range2.startIndex, range2.endIndex);
17448
- for (let depth = range2.depth; ; --depth) {
17450
+ for (let depth = range2.depth, contentBefore = 0, contentAfter = 0; ; --depth) {
17449
17451
  let node = range2.$from.node(depth);
17450
- let index2 = range2.$from.index(depth), endIndex = range2.$to.indexAfter(depth);
17452
+ let index2 = range2.$from.index(depth) + contentBefore, endIndex = range2.$to.indexAfter(depth) - contentAfter;
17451
17453
  if (depth < range2.depth && node.canReplace(index2, endIndex, content))
17452
17454
  return depth;
17453
17455
  if (depth == 0 || node.type.spec.isolating || !canCut(node, index2, endIndex))
17454
17456
  break;
17457
+ if (index2)
17458
+ contentBefore = 1;
17459
+ if (endIndex < node.childCount)
17460
+ contentAfter = 1;
17455
17461
  }
17456
17462
  return null;
17457
17463
  }
@@ -17994,7 +18000,7 @@ function replaceRange(tr, from, to, slice) {
17994
18000
  let $from = tr.doc.resolve(from), $to = tr.doc.resolve(to);
17995
18001
  if (fitsTrivially($from, $to, slice))
17996
18002
  return tr.step(new ReplaceStep(from, to, slice));
17997
- let targetDepths = coveredDepths($from, tr.doc.resolve(to));
18003
+ let targetDepths = coveredDepths($from, $to);
17998
18004
  if (targetDepths[targetDepths.length - 1] == 0)
17999
18005
  targetDepths.pop();
18000
18006
  let preferredTarget = -($from.depth + 1);
@@ -22886,7 +22892,7 @@ function posToDOMRect(view, from, to) {
22886
22892
  const right = Math.max(start.right, end.right);
22887
22893
  const width = right - left;
22888
22894
  const height = bottom - top;
22889
- const x = left;
22895
+ const x2 = left;
22890
22896
  const y2 = top;
22891
22897
  const data = {
22892
22898
  top,
@@ -22895,7 +22901,7 @@ function posToDOMRect(view, from, to) {
22895
22901
  right,
22896
22902
  width,
22897
22903
  height,
22898
- x,
22904
+ x: x2,
22899
22905
  y: y2
22900
22906
  };
22901
22907
  return {
@@ -22984,25 +22990,31 @@ function createDocFromHTML(content, schema, options = {}) {
22984
22990
  function L() {
22985
22991
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
22986
22992
  }
22987
- var O = L();
22993
+ var T = L();
22988
22994
  function G(l3) {
22989
- O = l3;
22995
+ T = l3;
22990
22996
  }
22991
22997
  var E = { exec: () => null };
22992
- function h(l3, e = "") {
22998
+ function d(l3, e = "") {
22993
22999
  let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
22994
23000
  let s = typeof i == "string" ? i : i.source;
22995
23001
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
22996
23002
  }, getRegex: () => new RegExp(t, e) };
22997
23003
  return n;
22998
23004
  }
22999
- var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, xe = /^(?:[ \t]*(?:\n|$))+/, be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Re = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, j = /(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Te = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), F = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, we = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ye = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pe = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Se = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), $e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K = { blockquote: $e, code: be, def: ye, fences: Re, heading: Oe, hr: C, html: Se, lheading: ie, list: Pe, newline: xe, paragraph: oe, table: E, text: we }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = { ...K, lheading: Te, table: re, paragraph: h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Le = { ...K, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(F).replace("hr", C).replace("heading", ` *#{1,6} *[^
23000
- ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Me = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, le = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Ie = /(?:[^\s\p{P}\p{S}]|~)/u, Be = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, qe = h(pe, "u").replace(/punct/g, D).getRegex(), ve = h(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), He = h(ce, "gu").replace(/notPunctSpace/g, Ie).replace(/punctSpace/g, Ce).replace(/punct/g, ue).getRegex(), Ze = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Ne = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Fe = h("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/, Qe = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), he$3 = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), de = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ue = h("reflink|nolink(?!\\()", "g").replace("reflink", he$3).replace("nolink", de).getRegex(), X = { _backpedal: E, anyPunctuation: Ge, autolink: Ne, blockSkip: Be, br: ae, code: ze, del: E, emStrongLDelim: qe, emStrongRDelimAst: De, emStrongRDelimUnd: Ze, escape: Me, link: Qe, nolink: de, punctuation: Ee, reflink: he$3, reflinkSearch: Ue, tag: Fe, text: Ae, url: E }, Ke = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: He, emStrongLDelim: ve, url: h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, We = { ...N, br: h(ae).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: K, gfm: _e, pedantic: Le }, M = { normal: X, gfm: N, breaks: We, pedantic: Ke };
23001
- var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
23005
+ var be = (() => {
23006
+ try {
23007
+ return !!new RegExp("(?<=1)(?<!1)");
23008
+ } catch {
23009
+ return false;
23010
+ }
23011
+ })(), m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, I = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ye = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _e = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = d(j).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: Le, code: Te, def: Se, fences: Oe, heading: we, hr: I, html: _e, lheading: oe, list: $e, newline: Re, paragraph: ae, table: E, text: Pe }, re = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Me = { ...K, lheading: ye, table: re, paragraph: d(j).replace("hr", I).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, ze = { ...K, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(j).replace("hr", I).replace("heading", ` *#{1,6} *[^
23012
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ee = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ce = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, qe = /(?:[^\s\p{P}\p{S}]|~)/u, ve = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, De = d(ce, "u").replace(/punct/g, D).getRegex(), He = d(ce, "u").replace(/punct/g, pe).getRegex(), he$3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = d(he$3, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = d(he$3, "gu").replace(/notPunctSpace/g, qe).replace(/punctSpace/g, Be).replace(/punct/g, pe).getRegex(), Ne = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Fe = d(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), je = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Qe = d(U).replace("(?:-->|$)", "-->").getRegex(), Ue = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Qe).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ke = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = d(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), We = d("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: E, anyPunctuation: Fe, autolink: je, blockSkip: ve, br: le, code: Ee, del: E, emStrongLDelim: De, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ae, link: Ke, nolink: ke, punctuation: Ce, reflink: de, reflinkSearch: We, tag: Ue, text: Ie, url: E }, Xe = { ...X, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() }, Je = { ...N, br: d(le).replace("{2,}", "*").getRegex(), text: d(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Me, pedantic: ze }, M = { normal: X, gfm: N, breaks: Je, pedantic: Xe };
23013
+ var Ve = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (l3) => Ve[l3];
23002
23014
  function w(l3, e) {
23003
23015
  if (e) {
23004
- if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
23005
- } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
23016
+ if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
23017
+ } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
23006
23018
  return l3;
23007
23019
  }
23008
23020
  function J(l3) {
@@ -23014,10 +23026,10 @@ function J(l3) {
23014
23026
  return l3;
23015
23027
  }
23016
23028
  function V(l3, e) {
23017
- let t = l3.replace(m.findPipe, (i, s, o) => {
23018
- let a = false, u = s;
23019
- for (; --u >= 0 && o[u] === "\\"; ) a = !a;
23020
- return a ? "|" : " |";
23029
+ let t = l3.replace(m.findPipe, (i, s, a) => {
23030
+ let o = false, p = s;
23031
+ for (; --p >= 0 && a[p] === "\\"; ) o = !o;
23032
+ return o ? "|" : " |";
23021
23033
  }), n = t.split(m.splitPipe), r = 0;
23022
23034
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
23023
23035
  else for (; n.length < e; ) n.push("");
@@ -23035,7 +23047,7 @@ function z(l3, e, t) {
23035
23047
  }
23036
23048
  return l3.slice(0, n - r);
23037
23049
  }
23038
- function ge(l3, e) {
23050
+ function fe(l3, e) {
23039
23051
  if (l3.indexOf(e[1]) === -1) return -1;
23040
23052
  let t = 0;
23041
23053
  for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
@@ -23043,13 +23055,13 @@ function ge(l3, e) {
23043
23055
  else if (l3[n] === e[1] && (t--, t < 0)) return n;
23044
23056
  return t > 0 ? -2 : -1;
23045
23057
  }
23046
- function fe(l3, e, t, n, r) {
23047
- let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
23058
+ function me(l3, e, t, n, r) {
23059
+ let i = e.href, s = e.title || null, a = l3[1].replace(r.other.outputLinkReplace, "$1");
23048
23060
  n.state.inLink = true;
23049
- let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
23050
- return n.state.inLink = false, a;
23061
+ let o = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
23062
+ return n.state.inLink = false, o;
23051
23063
  }
23052
- function Je(l3, e, t) {
23064
+ function Ye(l3, e, t) {
23053
23065
  let n = l3.match(t.other.indentCodeCompensation);
23054
23066
  if (n === null) return e;
23055
23067
  let r = n[1];
@@ -23057,8 +23069,8 @@ function Je(l3, e, t) {
23057
23069
  `).map((i) => {
23058
23070
  let s = i.match(t.other.beginningSpace);
23059
23071
  if (s === null) return i;
23060
- let [o] = s;
23061
- return o.length >= r.length ? i.slice(r.length) : i;
23072
+ let [a] = s;
23073
+ return a.length >= r.length ? i.slice(r.length) : i;
23062
23074
  }).join(`
23063
23075
  `);
23064
23076
  }
@@ -23067,7 +23079,7 @@ var y = class {
23067
23079
  __publicField(this, "options");
23068
23080
  __publicField(this, "rules");
23069
23081
  __publicField(this, "lexer");
23070
- this.options = e || O;
23082
+ this.options = e || T;
23071
23083
  }
23072
23084
  space(e) {
23073
23085
  let t = this.rules.block.newline.exec(e);
@@ -23084,7 +23096,7 @@ var y = class {
23084
23096
  fences(e) {
23085
23097
  let t = this.rules.block.fences.exec(e);
23086
23098
  if (t) {
23087
- let n = t[0], r = Je(n, t[3] || "", this.rules);
23099
+ let n = t[0], r = Ye(n, t[3] || "", this.rules);
23088
23100
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
23089
23101
  }
23090
23102
  }
@@ -23111,32 +23123,32 @@ var y = class {
23111
23123
  `).split(`
23112
23124
  `), r = "", i = "", s = [];
23113
23125
  for (; n.length > 0; ) {
23114
- let o = false, a = [], u;
23115
- for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
23116
- else if (!o) a.push(n[u]);
23126
+ let a = false, o = [], p;
23127
+ for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) o.push(n[p]), a = true;
23128
+ else if (!a) o.push(n[p]);
23117
23129
  else break;
23118
- n = n.slice(u);
23119
- let p = a.join(`
23120
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
23130
+ n = n.slice(p);
23131
+ let u = o.join(`
23132
+ `), c = u.replace(this.rules.other.blockquoteSetextReplace, `
23121
23133
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
23122
23134
  r = r ? `${r}
23123
- ${p}` : p, i = i ? `${i}
23135
+ ${u}` : u, i = i ? `${i}
23124
23136
  ${c}` : c;
23125
- let f = this.lexer.state.top;
23126
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
23127
- let k = s.at(-1);
23128
- if (k?.type === "code") break;
23129
- if (k?.type === "blockquote") {
23130
- let x = k, g = x.raw + `
23137
+ let g = this.lexer.state.top;
23138
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
23139
+ let h = s.at(-1);
23140
+ if (h?.type === "code") break;
23141
+ if (h?.type === "blockquote") {
23142
+ let R = h, f = R.raw + `
23131
23143
  ` + n.join(`
23132
- `), T = this.blockquote(g);
23133
- s[s.length - 1] = T, r = r.substring(0, r.length - x.raw.length) + T.raw, i = i.substring(0, i.length - x.text.length) + T.text;
23144
+ `), O = this.blockquote(f);
23145
+ s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
23134
23146
  break;
23135
- } else if (k?.type === "list") {
23136
- let x = k, g = x.raw + `
23147
+ } else if (h?.type === "list") {
23148
+ let R = h, f = R.raw + `
23137
23149
  ` + n.join(`
23138
- `), T = this.list(g);
23139
- s[s.length - 1] = T, r = r.substring(0, r.length - k.raw.length) + T.raw, i = i.substring(0, i.length - x.raw.length) + T.raw, n = g.substring(s.at(-1).raw.length).split(`
23150
+ `), O = this.list(f);
23151
+ s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
23140
23152
  `);
23141
23153
  continue;
23142
23154
  }
@@ -23149,45 +23161,45 @@ ${c}` : c;
23149
23161
  if (t) {
23150
23162
  let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
23151
23163
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
23152
- let s = this.rules.other.listItemRegex(n), o = false;
23164
+ let s = this.rules.other.listItemRegex(n), a = false;
23153
23165
  for (; e; ) {
23154
- let u = false, p = "", c = "";
23166
+ let p = false, u = "", c = "";
23155
23167
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
23156
- p = t[0], e = e.substring(p.length);
23157
- let f = t[2].split(`
23158
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
23159
- `, 1)[0], x = !f.trim(), g = 0;
23160
- if (this.options.pedantic ? (g = 2, c = f.trimStart()) : x ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = f.slice(g), g += t[1].length), x && this.rules.other.blankLine.test(k) && (p += k + `
23161
- `, e = e.substring(k.length + 1), u = true), !u) {
23162
- let H = this.rules.other.nextBulletRegex(g), ee = this.rules.other.hrRegex(g), te = this.rules.other.fencesBeginRegex(g), ne = this.rules.other.headingBeginRegex(g), me = this.rules.other.htmlBeginRegex(g);
23168
+ u = t[0], e = e.substring(u.length);
23169
+ let g = t[2].split(`
23170
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
23171
+ `, 1)[0], R = !g.trim(), f = 0;
23172
+ if (this.options.pedantic ? (f = 2, c = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (u += h + `
23173
+ `, e = e.substring(h.length + 1), p = true), !p) {
23174
+ let H = this.rules.other.nextBulletRegex(f), ee = this.rules.other.hrRegex(f), te = this.rules.other.fencesBeginRegex(f), ne = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
23163
23175
  for (; e; ) {
23164
23176
  let Z = e.split(`
23165
23177
  `, 1)[0], A;
23166
- if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), A = k) : A = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || ne.test(k) || me.test(k) || H.test(k) || ee.test(k)) break;
23167
- if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
23168
- ` + A.slice(g);
23178
+ if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || H.test(h) || ee.test(h)) break;
23179
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
23180
+ ` + A.slice(f);
23169
23181
  else {
23170
- if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
23182
+ if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
23171
23183
  c += `
23172
- ` + k;
23184
+ ` + h;
23173
23185
  }
23174
- !x && !k.trim() && (x = true), p += Z + `
23175
- `, e = e.substring(Z.length + 1), f = A.slice(g);
23186
+ !R && !h.trim() && (R = true), u += Z + `
23187
+ `, e = e.substring(Z.length + 1), g = A.slice(f);
23176
23188
  }
23177
23189
  }
23178
- i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
23179
- let T = null, Y;
23180
- this.options.gfm && (T = this.rules.other.listIsTask.exec(c), T && (Y = T[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: p, task: !!T, checked: Y, loose: false, text: c, tokens: [] }), i.raw += p;
23190
+ i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(u) && (a = true));
23191
+ let O = null, Y;
23192
+ this.options.gfm && (O = this.rules.other.listIsTask.exec(c), O && (Y = O[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: u, task: !!O, checked: Y, loose: false, text: c, tokens: [] }), i.raw += u;
23181
23193
  }
23182
- let a = i.items.at(-1);
23183
- if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
23194
+ let o = i.items.at(-1);
23195
+ if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
23184
23196
  else return;
23185
23197
  i.raw = i.raw.trimEnd();
23186
- for (let u = 0; u < i.items.length; u++) if (this.lexer.state.top = false, i.items[u].tokens = this.lexer.blockTokens(i.items[u].text, []), !i.loose) {
23187
- let p = i.items[u].tokens.filter((f) => f.type === "space"), c = p.length > 0 && p.some((f) => this.rules.other.anyLine.test(f.raw));
23198
+ for (let p = 0; p < i.items.length; p++) if (this.lexer.state.top = false, i.items[p].tokens = this.lexer.blockTokens(i.items[p].text, []), !i.loose) {
23199
+ let u = i.items[p].tokens.filter((g) => g.type === "space"), c = u.length > 0 && u.some((g) => this.rules.other.anyLine.test(g.raw));
23188
23200
  i.loose = c;
23189
23201
  }
23190
- if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
23202
+ if (i.loose) for (let p = 0; p < i.items.length; p++) i.items[p].loose = true;
23191
23203
  return i;
23192
23204
  }
23193
23205
  }
@@ -23208,9 +23220,9 @@ ${c}` : c;
23208
23220
  let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
23209
23221
  `) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
23210
23222
  if (n.length === r.length) {
23211
- for (let o of r) this.rules.other.tableAlignRight.test(o) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s.align.push("left") : s.align.push(null);
23212
- for (let o = 0; o < n.length; o++) s.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s.align[o] });
23213
- for (let o of i) s.rows.push(V(o, s.header.length).map((a, u) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[u] })));
23223
+ for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
23224
+ for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
23225
+ for (let a of i) s.rows.push(V(a, s.header.length).map((o, p) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[p] })));
23214
23226
  return s;
23215
23227
  }
23216
23228
  }
@@ -23247,11 +23259,11 @@ ${c}` : c;
23247
23259
  let s = z(n.slice(0, -1), "\\");
23248
23260
  if ((n.length - s.length) % 2 === 0) return;
23249
23261
  } else {
23250
- let s = ge(t[2], "()");
23262
+ let s = fe(t[2], "()");
23251
23263
  if (s === -2) return;
23252
23264
  if (s > -1) {
23253
- let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
23254
- t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, a).trim(), t[3] = "";
23265
+ let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
23266
+ t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
23255
23267
  }
23256
23268
  }
23257
23269
  let r = t[2], i = "";
@@ -23259,7 +23271,7 @@ ${c}` : c;
23259
23271
  let s = this.rules.other.pedanticHrefTitle.exec(r);
23260
23272
  s && (r = s[1], i = s[3]);
23261
23273
  } else i = t[3] ? t[3].slice(1, -1) : "";
23262
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
23274
+ return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), me(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
23263
23275
  }
23264
23276
  }
23265
23277
  reflink(e, t) {
@@ -23270,32 +23282,32 @@ ${c}` : c;
23270
23282
  let s = n[0].charAt(0);
23271
23283
  return { type: "text", raw: s, text: s };
23272
23284
  }
23273
- return fe(n, i, n[0], this.lexer, this.rules);
23285
+ return me(n, i, n[0], this.lexer, this.rules);
23274
23286
  }
23275
23287
  }
23276
23288
  emStrong(e, t, n = "") {
23277
23289
  let r = this.rules.inline.emStrongLDelim.exec(e);
23278
23290
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
23279
23291
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
23280
- let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23292
+ let s = [...r[0]].length - 1, a, o, p = s, u = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
23281
23293
  for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
23282
- if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
23283
- if (a = [...o].length, r[3] || r[4]) {
23284
- u += a;
23294
+ if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
23295
+ if (o = [...a].length, r[3] || r[4]) {
23296
+ p += o;
23285
23297
  continue;
23286
- } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
23287
- p += a;
23298
+ } else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
23299
+ u += o;
23288
23300
  continue;
23289
23301
  }
23290
- if (u -= a, u > 0) continue;
23291
- a = Math.min(a, a + u + p);
23292
- let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
23293
- if (Math.min(s, a) % 2) {
23294
- let g = k.slice(1, -1);
23295
- return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
23302
+ if (p -= o, p > 0) continue;
23303
+ o = Math.min(o, o + p + u);
23304
+ let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + o);
23305
+ if (Math.min(s, o) % 2) {
23306
+ let f = h.slice(1, -1);
23307
+ return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
23296
23308
  }
23297
- let x = k.slice(2, -2);
23298
- return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
23309
+ let R = h.slice(2, -2);
23310
+ return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
23299
23311
  }
23300
23312
  }
23301
23313
  }
@@ -23344,19 +23356,19 @@ ${c}` : c;
23344
23356
  }
23345
23357
  }
23346
23358
  };
23347
- var b = class l {
23359
+ var x = class l {
23348
23360
  constructor(e) {
23349
23361
  __publicField(this, "tokens");
23350
23362
  __publicField(this, "options");
23351
23363
  __publicField(this, "state");
23352
23364
  __publicField(this, "tokenizer");
23353
23365
  __publicField(this, "inlineQueue");
23354
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
23355
- let t = { other: m, block: I.normal, inline: M.normal };
23356
- this.options.pedantic ? (t.block = I.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = I.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
23366
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
23367
+ let t = { other: m, block: C.normal, inline: M.normal };
23368
+ this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
23357
23369
  }
23358
23370
  static get rules() {
23359
- return { block: I, inline: M };
23371
+ return { block: C, inline: M };
23360
23372
  }
23361
23373
  static lex(e, t) {
23362
23374
  return new l(t).lex(e);
@@ -23436,9 +23448,9 @@ var b = class l {
23436
23448
  }
23437
23449
  let i = e;
23438
23450
  if (this.options.extensions?.startBlock) {
23439
- let s = 1 / 0, o = e.slice(1), a;
23440
- this.options.extensions.startBlock.forEach((u) => {
23441
- a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
23451
+ let s = 1 / 0, a = e.slice(1), o;
23452
+ this.options.extensions.startBlock.forEach((p) => {
23453
+ o = p.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
23442
23454
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
23443
23455
  }
23444
23456
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -23478,11 +23490,12 @@ var b = class l {
23478
23490
  if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
23479
23491
  }
23480
23492
  for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
23481
- for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
23493
+ let i;
23494
+ for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
23482
23495
  n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
23483
- let i = false, s = "";
23496
+ let s = false, a = "";
23484
23497
  for (; e; ) {
23485
- i || (s = ""), i = false;
23498
+ s || (a = ""), s = false;
23486
23499
  let o;
23487
23500
  if (this.options.extensions?.inline?.some((u) => (o = u.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
23488
23501
  if (o = this.tokenizer.escape(e)) {
@@ -23503,7 +23516,7 @@ var b = class l {
23503
23516
  o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23504
23517
  continue;
23505
23518
  }
23506
- if (o = this.tokenizer.emStrong(e, n, s)) {
23519
+ if (o = this.tokenizer.emStrong(e, n, a)) {
23507
23520
  e = e.substring(o.raw.length), t.push(o);
23508
23521
  continue;
23509
23522
  }
@@ -23527,15 +23540,15 @@ var b = class l {
23527
23540
  e = e.substring(o.raw.length), t.push(o);
23528
23541
  continue;
23529
23542
  }
23530
- let a = e;
23543
+ let p = e;
23531
23544
  if (this.options.extensions?.startInline) {
23532
- let u = 1 / 0, p = e.slice(1), c;
23533
- this.options.extensions.startInline.forEach((f) => {
23534
- c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
23535
- }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
23545
+ let u = 1 / 0, c = e.slice(1), g;
23546
+ this.options.extensions.startInline.forEach((h) => {
23547
+ g = h.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (u = Math.min(u, g));
23548
+ }), u < 1 / 0 && u >= 0 && (p = e.substring(0, u + 1));
23536
23549
  }
23537
- if (o = this.tokenizer.inlineText(a)) {
23538
- e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
23550
+ if (o = this.tokenizer.inlineText(p)) {
23551
+ e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
23539
23552
  let u = t.at(-1);
23540
23553
  u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
23541
23554
  continue;
@@ -23555,7 +23568,7 @@ var P = class {
23555
23568
  constructor(e) {
23556
23569
  __publicField(this, "options");
23557
23570
  __publicField(this, "parser");
23558
- this.options = e || O;
23571
+ this.options = e || T;
23559
23572
  }
23560
23573
  space(e) {
23561
23574
  return "";
@@ -23588,9 +23601,9 @@ ${this.parser.parse(e)}</blockquote>
23588
23601
  }
23589
23602
  list(e) {
23590
23603
  let t = e.ordered, n = e.start, r = "";
23591
- for (let o = 0; o < e.items.length; o++) {
23592
- let a = e.items[o];
23593
- r += this.listitem(a);
23604
+ for (let a = 0; a < e.items.length; a++) {
23605
+ let o = e.items[a];
23606
+ r += this.listitem(o);
23594
23607
  }
23595
23608
  let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
23596
23609
  return "<" + i + s + `>
@@ -23621,7 +23634,7 @@ ${this.parser.parse(e)}</blockquote>
23621
23634
  for (let i = 0; i < e.rows.length; i++) {
23622
23635
  let s = e.rows[i];
23623
23636
  n = "";
23624
- for (let o = 0; o < s.length; o++) n += this.tablecell(s[o]);
23637
+ for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
23625
23638
  r += this.tablerow({ text: n });
23626
23639
  }
23627
23640
  return r && (r = `<tbody>${r}</tbody>`), `<table>
@@ -23703,12 +23716,12 @@ var $ = class {
23703
23716
  return "";
23704
23717
  }
23705
23718
  };
23706
- var R = class l2 {
23719
+ var b = class l2 {
23707
23720
  constructor(e) {
23708
23721
  __publicField(this, "options");
23709
23722
  __publicField(this, "renderer");
23710
23723
  __publicField(this, "textRenderer");
23711
- this.options = e || O, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
23724
+ this.options = e || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
23712
23725
  }
23713
23726
  static parse(e, t) {
23714
23727
  return new l2(t).parse(e);
@@ -23721,9 +23734,9 @@ var R = class l2 {
23721
23734
  for (let r = 0; r < e.length; r++) {
23722
23735
  let i = e[r];
23723
23736
  if (this.options.extensions?.renderers?.[i.type]) {
23724
- let o = i, a = this.options.extensions.renderers[o.type].call({ parser: this }, o);
23725
- if (a !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(o.type)) {
23726
- n += a || "";
23737
+ let a = i, o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
23738
+ if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(a.type)) {
23739
+ n += o || "";
23727
23740
  continue;
23728
23741
  }
23729
23742
  }
@@ -23770,16 +23783,16 @@ var R = class l2 {
23770
23783
  continue;
23771
23784
  }
23772
23785
  case "text": {
23773
- let o = s, a = this.renderer.text(o);
23774
- for (; r + 1 < e.length && e[r + 1].type === "text"; ) o = e[++r], a += `
23775
- ` + this.renderer.text(o);
23776
- t ? n += this.renderer.paragraph({ type: "paragraph", raw: a, text: a, tokens: [{ type: "text", raw: a, text: a, escaped: true }] }) : n += a;
23786
+ let a = s, o = this.renderer.text(a);
23787
+ for (; r + 1 < e.length && e[r + 1].type === "text"; ) a = e[++r], o += `
23788
+ ` + this.renderer.text(a);
23789
+ t ? n += this.renderer.paragraph({ type: "paragraph", raw: o, text: o, tokens: [{ type: "text", raw: o, text: o, escaped: true }] }) : n += o;
23777
23790
  continue;
23778
23791
  }
23779
23792
  default: {
23780
- let o = 'Token with "' + s.type + '" type was not found.';
23781
- if (this.options.silent) return console.error(o), "";
23782
- throw new Error(o);
23793
+ let a = 'Token with "' + s.type + '" type was not found.';
23794
+ if (this.options.silent) return console.error(a), "";
23795
+ throw new Error(a);
23783
23796
  }
23784
23797
  }
23785
23798
  }
@@ -23790,9 +23803,9 @@ var R = class l2 {
23790
23803
  for (let r = 0; r < e.length; r++) {
23791
23804
  let i = e[r];
23792
23805
  if (this.options.extensions?.renderers?.[i.type]) {
23793
- let o = this.options.extensions.renderers[i.type].call({ parser: this }, i);
23794
- if (o !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
23795
- n += o || "";
23806
+ let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
23807
+ if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
23808
+ n += a || "";
23796
23809
  continue;
23797
23810
  }
23798
23811
  }
@@ -23839,9 +23852,9 @@ var R = class l2 {
23839
23852
  break;
23840
23853
  }
23841
23854
  default: {
23842
- let o = 'Token with "' + s.type + '" type was not found.';
23843
- if (this.options.silent) return console.error(o), "";
23844
- throw new Error(o);
23855
+ let a = 'Token with "' + s.type + '" type was not found.';
23856
+ if (this.options.silent) return console.error(a), "";
23857
+ throw new Error(a);
23845
23858
  }
23846
23859
  }
23847
23860
  }
@@ -23852,7 +23865,7 @@ var S = (_a = class {
23852
23865
  constructor(e) {
23853
23866
  __publicField(this, "options");
23854
23867
  __publicField(this, "block");
23855
- this.options = e || O;
23868
+ this.options = e || T;
23856
23869
  }
23857
23870
  preprocess(e) {
23858
23871
  return e;
@@ -23867,10 +23880,10 @@ var S = (_a = class {
23867
23880
  return e;
23868
23881
  }
23869
23882
  provideLexer() {
23870
- return this.block ? b.lex : b.lexInline;
23883
+ return this.block ? x.lex : x.lexInline;
23871
23884
  }
23872
23885
  provideParser() {
23873
- return this.block ? R.parse : R.parseInline;
23886
+ return this.block ? b.parse : b.parseInline;
23874
23887
  }
23875
23888
  }, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
23876
23889
  var B = class {
@@ -23879,10 +23892,10 @@ var B = class {
23879
23892
  __publicField(this, "options", this.setOptions);
23880
23893
  __publicField(this, "parse", this.parseMarkdown(true));
23881
23894
  __publicField(this, "parseInline", this.parseMarkdown(false));
23882
- __publicField(this, "Parser", R);
23895
+ __publicField(this, "Parser", b);
23883
23896
  __publicField(this, "Renderer", P);
23884
23897
  __publicField(this, "TextRenderer", $);
23885
- __publicField(this, "Lexer", b);
23898
+ __publicField(this, "Lexer", x);
23886
23899
  __publicField(this, "Tokenizer", y);
23887
23900
  __publicField(this, "Hooks", S);
23888
23901
  this.use(...e);
@@ -23893,7 +23906,7 @@ var B = class {
23893
23906
  case "table": {
23894
23907
  let i = r;
23895
23908
  for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
23896
- for (let s of i.rows) for (let o of s) n = n.concat(this.walkTokens(o.tokens, t));
23909
+ for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
23897
23910
  break;
23898
23911
  }
23899
23912
  case "list": {
@@ -23904,8 +23917,8 @@ var B = class {
23904
23917
  default: {
23905
23918
  let i = r;
23906
23919
  this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
23907
- let o = i[s].flat(1 / 0);
23908
- n = n.concat(this.walkTokens(o, t));
23920
+ let a = i[s].flat(1 / 0);
23921
+ n = n.concat(this.walkTokens(a, t));
23909
23922
  }) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
23910
23923
  }
23911
23924
  }
@@ -23919,9 +23932,9 @@ var B = class {
23919
23932
  if (!i.name) throw new Error("extension name required");
23920
23933
  if ("renderer" in i) {
23921
23934
  let s = t.renderers[i.name];
23922
- s ? t.renderers[i.name] = function(...o) {
23923
- let a = i.renderer.apply(this, o);
23924
- return a === false && (a = s.apply(this, o)), a;
23935
+ s ? t.renderers[i.name] = function(...a) {
23936
+ let o = i.renderer.apply(this, a);
23937
+ return o === false && (o = s.apply(this, a)), o;
23925
23938
  } : t.renderers[i.name] = i.renderer;
23926
23939
  }
23927
23940
  if ("tokenizer" in i) {
@@ -23935,10 +23948,10 @@ var B = class {
23935
23948
  for (let s in n.renderer) {
23936
23949
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
23937
23950
  if (["options", "parser"].includes(s)) continue;
23938
- let o = s, a = n.renderer[o], u = i[o];
23939
- i[o] = (...p) => {
23940
- let c = a.apply(i, p);
23941
- return c === false && (c = u.apply(i, p)), c || "";
23951
+ let a = s, o = n.renderer[a], p = i[a];
23952
+ i[a] = (...u) => {
23953
+ let c = o.apply(i, u);
23954
+ return c === false && (c = p.apply(i, u)), c || "";
23942
23955
  };
23943
23956
  }
23944
23957
  r.renderer = i;
@@ -23948,10 +23961,10 @@ var B = class {
23948
23961
  for (let s in n.tokenizer) {
23949
23962
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
23950
23963
  if (["options", "rules", "lexer"].includes(s)) continue;
23951
- let o = s, a = n.tokenizer[o], u = i[o];
23952
- i[o] = (...p) => {
23953
- let c = a.apply(i, p);
23954
- return c === false && (c = u.apply(i, p)), c;
23964
+ let a = s, o = n.tokenizer[a], p = i[a];
23965
+ i[a] = (...u) => {
23966
+ let c = o.apply(i, u);
23967
+ return c === false && (c = p.apply(i, u)), c;
23955
23968
  };
23956
23969
  }
23957
23970
  r.tokenizer = i;
@@ -23961,23 +23974,30 @@ var B = class {
23961
23974
  for (let s in n.hooks) {
23962
23975
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
23963
23976
  if (["options", "block"].includes(s)) continue;
23964
- let o = s, a = n.hooks[o], u = i[o];
23965
- S.passThroughHooks.has(s) ? i[o] = (p) => {
23966
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
23967
- let c = a.call(i, p);
23968
- return u.call(i, c);
23969
- } : i[o] = (...p) => {
23970
- let c = a.apply(i, p);
23971
- return c === false && (c = u.apply(i, p)), c;
23977
+ let a = s, o = n.hooks[a], p = i[a];
23978
+ S.passThroughHooks.has(s) ? i[a] = (u) => {
23979
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
23980
+ let g = await o.call(i, u);
23981
+ return p.call(i, g);
23982
+ })();
23983
+ let c = o.call(i, u);
23984
+ return p.call(i, c);
23985
+ } : i[a] = (...u) => {
23986
+ if (this.defaults.async) return (async () => {
23987
+ let g = await o.apply(i, u);
23988
+ return g === false && (g = await p.apply(i, u)), g;
23989
+ })();
23990
+ let c = o.apply(i, u);
23991
+ return c === false && (c = p.apply(i, u)), c;
23972
23992
  };
23973
23993
  }
23974
23994
  r.hooks = i;
23975
23995
  }
23976
23996
  if (n.walkTokens) {
23977
23997
  let i = this.defaults.walkTokens, s = n.walkTokens;
23978
- r.walkTokens = function(o) {
23979
- let a = [];
23980
- return a.push(s.call(this, o)), i && (a = a.concat(i.call(this, o))), a;
23998
+ r.walkTokens = function(a) {
23999
+ let o = [];
24000
+ return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
23981
24001
  };
23982
24002
  }
23983
24003
  this.defaults = { ...this.defaults, ...r };
@@ -23987,28 +24007,31 @@ var B = class {
23987
24007
  return this.defaults = { ...this.defaults, ...e }, this;
23988
24008
  }
23989
24009
  lexer(e, t) {
23990
- return b.lex(e, t ?? this.defaults);
24010
+ return x.lex(e, t ?? this.defaults);
23991
24011
  }
23992
24012
  parser(e, t) {
23993
- return R.parse(e, t ?? this.defaults);
24013
+ return b.parse(e, t ?? this.defaults);
23994
24014
  }
23995
24015
  parseMarkdown(e) {
23996
24016
  return (n, r) => {
23997
- let i = { ...r }, s = { ...this.defaults, ...i }, o = this.onError(!!s.silent, !!s.async);
23998
- if (this.defaults.async === true && i.async === false) return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
23999
- if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
24000
- if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24001
- s.hooks && (s.hooks.options = s, s.hooks.block = e);
24002
- let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
24003
- if (s.async) return Promise.resolve(s.hooks ? s.hooks.preprocess(n) : n).then((p) => a(p, s)).then((p) => s.hooks ? s.hooks.processAllTokens(p) : p).then((p) => s.walkTokens ? Promise.all(this.walkTokens(p, s.walkTokens)).then(() => p) : p).then((p) => u(p, s)).then((p) => s.hooks ? s.hooks.postprocess(p) : p).catch(o);
24017
+ let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
24018
+ if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
24019
+ if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
24020
+ if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
24021
+ if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
24022
+ let o = s.hooks ? await s.hooks.preprocess(n) : n, u = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(u) : u;
24023
+ s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
24024
+ let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
24025
+ return s.hooks ? await s.hooks.postprocess(h) : h;
24026
+ })().catch(a);
24004
24027
  try {
24005
24028
  s.hooks && (n = s.hooks.preprocess(n));
24006
- let p = a(n, s);
24029
+ let p = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
24007
24030
  s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
24008
- let c = u(p, s);
24031
+ let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
24009
24032
  return s.hooks && (c = s.hooks.postprocess(c)), c;
24010
- } catch (p) {
24011
- return o(p);
24033
+ } catch (o) {
24034
+ return a(o);
24012
24035
  }
24013
24036
  };
24014
24037
  }
@@ -24025,38 +24048,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
24025
24048
  }
24026
24049
  };
24027
24050
  var _ = new B();
24028
- function d(l3, e) {
24051
+ function k(l3, e) {
24029
24052
  return _.parse(l3, e);
24030
24053
  }
24031
- d.options = d.setOptions = function(l3) {
24032
- return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
24054
+ k.options = k.setOptions = function(l3) {
24055
+ return _.setOptions(l3), k.defaults = _.defaults, G(k.defaults), k;
24033
24056
  };
24034
- d.getDefaults = L;
24035
- d.defaults = O;
24036
- d.use = function(...l3) {
24037
- return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
24057
+ k.getDefaults = L;
24058
+ k.defaults = T;
24059
+ k.use = function(...l3) {
24060
+ return _.use(...l3), k.defaults = _.defaults, G(k.defaults), k;
24038
24061
  };
24039
- d.walkTokens = function(l3, e) {
24062
+ k.walkTokens = function(l3, e) {
24040
24063
  return _.walkTokens(l3, e);
24041
24064
  };
24042
- d.parseInline = _.parseInline;
24043
- d.Parser = R;
24044
- d.parser = R.parse;
24045
- d.Renderer = P;
24046
- d.TextRenderer = $;
24047
- d.Lexer = b;
24048
- d.lexer = b.lex;
24049
- d.Tokenizer = y;
24050
- d.Hooks = S;
24051
- d.parse = d;
24052
- d.options;
24053
- d.setOptions;
24054
- d.use;
24055
- d.walkTokens;
24056
- d.parseInline;
24057
- R.parse;
24058
- b.lex;
24059
- d.use({
24065
+ k.parseInline = _.parseInline;
24066
+ k.Parser = b;
24067
+ k.parser = b.parse;
24068
+ k.Renderer = P;
24069
+ k.TextRenderer = $;
24070
+ k.Lexer = x;
24071
+ k.lexer = x.lex;
24072
+ k.Tokenizer = y;
24073
+ k.Hooks = S;
24074
+ k.parse = k;
24075
+ k.options;
24076
+ k.setOptions;
24077
+ k.use;
24078
+ k.walkTokens;
24079
+ k.parseInline;
24080
+ b.parse;
24081
+ x.lex;
24082
+ k.use({
24060
24083
  breaks: false,
24061
24084
  // Use proper paragraphs, not <br> tags
24062
24085
  gfm: true
@@ -24067,7 +24090,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
24067
24090
  return createDocFromHTML(html, schema, options);
24068
24091
  }
24069
24092
  function convertMarkdownToHTML(markdown) {
24070
- let html = d.parse(markdown, { async: false });
24093
+ let html = k.parse(markdown, { async: false });
24071
24094
  return html.replace(/<\/p>\n<ul>/g, "</p>\n<p>&nbsp;</p>\n<ul>").replace(/<\/p>\n<ol>/g, "</p>\n<p>&nbsp;</p>\n<ol>").replace(/<\/ul>\n<h/g, "</ul>\n<p>&nbsp;</p>\n<h").replace(/<\/ol>\n<h/g, "</ol>\n<p>&nbsp;</p>\n<h");
24072
24095
  }
24073
24096
  function processContent({ content, type: type2, schema }) {
@@ -24246,7 +24269,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
24246
24269
  };
24247
24270
  const getNewListId = (editor, grouping = "definitions") => {
24248
24271
  const defs = editor.converter.numbering[grouping] || {};
24249
- const intKeys = Object.keys(defs).map((k) => Number(k)).filter((n) => Number.isInteger(n));
24272
+ const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
24250
24273
  const max2 = intKeys.length ? Math.max(...intKeys) : 0;
24251
24274
  return max2 + 1;
24252
24275
  };
@@ -28822,8 +28845,8 @@ const translateImageNode = (params) => {
28822
28845
  const leftMargin = tableCell.attrs.cellMargins?.left || 8;
28823
28846
  const rightMargin = tableCell.attrs.cellMargins?.right || 8;
28824
28847
  const maxWidthEmu = pixelsToEmu(colwidthSum - (leftMargin + rightMargin));
28825
- const { width: w2, height: h2 } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28826
- if (w2 && h2) size = { w: w2, h: h2 };
28848
+ const { width: w2, height: h } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28849
+ if (w2 && h) size = { w: w2, h };
28827
28850
  }
28828
28851
  if (imageId) {
28829
28852
  const docx = params.converter?.convertedXml || {};
@@ -30366,9 +30389,9 @@ var hasRequiredHe;
30366
30389
  function requireHe() {
30367
30390
  if (hasRequiredHe) return he$2.exports;
30368
30391
  hasRequiredHe = 1;
30369
- (function(module, exports) {
30392
+ (function(module, exports$1) {
30370
30393
  (function(root) {
30371
- var freeExports = exports;
30394
+ var freeExports = exports$1;
30372
30395
  var freeModule = module && module.exports == freeExports && module;
30373
30396
  var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal;
30374
30397
  if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
@@ -35651,6 +35674,12 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
35651
35674
  if (!newRelationships?.length) return existingRelationships;
35652
35675
  let largestId = getLargestRelationshipId(existingRelationships);
35653
35676
  const seenIds = new Set(existingRelationships.map((rel) => rel?.attributes?.Id).filter(Boolean));
35677
+ for (const rel of newRelationships) {
35678
+ const id = rel?.attributes?.Id;
35679
+ if (!id || seenIds.has(id)) continue;
35680
+ const numeric = Number(String(id).replace(REL_ID_NUMERIC_PATTERN, ""));
35681
+ if (Number.isFinite(numeric) && numeric > largestId) largestId = numeric;
35682
+ }
35654
35683
  const additions = [];
35655
35684
  newRelationships.forEach((rel) => {
35656
35685
  if (!rel?.attributes) return;
@@ -35664,7 +35693,15 @@ const mergeRelationshipElements = (existingRelationships = [], newRelationships
35664
35693
  const hasSeenId = currentId && seenIds.has(currentId);
35665
35694
  if (!isNewHyperlink && !isNewHeadFoot && existingTarget) return;
35666
35695
  if (!currentId || hasSeenId) {
35667
- attributes.Id = `rId${++largestId}`;
35696
+ let candidate = Math.max(largestId, 1);
35697
+ while (seenIds.has(`rId${candidate}`)) {
35698
+ candidate += 1;
35699
+ }
35700
+ attributes.Id = `rId${candidate}`;
35701
+ largestId = candidate;
35702
+ } else {
35703
+ const numeric = Number(String(currentId).replace(REL_ID_NUMERIC_PATTERN, ""));
35704
+ if (Number.isFinite(numeric) && numeric > largestId) largestId = numeric;
35668
35705
  }
35669
35706
  seenIds.add(attributes.Id);
35670
35707
  additions.push(rel);
@@ -35879,7 +35916,7 @@ const _SuperConverter = class _SuperConverter {
35879
35916
  static getStoredSuperdocVersion(docx) {
35880
35917
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35881
35918
  }
35882
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.29.0-next.9") {
35919
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.29.1") {
35883
35920
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35884
35921
  }
35885
35922
  /**
@@ -36273,7 +36310,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
36273
36310
  };
36274
36311
  exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36275
36312
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36276
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36313
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36277
36314
  const newDocRels = [];
36278
36315
  Object.entries(this.headers).forEach(([id, header], index2) => {
36279
36316
  const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
@@ -36314,7 +36351,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36314
36351
  }
36315
36352
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36316
36353
  if (params.relationships.length) {
36317
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36354
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36318
36355
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36319
36356
  declaration: this.initialJSON?.declaration,
36320
36357
  elements: [
@@ -36368,7 +36405,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36368
36405
  }
36369
36406
  this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
36370
36407
  if (params.relationships.length) {
36371
- const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x) => x.name === "Relationships")?.elements || [];
36408
+ const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
36372
36409
  this.convertedXml[`word/_rels/${fileName}.rels`] = {
36373
36410
  declaration: this.initialJSON?.declaration,
36374
36411
  elements: [
@@ -36387,7 +36424,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36387
36424
  };
36388
36425
  exportProcessNewRelationships_fn = function(rels = []) {
36389
36426
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36390
- const relationships = relsData.elements.find((x) => x.name === "Relationships");
36427
+ const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
36391
36428
  relationships.elements = mergeRelationshipElements(relationships.elements, rels);
36392
36429
  };
36393
36430
  exportProcessMediaFiles_fn = async function(media = {}) {