superdoc 0.36.0 → 0.36.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.
- package/dist/chunks/{PdfViewer-Cw6hrjmI.es.js → PdfViewer-0ljQHJ46.es.js} +2 -2
- package/dist/chunks/{PdfViewer-BVjCijQM.cjs → PdfViewer-S16P3o_7.cjs} +2 -2
- package/dist/chunks/{eventemitter3-DmHNHvFX.cjs → eventemitter3-Cq0SNNyY.cjs} +1 -1
- package/dist/chunks/{eventemitter3-hYlnBzSA.es.js → eventemitter3-Dggxln8t.es.js} +1 -1
- package/dist/chunks/{index-C6pGFRDv-NmZ85_ZC.es.js → index-CzkLnJsZ-BTVdUMdV.es.js} +1 -1
- package/dist/chunks/{index-C6pGFRDv-DPPxKqzz.cjs → index-CzkLnJsZ-BgswlBSf.cjs} +1 -1
- package/dist/chunks/{index-C2I7v8Mz.cjs → index-D3qTp4tj.cjs} +20 -15
- package/dist/chunks/{index-DxVLb2GI.es.js → index-DzR1O6RL.es.js} +20 -15
- package/dist/chunks/{jszip-jKrsZoMS.es.js → jszip-CY0q2Bnp.es.js} +1 -1
- package/dist/chunks/{jszip-BP2FTbpi.cjs → jszip-F-dEByfH.cjs} +1 -1
- package/dist/chunks/{super-editor.es-DU7fPHu1.cjs → super-editor.es-DVKZ65HN.cjs} +2129 -1653
- package/dist/chunks/{super-editor.es-wvWKJiSQ.es.js → super-editor.es-D_ayGwNx.es.js} +2082 -1606
- package/dist/chunks/{vue-Cwv-wUpm.cjs → vue-dM1GiXsI.cjs} +2488 -2423
- package/dist/chunks/{vue-CKmzTNVs.es.js → vue-siHYWVb6.es.js} +2488 -2423
- package/dist/chunks/xml-js-DY0nfayl.cjs +3 -0
- package/dist/chunks/xml-js-lhjyYB16.es.js +2 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-B_MV8Ifd.js → converter-C_m22GDt.js} +311 -292
- package/dist/super-editor/chunks/{docx-zipper-BErVQPhm.js → docx-zipper-BMFQCW01.js} +1 -1
- package/dist/super-editor/chunks/{editor-DJdDJYe1.js → editor-DOp2dsXA.js} +1413 -956
- package/dist/super-editor/chunks/{index-C6pGFRDv.js → index-CzkLnJsZ.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-C3z7Pv8Z.js → toolbar-VEU6sWSR.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +2574 -2035
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-BSDu25I7.cjs +0 -3
- package/dist/chunks/xml-js-CBrRls0f.es.js +0 -2
|
@@ -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
|
|
416
|
+
let x2 = a.length;
|
|
417
417
|
let y2 = b2.length;
|
|
418
|
-
for (let i = 0, len = Math.min(
|
|
418
|
+
for (let i = 0, len = Math.min(x2, y2); i < len; ++i) {
|
|
419
419
|
if (a[i] !== b2[i]) {
|
|
420
|
-
|
|
420
|
+
x2 = a[i];
|
|
421
421
|
y2 = b2[i];
|
|
422
422
|
break;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
426
|
-
if (y2 <
|
|
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) {
|
|
@@ -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
|
|
675
|
+
let x2 = thisEnd - thisStart;
|
|
676
676
|
let y2 = end - start;
|
|
677
|
-
const len = Math.min(
|
|
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
|
-
|
|
682
|
+
x2 = thisCopy[i];
|
|
683
683
|
y2 = targetCopy[i];
|
|
684
684
|
break;
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
if (
|
|
688
|
-
if (y2 <
|
|
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(
|
|
1779
|
-
return
|
|
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
|
|
1788
|
-
var ReflectApply =
|
|
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 (
|
|
1793
|
-
ReflectOwnKeys =
|
|
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(
|
|
2184
|
-
return
|
|
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 = {};
|
|
@@ -2762,17 +2762,17 @@ function requireDist() {
|
|
|
2762
2762
|
);
|
|
2763
2763
|
}
|
|
2764
2764
|
if (a === b2) return 0;
|
|
2765
|
-
let
|
|
2765
|
+
let x2 = a.length;
|
|
2766
2766
|
let y2 = b2.length;
|
|
2767
|
-
for (let i2 = 0, len2 = Math.min(
|
|
2767
|
+
for (let i2 = 0, len2 = Math.min(x2, y2); i2 < len2; ++i2) {
|
|
2768
2768
|
if (a[i2] !== b2[i2]) {
|
|
2769
|
-
|
|
2769
|
+
x2 = a[i2];
|
|
2770
2770
|
y2 = b2[i2];
|
|
2771
2771
|
break;
|
|
2772
2772
|
}
|
|
2773
2773
|
}
|
|
2774
|
-
if (
|
|
2775
|
-
if (y2 <
|
|
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) {
|
|
@@ -3021,20 +3021,20 @@ function requireDist() {
|
|
|
3021
3021
|
thisStart >>>= 0;
|
|
3022
3022
|
thisEnd >>>= 0;
|
|
3023
3023
|
if (this === target) return 0;
|
|
3024
|
-
let
|
|
3024
|
+
let x2 = thisEnd - thisStart;
|
|
3025
3025
|
let y2 = end - start;
|
|
3026
|
-
const len2 = Math.min(
|
|
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
|
-
|
|
3031
|
+
x2 = thisCopy[i2];
|
|
3032
3032
|
y2 = targetCopy[i2];
|
|
3033
3033
|
break;
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
|
-
if (
|
|
3037
|
-
if (y2 <
|
|
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) {
|
|
@@ -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(
|
|
4610
|
-
return reflectGetProto(
|
|
4611
|
-
} : originalGetProto ? function getProto2(
|
|
4612
|
-
if (!
|
|
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(
|
|
4616
|
-
} : getDunderProto ? function getProto2(
|
|
4617
|
-
return getDunderProto(
|
|
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
|
|
5286
|
-
if (hasOwnProperty.call(object,
|
|
5285
|
+
for (var k2 in object) {
|
|
5286
|
+
if (hasOwnProperty.call(object, k2)) {
|
|
5287
5287
|
if (receiver == null) {
|
|
5288
|
-
iterator(object[
|
|
5288
|
+
iterator(object[k2], k2, object);
|
|
5289
5289
|
} else {
|
|
5290
|
-
iterator.call(receiver, object[
|
|
5290
|
+
iterator.call(receiver, object[k2], k2, object);
|
|
5291
5291
|
}
|
|
5292
5292
|
}
|
|
5293
5293
|
}
|
|
5294
5294
|
};
|
|
5295
|
-
function isArray(
|
|
5296
|
-
return toStr.call(
|
|
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)) {
|
|
@@ -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(
|
|
5906
|
-
if (
|
|
5907
|
-
if (i >= len) return
|
|
5908
|
-
switch (
|
|
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,14 +5917,14 @@ function requireUtil() {
|
|
|
5917
5917
|
return "[Circular]";
|
|
5918
5918
|
}
|
|
5919
5919
|
default:
|
|
5920
|
-
return
|
|
5920
|
+
return x3;
|
|
5921
5921
|
}
|
|
5922
5922
|
});
|
|
5923
|
-
for (var
|
|
5924
|
-
if (isNull(
|
|
5925
|
-
str += " " +
|
|
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(
|
|
5927
|
+
str += " " + inspect(x2);
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
5930
|
return str;
|
|
@@ -7489,6 +7489,7 @@ 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;
|
|
@@ -7510,6 +7511,7 @@ function requireSafeBuffer() {
|
|
|
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,
|
|
8792
|
+
function indexOf(xs, x2) {
|
|
8791
8793
|
for (var i = 0, l3 = xs.length; i < l3; i++) {
|
|
8792
|
-
if (xs[i] ===
|
|
8794
|
+
if (xs[i] === x2) return i;
|
|
8793
8795
|
}
|
|
8794
8796
|
return -1;
|
|
8795
8797
|
}
|
|
@@ -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
|
|
9252
|
+
var me2 = this;
|
|
9251
9253
|
this._parser.onend = function() {
|
|
9252
|
-
|
|
9254
|
+
me2.emit("end");
|
|
9253
9255
|
};
|
|
9254
9256
|
this._parser.onerror = function(er) {
|
|
9255
|
-
|
|
9256
|
-
|
|
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(
|
|
9262
|
+
Object.defineProperty(me2, "on" + ev, {
|
|
9261
9263
|
get: function() {
|
|
9262
|
-
return
|
|
9264
|
+
return me2._parser["on" + ev];
|
|
9263
9265
|
},
|
|
9264
|
-
set: function(
|
|
9265
|
-
if (!
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
return
|
|
9266
|
+
set: function(h) {
|
|
9267
|
+
if (!h) {
|
|
9268
|
+
me2.removeAllListeners(ev);
|
|
9269
|
+
me2._parser["on" + ev] = h;
|
|
9270
|
+
return h;
|
|
9269
9271
|
}
|
|
9270
|
-
|
|
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
|
|
9303
|
-
if (!
|
|
9304
|
-
|
|
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
|
-
|
|
9309
|
+
me2.emit.apply(me2, args);
|
|
9308
9310
|
};
|
|
9309
9311
|
}
|
|
9310
|
-
return Stream.prototype.on.call(
|
|
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
|
|
9904
|
+
var x2 = {};
|
|
9903
9905
|
for (var i in tag.ns) {
|
|
9904
|
-
|
|
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) {
|
|
@@ -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(
|
|
10962
|
-
return
|
|
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(
|
|
11385
|
-
return
|
|
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(
|
|
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 [
|
|
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(
|
|
15233
|
+
x: pixelsToPolygonUnits(x2),
|
|
15232
15234
|
y: pixelsToPolygonUnits(y2)
|
|
15233
15235
|
}
|
|
15234
15236
|
};
|
|
@@ -22893,7 +22895,7 @@ function posToDOMRect(view, from, to) {
|
|
|
22893
22895
|
const right = Math.max(start.right, end.right);
|
|
22894
22896
|
const width = right - left;
|
|
22895
22897
|
const height = bottom - top;
|
|
22896
|
-
const
|
|
22898
|
+
const x2 = left;
|
|
22897
22899
|
const y2 = top;
|
|
22898
22900
|
const data = {
|
|
22899
22901
|
top,
|
|
@@ -22902,7 +22904,7 @@ function posToDOMRect(view, from, to) {
|
|
|
22902
22904
|
right,
|
|
22903
22905
|
width,
|
|
22904
22906
|
height,
|
|
22905
|
-
x,
|
|
22907
|
+
x: x2,
|
|
22906
22908
|
y: y2
|
|
22907
22909
|
};
|
|
22908
22910
|
return {
|
|
@@ -22991,25 +22993,31 @@ function createDocFromHTML(content, schema, options = {}) {
|
|
|
22991
22993
|
function L() {
|
|
22992
22994
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
22993
22995
|
}
|
|
22994
|
-
var
|
|
22996
|
+
var T = L();
|
|
22995
22997
|
function G(l3) {
|
|
22996
|
-
|
|
22998
|
+
T = l3;
|
|
22997
22999
|
}
|
|
22998
23000
|
var E = { exec: () => null };
|
|
22999
|
-
function
|
|
23001
|
+
function d(l3, e = "") {
|
|
23000
23002
|
let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
|
|
23001
23003
|
let s = typeof i == "string" ? i : i.source;
|
|
23002
23004
|
return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
|
|
23003
23005
|
}, getRegex: () => new RegExp(t, e) };
|
|
23004
23006
|
return n;
|
|
23005
23007
|
}
|
|
23006
|
-
var
|
|
23007
|
-
|
|
23008
|
-
|
|
23008
|
+
var be = (() => {
|
|
23009
|
+
try {
|
|
23010
|
+
return !!new RegExp("(?<=1)(?<!1)");
|
|
23011
|
+
} catch {
|
|
23012
|
+
return false;
|
|
23013
|
+
}
|
|
23014
|
+
})(), 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} *[^
|
|
23015
|
+
]`).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 };
|
|
23016
|
+
var Ve = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ge = (l3) => Ve[l3];
|
|
23009
23017
|
function w(l3, e) {
|
|
23010
23018
|
if (e) {
|
|
23011
|
-
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace,
|
|
23012
|
-
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode,
|
|
23019
|
+
if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ge);
|
|
23020
|
+
} else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ge);
|
|
23013
23021
|
return l3;
|
|
23014
23022
|
}
|
|
23015
23023
|
function J(l3) {
|
|
@@ -23021,10 +23029,10 @@ function J(l3) {
|
|
|
23021
23029
|
return l3;
|
|
23022
23030
|
}
|
|
23023
23031
|
function V(l3, e) {
|
|
23024
|
-
let t = l3.replace(m.findPipe, (i, s,
|
|
23025
|
-
let
|
|
23026
|
-
for (; --
|
|
23027
|
-
return
|
|
23032
|
+
let t = l3.replace(m.findPipe, (i, s, a) => {
|
|
23033
|
+
let o = false, p = s;
|
|
23034
|
+
for (; --p >= 0 && a[p] === "\\"; ) o = !o;
|
|
23035
|
+
return o ? "|" : " |";
|
|
23028
23036
|
}), n = t.split(m.splitPipe), r = 0;
|
|
23029
23037
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
|
|
23030
23038
|
else for (; n.length < e; ) n.push("");
|
|
@@ -23042,7 +23050,7 @@ function z(l3, e, t) {
|
|
|
23042
23050
|
}
|
|
23043
23051
|
return l3.slice(0, n - r);
|
|
23044
23052
|
}
|
|
23045
|
-
function
|
|
23053
|
+
function fe(l3, e) {
|
|
23046
23054
|
if (l3.indexOf(e[1]) === -1) return -1;
|
|
23047
23055
|
let t = 0;
|
|
23048
23056
|
for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
|
|
@@ -23050,13 +23058,13 @@ function ge(l3, e) {
|
|
|
23050
23058
|
else if (l3[n] === e[1] && (t--, t < 0)) return n;
|
|
23051
23059
|
return t > 0 ? -2 : -1;
|
|
23052
23060
|
}
|
|
23053
|
-
function
|
|
23054
|
-
let i = e.href, s = e.title || null,
|
|
23061
|
+
function me(l3, e, t, n, r) {
|
|
23062
|
+
let i = e.href, s = e.title || null, a = l3[1].replace(r.other.outputLinkReplace, "$1");
|
|
23055
23063
|
n.state.inLink = true;
|
|
23056
|
-
let
|
|
23057
|
-
return n.state.inLink = false,
|
|
23064
|
+
let o = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
23065
|
+
return n.state.inLink = false, o;
|
|
23058
23066
|
}
|
|
23059
|
-
function
|
|
23067
|
+
function Ye(l3, e, t) {
|
|
23060
23068
|
let n = l3.match(t.other.indentCodeCompensation);
|
|
23061
23069
|
if (n === null) return e;
|
|
23062
23070
|
let r = n[1];
|
|
@@ -23064,8 +23072,8 @@ function Je(l3, e, t) {
|
|
|
23064
23072
|
`).map((i) => {
|
|
23065
23073
|
let s = i.match(t.other.beginningSpace);
|
|
23066
23074
|
if (s === null) return i;
|
|
23067
|
-
let [
|
|
23068
|
-
return
|
|
23075
|
+
let [a] = s;
|
|
23076
|
+
return a.length >= r.length ? i.slice(r.length) : i;
|
|
23069
23077
|
}).join(`
|
|
23070
23078
|
`);
|
|
23071
23079
|
}
|
|
@@ -23074,7 +23082,7 @@ var y = class {
|
|
|
23074
23082
|
__publicField(this, "options");
|
|
23075
23083
|
__publicField(this, "rules");
|
|
23076
23084
|
__publicField(this, "lexer");
|
|
23077
|
-
this.options = e ||
|
|
23085
|
+
this.options = e || T;
|
|
23078
23086
|
}
|
|
23079
23087
|
space(e) {
|
|
23080
23088
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -23091,7 +23099,7 @@ var y = class {
|
|
|
23091
23099
|
fences(e) {
|
|
23092
23100
|
let t = this.rules.block.fences.exec(e);
|
|
23093
23101
|
if (t) {
|
|
23094
|
-
let n = t[0], r =
|
|
23102
|
+
let n = t[0], r = Ye(n, t[3] || "", this.rules);
|
|
23095
23103
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
23096
23104
|
}
|
|
23097
23105
|
}
|
|
@@ -23118,32 +23126,32 @@ var y = class {
|
|
|
23118
23126
|
`).split(`
|
|
23119
23127
|
`), r = "", i = "", s = [];
|
|
23120
23128
|
for (; n.length > 0; ) {
|
|
23121
|
-
let
|
|
23122
|
-
for (
|
|
23123
|
-
else if (!
|
|
23129
|
+
let a = false, o = [], p;
|
|
23130
|
+
for (p = 0; p < n.length; p++) if (this.rules.other.blockquoteStart.test(n[p])) o.push(n[p]), a = true;
|
|
23131
|
+
else if (!a) o.push(n[p]);
|
|
23124
23132
|
else break;
|
|
23125
|
-
n = n.slice(
|
|
23126
|
-
let
|
|
23127
|
-
`), c =
|
|
23133
|
+
n = n.slice(p);
|
|
23134
|
+
let u = o.join(`
|
|
23135
|
+
`), c = u.replace(this.rules.other.blockquoteSetextReplace, `
|
|
23128
23136
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
23129
23137
|
r = r ? `${r}
|
|
23130
|
-
${
|
|
23138
|
+
${u}` : u, i = i ? `${i}
|
|
23131
23139
|
${c}` : c;
|
|
23132
|
-
let
|
|
23133
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top =
|
|
23134
|
-
let
|
|
23135
|
-
if (
|
|
23136
|
-
if (
|
|
23137
|
-
let
|
|
23140
|
+
let g = this.lexer.state.top;
|
|
23141
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = g, n.length === 0) break;
|
|
23142
|
+
let h = s.at(-1);
|
|
23143
|
+
if (h?.type === "code") break;
|
|
23144
|
+
if (h?.type === "blockquote") {
|
|
23145
|
+
let R = h, f = R.raw + `
|
|
23138
23146
|
` + n.join(`
|
|
23139
|
-
`),
|
|
23140
|
-
s[s.length - 1] =
|
|
23147
|
+
`), O = this.blockquote(f);
|
|
23148
|
+
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;
|
|
23141
23149
|
break;
|
|
23142
|
-
} else if (
|
|
23143
|
-
let
|
|
23150
|
+
} else if (h?.type === "list") {
|
|
23151
|
+
let R = h, f = R.raw + `
|
|
23144
23152
|
` + n.join(`
|
|
23145
|
-
`),
|
|
23146
|
-
s[s.length - 1] =
|
|
23153
|
+
`), O = this.list(f);
|
|
23154
|
+
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(`
|
|
23147
23155
|
`);
|
|
23148
23156
|
continue;
|
|
23149
23157
|
}
|
|
@@ -23156,45 +23164,45 @@ ${c}` : c;
|
|
|
23156
23164
|
if (t) {
|
|
23157
23165
|
let n = t[1].trim(), r = n.length > 1, i = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: false, items: [] };
|
|
23158
23166
|
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
23159
|
-
let s = this.rules.other.listItemRegex(n),
|
|
23167
|
+
let s = this.rules.other.listItemRegex(n), a = false;
|
|
23160
23168
|
for (; e; ) {
|
|
23161
|
-
let
|
|
23169
|
+
let p = false, u = "", c = "";
|
|
23162
23170
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
23163
|
-
|
|
23164
|
-
let
|
|
23165
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)),
|
|
23166
|
-
`, 1)[0],
|
|
23167
|
-
if (this.options.pedantic ? (
|
|
23168
|
-
`, e = e.substring(
|
|
23169
|
-
let H = this.rules.other.nextBulletRegex(
|
|
23171
|
+
u = t[0], e = e.substring(u.length);
|
|
23172
|
+
let g = t[2].split(`
|
|
23173
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
|
|
23174
|
+
`, 1)[0], R = !g.trim(), f = 0;
|
|
23175
|
+
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 + `
|
|
23176
|
+
`, e = e.substring(h.length + 1), p = true), !p) {
|
|
23177
|
+
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);
|
|
23170
23178
|
for (; e; ) {
|
|
23171
23179
|
let Z = e.split(`
|
|
23172
23180
|
`, 1)[0], A;
|
|
23173
|
-
if (
|
|
23174
|
-
if (A.search(this.rules.other.nonSpaceChar) >=
|
|
23175
|
-
` + A.slice(
|
|
23181
|
+
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;
|
|
23182
|
+
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
23183
|
+
` + A.slice(f);
|
|
23176
23184
|
else {
|
|
23177
|
-
if (
|
|
23185
|
+
if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
|
|
23178
23186
|
c += `
|
|
23179
|
-
` +
|
|
23187
|
+
` + h;
|
|
23180
23188
|
}
|
|
23181
|
-
!
|
|
23182
|
-
`, e = e.substring(Z.length + 1),
|
|
23189
|
+
!R && !h.trim() && (R = true), u += Z + `
|
|
23190
|
+
`, e = e.substring(Z.length + 1), g = A.slice(f);
|
|
23183
23191
|
}
|
|
23184
23192
|
}
|
|
23185
|
-
i.loose || (
|
|
23186
|
-
let
|
|
23187
|
-
this.options.gfm && (
|
|
23193
|
+
i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(u) && (a = true));
|
|
23194
|
+
let O = null, Y;
|
|
23195
|
+
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;
|
|
23188
23196
|
}
|
|
23189
|
-
let
|
|
23190
|
-
if (
|
|
23197
|
+
let o = i.items.at(-1);
|
|
23198
|
+
if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
|
|
23191
23199
|
else return;
|
|
23192
23200
|
i.raw = i.raw.trimEnd();
|
|
23193
|
-
for (let
|
|
23194
|
-
let
|
|
23201
|
+
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) {
|
|
23202
|
+
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));
|
|
23195
23203
|
i.loose = c;
|
|
23196
23204
|
}
|
|
23197
|
-
if (i.loose) for (let
|
|
23205
|
+
if (i.loose) for (let p = 0; p < i.items.length; p++) i.items[p].loose = true;
|
|
23198
23206
|
return i;
|
|
23199
23207
|
}
|
|
23200
23208
|
}
|
|
@@ -23215,9 +23223,9 @@ ${c}` : c;
|
|
|
23215
23223
|
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(`
|
|
23216
23224
|
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
23217
23225
|
if (n.length === r.length) {
|
|
23218
|
-
for (let
|
|
23219
|
-
for (let
|
|
23220
|
-
for (let
|
|
23226
|
+
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);
|
|
23227
|
+
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] });
|
|
23228
|
+
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] })));
|
|
23221
23229
|
return s;
|
|
23222
23230
|
}
|
|
23223
23231
|
}
|
|
@@ -23254,11 +23262,11 @@ ${c}` : c;
|
|
|
23254
23262
|
let s = z(n.slice(0, -1), "\\");
|
|
23255
23263
|
if ((n.length - s.length) % 2 === 0) return;
|
|
23256
23264
|
} else {
|
|
23257
|
-
let s =
|
|
23265
|
+
let s = fe(t[2], "()");
|
|
23258
23266
|
if (s === -2) return;
|
|
23259
23267
|
if (s > -1) {
|
|
23260
|
-
let
|
|
23261
|
-
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0,
|
|
23268
|
+
let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
23269
|
+
t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
23262
23270
|
}
|
|
23263
23271
|
}
|
|
23264
23272
|
let r = t[2], i = "";
|
|
@@ -23266,7 +23274,7 @@ ${c}` : c;
|
|
|
23266
23274
|
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
23267
23275
|
s && (r = s[1], i = s[3]);
|
|
23268
23276
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
23269
|
-
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)),
|
|
23277
|
+
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);
|
|
23270
23278
|
}
|
|
23271
23279
|
}
|
|
23272
23280
|
reflink(e, t) {
|
|
@@ -23277,32 +23285,32 @@ ${c}` : c;
|
|
|
23277
23285
|
let s = n[0].charAt(0);
|
|
23278
23286
|
return { type: "text", raw: s, text: s };
|
|
23279
23287
|
}
|
|
23280
|
-
return
|
|
23288
|
+
return me(n, i, n[0], this.lexer, this.rules);
|
|
23281
23289
|
}
|
|
23282
23290
|
}
|
|
23283
23291
|
emStrong(e, t, n = "") {
|
|
23284
23292
|
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
23285
23293
|
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
23286
23294
|
if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
23287
|
-
let s = [...r[0]].length - 1,
|
|
23295
|
+
let s = [...r[0]].length - 1, a, o, p = s, u = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
23288
23296
|
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
|
|
23289
|
-
if (
|
|
23290
|
-
if (
|
|
23291
|
-
|
|
23297
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
23298
|
+
if (o = [...a].length, r[3] || r[4]) {
|
|
23299
|
+
p += o;
|
|
23292
23300
|
continue;
|
|
23293
|
-
} else if ((r[5] || r[6]) && s % 3 && !((s +
|
|
23294
|
-
|
|
23301
|
+
} else if ((r[5] || r[6]) && s % 3 && !((s + o) % 3)) {
|
|
23302
|
+
u += o;
|
|
23295
23303
|
continue;
|
|
23296
23304
|
}
|
|
23297
|
-
if (
|
|
23298
|
-
|
|
23299
|
-
let
|
|
23300
|
-
if (Math.min(s,
|
|
23301
|
-
let
|
|
23302
|
-
return { type: "em", raw:
|
|
23305
|
+
if (p -= o, p > 0) continue;
|
|
23306
|
+
o = Math.min(o, o + p + u);
|
|
23307
|
+
let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + o);
|
|
23308
|
+
if (Math.min(s, o) % 2) {
|
|
23309
|
+
let f = h.slice(1, -1);
|
|
23310
|
+
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
23303
23311
|
}
|
|
23304
|
-
let
|
|
23305
|
-
return { type: "strong", raw:
|
|
23312
|
+
let R = h.slice(2, -2);
|
|
23313
|
+
return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
|
|
23306
23314
|
}
|
|
23307
23315
|
}
|
|
23308
23316
|
}
|
|
@@ -23351,19 +23359,19 @@ ${c}` : c;
|
|
|
23351
23359
|
}
|
|
23352
23360
|
}
|
|
23353
23361
|
};
|
|
23354
|
-
var
|
|
23362
|
+
var x = class l {
|
|
23355
23363
|
constructor(e) {
|
|
23356
23364
|
__publicField(this, "tokens");
|
|
23357
23365
|
__publicField(this, "options");
|
|
23358
23366
|
__publicField(this, "state");
|
|
23359
23367
|
__publicField(this, "tokenizer");
|
|
23360
23368
|
__publicField(this, "inlineQueue");
|
|
23361
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
23362
|
-
let t = { other: m, block:
|
|
23363
|
-
this.options.pedantic ? (t.block =
|
|
23369
|
+
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 };
|
|
23370
|
+
let t = { other: m, block: C.normal, inline: M.normal };
|
|
23371
|
+
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;
|
|
23364
23372
|
}
|
|
23365
23373
|
static get rules() {
|
|
23366
|
-
return { block:
|
|
23374
|
+
return { block: C, inline: M };
|
|
23367
23375
|
}
|
|
23368
23376
|
static lex(e, t) {
|
|
23369
23377
|
return new l(t).lex(e);
|
|
@@ -23443,9 +23451,9 @@ var b = class l {
|
|
|
23443
23451
|
}
|
|
23444
23452
|
let i = e;
|
|
23445
23453
|
if (this.options.extensions?.startBlock) {
|
|
23446
|
-
let s = 1 / 0,
|
|
23447
|
-
this.options.extensions.startBlock.forEach((
|
|
23448
|
-
|
|
23454
|
+
let s = 1 / 0, a = e.slice(1), o;
|
|
23455
|
+
this.options.extensions.startBlock.forEach((p) => {
|
|
23456
|
+
o = p.call({ lexer: this }, a), typeof o == "number" && o >= 0 && (s = Math.min(s, o));
|
|
23449
23457
|
}), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
|
|
23450
23458
|
}
|
|
23451
23459
|
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
@@ -23485,11 +23493,12 @@ var b = class l {
|
|
|
23485
23493
|
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));
|
|
23486
23494
|
}
|
|
23487
23495
|
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
23488
|
-
|
|
23496
|
+
let i;
|
|
23497
|
+
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);
|
|
23489
23498
|
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
23490
|
-
let
|
|
23499
|
+
let s = false, a = "";
|
|
23491
23500
|
for (; e; ) {
|
|
23492
|
-
|
|
23501
|
+
s || (a = ""), s = false;
|
|
23493
23502
|
let o;
|
|
23494
23503
|
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;
|
|
23495
23504
|
if (o = this.tokenizer.escape(e)) {
|
|
@@ -23510,7 +23519,7 @@ var b = class l {
|
|
|
23510
23519
|
o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
|
|
23511
23520
|
continue;
|
|
23512
23521
|
}
|
|
23513
|
-
if (o = this.tokenizer.emStrong(e, n,
|
|
23522
|
+
if (o = this.tokenizer.emStrong(e, n, a)) {
|
|
23514
23523
|
e = e.substring(o.raw.length), t.push(o);
|
|
23515
23524
|
continue;
|
|
23516
23525
|
}
|
|
@@ -23534,15 +23543,15 @@ var b = class l {
|
|
|
23534
23543
|
e = e.substring(o.raw.length), t.push(o);
|
|
23535
23544
|
continue;
|
|
23536
23545
|
}
|
|
23537
|
-
let
|
|
23546
|
+
let p = e;
|
|
23538
23547
|
if (this.options.extensions?.startInline) {
|
|
23539
|
-
let u = 1 / 0,
|
|
23540
|
-
this.options.extensions.startInline.forEach((
|
|
23541
|
-
|
|
23542
|
-
}), u < 1 / 0 && u >= 0 && (
|
|
23548
|
+
let u = 1 / 0, c = e.slice(1), g;
|
|
23549
|
+
this.options.extensions.startInline.forEach((h) => {
|
|
23550
|
+
g = h.call({ lexer: this }, c), typeof g == "number" && g >= 0 && (u = Math.min(u, g));
|
|
23551
|
+
}), u < 1 / 0 && u >= 0 && (p = e.substring(0, u + 1));
|
|
23543
23552
|
}
|
|
23544
|
-
if (o = this.tokenizer.inlineText(
|
|
23545
|
-
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (
|
|
23553
|
+
if (o = this.tokenizer.inlineText(p)) {
|
|
23554
|
+
e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (a = o.raw.slice(-1)), s = true;
|
|
23546
23555
|
let u = t.at(-1);
|
|
23547
23556
|
u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
|
|
23548
23557
|
continue;
|
|
@@ -23562,7 +23571,7 @@ var P = class {
|
|
|
23562
23571
|
constructor(e) {
|
|
23563
23572
|
__publicField(this, "options");
|
|
23564
23573
|
__publicField(this, "parser");
|
|
23565
|
-
this.options = e ||
|
|
23574
|
+
this.options = e || T;
|
|
23566
23575
|
}
|
|
23567
23576
|
space(e) {
|
|
23568
23577
|
return "";
|
|
@@ -23595,9 +23604,9 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
23595
23604
|
}
|
|
23596
23605
|
list(e) {
|
|
23597
23606
|
let t = e.ordered, n = e.start, r = "";
|
|
23598
|
-
for (let
|
|
23599
|
-
let
|
|
23600
|
-
r += this.listitem(
|
|
23607
|
+
for (let a = 0; a < e.items.length; a++) {
|
|
23608
|
+
let o = e.items[a];
|
|
23609
|
+
r += this.listitem(o);
|
|
23601
23610
|
}
|
|
23602
23611
|
let i = t ? "ol" : "ul", s = t && n !== 1 ? ' start="' + n + '"' : "";
|
|
23603
23612
|
return "<" + i + s + `>
|
|
@@ -23628,7 +23637,7 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
23628
23637
|
for (let i = 0; i < e.rows.length; i++) {
|
|
23629
23638
|
let s = e.rows[i];
|
|
23630
23639
|
n = "";
|
|
23631
|
-
for (let
|
|
23640
|
+
for (let a = 0; a < s.length; a++) n += this.tablecell(s[a]);
|
|
23632
23641
|
r += this.tablerow({ text: n });
|
|
23633
23642
|
}
|
|
23634
23643
|
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
@@ -23710,12 +23719,12 @@ var $ = class {
|
|
|
23710
23719
|
return "";
|
|
23711
23720
|
}
|
|
23712
23721
|
};
|
|
23713
|
-
var
|
|
23722
|
+
var b = class l2 {
|
|
23714
23723
|
constructor(e) {
|
|
23715
23724
|
__publicField(this, "options");
|
|
23716
23725
|
__publicField(this, "renderer");
|
|
23717
23726
|
__publicField(this, "textRenderer");
|
|
23718
|
-
this.options = e ||
|
|
23727
|
+
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 $();
|
|
23719
23728
|
}
|
|
23720
23729
|
static parse(e, t) {
|
|
23721
23730
|
return new l2(t).parse(e);
|
|
@@ -23728,9 +23737,9 @@ var R = class l2 {
|
|
|
23728
23737
|
for (let r = 0; r < e.length; r++) {
|
|
23729
23738
|
let i = e[r];
|
|
23730
23739
|
if (this.options.extensions?.renderers?.[i.type]) {
|
|
23731
|
-
let
|
|
23732
|
-
if (
|
|
23733
|
-
n +=
|
|
23740
|
+
let a = i, o = this.options.extensions.renderers[a.type].call({ parser: this }, a);
|
|
23741
|
+
if (o !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(a.type)) {
|
|
23742
|
+
n += o || "";
|
|
23734
23743
|
continue;
|
|
23735
23744
|
}
|
|
23736
23745
|
}
|
|
@@ -23777,16 +23786,16 @@ var R = class l2 {
|
|
|
23777
23786
|
continue;
|
|
23778
23787
|
}
|
|
23779
23788
|
case "text": {
|
|
23780
|
-
let
|
|
23781
|
-
for (; r + 1 < e.length && e[r + 1].type === "text"; )
|
|
23782
|
-
` + this.renderer.text(
|
|
23783
|
-
t ? n += this.renderer.paragraph({ type: "paragraph", raw:
|
|
23789
|
+
let a = s, o = this.renderer.text(a);
|
|
23790
|
+
for (; r + 1 < e.length && e[r + 1].type === "text"; ) a = e[++r], o += `
|
|
23791
|
+
` + this.renderer.text(a);
|
|
23792
|
+
t ? n += this.renderer.paragraph({ type: "paragraph", raw: o, text: o, tokens: [{ type: "text", raw: o, text: o, escaped: true }] }) : n += o;
|
|
23784
23793
|
continue;
|
|
23785
23794
|
}
|
|
23786
23795
|
default: {
|
|
23787
|
-
let
|
|
23788
|
-
if (this.options.silent) return console.error(
|
|
23789
|
-
throw new Error(
|
|
23796
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
23797
|
+
if (this.options.silent) return console.error(a), "";
|
|
23798
|
+
throw new Error(a);
|
|
23790
23799
|
}
|
|
23791
23800
|
}
|
|
23792
23801
|
}
|
|
@@ -23797,9 +23806,9 @@ var R = class l2 {
|
|
|
23797
23806
|
for (let r = 0; r < e.length; r++) {
|
|
23798
23807
|
let i = e[r];
|
|
23799
23808
|
if (this.options.extensions?.renderers?.[i.type]) {
|
|
23800
|
-
let
|
|
23801
|
-
if (
|
|
23802
|
-
n +=
|
|
23809
|
+
let a = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
23810
|
+
if (a !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
|
|
23811
|
+
n += a || "";
|
|
23803
23812
|
continue;
|
|
23804
23813
|
}
|
|
23805
23814
|
}
|
|
@@ -23846,9 +23855,9 @@ var R = class l2 {
|
|
|
23846
23855
|
break;
|
|
23847
23856
|
}
|
|
23848
23857
|
default: {
|
|
23849
|
-
let
|
|
23850
|
-
if (this.options.silent) return console.error(
|
|
23851
|
-
throw new Error(
|
|
23858
|
+
let a = 'Token with "' + s.type + '" type was not found.';
|
|
23859
|
+
if (this.options.silent) return console.error(a), "";
|
|
23860
|
+
throw new Error(a);
|
|
23852
23861
|
}
|
|
23853
23862
|
}
|
|
23854
23863
|
}
|
|
@@ -23859,7 +23868,7 @@ var S = (_a = class {
|
|
|
23859
23868
|
constructor(e) {
|
|
23860
23869
|
__publicField(this, "options");
|
|
23861
23870
|
__publicField(this, "block");
|
|
23862
|
-
this.options = e ||
|
|
23871
|
+
this.options = e || T;
|
|
23863
23872
|
}
|
|
23864
23873
|
preprocess(e) {
|
|
23865
23874
|
return e;
|
|
@@ -23874,10 +23883,10 @@ var S = (_a = class {
|
|
|
23874
23883
|
return e;
|
|
23875
23884
|
}
|
|
23876
23885
|
provideLexer() {
|
|
23877
|
-
return this.block ?
|
|
23886
|
+
return this.block ? x.lex : x.lexInline;
|
|
23878
23887
|
}
|
|
23879
23888
|
provideParser() {
|
|
23880
|
-
return this.block ?
|
|
23889
|
+
return this.block ? b.parse : b.parseInline;
|
|
23881
23890
|
}
|
|
23882
23891
|
}, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
23883
23892
|
var B = class {
|
|
@@ -23886,10 +23895,10 @@ var B = class {
|
|
|
23886
23895
|
__publicField(this, "options", this.setOptions);
|
|
23887
23896
|
__publicField(this, "parse", this.parseMarkdown(true));
|
|
23888
23897
|
__publicField(this, "parseInline", this.parseMarkdown(false));
|
|
23889
|
-
__publicField(this, "Parser",
|
|
23898
|
+
__publicField(this, "Parser", b);
|
|
23890
23899
|
__publicField(this, "Renderer", P);
|
|
23891
23900
|
__publicField(this, "TextRenderer", $);
|
|
23892
|
-
__publicField(this, "Lexer",
|
|
23901
|
+
__publicField(this, "Lexer", x);
|
|
23893
23902
|
__publicField(this, "Tokenizer", y);
|
|
23894
23903
|
__publicField(this, "Hooks", S);
|
|
23895
23904
|
this.use(...e);
|
|
@@ -23900,7 +23909,7 @@ var B = class {
|
|
|
23900
23909
|
case "table": {
|
|
23901
23910
|
let i = r;
|
|
23902
23911
|
for (let s of i.header) n = n.concat(this.walkTokens(s.tokens, t));
|
|
23903
|
-
for (let s of i.rows) for (let
|
|
23912
|
+
for (let s of i.rows) for (let a of s) n = n.concat(this.walkTokens(a.tokens, t));
|
|
23904
23913
|
break;
|
|
23905
23914
|
}
|
|
23906
23915
|
case "list": {
|
|
@@ -23911,8 +23920,8 @@ var B = class {
|
|
|
23911
23920
|
default: {
|
|
23912
23921
|
let i = r;
|
|
23913
23922
|
this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((s) => {
|
|
23914
|
-
let
|
|
23915
|
-
n = n.concat(this.walkTokens(
|
|
23923
|
+
let a = i[s].flat(1 / 0);
|
|
23924
|
+
n = n.concat(this.walkTokens(a, t));
|
|
23916
23925
|
}) : i.tokens && (n = n.concat(this.walkTokens(i.tokens, t)));
|
|
23917
23926
|
}
|
|
23918
23927
|
}
|
|
@@ -23926,9 +23935,9 @@ var B = class {
|
|
|
23926
23935
|
if (!i.name) throw new Error("extension name required");
|
|
23927
23936
|
if ("renderer" in i) {
|
|
23928
23937
|
let s = t.renderers[i.name];
|
|
23929
|
-
s ? t.renderers[i.name] = function(...
|
|
23930
|
-
let
|
|
23931
|
-
return
|
|
23938
|
+
s ? t.renderers[i.name] = function(...a) {
|
|
23939
|
+
let o = i.renderer.apply(this, a);
|
|
23940
|
+
return o === false && (o = s.apply(this, a)), o;
|
|
23932
23941
|
} : t.renderers[i.name] = i.renderer;
|
|
23933
23942
|
}
|
|
23934
23943
|
if ("tokenizer" in i) {
|
|
@@ -23942,10 +23951,10 @@ var B = class {
|
|
|
23942
23951
|
for (let s in n.renderer) {
|
|
23943
23952
|
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
23944
23953
|
if (["options", "parser"].includes(s)) continue;
|
|
23945
|
-
let
|
|
23946
|
-
i[
|
|
23947
|
-
let c =
|
|
23948
|
-
return c === false && (c =
|
|
23954
|
+
let a = s, o = n.renderer[a], p = i[a];
|
|
23955
|
+
i[a] = (...u) => {
|
|
23956
|
+
let c = o.apply(i, u);
|
|
23957
|
+
return c === false && (c = p.apply(i, u)), c || "";
|
|
23949
23958
|
};
|
|
23950
23959
|
}
|
|
23951
23960
|
r.renderer = i;
|
|
@@ -23955,10 +23964,10 @@ var B = class {
|
|
|
23955
23964
|
for (let s in n.tokenizer) {
|
|
23956
23965
|
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
23957
23966
|
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
23958
|
-
let
|
|
23959
|
-
i[
|
|
23960
|
-
let c =
|
|
23961
|
-
return c === false && (c =
|
|
23967
|
+
let a = s, o = n.tokenizer[a], p = i[a];
|
|
23968
|
+
i[a] = (...u) => {
|
|
23969
|
+
let c = o.apply(i, u);
|
|
23970
|
+
return c === false && (c = p.apply(i, u)), c;
|
|
23962
23971
|
};
|
|
23963
23972
|
}
|
|
23964
23973
|
r.tokenizer = i;
|
|
@@ -23968,23 +23977,30 @@ var B = class {
|
|
|
23968
23977
|
for (let s in n.hooks) {
|
|
23969
23978
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
23970
23979
|
if (["options", "block"].includes(s)) continue;
|
|
23971
|
-
let
|
|
23972
|
-
S.passThroughHooks.has(s) ? i[
|
|
23973
|
-
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
let c =
|
|
23978
|
-
return
|
|
23980
|
+
let a = s, o = n.hooks[a], p = i[a];
|
|
23981
|
+
S.passThroughHooks.has(s) ? i[a] = (u) => {
|
|
23982
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
23983
|
+
let g = await o.call(i, u);
|
|
23984
|
+
return p.call(i, g);
|
|
23985
|
+
})();
|
|
23986
|
+
let c = o.call(i, u);
|
|
23987
|
+
return p.call(i, c);
|
|
23988
|
+
} : i[a] = (...u) => {
|
|
23989
|
+
if (this.defaults.async) return (async () => {
|
|
23990
|
+
let g = await o.apply(i, u);
|
|
23991
|
+
return g === false && (g = await p.apply(i, u)), g;
|
|
23992
|
+
})();
|
|
23993
|
+
let c = o.apply(i, u);
|
|
23994
|
+
return c === false && (c = p.apply(i, u)), c;
|
|
23979
23995
|
};
|
|
23980
23996
|
}
|
|
23981
23997
|
r.hooks = i;
|
|
23982
23998
|
}
|
|
23983
23999
|
if (n.walkTokens) {
|
|
23984
24000
|
let i = this.defaults.walkTokens, s = n.walkTokens;
|
|
23985
|
-
r.walkTokens = function(
|
|
23986
|
-
let
|
|
23987
|
-
return
|
|
24001
|
+
r.walkTokens = function(a) {
|
|
24002
|
+
let o = [];
|
|
24003
|
+
return o.push(s.call(this, a)), i && (o = o.concat(i.call(this, a))), o;
|
|
23988
24004
|
};
|
|
23989
24005
|
}
|
|
23990
24006
|
this.defaults = { ...this.defaults, ...r };
|
|
@@ -23994,28 +24010,31 @@ var B = class {
|
|
|
23994
24010
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
23995
24011
|
}
|
|
23996
24012
|
lexer(e, t) {
|
|
23997
|
-
return
|
|
24013
|
+
return x.lex(e, t ?? this.defaults);
|
|
23998
24014
|
}
|
|
23999
24015
|
parser(e, t) {
|
|
24000
|
-
return
|
|
24016
|
+
return b.parse(e, t ?? this.defaults);
|
|
24001
24017
|
}
|
|
24002
24018
|
parseMarkdown(e) {
|
|
24003
24019
|
return (n, r) => {
|
|
24004
|
-
let i = { ...r }, s = { ...this.defaults, ...i },
|
|
24005
|
-
if (this.defaults.async === true && i.async === false) return
|
|
24006
|
-
if (typeof n > "u" || n === null) return
|
|
24007
|
-
if (typeof n != "string") return
|
|
24008
|
-
s.hooks && (s.hooks.options = s, s.hooks.block = e)
|
|
24009
|
-
|
|
24010
|
-
|
|
24020
|
+
let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
|
|
24021
|
+
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."));
|
|
24022
|
+
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
24023
|
+
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
24024
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
24025
|
+
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;
|
|
24026
|
+
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
24027
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
24028
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
24029
|
+
})().catch(a);
|
|
24011
24030
|
try {
|
|
24012
24031
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
24013
|
-
let p =
|
|
24032
|
+
let p = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
24014
24033
|
s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
|
|
24015
|
-
let c =
|
|
24034
|
+
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
|
|
24016
24035
|
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
24017
|
-
} catch (
|
|
24018
|
-
return o
|
|
24036
|
+
} catch (o) {
|
|
24037
|
+
return a(o);
|
|
24019
24038
|
}
|
|
24020
24039
|
};
|
|
24021
24040
|
}
|
|
@@ -24032,38 +24051,38 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
24032
24051
|
}
|
|
24033
24052
|
};
|
|
24034
24053
|
var _ = new B();
|
|
24035
|
-
function
|
|
24054
|
+
function k(l3, e) {
|
|
24036
24055
|
return _.parse(l3, e);
|
|
24037
24056
|
}
|
|
24038
|
-
|
|
24039
|
-
return _.setOptions(l3),
|
|
24057
|
+
k.options = k.setOptions = function(l3) {
|
|
24058
|
+
return _.setOptions(l3), k.defaults = _.defaults, G(k.defaults), k;
|
|
24040
24059
|
};
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
|
|
24044
|
-
return _.use(...l3),
|
|
24060
|
+
k.getDefaults = L;
|
|
24061
|
+
k.defaults = T;
|
|
24062
|
+
k.use = function(...l3) {
|
|
24063
|
+
return _.use(...l3), k.defaults = _.defaults, G(k.defaults), k;
|
|
24045
24064
|
};
|
|
24046
|
-
|
|
24065
|
+
k.walkTokens = function(l3, e) {
|
|
24047
24066
|
return _.walkTokens(l3, e);
|
|
24048
24067
|
};
|
|
24049
|
-
|
|
24050
|
-
|
|
24051
|
-
|
|
24052
|
-
|
|
24053
|
-
|
|
24054
|
-
|
|
24055
|
-
|
|
24056
|
-
|
|
24057
|
-
|
|
24058
|
-
|
|
24059
|
-
|
|
24060
|
-
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24066
|
-
|
|
24068
|
+
k.parseInline = _.parseInline;
|
|
24069
|
+
k.Parser = b;
|
|
24070
|
+
k.parser = b.parse;
|
|
24071
|
+
k.Renderer = P;
|
|
24072
|
+
k.TextRenderer = $;
|
|
24073
|
+
k.Lexer = x;
|
|
24074
|
+
k.lexer = x.lex;
|
|
24075
|
+
k.Tokenizer = y;
|
|
24076
|
+
k.Hooks = S;
|
|
24077
|
+
k.parse = k;
|
|
24078
|
+
k.options;
|
|
24079
|
+
k.setOptions;
|
|
24080
|
+
k.use;
|
|
24081
|
+
k.walkTokens;
|
|
24082
|
+
k.parseInline;
|
|
24083
|
+
b.parse;
|
|
24084
|
+
x.lex;
|
|
24085
|
+
k.use({
|
|
24067
24086
|
breaks: false,
|
|
24068
24087
|
// Use proper paragraphs, not <br> tags
|
|
24069
24088
|
gfm: true
|
|
@@ -24074,7 +24093,7 @@ function createDocFromMarkdown(markdown, schema, options = {}) {
|
|
|
24074
24093
|
return createDocFromHTML(html, schema, options);
|
|
24075
24094
|
}
|
|
24076
24095
|
function convertMarkdownToHTML(markdown) {
|
|
24077
|
-
let html =
|
|
24096
|
+
let html = k.parse(markdown, { async: false });
|
|
24078
24097
|
return html.replace(/<\/p>\n<ul>/g, "</p>\n<p> </p>\n<ul>").replace(/<\/p>\n<ol>/g, "</p>\n<p> </p>\n<ol>").replace(/<\/ul>\n<h/g, "</ul>\n<p> </p>\n<h").replace(/<\/ol>\n<h/g, "</ol>\n<p> </p>\n<h");
|
|
24079
24098
|
}
|
|
24080
24099
|
function processContent({ content, type: type2, schema }) {
|
|
@@ -24253,7 +24272,7 @@ const getBasicNumIdTag = (numId, abstractId) => {
|
|
|
24253
24272
|
};
|
|
24254
24273
|
const getNewListId = (editor, grouping = "definitions") => {
|
|
24255
24274
|
const defs = editor.converter.numbering[grouping] || {};
|
|
24256
|
-
const intKeys = Object.keys(defs).map((
|
|
24275
|
+
const intKeys = Object.keys(defs).map((k2) => Number(k2)).filter((n) => Number.isInteger(n));
|
|
24257
24276
|
const max2 = intKeys.length ? Math.max(...intKeys) : 0;
|
|
24258
24277
|
return max2 + 1;
|
|
24259
24278
|
};
|
|
@@ -28712,18 +28731,18 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
|
|
|
28712
28731
|
const rawY = shapeOff?.attributes?.["y"] ? parseFloat(shapeOff.attributes["y"]) : 0;
|
|
28713
28732
|
const rawWidth = shapeExt?.attributes?.["cx"] ? parseFloat(shapeExt.attributes["cx"]) : 914400;
|
|
28714
28733
|
const rawHeight = shapeExt?.attributes?.["cy"] ? parseFloat(shapeExt.attributes["cy"]) : 914400;
|
|
28715
|
-
let
|
|
28734
|
+
let x2, y2, width, height;
|
|
28716
28735
|
if (groupTransform.childWidth && groupTransform.childHeight) {
|
|
28717
28736
|
const scaleX = groupTransform.width / groupTransform.childWidth;
|
|
28718
28737
|
const scaleY = groupTransform.height / groupTransform.childHeight;
|
|
28719
28738
|
const childOriginX = groupTransform.childOriginXEmu || 0;
|
|
28720
28739
|
const childOriginY = groupTransform.childOriginYEmu || 0;
|
|
28721
|
-
|
|
28740
|
+
x2 = groupTransform.x + emuToPixels((rawX - childOriginX) * scaleX);
|
|
28722
28741
|
y2 = groupTransform.y + emuToPixels((rawY - childOriginY) * scaleY);
|
|
28723
28742
|
width = emuToPixels(rawWidth * scaleX);
|
|
28724
28743
|
height = emuToPixels(rawHeight * scaleY);
|
|
28725
28744
|
} else {
|
|
28726
|
-
|
|
28745
|
+
x2 = emuToPixels(rawX);
|
|
28727
28746
|
y2 = emuToPixels(rawY);
|
|
28728
28747
|
width = emuToPixels(rawWidth);
|
|
28729
28748
|
height = emuToPixels(rawHeight);
|
|
@@ -28742,7 +28761,7 @@ const handleShapeGroup = (params, node, graphicData, size, padding, marginOffset
|
|
|
28742
28761
|
shapeType: "vectorShape",
|
|
28743
28762
|
attrs: {
|
|
28744
28763
|
kind: shapeKind,
|
|
28745
|
-
x,
|
|
28764
|
+
x: x2,
|
|
28746
28765
|
y: y2,
|
|
28747
28766
|
width,
|
|
28748
28767
|
height,
|
|
@@ -28951,8 +28970,8 @@ const translateImageNode = (params) => {
|
|
|
28951
28970
|
const leftMargin = tableCell.attrs.cellMargins?.left || 8;
|
|
28952
28971
|
const rightMargin = tableCell.attrs.cellMargins?.right || 8;
|
|
28953
28972
|
const maxWidthEmu = pixelsToEmu(colwidthSum - (leftMargin + rightMargin));
|
|
28954
|
-
const { width: w2, height:
|
|
28955
|
-
if (w2 &&
|
|
28973
|
+
const { width: w2, height: h } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
|
|
28974
|
+
if (w2 && h) size = { w: w2, h };
|
|
28956
28975
|
}
|
|
28957
28976
|
if (imageId) {
|
|
28958
28977
|
const docx = params.converter?.convertedXml || {};
|
|
@@ -36067,7 +36086,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
36067
36086
|
static getStoredSuperdocVersion(docx) {
|
|
36068
36087
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
36069
36088
|
}
|
|
36070
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.36.
|
|
36089
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.36.1") {
|
|
36071
36090
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
36072
36091
|
}
|
|
36073
36092
|
/**
|
|
@@ -36461,7 +36480,7 @@ prepareCommentsXmlFilesForExport_fn = function({ defs, exportType, commentsWithP
|
|
|
36461
36480
|
};
|
|
36462
36481
|
exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
36463
36482
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36464
|
-
const relationships = relsData.elements.find((
|
|
36483
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36465
36484
|
const newDocRels = [];
|
|
36466
36485
|
Object.entries(this.headers).forEach(([id, header], index2) => {
|
|
36467
36486
|
const fileName = relationships.elements.find((el) => el.attributes.Id === id)?.attributes.Target || `header${index2 + 1}.xml`;
|
|
@@ -36502,7 +36521,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36502
36521
|
}
|
|
36503
36522
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36504
36523
|
if (params.relationships.length) {
|
|
36505
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36524
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36506
36525
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36507
36526
|
declaration: this.initialJSON?.declaration,
|
|
36508
36527
|
elements: [
|
|
@@ -36556,7 +36575,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36556
36575
|
}
|
|
36557
36576
|
this.convertedXml[`word/${fileName}`].elements[0].elements = bodyContent;
|
|
36558
36577
|
if (params.relationships.length) {
|
|
36559
|
-
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((
|
|
36578
|
+
const relationships2 = this.convertedXml[`word/_rels/${fileName}.rels`]?.elements?.find((x2) => x2.name === "Relationships")?.elements || [];
|
|
36560
36579
|
this.convertedXml[`word/_rels/${fileName}.rels`] = {
|
|
36561
36580
|
declaration: this.initialJSON?.declaration,
|
|
36562
36581
|
elements: [
|
|
@@ -36575,7 +36594,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
|
|
|
36575
36594
|
};
|
|
36576
36595
|
exportProcessNewRelationships_fn = function(rels = []) {
|
|
36577
36596
|
const relsData = this.convertedXml["word/_rels/document.xml.rels"];
|
|
36578
|
-
const relationships = relsData.elements.find((
|
|
36597
|
+
const relationships = relsData.elements.find((x2) => x2.name === "Relationships");
|
|
36579
36598
|
relationships.elements = mergeRelationshipElements(relationships.elements, rels);
|
|
36580
36599
|
};
|
|
36581
36600
|
exportProcessMediaFiles_fn = async function(media = {}) {
|