@harbour-enterprises/superdoc 0.11.45 → 0.11.46

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.
@@ -1,17 +1,17 @@
1
- var Nu = Object.defineProperty;
1
+ var Iu = Object.defineProperty;
2
2
  var _i = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
- var Iu = (r, e, t) => e in r ? Nu(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
- var Mt = (r, e, t) => Iu(r, typeof e != "symbol" ? e + "" : e, t), Ru = (r, e, t) => e.has(r) || _i("Cannot " + t);
5
+ var Ru = (r, e, t) => e in r ? Iu(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
6
+ var Mt = (r, e, t) => Ru(r, typeof e != "symbol" ? e + "" : e, t), Pu = (r, e, t) => e.has(r) || _i("Cannot " + t);
7
7
  var Ir = (r, e, t) => e.has(r) ? _i("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t);
8
- var Ke = (r, e, t) => (Ru(r, e, "access private method"), t);
8
+ var Ke = (r, e, t) => (Pu(r, e, "access private method"), t);
9
9
  import "vue";
10
10
  var Je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
11
11
  function qo(r) {
12
12
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
13
13
  }
14
- function Pu(r) {
14
+ function Ou(r) {
15
15
  if (r.__esModule) return r;
16
16
  var e = r.default;
17
17
  if (typeof e == "function") {
@@ -31,11 +31,11 @@ function Pu(r) {
31
31
  }), t;
32
32
  }
33
33
  var Fe = {}, Dr = {};
34
- Dr.byteLength = _u;
35
- Dr.toByteArray = Mu;
36
- Dr.fromByteArray = Hu;
37
- var Qe = [], ze = [], Ou = typeof Uint8Array < "u" ? Uint8Array : Array, Rr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
38
- for (var Dt = 0, Lu = Rr.length; Dt < Lu; ++Dt)
34
+ Dr.byteLength = qu;
35
+ Dr.toByteArray = Uu;
36
+ Dr.fromByteArray = Vu;
37
+ var Qe = [], ze = [], Lu = typeof Uint8Array < "u" ? Uint8Array : Array, Rr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
38
+ for (var Dt = 0, _u = Rr.length; Dt < _u; ++Dt)
39
39
  Qe[Dt] = Rr[Dt], ze[Rr.charCodeAt(Dt)] = Dt;
40
40
  ze[45] = 62;
41
41
  ze[95] = 63;
@@ -48,30 +48,30 @@ function Mo(r) {
48
48
  var n = t === e ? 0 : 4 - t % 4;
49
49
  return [t, n];
50
50
  }
51
- function _u(r) {
51
+ function qu(r) {
52
52
  var e = Mo(r), t = e[0], n = e[1];
53
53
  return (t + n) * 3 / 4 - n;
54
54
  }
55
- function qu(r, e, t) {
55
+ function Mu(r, e, t) {
56
56
  return (e + t) * 3 / 4 - t;
57
57
  }
58
- function Mu(r) {
59
- var e, t = Mo(r), n = t[0], i = t[1], s = new Ou(qu(r, n, i)), o = 0, a = i > 0 ? n - 4 : n, u;
58
+ function Uu(r) {
59
+ var e, t = Mo(r), n = t[0], i = t[1], s = new Lu(Mu(r, n, i)), o = 0, a = i > 0 ? n - 4 : n, u;
60
60
  for (u = 0; u < a; u += 4)
61
61
  e = ze[r.charCodeAt(u)] << 18 | ze[r.charCodeAt(u + 1)] << 12 | ze[r.charCodeAt(u + 2)] << 6 | ze[r.charCodeAt(u + 3)], s[o++] = e >> 16 & 255, s[o++] = e >> 8 & 255, s[o++] = e & 255;
62
62
  return i === 2 && (e = ze[r.charCodeAt(u)] << 2 | ze[r.charCodeAt(u + 1)] >> 4, s[o++] = e & 255), i === 1 && (e = ze[r.charCodeAt(u)] << 10 | ze[r.charCodeAt(u + 1)] << 4 | ze[r.charCodeAt(u + 2)] >> 2, s[o++] = e >> 8 & 255, s[o++] = e & 255), s;
63
63
  }
64
- function Uu(r) {
64
+ function ju(r) {
65
65
  return Qe[r >> 18 & 63] + Qe[r >> 12 & 63] + Qe[r >> 6 & 63] + Qe[r & 63];
66
66
  }
67
- function ju(r, e, t) {
67
+ function Hu(r, e, t) {
68
68
  for (var n, i = [], s = e; s < t; s += 3)
69
- n = (r[s] << 16 & 16711680) + (r[s + 1] << 8 & 65280) + (r[s + 2] & 255), i.push(Uu(n));
69
+ n = (r[s] << 16 & 16711680) + (r[s + 1] << 8 & 65280) + (r[s + 2] & 255), i.push(ju(n));
70
70
  return i.join("");
71
71
  }
72
- function Hu(r) {
72
+ function Vu(r) {
73
73
  for (var e, t = r.length, n = t % 3, i = [], s = 16383, o = 0, a = t - n; o < a; o += s)
74
- i.push(ju(r, o, o + s > a ? a : o + s));
74
+ i.push(Hu(r, o, o + s > a ? a : o + s));
75
75
  return n === 1 ? (e = r[t - 1], i.push(
76
76
  Qe[e >> 2] + Qe[e << 4 & 63] + "=="
77
77
  )) : n === 2 && (e = (r[t - 2] << 8) + r[t - 1], i.push(
@@ -503,16 +503,16 @@ bi.write = function(r, e, t, n, i, s) {
503
503
  return G;
504
504
  }
505
505
  function Z(y, f, d, T) {
506
- return Ue(Se(f, y.length - d), y, d, T);
506
+ return je(Se(f, y.length - d), y, d, T);
507
507
  }
508
508
  function fe(y, f, d, T) {
509
- return Ue(Be(f), y, d, T);
509
+ return je(Be(f), y, d, T);
510
510
  }
511
511
  function de(y, f, d, T) {
512
- return Ue(Ge(f), y, d, T);
512
+ return je(Ge(f), y, d, T);
513
513
  }
514
514
  function se(y, f, d, T) {
515
- return Ue(Ve(f, y.length - d), y, d, T);
515
+ return je(Ve(f, y.length - d), y, d, T);
516
516
  }
517
517
  l.prototype.write = function(f, d, T, O) {
518
518
  if (d === void 0)
@@ -1021,7 +1021,7 @@ bi.write = function(r, e, t, n, i, s) {
1021
1021
  function Ge(y) {
1022
1022
  return e.toByteArray(z(y));
1023
1023
  }
1024
- function Ue(y, f, d, T) {
1024
+ function je(y, f, d, T) {
1025
1025
  let O;
1026
1026
  for (O = 0; O < T && !(O + d >= f.length || O >= y.length); ++O)
1027
1027
  f[O + d] = y[O];
@@ -1043,32 +1043,32 @@ bi.write = function(r, e, t, n, i, s) {
1043
1043
  return f;
1044
1044
  }();
1045
1045
  function Le(y) {
1046
- return typeof BigInt > "u" ? ku : y;
1046
+ return typeof BigInt > "u" ? Nu : y;
1047
1047
  }
1048
- function ku() {
1048
+ function Nu() {
1049
1049
  throw new Error("BigInt not supported");
1050
1050
  }
1051
1051
  })(Fe);
1052
- const St = Fe.Buffer, Vu = Fe.Blob, zu = Fe.BlobOptions, Gu = Fe.Buffer, Wu = Fe.File, Ju = Fe.FileOptions, $u = Fe.INSPECT_MAX_BYTES, Ku = Fe.SlowBuffer, Xu = Fe.TranscodeEncoding, Yu = Fe.atob, Zu = Fe.btoa, Qu = Fe.constants, el = Fe.isAscii, tl = Fe.isUtf8, rl = Fe.kMaxLength, nl = Fe.kStringMaxLength, il = Fe.resolveObjectURL, sl = Fe.transcode, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1052
+ const St = Fe.Buffer, zu = Fe.Blob, Gu = Fe.BlobOptions, Wu = Fe.Buffer, Ju = Fe.File, $u = Fe.FileOptions, Ku = Fe.INSPECT_MAX_BYTES, Xu = Fe.SlowBuffer, Yu = Fe.TranscodeEncoding, Zu = Fe.atob, Qu = Fe.btoa, el = Fe.constants, tl = Fe.isAscii, rl = Fe.isUtf8, nl = Fe.kMaxLength, il = Fe.kStringMaxLength, sl = Fe.resolveObjectURL, ol = Fe.transcode, al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1053
1053
  __proto__: null,
1054
- Blob: Vu,
1055
- BlobOptions: zu,
1056
- Buffer: Gu,
1057
- File: Wu,
1058
- FileOptions: Ju,
1059
- INSPECT_MAX_BYTES: $u,
1060
- SlowBuffer: Ku,
1061
- TranscodeEncoding: Xu,
1062
- atob: Yu,
1063
- btoa: Zu,
1064
- constants: Qu,
1054
+ Blob: zu,
1055
+ BlobOptions: Gu,
1056
+ Buffer: Wu,
1057
+ File: Ju,
1058
+ FileOptions: $u,
1059
+ INSPECT_MAX_BYTES: Ku,
1060
+ SlowBuffer: Xu,
1061
+ TranscodeEncoding: Yu,
1062
+ atob: Zu,
1063
+ btoa: Qu,
1064
+ constants: el,
1065
1065
  default: St,
1066
- isAscii: el,
1067
- isUtf8: tl,
1068
- kMaxLength: rl,
1069
- kStringMaxLength: nl,
1070
- resolveObjectURL: il,
1071
- transcode: sl
1066
+ isAscii: tl,
1067
+ isUtf8: rl,
1068
+ kMaxLength: nl,
1069
+ kStringMaxLength: il,
1070
+ resolveObjectURL: sl,
1071
+ transcode: ol
1072
1072
  }, Symbol.toStringTag, { value: "Module" }));
1073
1073
  var Uo = {}, Qt = { exports: {} }, qi;
1074
1074
  function xi() {
@@ -1302,7 +1302,7 @@ function At() {
1302
1302
  }
1303
1303
  }), er.exports;
1304
1304
  }
1305
- function al(r) {
1305
+ function ul(r) {
1306
1306
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
1307
1307
  }
1308
1308
  var jo = { exports: {} }, ve = jo.exports = {}, Xe, Ye;
@@ -1339,7 +1339,7 @@ function Ho(r) {
1339
1339
  }
1340
1340
  }
1341
1341
  }
1342
- function ul(r) {
1342
+ function ll(r) {
1343
1343
  if (Ye === clearTimeout)
1344
1344
  return clearTimeout(r);
1345
1345
  if ((Ye === ui || !Ye) && clearTimeout)
@@ -1355,19 +1355,19 @@ function ul(r) {
1355
1355
  }
1356
1356
  }
1357
1357
  var ot = [], Tt = !1, ht, ar = -1;
1358
- function ll() {
1358
+ function cl() {
1359
1359
  !Tt || !ht || (Tt = !1, ht.length ? ot = ht.concat(ot) : ar = -1, ot.length && Vo());
1360
1360
  }
1361
1361
  function Vo() {
1362
1362
  if (!Tt) {
1363
- var r = Ho(ll);
1363
+ var r = Ho(cl);
1364
1364
  Tt = !0;
1365
1365
  for (var e = ot.length; e; ) {
1366
1366
  for (ht = ot, ot = []; ++ar < e; )
1367
1367
  ht && ht[ar].run();
1368
1368
  ar = -1, e = ot.length;
1369
1369
  }
1370
- ht = null, Tt = !1, ul(r);
1370
+ ht = null, Tt = !1, ll(r);
1371
1371
  }
1372
1372
  }
1373
1373
  ve.nextTick = function(r) {
@@ -1415,13 +1415,13 @@ ve.chdir = function(r) {
1415
1415
  ve.umask = function() {
1416
1416
  return 0;
1417
1417
  };
1418
- var cl = jo.exports;
1419
- const ge = /* @__PURE__ */ al(cl);
1418
+ var fl = jo.exports;
1419
+ const ge = /* @__PURE__ */ ul(fl);
1420
1420
  var Pr, Ui;
1421
1421
  function Go() {
1422
1422
  return Ui || (Ui = 1, Pr = xi().EventEmitter), Pr;
1423
1423
  }
1424
- const vr = /* @__PURE__ */ Pu(ol);
1424
+ const vr = /* @__PURE__ */ Ou(al);
1425
1425
  var Or = {}, Lr = {}, _r, ji;
1426
1426
  function Wo() {
1427
1427
  return ji || (ji = 1, _r = function() {
@@ -1466,19 +1466,19 @@ function Jo() {
1466
1466
  return Vi || (Vi = 1, Mr = Object), Mr;
1467
1467
  }
1468
1468
  var Ur, zi;
1469
- function fl() {
1469
+ function dl() {
1470
1470
  return zi || (zi = 1, Ur = Error), Ur;
1471
1471
  }
1472
1472
  var jr, Gi;
1473
- function dl() {
1473
+ function ml() {
1474
1474
  return Gi || (Gi = 1, jr = EvalError), jr;
1475
1475
  }
1476
1476
  var Hr, Wi;
1477
- function ml() {
1477
+ function pl() {
1478
1478
  return Wi || (Wi = 1, Hr = RangeError), Hr;
1479
1479
  }
1480
1480
  var Vr, Ji;
1481
- function pl() {
1481
+ function hl() {
1482
1482
  return Ji || (Ji = 1, Vr = ReferenceError), Vr;
1483
1483
  }
1484
1484
  var zr, $i;
@@ -1490,57 +1490,57 @@ function $t() {
1490
1490
  return Ki || (Ki = 1, Gr = TypeError), Gr;
1491
1491
  }
1492
1492
  var Wr, Xi;
1493
- function hl() {
1493
+ function gl() {
1494
1494
  return Xi || (Xi = 1, Wr = URIError), Wr;
1495
1495
  }
1496
1496
  var Jr, Yi;
1497
- function gl() {
1497
+ function wl() {
1498
1498
  return Yi || (Yi = 1, Jr = Math.abs), Jr;
1499
1499
  }
1500
1500
  var $r, Zi;
1501
- function wl() {
1501
+ function yl() {
1502
1502
  return Zi || (Zi = 1, $r = Math.floor), $r;
1503
1503
  }
1504
1504
  var Kr, Qi;
1505
- function yl() {
1505
+ function bl() {
1506
1506
  return Qi || (Qi = 1, Kr = Math.max), Kr;
1507
1507
  }
1508
1508
  var Xr, es;
1509
- function bl() {
1509
+ function xl() {
1510
1510
  return es || (es = 1, Xr = Math.min), Xr;
1511
1511
  }
1512
1512
  var Yr, ts;
1513
- function xl() {
1513
+ function Al() {
1514
1514
  return ts || (ts = 1, Yr = Math.pow), Yr;
1515
1515
  }
1516
1516
  var Zr, rs;
1517
- function Al() {
1517
+ function Dl() {
1518
1518
  return rs || (rs = 1, Zr = Math.round), Zr;
1519
1519
  }
1520
1520
  var Qr, ns;
1521
- function Dl() {
1521
+ function vl() {
1522
1522
  return ns || (ns = 1, Qr = Number.isNaN || function(e) {
1523
1523
  return e !== e;
1524
1524
  }), Qr;
1525
1525
  }
1526
1526
  var en, is;
1527
- function vl() {
1527
+ function El() {
1528
1528
  if (is) return en;
1529
1529
  is = 1;
1530
- var r = Dl();
1530
+ var r = vl();
1531
1531
  return en = function(t) {
1532
1532
  return r(t) || t === 0 ? t : t < 0 ? -1 : 1;
1533
1533
  }, en;
1534
1534
  }
1535
1535
  var tn, ss;
1536
- function El() {
1536
+ function Cl() {
1537
1537
  return ss || (ss = 1, tn = Object.getOwnPropertyDescriptor), tn;
1538
1538
  }
1539
1539
  var rn, os;
1540
1540
  function Lt() {
1541
1541
  if (os) return rn;
1542
1542
  os = 1;
1543
- var r = El();
1543
+ var r = Cl();
1544
1544
  if (r)
1545
1545
  try {
1546
1546
  r([], "length");
@@ -1563,7 +1563,7 @@ function Cr() {
1563
1563
  return nn = r, nn;
1564
1564
  }
1565
1565
  var sn, us;
1566
- function Cl() {
1566
+ function Sl() {
1567
1567
  if (us) return sn;
1568
1568
  us = 1;
1569
1569
  var r = typeof Symbol < "u" && Symbol, e = Wo();
@@ -1583,7 +1583,7 @@ function Xo() {
1583
1583
  return an = r.getPrototypeOf || null, an;
1584
1584
  }
1585
1585
  var un, fs;
1586
- function Sl() {
1586
+ function Tl() {
1587
1587
  if (fs) return un;
1588
1588
  fs = 1;
1589
1589
  var r = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, n = "[object Function]", i = function(u, c) {
@@ -1631,7 +1631,7 @@ var ln, ds;
1631
1631
  function Kt() {
1632
1632
  if (ds) return ln;
1633
1633
  ds = 1;
1634
- var r = Sl();
1634
+ var r = Tl();
1635
1635
  return ln = Function.prototype.bind || r, ln;
1636
1636
  }
1637
1637
  var cn, ms;
@@ -1643,14 +1643,14 @@ function Di() {
1643
1643
  return ps || (ps = 1, fn = Function.prototype.apply), fn;
1644
1644
  }
1645
1645
  var dn, hs;
1646
- function Tl() {
1646
+ function Fl() {
1647
1647
  return hs || (hs = 1, dn = typeof Reflect < "u" && Reflect && Reflect.apply), dn;
1648
1648
  }
1649
1649
  var mn, gs;
1650
1650
  function Yo() {
1651
1651
  if (gs) return mn;
1652
1652
  gs = 1;
1653
- var r = Kt(), e = Di(), t = Ai(), n = Tl();
1653
+ var r = Kt(), e = Di(), t = Ai(), n = Fl();
1654
1654
  return mn = n || r.call(t, e), mn;
1655
1655
  }
1656
1656
  var pn, ws;
@@ -1665,7 +1665,7 @@ function vi() {
1665
1665
  }, pn;
1666
1666
  }
1667
1667
  var hn, ys;
1668
- function Fl() {
1668
+ function Bl() {
1669
1669
  if (ys) return hn;
1670
1670
  ys = 1;
1671
1671
  var r = vi(), e = Lt(), t;
@@ -1692,7 +1692,7 @@ var gn, bs;
1692
1692
  function Ei() {
1693
1693
  if (bs) return gn;
1694
1694
  bs = 1;
1695
- var r = Ko(), e = Xo(), t = Fl();
1695
+ var r = Ko(), e = Xo(), t = Bl();
1696
1696
  return gn = r ? function(i) {
1697
1697
  return r(i);
1698
1698
  } : e ? function(i) {
@@ -1714,7 +1714,7 @@ var yn, As;
1714
1714
  function Qo() {
1715
1715
  if (As) return yn;
1716
1716
  As = 1;
1717
- var r, e = Jo(), t = fl(), n = dl(), i = ml(), s = pl(), o = $o(), a = $t(), u = hl(), c = gl(), l = wl(), h = yl(), g = bl(), E = xl(), A = Al(), v = vl(), F = Function, w = function(I) {
1717
+ var r, e = Jo(), t = dl(), n = ml(), i = pl(), s = hl(), o = $o(), a = $t(), u = gl(), c = wl(), l = yl(), h = bl(), g = xl(), E = Al(), A = Dl(), v = El(), F = Function, w = function(I) {
1718
1718
  try {
1719
1719
  return F('"use strict"; return (' + I + ").constructor;")();
1720
1720
  } catch {
@@ -1731,7 +1731,7 @@ function Qo() {
1731
1731
  return D;
1732
1732
  }
1733
1733
  }
1734
- }() : D, N = Cl()(), M = Ei(), _ = Xo(), C = Ko(), J = Di(), oe = Ai(), Z = {}, fe = typeof Uint8Array > "u" || !M ? r : M(Uint8Array), de = {
1734
+ }() : D, N = Sl()(), M = Ei(), _ = Xo(), C = Ko(), J = Di(), oe = Ai(), Z = {}, fe = typeof Uint8Array > "u" || !M ? r : M(Uint8Array), de = {
1735
1735
  __proto__: null,
1736
1736
  "%AggregateError%": typeof AggregateError > "u" ? r : AggregateError,
1737
1737
  "%Array%": Array,
@@ -1937,8 +1937,8 @@ function Qo() {
1937
1937
  return;
1938
1938
  }
1939
1939
  if (B && z + 1 >= x.length) {
1940
- var Ue = B(X, Be);
1941
- Se = !!Ue, Se && "get" in Ue && !("originalValue" in Ue.get) ? X = Ue.get : X = X[Be];
1940
+ var je = B(X, Be);
1941
+ Se = !!je, Se && "get" in je && !("originalValue" in je.get) ? X = je.get : X = X[Be];
1942
1942
  } else
1943
1943
  Se = $(X, Be), X = X[Be];
1944
1944
  Se && !te && (de[ee] = X);
@@ -1964,7 +1964,7 @@ function Xt() {
1964
1964
  }, bn;
1965
1965
  }
1966
1966
  var xn, vs;
1967
- function Bl() {
1967
+ function kl() {
1968
1968
  if (vs) return xn;
1969
1969
  vs = 1;
1970
1970
  var r = Er()(), e = Xt(), t = e("Object.prototype.toString"), n = function(a) {
@@ -1977,7 +1977,7 @@ function Bl() {
1977
1977
  return n.isLegacyArguments = i, xn = s ? n : i, xn;
1978
1978
  }
1979
1979
  var An, Es;
1980
- function kl() {
1980
+ function Nl() {
1981
1981
  if (Es) return An;
1982
1982
  Es = 1;
1983
1983
  var r = Xt(), e = Er()(), t = Zo(), n = Lt(), i;
@@ -2021,10 +2021,10 @@ function kl() {
2021
2021
  return An = i, An;
2022
2022
  }
2023
2023
  var Dn, Cs;
2024
- function Nl() {
2024
+ function Il() {
2025
2025
  if (Cs) return Dn;
2026
2026
  Cs = 1;
2027
- var r = Xt(), e = kl(), t = r("RegExp.prototype.exec"), n = $t();
2027
+ var r = Xt(), e = Nl(), t = r("RegExp.prototype.exec"), n = $t();
2028
2028
  return Dn = function(s) {
2029
2029
  if (!e(s))
2030
2030
  throw new n("`regex` must be a RegExp");
@@ -2034,10 +2034,10 @@ function Nl() {
2034
2034
  }, Dn;
2035
2035
  }
2036
2036
  var vn, Ss;
2037
- function Il() {
2037
+ function Rl() {
2038
2038
  if (Ss) return vn;
2039
2039
  Ss = 1;
2040
- var r = Xt(), e = Nl(), t = e(/^\s*(?:function)?\*/), n = Er()(), i = Ei(), s = r("Object.prototype.toString"), o = r("Function.prototype.toString"), a = function() {
2040
+ var r = Xt(), e = Il(), t = e(/^\s*(?:function)?\*/), n = Er()(), i = Ei(), s = r("Object.prototype.toString"), o = r("Function.prototype.toString"), a = function() {
2041
2041
  if (!n)
2042
2042
  return !1;
2043
2043
  try {
@@ -2067,7 +2067,7 @@ function Il() {
2067
2067
  }, vn;
2068
2068
  }
2069
2069
  var En, Ts;
2070
- function Rl() {
2070
+ function Pl() {
2071
2071
  if (Ts) return En;
2072
2072
  Ts = 1;
2073
2073
  var r = Function.prototype.toString, e = typeof Reflect == "object" && Reflect !== null && Reflect.apply, t, n;
@@ -2139,10 +2139,10 @@ function Rl() {
2139
2139
  }, En;
2140
2140
  }
2141
2141
  var Cn, Fs;
2142
- function Pl() {
2142
+ function Ol() {
2143
2143
  if (Fs) return Cn;
2144
2144
  Fs = 1;
2145
- var r = Rl(), e = Object.prototype.toString, t = Object.prototype.hasOwnProperty, n = function(u, c, l) {
2145
+ var r = Pl(), e = Object.prototype.toString, t = Object.prototype.hasOwnProperty, n = function(u, c, l) {
2146
2146
  for (var h = 0, g = u.length; h < g; h++)
2147
2147
  t.call(u, h) && (l == null ? c(u[h], h, u) : c.call(l, u[h], h, u));
2148
2148
  }, i = function(u, c, l) {
@@ -2163,7 +2163,7 @@ function Pl() {
2163
2163
  }, Cn;
2164
2164
  }
2165
2165
  var Sn, Bs;
2166
- function Ol() {
2166
+ function Ll() {
2167
2167
  return Bs || (Bs = 1, Sn = [
2168
2168
  "Float16Array",
2169
2169
  "Float32Array",
@@ -2180,10 +2180,10 @@ function Ol() {
2180
2180
  ]), Sn;
2181
2181
  }
2182
2182
  var Tn, ks;
2183
- function Ll() {
2183
+ function _l() {
2184
2184
  if (ks) return Tn;
2185
2185
  ks = 1;
2186
- var r = Ol(), e = typeof globalThis > "u" ? Je : globalThis;
2186
+ var r = Ll(), e = typeof globalThis > "u" ? Je : globalThis;
2187
2187
  return Tn = function() {
2188
2188
  for (var n = [], i = 0; i < r.length; i++)
2189
2189
  typeof e[r[i]] == "function" && (n[n.length] = r[i]);
@@ -2191,7 +2191,7 @@ function Ll() {
2191
2191
  }, Tn;
2192
2192
  }
2193
2193
  var Fn = { exports: {} }, Bn, Ns;
2194
- function _l() {
2194
+ function ql() {
2195
2195
  if (Ns) return Bn;
2196
2196
  Ns = 1;
2197
2197
  var r = Cr(), e = $o(), t = $t(), n = Lt();
@@ -2223,7 +2223,7 @@ function _l() {
2223
2223
  }, Bn;
2224
2224
  }
2225
2225
  var kn, Is;
2226
- function ql() {
2226
+ function Ml() {
2227
2227
  if (Is) return kn;
2228
2228
  Is = 1;
2229
2229
  var r = Cr(), e = function() {
@@ -2240,10 +2240,10 @@ function ql() {
2240
2240
  }, kn = e, kn;
2241
2241
  }
2242
2242
  var Nn, Rs;
2243
- function Ml() {
2243
+ function Ul() {
2244
2244
  if (Rs) return Nn;
2245
2245
  Rs = 1;
2246
- var r = Qo(), e = _l(), t = ql()(), n = Lt(), i = $t(), s = r("%Math.floor%");
2246
+ var r = Qo(), e = ql(), t = Ml()(), n = Lt(), i = $t(), s = r("%Math.floor%");
2247
2247
  return Nn = function(a, u) {
2248
2248
  if (typeof a != "function")
2249
2249
  throw new i("`fn` is not a function");
@@ -2270,7 +2270,7 @@ function Ml() {
2270
2270
  }, Nn;
2271
2271
  }
2272
2272
  var In, Ps;
2273
- function Ul() {
2273
+ function jl() {
2274
2274
  if (Ps) return In;
2275
2275
  Ps = 1;
2276
2276
  var r = Kt(), e = Di(), t = Yo();
@@ -2279,9 +2279,9 @@ function Ul() {
2279
2279
  }, In;
2280
2280
  }
2281
2281
  var Os;
2282
- function jl() {
2282
+ function Hl() {
2283
2283
  return Os || (Os = 1, function(r) {
2284
- var e = Ml(), t = Cr(), n = vi(), i = Ul();
2284
+ var e = Ul(), t = Cr(), n = vi(), i = jl();
2285
2285
  r.exports = function(o) {
2286
2286
  var a = n(arguments), u = o.length - (arguments.length - 1);
2287
2287
  return e(
@@ -2296,7 +2296,7 @@ var Rn, Ls;
2296
2296
  function ea() {
2297
2297
  if (Ls) return Rn;
2298
2298
  Ls = 1;
2299
- var r = Pl(), e = Ll(), t = jl(), n = Xt(), i = Lt(), s = Ei(), o = n("Object.prototype.toString"), a = Er()(), u = typeof globalThis > "u" ? Je : globalThis, c = e(), l = n("String.prototype.slice"), h = n("Array.prototype.indexOf", !0) || function(F, w) {
2299
+ var r = Ol(), e = _l(), t = Hl(), n = Xt(), i = Lt(), s = Ei(), o = n("Object.prototype.toString"), a = Er()(), u = typeof globalThis > "u" ? Je : globalThis, c = e(), l = n("String.prototype.slice"), h = n("Array.prototype.indexOf", !0) || function(F, w) {
2300
2300
  for (var B = 0; B < F.length; B += 1)
2301
2301
  if (F[B] === w)
2302
2302
  return B;
@@ -2363,7 +2363,7 @@ function ea() {
2363
2363
  }, Rn;
2364
2364
  }
2365
2365
  var Pn, _s;
2366
- function Hl() {
2366
+ function Vl() {
2367
2367
  if (_s) return Pn;
2368
2368
  _s = 1;
2369
2369
  var r = ea();
@@ -2372,9 +2372,9 @@ function Hl() {
2372
2372
  }, Pn;
2373
2373
  }
2374
2374
  var qs;
2375
- function Vl() {
2375
+ function zl() {
2376
2376
  return qs || (qs = 1, function(r) {
2377
- var e = Bl(), t = Il(), n = ea(), i = Hl();
2377
+ var e = kl(), t = Rl(), n = ea(), i = Vl();
2378
2378
  function s(z) {
2379
2379
  return z.call.bind(z);
2380
2380
  }
@@ -2559,7 +2559,7 @@ function Vl() {
2559
2559
  }(Lr)), Lr;
2560
2560
  }
2561
2561
  var On, Ms;
2562
- function zl() {
2562
+ function Gl() {
2563
2563
  return Ms || (Ms = 1, On = function(e) {
2564
2564
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
2565
2565
  }), On;
@@ -2785,7 +2785,7 @@ function ta() {
2785
2785
  `) + " " + L.join(`,
2786
2786
  `) + " " + q[1] : q[0] + V + " " + L.join(", ") + " " + q[1];
2787
2787
  }
2788
- r.types = Vl();
2788
+ r.types = zl();
2789
2789
  function F(L) {
2790
2790
  return Array.isArray(L);
2791
2791
  }
@@ -2842,7 +2842,7 @@ function ta() {
2842
2842
  return L === null || typeof L == "boolean" || typeof L == "number" || typeof L == "string" || typeof L == "symbol" || // ES6 symbol
2843
2843
  typeof L > "u";
2844
2844
  }
2845
- r.isPrimitive = fe, r.isBuffer = zl();
2845
+ r.isPrimitive = fe, r.isBuffer = Gl();
2846
2846
  function de(L) {
2847
2847
  return Object.prototype.toString.call(L);
2848
2848
  }
@@ -2959,7 +2959,7 @@ function ta() {
2959
2959
  }(Or)), Or;
2960
2960
  }
2961
2961
  var Ln, js;
2962
- function Gl() {
2962
+ function Wl() {
2963
2963
  if (js) return Ln;
2964
2964
  js = 1;
2965
2965
  function r(A, v) {
@@ -3240,7 +3240,7 @@ function na() {
3240
3240
  }, Mn;
3241
3241
  }
3242
3242
  var Un, Gs;
3243
- function Wl() {
3243
+ function Jl() {
3244
3244
  if (Gs) return Un;
3245
3245
  Gs = 1, Un = r;
3246
3246
  function r(t, n) {
@@ -3281,7 +3281,7 @@ function ia() {
3281
3281
  var e;
3282
3282
  _.WritableState = N;
3283
3283
  var t = {
3284
- deprecate: Wl()
3284
+ deprecate: Jl()
3285
3285
  }, n = Go(), i = vr.Buffer, s = (typeof Je < "u" ? Je : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
3286
3286
  };
3287
3287
  function o(P) {
@@ -3560,7 +3560,7 @@ function kt() {
3560
3560
  }), Hn;
3561
3561
  }
3562
3562
  var Vn = {}, tr = { exports: {} }, $s;
3563
- function Jl() {
3563
+ function $l() {
3564
3564
  return $s || ($s = 1, function(r, e) {
3565
3565
  var t = vr, n = t.Buffer;
3566
3566
  function i(o, a) {
@@ -3595,7 +3595,7 @@ var Ks;
3595
3595
  function li() {
3596
3596
  if (Ks) return Vn;
3597
3597
  Ks = 1;
3598
- var r = Jl().Buffer, e = r.isEncoding || function(w) {
3598
+ var r = $l().Buffer, e = r.isEncoding || function(w) {
3599
3599
  switch (w = "" + w, w && w.toLowerCase()) {
3600
3600
  case "hex":
3601
3601
  case "utf8":
@@ -3797,7 +3797,7 @@ function Ci() {
3797
3797
  return zn = i, zn;
3798
3798
  }
3799
3799
  var Gn, Ys;
3800
- function $l() {
3800
+ function Kl() {
3801
3801
  if (Ys) return Gn;
3802
3802
  Ys = 1;
3803
3803
  var r;
@@ -3923,7 +3923,7 @@ function $l() {
3923
3923
  return Gn = B, Gn;
3924
3924
  }
3925
3925
  var Wn, Zs;
3926
- function Kl() {
3926
+ function Xl() {
3927
3927
  return Zs || (Zs = 1, Wn = function() {
3928
3928
  throw new Error("Readable.from is not available in the browser");
3929
3929
  }), Wn;
@@ -3947,7 +3947,7 @@ function sa() {
3947
3947
  var a = ta(), u;
3948
3948
  a && a.debuglog ? u = a.debuglog("stream") : u = function() {
3949
3949
  };
3950
- var c = Gl(), l = ra(), h = na(), g = h.getHighWaterMark, E = _t().codes, A = E.ERR_INVALID_ARG_TYPE, v = E.ERR_STREAM_PUSH_AFTER_EOF, F = E.ERR_METHOD_NOT_IMPLEMENTED, w = E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, B, R, D;
3950
+ var c = Wl(), l = ra(), h = na(), g = h.getHighWaterMark, E = _t().codes, A = E.ERR_INVALID_ARG_TYPE, v = E.ERR_STREAM_PUSH_AFTER_EOF, F = E.ERR_METHOD_NOT_IMPLEMENTED, w = E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, B, R, D;
3951
3951
  At()(C, t);
3952
3952
  var k = l.errorOrDestroy, N = ["error", "close", "destroy", "pause", "resume"];
3953
3953
  function M(b, x, U) {
@@ -4096,7 +4096,7 @@ function sa() {
4096
4096
  b.on("drain", z);
4097
4097
  var Se = !1;
4098
4098
  function Be() {
4099
- u("cleanup"), b.removeListener("close", Ue), b.removeListener("finish", _e), b.removeListener("drain", z), b.removeListener("error", Ge), b.removeListener("unpipe", te), U.removeListener("end", ue), U.removeListener("end", st), U.removeListener("data", Ve), Se = !0, W.awaitDrain && (!b._writableState || b._writableState.needDrain) && z();
4099
+ u("cleanup"), b.removeListener("close", je), b.removeListener("finish", _e), b.removeListener("drain", z), b.removeListener("error", Ge), b.removeListener("unpipe", te), U.removeListener("end", ue), U.removeListener("end", st), U.removeListener("data", Ve), Se = !0, W.awaitDrain && (!b._writableState || b._writableState.needDrain) && z();
4100
4100
  }
4101
4101
  U.on("data", Ve);
4102
4102
  function Ve(lt) {
@@ -4108,12 +4108,12 @@ function sa() {
4108
4108
  u("onerror", lt), st(), b.removeListener("error", Ge), e(b, "error") === 0 && k(b, lt);
4109
4109
  }
4110
4110
  M(b, "error", Ge);
4111
- function Ue() {
4111
+ function je() {
4112
4112
  b.removeListener("finish", _e), st();
4113
4113
  }
4114
- b.once("close", Ue);
4114
+ b.once("close", je);
4115
4115
  function _e() {
4116
- u("onfinish"), b.removeListener("close", Ue), st();
4116
+ u("onfinish"), b.removeListener("close", je), st();
4117
4117
  }
4118
4118
  b.once("finish", _e);
4119
4119
  function st() {
@@ -4204,7 +4204,7 @@ function sa() {
4204
4204
  u("wrapped _read", te), W && (W = !1, b.resume());
4205
4205
  }, this;
4206
4206
  }, typeof Symbol == "function" && (C.prototype[Symbol.asyncIterator] = function() {
4207
- return R === void 0 && (R = $l()), R(this);
4207
+ return R === void 0 && (R = Kl()), R(this);
4208
4208
  }), Object.defineProperty(C.prototype, "readableHighWaterMark", {
4209
4209
  // making it explicit this property is not enumerable
4210
4210
  // because otherwise some prototype manipulation in
@@ -4257,7 +4257,7 @@ function sa() {
4257
4257
  }
4258
4258
  }
4259
4259
  typeof Symbol == "function" && (C.from = function(b, x) {
4260
- return D === void 0 && (D = Kl()), D(C, b, x);
4260
+ return D === void 0 && (D = Xl()), D(C, b, x);
4261
4261
  });
4262
4262
  function S(b, x) {
4263
4263
  for (var U = 0, W = b.length; U < W; U++)
@@ -4326,7 +4326,7 @@ function oa() {
4326
4326
  return $n;
4327
4327
  }
4328
4328
  var Kn, to;
4329
- function Xl() {
4329
+ function Yl() {
4330
4330
  if (to) return Kn;
4331
4331
  to = 1, Kn = e;
4332
4332
  var r = oa();
@@ -4340,7 +4340,7 @@ function Xl() {
4340
4340
  }, Kn;
4341
4341
  }
4342
4342
  var Xn, ro;
4343
- function Yl() {
4343
+ function Zl() {
4344
4344
  if (ro) return Xn;
4345
4345
  ro = 1;
4346
4346
  var r;
@@ -4404,11 +4404,11 @@ function Yl() {
4404
4404
  return Xn = h, Xn;
4405
4405
  }
4406
4406
  var Yn, no;
4407
- function Zl() {
4407
+ function Ql() {
4408
4408
  if (no) return Yn;
4409
4409
  no = 1, Yn = t;
4410
4410
  var r = xi().EventEmitter, e = At();
4411
- e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex = kt(), t.Transform = oa(), t.PassThrough = Xl(), t.finished = Ci(), t.pipeline = Yl(), t.Stream = t;
4411
+ e(t, r), t.Readable = sa(), t.Writable = ia(), t.Duplex = kt(), t.Transform = oa(), t.PassThrough = Yl(), t.finished = Ci(), t.pipeline = Zl(), t.Stream = t;
4412
4412
  function t() {
4413
4413
  r.call(this);
4414
4414
  }
@@ -4542,7 +4542,7 @@ function Zl() {
4542
4542
  };
4543
4543
  var a;
4544
4544
  try {
4545
- a = Zl().Stream;
4545
+ a = Ql().Stream;
4546
4546
  } catch {
4547
4547
  a = function() {
4548
4548
  };
@@ -5330,7 +5330,7 @@ var Si = {
5330
5330
  isArray: function(r) {
5331
5331
  return Array.isArray ? Array.isArray(r) : Object.prototype.toString.call(r) === "[object Array]";
5332
5332
  }
5333
- }, Ql = Si.isArray, Ti = {
5333
+ }, ec = Si.isArray, Ti = {
5334
5334
  copyOptions: function(r) {
5335
5335
  var e, t = {};
5336
5336
  for (e in r)
@@ -5344,7 +5344,7 @@ var Si = {
5344
5344
  (!("spaces" in r) || typeof r.spaces != "number" && typeof r.spaces != "string") && (r.spaces = 0);
5345
5345
  },
5346
5346
  ensureAlwaysArrayExists: function(r) {
5347
- (!("alwaysArray" in r) || typeof r.alwaysArray != "boolean" && !Ql(r.alwaysArray)) && (r.alwaysArray = !1);
5347
+ (!("alwaysArray" in r) || typeof r.alwaysArray != "boolean" && !ec(r.alwaysArray)) && (r.alwaysArray = !1);
5348
5348
  },
5349
5349
  ensureKeyExists: function(r, e) {
5350
5350
  (!(r + "Key" in e) || typeof e[r + "Key"] != "string") && (e[r + "Key"] = e.compact ? "_" + r : r);
@@ -5352,8 +5352,8 @@ var Si = {
5352
5352
  checkFnExists: function(r, e) {
5353
5353
  return r + "Fn" in e;
5354
5354
  }
5355
- }, ec = Uo, me = Ti, Ft = Si.isArray, j, le;
5356
- function tc(r) {
5355
+ }, tc = Uo, me = Ti, Ft = Si.isArray, j, le;
5356
+ function rc(r) {
5357
5357
  return j = me.copyOptions(r), me.ensureFlagExists("ignoreDeclaration", j), me.ensureFlagExists("ignoreInstruction", j), me.ensureFlagExists("ignoreAttributes", j), me.ensureFlagExists("ignoreText", j), me.ensureFlagExists("ignoreComment", j), me.ensureFlagExists("ignoreCdata", j), me.ensureFlagExists("ignoreDoctype", j), me.ensureFlagExists("compact", j), me.ensureFlagExists("alwaysChildren", j), me.ensureFlagExists("addParent", j), me.ensureFlagExists("trim", j), me.ensureFlagExists("nativeType", j), me.ensureFlagExists("nativeTypeAttributes", j), me.ensureFlagExists("sanitize", j), me.ensureFlagExists("instructionHasAttributes", j), me.ensureFlagExists("captureSpacesBetweenElements", j), me.ensureAlwaysArrayExists(j), me.ensureKeyExists("declaration", j), me.ensureKeyExists("instruction", j), me.ensureKeyExists("attributes", j), me.ensureKeyExists("text", j), me.ensureKeyExists("comment", j), me.ensureKeyExists("cdata", j), me.ensureKeyExists("doctype", j), me.ensureKeyExists("type", j), me.ensureKeyExists("name", j), me.ensureKeyExists("elements", j), me.ensureKeyExists("parent", j), me.checkFnExists("doctype", j), me.checkFnExists("instruction", j), me.checkFnExists("cdata", j), me.checkFnExists("comment", j), me.checkFnExists("text", j), me.checkFnExists("instructionName", j), me.checkFnExists("elementName", j), me.checkFnExists("attributeName", j), me.checkFnExists("attributeValue", j), me.checkFnExists("attributes", j), j;
5358
5358
  }
5359
5359
  function aa(r) {
@@ -5401,7 +5401,7 @@ function ua(r) {
5401
5401
  }
5402
5402
  return r;
5403
5403
  }
5404
- function rc(r) {
5404
+ function nc(r) {
5405
5405
  var e = {};
5406
5406
  if (r.body && (r.name.toLowerCase() === "xml" || j.instructionHasAttributes)) {
5407
5407
  for (var t = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g, n; (n = t.exec(r.body)) !== null; )
@@ -5420,7 +5420,7 @@ function rc(r) {
5420
5420
  j.instructionHasAttributes && Object.keys(e).length ? (i[r.name] = {}, i[r.name][j.attributesKey] = e) : i[r.name] = r.body, Yt("instruction", i);
5421
5421
  }
5422
5422
  }
5423
- function nc(r, e) {
5423
+ function ic(r, e) {
5424
5424
  var t;
5425
5425
  if (typeof r == "object" && (e = r.attributes, r = r.name), e = ua(e), "elementNameFn" in j && (r = j.elementNameFn(r, le)), j.compact) {
5426
5426
  if (t = {}, !j.ignoreAttributes && e && Object.keys(e).length) {
@@ -5434,44 +5434,44 @@ function nc(r, e) {
5434
5434
  le[j.elementsKey] || (le[j.elementsKey] = []), t = {}, t[j.typeKey] = "element", t[j.nameKey] = r, !j.ignoreAttributes && e && Object.keys(e).length && (t[j.attributesKey] = e), j.alwaysChildren && (t[j.elementsKey] = []), le[j.elementsKey].push(t);
5435
5435
  t[j.parentKey] = le, le = t;
5436
5436
  }
5437
- function ic(r) {
5437
+ function sc(r) {
5438
5438
  j.ignoreText || !r.trim() && !j.captureSpacesBetweenElements || (j.trim && (r = r.trim()), j.nativeType && (r = aa(r)), j.sanitize && (r = r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")), Yt("text", r));
5439
5439
  }
5440
- function sc(r) {
5440
+ function oc(r) {
5441
5441
  j.ignoreComment || (j.trim && (r = r.trim()), Yt("comment", r));
5442
5442
  }
5443
- function oc(r) {
5443
+ function ac(r) {
5444
5444
  var e = le[j.parentKey];
5445
5445
  j.addParent || delete le[j.parentKey], le = e;
5446
5446
  }
5447
- function ac(r) {
5447
+ function uc(r) {
5448
5448
  j.ignoreCdata || (j.trim && (r = r.trim()), Yt("cdata", r));
5449
5449
  }
5450
- function uc(r) {
5450
+ function lc(r) {
5451
5451
  j.ignoreDoctype || (r = r.replace(/^ /, ""), j.trim && (r = r.trim()), Yt("doctype", r));
5452
5452
  }
5453
- function lc(r) {
5453
+ function cc(r) {
5454
5454
  r.note = r;
5455
5455
  }
5456
5456
  var la = function(r, e) {
5457
- var t = ec.parser(!0, {}), n = {};
5458
- if (le = n, j = tc(e), t.opt = { strictEntities: !0 }, t.onopentag = nc, t.ontext = ic, t.oncomment = sc, t.onclosetag = oc, t.onerror = lc, t.oncdata = ac, t.ondoctype = uc, t.onprocessinginstruction = rc, t.write(r).close(), n[j.elementsKey]) {
5457
+ var t = tc.parser(!0, {}), n = {};
5458
+ if (le = n, j = rc(e), t.opt = { strictEntities: !0 }, t.onopentag = ic, t.ontext = sc, t.oncomment = oc, t.onclosetag = ac, t.onerror = cc, t.oncdata = uc, t.ondoctype = lc, t.onprocessinginstruction = nc, t.write(r).close(), n[j.elementsKey]) {
5459
5459
  var i = n[j.elementsKey];
5460
5460
  delete n[j.elementsKey], n[j.elementsKey] = i, delete n.text;
5461
5461
  }
5462
5462
  return n;
5463
- }, io = Ti, cc = la;
5464
- function fc(r) {
5463
+ }, io = Ti, fc = la;
5464
+ function dc(r) {
5465
5465
  var e = io.copyOptions(r);
5466
5466
  return io.ensureSpacesExists(e), e;
5467
5467
  }
5468
- var dc = function(r, e) {
5468
+ var mc = function(r, e) {
5469
5469
  var t, n, i, s;
5470
- return t = fc(e), n = cc(r, t), s = "compact" in t && t.compact ? "_parent" : "parent", "addParent" in t && t.addParent ? i = JSON.stringify(n, function(o, a) {
5470
+ return t = dc(e), n = fc(r, t), s = "compact" in t && t.compact ? "_parent" : "parent", "addParent" in t && t.addParent ? i = JSON.stringify(n, function(o, a) {
5471
5471
  return o === s ? "_" : a;
5472
5472
  }, t.spaces) : i = JSON.stringify(n, null, t.spaces), i.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
5473
- }, he = Ti, mc = Si.isArray, Re, Pe;
5474
- function pc(r) {
5473
+ }, he = Ti, pc = Si.isArray, Re, Pe;
5474
+ function hc(r) {
5475
5475
  var e = he.copyOptions(r);
5476
5476
  return he.ensureFlagExists("ignoreDeclaration", e), he.ensureFlagExists("ignoreInstruction", e), he.ensureFlagExists("ignoreAttributes", e), he.ensureFlagExists("ignoreText", e), he.ensureFlagExists("ignoreComment", e), he.ensureFlagExists("ignoreCdata", e), he.ensureFlagExists("ignoreDoctype", e), he.ensureFlagExists("compact", e), he.ensureFlagExists("indentText", e), he.ensureFlagExists("indentCdata", e), he.ensureFlagExists("indentAttributes", e), he.ensureFlagExists("indentInstruction", e), he.ensureFlagExists("fullTagEmptyElement", e), he.ensureFlagExists("noQuotesForNativeAttributes", e), he.ensureSpacesExists(e), typeof e.spaces == "number" && (e.spaces = Array(e.spaces + 1).join(" ")), he.ensureKeyExists("declaration", e), he.ensureKeyExists("instruction", e), he.ensureKeyExists("attributes", e), he.ensureKeyExists("text", e), he.ensureKeyExists("comment", e), he.ensureKeyExists("cdata", e), he.ensureKeyExists("doctype", e), he.ensureKeyExists("type", e), he.ensureKeyExists("name", e), he.ensureKeyExists("elements", e), he.checkFnExists("doctype", e), he.checkFnExists("instruction", e), he.checkFnExists("cdata", e), he.checkFnExists("comment", e), he.checkFnExists("text", e), he.checkFnExists("instructionName", e), he.checkFnExists("elementName", e), he.checkFnExists("attributeName", e), he.checkFnExists("attributeValue", e), he.checkFnExists("attributes", e), he.checkFnExists("fullTagEmptyElement", e), e;
5477
5477
  }
@@ -5516,7 +5516,7 @@ function pa(r, e) {
5516
5516
  function Fi(r, e) {
5517
5517
  return e.ignoreText ? "" : (r = "" + r, r = r.replace(/&amp;/g, "&"), r = r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), "textFn" in e ? e.textFn(r, Pe, Re) : r);
5518
5518
  }
5519
- function hc(r, e) {
5519
+ function gc(r, e) {
5520
5520
  var t;
5521
5521
  if (r.elements && r.elements.length)
5522
5522
  for (t = 0; t < r.elements.length; ++t)
@@ -5542,12 +5542,12 @@ function hc(r, e) {
5542
5542
  }
5543
5543
  return !1;
5544
5544
  }
5545
- function gc(r, e, t) {
5545
+ function wc(r, e, t) {
5546
5546
  Re = r, Pe = r.name;
5547
5547
  var n = [], i = "elementNameFn" in e ? e.elementNameFn(r.name, r) : r.name;
5548
5548
  n.push("<" + i), r[e.attributesKey] && n.push(Sr(r[e.attributesKey], e, t));
5549
5549
  var s = r[e.elementsKey] && r[e.elementsKey].length || r[e.attributesKey] && r[e.attributesKey]["xml:space"] === "preserve";
5550
- return s || ("fullTagEmptyElementFn" in e ? s = e.fullTagEmptyElementFn(r.name, r) : s = e.fullTagEmptyElement), s ? (n.push(">"), r[e.elementsKey] && r[e.elementsKey].length && (n.push(ha(r[e.elementsKey], e, t + 1)), Re = r, Pe = r.name), n.push(e.spaces && hc(r, e) ? `
5550
+ return s || ("fullTagEmptyElementFn" in e ? s = e.fullTagEmptyElementFn(r.name, r) : s = e.fullTagEmptyElement), s ? (n.push(">"), r[e.elementsKey] && r[e.elementsKey].length && (n.push(ha(r[e.elementsKey], e, t + 1)), Re = r, Pe = r.name), n.push(e.spaces && gc(r, e) ? `
5551
5551
  ` + Array(t + 1).join(e.spaces) : ""), n.push("</" + i + ">")) : n.push("/>"), n.join("");
5552
5552
  }
5553
5553
  function ha(r, e, t, n) {
@@ -5555,7 +5555,7 @@ function ha(r, e, t, n) {
5555
5555
  var o = Ze(e, t, n && !i);
5556
5556
  switch (s.type) {
5557
5557
  case "element":
5558
- return i + o + gc(s, e, t);
5558
+ return i + o + wc(s, e, t);
5559
5559
  case "comment":
5560
5560
  return i + o + da(s[e.commentKey], e);
5561
5561
  case "doctype":
@@ -5598,7 +5598,7 @@ function ga(r, e, t) {
5598
5598
  }
5599
5599
  return !1;
5600
5600
  }
5601
- function wc(r, e, t, n, i) {
5601
+ function yc(r, e, t, n, i) {
5602
5602
  Re = r, Pe = e;
5603
5603
  var s = "elementNameFn" in t ? t.elementNameFn(e, r) : e;
5604
5604
  if (typeof r > "u" || r === null || r === "")
@@ -5620,7 +5620,7 @@ function wa(r, e, t, n) {
5620
5620
  var i, s, o, a = [];
5621
5621
  for (s in r)
5622
5622
  if (r.hasOwnProperty(s))
5623
- for (o = mc(r[s]) ? r[s] : [r[s]], i = 0; i < o.length; ++i) {
5623
+ for (o = pc(r[s]) ? r[s] : [r[s]], i = 0; i < o.length; ++i) {
5624
5624
  switch (s) {
5625
5625
  case e.declarationKey:
5626
5626
  a.push(ca(o[i], e, t));
@@ -5644,17 +5644,17 @@ function wa(r, e, t, n) {
5644
5644
  a.push(Ze(e, t, n) + da(o[i], e));
5645
5645
  break;
5646
5646
  default:
5647
- a.push(Ze(e, t, n) + wc(o[i], s, e, t, ga(o[i], e)));
5647
+ a.push(Ze(e, t, n) + yc(o[i], s, e, t, ga(o[i], e)));
5648
5648
  }
5649
5649
  n = n && !a.length;
5650
5650
  }
5651
5651
  return a.join("");
5652
5652
  }
5653
5653
  var ya = function(r, e) {
5654
- e = pc(e);
5654
+ e = hc(e);
5655
5655
  var t = [];
5656
5656
  return Re = r, Pe = "_root_", e.compact ? t.push(wa(r, e, 0, !0)) : (r[e.declarationKey] && t.push(ca(r[e.declarationKey], e, 0)), r[e.elementsKey] && r[e.elementsKey].length && t.push(ha(r[e.elementsKey], e, 0, !t.length))), t.join("");
5657
- }, yc = ya, bc = function(r, e) {
5657
+ }, bc = ya, xc = function(r, e) {
5658
5658
  r instanceof St && (r = r.toString());
5659
5659
  var t = null;
5660
5660
  if (typeof r == "string")
@@ -5665,37 +5665,37 @@ var ya = function(r, e) {
5665
5665
  }
5666
5666
  else
5667
5667
  t = r;
5668
- return yc(t, e);
5669
- }, xc = la, Ac = dc, Dc = ya, vc = bc, Ec = {
5670
- xml2js: xc,
5671
- xml2json: Ac,
5672
- js2xml: Dc,
5673
- json2xml: vc
5668
+ return bc(t, e);
5669
+ }, Ac = la, Dc = mc, vc = ya, Ec = xc, Cc = {
5670
+ xml2js: Ac,
5671
+ xml2json: Dc,
5672
+ js2xml: vc,
5673
+ json2xml: Ec
5674
5674
  };
5675
- const ba = /* @__PURE__ */ qo(Ec);
5676
- var rr, Cc = new Uint8Array(16);
5677
- function Sc() {
5675
+ const ba = /* @__PURE__ */ qo(Cc);
5676
+ var rr, Sc = new Uint8Array(16);
5677
+ function Tc() {
5678
5678
  if (!rr && (rr = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !rr))
5679
5679
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
5680
- return rr(Cc);
5680
+ return rr(Sc);
5681
5681
  }
5682
- const Tc = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
5683
- function Fc(r) {
5684
- return typeof r == "string" && Tc.test(r);
5682
+ const Fc = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
5683
+ function Bc(r) {
5684
+ return typeof r == "string" && Fc.test(r);
5685
5685
  }
5686
5686
  var ke = [];
5687
5687
  for (var Zn = 0; Zn < 256; ++Zn)
5688
5688
  ke.push((Zn + 256).toString(16).substr(1));
5689
- function Bc(r) {
5689
+ function kc(r) {
5690
5690
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = (ke[r[e + 0]] + ke[r[e + 1]] + ke[r[e + 2]] + ke[r[e + 3]] + "-" + ke[r[e + 4]] + ke[r[e + 5]] + "-" + ke[r[e + 6]] + ke[r[e + 7]] + "-" + ke[r[e + 8]] + ke[r[e + 9]] + "-" + ke[r[e + 10]] + ke[r[e + 11]] + ke[r[e + 12]] + ke[r[e + 13]] + ke[r[e + 14]] + ke[r[e + 15]]).toLowerCase();
5691
- if (!Fc(t))
5691
+ if (!Bc(t))
5692
5692
  throw TypeError("Stringified UUID is invalid");
5693
5693
  return t;
5694
5694
  }
5695
5695
  function xa(r, e, t) {
5696
5696
  r = r || {};
5697
- var n = r.random || (r.rng || Sc)();
5698
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Bc(n);
5697
+ var n = r.random || (r.rng || Tc)();
5698
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, kc(n);
5699
5699
  }
5700
5700
  var dr = { exports: {} };
5701
5701
  /*! https://mths.be/he v1.2.0 by @mathias | MIT license */
@@ -5807,8 +5807,8 @@ dr.exports;
5807
5807
  t.he = Y;
5808
5808
  })(Je);
5809
5809
  })(dr, dr.exports);
5810
- var kc = dr.exports;
5811
- const Nc = /* @__PURE__ */ qo(kc);
5810
+ var Nc = dr.exports;
5811
+ const Ic = /* @__PURE__ */ qo(Nc);
5812
5812
  function Ne(r) {
5813
5813
  this.content = r;
5814
5814
  }
@@ -6446,7 +6446,7 @@ function Ea(r, e, t, n) {
6446
6446
  let a = Ea(o.content, e - s - 1, t);
6447
6447
  return a && r.replaceChild(i, o.copy(a));
6448
6448
  }
6449
- function Ic(r, e, t) {
6449
+ function Rc(r, e, t) {
6450
6450
  if (t.openStart > r.depth)
6451
6451
  throw new pr("Inserted content deeper than insertion position");
6452
6452
  if (r.depth - t.openStart != e.depth - t.openEnd)
@@ -6463,7 +6463,7 @@ function Ca(r, e, t, n) {
6463
6463
  let o = r.parent, a = o.content;
6464
6464
  return wt(o, a.cut(0, r.parentOffset).append(t.content).append(a.cut(e.parentOffset)));
6465
6465
  } else {
6466
- let { start: o, end: a } = Rc(t, r);
6466
+ let { start: o, end: a } = Pc(t, r);
6467
6467
  return wt(s, Ta(r, o, a, e, n));
6468
6468
  }
6469
6469
  else return wt(s, hr(r, e, n));
@@ -6502,7 +6502,7 @@ function hr(r, e, t) {
6502
6502
  }
6503
6503
  return Vt(e, null, t, n), new Q(n);
6504
6504
  }
6505
- function Rc(r, e) {
6505
+ function Pc(r, e) {
6506
6506
  let t = e.depth - r.openStart, i = e.node(t).copy(r.content);
6507
6507
  for (let s = t - 1; s >= 0; s--)
6508
6508
  i = e.node(s).copy(Q.from(i));
@@ -6696,7 +6696,7 @@ class zt {
6696
6696
  return e.blockRange(this);
6697
6697
  for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--)
6698
6698
  if (e.pos <= this.end(n) && (!t || t(this.node(n))))
6699
- return new Lc(this, e, n);
6699
+ return new _c(this, e, n);
6700
6700
  return null;
6701
6701
  }
6702
6702
  /**
@@ -6753,18 +6753,18 @@ class zt {
6753
6753
  return o;
6754
6754
  }
6755
6755
  else
6756
- so.set(e, n = new Pc());
6756
+ so.set(e, n = new Oc());
6757
6757
  let i = n.elts[n.i] = zt.resolve(e, t);
6758
- return n.i = (n.i + 1) % Oc, i;
6758
+ return n.i = (n.i + 1) % Lc, i;
6759
6759
  }
6760
6760
  }
6761
- class Pc {
6761
+ class Oc {
6762
6762
  constructor() {
6763
6763
  this.elts = [], this.i = 0;
6764
6764
  }
6765
6765
  }
6766
- const Oc = 12, so = /* @__PURE__ */ new WeakMap();
6767
- class Lc {
6766
+ const Lc = 12, so = /* @__PURE__ */ new WeakMap();
6767
+ class _c {
6768
6768
  /**
6769
6769
  Construct a node range. `$from` and `$to` should point into the
6770
6770
  same node until at least the given `depth`, since a node range
@@ -6804,7 +6804,7 @@ class Lc {
6804
6804
  return this.$to.indexAfter(this.depth);
6805
6805
  }
6806
6806
  }
6807
- const _c = /* @__PURE__ */ Object.create(null);
6807
+ const qc = /* @__PURE__ */ Object.create(null);
6808
6808
  class rt {
6809
6809
  /**
6810
6810
  @internal
@@ -6923,7 +6923,7 @@ class rt {
6923
6923
  attributes, and marks.
6924
6924
  */
6925
6925
  hasMarkup(e, t, n) {
6926
- return this.type == e && mr(this.attrs, t || e.defaultAttrs || _c) && we.sameSet(this.marks, n || we.none);
6926
+ return this.type == e && mr(this.attrs, t || e.defaultAttrs || qc) && we.sameSet(this.marks, n || we.none);
6927
6927
  }
6928
6928
  /**
6929
6929
  Create a new node with the same markup as this node, containing
@@ -6966,7 +6966,7 @@ class rt {
6966
6966
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
6967
6967
  */
6968
6968
  replace(e, t, n) {
6969
- return Ic(this.resolve(e), this.resolve(t), n);
6969
+ return Rc(this.resolve(e), this.resolve(t), n);
6970
6970
  }
6971
6971
  /**
6972
6972
  Find the node directly after the given position.
@@ -7229,13 +7229,13 @@ class yt {
7229
7229
  @internal
7230
7230
  */
7231
7231
  static parse(e, t) {
7232
- let n = new qc(e, t);
7232
+ let n = new Mc(e, t);
7233
7233
  if (n.next == null)
7234
7234
  return yt.empty;
7235
7235
  let i = Ba(n);
7236
7236
  n.next && n.err("Unexpected trailing text");
7237
- let s = Gc(zc(i));
7238
- return Wc(s, n), s;
7237
+ let s = Wc(Gc(i));
7238
+ return Jc(s, n), s;
7239
7239
  }
7240
7240
  /**
7241
7241
  Match a node type, returning a match after that node if
@@ -7381,7 +7381,7 @@ class yt {
7381
7381
  }
7382
7382
  }
7383
7383
  yt.empty = new yt(!0);
7384
- class qc {
7384
+ class Mc {
7385
7385
  constructor(e, t) {
7386
7386
  this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
7387
7387
  }
@@ -7398,19 +7398,19 @@ class qc {
7398
7398
  function Ba(r) {
7399
7399
  let e = [];
7400
7400
  do
7401
- e.push(Mc(r));
7401
+ e.push(Uc(r));
7402
7402
  while (r.eat("|"));
7403
7403
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
7404
7404
  }
7405
- function Mc(r) {
7405
+ function Uc(r) {
7406
7406
  let e = [];
7407
7407
  do
7408
- e.push(Uc(r));
7408
+ e.push(jc(r));
7409
7409
  while (r.next && r.next != ")" && r.next != "|");
7410
7410
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
7411
7411
  }
7412
- function Uc(r) {
7413
- let e = Vc(r);
7412
+ function jc(r) {
7413
+ let e = zc(r);
7414
7414
  for (; ; )
7415
7415
  if (r.eat("+"))
7416
7416
  e = { type: "plus", expr: e };
@@ -7419,7 +7419,7 @@ function Uc(r) {
7419
7419
  else if (r.eat("?"))
7420
7420
  e = { type: "opt", expr: e };
7421
7421
  else if (r.eat("{"))
7422
- e = jc(r, e);
7422
+ e = Hc(r, e);
7423
7423
  else
7424
7424
  break;
7425
7425
  return e;
@@ -7429,11 +7429,11 @@ function oo(r) {
7429
7429
  let e = Number(r.next);
7430
7430
  return r.pos++, e;
7431
7431
  }
7432
- function jc(r, e) {
7432
+ function Hc(r, e) {
7433
7433
  let t = oo(r), n = t;
7434
7434
  return r.eat(",") && (r.next != "}" ? n = oo(r) : n = -1), r.eat("}") || r.err("Unclosed braced range"), { type: "range", min: t, max: n, expr: e };
7435
7435
  }
7436
- function Hc(r, e) {
7436
+ function Vc(r, e) {
7437
7437
  let t = r.nodeTypes, n = t[e];
7438
7438
  if (n)
7439
7439
  return [n];
@@ -7444,18 +7444,18 @@ function Hc(r, e) {
7444
7444
  }
7445
7445
  return i.length == 0 && r.err("No node type or group '" + e + "' found"), i;
7446
7446
  }
7447
- function Vc(r) {
7447
+ function zc(r) {
7448
7448
  if (r.eat("(")) {
7449
7449
  let e = Ba(r);
7450
7450
  return r.eat(")") || r.err("Missing closing paren"), e;
7451
7451
  } else if (/\W/.test(r.next))
7452
7452
  r.err("Unexpected token '" + r.next + "'");
7453
7453
  else {
7454
- let e = Hc(r, r.next).map((t) => (r.inline == null ? r.inline = t.isInline : r.inline != t.isInline && r.err("Mixing inline and block content"), { type: "name", value: t }));
7454
+ let e = Vc(r, r.next).map((t) => (r.inline == null ? r.inline = t.isInline : r.inline != t.isInline && r.err("Mixing inline and block content"), { type: "name", value: t }));
7455
7455
  return r.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
7456
7456
  }
7457
7457
  }
7458
- function zc(r) {
7458
+ function Gc(r) {
7459
7459
  let e = [[]];
7460
7460
  return i(s(r, 0), t()), e;
7461
7461
  function t() {
@@ -7526,7 +7526,7 @@ function ao(r, e) {
7526
7526
  }
7527
7527
  }
7528
7528
  }
7529
- function Gc(r) {
7529
+ function Wc(r) {
7530
7530
  let e = /* @__PURE__ */ Object.create(null);
7531
7531
  return t(ao(r, 0));
7532
7532
  function t(n) {
@@ -7551,7 +7551,7 @@ function Gc(r) {
7551
7551
  return s;
7552
7552
  }
7553
7553
  }
7554
- function Wc(r, e) {
7554
+ function Jc(r, e) {
7555
7555
  for (let t = 0, n = [r]; t < n.length; t++) {
7556
7556
  let i = n[t], s = !i.validEnd, o = [];
7557
7557
  for (let a = 0; a < i.next.length; a++) {
@@ -7599,7 +7599,7 @@ function Pa(r, e) {
7599
7599
  let t = /* @__PURE__ */ Object.create(null);
7600
7600
  if (e)
7601
7601
  for (let n in e)
7602
- t[n] = new $c(r, n, e[n]);
7602
+ t[n] = new Kc(r, n, e[n]);
7603
7603
  return t;
7604
7604
  }
7605
7605
  class wr {
@@ -7781,7 +7781,7 @@ class wr {
7781
7781
  return n;
7782
7782
  }
7783
7783
  }
7784
- function Jc(r, e, t) {
7784
+ function $c(r, e, t) {
7785
7785
  let n = t.split("|");
7786
7786
  return (i) => {
7787
7787
  let s = i === null ? "null" : typeof i;
@@ -7789,9 +7789,9 @@ function Jc(r, e, t) {
7789
7789
  throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${s}`);
7790
7790
  };
7791
7791
  }
7792
- class $c {
7792
+ class Kc {
7793
7793
  constructor(e, t, n) {
7794
- this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? Jc(e, t, n.validate) : n.validate;
7794
+ this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? $c(e, t, n.validate) : n.validate;
7795
7795
  }
7796
7796
  get isRequired() {
7797
7797
  return !this.hasDefault;
@@ -7852,7 +7852,7 @@ class Tr {
7852
7852
  return this.excluded.indexOf(e) > -1;
7853
7853
  }
7854
7854
  }
7855
- let kp = class {
7855
+ let Ip = class {
7856
7856
  /**
7857
7857
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
7858
7858
  */
@@ -7951,10 +7951,10 @@ function uo(r, e) {
7951
7951
  }
7952
7952
  return t;
7953
7953
  }
7954
- function Kc(r) {
7954
+ function Xc(r) {
7955
7955
  return r.tag != null;
7956
7956
  }
7957
- function Xc(r) {
7957
+ function Yc(r) {
7958
7958
  return r.style != null;
7959
7959
  }
7960
7960
  class yr {
@@ -7966,9 +7966,9 @@ class yr {
7966
7966
  this.schema = e, this.rules = t, this.tags = [], this.styles = [];
7967
7967
  let n = this.matchedStyles = [];
7968
7968
  t.forEach((i) => {
7969
- if (Kc(i))
7969
+ if (Xc(i))
7970
7970
  this.tags.push(i);
7971
- else if (Xc(i)) {
7971
+ else if (Yc(i)) {
7972
7972
  let s = /[^=]*/.exec(i.style)[0];
7973
7973
  n.indexOf(s) < 0 && n.push(s), this.styles.push(i);
7974
7974
  }
@@ -8004,7 +8004,7 @@ class yr {
8004
8004
  matchTag(e, t, n) {
8005
8005
  for (let i = n ? this.tags.indexOf(n) + 1 : 0; i < this.tags.length; i++) {
8006
8006
  let s = this.tags[i];
8007
- if (Qc(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
8007
+ if (ef(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
8008
8008
  if (s.getAttrs) {
8009
8009
  let o = s.getAttrs(e);
8010
8010
  if (o === !1)
@@ -8105,7 +8105,7 @@ const Oa = {
8105
8105
  table: !0,
8106
8106
  tfoot: !0,
8107
8107
  ul: !0
8108
- }, Yc = {
8108
+ }, Zc = {
8109
8109
  head: !0,
8110
8110
  noscript: !0,
8111
8111
  object: !0,
@@ -8184,9 +8184,9 @@ class co {
8184
8184
  let i = this.localPreserveWS, s = this.top;
8185
8185
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
8186
8186
  let o = e.nodeName.toLowerCase(), a;
8187
- La.hasOwnProperty(o) && this.parser.normalizeLists && Zc(e);
8187
+ La.hasOwnProperty(o) && this.parser.normalizeLists && Qc(e);
8188
8188
  let u = this.options.ruleFromNode && this.options.ruleFromNode(e) || (a = this.parser.matchTag(e, this, n));
8189
- e: if (u ? u.ignore : Yc.hasOwnProperty(o))
8189
+ e: if (u ? u.ignore : Zc.hasOwnProperty(o))
8190
8190
  this.findInside(e), this.ignoreFallback(e, t);
8191
8191
  else if (!u || u.skip || u.closeParent) {
8192
8192
  u && u.closeParent ? this.open = Math.max(0, this.open - 1) : u && u.skip.nodeType && (e = u.skip);
@@ -8423,13 +8423,13 @@ class co {
8423
8423
  }
8424
8424
  }
8425
8425
  }
8426
- function Zc(r) {
8426
+ function Qc(r) {
8427
8427
  for (let e = r.firstChild, t = null; e; e = e.nextSibling) {
8428
8428
  let n = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
8429
8429
  n && La.hasOwnProperty(n) && t ? (t.appendChild(e), e = t) : n == "li" ? t = e : n && (t = null);
8430
8430
  }
8431
8431
  }
8432
- function Qc(r, e) {
8432
+ function ef(r, e) {
8433
8433
  return (r.matches || r.msMatchesSelector || r.webkitMatchesSelector || r.mozMatchesSelector).call(r, e);
8434
8434
  }
8435
8435
  function fo(r) {
@@ -8572,11 +8572,11 @@ function ei(r) {
8572
8572
  return r.document || window.document;
8573
8573
  }
8574
8574
  const ho = /* @__PURE__ */ new WeakMap();
8575
- function ef(r) {
8575
+ function tf(r) {
8576
8576
  let e = ho.get(r);
8577
- return e === void 0 && ho.set(r, e = tf(r)), e;
8577
+ return e === void 0 && ho.set(r, e = rf(r)), e;
8578
8578
  }
8579
- function tf(r) {
8579
+ function rf(r) {
8580
8580
  let e = null;
8581
8581
  function t(n) {
8582
8582
  if (n && typeof n == "object")
@@ -8602,7 +8602,7 @@ function lr(r, e, t, n) {
8602
8602
  let i = e[0], s;
8603
8603
  if (typeof i != "string")
8604
8604
  throw new RangeError("Invalid array passed to renderSpec");
8605
- if (n && (s = ef(n)) && s.indexOf(e) > -1)
8605
+ if (n && (s = tf(n)) && s.indexOf(e) > -1)
8606
8606
  throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
8607
8607
  let o = i.indexOf(" ");
8608
8608
  o > 0 && (t = i.slice(0, o), i = i.slice(o + 1));
@@ -8633,13 +8633,13 @@ function lr(r, e, t, n) {
8633
8633
  return { dom: u, contentDOM: a };
8634
8634
  }
8635
8635
  const qa = 65535, Ma = Math.pow(2, 16);
8636
- function rf(r, e) {
8636
+ function nf(r, e) {
8637
8637
  return r + e * Ma;
8638
8638
  }
8639
8639
  function go(r) {
8640
8640
  return r & qa;
8641
8641
  }
8642
- function nf(r) {
8642
+ function sf(r) {
8643
8643
  return (r - (r & qa)) / Ma;
8644
8644
  }
8645
8645
  const Ua = 1, ja = 2, cr = 4, Ha = 8;
@@ -8679,15 +8679,15 @@ class di {
8679
8679
  return (this.delInfo & cr) > 0;
8680
8680
  }
8681
8681
  }
8682
- class je {
8682
+ class He {
8683
8683
  /**
8684
8684
  Create a position map. The modifications to the document are
8685
8685
  represented as an array of numbers, in which each group of three
8686
8686
  represents a modified chunk as `[start, oldSize, newSize]`.
8687
8687
  */
8688
8688
  constructor(e, t = !1) {
8689
- if (this.ranges = e, this.inverted = t, !e.length && je.empty)
8690
- return je.empty;
8689
+ if (this.ranges = e, this.inverted = t, !e.length && He.empty)
8690
+ return He.empty;
8691
8691
  }
8692
8692
  /**
8693
8693
  @internal
@@ -8697,7 +8697,7 @@ class je {
8697
8697
  if (!this.inverted)
8698
8698
  for (let i = 0; i < n; i++)
8699
8699
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
8700
- return this.ranges[n * 3] + t + nf(e);
8700
+ return this.ranges[n * 3] + t + sf(e);
8701
8701
  }
8702
8702
  mapResult(e, t = 1) {
8703
8703
  return this._map(e, t, !1);
@@ -8719,7 +8719,7 @@ class je {
8719
8719
  let g = c ? e == u ? -1 : e == h ? 1 : t : t, E = u + i + (g < 0 ? 0 : l);
8720
8720
  if (n)
8721
8721
  return E;
8722
- let A = e == (t < 0 ? u : h) ? null : rf(a / 3, e - u), v = e == u ? ja : e == h ? Ua : cr;
8722
+ let A = e == (t < 0 ? u : h) ? null : nf(a / 3, e - u), v = e == u ? ja : e == h ? Ua : cr;
8723
8723
  return (t < 0 ? e != u : e != h) && (v |= Ha), new di(E, v, A);
8724
8724
  }
8725
8725
  i += l - c;
@@ -8758,7 +8758,7 @@ class je {
8758
8758
  map positions in the post-step document to the pre-step document.
8759
8759
  */
8760
8760
  invert() {
8761
- return new je(this.ranges, !this.inverted);
8761
+ return new He(this.ranges, !this.inverted);
8762
8762
  }
8763
8763
  /**
8764
8764
  @internal
@@ -8772,10 +8772,10 @@ class je {
8772
8772
  sub-document to a larger document, or vice-versa.
8773
8773
  */
8774
8774
  static offset(e) {
8775
- return e == 0 ? je.empty : new je(e < 0 ? [0, -e, 0] : [0, 0, e]);
8775
+ return e == 0 ? He.empty : new He(e < 0 ? [0, -e, 0] : [0, 0, e]);
8776
8776
  }
8777
8777
  }
8778
- je.empty = new je([]);
8778
+ He.empty = new He([]);
8779
8779
  class br {
8780
8780
  /**
8781
8781
  Create a new mapping with the given position maps.
@@ -8891,7 +8891,7 @@ class Oe {
8891
8891
  and the new document.
8892
8892
  */
8893
8893
  getMap() {
8894
- return je.empty;
8894
+ return He.empty;
8895
8895
  }
8896
8896
  /**
8897
8897
  Try to merge this step with another one, to be applied directly
@@ -9141,7 +9141,7 @@ class Ie extends Oe {
9141
9141
  return this.structure && mi(e, this.from, this.to) ? Ce.fail("Structure replace would overwrite content") : Ce.fromReplace(e, this.from, this.to, this.slice);
9142
9142
  }
9143
9143
  getMap() {
9144
- return new je([this.from, this.to - this.from, this.slice.size]);
9144
+ return new He([this.from, this.to - this.from, this.slice.size]);
9145
9145
  }
9146
9146
  invert(e) {
9147
9147
  return new Ie(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
@@ -9196,7 +9196,7 @@ class $e extends Oe {
9196
9196
  return n ? Ce.fromReplace(e, this.from, this.to, n) : Ce.fail("Content does not fit in gap");
9197
9197
  }
9198
9198
  getMap() {
9199
- return new je([
9199
+ return new He([
9200
9200
  this.from,
9201
9201
  this.gapFrom - this.from,
9202
9202
  this.insert,
@@ -9248,7 +9248,7 @@ function mi(r, e, t) {
9248
9248
  }
9249
9249
  return !1;
9250
9250
  }
9251
- function sf(r, e, t, n) {
9251
+ function of(r, e, t, n) {
9252
9252
  let i = [], s = [], o, a;
9253
9253
  r.doc.nodesBetween(e, t, (u, c, l) => {
9254
9254
  if (!u.isInline)
@@ -9262,7 +9262,7 @@ function sf(r, e, t, n) {
9262
9262
  }
9263
9263
  }), i.forEach((u) => r.step(u)), s.forEach((u) => r.step(u));
9264
9264
  }
9265
- function of(r, e, t, n) {
9265
+ function af(r, e, t, n) {
9266
9266
  let i = [], s = 0;
9267
9267
  r.doc.nodesBetween(e, t, (o, a) => {
9268
9268
  if (!o.isInline)
@@ -9312,21 +9312,21 @@ function ki(r, e, t, n = t.contentMatch, i = !0) {
9312
9312
  for (let u = o.length - 1; u >= 0; u--)
9313
9313
  r.step(o[u]);
9314
9314
  }
9315
- function af(r, e, t) {
9315
+ function uf(r, e, t) {
9316
9316
  return (e == 0 || r.canReplace(e, r.childCount)) && (t == r.childCount || r.canReplace(0, t));
9317
9317
  }
9318
- function Ip(r) {
9318
+ function Pp(r) {
9319
9319
  let t = r.parent.content.cutByIndex(r.startIndex, r.endIndex);
9320
9320
  for (let n = r.depth; ; --n) {
9321
9321
  let i = r.$from.node(n), s = r.$from.index(n), o = r.$to.indexAfter(n);
9322
9322
  if (n < r.depth && i.canReplace(s, o, t))
9323
9323
  return n;
9324
- if (n == 0 || i.type.spec.isolating || !af(i, s, o))
9324
+ if (n == 0 || i.type.spec.isolating || !uf(i, s, o))
9325
9325
  break;
9326
9326
  }
9327
9327
  return null;
9328
9328
  }
9329
- function uf(r, e, t) {
9329
+ function lf(r, e, t) {
9330
9330
  let { $from: n, $to: i, depth: s } = e, o = n.before(s + 1), a = i.after(s + 1), u = o, c = a, l = Q.empty, h = 0;
9331
9331
  for (let A = s, v = !1; A > t; A--)
9332
9332
  v || n.index(A) > 0 ? (v = !0, l = Q.from(n.node(A).copy(l)), h++) : u--;
@@ -9335,21 +9335,21 @@ function uf(r, e, t) {
9335
9335
  v || i.after(A + 1) < i.end(A) ? (v = !0, g = Q.from(i.node(A).copy(g)), E++) : c++;
9336
9336
  r.step(new $e(u, c, o, a, new ae(l.append(g), h, E), l.size - h, !0));
9337
9337
  }
9338
- function Rp(r, e, t = null, n = r) {
9339
- let i = lf(r, e), s = i && cf(n, e);
9338
+ function Op(r, e, t = null, n = r) {
9339
+ let i = cf(r, e), s = i && ff(n, e);
9340
9340
  return s ? i.map(wo).concat({ type: e, attrs: t }).concat(s.map(wo)) : null;
9341
9341
  }
9342
9342
  function wo(r) {
9343
9343
  return { type: r, attrs: null };
9344
9344
  }
9345
- function lf(r, e) {
9345
+ function cf(r, e) {
9346
9346
  let { parent: t, startIndex: n, endIndex: i } = r, s = t.contentMatchAt(n).findWrapping(e);
9347
9347
  if (!s)
9348
9348
  return null;
9349
9349
  let o = s.length ? s[0] : e;
9350
9350
  return t.canReplaceWith(n, i, o) ? s : null;
9351
9351
  }
9352
- function cf(r, e) {
9352
+ function ff(r, e) {
9353
9353
  let { parent: t, startIndex: n, endIndex: i } = r, s = t.child(n), o = e.contentMatch.findWrapping(s.type);
9354
9354
  if (!o)
9355
9355
  return null;
@@ -9358,7 +9358,7 @@ function cf(r, e) {
9358
9358
  u = u.matchType(t.child(c).type);
9359
9359
  return !u || !u.validEnd ? null : o;
9360
9360
  }
9361
- function ff(r, e, t) {
9361
+ function df(r, e, t) {
9362
9362
  let n = Q.empty;
9363
9363
  for (let o = t.length - 1; o >= 0; o--) {
9364
9364
  if (n.size) {
@@ -9371,13 +9371,13 @@ function ff(r, e, t) {
9371
9371
  let i = e.start, s = e.end;
9372
9372
  r.step(new $e(i, s, i, s, new ae(n, 0, 0), t.length, !0));
9373
9373
  }
9374
- function df(r, e, t, n, i) {
9374
+ function mf(r, e, t, n, i) {
9375
9375
  if (!n.isTextblock)
9376
9376
  throw new RangeError("Type given to setBlockType should be a textblock");
9377
9377
  let s = r.steps.length;
9378
9378
  r.doc.nodesBetween(e, t, (o, a) => {
9379
9379
  let u = typeof i == "function" ? i(o) : i;
9380
- if (o.isTextblock && !o.hasMarkup(n, u) && mf(r.doc, r.mapping.slice(s).map(a), n)) {
9380
+ if (o.isTextblock && !o.hasMarkup(n, u) && pf(r.doc, r.mapping.slice(s).map(a), n)) {
9381
9381
  let c = null;
9382
9382
  if (n.schema.linebreakReplacement) {
9383
9383
  let E = n.whitespace == "pre", A = !!n.contentMatch.matchType(n.schema.linebreakReplacement);
@@ -9409,11 +9409,11 @@ function za(r, e, t, n) {
9409
9409
  }
9410
9410
  });
9411
9411
  }
9412
- function mf(r, e, t) {
9412
+ function pf(r, e, t) {
9413
9413
  let n = r.resolve(e), i = n.index();
9414
9414
  return n.parent.canReplaceWith(i, i + 1, t);
9415
9415
  }
9416
- function pf(r, e, t, n, i) {
9416
+ function hf(r, e, t, n, i) {
9417
9417
  let s = r.doc.nodeAt(e);
9418
9418
  if (!s)
9419
9419
  throw new RangeError("No node at given position");
@@ -9425,7 +9425,7 @@ function pf(r, e, t, n, i) {
9425
9425
  throw new RangeError("Invalid content for node type " + t.name);
9426
9426
  r.step(new $e(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new ae(Q.from(o), 0, 0), 1, !0));
9427
9427
  }
9428
- function Pp(r, e, t = 1, n) {
9428
+ function Lp(r, e, t = 1, n) {
9429
9429
  let i = r.resolve(e), s = i.depth - t, o = n && n[n.length - 1] || i.parent;
9430
9430
  if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
9431
9431
  return !1;
@@ -9442,7 +9442,7 @@ function Pp(r, e, t = 1, n) {
9442
9442
  let a = i.indexAfter(s), u = n && n[0];
9443
9443
  return i.node(s).canReplaceWith(a, a, u ? u.type : i.node(s + 1).type);
9444
9444
  }
9445
- function hf(r, e, t = 1, n) {
9445
+ function gf(r, e, t = 1, n) {
9446
9446
  let i = r.doc.resolve(e), s = Q.empty, o = Q.empty;
9447
9447
  for (let a = i.depth, u = i.depth - t, c = t - 1; a > u; a--, c--) {
9448
9448
  s = Q.from(i.node(a).copy(s));
@@ -9451,11 +9451,11 @@ function hf(r, e, t = 1, n) {
9451
9451
  }
9452
9452
  r.step(new Ie(e, e, new ae(s.append(o), t, t), !0));
9453
9453
  }
9454
- function Op(r, e) {
9454
+ function _p(r, e) {
9455
9455
  let t = r.resolve(e), n = t.index();
9456
9456
  return Ga(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(n, n + 1);
9457
9457
  }
9458
- function gf(r, e) {
9458
+ function wf(r, e) {
9459
9459
  e.content.size || r.type.compatibleContent(e.type);
9460
9460
  let t = r.contentMatchAt(r.childCount), { linebreakReplacement: n } = r.type.schema;
9461
9461
  for (let i = 0; i < e.childCount; i++) {
@@ -9466,9 +9466,9 @@ function gf(r, e) {
9466
9466
  return t.validEnd;
9467
9467
  }
9468
9468
  function Ga(r, e) {
9469
- return !!(r && e && !r.isLeaf && gf(r, e));
9469
+ return !!(r && e && !r.isLeaf && wf(r, e));
9470
9470
  }
9471
- function Lp(r, e, t = -1) {
9471
+ function qp(r, e, t = -1) {
9472
9472
  let n = r.resolve(e);
9473
9473
  for (let i = n.depth; ; i--) {
9474
9474
  let s, o, a = n.index(i);
@@ -9479,7 +9479,7 @@ function Lp(r, e, t = -1) {
9479
9479
  e = t < 0 ? n.before(i) : n.after(i);
9480
9480
  }
9481
9481
  }
9482
- function wf(r, e, t) {
9482
+ function yf(r, e, t) {
9483
9483
  let n = null, { linebreakReplacement: i } = r.doc.type.schema, s = r.doc.resolve(e - t), o = s.node().type;
9484
9484
  if (i && o.inlineContent) {
9485
9485
  let l = o.whitespace == "pre", h = !!o.contentMatch.matchType(i);
@@ -9498,7 +9498,7 @@ function wf(r, e, t) {
9498
9498
  }
9499
9499
  return r;
9500
9500
  }
9501
- function yf(r, e, t) {
9501
+ function bf(r, e, t) {
9502
9502
  let n = r.resolve(e);
9503
9503
  if (n.parent.canReplaceWith(n.index(), n.index(), t))
9504
9504
  return e;
@@ -9520,7 +9520,7 @@ function yf(r, e, t) {
9520
9520
  }
9521
9521
  return null;
9522
9522
  }
9523
- function _p(r, e, t) {
9523
+ function Mp(r, e, t) {
9524
9524
  let n = r.resolve(e);
9525
9525
  if (!t.content.size)
9526
9526
  return e;
@@ -9541,16 +9541,16 @@ function _p(r, e, t) {
9541
9541
  }
9542
9542
  return null;
9543
9543
  }
9544
- function bf(r, e, t = e, n = ae.empty) {
9544
+ function xf(r, e, t = e, n = ae.empty) {
9545
9545
  if (e == t && !n.size)
9546
9546
  return null;
9547
9547
  let i = r.resolve(e), s = r.resolve(t);
9548
- return Wa(i, s, n) ? new Ie(e, t, n) : new xf(i, s, n).fit();
9548
+ return Wa(i, s, n) ? new Ie(e, t, n) : new Af(i, s, n).fit();
9549
9549
  }
9550
9550
  function Wa(r, e, t) {
9551
9551
  return !t.openStart && !t.openEnd && r.start() == e.start() && r.parent.canReplace(r.index(), e.index(), t.content);
9552
9552
  }
9553
- class xf {
9553
+ class Af {
9554
9554
  constructor(e, t, n) {
9555
9555
  this.$from = e, this.$to = t, this.unplaced = n, this.frontier = [], this.placed = Q.empty;
9556
9556
  for (let i = 0; i <= e.depth; i++) {
@@ -9719,18 +9719,18 @@ function ni(r, e, t, n, i) {
9719
9719
  if (o == s.childCount && !t.compatibleContent(s.type))
9720
9720
  return null;
9721
9721
  let a = n.fillBefore(s.content, !0, o);
9722
- return a && !Af(t, s.content, o) ? a : null;
9722
+ return a && !Df(t, s.content, o) ? a : null;
9723
9723
  }
9724
- function Af(r, e, t) {
9724
+ function Df(r, e, t) {
9725
9725
  for (let n = t; n < e.childCount; n++)
9726
9726
  if (!r.allowsMarks(e.child(n).marks))
9727
9727
  return !0;
9728
9728
  return !1;
9729
9729
  }
9730
- function Df(r) {
9730
+ function vf(r) {
9731
9731
  return r.spec.defining || r.spec.definingForContent;
9732
9732
  }
9733
- function vf(r, e, t, n) {
9733
+ function Ef(r, e, t, n) {
9734
9734
  if (!n.size)
9735
9735
  return r.deleteRange(e, t);
9736
9736
  let i = r.doc.resolve(e), s = r.doc.resolve(t);
@@ -9754,7 +9754,7 @@ function vf(r, e, t, n) {
9754
9754
  g = A.content;
9755
9755
  }
9756
9756
  for (let g = l - 1; g >= 0; g--) {
9757
- let E = c[g], A = Df(E.type);
9757
+ let E = c[g], A = vf(E.type);
9758
9758
  if (A && !E.sameMarkup(i.node(Math.abs(a) - 1)))
9759
9759
  l = g;
9760
9760
  else if (A || !E.type.isTextblock)
@@ -9788,14 +9788,14 @@ function $a(r, e, t, n, i) {
9788
9788
  }
9789
9789
  return r;
9790
9790
  }
9791
- function Ef(r, e, t, n) {
9791
+ function Cf(r, e, t, n) {
9792
9792
  if (!n.isInline && e == t && r.doc.resolve(e).parent.content.size) {
9793
- let i = yf(r.doc, e, n.type);
9793
+ let i = bf(r.doc, e, n.type);
9794
9794
  i != null && (e = t = i);
9795
9795
  }
9796
9796
  r.replaceRange(e, t, new ae(Q.from(n), 0, 0));
9797
9797
  }
9798
- function Cf(r, e, t) {
9798
+ function Sf(r, e, t) {
9799
9799
  let n = r.doc.resolve(e), i = r.doc.resolve(t), s = Ka(n, i);
9800
9800
  for (let o = 0; o < s.length; o++) {
9801
9801
  let a = s[o], u = o == s.length - 1;
@@ -9838,7 +9838,7 @@ class Bt extends Oe {
9838
9838
  return Ce.fromReplace(e, this.pos, this.pos + 1, new ae(Q.from(i), 0, t.isLeaf ? 0 : 1));
9839
9839
  }
9840
9840
  getMap() {
9841
- return je.empty;
9841
+ return He.empty;
9842
9842
  }
9843
9843
  invert(e) {
9844
9844
  return new Bt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
@@ -9873,7 +9873,7 @@ class Wt extends Oe {
9873
9873
  return Ce.ok(n);
9874
9874
  }
9875
9875
  getMap() {
9876
- return je.empty;
9876
+ return He.empty;
9877
9877
  }
9878
9878
  invert(e) {
9879
9879
  return new Wt(this.attr, e.attrs[this.attr]);
@@ -9900,7 +9900,7 @@ Nt = function r(e) {
9900
9900
  Nt.prototype = Object.create(Error.prototype);
9901
9901
  Nt.prototype.constructor = Nt;
9902
9902
  Nt.prototype.name = "TransformError";
9903
- class Sf {
9903
+ class Tf {
9904
9904
  /**
9905
9905
  Create a transform that starts with the given document.
9906
9906
  */
@@ -9949,7 +9949,7 @@ class Sf {
9949
9949
  given `slice`.
9950
9950
  */
9951
9951
  replace(e, t = e, n = ae.empty) {
9952
- let i = bf(this.doc, e, t, n);
9952
+ let i = xf(this.doc, e, t, n);
9953
9953
  return i && this.step(i), this;
9954
9954
  }
9955
9955
  /**
@@ -9991,7 +9991,7 @@ class Sf {
9991
9991
  control over what happens.
9992
9992
  */
9993
9993
  replaceRange(e, t, n) {
9994
- return vf(this, e, t, n), this;
9994
+ return Ef(this, e, t, n), this;
9995
9995
  }
9996
9996
  /**
9997
9997
  Replace the given range with a node, but use `from` and `to` as
@@ -10003,14 +10003,14 @@ class Sf {
10003
10003
  that parent node.
10004
10004
  */
10005
10005
  replaceRangeWith(e, t, n) {
10006
- return Ef(this, e, t, n), this;
10006
+ return Cf(this, e, t, n), this;
10007
10007
  }
10008
10008
  /**
10009
10009
  Delete the given range, expanding it to cover fully covered
10010
10010
  parent nodes until a valid replace is found.
10011
10011
  */
10012
10012
  deleteRange(e, t) {
10013
- return Cf(this, e, t), this;
10013
+ return Sf(this, e, t), this;
10014
10014
  }
10015
10015
  /**
10016
10016
  Split the content in the given range off from its parent, if there
@@ -10020,14 +10020,14 @@ class Sf {
10020
10020
  sure the lift is valid.
10021
10021
  */
10022
10022
  lift(e, t) {
10023
- return uf(this, e, t), this;
10023
+ return lf(this, e, t), this;
10024
10024
  }
10025
10025
  /**
10026
10026
  Join the blocks around the given position. If depth is 2, their
10027
10027
  last and first siblings are also joined, and so on.
10028
10028
  */
10029
10029
  join(e, t = 1) {
10030
- return wf(this, e, t), this;
10030
+ return yf(this, e, t), this;
10031
10031
  }
10032
10032
  /**
10033
10033
  Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
@@ -10035,21 +10035,21 @@ class Sf {
10035
10035
  probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
10036
10036
  */
10037
10037
  wrap(e, t) {
10038
- return ff(this, e, t), this;
10038
+ return df(this, e, t), this;
10039
10039
  }
10040
10040
  /**
10041
10041
  Set the type of all textblocks (partly) between `from` and `to` to
10042
10042
  the given node type with the given attributes.
10043
10043
  */
10044
10044
  setBlockType(e, t = e, n, i = null) {
10045
- return df(this, e, t, n, i), this;
10045
+ return mf(this, e, t, n, i), this;
10046
10046
  }
10047
10047
  /**
10048
10048
  Change the type, attributes, and/or marks of the node at `pos`.
10049
10049
  When `type` isn't given, the existing node type is preserved,
10050
10050
  */
10051
10051
  setNodeMarkup(e, t, n = null, i) {
10052
- return pf(this, e, t, n, i), this;
10052
+ return hf(this, e, t, n, i), this;
10053
10053
  }
10054
10054
  /**
10055
10055
  Set a single attribute on a given node to a new value.
@@ -10098,13 +10098,13 @@ class Sf {
10098
10098
  use after the split (with the outermost nodes coming first).
10099
10099
  */
10100
10100
  split(e, t = 1, n) {
10101
- return hf(this, e, t, n), this;
10101
+ return gf(this, e, t, n), this;
10102
10102
  }
10103
10103
  /**
10104
10104
  Add the given mark to the inline content between `from` and `to`.
10105
10105
  */
10106
10106
  addMark(e, t, n) {
10107
- return sf(this, e, t, n), this;
10107
+ return of(this, e, t, n), this;
10108
10108
  }
10109
10109
  /**
10110
10110
  Remove marks from inline nodes between `from` and `to`. When
@@ -10113,7 +10113,7 @@ class Sf {
10113
10113
  remove all marks of any type.
10114
10114
  */
10115
10115
  removeMark(e, t, n) {
10116
- return of(this, e, t, n), this;
10116
+ return af(this, e, t, n), this;
10117
10117
  }
10118
10118
  /**
10119
10119
  Removes all marks and nodes from the content of the node at
@@ -10133,7 +10133,7 @@ class Ee {
10133
10133
  `$head`.
10134
10134
  */
10135
10135
  constructor(e, t, n) {
10136
- this.$anchor = e, this.$head = t, this.ranges = n || [new Tf(e.min(t), e.max(t))];
10136
+ this.$anchor = e, this.$head = t, this.ranges = n || [new Ff(e.min(t), e.max(t))];
10137
10137
  }
10138
10138
  /**
10139
10139
  The selection's anchor, as an unresolved position.
@@ -10291,7 +10291,7 @@ class Ee {
10291
10291
  }
10292
10292
  }
10293
10293
  Ee.prototype.visible = !0;
10294
- class Tf {
10294
+ class Ff {
10295
10295
  /**
10296
10296
  Create a range.
10297
10297
  */
@@ -10479,11 +10479,11 @@ class at extends Ee {
10479
10479
  return e instanceof at;
10480
10480
  }
10481
10481
  getBookmark() {
10482
- return Ff;
10482
+ return Bf;
10483
10483
  }
10484
10484
  }
10485
10485
  Ee.jsonID("all", at);
10486
- const Ff = {
10486
+ const Bf = {
10487
10487
  map() {
10488
10488
  return this;
10489
10489
  },
@@ -10521,7 +10521,7 @@ function xo(r, e, t) {
10521
10521
  }), r.setSelection(Ee.near(r.doc.resolve(o), t));
10522
10522
  }
10523
10523
  const Ao = 1, Do = 2, vo = 4;
10524
- class Bf extends Sf {
10524
+ class kf extends Tf {
10525
10525
  /**
10526
10526
  @internal
10527
10527
  */
@@ -10680,7 +10680,7 @@ class Ht {
10680
10680
  this.name = e, this.init = Eo(t.init, n), this.apply = Eo(t.apply, n);
10681
10681
  }
10682
10682
  }
10683
- const kf = [
10683
+ const Nf = [
10684
10684
  new Ht("doc", {
10685
10685
  init(r) {
10686
10686
  return r.doc || r.schema.topNodeType.createAndFill();
@@ -10716,7 +10716,7 @@ const kf = [
10716
10716
  ];
10717
10717
  class si {
10718
10718
  constructor(e, t) {
10719
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = kf.slice(), t && t.forEach((n) => {
10719
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Nf.slice(), t && t.forEach((n) => {
10720
10720
  if (this.pluginsByKey[n.key])
10721
10721
  throw new RangeError("Adding different instances of a keyed plugin (" + n.key + ")");
10722
10722
  this.plugins.push(n), this.pluginsByKey[n.key] = n, n.spec.state && this.fields.push(new Ht(n.key, n.spec.state, n));
@@ -10809,7 +10809,7 @@ class Ct {
10809
10809
  Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
10810
10810
  */
10811
10811
  get tr() {
10812
- return new Bf(this);
10812
+ return new kf(this);
10813
10813
  }
10814
10814
  /**
10815
10815
  Create a new state.
@@ -10895,7 +10895,7 @@ function Xa(r, e, t) {
10895
10895
  }
10896
10896
  return t;
10897
10897
  }
10898
- class qp {
10898
+ class Up {
10899
10899
  /**
10900
10900
  Create a plugin.
10901
10901
  */
@@ -10913,7 +10913,7 @@ const oi = /* @__PURE__ */ Object.create(null);
10913
10913
  function Ya(r) {
10914
10914
  return r in oi ? r + "$" + ++oi[r] : (oi[r] = 0, r + "$");
10915
10915
  }
10916
- class Mp {
10916
+ class jp {
10917
10917
  /**
10918
10918
  Create a plugin key.
10919
10919
  */
@@ -10934,7 +10934,7 @@ class Mp {
10934
10934
  return e[this.key];
10935
10935
  }
10936
10936
  }
10937
- const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Up = (r) => Za(r), jp = Object.freeze({
10937
+ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Hp = (r) => Za(r), Vp = Object.freeze({
10938
10938
  RESOLVED: "resolved",
10939
10939
  NEW: "new",
10940
10940
  ADD: "add",
@@ -10947,7 +10947,7 @@ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Up = (r) =>
10947
10947
  // Tracked changes
10948
10948
  CHANGE_ACCEPTED: "change-accepted",
10949
10949
  CHANGE_REJECTED: "change-rejected"
10950
- }), Hp = {
10950
+ }), zp = {
10951
10951
  mounted(r, e, t) {
10952
10952
  const n = (i) => {
10953
10953
  r.contains(i.target) || e.value(i);
@@ -10958,29 +10958,29 @@ const Za = (r) => r.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Up = (r) =>
10958
10958
  document.removeEventListener("click", r.__clickOutsideHandler), delete r.__clickOutsideHandler;
10959
10959
  }
10960
10960
  };
10961
- function Vp(r, e = null, ...t) {
10961
+ function Gp(r, e = null, ...t) {
10962
10962
  return typeof r == "function" ? e ? r.bind(e)(...t) : r(...t) : r;
10963
10963
  }
10964
- function zp(r = {}) {
10964
+ function Wp(r = {}) {
10965
10965
  return Object.keys(r).length === 0 && r.constructor === Object;
10966
10966
  }
10967
- const Gp = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, Wp = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
10967
+ const Jp = () => typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1, $p = () => ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
10968
10968
  navigator.platform
10969
- ), Nf = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
10970
- function If(r, e, t = { strict: !0 }) {
10969
+ ), If = (r) => Object.prototype.toString.call(r) === "[object RegExp]";
10970
+ function Rf(r, e, t = { strict: !0 }) {
10971
10971
  const n = Object.keys(e);
10972
- return n.length ? n.every((i) => t.strict ? e[i] === r[i] : Nf(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
10972
+ return n.length ? n.every((i) => t.strict ? e[i] === r[i] : If(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
10973
10973
  }
10974
- function Jp(r, e) {
10974
+ function Kp(r, e) {
10975
10975
  const n = typeof e == "string" ? [e] : e;
10976
10976
  return Object.keys(r).reduce((i, s) => (n.includes(s) || (i[s] = r[s]), i), {});
10977
10977
  }
10978
- const Rf = /[\d-.]+(\w+)$/, Pf = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
10979
- function Of(r = "0") {
10980
- const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(Rf)?.[1] ?? "").toLowerCase();
10981
- return [t, Pf.includes(i) ? i : null];
10978
+ const Pf = /[\d-.]+(\w+)$/, Of = ["px", "rem", "em", "in", "q", "mm", "cm", "pt", "pc", "vh", "vw", "vmin", "vmax"];
10979
+ function Lf(r = "0") {
10980
+ const e = r.toString() || "0", t = Number.parseFloat(e), i = (e.match(Pf)?.[1] ?? "").toLowerCase();
10981
+ return [t, Of.includes(i) ? i : null];
10982
10982
  }
10983
- function $p(r = 0, e = 0, t = 0) {
10983
+ function Xp(r = 0, e = 0, t = 0) {
10984
10984
  return Math.min(Math.max(r, e), t);
10985
10985
  }
10986
10986
  function It(r) {
@@ -11007,7 +11007,7 @@ function pi(r) {
11007
11007
  if (r != null)
11008
11008
  return r * 240;
11009
11009
  }
11010
- function Lf(r) {
11010
+ function _f(r) {
11011
11011
  if (r != null)
11012
11012
  return Math.round(r / 2);
11013
11013
  }
@@ -11032,11 +11032,11 @@ function tu(r) {
11032
11032
  if (r != null)
11033
11033
  return r / 20;
11034
11034
  }
11035
- function _f(r) {
11035
+ function qf(r) {
11036
11036
  if (r != null)
11037
11037
  return r * 20;
11038
11038
  }
11039
- const qf = async (r, e) => {
11039
+ const Mf = async (r, e) => {
11040
11040
  const t = /^https?:|^blob:|^file:|^data:/i.test(r);
11041
11041
  if (e && t && typeof fetch == "function") {
11042
11042
  const s = await fetch(r);
@@ -11056,10 +11056,10 @@ const qf = async (r, e) => {
11056
11056
  }
11057
11057
  const i = St.from(n, "base64");
11058
11058
  return i.buffer.slice(i.byteOffset, i.byteOffset + i.byteLength);
11059
- }, Kp = (r) => {
11059
+ }, Yp = (r) => {
11060
11060
  const n = new window.DOMParser().parseFromString(r, "text/xml").querySelectorAll("Default");
11061
11061
  return Array.from(n).map((i) => i.getAttribute("Extension"));
11062
- }, Mf = (r) => (/* @__PURE__ */ new Map([
11062
+ }, Uf = (r) => (/* @__PURE__ */ new Map([
11063
11063
  ["yellow", "#ffff00"],
11064
11064
  ["green", "#00ff00"],
11065
11065
  ["blue", "#0000FFFF"],
@@ -11076,7 +11076,7 @@ const qf = async (r, e) => {
11076
11076
  ["lightGray", "#C0C0C0FF"],
11077
11077
  ["black", "#000"]
11078
11078
  ])).get(r) || null;
11079
- function Uf(r) {
11079
+ function jf(r) {
11080
11080
  if (!r || typeof r != "string") return !1;
11081
11081
  switch (r.length) {
11082
11082
  case 3:
@@ -11089,13 +11089,13 @@ function Uf(r) {
11089
11089
  return !1;
11090
11090
  }
11091
11091
  }
11092
- const jf = (r) => {
11092
+ const Hf = (r) => {
11093
11093
  const e = Number(r).toString(16);
11094
11094
  return e.length === 1 ? "0" + e : e;
11095
- }, Hf = (r) => "#" + r.match(/\d+/g).map(jf).join(""), Xp = (r, e, t = "", n = !1) => {
11096
- let [i, s] = Of(r);
11095
+ }, Vf = (r) => "#" + r.match(/\d+/g).map(Hf).join(""), Zp = (r, e, t = "", n = !1) => {
11096
+ let [i, s] = Lf(r);
11097
11097
  return Number.isNaN(i) || i === 0 ? {} : t === "atLeast" && i < 1 ? {} : (s = s || e, i += s ? 4 : 0.2, n ? { "line-height": `${i}${s}` } : `line-height: ${i}${s}`);
11098
- }, Vf = (r, e) => {
11098
+ }, zf = (r, e) => {
11099
11099
  const t = new Uint8Array(r), n = e.replace(/[-{}]/g, "");
11100
11100
  if (n.length !== 32) {
11101
11101
  console.error("Invalid GUID");
@@ -11124,7 +11124,7 @@ function Ri(r = 8) {
11124
11124
  function ru() {
11125
11125
  return Math.floor(Math.random() * 2147483647).toString(16).toUpperCase().padStart(8, "0");
11126
11126
  }
11127
- const zf = {
11127
+ const Gf = {
11128
11128
  "xmlns:wpc": "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
11129
11129
  "xmlns:cx": "http://schemas.microsoft.com/office/drawing/2014/chartex",
11130
11130
  "xmlns:cx1": "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",
@@ -11161,7 +11161,7 @@ const zf = {
11161
11161
  "xmlns:wne": "http://schemas.microsoft.com/office/word/2006/wordml",
11162
11162
  "xmlns:wps": "http://schemas.microsoft.com/office/word/2010/wordprocessingShape",
11163
11163
  "mc:Ignorable": "w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"
11164
- }, Gf = {
11164
+ }, Wf = {
11165
11165
  elements: [
11166
11166
  {
11167
11167
  type: "element",
@@ -11173,7 +11173,7 @@ const zf = {
11173
11173
  elements: []
11174
11174
  }
11175
11175
  ]
11176
- }, Wf = {
11176
+ }, Jf = {
11177
11177
  elements: [{
11178
11178
  type: "element",
11179
11179
  name: "w:settings",
@@ -11182,7 +11182,7 @@ const zf = {
11182
11182
  },
11183
11183
  elements: []
11184
11184
  }]
11185
- }, Jf = {
11185
+ }, $f = {
11186
11186
  type: "element",
11187
11187
  name: "w:r",
11188
11188
  elements: [
@@ -11858,7 +11858,7 @@ const zf = {
11858
11858
  }
11859
11859
  ]
11860
11860
  }
11861
- }, $f = {
11861
+ }, Kf = {
11862
11862
  declaration: {
11863
11863
  attributes: {
11864
11864
  version: "1.0",
@@ -11911,7 +11911,7 @@ const zf = {
11911
11911
  elements: []
11912
11912
  }
11913
11913
  ]
11914
- }, Kf = {
11914
+ }, Xf = {
11915
11915
  declaration: {
11916
11916
  attributes: {
11917
11917
  version: "1.0",
@@ -11964,7 +11964,7 @@ const zf = {
11964
11964
  elements: []
11965
11965
  }
11966
11966
  ]
11967
- }, Xf = {
11967
+ }, Yf = {
11968
11968
  declaration: {
11969
11969
  attributes: {
11970
11970
  version: "1.0",
@@ -12018,7 +12018,7 @@ const zf = {
12018
12018
  elements: []
12019
12019
  }
12020
12020
  ]
12021
- }, Yf = {
12021
+ }, Zf = {
12022
12022
  declaration: {
12023
12023
  attributes: {
12024
12024
  version: "1.0",
@@ -12071,7 +12071,7 @@ const zf = {
12071
12071
  elements: []
12072
12072
  }
12073
12073
  ]
12074
- }, Zf = {
12074
+ }, Qf = {
12075
12075
  elements: [
12076
12076
  {
12077
12077
  type: "element",
@@ -12173,7 +12173,7 @@ const zf = {
12173
12173
  ]
12174
12174
  }
12175
12175
  ]
12176
- }, Qf = {
12176
+ }, ed = {
12177
12177
  declaration: {
12178
12178
  attributes: {
12179
12179
  version: "1.0",
@@ -12321,13 +12321,13 @@ const zf = {
12321
12321
  }
12322
12322
  ]
12323
12323
  }, Et = {
12324
- COMMENTS_XML_DEF: $f,
12325
- COMMENTS_EXTENDED_XML_DEF: Kf,
12326
- COMMENTS_EXTENSIBLE_XML_DEF: Xf,
12327
- COMMENTS_IDS_XML_DEF: Yf,
12328
- DOCUMENT_RELS_XML_DEF: Zf,
12329
- CONTENT_TYPES: Qf
12330
- }, xr = "trackInsert", Pi = "trackDelete", Oi = "trackFormat", He = (r) => {
12324
+ COMMENTS_XML_DEF: Kf,
12325
+ COMMENTS_EXTENDED_XML_DEF: Xf,
12326
+ COMMENTS_EXTENSIBLE_XML_DEF: Yf,
12327
+ COMMENTS_IDS_XML_DEF: Zf,
12328
+ DOCUMENT_RELS_XML_DEF: Qf,
12329
+ CONTENT_TYPES: ed
12330
+ }, xr = "trackInsert", Pi = "trackDelete", Oi = "trackFormat", Ue = (r) => {
12331
12331
  if (r)
12332
12332
  try {
12333
12333
  return JSON.parse(JSON.stringify(r));
@@ -12335,11 +12335,11 @@ const zf = {
12335
12335
  console.error("Error in carbonCopy", r, e);
12336
12336
  return;
12337
12337
  }
12338
- }, ed = {
12338
+ }, td = {
12339
12339
  attributes: {
12340
12340
  "w:abstractNumId": "1"
12341
12341
  }
12342
- }, td = {
12342
+ }, rd = {
12343
12343
  attributes: {
12344
12344
  "w:abstractNumId": "0"
12345
12345
  }
@@ -13593,7 +13593,7 @@ function So(r, e) {
13593
13593
  u && (c = r.comments.find((E) => E.commentId === u || E.importedId === u));
13594
13594
  const l = c?.isInternal || o.isInternal;
13595
13595
  if (n === "external" && l || !!o.resolvedTime) return;
13596
- let g = rd(e, a);
13596
+ let g = nd(e, a);
13597
13597
  if (e === "End") {
13598
13598
  const E = {
13599
13599
  name: "w:r",
@@ -13603,21 +13603,21 @@ function So(r, e) {
13603
13603
  }
13604
13604
  return g;
13605
13605
  }
13606
- const rd = (r, e) => ({
13606
+ const nd = (r, e) => ({
13607
13607
  name: `w:commentRange${r}`,
13608
13608
  attributes: {
13609
13609
  "w:id": String(e)
13610
13610
  }
13611
- }), nd = (r) => ({
13611
+ }), id = (r) => ({
13612
13612
  ...r,
13613
13613
  commentParaId: ru()
13614
- }), id = (r, e, t, n) => {
13614
+ }), sd = (r, e, t, n) => {
13615
13615
  const i = su({ editor: n, node: r.commentJSON }), s = {
13616
13616
  "w:id": String(e),
13617
13617
  "w:author": r.creatorName || r.importedAuthor?.name,
13618
13618
  "w:email": r.creatorEmail || r.importedAuthor?.email,
13619
13619
  "w:date": iu(r.createdTime),
13620
- "w:initials": sd(r.creatorName),
13620
+ "w:initials": od(r.creatorName),
13621
13621
  "w:done": r.resolvedTime ? "1" : "0",
13622
13622
  "w15:paraId": r.commentParaId,
13623
13623
  "custom:internalId": r.commentId || r.internalId,
@@ -13636,10 +13636,10 @@ const rd = (r, e) => ({
13636
13636
  attributes: s,
13637
13637
  elements: [i]
13638
13638
  };
13639
- }, sd = (r) => r ? r.replace("(imported)", "").trim().split(" ").map((n) => n[0]).join("") : null, iu = (r) => new Date(r || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), od = (r = [], e) => {
13640
- const t = He(e);
13639
+ }, od = (r) => r ? r.replace("(imported)", "").trim().split(" ").map((n) => n[0]).join("") : null, iu = (r) => new Date(r || Date.now()).toISOString().replace(/\.\d{3}Z$/, "Z"), ad = (r = [], e) => {
13640
+ const t = Ue(e);
13641
13641
  return r.forEach((n) => {
13642
- n.elements[0].elements.unshift(Jf);
13642
+ n.elements[0].elements.unshift($f);
13643
13643
  const s = n.attributes["w15:paraId"];
13644
13644
  n.elements[0].attributes["w14:paraId"] = s, n.attributes = {
13645
13645
  "w:id": n.attributes["w:id"],
@@ -13655,8 +13655,8 @@ const rd = (r, e) => ({
13655
13655
  "xmlns:custom": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
13656
13656
  };
13657
13657
  }), t.elements[0].elements = r, t;
13658
- }, ad = (r = [], e) => {
13659
- const t = He(e), n = r.map((i) => {
13658
+ }, ud = (r = [], e) => {
13659
+ const t = Ue(e), n = r.map((i) => {
13660
13660
  const s = {
13661
13661
  "w15:paraId": i.commentParaId,
13662
13662
  "w15:done": i.resolvedTime ? "1" : "0"
@@ -13672,8 +13672,8 @@ const rd = (r, e) => ({
13672
13672
  };
13673
13673
  });
13674
13674
  return t.elements[0].elements = n, t;
13675
- }, ud = (r = [], e, t) => {
13676
- const n = He(e), i = He(t);
13675
+ }, ld = (r = [], e, t) => {
13676
+ const n = Ue(e), i = Ue(t);
13677
13677
  return n.elements[0].elements = [], i.elements[0].elements = [], r.forEach((s) => {
13678
13678
  const o = ru(), a = {
13679
13679
  type: "element",
@@ -13697,13 +13697,13 @@ const rd = (r, e) => ({
13697
13697
  documentIdsUpdated: n,
13698
13698
  extensibleUpdated: i
13699
13699
  };
13700
- }, ld = (r) => {
13701
- const e = He(r);
13702
- return e["word/comments.xml"] = Et.COMMENTS_XML_DEF, e["word/commentsExtended.xml"] = Et.COMMENTS_EXTENDED_XML_DEF, e["word/commentsExtensible.xml"] = Et.COMMENTS_EXTENSIBLE_XML_DEF, e["word/commentsIds.xml"] = Et.COMMENTS_IDS_XML_DEF, e["[Content_Types].xml"] = Et.CONTENT_TYPES, e;
13703
13700
  }, cd = (r) => {
13704
- const e = He(r);
13701
+ const e = Ue(r);
13702
+ return e["word/comments.xml"] = Et.COMMENTS_XML_DEF, e["word/commentsExtended.xml"] = Et.COMMENTS_EXTENDED_XML_DEF, e["word/commentsExtensible.xml"] = Et.COMMENTS_EXTENSIBLE_XML_DEF, e["word/commentsIds.xml"] = Et.COMMENTS_IDS_XML_DEF, e["[Content_Types].xml"] = Et.CONTENT_TYPES, e;
13703
+ }, fd = (r) => {
13704
+ const e = Ue(r);
13705
13705
  return delete e["word/comments.xml"], delete e["word/commentsExtended.xml"], delete e["word/commentsExtensible.xml"], delete e["word/commentsIds.xml"], e;
13706
- }, sr = (r) => ({ ...Et.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), fd = ({
13706
+ }, sr = (r) => ({ ...Et.DOCUMENT_RELS_XML_DEF.elements[0].elements.find((n) => n.attributes.Target === r) }), dd = ({
13707
13707
  convertedXml: r,
13708
13708
  defs: e,
13709
13709
  commentsWithParaIds: t,
@@ -13712,16 +13712,16 @@ const rd = (r, e) => ({
13712
13712
  }) => {
13713
13713
  const s = [];
13714
13714
  if (n === "clean")
13715
- return { documentXml: cd(r), relationships: s };
13716
- const o = ld(r);
13717
- o["word/comments.xml"] = od(
13715
+ return { documentXml: fd(r), relationships: s };
13716
+ const o = cd(r);
13717
+ o["word/comments.xml"] = ad(
13718
13718
  e,
13719
13719
  o["word/comments.xml"]
13720
- ), s.push(sr("comments.xml")), o["word/commentsExtended.xml"] = ad(
13720
+ ), s.push(sr("comments.xml")), o["word/commentsExtended.xml"] = ud(
13721
13721
  t,
13722
13722
  o["word/commentsExtended.xml"]
13723
13723
  ), s.push(sr("commentsExtended.xml"));
13724
- const { documentIdsUpdated: a, extensibleUpdated: u } = ud(
13724
+ const { documentIdsUpdated: a, extensibleUpdated: u } = ld(
13725
13725
  t,
13726
13726
  o["word/commentsIds.xml"],
13727
13727
  o["word/commentsExtensible.xml"]
@@ -13730,7 +13730,7 @@ const rd = (r, e) => ({
13730
13730
  relationships: s,
13731
13731
  documentXml: o
13732
13732
  };
13733
- }, dd = (r, e) => e ? ["width", `${Math.max(e, r)}px`] : ["min-width", `${r}px`], md = (r, e, t, n) => {
13733
+ }, md = (r, e) => e ? ["width", `${Math.max(e, r)}px`] : ["min-width", `${r}px`], pd = (r, e, t, n) => {
13734
13734
  let i = 0, s = !0;
13735
13735
  const o = [], a = [], u = r.firstChild;
13736
13736
  if (!u) return {};
@@ -13739,7 +13739,7 @@ const rd = (r, e) => ({
13739
13739
  for (let w = 0; w < v; w++, A++) {
13740
13740
  const B = t === A ? n : F && F[w];
13741
13741
  i += B || e, B || (s = !1);
13742
- const [R, D] = dd(e, B);
13742
+ const [R, D] = md(e, B);
13743
13743
  o.push(["col", { style: `${R}: ${D}` }]), a.push(parseInt(D, 10));
13744
13744
  }
13745
13745
  }
@@ -13753,31 +13753,31 @@ const rd = (r, e) => ({
13753
13753
  };
13754
13754
  function qt(r) {
13755
13755
  const { type: e } = r.node || {}, t = {
13756
- doc: gd,
13757
- body: pd,
13756
+ doc: wd,
13757
+ body: hd,
13758
13758
  paragraph: su,
13759
- text: yd,
13759
+ text: bd,
13760
13760
  bulletList: Fo,
13761
13761
  orderedList: Fo,
13762
- lineBreak: Sd,
13763
- table: Td,
13764
- tableRow: Rd,
13765
- tableCell: Od,
13766
- bookmarkStart: qd,
13767
- fieldAnnotation: Gd,
13768
- tab: Bd,
13769
- image: uu,
13770
- hardBreak: Wd,
13762
+ lineBreak: Td,
13763
+ table: Fd,
13764
+ tableRow: Pd,
13765
+ tableCell: Ld,
13766
+ bookmarkStart: Md,
13767
+ fieldAnnotation: Wd,
13768
+ tab: kd,
13769
+ image: lu,
13770
+ hardBreak: Jd,
13771
13771
  commentRangeStart: () => So(r, "Start"),
13772
13772
  commentRangeEnd: () => So(r, "End"),
13773
13773
  commentReference: () => null,
13774
- shapeContainer: Jd,
13775
- shapeTextbox: $d,
13776
- contentBlock: Kd
13774
+ shapeContainer: $d,
13775
+ shapeTextbox: Kd,
13776
+ contentBlock: Xd
13777
13777
  };
13778
13778
  return t[e] ? t[e](r) : (console.error("No translation function found for node type:", e), null);
13779
13779
  }
13780
- function pd(r) {
13780
+ function hd(r) {
13781
13781
  const e = r.bodyNode?.elements.find((n) => n.name === "w:sectPr") || {};
13782
13782
  if (r.converter) {
13783
13783
  const n = r.converter.pageStyles.pageMargins, i = e.elements.find((o) => o.name === "w:pgMar"), { attributes: s } = i;
@@ -13795,7 +13795,7 @@ function su(r) {
13795
13795
  const e = dt(r), t = e.find((s) => s.name === "htmlAnnotation");
13796
13796
  if (t)
13797
13797
  return t.elements;
13798
- const n = hd(r.node);
13798
+ const n = gd(r.node);
13799
13799
  n && e.unshift(n);
13800
13800
  let i = {};
13801
13801
  return r.node.attrs?.rsidRDefault && (i["w:rsidRDefault"] = r.node.attrs.rsidRDefault), {
@@ -13804,13 +13804,13 @@ function su(r) {
13804
13804
  attributes: i
13805
13805
  };
13806
13806
  }
13807
- function hd(r) {
13807
+ function gd(r) {
13808
13808
  const { attrs: e = {} } = r, t = [], { styleId: n } = e;
13809
13809
  n && t.push({ name: "w:pStyle", attributes: { "w:val": n } });
13810
13810
  const { spacing: i, indent: s, textAlign: o, textIndent: a, lineHeight: u, marksAttrs: c, keepLines: l, keepNext: h, dropcap: g } = e;
13811
13811
  if (i) {
13812
13812
  const { lineSpaceBefore: A, lineSpaceAfter: v, line: F, lineRule: w } = i, B = {};
13813
- A >= 0 && (B["w:before"] = Te(A)), v >= 0 && (B["w:after"] = Te(v)), w === "exact" ? u && (B["w:line"] = _f(parseFloat(u))) : u && (B["w:line"] = pi(u)), B["w:lineRule"] = w || "auto";
13813
+ A >= 0 && (B["w:before"] = Te(A)), v >= 0 && (B["w:after"] = Te(v)), w === "exact" ? u && (B["w:line"] = qf(parseFloat(u))) : u && (B["w:line"] = pi(u)), B["w:lineRule"] = w || "auto";
13814
13814
  const R = {
13815
13815
  name: "w:spacing",
13816
13816
  attributes: B
@@ -13876,7 +13876,7 @@ function hd(r) {
13876
13876
  elements: t
13877
13877
  } : null;
13878
13878
  }
13879
- function gd(r) {
13879
+ function wd(r) {
13880
13880
  const e = {
13881
13881
  type: "body",
13882
13882
  content: r.node.content
@@ -13884,7 +13884,7 @@ function gd(r) {
13884
13884
  return [{
13885
13885
  name: "w:document",
13886
13886
  elements: [qt({ ...r, node: e })],
13887
- attributes: zf
13887
+ attributes: Gf
13888
13888
  }, r];
13889
13889
  }
13890
13890
  function dt(r) {
@@ -13893,10 +13893,10 @@ function dt(r) {
13893
13893
  const t = [];
13894
13894
  return e.forEach((n) => {
13895
13895
  let i = qt({ ...r, node: n });
13896
- i = wd(i), i instanceof Array ? t.push(...i) : t.push(i);
13896
+ i = yd(i), i instanceof Array ? t.push(...i) : t.push(i);
13897
13897
  }), t.filter((n) => n);
13898
13898
  }
13899
- const wd = (r) => {
13899
+ const yd = (r) => {
13900
13900
  if (!r) return r;
13901
13901
  const e = r.elements?.some((i) => i.name === "w:r"), t = r.elements?.some((i) => i.name === "w:sdt");
13902
13902
  let n = r;
@@ -13950,14 +13950,14 @@ function Br(r, e, t) {
13950
13950
  }
13951
13951
  return Zt(o, a);
13952
13952
  }
13953
- function yd(r) {
13953
+ function bd(r) {
13954
13954
  const { node: e } = r, t = [xr, Pi];
13955
- if (e.marks?.some((a) => t.includes(a.type))) return xd(r);
13956
- if (e.marks?.some((a) => a.type === "link")) return Ad(r);
13955
+ if (e.marks?.some((a) => t.includes(a.type))) return Ad(r);
13956
+ if (e.marks?.some((a) => a.type === "link")) return Dd(r);
13957
13957
  const { text: s, marks: o = [] } = e;
13958
13958
  return Br(s, o, r);
13959
13959
  }
13960
- function bd(r) {
13960
+ function xd(r) {
13961
13961
  const e = r.find((t) => t.type === Oi);
13962
13962
  if (e)
13963
13963
  return {
@@ -13972,8 +13972,8 @@ function bd(r) {
13972
13972
  elements: e.attrs.before.map((n) => kr([n])).filter((n) => n !== void 0)
13973
13973
  };
13974
13974
  }
13975
- function xd(r) {
13976
- const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o = bd(t);
13975
+ function Ad(r) {
13976
+ const { node: e } = r, t = e.marks, n = [xr, Pi, Oi], i = t.find((c) => n.includes(c.type)), s = i.type === xr, o = xd(t);
13977
13977
  e.marks = t.filter((c) => !n.includes(c.type)), o && e.marks.push(o);
13978
13978
  const a = qt({ ...r, node: e });
13979
13979
  if (!s) {
@@ -14011,21 +14011,50 @@ function kr(r = []) {
14011
14011
  return Bo(i);
14012
14012
  }) : Bo(e));
14013
14013
  }
14014
- function Ad(r) {
14015
- const { node: e } = r, t = e.marks.find((a) => a.type === "link"), n = t.attrs.href;
14014
+ function Dd(r) {
14015
+ const { node: e } = r, t = e.marks.find((u) => u.type === "link"), n = t.attrs.href;
14016
14016
  let i = t.attrs.rId;
14017
- i || (i = au(r, n)), e.marks = e.marks.filter((a) => a.type !== "link");
14018
- const s = qt({ ...r, node: e });
14017
+ i || (i = uu(r, n)), e.marks = e.marks.filter((u) => u.type !== "link");
14018
+ const s = qt({ ...r, node: e }), o = au(s);
14019
14019
  return {
14020
14020
  name: "w:hyperlink",
14021
14021
  type: "element",
14022
14022
  attributes: {
14023
14023
  "r:id": i
14024
14024
  },
14025
- elements: [s]
14025
+ elements: [o]
14026
14026
  };
14027
14027
  }
14028
- function au(r, e) {
14028
+ function au(r) {
14029
+ if (!r) return r;
14030
+ const e = Ue(r);
14031
+ if (!e) return e;
14032
+ const t = {
14033
+ name: "w:rStyle",
14034
+ attributes: { "w:val": "Hyperlink" }
14035
+ }, n = {
14036
+ name: "w:color",
14037
+ attributes: { "w:val": "467886" }
14038
+ };
14039
+ if (e.name === "w:r") {
14040
+ const i = e.elements.find((s) => s.name === "w:rPr");
14041
+ if (i) {
14042
+ const s = i.elements.find((a) => a.name === "w:color"), o = i.elements.find((a) => a.name === "w:rStyle");
14043
+ s || i.elements.unshift(n), o || i.elements.unshift(t);
14044
+ } else {
14045
+ const s = {
14046
+ name: "w:rPr",
14047
+ elements: [
14048
+ t,
14049
+ n
14050
+ ]
14051
+ };
14052
+ e.elements.unshift(s);
14053
+ }
14054
+ }
14055
+ return e;
14056
+ }
14057
+ function uu(r, e) {
14029
14058
  const t = "rId" + Ri();
14030
14059
  return (!r.relationships || !Array.isArray(r.relationships)) && (r.relationships = []), r.relationships.push({
14031
14060
  type: "element",
@@ -14051,9 +14080,9 @@ function To(r, e) {
14051
14080
  return r.relationships.push(n), t;
14052
14081
  }
14053
14082
  function Fo(r) {
14054
- const { type: e } = r.node, t = Cd(r), n = [];
14083
+ const { type: e } = r.node, t = Sd(r), n = [];
14055
14084
  return t.forEach((i) => {
14056
- const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ?? Dd(r, o), E = Ed(s, g, a);
14085
+ const { level: s, listType: o, pPrs: a, content: u, attrs: c = {} } = i, g = (i.attrs.numId || i.listId) ?? vd(r, o), E = Cd(s, g, a);
14057
14086
  u.forEach((A, v) => {
14058
14087
  const F = Object.assign({}, A);
14059
14088
  F.attrs = {
@@ -14073,9 +14102,9 @@ function Fo(r) {
14073
14102
  }
14074
14103
  const { attributes: D } = c, { originalInlineRunProps: k } = D || {};
14075
14104
  if (k && E.elements.push(k), B === -1)
14076
- w.elements.unshift(He(E));
14105
+ w.elements.unshift(Ue(E));
14077
14106
  else {
14078
- const N = He(E).elements.map((M) => {
14107
+ const N = Ue(E).elements.map((M) => {
14079
14108
  const _ = w.elements[B].elements.find((C) => C.name === M.name);
14080
14109
  return _ || M;
14081
14110
  });
@@ -14089,8 +14118,8 @@ function Fo(r) {
14089
14118
  });
14090
14119
  }), n;
14091
14120
  }
14092
- function Dd(r, e) {
14093
- const t = vd(r.converter?.numbering?.definitions), n = e === "bullet" ? td : ed, i = t, s = n.attributes["w:abstractNumId"], o = {
14121
+ function vd(r, e) {
14122
+ const t = Ed(r.converter?.numbering?.definitions), n = e === "bullet" ? rd : td, i = t, s = n.attributes["w:abstractNumId"], o = {
14094
14123
  type: "element",
14095
14124
  name: "w:num",
14096
14125
  attributes: {
@@ -14103,8 +14132,8 @@ function Dd(r, e) {
14103
14132
  };
14104
14133
  return r.converter.numbering.definitions[i] = o, i;
14105
14134
  }
14106
- const vd = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
14107
- function Ed(r, e, t = []) {
14135
+ const Ed = (r) => !r || !Object.keys(r).length ? 0 : Math.max(...Object.keys(r).map((t) => parseInt(t, 10))) + 1;
14136
+ function Cd(r, e, t = []) {
14108
14137
  return {
14109
14138
  name: "w:pPr",
14110
14139
  type: "element",
@@ -14129,7 +14158,7 @@ function Ed(r, e, t = []) {
14129
14158
  ]
14130
14159
  };
14131
14160
  }
14132
- function Cd({ node: r }) {
14161
+ function Sd({ node: r }) {
14133
14162
  const { content: e, attrs: t = {} } = r, { listId: n, syncId: i } = r.attrs || {}, s = r.attrs["list-style-type"], { attributes: o = {} } = t, a = o?.parentAttributes?.paragraphProperties?.elements?.filter((l) => l.name !== "w:numPr") || [], u = [];
14134
14163
  function c(l, h = 0) {
14135
14164
  !l || !l.length || l.forEach((g) => {
@@ -14150,22 +14179,22 @@ function Cd({ node: r }) {
14150
14179
  }
14151
14180
  return c(e), u;
14152
14181
  }
14153
- function Sd(r) {
14182
+ function Td(r) {
14154
14183
  const e = {}, { lineBreakType: t } = r.node?.attrs || {};
14155
14184
  return t && (e["w:type"] = t), {
14156
14185
  name: "w:br",
14157
14186
  attributes: e
14158
14187
  };
14159
14188
  }
14160
- function Td(r) {
14161
- r.node = Fd(r.node, r);
14162
- const e = dt(r), t = kd(r.node), n = Id(r.node, r);
14189
+ function Fd(r) {
14190
+ r.node = Bd(r.node, r);
14191
+ const e = dt(r), t = Nd(r.node), n = Rd(r.node, r);
14163
14192
  return e.unshift(t), e.unshift(n), {
14164
14193
  name: "w:tbl",
14165
14194
  elements: e
14166
14195
  };
14167
14196
  }
14168
- function Fd(r, { editorSchema: e }) {
14197
+ function Bd(r, { editorSchema: e }) {
14169
14198
  const { content: t } = r;
14170
14199
  for (let n = 0; n < t.length; n++) {
14171
14200
  const i = t[n];
@@ -14201,13 +14230,13 @@ function Fd(r, { editorSchema: e }) {
14201
14230
  }
14202
14231
  return r;
14203
14232
  }
14204
- function Bd(r) {
14233
+ function kd(r) {
14205
14234
  const { marks: e = [] } = r.node, t = kr(e);
14206
14235
  return Zt({
14207
14236
  name: "w:tab"
14208
14237
  }, t);
14209
14238
  }
14210
- function kd(r) {
14239
+ function Nd(r) {
14211
14240
  const e = [], { attrs: t } = r, { tableWidth: n, tableWidthType: i, tableStyleId: s, borders: o, tableIndent: a, tableLayout: u, tableCellSpacing: c } = t;
14212
14241
  if (s) {
14213
14242
  const l = {
@@ -14217,7 +14246,7 @@ function kd(r) {
14217
14246
  e.push(l);
14218
14247
  }
14219
14248
  if (o) {
14220
- const l = Nd(r);
14249
+ const l = Id(r);
14221
14250
  e.push(l);
14222
14251
  }
14223
14252
  if (a) {
@@ -14252,7 +14281,7 @@ function kd(r) {
14252
14281
  elements: e
14253
14282
  };
14254
14283
  }
14255
- function Nd(r) {
14284
+ function Id(r) {
14256
14285
  const { borders: e } = r.attrs, t = [];
14257
14286
  return e ? (["top", "bottom", "left", "right", "insideH", "insideV"].forEach((i) => {
14258
14287
  const s = e[i];
@@ -14276,11 +14305,11 @@ function Nd(r) {
14276
14305
  elements: t
14277
14306
  }) : void 0;
14278
14307
  }
14279
- function Id(r, e) {
14308
+ function Rd(r, e) {
14280
14309
  const { editorSchema: t } = e;
14281
14310
  let n = [];
14282
14311
  try {
14283
- const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } = md(
14312
+ const s = t.nodeFromJSON(r), o = 25, { colgroupValues: a } = pd(
14284
14313
  s,
14285
14314
  o
14286
14315
  );
@@ -14299,14 +14328,14 @@ function Id(r, e) {
14299
14328
  elements: i
14300
14329
  };
14301
14330
  }
14302
- function Rd(r) {
14303
- const e = dt(r), t = Pd(r.node);
14331
+ function Pd(r) {
14332
+ const e = dt(r), t = Od(r.node);
14304
14333
  return t.elements.length && e.unshift(t), {
14305
14334
  name: "w:tr",
14306
14335
  elements: e
14307
14336
  };
14308
14337
  }
14309
- function Pd(r) {
14338
+ function Od(r) {
14310
14339
  const { attrs: e } = r, t = [], { rowHeight: n, rowHeightType: i } = e;
14311
14340
  if (n) {
14312
14341
  const s = { "w:val": Te(n) };
@@ -14322,17 +14351,17 @@ function Pd(r) {
14322
14351
  elements: t
14323
14352
  };
14324
14353
  }
14325
- function Od(r) {
14354
+ function Ld(r) {
14326
14355
  const e = dt({
14327
14356
  ...r,
14328
14357
  tableCell: r.node
14329
- }), t = Ld(r.node);
14358
+ }), t = _d(r.node);
14330
14359
  return e.unshift(t), {
14331
14360
  name: "w:tc",
14332
14361
  elements: e
14333
14362
  };
14334
14363
  }
14335
- function Ld(r) {
14364
+ function _d(r) {
14336
14365
  const e = [], { attrs: t } = r, { colwidth: n = [], cellWidthType: i = "dxa", background: s = {}, colspan: o, rowspan: a, widthUnit: u } = t, c = n.reduce((v, F) => v + F, 0), l = {
14337
14366
  name: "w:tcW",
14338
14367
  attributes: { "w:w": u === "px" ? Te(c) : It(c), "w:type": i }
@@ -14356,7 +14385,7 @@ function Ld(r) {
14356
14385
  if (g) {
14357
14386
  const v = {
14358
14387
  name: "w:tcMar",
14359
- elements: _d(g)
14388
+ elements: qd(g)
14360
14389
  };
14361
14390
  e.push(v);
14362
14391
  }
@@ -14408,11 +14437,11 @@ function Ld(r) {
14408
14437
  elements: e
14409
14438
  };
14410
14439
  }
14411
- function _d(r) {
14440
+ function qd(r) {
14412
14441
  const e = [], { top: t, right: n, bottom: i, left: s } = r;
14413
14442
  return t != null && e.push({ name: "w:top", attributes: { "w:w": Te(t) } }), n != null && e.push({ name: "w:right", attributes: { "w:w": Te(n) } }), i != null && e.push({ name: "w:bottom", attributes: { "w:w": Te(i) } }), s != null && e.push({ name: "w:left", attributes: { "w:w": Te(s) } }), e;
14414
14443
  }
14415
- function qd(r) {
14444
+ function Md(r) {
14416
14445
  const e = {
14417
14446
  name: "w:bookmarkStart",
14418
14447
  attributes: {
@@ -14452,7 +14481,7 @@ function Bo(r) {
14452
14481
  break;
14453
14482
  case "color":
14454
14483
  let s = n.color.replace(/^#/, "").replace(/;$/, "");
14455
- s.startsWith("rgb") && (s = Hf(s)), t.attributes["w:val"] = s;
14484
+ s.startsWith("rgb") && (s = Vf(s)), t.attributes["w:val"] = s;
14456
14485
  break;
14457
14486
  case "textAlign":
14458
14487
  t.attributes["w:val"] = n.textAlign;
@@ -14469,7 +14498,7 @@ function Bo(r) {
14469
14498
  }
14470
14499
  return t;
14471
14500
  }
14472
- function Md(r) {
14501
+ function Ud(r) {
14473
14502
  if (!r) return {};
14474
14503
  const e = r.split(";")[0].split("/")[1];
14475
14504
  if (!r || e !== "png")
@@ -14483,30 +14512,30 @@ function Md(r) {
14483
14512
  originalHeight: i.getInt32(20)
14484
14513
  };
14485
14514
  }
14486
- function Ud(r, e, t, n) {
14515
+ function jd(r, e, t, n) {
14487
14516
  let i = r, s = e, o = Math.min(t / r, n / e);
14488
14517
  return i = Math.round(i * o), s = Math.round(s * o), { scaledWidth: i, scaledHeight: s };
14489
14518
  }
14490
- function uu(r, e) {
14519
+ function lu(r, e) {
14491
14520
  const {
14492
14521
  node: { attrs: t = {}, marks: n = [] },
14493
14522
  tableCell: i
14494
14523
  } = r;
14495
14524
  let s = t.rId;
14496
- const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = Md(o);
14525
+ const o = t.src || t.imageSrc, { originalWidth: a, originalHeight: u } = Ud(o);
14497
14526
  let c = t.size ? {
14498
14527
  w: mt(t.size.width),
14499
14528
  h: mt(t.size.height)
14500
14529
  } : e;
14501
14530
  if (a && u) {
14502
- const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } = Ud(a, u, F, w);
14531
+ const F = Me(c.w), w = Me(c.h), { scaledWidth: B, scaledHeight: R } = jd(a, u, F, w);
14503
14532
  c = {
14504
14533
  w: mt(B),
14505
14534
  h: mt(R)
14506
14535
  };
14507
14536
  }
14508
14537
  if (i) {
14509
- const F = i.attrs.colwidth.reduce((N, M) => N + M, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: D, height: k } = Xd(c.w, c.h, R);
14538
+ const F = i.attrs.colwidth.reduce((N, M) => N + M, 0), w = i.attrs.cellMargins?.left || 8, B = i.attrs.cellMargins?.right || 8, R = mt(F - (w + B)), { width: D, height: k } = Yd(c.w, c.h, R);
14510
14539
  D && k && (c = { w: D, h: k });
14511
14540
  }
14512
14541
  if (r.node.type === "image" && !s) {
@@ -14515,7 +14544,7 @@ function uu(r, e) {
14515
14544
  } else if (r.node.type === "fieldAnnotation" && !s) {
14516
14545
  const F = o?.split(";")[0].split("/")[1];
14517
14546
  if (!F)
14518
- return lu(r);
14547
+ return cu(r);
14519
14548
  const w = Ri(4), B = t.fieldId.replace("-", "_"), R = `media/${B}_${w}.${F}`;
14520
14549
  s = To(r, R), r.media[`${B}_${w}.${F}`] = o;
14521
14550
  }
@@ -14741,27 +14770,27 @@ function uu(r, e) {
14741
14770
  []
14742
14771
  );
14743
14772
  }
14744
- function lu(r) {
14773
+ function cu(r) {
14745
14774
  const {
14746
14775
  node: { attrs: e = {}, marks: t = [] }
14747
- } = r, n = cu(e);
14776
+ } = r, n = fu(e);
14748
14777
  return Br(e.displayLabel, [...t, ...n], r);
14749
14778
  }
14750
- function jd(r) {
14779
+ function Hd(r) {
14751
14780
  const {
14752
14781
  node: { attrs: e = {}, marks: t = [] }
14753
- } = r, n = Nc.decode(e.displayLabel);
14782
+ } = r, n = Ic.decode(e.displayLabel);
14754
14783
  return Br(n, t, r);
14755
14784
  }
14756
- function Hd(r) {
14785
+ function Vd(r) {
14757
14786
  const {
14758
14787
  node: { attrs: e = {}, marks: t = [] },
14759
14788
  editorSchema: n
14760
- } = r, s = new window.DOMParser().parseFromString(e.rawHtml || e.displayLabel, "text/html"), o = cu(e), a = [...t, ...o];
14789
+ } = r, s = new window.DOMParser().parseFromString(e.rawHtml || e.displayLabel, "text/html"), o = fu(e), a = [...t, ...o];
14761
14790
  let u = Ct.create({
14762
14791
  doc: yr.fromSchema(n).parse(s)
14763
14792
  });
14764
- a.length && (u = Yd(u, a));
14793
+ a.length && (u = Zd(u, a));
14765
14794
  const c = u.doc.toJSON();
14766
14795
  return {
14767
14796
  name: "htmlAnnotation",
@@ -14772,12 +14801,12 @@ function Hd(r) {
14772
14801
  };
14773
14802
  }
14774
14803
  function ko(r, e) {
14775
- return uu(r, e);
14804
+ return lu(r, e);
14776
14805
  }
14777
- function Vd(r) {
14806
+ function zd(r) {
14778
14807
  const {
14779
14808
  node: { attrs: e = {}, marks: t = [] }
14780
- } = r, n = au(r, e.linkUrl), i = Br(e.linkUrl, t, r);
14809
+ } = r, n = uu(r, e.linkUrl), i = Br(e.linkUrl, t, r), s = au(i);
14781
14810
  return {
14782
14811
  name: "w:hyperlink",
14783
14812
  type: "element",
@@ -14785,10 +14814,10 @@ function Vd(r) {
14785
14814
  "r:id": n,
14786
14815
  "w:history": 1
14787
14816
  },
14788
- elements: [i]
14817
+ elements: [s]
14789
14818
  };
14790
14819
  }
14791
- function zd(r) {
14820
+ function Gd(r) {
14792
14821
  const e = {
14793
14822
  w: 4286250,
14794
14823
  h: 4286250
@@ -14797,15 +14826,15 @@ function zd(r) {
14797
14826
  h: 495e3
14798
14827
  };
14799
14828
  return {
14800
- text: lu,
14829
+ text: cu,
14801
14830
  image: (i) => ko(i, e),
14802
14831
  signature: (i) => ko(i, t),
14803
- checkbox: jd,
14804
- html: Hd,
14805
- link: Vd
14832
+ checkbox: Hd,
14833
+ html: Vd,
14834
+ link: zd
14806
14835
  }[r];
14807
14836
  }
14808
- const cu = (r = {}) => {
14837
+ const fu = (r = {}) => {
14809
14838
  const {
14810
14839
  fontFamily: e,
14811
14840
  fontSize: t,
@@ -14817,8 +14846,8 @@ const cu = (r = {}) => {
14817
14846
  } = r, u = [];
14818
14847
  return e && u.push({ type: "fontFamily", attrs: { fontFamily: e } }), t && u.push({ type: "fontSize", attrs: { fontSize: t } }), n && u.push({ type: "bold", attrs: {} }), i && u.push({ type: "underline", attrs: {} }), s && u.push({ type: "italic", attrs: {} }), o && u.push({ type: "color", attrs: { color: o } }), a && u.push({ type: "highlight", attrs: { color: a } }), u;
14819
14848
  };
14820
- function Gd(r) {
14821
- const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = zd(n.type);
14849
+ function Wd(r) {
14850
+ const { node: e, isFinalDoc: t } = r, { attrs: n = {} } = e, i = Gd(n.type);
14822
14851
  if (!i) return {};
14823
14852
  let s, o;
14824
14853
  if (t)
@@ -14898,7 +14927,7 @@ function Gd(r) {
14898
14927
  ]
14899
14928
  };
14900
14929
  }
14901
- function Wd(r) {
14930
+ function Jd(r) {
14902
14931
  const { node: e = {} } = r, { attrs: t = {} } = e, { pageBreakSource: n } = t;
14903
14932
  return n === "sectPr" ? null : {
14904
14933
  name: "w:r",
@@ -14909,7 +14938,7 @@ function Wd(r) {
14909
14938
  }]
14910
14939
  };
14911
14940
  }
14912
- function Jd(r) {
14941
+ function $d(r) {
14913
14942
  const { node: e } = r, t = dt(r), n = {
14914
14943
  name: "v:shape",
14915
14944
  attributes: {
@@ -14935,7 +14964,7 @@ function Jd(r) {
14935
14964
  elements: [Zt(i)]
14936
14965
  };
14937
14966
  }
14938
- function $d(r) {
14967
+ function Kd(r) {
14939
14968
  const { node: e } = r, n = {
14940
14969
  name: "w:txbxContent",
14941
14970
  elements: dt(r)
@@ -14948,7 +14977,7 @@ function $d(r) {
14948
14977
  elements: [n]
14949
14978
  };
14950
14979
  }
14951
- function Kd(r) {
14980
+ function Xd(r) {
14952
14981
  const { node: e } = r, { drawingContent: t } = e.attrs, n = {
14953
14982
  name: "w:drawing",
14954
14983
  elements: [
@@ -14967,17 +14996,17 @@ function Kd(r) {
14967
14996
  })]
14968
14997
  };
14969
14998
  }
14970
- var nt, fu, hi, gi;
14999
+ var nt, du, hi, gi;
14971
15000
  class No {
14972
15001
  constructor(e) {
14973
15002
  Ir(this, nt);
14974
15003
  this.converter = e;
14975
15004
  }
14976
15005
  schemaToXml(e, t = !1) {
14977
- return Ke(this, nt, fu).call(this, e, t).join("");
15006
+ return Ke(this, nt, du).call(this, e, t).join("");
14978
15007
  }
14979
15008
  }
14980
- nt = new WeakSet(), fu = function(e, t = falase) {
15009
+ nt = new WeakSet(), du = function(e, t = falase) {
14981
15010
  const n = JSON.parse(JSON.stringify(e)), i = this.converter.declaration.attributes, s = `<?xml${Object.entries(i).map(([u, c]) => ` ${u}="${c}"`).join("")}?>`, o = Ke(this, nt, gi).call(this, n, t);
14982
15011
  return [s, ...o];
14983
15012
  }, hi = function(e) {
@@ -15015,14 +15044,14 @@ nt = new WeakSet(), fu = function(e, t = falase) {
15015
15044
  }
15016
15045
  return a || u.push(`</${n}>`), u;
15017
15046
  };
15018
- function Xd(r, e, t) {
15047
+ function Yd(r, e, t) {
15019
15048
  if (r > t) {
15020
15049
  let n = t / r, i = Math.round(e * n);
15021
15050
  return { width: t, height: i };
15022
15051
  }
15023
15052
  return { width: r, height: e };
15024
15053
  }
15025
- function Yd(r, e) {
15054
+ function Zd(r, e) {
15026
15055
  const { tr: t, doc: n, schema: i } = r, s = ["fontFamily", "fontSize", "highlight"];
15027
15056
  if (!e.some((h) => s.includes(h.type)))
15028
15057
  return r;
@@ -15044,22 +15073,22 @@ function Yd(r, e) {
15044
15073
  }));
15045
15074
  }), r.apply(t);
15046
15075
  }
15047
- const Zd = '<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>', Qd = (r) => JSON.parse(ba.xml2json(r, null, 2)), em = (r, e = Zd) => r["word/document.xml"] || Qd(e), tm = (r) => {
15076
+ const Qd = '<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh wp14"><w:body></w:body></w:document>', em = (r) => JSON.parse(ba.xml2json(r, null, 2)), tm = (r, e = Qd) => r["word/document.xml"] || em(e), rm = (r) => {
15048
15077
  const { nodes: e } = r;
15049
15078
  if (e.length === 0)
15050
15079
  return { nodes: [], consumed: 0 };
15051
15080
  const t = e[0];
15052
15081
  switch (t.name) {
15053
15082
  case "w:tbl":
15054
- return { nodes: [nm(t, r)], consumed: 1 };
15083
+ return { nodes: [im(t, r)], consumed: 1 };
15055
15084
  }
15056
15085
  return { nodes: [], consumed: 0 };
15057
- }, rm = {
15086
+ }, nm = {
15058
15087
  handlerName: "tableNodeHandler",
15059
- handler: tm
15088
+ handler: rm
15060
15089
  };
15061
- function nm(r, e) {
15062
- const { docx: t, nodeListHandler: n } = e, i = r.elements.find((k) => k.name === "w:tblPr"), o = i.elements.find((k) => k.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } = mu(o), c = i.elements.find((k) => k.name === "w:tblStyle"), h = { tableStyleId: c?.attributes["w:val"] }, g = i?.elements.find((k) => k.name === "w:tblInd");
15090
+ function im(r, e) {
15091
+ const { docx: t, nodeListHandler: n } = e, i = r.elements.find((k) => k.name === "w:tblPr"), o = i.elements.find((k) => k.name === "w:tblBorders")?.elements || [], { borders: a, rowBorders: u } = pu(o), c = i.elements.find((k) => k.name === "w:tblStyle"), h = { tableStyleId: c?.attributes["w:val"] }, g = i?.elements.find((k) => k.name === "w:tblInd");
15063
15092
  if (g) {
15064
15093
  const { "w:w": k, "w:type": N } = g.attributes;
15065
15094
  h.tableIndent = { width: be(k), type: N };
@@ -15069,7 +15098,7 @@ function nm(r, e) {
15069
15098
  const { "w:type": k } = E.attributes;
15070
15099
  h.tableLayout = k;
15071
15100
  }
15072
- const A = du(c, t), v = i.elements.find((k) => k.name === "w:tblW");
15101
+ const A = mu(c, t), v = i.elements.find((k) => k.name === "w:tblW");
15073
15102
  v && (h.tableWidth = {
15074
15103
  width: be(v.attributes["w:w"]),
15075
15104
  type: v.attributes["w:type"]
@@ -15083,7 +15112,7 @@ function nm(r, e) {
15083
15112
  h.borders = B;
15084
15113
  const D = [];
15085
15114
  return w.forEach((k) => {
15086
- const N = om(k, r, R, c, e);
15115
+ const N = am(k, r, R, c, e);
15087
15116
  N.content?.length && D.push(N);
15088
15117
  }), {
15089
15118
  type: "table",
@@ -15091,15 +15120,15 @@ function nm(r, e) {
15091
15120
  attrs: h
15092
15121
  };
15093
15122
  }
15094
- function im(r, e, t, n, i = null, s, o, a) {
15095
- const { docx: u, nodeListHandler: c } = o, l = r.elements.find((se) => se.name === "w:tcPr"), h = l?.elements?.find((se) => se.name === "w:tcBorders"), g = sm(h, n), E = pu(t), A = l?.elements?.find((se) => se.name === "w:tcW");
15123
+ function sm(r, e, t, n, i = null, s, o, a) {
15124
+ const { docx: u, nodeListHandler: c } = o, l = r.elements.find((se) => se.name === "w:tcPr"), h = l?.elements?.find((se) => se.name === "w:tcBorders"), g = om(h, n), E = hu(t), A = l?.elements?.find((se) => se.name === "w:tcW");
15096
15125
  let v = A ? be(A.attributes["w:w"]) : null;
15097
15126
  const F = A?.attributes["w:type"];
15098
15127
  !v && i && (v = i);
15099
15128
  const w = Io(r), { attributes: B } = w || {}, D = {
15100
15129
  color: l?.elements?.find((se) => se.name === "w:shd")?.attributes["w:fill"]
15101
- }, N = l?.elements?.find((se) => se.name === "w:gridSpan")?.attributes["w:val"], M = l?.elements?.find((se) => se.name === "w:tcMar"), C = l?.elements?.find((se) => se.name === "w:vAlign")?.attributes["w:val"] || "top", J = {}, oe = du(s, u) || {};
15102
- J.cellMargins = am(M, oe);
15130
+ }, N = l?.elements?.find((se) => se.name === "w:gridSpan")?.attributes["w:val"], M = l?.elements?.find((se) => se.name === "w:tcMar"), C = l?.elements?.find((se) => se.name === "w:vAlign")?.attributes["w:val"] || "top", J = {}, oe = mu(s, u) || {};
15131
+ J.cellMargins = um(M, oe);
15103
15132
  const { fontSize: Z, fonts: fe = {} } = oe, de = fe.ascii;
15104
15133
  if (v) {
15105
15134
  J.colwidth = [v], J.widthUnit = "px";
@@ -15145,7 +15174,7 @@ const Io = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
15145
15174
  return Object.keys(i) ? (i.val = "none", i) : null;
15146
15175
  }
15147
15176
  return null;
15148
- }, sm = (r, e) => {
15177
+ }, om = (r, e) => {
15149
15178
  if (!r) return null;
15150
15179
  const t = {}, n = or(r, "bottom", e);
15151
15180
  n && (t.bottom = n);
@@ -15156,7 +15185,7 @@ const Io = (r) => r.elements.find((n) => n.name === "w:tcPr")?.elements?.find((n
15156
15185
  const o = or(r, "right", e);
15157
15186
  return o && (t.right = o), t;
15158
15187
  };
15159
- function du(r, e, t) {
15188
+ function mu(r, e, t) {
15160
15189
  if (!r) return null;
15161
15190
  const n = {}, { attributes: i = {} } = r, s = i["w:val"];
15162
15191
  if (!s) return null;
@@ -15183,12 +15212,12 @@ function du(r, e, t) {
15183
15212
  n.fonts = { ascii: w, hAnsi: B, cs: R };
15184
15213
  }
15185
15214
  const F = E.elements.find((w) => w.name === "w:sz");
15186
- F?.attributes && (n.fontSize = Lf(F.attributes["w:val"]) + "pt");
15215
+ F?.attributes && (n.fontSize = _f(F.attributes["w:val"]) + "pt");
15187
15216
  }
15188
15217
  const A = c.elements.find((v) => v.name === "w:tblPr");
15189
15218
  if (A && A.elements) {
15190
15219
  h && h.elements && A.elements.push(...h.elements);
15191
- const v = A?.elements?.find((D) => D.name === "w:tblBorders"), { elements: F = [] } = v || {}, { borders: w, rowBorders: B } = mu(F);
15220
+ const v = A?.elements?.find((D) => D.name === "w:tblBorders"), { elements: F = [] } = v || {}, { borders: w, rowBorders: B } = pu(F);
15192
15221
  w && (n.borders = w), B && (n.rowBorders = B);
15193
15222
  const R = A?.elements.find((D) => D.name === "w:tblCellMar");
15194
15223
  if (R) {
@@ -15203,7 +15232,7 @@ function du(r, e, t) {
15203
15232
  }
15204
15233
  return n;
15205
15234
  }
15206
- function mu(r) {
15235
+ function pu(r) {
15207
15236
  const e = {}, t = {};
15208
15237
  return r.forEach((n) => {
15209
15238
  const { name: i } = n, s = i.split("w:")[1], { attributes: o } = n, a = {}, u = o["w:color"], c = o["w:sz"];
@@ -15213,22 +15242,22 @@ function mu(r) {
15213
15242
  rowBorders: t
15214
15243
  };
15215
15244
  }
15216
- function om(r, e, t, n, i) {
15245
+ function am(r, e, t, n, i) {
15217
15246
  const s = {}, a = r.elements.find((A) => A.name === "w:trPr")?.elements?.find((A) => A.name === "w:trHeight"), u = a?.attributes["w:val"];
15218
15247
  a?.attributes["w:hRule"];
15219
15248
  const c = {};
15220
15249
  t?.insideH && (c.bottom = t.insideH), t?.insideV && (c.right = t.insideV), s.borders = c, u && (s.rowHeight = be(u));
15221
- const l = pu(e), h = r.elements.filter((A) => A.name === "w:tc");
15250
+ const l = hu(e), h = r.elements.filter((A) => A.name === "w:tc");
15222
15251
  return {
15223
15252
  type: "tableRow",
15224
15253
  content: h?.map((A, v) => {
15225
15254
  const F = h.length > 1 ? l[v] : null;
15226
- return im(A, r, e, c, F, n, i, v);
15255
+ return sm(A, r, e, c, F, n, i, v);
15227
15256
  }) || [],
15228
15257
  attrs: s
15229
15258
  };
15230
15259
  }
15231
- const am = (r, e) => {
15260
+ const um = (r, e) => {
15232
15261
  const t = r?.elements?.find((F) => F.name === "w:left"), n = r?.elements?.find((F) => F.name === "w:right"), i = r?.elements?.find((F) => F.name === "w:top"), s = r?.elements?.find((F) => F.name === "w:bottom"), o = t?.attributes["w:w"], a = n?.attributes["w:w"], u = i?.attributes["w:w"], c = s?.attributes["w:w"], { cellMargins: l = {} } = e, {
15233
15262
  marginLeft: h,
15234
15263
  marginRight: g,
@@ -15241,7 +15270,7 @@ const am = (r, e) => {
15241
15270
  top: be(u ?? E),
15242
15271
  bottom: be(c ?? A)
15243
15272
  };
15244
- }, pu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [], um = (r) => {
15273
+ }, hu = (r) => r.elements.find((t) => t.name === "w:tblGrid")?.elements?.flatMap((t) => t.name !== "w:gridCol" ? [] : be(t.attributes["w:w"])) || [], lm = (r) => {
15245
15274
  const { nodes: e, filename: t } = r, n = ["w:drawing", "w:p"];
15246
15275
  if (e.length === 0 || !n.includes(e[0].name))
15247
15276
  return { nodes: [], consumed: 0 };
@@ -15265,7 +15294,7 @@ function Ro(r, e, t) {
15265
15294
  height: Me(o.attributes?.cy)
15266
15295
  }, c = r.elements.find((q) => q.name === "a:graphic").elements.find((q) => q.name === "a:graphicData"), { uri: l } = c?.attributes;
15267
15296
  if (l && l === "http://schemas.microsoft.com/office/word/2010/wordprocessingShape")
15268
- return lm(t, r, c);
15297
+ return cm(t, r, c);
15269
15298
  const g = c.elements.find((q) => q.name === "pic:pic");
15270
15299
  if (!g || !g.elements) return null;
15271
15300
  const A = g.elements.find((q) => q.name === "pic:blipFill").elements.find((q) => q.name === "a:blip"), v = r.elements.find((q) => q.name === "wp:positionH"), F = v?.elements.find((q) => q.name === "wp:posOffset"), w = Me(F?.elements[0]?.text), B = v?.attributes.relativeFrom, R = v?.elements.find((q) => q.name === "wp:align")?.elements[0]?.text, D = r.elements.find((q) => q.name === "wp:positionV"), k = D?.elements.find((q) => q.name === "wp:posOffset"), N = Me(k?.elements[0]?.text), M = D?.attributes.relativeFrom, _ = D?.elements.find((q) => q.name === "wp:align")?.elements[0]?.text, C = r.elements.find((q) => q.name === "wp:simplePos"), J = r.elements.find((q) => q.name === "wp:wrapSquare"), oe = r.elements.find((q) => q.name === "wp:wrapTopAndBottom"), Z = r.elements.find((q) => q.name === "wp:docPr");
@@ -15316,12 +15345,12 @@ function Ro(r, e, t) {
15316
15345
  }
15317
15346
  };
15318
15347
  }
15319
- const lm = (r, e, t) => {
15348
+ const cm = (r, e, t) => {
15320
15349
  const n = t.elements.find((l) => l.name === "wps:wsp"), s = n.elements.find((l) => l.name === "wps:txbx")?.elements?.find((l) => l.name === "w:txbxContent");
15321
15350
  e.elements.find((l) => l.name === "wp:docPr");
15322
15351
  const o = n.elements.find((l) => l.name === "wps:spPr"), a = o?.elements.find((l) => l.name === "a:prstGeom");
15323
15352
  if (a && a.attributes.prst === "rect")
15324
- return cm(r, o);
15353
+ return fm(r, o);
15325
15354
  if (!s)
15326
15355
  return null;
15327
15356
  const { nodeListHandler: u } = r;
@@ -15330,7 +15359,7 @@ const lm = (r, e, t) => {
15330
15359
  node: s.elements[0],
15331
15360
  nodes: s.elements
15332
15361
  })[0];
15333
- }, cm = (r, e) => {
15362
+ }, fm = (r, e) => {
15334
15363
  const t = {}, [n] = r.nodes;
15335
15364
  n?.name === "w:drawing" && (t.drawingContent = n);
15336
15365
  const i = e.elements.find((l) => l.name === "a:xfrm"), s = i.elements.find((l) => l.name === "a:off"), o = i.elements.find((l) => l.name === "a:ext");
@@ -15347,9 +15376,9 @@ const lm = (r, e, t) => {
15347
15376
  type: "contentBlock",
15348
15377
  attrs: t
15349
15378
  };
15350
- }, fm = {
15379
+ }, dm = {
15351
15380
  handlerName: "drawingNodeHandler",
15352
- handler: um
15381
+ handler: lm
15353
15382
  };
15354
15383
  function Rt(r, e = [], t = null) {
15355
15384
  const n = [], i = /* @__PURE__ */ new Set();
@@ -15374,7 +15403,7 @@ function Rt(r, e = [], t = null) {
15374
15403
  const { attributes: u = {} } = s, c = { type: a.type };
15375
15404
  if (!(u["w:val"] == "0" || u["w:val"] === "none")) {
15376
15405
  if (a.mark && (c.type = a.mark), Object.keys(u).length) {
15377
- const l = mm(a.type, u, t);
15406
+ const l = pm(a.type, u, t);
15378
15407
  if (l == null) return;
15379
15408
  c.attrs = {}, c.attrs[a.property] = l;
15380
15409
  }
@@ -15383,7 +15412,7 @@ function Rt(r, e = [], t = null) {
15383
15412
  });
15384
15413
  }), wi(n);
15385
15414
  }
15386
- function dm(r, e) {
15415
+ function mm(r, e) {
15387
15416
  const t = r.elements?.find((o) => o.name === "w:rPrChange");
15388
15417
  if (!t)
15389
15418
  return [];
@@ -15404,25 +15433,25 @@ function wi(r) {
15404
15433
  });
15405
15434
  }), [...t, { type: "textStyle", attrs: n }];
15406
15435
  }
15407
- function mm(r, e, t) {
15436
+ function pm(r, e, t) {
15408
15437
  r === "tabs" && (r = "textIndent");
15409
15438
  const n = {
15410
15439
  color: () => `#${e["w:val"]}`,
15411
15440
  fontSize: () => `${e["w:val"] / 2}pt`,
15412
- textIndent: () => hm(e),
15413
- fontFamily: () => pm(e, t),
15414
- lineHeight: () => gm(e),
15441
+ textIndent: () => gm(e),
15442
+ fontFamily: () => hm(e, t),
15443
+ lineHeight: () => wm(e),
15415
15444
  textAlign: () => e["w:val"],
15416
15445
  link: () => e.href,
15417
15446
  underline: () => e["w:val"],
15418
15447
  bold: () => e?.["w:val"] || null,
15419
15448
  italic: () => e?.["w:val"] || null,
15420
- highlight: () => wm(e)
15449
+ highlight: () => ym(e)
15421
15450
  };
15422
15451
  if (r in n || console.debug("❗️❗️ No value mapper for:", r, "Attributes:", e), r in n)
15423
15452
  return n[r], n[r]();
15424
15453
  }
15425
- function pm(r, e) {
15454
+ function hm(r, e) {
15426
15455
  const t = r["w:ascii"], n = r["w:asciiTheme"];
15427
15456
  if (!e || !n) return t;
15428
15457
  const i = e["word/theme/theme1.xml"];
@@ -15430,21 +15459,21 @@ function pm(r, e) {
15430
15459
  const { elements: s } = i, { elements: o } = s[0];
15431
15460
  return o.find((g) => g.name === "a:themeElements").elements.find((g) => g.name === "a:fontScheme").elements.find((g) => g.name === "a:majorFont").elements.find((g) => g.name === "a:latin").attributes.typeface;
15432
15461
  }
15433
- function hm(r) {
15462
+ function gm(r) {
15434
15463
  let e = r["w:left"];
15435
15464
  return e ? `${qe(e)}in` : null;
15436
15465
  }
15437
- function gm(r) {
15466
+ function wm(r) {
15438
15467
  const e = r["w:line"], t = r["w:lineRule"];
15439
15468
  return !e || e === "0" ? null : t === "exact" ? `${tu(e)}pt` : `${Ii(e)}`;
15440
15469
  }
15441
- function wm(r) {
15470
+ function ym(r) {
15442
15471
  const e = r["w:fill"];
15443
- return e && e !== "auto" ? `#${e}` : Uf(r?.["w:val"]) ? `#${r["w:val"]}` : Mf(r?.["w:val"]) || null;
15472
+ return e && e !== "auto" ? `#${e}` : jf(r?.["w:val"]) ? `#${r["w:val"]}` : Uf(r?.["w:val"]) || null;
15444
15473
  }
15445
15474
  function xt(r, e) {
15446
- const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = ym(s);
15447
- return s.find((l) => l.name === "w:r") && (a.elements = a?.elements?.filter((l) => l.name !== "w:rPr")), u && u?.elements?.length && t.push(...Rt(u, n)), a && a.elements?.length && t.push(...Rt(a, n)), t.push(...dm(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((l) => {
15475
+ const t = [], n = [], { attributes: i = {}, elements: s = [] } = r, { nodes: o, paragraphProperties: a = {}, runProperties: u = {} } = bm(s);
15476
+ return s.find((l) => l.name === "w:r") && (a.elements = a?.elements?.filter((l) => l.name !== "w:rPr")), u && u?.elements?.length && t.push(...Rt(u, n)), a && a.elements?.length && t.push(...Rt(a, n)), t.push(...mm(u, t)), a && a.elements?.length && (i.paragraphProperties = a), t && r.name === "w:p" && t.forEach((l) => {
15448
15477
  const h = Object.keys(l.attrs ?? {})[0];
15449
15478
  if (h) {
15450
15479
  const g = l.attrs[h];
@@ -15452,7 +15481,7 @@ function xt(r, e) {
15452
15481
  }
15453
15482
  }), { elements: o, attributes: i, marks: t, unknownMarks: n };
15454
15483
  }
15455
- function ym(r) {
15484
+ function bm(r) {
15456
15485
  const e = r.find((s) => s.name === "w:pPr"), t = r.find((s) => s.name === "w:rPr"), n = r.find((s) => s.name === "w:sectPr");
15457
15486
  return {
15458
15487
  nodes: r.filter((s) => s.name !== "w:pPr" && s.name !== "w:rPr" && s.name !== "w:sectPr"),
@@ -15464,11 +15493,11 @@ function ym(r) {
15464
15493
  function fr(r) {
15465
15494
  return Ot.allowedElements[r.name || r.type];
15466
15495
  }
15467
- const bm = (r) => !!Ot.propertyTypes[r.name || r.type];
15468
- function hu(r) {
15496
+ const xm = (r) => !!Ot.propertyTypes[r.name || r.type];
15497
+ function gu(r) {
15469
15498
  return r.filter((n) => n.name === "w:r").some((n) => n.elements.some((i) => i.name === "w:t"));
15470
15499
  }
15471
- const xm = (r) => {
15500
+ const Am = (r) => {
15472
15501
  const { nodes: e, nodeListHandler: t } = r;
15473
15502
  if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins" || e[0].name === "w:sdt"))
15474
15503
  return { nodes: [], consumed: 0 };
@@ -15491,10 +15520,10 @@ const xm = (r) => {
15491
15520
  return u.forEach((h) => {
15492
15521
  h.marks === void 0 && (h.marks = []), h.marks.push({ type: c, attrs: l });
15493
15522
  }), { nodes: u, consumed: 1 };
15494
- }, Am = {
15523
+ }, Dm = {
15495
15524
  handlerName: "trackChangeNodeHandler",
15496
- handler: xm
15497
- }, Dm = (r) => {
15525
+ handler: Am
15526
+ }, vm = (r) => {
15498
15527
  const { nodes: e, docx: t, nodeListHandler: n } = r;
15499
15528
  if (e.length === 0 || e[0].name !== "w:hyperlink")
15500
15529
  return { nodes: [], consumed: 0 };
@@ -15513,16 +15542,16 @@ const xm = (r) => {
15513
15542
  }
15514
15543
  }
15515
15544
  return { nodes: n.handler({ ...r, nodes: A }), consumed: 1 };
15516
- }, vm = {
15545
+ }, Em = {
15517
15546
  handlerName: "hyperlinkNodeHandler",
15518
- handler: Dm
15519
- }, Em = (r) => {
15547
+ handler: vm
15548
+ }, Cm = (r) => {
15520
15549
  const { nodes: e, nodeListHandler: t, parentStyleId: n, docx: i } = r;
15521
15550
  if (e.length === 0 || e[0].name !== "w:r")
15522
15551
  return { nodes: [], consumed: 0 };
15523
15552
  const s = e[0], o = { ...r, nodes: s.elements };
15524
15553
  let a = t.handler(o)?.filter((l) => l) || [];
15525
- const u = s.elements?.some((l) => l.name === "w:rPr"), c = Cm(i, n);
15554
+ const u = s.elements?.some((l) => l.name === "w:rPr"), c = Sm(i, n);
15526
15555
  if (u) {
15527
15556
  const { marks: l = [], attributes: h = {} } = xt(s), g = l.find((v) => v.type === "textStyle"), E = g && Object.keys(g.attrs).length > 0;
15528
15557
  c.marks && !E && l.push(...c.marks), s.marks && l.push(...s.marks);
@@ -15533,16 +15562,16 @@ const xm = (r) => {
15533
15562
  });
15534
15563
  } else c.marks && (a = a.map((l) => ({ ...l, marks: wi(c.marks) })));
15535
15564
  return { nodes: a, consumed: 1 };
15536
- }, Cm = (r, e) => {
15565
+ }, Sm = (r, e) => {
15537
15566
  const t = r?.["word/styles.xml"];
15538
15567
  if (!t)
15539
15568
  return {};
15540
15569
  const i = t.elements[0].elements.filter((s) => s.name === "w:style").find((s) => s.attributes["w:styleId"] === e) || {};
15541
15570
  return i ? xt(i) : {};
15542
- }, Sm = {
15571
+ }, Tm = {
15543
15572
  handlerName: "runNodeHandler",
15544
- handler: Em
15545
- }, Tm = (r) => {
15573
+ handler: Cm
15574
+ }, Fm = (r) => {
15546
15575
  const { nodes: e, insideTrackChange: t } = r;
15547
15576
  if (e.length === 0 || !(e[0].name === "w:t" || t && e[0].name === "w:delText"))
15548
15577
  return { nodes: [], consumed: 0 };
@@ -15563,52 +15592,52 @@ const xm = (r) => {
15563
15592
  ],
15564
15593
  consumed: 1
15565
15594
  };
15566
- }, Fm = {
15595
+ }, Bm = {
15567
15596
  handlerName: "textNodeHandler",
15568
- handler: Tm
15569
- }, gu = (r) => {
15597
+ handler: Fm
15598
+ }, wu = (r) => {
15570
15599
  if (!r || !Array.isArray(r))
15571
15600
  return r;
15572
15601
  let e = [], t = null;
15573
15602
  for (let n of r)
15574
- n.type === "text" ? t && Bm(t, n) ? t = {
15603
+ n.type === "text" ? t && km(t, n) ? t = {
15575
15604
  ...t,
15576
15605
  text: t.text += n.text
15577
15606
  } : (t && e.push(t), t = { ...n }) : (t && (e.push(t), t = null), e.push(n));
15578
15607
  return t && e.push(t), e;
15579
- }, Bm = (r, e) => {
15608
+ }, km = (r, e) => {
15580
15609
  if (!r || !e) return !1;
15581
15610
  let t = r.marks ?? [], n = e.marks ?? [];
15582
15611
  if (t.length !== n.length)
15583
15612
  return !1;
15584
15613
  for (let i = 0; i < t.length; i++)
15585
- if (t[i].attrs || (t[i].attrs = {}), n[i].attrs || (n[i].attrs = {}), t[i].type !== n[i].type || Object.keys(t[i].attrs).length !== Object.keys(n[i].attrs).length || !km(t[i].attrs, n[i].attrs))
15614
+ if (t[i].attrs || (t[i].attrs = {}), n[i].attrs || (n[i].attrs = {}), t[i].type !== n[i].type || Object.keys(t[i].attrs).length !== Object.keys(n[i].attrs).length || !Nm(t[i].attrs, n[i].attrs))
15586
15615
  return !1;
15587
15616
  return !0;
15588
- }, km = (r = {}, e = {}) => If(r, e), Nm = (r) => {
15617
+ }, Nm = (r = {}, e = {}) => Rf(r, e), Im = (r) => {
15589
15618
  const { nodes: e, lists: t, docx: n } = r;
15590
15619
  if (e.length === 0 || e[0].name !== "w:p")
15591
15620
  return { nodes: [], consumed: 0 };
15592
- const i = He(e[0]), s = Du(i.elements);
15621
+ const i = Ue(e[0]), s = vu(i.elements);
15593
15622
  i.elements = s;
15594
15623
  const o = i.elements.find((a) => a.name === "w:pPr");
15595
15624
  if (yi(i, n)) {
15596
- const a = He(e), u = [];
15625
+ const a = Ue(e), u = [];
15597
15626
  let c = a.shift();
15598
15627
  for (; c && yi(c, n); )
15599
- u.push(c), c = a.shift(), c?.elements && !hu(c.elements) && (u.push(c), c = a.shift());
15628
+ u.push(c), c = a.shift(), c?.elements && !gu(c.elements) && (u.push(c), c = a.shift());
15600
15629
  return {
15601
- nodes: [wu({ listItems: u, params: r, originalPpr: o })],
15630
+ nodes: [yu({ listItems: u, params: r, originalPpr: o })],
15602
15631
  consumed: u.filter((h) => h.seen).length,
15603
15632
  lists: t
15604
15633
  };
15605
15634
  } else
15606
15635
  return { nodes: [], consumed: 0, lists: t };
15607
- }, Im = {
15636
+ }, Rm = {
15608
15637
  handlerName: "listHandler",
15609
- handler: Nm
15638
+ handler: Im
15610
15639
  };
15611
- function wu({
15640
+ function yu({
15612
15641
  listItems: r,
15613
15642
  originalPpr: e,
15614
15643
  params: t,
@@ -15626,11 +15655,11 @@ function wu({
15626
15655
  if (!A)
15627
15656
  return console.error("Standard node handler not found"), { nodes: [], consumed: 0 };
15628
15657
  const w = r[0].elements.find((k) => k.name === "w:pPr")?.elements?.find((k) => k.name === "w:pStyle")?.attributes["w:val"], B = Nr({ node: r[0], styleId: w, docx: u });
15629
- s = Pt(B), i = parseInt(B?.elements?.find((k) => k.name === "w:ilvl")?.attributes["w:val"]) || 0, i === void 0 && (i = yu(w, u));
15658
+ s = Pt(B), i = parseInt(B?.elements?.find((k) => k.name === "w:ilvl")?.attributes["w:val"]) || 0, i === void 0 && (i = bu(w, u));
15630
15659
  let R = 0;
15631
15660
  for (let [k, N] of r.entries()) {
15632
15661
  if (N.seen) continue;
15633
- if (N.elements && !hu(N.elements)) {
15662
+ if (N.elements && !gu(N.elements)) {
15634
15663
  const I = A({ ...t, nodes: [N] }).nodes[0];
15635
15664
  I && h[h.length - 1]?.content.push(I), N.seen = !0;
15636
15665
  continue;
@@ -15645,9 +15674,9 @@ function wu({
15645
15674
  lvlText: re,
15646
15675
  lvlJc: ie,
15647
15676
  numId: L
15648
- } = Lm(N, n, u);
15677
+ } = _m(N, n, u);
15649
15678
  E = se;
15650
- const V = parseInt(ne), q = i === V && L === s, K = Om({
15679
+ const V = parseInt(ne), q = i === V && L === s, K = Lm({
15651
15680
  firstListId: L,
15652
15681
  secondListId: s,
15653
15682
  level: V,
@@ -15670,7 +15699,7 @@ function wu({
15670
15699
  rsidRDefault: M?.["w:rsidRDefault"] || null,
15671
15700
  styleId: w
15672
15701
  },
15673
- content: gu(S.content)
15702
+ content: wu(S.content)
15674
15703
  }), I.push(S), R = n;
15675
15704
  let b = [];
15676
15705
  if (E !== "bullet" && (b = [...o, l[s][n]], l[s][i]++), !o.length && i > 0) {
@@ -15692,11 +15721,11 @@ function wu({
15692
15721
  parentAttributes: N?.attributes || null
15693
15722
  };
15694
15723
  const X = e?.elements?.find((ue) => ue.name === "w:rPr");
15695
- X && (m.attributes.originalInlineRunProps = X), m.numId = L, u && (m.spacing = xu(N, u, w));
15724
+ X && (m.attributes.originalInlineRunProps = X), m.numId = L, u && (m.spacing = Au(N, u, w));
15696
15725
  const te = Po(I, m, []);
15697
15726
  h.push(te);
15698
15727
  } else if (p) {
15699
- const I = [...o, l[s][n]], S = wu({
15728
+ const I = [...o, l[s][n]], S = yu({
15700
15729
  listItems: r.slice(k),
15701
15730
  originalPpr: e,
15702
15731
  params: t,
@@ -15731,7 +15760,7 @@ function wu({
15731
15760
  };
15732
15761
  return a && (D.lastNestedListLevel = R), D;
15733
15762
  }
15734
- const yu = (r, e) => {
15763
+ const bu = (r, e) => {
15735
15764
  const i = Li(r, e)?.elements?.find((s) => s.name === "w:pPr")?.elements?.find((s) => s.name === "w:outlineLvl");
15736
15765
  try {
15737
15766
  return parseInt(i?.attributes["w:val"]);
@@ -15771,7 +15800,7 @@ function Po(r, e, t) {
15771
15800
  marks: t
15772
15801
  };
15773
15802
  }
15774
- const Rm = [
15803
+ const Pm = [
15775
15804
  "decimal",
15776
15805
  // eg: 1, 2, 3, 4, 5, ...
15777
15806
  "decimalZero",
@@ -15796,7 +15825,7 @@ const Rm = [
15796
15825
  // eg: (0, 1, 2, ..., 9, 10, 11, 12, ..., 19, 1A, 1B, 1C, ..., 1Z, 20, 21, ..., 2Z)
15797
15826
  "none"
15798
15827
  // No bullet
15799
- ], Pm = [
15828
+ ], Om = [
15800
15829
  "bullet",
15801
15830
  // A standard bullet point (•)
15802
15831
  "square",
@@ -15805,7 +15834,7 @@ const Rm = [
15805
15834
  // Circle bullets (◦)
15806
15835
  "disc"
15807
15836
  // Disc bullets (●)
15808
- ], Om = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
15837
+ ], Lm = ({ firstListId: r, secondListId: e, level: t, pStyleId: n, docx: i }) => {
15809
15838
  const { numFmt: s, lvlText: o, lvlJc: a } = Ar(r, t, n, i), {
15810
15839
  numFmt: u,
15811
15840
  lvlText: c,
@@ -15835,7 +15864,7 @@ const Rm = [
15835
15864
  }
15836
15865
  const a = o.elements, u = a.filter((N) => N.name === "w:abstractNum"), h = a.filter((N) => N.name === "w:num").find((N) => N.attributes["w:numId"] === r)?.elements[0].attributes["w:val"], g = u?.find(
15837
15866
  (N) => N.attributes["w:abstractNumId"] === h
15838
- ), E = _m(g, e), v = g?.elements?.find((N) => N.name === "w:numStyleLink")?.attributes["w:val"];
15867
+ ), E = qm(g, e), v = g?.elements?.find((N) => N.name === "w:numStyleLink")?.attributes["w:val"];
15839
15868
  if (v) {
15840
15869
  const N = Oo(v, n);
15841
15870
  return Ar(N.numId, e, null, n);
@@ -15843,11 +15872,11 @@ const Rm = [
15843
15872
  const F = E?.elements?.find((N) => N.name === "w:start")?.attributes["w:val"], w = E?.elements?.find((N) => N.name === "w:numFmt")?.attributes["w:val"], B = E?.elements?.find((N) => N.name === "w:lvlText").attributes["w:val"], R = E?.elements?.find((N) => N.name === "w:lvlJc").attributes["w:val"], D = E?.elements?.find((N) => N.name === "w:pPr"), k = E?.elements?.find((N) => N.name === "w:rPr");
15844
15873
  return { start: F, numFmt: w, lvlText: B, lvlJc: R, pPr: D, rPr: k };
15845
15874
  };
15846
- function Lm(r, e, t) {
15875
+ function _m(r, e, t) {
15847
15876
  if (!r) return;
15848
15877
  const { attributes: n = {} } = r, { paragraphProperties: i = {} } = n, { elements: s = [] } = i, u = r.elements.find((C) => C.name === "w:pPr")?.elements?.find((C) => C.name === "w:pStyle")?.attributes["w:val"], c = Nr({ node: r, styleId: u, docx: t });
15849
15878
  if (!c) return {};
15850
- const h = c?.elements.find((C) => C.name === "w:numId")?.attributes["w:val"], E = c?.elements.find((C) => C.name === "w:ilvl")?.attributes["w:val"] || yu(u, t), v = s.find((C) => C.name === "w:pStyle")?.attributes["w:val"], {
15879
+ const h = c?.elements.find((C) => C.name === "w:numId")?.attributes["w:val"], E = c?.elements.find((C) => C.name === "w:ilvl")?.attributes["w:val"] || bu(u, t), v = s.find((C) => C.name === "w:pStyle")?.attributes["w:val"], {
15851
15880
  start: F,
15852
15881
  numFmt: w,
15853
15882
  lvlText: B,
@@ -15856,17 +15885,17 @@ function Lm(r, e, t) {
15856
15885
  rPr: k
15857
15886
  } = Ar(h, e, v, t);
15858
15887
  let N, M;
15859
- D && (N = qm(D)), k && (M = Mm(k));
15888
+ D && (N = Mm(D)), k && (M = Um(k));
15860
15889
  let _;
15861
- if (Pm.includes(w?.toLowerCase())) _ = "bulletList";
15862
- else if (Rm.includes(w)) _ = "orderedList";
15890
+ if (Om.includes(w?.toLowerCase())) _ = "bulletList";
15891
+ else if (Pm.includes(w)) _ = "orderedList";
15863
15892
  else return {};
15864
15893
  return { listType: _, listOrderingType: w, ilvl: E, numId: h, listrPrs: M, listpPrs: N, start: F, lvlText: B, lvlJc: R };
15865
15894
  }
15866
- function _m(r, e) {
15895
+ function qm(r, e) {
15867
15896
  return r?.elements?.find((t) => Number(t.attributes["w:ilvl"]) === e);
15868
15897
  }
15869
- function qm(r) {
15898
+ function Mm(r) {
15870
15899
  const { elements: e } = r, t = ["w:ind", "w:jc", "w:tabs"], n = {};
15871
15900
  return e && e.forEach((i) => {
15872
15901
  t.includes(i.name);
@@ -15876,7 +15905,7 @@ function qm(r) {
15876
15905
  });
15877
15906
  }), n;
15878
15907
  }
15879
- function Mm(r) {
15908
+ function Um(r) {
15880
15909
  const { elements: e } = r, t = [
15881
15910
  "w:rFonts",
15882
15911
  "w:b",
@@ -15907,12 +15936,12 @@ function Mm(r) {
15907
15936
  });
15908
15937
  }), n;
15909
15938
  }
15910
- const bu = (r) => {
15939
+ const xu = (r) => {
15911
15940
  const { nodes: e, docx: t, nodeListHandler: n, filename: i } = r;
15912
15941
  if (e.length === 0 || e[0].name !== "w:p")
15913
15942
  return { nodes: [], consumed: 0 };
15914
- const s = He(e[0]);
15915
- let o, a = Du(s.elements);
15943
+ const s = Ue(e[0]);
15944
+ let o, a = vu(s.elements);
15916
15945
  if (s.elements = a, yi(s, t))
15917
15946
  return { nodes: [], consumed: 0 };
15918
15947
  const u = n.handlerEntities.find(
@@ -15933,7 +15962,7 @@ const bu = (r) => {
15933
15962
  }
15934
15963
  let v;
15935
15964
  if (g && (v = g.attributes["w:val"], o.attrs.styleId = v), t) {
15936
- const D = Um(s, t, v);
15965
+ const D = jm(s, t, v);
15937
15966
  o.attrs.indent || (o.attrs.indent = {}), (D.left || D.left === 0) && (o.attrs.indent.left = D.left), (D.right || D.right === 0) && (o.attrs.indent.right = D.right), (D.firstLine || D.firstLine === 0) && (o.attrs.indent.firstLine = D.firstLine), (D.hanging || D.hanging === 0) && (o.attrs.indent.hanging = D.hanging), (D.textIndent || D.textIndent === 0) && (o.attrs.textIndent = `${D.textIndent}in`);
15938
15967
  }
15939
15968
  const F = h?.elements?.find((D) => D.name === "w:jc");
@@ -15943,7 +15972,7 @@ const bu = (r) => {
15943
15972
  const B = h?.elements?.find((D) => D.name === "w:keepNext");
15944
15973
  if (B && B.attributes && (o.attrs.keepNext = B.attributes["w:val"]), t) {
15945
15974
  const D = s.attributes?.["w:rsidRDefault"];
15946
- o.attrs.spacing = xu(s, t, v, o.attrs.marksAttrs), o.attrs.rsidRDefault = D;
15975
+ o.attrs.spacing = Au(s, t, v, o.attrs.marksAttrs), o.attrs.rsidRDefault = D;
15947
15976
  }
15948
15977
  A && A.attributes["w:dropCap"] && (o.attrs.dropcap = {
15949
15978
  type: A.attributes["w:dropCap"],
@@ -15953,28 +15982,28 @@ const bu = (r) => {
15953
15982
  vAnchor: A.attributes["w:vAnchor"]
15954
15983
  }), o.attrs.filename = i, o && o.content && (o = {
15955
15984
  ...o,
15956
- content: gu(o.content)
15985
+ content: wu(o.content)
15957
15986
  });
15958
15987
  const R = h?.elements?.find((D) => D.name === "w:sectPr");
15959
15988
  return R && (o.attrs.paragraphProperties || (o.attrs.paragraphProperties = {}), o.attrs.paragraphProperties.sectPr = R, o.attrs.pageBreakSource = "sectPr"), { nodes: o ? [o] : [], consumed: 1 };
15960
- }, Um = (r, e, t = "") => {
15989
+ }, jm = (r, e, t = "") => {
15961
15990
  const n = {
15962
15991
  left: 0,
15963
15992
  right: 0,
15964
15993
  firstLine: 0,
15965
15994
  hanging: 0,
15966
15995
  textIndent: 0
15967
- }, { indent: i = {} } = Au(e, t), a = r.elements?.find((E) => E.name === "w:pPr")?.elements?.find((E) => E.name === "w:ind")?.attributes || {}, u = a?.["w:left"] || i?.["w:left"], c = a?.["w:right"] || i?.["w:right"], l = a?.["w:firstLine"] || i?.["w:firstLine"], h = a?.["w:hanging"] || i?.["w:hanging"];
15996
+ }, { indent: i = {} } = Du(e, t), a = r.elements?.find((E) => E.name === "w:pPr")?.elements?.find((E) => E.name === "w:ind")?.attributes || {}, u = a?.["w:left"] || i?.["w:left"], c = a?.["w:right"] || i?.["w:right"], l = a?.["w:firstLine"] || i?.["w:firstLine"], h = a?.["w:hanging"] || i?.["w:hanging"];
15968
15997
  u && (n.left = be(u)), c && (n.right = be(c)), l && (n.firstLine = be(l)), h && (n.hanging = be(h));
15969
15998
  const g = u - parseInt(h || 0) || 0;
15970
15999
  return g && (n.textIndent = qe(g)), n;
15971
- }, xu = (r, e, t = "", n = []) => {
16000
+ }, Au = (r, e, t = "", n = []) => {
15972
16001
  const i = {
15973
16002
  lineSpaceAfter: 0,
15974
16003
  lineSpaceBefore: 0,
15975
16004
  line: 0,
15976
16005
  lineRule: null
15977
- }, { spacing: s = {} } = Au(e, t);
16006
+ }, { spacing: s = {} } = Du(e, t);
15978
16007
  let o, a, u, c;
15979
16008
  const g = r.elements?.find((k) => k.name === "w:pPr")?.elements?.find((k) => k.name === "w:spacing")?.attributes || {}, A = n.find((k) => k.type === "textStyle")?.attrs?.fontSize, v = g?.["w:line"] || u || s?.["w:line"];
15980
16009
  v && (i.line = Ii(v));
@@ -15984,7 +16013,7 @@ const bu = (r) => {
15984
16013
  w && (i.lineSpaceBefore = be(w)), g?.["w:beforeAutospacing"] === "1" && A && (i.lineSpaceBefore += Math.round(parseInt(A) * 0.5 * 96 / 72));
15985
16014
  const R = g?.["w:after"] || o || s?.["w:after"];
15986
16015
  return R && (i.lineSpaceAfter = be(R)), g?.["w:afterAutospacing"] === "1" && A && (i.lineSpaceAfter += Math.round(parseInt(A) * 0.5 * 96 / 72)), i;
15987
- }, Au = (r, e = "") => {
16016
+ }, Du = (r, e = "") => {
15988
16017
  const t = r["word/styles.xml"];
15989
16018
  if (!t)
15990
16019
  return {};
@@ -16000,11 +16029,11 @@ const bu = (r) => {
16000
16029
  indent: k || R || D,
16001
16030
  justify: B
16002
16031
  };
16003
- }, jm = {
16032
+ }, Hm = {
16004
16033
  handlerName: "paragraphNodeHandler",
16005
- handler: bu
16034
+ handler: xu
16006
16035
  };
16007
- function Hm(r, e) {
16036
+ function Vm(r, e) {
16008
16037
  const t = { lineSpaceBefore: null, lineSpaceAfter: null };
16009
16038
  if (!r) return t;
16010
16039
  const n = e["word/styles.xml"];
@@ -16054,7 +16083,7 @@ function Hm(r, e) {
16054
16083
  styles: se
16055
16084
  };
16056
16085
  }
16057
- function Du(r = []) {
16086
+ function vu(r = []) {
16058
16087
  const e = [];
16059
16088
  let t = [], n = !1;
16060
16089
  for (const i of r) {
@@ -16068,14 +16097,14 @@ function Du(r = []) {
16068
16097
  continue;
16069
16098
  }
16070
16099
  if (o === "end" && n) {
16071
- t.push(i), e.push(...Vm(t)), t = [], n = !1;
16100
+ t.push(i), e.push(...zm(t)), t = [], n = !1;
16072
16101
  continue;
16073
16102
  }
16074
16103
  n ? t.push(i) : e.push(i);
16075
16104
  }
16076
16105
  return t.length && e.push(...t), e;
16077
16106
  }
16078
- const Vm = (r = []) => {
16107
+ const zm = (r = []) => {
16079
16108
  let e = [], t = !1, n = !1;
16080
16109
  const i = r.findIndex(
16081
16110
  (h) => h.elements?.some((g) => g.name === "w:fldChar" && g.attributes["w:fldCharType"] === "separate")
@@ -16112,7 +16141,7 @@ const Vm = (r = []) => {
16112
16141
  });
16113
16142
  }
16114
16143
  return e;
16115
- }, zm = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Gm = (r) => {
16144
+ }, Gm = (r) => nodeListHandler.handler({ ...r, nodes: node.elements }), Wm = (r) => {
16116
16145
  const { nodes: e } = r;
16117
16146
  if (e.length === 0 || e[0].name !== "w:sdt")
16118
16147
  return { nodes: [], consumed: 0 };
@@ -16127,14 +16156,14 @@ const Vm = (r = []) => {
16127
16156
  consumed: 1
16128
16157
  };
16129
16158
  }, Lo = {
16130
- "Table of Contents": zm
16131
- }, Wm = (r) => {
16159
+ "Table of Contents": Gm
16160
+ }, Jm = (r) => {
16132
16161
  const { nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i } = r;
16133
16162
  if (e.length === 0 || e[0].name !== "w:sdt")
16134
16163
  return { nodes: [], consumed: 0 };
16135
- const s = e[0], o = s.elements.find((_) => _.name === "w:sdtPr"), a = s.elements.find((_) => _.name === "w:sdtContent"), u = o?.elements.find((_) => _.name === "w:fieldTypeShort")?.attributes["w:val"], { attrs: c, marks: l } = Jm(a);
16164
+ const s = e[0], o = s.elements.find((_) => _.name === "w:sdtPr"), a = s.elements.find((_) => _.name === "w:sdtContent"), u = o?.elements.find((_) => _.name === "w:fieldTypeShort")?.attributes["w:val"], { attrs: c, marks: l } = $m(a);
16136
16165
  if (o?.elements.find((_) => _.name === "w:docPartObj"))
16137
- return Gm({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
16166
+ return Wm({ nodes: e, docx: t, nodeListHandler: n, insideTrackChange: i });
16138
16167
  const g = o?.elements.find((_) => _.name === "w:alias"), E = o?.elements.find((_) => _.name === "w:tag"), A = o?.elements.find((_) => _.name === "w:fieldType")?.attributes["w:val"], v = o?.elements.find((_) => _.name === "w:fieldColor")?.attributes["w:val"], F = o?.elements.find((_) => _.name === "w:fieldMultipleImage")?.attributes["w:val"], w = o?.elements.find((_) => _.name === "w:fieldFontFamily")?.attributes["w:val"], B = o?.elements.find((_) => _.name === "w:fieldFontSize")?.attributes["w:val"], R = o?.elements.find((_) => _.name === "w:fieldTextColor")?.attributes["w:val"], D = o?.elements.find((_) => _.name === "w:fieldTextHighlight")?.attributes["w:val"], k = {
16139
16168
  type: u,
16140
16169
  fieldId: E?.attributes["w:val"],
@@ -16162,7 +16191,7 @@ const Vm = (r = []) => {
16162
16191
  nodes: [M],
16163
16192
  consumed: 1
16164
16193
  };
16165
- }, Jm = (r = {}, e) => {
16194
+ }, $m = (r = {}, e) => {
16166
16195
  const i = r.elements?.find((c) => c.name === "w:r")?.elements?.find((c) => c.name === "w:rPr");
16167
16196
  if (!i) return {};
16168
16197
  const o = Rt(i, []) || [], a = [];
@@ -16184,17 +16213,17 @@ const Vm = (r = []) => {
16184
16213
  attrs: u,
16185
16214
  marks: o
16186
16215
  };
16187
- }, $m = {
16216
+ }, Km = {
16188
16217
  handlerName: "annotationNodeHandler",
16189
- handler: Wm
16190
- }, Km = (r) => {
16218
+ handler: Jm
16219
+ }, Xm = (r) => {
16191
16220
  const { nodes: e, docx: t, nodeListHandler: n } = r;
16192
16221
  if (!e || e.length === 0)
16193
16222
  return { nodes: [], consumed: 0 };
16194
16223
  const i = e[0], { name: s } = i, { attributes: o, elements: a, marks: u = [] } = xt(i);
16195
16224
  if (s === "w:sdt")
16196
16225
  return { nodes: [], consumed: 0 };
16197
- if (bm(i))
16226
+ if (xm(i))
16198
16227
  return {
16199
16228
  nodes: [{
16200
16229
  type: fr(i),
@@ -16214,7 +16243,7 @@ const Vm = (r = []) => {
16214
16243
  consumed: 0,
16215
16244
  unhandled: !0
16216
16245
  };
16217
- const c = [], l = Xm(i);
16246
+ const c = [], l = Ym(i);
16218
16247
  if (a && a.length) {
16219
16248
  const g = a.map((v) => (v.marks || (v.marks = []), v.marks.push(...u), v)), E = { ...r, nodes: g, parentStyleId: l }, A = n.handler(E);
16220
16249
  c.push(...A);
@@ -16225,13 +16254,13 @@ const Vm = (r = []) => {
16225
16254
  attrs: { ...o },
16226
16255
  marks: []
16227
16256
  }], consumed: 1 };
16228
- }, Xm = (r) => {
16257
+ }, Ym = (r) => {
16229
16258
  const t = r.elements?.find((n) => n.name === "w:pPr")?.elements?.find((n) => n.name === "w:pStyle");
16230
16259
  return t ? t.attributes["w:val"] : null;
16231
- }, Ym = {
16260
+ }, Zm = {
16232
16261
  handlerName: "standardNodeHandler",
16233
- handler: Km
16234
- }, Zm = (r) => {
16262
+ handler: Xm
16263
+ }, Qm = (r) => {
16235
16264
  const { nodes: e } = r;
16236
16265
  return e.length === 0 || e[0].name !== "w:br" ? { nodes: [], consumed: 0 } : {
16237
16266
  nodes: [{
@@ -16239,10 +16268,10 @@ const Vm = (r = []) => {
16239
16268
  }],
16240
16269
  consumed: 1
16241
16270
  };
16242
- }, Qm = {
16271
+ }, ep = {
16243
16272
  handlerName: "lineBreakNodeHandler",
16244
- handler: Zm
16245
- }, ep = (r) => {
16273
+ handler: Qm
16274
+ }, tp = (r) => {
16246
16275
  const { nodes: e, nodeListHandler: t, editor: n } = r;
16247
16276
  if (e.length === 0 || e[0].name !== "w:bookmarkStart")
16248
16277
  return { nodes: [], consumed: 0 };
@@ -16271,10 +16300,10 @@ const Vm = (r = []) => {
16271
16300
  }
16272
16301
  const c = { ...r, nodes: [i] }, l = s(c);
16273
16302
  return l.nodes.length === 1 && (l.nodes[0].attrs.name = i.attributes["w:name"], l.nodes[0].attrs.id = i.attributes["w:id"]), l;
16274
- }, tp = {
16303
+ }, rp = {
16275
16304
  handlerName: "bookmarkNodeHandler",
16276
- handler: ep
16277
- }, rp = (r) => {
16305
+ handler: tp
16306
+ }, np = (r) => {
16278
16307
  const e = { nodes: [], consumed: 0 }, { nodes: t, nodeListHandler: n, parentStyleId: i, docx: s } = r;
16279
16308
  if (t.length === 0 || t[0].name !== "w:p")
16280
16309
  return e;
@@ -16293,26 +16322,26 @@ const Vm = (r = []) => {
16293
16322
  ...r,
16294
16323
  nodes: g
16295
16324
  }), consumed: 1 };
16296
- }, np = {
16325
+ }, ip = {
16297
16326
  handlerName: "alternateChoiceHandler",
16298
- handler: rp
16299
- }, ip = (r) => {
16327
+ handler: np
16328
+ }, sp = (r) => {
16300
16329
  const { nodes: e } = r;
16301
16330
  return e.length === 0 || e[0].name !== "sd:autoPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
16302
16331
  type: "page-number"
16303
16332
  }], consumed: 1 };
16304
- }, sp = {
16333
+ }, op = {
16305
16334
  handlerName: "autoPageNumberHandler",
16306
- handler: ip
16307
- }, op = (r) => {
16335
+ handler: sp
16336
+ }, ap = (r) => {
16308
16337
  const { nodes: e } = r;
16309
16338
  return e.length === 0 || e[0].name !== "sd:totalPageNumber" ? { nodes: [], consumed: 0 } : { nodes: [{
16310
16339
  type: "total-page-number"
16311
16340
  }], consumed: 1 };
16312
- }, ap = {
16341
+ }, up = {
16313
16342
  handlerName: "autoTotalPageCountEntity",
16314
- handler: op
16315
- }, up = (r) => {
16343
+ handler: ap
16344
+ }, lp = (r) => {
16316
16345
  const { nodes: e, docx: t, parentStyleId: n } = r;
16317
16346
  if (e.length === 0 || e[0].name !== "w:tab")
16318
16347
  return { nodes: [], consumed: 0 };
@@ -16329,10 +16358,10 @@ const Vm = (r = []) => {
16329
16358
  },
16330
16359
  content: []
16331
16360
  }], consumed: 1 };
16332
- }, lp = {
16361
+ }, cp = {
16333
16362
  handlerName: "tabNodeHandler",
16334
- handler: up
16335
- }, cp = (r) => {
16363
+ handler: lp
16364
+ }, fp = (r) => {
16336
16365
  const { nodes: e } = r;
16337
16366
  if (!e.length || e[0].name !== "w:p")
16338
16367
  return { nodes: [], consumed: 0 };
@@ -16345,14 +16374,14 @@ const Vm = (r = []) => {
16345
16374
  if (!o && !a)
16346
16375
  return { nodes: [], consumed: 0 };
16347
16376
  let u = null;
16348
- return a && !o ? u = null : o.elements?.find((h) => h.name === "v:textbox") && (u = fp({
16377
+ return a && !o ? u = null : o.elements?.find((h) => h.name === "v:textbox") && (u = dp({
16349
16378
  pict: i,
16350
16379
  pNode: t,
16351
16380
  shape: o,
16352
16381
  params: r
16353
16382
  })), { nodes: u ? [u] : [], consumed: 1 };
16354
16383
  };
16355
- function fp({
16384
+ function dp({
16356
16385
  pict: r,
16357
16386
  pNode: e,
16358
16387
  shape: t,
@@ -16360,11 +16389,11 @@ function fp({
16360
16389
  }) {
16361
16390
  const i = {}, s = {}, o = t.attributes || {};
16362
16391
  i.attributes = o, o.fillcolor && (i.fillcolor = o.fillcolor);
16363
- const a = dp(o.style), u = mp(a);
16392
+ const a = mp(o.style), u = pp(a);
16364
16393
  u && (i.style = u);
16365
16394
  const c = t.elements?.find((w) => w.name === "v:textbox"), l = t.elements?.find((w) => w.name === "w10:wrap");
16366
16395
  l?.attributes && (i.wrapAttributes = l.attributes), c?.attributes && (s.attributes = c.attributes);
16367
- const A = (c?.elements?.find((w) => w.name === "w:txbxContent")?.elements || []).map((w) => bu({
16396
+ const A = (c?.elements?.find((w) => w.name === "w:txbxContent")?.elements || []).map((w) => xu({
16368
16397
  nodes: [w],
16369
16398
  docx: n.docx,
16370
16399
  nodeListHandler: Jt()
@@ -16379,13 +16408,13 @@ function fp({
16379
16408
  }]
16380
16409
  };
16381
16410
  }
16382
- function dp(r) {
16411
+ function mp(r) {
16383
16412
  return r ? r.split(";").filter((e) => !!e.trim()).reduce((e, t) => {
16384
16413
  const [n, i] = t.split(":").map((s) => s.trim());
16385
16414
  return n && i && (e[n] = i), e;
16386
16415
  }, {}) : {};
16387
16416
  }
16388
- function mp(r) {
16417
+ function pp(r) {
16389
16418
  const e = [
16390
16419
  "width",
16391
16420
  "height"
@@ -16403,11 +16432,11 @@ function mp(r) {
16403
16432
  e.includes(n) && (t += `${n}: ${i};`);
16404
16433
  return t;
16405
16434
  }
16406
- const pp = {
16435
+ const hp = {
16407
16436
  handlerName: "handlePictNode",
16408
- handler: cp
16437
+ handler: fp
16409
16438
  };
16410
- function hp({ docx: r }) {
16439
+ function gp({ docx: r }) {
16411
16440
  const e = Jt(), t = r["word/comments.xml"];
16412
16441
  if (!t) return;
16413
16442
  const { elements: n } = t;
@@ -16433,16 +16462,16 @@ function hp({ docx: r }) {
16433
16462
  trackedDeletedText: B
16434
16463
  };
16435
16464
  });
16436
- return gp({ docx: r, comments: s });
16465
+ return wp({ docx: r, comments: s });
16437
16466
  }
16438
- const gp = ({ docx: r, comments: e }) => {
16467
+ const wp = ({ docx: r, comments: e }) => {
16439
16468
  const t = r["word/commentsExtended.xml"];
16440
16469
  if (!t) return [];
16441
16470
  const { elements: n } = t, { elements: i } = n[0], s = i.filter((o) => o.name === "w15:commentEx");
16442
16471
  return e.map((o) => {
16443
16472
  const a = s.find((g) => g.attributes["w15:paraId"] === o.paraId);
16444
16473
  if (!a) return { ...o };
16445
- const { isDone: u, paraIdParent: c } = wp(a);
16474
+ const { isDone: u, paraIdParent: c } = yp(a);
16446
16475
  let l;
16447
16476
  return c && (l = e.find((g) => g.paraId === c)), {
16448
16477
  ...o,
@@ -16450,11 +16479,11 @@ const gp = ({ docx: r, comments: e }) => {
16450
16479
  parentCommentId: l?.commentId
16451
16480
  };
16452
16481
  });
16453
- }, wp = (r) => {
16482
+ }, yp = (r) => {
16454
16483
  const { attributes: e } = r, t = e["w15:paraId"], n = e["w15:done"] === "1", i = e["w15:paraIdParent"];
16455
16484
  return { paraId: t, isDone: n, paraIdParent: i };
16456
- }, yp = (r, e, t) => {
16457
- const n = He(em(r));
16485
+ }, bp = (r, e, t) => {
16486
+ const n = Ue(tm(r));
16458
16487
  if (!n) return null;
16459
16488
  if (e?.telemetry) {
16460
16489
  const o = Object.keys(r).map((a) => {
@@ -16479,7 +16508,7 @@ const gp = ({ docx: r, comments: e }) => {
16479
16508
  }
16480
16509
  const i = Jt(), s = n.elements[0].elements.find((o) => o.name === "w:body");
16481
16510
  if (s) {
16482
- const o = s, a = ["w:sectPr"], u = o.elements?.filter((E) => !a.includes(E.name)) ?? [], c = hp({ docx: r }), l = {}, g = {
16511
+ const o = s, a = ["w:sectPr"], u = o.elements?.filter((E) => !a.includes(E.name)) ?? [], c = gp({ docx: r }), l = {}, g = {
16483
16512
  type: "doc",
16484
16513
  content: i.handler({
16485
16514
  nodes: u,
@@ -16502,39 +16531,39 @@ const gp = ({ docx: r, comments: e }) => {
16502
16531
  ), {
16503
16532
  pmDoc: g,
16504
16533
  savedTagsToRestore: o,
16505
- pageStyles: xp(o, r, e, t),
16534
+ pageStyles: Ap(o, r, e, t),
16506
16535
  comments: c,
16507
- linkedStyles: Ap(r),
16508
- numbering: Ep(r)
16536
+ linkedStyles: Dp(r),
16537
+ numbering: Cp(r)
16509
16538
  };
16510
16539
  }
16511
16540
  return null;
16512
16541
  }, Jt = () => {
16513
16542
  const r = [
16514
- np,
16515
- Sm,
16516
- pp,
16517
- jm,
16518
- Im,
16519
- Fm,
16520
- Qm,
16521
- $m,
16522
- tp,
16523
- vm,
16524
- fm,
16525
- Am,
16526
- rm,
16527
- lp,
16528
- sp,
16529
- ap,
16530
- Ym
16543
+ ip,
16544
+ Tm,
16545
+ hp,
16546
+ Hm,
16547
+ Rm,
16548
+ Bm,
16549
+ ep,
16550
+ Km,
16551
+ rp,
16552
+ Em,
16553
+ dm,
16554
+ Dm,
16555
+ nm,
16556
+ cp,
16557
+ op,
16558
+ up,
16559
+ Zm
16531
16560
  //this should be the last one, bcs this parses everything!!!
16532
16561
  ];
16533
16562
  return {
16534
- handler: bp(r),
16563
+ handler: xp(r),
16535
16564
  handlerEntities: r
16536
16565
  };
16537
- }, bp = (r) => {
16566
+ }, xp = (r) => {
16538
16567
  const e = (n, i, s, o) => !n || i < 0 || i >= n.length ? {
16539
16568
  elementIndex: i,
16540
16569
  error: "index_out_of_bounds",
@@ -16619,7 +16648,7 @@ const gp = ({ docx: r, comments: e }) => {
16619
16648
  };
16620
16649
  return t;
16621
16650
  };
16622
- function xp(r, e, t, n) {
16651
+ function Ap(r, e, t, n) {
16623
16652
  const i = r.elements?.find((o) => o.name === "w:sectPr"), s = {};
16624
16653
  return i?.elements?.forEach((o) => {
16625
16654
  const { name: a, attributes: u } = o;
@@ -16657,9 +16686,9 @@ function xp(r, e, t, n) {
16657
16686
  case "w:titlePg":
16658
16687
  t.headerIds.titlePg = !0;
16659
16688
  }
16660
- }), vp(e, t, n), s.alternateHeaders = Cp(e), s;
16689
+ }), Ep(e, t, n), s.alternateHeaders = Sp(e), s;
16661
16690
  }
16662
- function Ap(r) {
16691
+ function Dp(r) {
16663
16692
  const e = r["word/styles.xml"];
16664
16693
  if (!e) return [];
16665
16694
  const { elements: t } = e.elements[0], n = t.filter((o) => o.name === "w:style");
@@ -16669,7 +16698,7 @@ function Ap(r) {
16669
16698
  });
16670
16699
  const s = [];
16671
16700
  return n.forEach((o) => {
16672
- const a = o.attributes["w:styleId"], u = Hm(a, r), c = {
16701
+ const a = o.attributes["w:styleId"], u = Vm(a, r), c = {
16673
16702
  id: o.attributes["w:styleId"],
16674
16703
  type: o.attributes["w:type"],
16675
16704
  definition: u,
@@ -16678,9 +16707,9 @@ function Ap(r) {
16678
16707
  s.push(c);
16679
16708
  }), s;
16680
16709
  }
16681
- function Dp(r) {
16710
+ function vp(r) {
16682
16711
  if (!r) return null;
16683
- const e = He(r), { elements: t } = e.elements[0];
16712
+ const e = Ue(r), { elements: t } = e.elements[0];
16684
16713
  return Object.keys(Co).forEach((n) => {
16685
16714
  if (!t.some((s) => s.attributes?.["w:styleId"] === n)) {
16686
16715
  const s = Co[n];
@@ -16688,8 +16717,8 @@ function Dp(r) {
16688
16717
  }
16689
16718
  }), e;
16690
16719
  }
16691
- const vp = (r, e, t) => {
16692
- const i = r["word/_rels/document.xml.rels"].elements.find((g) => g.name === "Relationships"), { elements: s } = i, o = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", u = s.filter((g) => g.attributes.Type === o), c = s.filter((g) => g.attributes.Type === a), h = (vu(r["word/document.xml"]) || []).flatMap((g) => g.elements);
16720
+ const Ep = (r, e, t) => {
16721
+ const i = r["word/_rels/document.xml.rels"].elements.find((g) => g.name === "Relationships"), { elements: s } = i, o = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", a = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", u = s.filter((g) => g.attributes.Type === o), c = s.filter((g) => g.attributes.Type === a), h = (Eu(r["word/document.xml"]) || []).flatMap((g) => g.elements);
16693
16722
  u.forEach((g) => {
16694
16723
  const { rId: E, referenceFile: A, currentFileName: v } = _o(g, r);
16695
16724
  let w = h.find((D) => D.name === "w:headerReference" && D.attributes["r:id"] === E)?.attributes["w:type"];
@@ -16714,9 +16743,9 @@ const vp = (r, e, t) => {
16714
16743
  });
16715
16744
  e.footerIds.ids || (e.footerIds.ids = []), e.footerIds.ids.push(E), e.footers[E] = { type: "doc", content: [...R] }, e.footerIds[w] = E;
16716
16745
  });
16717
- }, vu = (r, e = []) => {
16746
+ }, Eu = (r, e = []) => {
16718
16747
  for (const t in r)
16719
- r[t] === "w:sectPr" ? e.push(r) : typeof r[t] == "object" && vu(r[t], e);
16748
+ r[t] === "w:sectPr" ? e.push(r) : typeof r[t] == "object" && Eu(r[t], e);
16720
16749
  return e;
16721
16750
  }, _o = (r, e) => {
16722
16751
  const t = r.attributes.Id, n = r.attributes.Target, i = e[`word/${n}`];
@@ -16726,7 +16755,7 @@ const vp = (r, e, t) => {
16726
16755
  currentFileName: n
16727
16756
  };
16728
16757
  };
16729
- function Ep(r) {
16758
+ function Cp(r) {
16730
16759
  let e = r["word/numbering.xml"];
16731
16760
  (!e || !e.elements?.length || !e.elements[0].elements?.length) && (e = nu);
16732
16761
  const t = e.elements[0].elements, n = t.filter((a) => a.name === "w:abstractNum"), i = t.filter((a) => a.name === "w:num"), s = {};
@@ -16743,13 +16772,13 @@ function Ep(r) {
16743
16772
  definitions: o
16744
16773
  };
16745
16774
  }
16746
- const Cp = (r) => {
16775
+ const Sp = (r) => {
16747
16776
  const e = r["word/settings.xml"];
16748
16777
  if (!e || !e.elements?.length) return !1;
16749
16778
  const { elements: t = [] } = e.elements[0];
16750
16779
  return !!t.find((i) => i.name === "w:evenAndOddHeaders");
16751
- };
16752
- var it, Eu, Cu, Su, Tu;
16780
+ }, Tp = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
16781
+ var it, Cu, Su, Tu, Fu;
16753
16782
  const pt = class pt {
16754
16783
  constructor(e = null) {
16755
16784
  Ir(this, it);
@@ -16757,7 +16786,7 @@ const pt = class pt {
16757
16786
  }
16758
16787
  parseFromXml() {
16759
16788
  this.docx?.forEach((e) => {
16760
- this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] = Dp(this.convertedXml[e.name]));
16789
+ this.convertedXml[e.name] = this.parseXmlToJson(e.content), e.name === "word/document.xml" && (this.documentAttributes = this.convertedXml[e.name].elements[0]?.attributes), e.name === "word/styles.xml" && (this.convertedXml[e.name] = vp(this.convertedXml[e.name]));
16761
16790
  }), this.initialJSON = this.convertedXml["word/document.xml"], this.initialJSON || (this.initialJSON = this.parseXmlToJson(this.xml)), this.declaration = this.initialJSON?.declaration;
16762
16791
  }
16763
16792
  parseXmlToJson(e) {
@@ -16776,9 +16805,9 @@ const pt = class pt {
16776
16805
  return;
16777
16806
  }
16778
16807
  }
16779
- static updateDocumentVersion(e = this.convertedXml, t = "0.11.45") {
16808
+ static updateDocumentVersion(e = this.convertedXml, t = "0.11.46") {
16780
16809
  const n = "docProps/custom.xml";
16781
- e[n] || (e[n] = Fu());
16810
+ e[n] || (e[n] = Bu());
16782
16811
  const i = e["docProps/custom.xml"];
16783
16812
  if (!i) return;
16784
16813
  const s = i.elements.find((a) => a.name === "Properties");
@@ -16787,7 +16816,7 @@ const pt = class pt {
16787
16816
  if (o)
16788
16817
  o.elements[0].elements[0].elements[0].text = t;
16789
16818
  else {
16790
- const a = Bu();
16819
+ const a = ku();
16791
16820
  s.elements.push(a);
16792
16821
  }
16793
16822
  return e;
@@ -16829,7 +16858,7 @@ const pt = class pt {
16829
16858
  if (!l) return;
16830
16859
  const g = this.fonts[`word/${l}`]?.buffer;
16831
16860
  if (!g) return;
16832
- const E = Vf(g, c.attributes["w:fontKey"]);
16861
+ const E = zf(g, c.attributes["w:fontKey"]);
16833
16862
  if (!E) return;
16834
16863
  const A = new Blob([E], { type: "font/ttf" }), v = URL.createObjectURL(A), F = c.name.includes("Regular"), w = c.name.includes("Bold"), B = c.name.includes("Italic"), R = c.name.includes("Light");
16835
16864
  u += `
@@ -16846,7 +16875,7 @@ const pt = class pt {
16846
16875
  }
16847
16876
  getDocumentInternalId() {
16848
16877
  const e = "word/settings.xml";
16849
- this.convertedXml[e] || (this.convertedXml[e] = Wf);
16878
+ this.convertedXml[e] || (this.convertedXml[e] = Jf);
16850
16879
  const t = Object.assign({}, this.convertedXml[e]);
16851
16880
  if (!t.elements[0]?.elements?.length) {
16852
16881
  const i = this.createDocumentIdElement(t);
@@ -16878,14 +16907,14 @@ const pt = class pt {
16878
16907
  }
16879
16908
  getSchema(e) {
16880
16909
  this.getDocumentInternalId();
16881
- const t = yp({ ...this.convertedXml, media: this.media }, this, e);
16910
+ const t = bp({ ...this.convertedXml, media: this.media }, this, e);
16882
16911
  return t ? (this.savedTagsToRestore.push({ ...t.savedTagsToRestore }), this.pageStyles = t.pageStyles, this.numbering = t.numbering, this.comments = t.comments, this.linkedStyles = t.linkedStyles, t.pmDoc) : null;
16883
16912
  }
16884
16913
  schemaToXml(e, t = !1) {
16885
16914
  return new No(this).schemaToXml(e, t);
16886
16915
  }
16887
16916
  async exportToDocx(e, t, n, i = !1, s, o = [], a) {
16888
- const u = o.map((F) => nd(F)), c = u.map((F, w) => id(F, w, u, a)), { result: l, params: h } = this.exportToXmlJson({
16917
+ const u = o.map((F) => id(F)), c = u.map((F, w) => sd(F, w, u, a)), { result: l, params: h } = this.exportToXmlJson({
16889
16918
  data: e,
16890
16919
  editorSchema: t,
16891
16920
  comments: o,
@@ -16894,21 +16923,21 @@ const pt = class pt {
16894
16923
  isFinalDoc: i,
16895
16924
  editor: a
16896
16925
  }), E = new No(this).schemaToXml(l);
16897
- await Ke(this, it, Tu).call(this, {
16926
+ await Ke(this, it, Fu).call(this, {
16898
16927
  ...n,
16899
16928
  ...h.media,
16900
16929
  ...this.media
16901
16930
  }, a);
16902
16931
  let A = { ...this.convertedXml }, v = [];
16903
16932
  if (o.length) {
16904
- const { documentXml: F, relationships: w } = Ke(this, it, Cu).call(this, {
16933
+ const { documentXml: F, relationships: w } = Ke(this, it, Su).call(this, {
16905
16934
  defs: h.exportedCommentDefs,
16906
16935
  exportType: s,
16907
16936
  commentsWithParaIds: u
16908
16937
  });
16909
16938
  A = { ...F }, v = w;
16910
16939
  }
16911
- return this.convertedXml = { ...this.convertedXml, ...A }, Ke(this, it, Su).call(this, [...h.relationships, ...v]), Sp(this.convertedXml), Ke(this, it, Eu).call(this, h), E;
16940
+ return this.convertedXml = { ...this.convertedXml, ...A }, Ke(this, it, Tu).call(this, [...h.relationships, ...v]), Fp(this.convertedXml), Ke(this, it, Cu).call(this, h), E;
16912
16941
  }
16913
16942
  exportToXmlJson({
16914
16943
  data: e,
@@ -16937,7 +16966,7 @@ const pt = class pt {
16937
16966
  return { result: c, params: l };
16938
16967
  }
16939
16968
  };
16940
- it = new WeakSet(), Eu = function(e) {
16969
+ it = new WeakSet(), Cu = function(e) {
16941
16970
  const t = "word/numbering.xml";
16942
16971
  let n = this.convertedXml[t];
16943
16972
  const i = this.numbering;
@@ -16947,8 +16976,8 @@ it = new WeakSet(), Eu = function(e) {
16947
16976
  }, /**
16948
16977
  * Update comments files and relationships depending on export type
16949
16978
  */
16950
- Cu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
16951
- const { documentXml: i, relationships: s } = fd({
16979
+ Su = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
16980
+ const { documentXml: i, relationships: s } = dd({
16952
16981
  exportType: t,
16953
16982
  convertedXml: this.convertedXml,
16954
16983
  defs: e,
@@ -16956,19 +16985,19 @@ Cu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
16956
16985
  converter: this
16957
16986
  });
16958
16987
  return { documentXml: i, relationships: s };
16959
- }, Su = function(e = []) {
16988
+ }, Tu = function(e = []) {
16960
16989
  const t = this.convertedXml["word/_rels/document.xml.rels"], n = t.elements.find((a) => a.name === "Relationships"), i = [], s = /rId|mi/g;
16961
16990
  let o = Math.max(...n.elements.map((a) => Number(a.attributes.Id.replace(s, ""))));
16962
16991
  e.forEach((a) => {
16963
- const u = a.attributes.Id, c = n.elements.find((h) => h.attributes.Target === a.attributes.Target), l = a.attributes.Target?.startsWith("media/") && u.length > 6;
16964
- c && !l || (a.attributes.Target = a.attributes?.Target?.replace(/&/g, "&amp;"), a.attributes.Id = u.length > 6 ? u : `rId${++o}`, i.push(a));
16992
+ const u = a.attributes.Id, c = n.elements.find((g) => g.attributes.Target === a.attributes.Target), l = a.attributes.Target?.startsWith("media/") && u.length > 6, h = a.attributes.Type === Tp && u.length > 6;
16993
+ c && !l && !h || (a.attributes.Target = a.attributes?.Target?.replace(/&/g, "&amp;"), a.attributes.Id = u.length > 6 ? u : `rId${++o}`, i.push(a));
16965
16994
  }), n.elements = [...n.elements, ...i], this.convertedXml["word/_rels/document.xml.rels"] = t;
16966
- }, Tu = async function(e, t) {
16995
+ }, Fu = async function(e, t) {
16967
16996
  const n = {};
16968
16997
  for (const i in e) {
16969
16998
  if (typeof e[i] != "string") return;
16970
16999
  const s = i.split("/").pop();
16971
- n[s] = await qf(e[i], t.options.isHeadless);
17000
+ n[s] = await Mf(e[i], t.options.isHeadless);
16972
17001
  }
16973
17002
  this.convertedXml.media = {
16974
17003
  ...this.convertedXml.media,
@@ -17020,9 +17049,9 @@ Cu = function({ defs: e, exportType: t, commentsWithParaIds: n }) {
17020
17049
  "w:tcPr": "tableCellProperties"
17021
17050
  })), Mt(pt, "elements", /* @__PURE__ */ new Set(["w:document", "w:body", "w:p", "w:r", "w:t", "w:delText"]));
17022
17051
  let Ot = pt;
17023
- function Sp(r) {
17052
+ function Fp(r) {
17024
17053
  const e = "docProps/custom.xml";
17025
- r[e] || (r[e] = Fu());
17054
+ r[e] || (r[e] = Bu());
17026
17055
  const n = r[e].elements.find((a) => a.name === "Properties");
17027
17056
  n.elements || (n.elements = []);
17028
17057
  const i = n.elements, s = i.filter((a) => typeof a == "object" && a !== null).filter((a) => {
@@ -17034,12 +17063,12 @@ function Sp(r) {
17034
17063
  o = s.length ? Math.max(...i.map((a) => a.attributes.pid)) + 1 : 2;
17035
17064
  } catch {
17036
17065
  }
17037
- return s.push(Bu(o)), n.elements = s, r;
17066
+ return s.push(ku(o)), n.elements = s, r;
17038
17067
  }
17039
- function Fu() {
17040
- return Gf;
17068
+ function Bu() {
17069
+ return Wf;
17041
17070
  }
17042
- function Bu(r = 2, e = "0.11.45") {
17071
+ function ku(r = 2, e = "0.11.46") {
17043
17072
  return {
17044
17073
  type: "element",
17045
17074
  name: "property",
@@ -17063,7 +17092,7 @@ function Bu(r = 2, e = "0.11.45") {
17063
17092
  };
17064
17093
  }
17065
17094
  export {
17066
- md as $,
17095
+ pd as $,
17067
17096
  at as A,
17068
17097
  St as B,
17069
17098
  xr as C,
@@ -17071,7 +17100,7 @@ export {
17071
17100
  xa as E,
17072
17101
  Q as F,
17073
17102
  Oi as G,
17074
- jp as H,
17103
+ Vp as H,
17075
17104
  ct as I,
17076
17105
  et as J,
17077
17106
  Ii as K,
@@ -17079,46 +17108,46 @@ export {
17079
17108
  br as M,
17080
17109
  We as N,
17081
17110
  Ot as O,
17082
- Mp as P,
17111
+ jp as P,
17083
17112
  Ct as Q,
17084
17113
  $e as R,
17085
- kp as S,
17114
+ Ip as S,
17086
17115
  tt as T,
17087
- Of as U,
17088
- Xp as V,
17089
- Up as W,
17116
+ Lf as U,
17117
+ Zp as V,
17118
+ Hp as W,
17090
17119
  Za as X,
17091
- dd as Y,
17092
- Tf as Z,
17093
- Sf as _,
17094
- qp as a,
17120
+ md as Y,
17121
+ Ff as Z,
17122
+ Tf as _,
17123
+ Up as a,
17095
17124
  Je as a0,
17096
17125
  qo as a1,
17097
- Kp as a2,
17098
- Hp as a3,
17099
- Pp as b,
17100
- Vp as c,
17101
- Op as d,
17126
+ Yp as a2,
17127
+ zp as a3,
17128
+ Lp as b,
17129
+ Gp as c,
17130
+ _p as d,
17102
17131
  Ee as e,
17103
17132
  ae as f,
17104
- Jp as g,
17133
+ Kp as g,
17105
17134
  Ie as h,
17106
- zp as i,
17107
- Lp as j,
17108
- Lc as k,
17109
- Ip as l,
17110
- Rp as m,
17111
- Gp as n,
17112
- If as o,
17113
- Wp as p,
17135
+ Wp as i,
17136
+ qp as j,
17137
+ _c as k,
17138
+ Pp as l,
17139
+ Op as m,
17140
+ Jp as n,
17141
+ Rf as o,
17142
+ $p as p,
17114
17143
  Ri as q,
17115
- bf as r,
17116
- $p as s,
17144
+ xf as r,
17145
+ Xp as s,
17117
17146
  ru as t,
17118
17147
  _a as u,
17119
17148
  we as v,
17120
- _p as w,
17149
+ Mp as w,
17121
17150
  ge as x,
17122
- Nf as y,
17151
+ If as y,
17123
17152
  Pi as z
17124
17153
  };