drizzle-cube 0.4.34 → 0.4.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/express/index.cjs +1 -1
  3. package/dist/adapters/express/index.d.ts +7 -1
  4. package/dist/adapters/express/index.js +5 -4
  5. package/dist/adapters/fastify/index.cjs +1 -1
  6. package/dist/adapters/fastify/index.d.ts +7 -1
  7. package/dist/adapters/fastify/index.js +5 -4
  8. package/dist/adapters/{handler-ClgB__a-.cjs → handler-DzUX7CBs.cjs} +1 -1
  9. package/dist/adapters/{handler-rPpxuopb.js → handler-J55KQKe5.js} +1 -1
  10. package/dist/adapters/hono/index.cjs +1 -1
  11. package/dist/adapters/hono/index.d.ts +7 -1
  12. package/dist/adapters/hono/index.js +5 -4
  13. package/dist/adapters/{mcp-transport-DPpei63d.cjs → mcp-transport-CjA5_6G_.cjs} +2 -2
  14. package/dist/adapters/{mcp-transport-DWSNkwUY.js → mcp-transport-x_A7Q5OL.js} +35 -20
  15. package/dist/adapters/nextjs/index.cjs +1 -1
  16. package/dist/adapters/nextjs/index.d.ts +7 -1
  17. package/dist/adapters/nextjs/index.js +9 -8
  18. package/dist/adapters/{utils-BLFzzCI9.cjs → utils-CDExg9uP.cjs} +1 -1
  19. package/dist/adapters/{utils-B7VkyzMv.js → utils-DkKcpkx5.js} +1 -5
  20. package/dist/adapters/utils.cjs +1 -1
  21. package/dist/adapters/utils.js +1 -1
  22. package/dist/client/charts.js +3 -3
  23. package/dist/client/chunks/{DashboardEditModal-DenRJiYr.js → DashboardEditModal-kWEk4KJC.js} +8 -8
  24. package/dist/client/chunks/{DashboardEditModal-DenRJiYr.js.map → DashboardEditModal-kWEk4KJC.js.map} +1 -1
  25. package/dist/client/chunks/{FieldSearchModal-BQS1v1up.js → FieldSearchModal-rB26lhBD.js} +3 -3
  26. package/dist/client/chunks/{FieldSearchModal-BQS1v1up.js.map → FieldSearchModal-rB26lhBD.js.map} +1 -1
  27. package/dist/client/chunks/{analysis-builder-DG38V1gO.js → analysis-builder-CdDPUAEU.js} +8 -8
  28. package/dist/client/chunks/{analysis-builder-DG38V1gO.js.map → analysis-builder-CdDPUAEU.js.map} +1 -1
  29. package/dist/client/chunks/{analysis-builder-shared-DaFu78dk.js → analysis-builder-shared-3V70XUNW.js} +15 -19
  30. package/dist/client/chunks/{analysis-builder-shared-DaFu78dk.js.map → analysis-builder-shared-3V70XUNW.js.map} +1 -1
  31. package/dist/client/chunks/{chart-data-table-B2m_6EZe.js → chart-data-table-BlkFWPhF.js} +602 -581
  32. package/dist/client/chunks/chart-data-table-BlkFWPhF.js.map +1 -0
  33. package/dist/client/chunks/{chart-kpi-delta-S6qDEoJO.js → chart-kpi-delta-CUIjCDS3.js} +2 -2
  34. package/dist/client/chunks/{chart-kpi-delta-S6qDEoJO.js.map → chart-kpi-delta-CUIjCDS3.js.map} +1 -1
  35. package/dist/client/chunks/{chart-kpi-number-CEUBsVW2.js → chart-kpi-number-CxlpSKYh.js} +3 -3
  36. package/dist/client/chunks/{chart-kpi-number-CEUBsVW2.js.map → chart-kpi-number-CxlpSKYh.js.map} +1 -1
  37. package/dist/client/chunks/{chart-kpi-text-DgRig_jQ.js → chart-kpi-text-C16fwohp.js} +2 -2
  38. package/dist/client/chunks/{chart-kpi-text-DgRig_jQ.js.map → chart-kpi-text-C16fwohp.js.map} +1 -1
  39. package/dist/client/chunks/{chart-markdown-DXxc43w1.js → chart-markdown-B2X4IwLO.js} +1132 -1119
  40. package/dist/client/chunks/chart-markdown-B2X4IwLO.js.map +1 -0
  41. package/dist/client/chunks/{charts-loader-BI07yxaQ.js → charts-loader-BFhQWB_d.js} +6 -6
  42. package/dist/client/chunks/{charts-loader-BI07yxaQ.js.map → charts-loader-BFhQWB_d.js.map} +1 -1
  43. package/dist/client/chunks/{core-D1TOj17W.js → core-DJrniqct.js} +2 -6
  44. package/dist/client/chunks/{core-D1TOj17W.js.map → core-DJrniqct.js.map} +1 -1
  45. package/dist/client/chunks/{schema-visualization-DPL5_Tkh.js → schema-visualization-qmLI8MGQ.js} +13 -14
  46. package/dist/client/chunks/{schema-visualization-DPL5_Tkh.js.map → schema-visualization-qmLI8MGQ.js.map} +1 -1
  47. package/dist/client/chunks/{syntaxHighlighting-87bOwTxj.js → syntaxHighlighting-BLl0ch4A.js} +2 -2
  48. package/dist/client/chunks/{syntaxHighlighting-87bOwTxj.js.map → syntaxHighlighting-BLl0ch4A.js.map} +1 -1
  49. package/dist/client/chunks/{useDebounce-DkuM7nQk.js → useDebounce-xfPFr2fi.js} +2 -2
  50. package/dist/client/chunks/{useDebounce-DkuM7nQk.js.map → useDebounce-xfPFr2fi.js.map} +1 -1
  51. package/dist/client/chunks/{useExplainAI-RflLTDVL.js → useExplainAI-6COjssus.js} +4 -4
  52. package/dist/client/chunks/{useExplainAI-RflLTDVL.js.map → useExplainAI-6COjssus.js.map} +1 -1
  53. package/dist/client/chunks/{utils--32ZtfbZ.js → utils-nCeVL-Hm.js} +2 -2
  54. package/dist/client/chunks/{utils--32ZtfbZ.js.map → utils-nCeVL-Hm.js.map} +1 -1
  55. package/dist/client/chunks/{vendor-CZX7UVzM.js → vendor-WzXX36hd.js} +3 -3
  56. package/dist/client/chunks/{vendor-CZX7UVzM.js.map → vendor-WzXX36hd.js.map} +1 -1
  57. package/dist/client/components.js +3 -3
  58. package/dist/client/hooks.js +3 -3
  59. package/dist/client/icons.js +1 -1
  60. package/dist/client/index.js +12 -12
  61. package/dist/client/providers.js +1 -1
  62. package/dist/client/utils.js +4 -4
  63. package/dist/client-bundle-stats.html +1 -1
  64. package/dist/server/index.cjs +2 -2
  65. package/dist/server/index.d.ts +47 -5
  66. package/dist/server/index.js +34 -19
  67. package/package.json +3 -3
  68. package/dist/client/chunks/chart-data-table-B2m_6EZe.js.map +0 -1
  69. package/dist/client/chunks/chart-markdown-DXxc43w1.js.map +0 -1
@@ -14,7 +14,7 @@ function s(e) {
14
14
  }
15
15
  //#endregion
16
16
  //#region node_modules/markdown-to-jsx/dist/index.js
17
- var c = 32, l = 9, u = 13, d = 10, f = 96, p = 126, m = 91, h = 94, g = 62, _ = 35, v = 36, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, L = 115, R = 160, ee = 12, te = 44, z = 59, ne = 63, re = 46, B = 47, ie = 39, ae = 34, oe = 43, se = 124, ce = 123, le = 125, ue = 40, de = 41, fe = 30, pe = 31, V = 48, H = 57, U = 65, W = 90, me = 97, he = 122, ge = 128, _e = 32, G = {
17
+ var c = 32, l = 9, u = 13, d = 10, f = 96, p = 126, m = 91, h = 94, g = 62, _ = 35, v = 37, y = 45, b = 61, x = 92, S = 42, C = 95, w = 60, T = 64, E = 93, D = 33, O = 38, k = 58, A = 70, j = 102, M = 104, N = 119, P = 116, F = 112, I = 115, L = 160, R = 12, ee = 44, te = 59, z = 63, ne = 46, re = 47, ie = 39, ae = 34, oe = 43, B = 124, se = 123, ce = 125, le = 40, ue = 41, de = 30, fe = 31, V = 48, H = 57, U = 65, W = 90, pe = 97, me = 122, he = 128, G = 32, K = {
18
18
  blockQuote: 0,
19
19
  breakLine: 1,
20
20
  breakThematic: 2,
@@ -39,8 +39,8 @@ var c = 32, l = 9, u = 13, d = 10, f = 96, p = 126, m = 91, h = 94, g = 62, _ =
39
39
  textFormatted: 21,
40
40
  unorderedList: 22
41
41
  };
42
- function ve(e) {
43
- if (!X(e, "---")) return null;
42
+ function ge(e) {
43
+ if (!Z(e, "---")) return null;
44
44
  let t = 3;
45
45
  for (; t < e.length && (e[t] === " " || e[t] === " ");) t++;
46
46
  if (t < e.length && e[t] === "\r" && t++, t >= e.length || e[t] !== "\n") return null;
@@ -51,7 +51,7 @@ function ve(e) {
51
51
  for (; t < e.length && e[t] !== "\n" && e[t] !== "\r";) t++;
52
52
  if (t >= e.length) break;
53
53
  let i = t;
54
- if (e[t] === "\r" && t++, t < e.length && e[t] === "\n" && t++, X(e, "---", r)) return {
54
+ if (e[t] === "\r" && t++, t < e.length && e[t] === "\n" && t++, Z(e, "---", r)) return {
55
55
  endPos: t,
56
56
  hasValidYaml: n
57
57
  };
@@ -60,7 +60,7 @@ function ve(e) {
60
60
  }
61
61
  return null;
62
62
  }
63
- var K = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, ye = {
63
+ var _e = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, q = {
64
64
  class: "className",
65
65
  for: "htmlFor",
66
66
  allowfullscreen: "allowFullScreen",
@@ -104,10 +104,10 @@ var K = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, ye = {
104
104
  usemap: "useMap",
105
105
  viewbox: "viewBox"
106
106
  };
107
- function q(e) {
107
+ function J(e) {
108
108
  var t = {};
109
109
  for (var n in e) {
110
- var r = ye[n.toLowerCase()];
110
+ var r = q[n.toLowerCase()];
111
111
  if (r) t[r] = e[n];
112
112
  else {
113
113
  var i = n.indexOf(":");
@@ -116,9 +116,9 @@ function q(e) {
116
116
  }
117
117
  return t;
118
118
  }
119
- var be = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
120
- function xe(e) {
121
- return e.indexOf("&") === -1 ? e : e.replace(K, (e, t) => {
119
+ var Y = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
120
+ function ve(e) {
121
+ return e.indexOf("&") === -1 ? e : e.replace(_e, (e, t) => {
122
122
  var n = s(t);
123
123
  if (n) return n;
124
124
  if (t[0] === "#") {
@@ -128,20 +128,20 @@ function xe(e) {
128
128
  return e;
129
129
  });
130
130
  }
131
- var Se = /(javascript|vbscript|data(?!:image)):/i;
132
- function Ce(e) {
133
- if (Se.test(e)) return null;
131
+ var ye = /(javascript|vbscript|data(?!:image)):/i;
132
+ function be(e) {
133
+ if (ye.test(e)) return null;
134
134
  if (e.indexOf("%") === -1) return e;
135
135
  try {
136
136
  let t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
137
- if (Se.test(t)) return null;
137
+ if (ye.test(t)) return null;
138
138
  } catch {
139
139
  return null;
140
140
  }
141
141
  return e;
142
142
  }
143
- var we = {}, Te, J;
144
- for (Te = [
143
+ var xe = {}, Se, X;
144
+ for (Se = [
145
145
  192,
146
146
  193,
147
147
  194,
@@ -156,8 +156,8 @@ for (Te = [
156
156
  229,
157
157
  230,
158
158
  198
159
- ], J = 0; J < Te.length; J++) we[Te[J]] = "a";
160
- for (we[231] = we[199] = "c", we[240] = we[208] = "d", Te = [
159
+ ], X = 0; X < Se.length; X++) xe[Se[X]] = "a";
160
+ for (xe[231] = xe[199] = "c", xe[240] = xe[208] = "d", Se = [
161
161
  200,
162
162
  201,
163
163
  202,
@@ -166,8 +166,8 @@ for (we[231] = we[199] = "c", we[240] = we[208] = "d", Te = [
166
166
  232,
167
167
  234,
168
168
  235
169
- ], J = 0; J < Te.length; J++) we[Te[J]] = "e";
170
- for (Te = [
169
+ ], X = 0; X < Se.length; X++) xe[Se[X]] = "e";
170
+ for (Se = [
171
171
  207,
172
172
  239,
173
173
  206,
@@ -176,8 +176,8 @@ for (Te = [
176
176
  237,
177
177
  204,
178
178
  236
179
- ], J = 0; J < Te.length; J++) we[Te[J]] = "i";
180
- for (we[209] = we[241] = "n", Te = [
179
+ ], X = 0; X < Se.length; X++) xe[Se[X]] = "i";
180
+ for (xe[209] = xe[241] = "n", Se = [
181
181
  248,
182
182
  216,
183
183
  339,
@@ -190,8 +190,8 @@ for (we[209] = we[241] = "n", Te = [
190
190
  243,
191
191
  210,
192
192
  242
193
- ], J = 0; J < Te.length; J++) we[Te[J]] = "o";
194
- for (Te = [
193
+ ], X = 0; X < Se.length; X++) xe[Se[X]] = "o";
194
+ for (Se = [
195
195
  220,
196
196
  252,
197
197
  219,
@@ -200,25 +200,25 @@ for (Te = [
200
200
  250,
201
201
  217,
202
202
  249
203
- ], J = 0; J < Te.length; J++) we[Te[J]] = "u";
204
- we[376] = we[255] = we[221] = we[253] = "y";
205
- function Y(e) {
203
+ ], X = 0; X < Se.length; X++) xe[Se[X]] = "u";
204
+ xe[376] = xe[255] = xe[221] = xe[253] = "y";
205
+ function Ce(e) {
206
206
  for (var t = e.toLowerCase(), n = "", r = -1, i = 0; i < t.length; i++) {
207
207
  var a = t.charCodeAt(i);
208
- if (a < ge && (ze[a] & (Ae | je)) !== 0) r < 0 && (r = i);
209
- else if (a === c || a === b) r >= 0 && (n += t.slice(r, i), r = -1), n += "-";
208
+ if (a < he && (Ie[a] & (Oe | ke)) !== 0) r < 0 && (r = i);
209
+ else if (a === c || a === y) r >= 0 && (n += t.slice(r, i), r = -1), n += "-";
210
210
  else {
211
211
  r >= 0 && (n += t.slice(r, i), r = -1);
212
- var o = we[a];
212
+ var o = xe[a];
213
213
  o && (n += o);
214
214
  }
215
215
  }
216
216
  return r >= 0 && (n += t.slice(r)), n;
217
217
  }
218
- function X(e, t, n) {
218
+ function Z(e, t, n) {
219
219
  return e.startsWith(t, n);
220
220
  }
221
- var Ee = new Set([
221
+ var Q = new Set([
222
222
  "area",
223
223
  "base",
224
224
  "br",
@@ -245,48 +245,48 @@ var Ee = new Set([
245
245
  "animate",
246
246
  "set"
247
247
  ]);
248
- function De(e) {
248
+ function we(e) {
249
249
  let t = e.toLowerCase();
250
- if (Ee.has(t)) return !0;
250
+ if (Q.has(t)) return !0;
251
251
  let n = t.indexOf(":");
252
- return n === -1 ? !1 : (t = t.slice(n + 1), Ee.has(t));
253
- }
254
- var Oe = 1, ke = 2, Ae = 4, je = 8, Me = 16, Ne = 32, Pe = 64, Fe = 1, Ie = 2, Le = 3, Re = 4, ze = (function() {
255
- let e = new Uint8Array(128), t;
256
- for (e[l] = Oe | Ne, e[d] = Oe | Me, e[ee] = Oe, e[u] = Oe | Me, e[c] = Oe | Ne, t = O; t <= B; t++) e[t] = ke;
257
- for (t = A; t <= E; t++) e[t] = ke;
258
- for (t = m; t <= f; t++) e[t] = ke;
259
- for (t = ce; t <= p; t++) e[t] = ke;
260
- for (t = V; t <= H; t++) e[t] = je;
261
- for (t = U; t <= W; t++) e[t] = Ae | Pe;
262
- for (t = me; t <= he; t++) e[t] = Ae;
252
+ return n === -1 ? !1 : (t = t.slice(n + 1), Q.has(t));
253
+ }
254
+ var Te = 1, Ee = 2, De = 4, Oe = 8, ke = 16, Ae = 32, je = 64, Me = 1, Ne = 2, Pe = 3, Fe = 4, Ie = (function() {
255
+ var e = new Uint8Array(128), t;
256
+ for (e[l] = Te, e[d] = Te | Ee, e[R] = Te, e[u] = Te | Ee, e[c] = Te, t = D; t <= re; t++) e[t] = De;
257
+ for (t = k; t <= T; t++) e[t] = De;
258
+ for (t = m; t <= f; t++) e[t] = De;
259
+ for (t = se; t <= p; t++) e[t] = De;
260
+ for (t = V; t <= H; t++) e[t] = ke;
261
+ for (t = U; t <= W; t++) e[t] = Oe;
262
+ for (t = pe; t <= me; t++) e[t] = Oe;
263
263
  return e;
264
264
  })();
265
265
  (function() {
266
266
  let e = new Uint8Array(128);
267
- return e[S] = Ie, e[m] = Re, e[C] = e[w] = e[p] = e[x] = Le, e[f] = e[T] = e[E] = e[D] = e[d] = e[c] = e[O] = Fe, e[M] = e[N] = e[P] = Fe, e;
267
+ return e[x] = Ne, e[m] = Fe, e[S] = e[C] = e[p] = e[b] = Pe, e[f] = e[w] = e[T] = e[E] = e[d] = e[c] = e[D] = Me, e[j] = e[M] = e[N] = Me, e;
268
268
  })();
269
- var Be = [];
270
- function Ve(e) {
269
+ var Le = /[\p{P}\p{S}]/u, Re = /\p{Zs}/u, ze = [];
270
+ function Be(e) {
271
271
  var t = e.indexOf("\r"), n = e.indexOf("\0");
272
272
  if (t === -1 && n === -1) return e;
273
273
  var r = e.length;
274
- Be.length = 0;
274
+ ze.length = 0;
275
275
  var i = 0, a = 0;
276
276
  for (a = t === -1 ? n : n === -1 || t < n ? t : n; a < r; a++) {
277
277
  var o = e.charCodeAt(a);
278
- o === u ? (i < a && Be.push(e.slice(i, a)), a + 1 < r && e.charCodeAt(a + 1) === d && a++, Be.push("\n"), i = a + 1) : o === 0 && (i < a && Be.push(e.slice(i, a)), Be.push("�"), i = a + 1);
278
+ o === u ? (i < a && ze.push(e.slice(i, a)), a + 1 < r && e.charCodeAt(a + 1) === d && a++, ze.push("\n"), i = a + 1) : o === 0 && (i < a && ze.push(e.slice(i, a)), ze.push("�"), i = a + 1);
279
279
  }
280
- return i < r && Be.push(e.slice(i)), Be.join("");
280
+ return i < r && ze.push(e.slice(i)), ze.join("");
281
281
  }
282
- function He(e, t, n) {
282
+ function Ve(e, t, n) {
283
283
  for (var r = e, i = t.split("."), a = 0; a < i.length && (r = r?.[i[a]], r !== void 0);) a++;
284
284
  return r || n;
285
285
  }
286
- function Ue(e) {
286
+ function He(e) {
287
287
  for (var t = !1, n = 0; n < e.length; n++) {
288
288
  var r = e.charCodeAt(n);
289
- if (r <= c || r === ae || r === y || r === T || r === g || r === m || r === S || r === D || r === h || r === f || r >= 123) {
289
+ if (r <= c || r === ae || r === v || r === w || r === g || r === m || r === x || r === E || r === h || r === f || r >= 123) {
290
290
  t = !0;
291
291
  break;
292
292
  }
@@ -294,9 +294,9 @@ function Ue(e) {
294
294
  if (!t) return e;
295
295
  for (var i = "", n = 0; n < e.length; n++) {
296
296
  var r = e.charCodeAt(n);
297
- if (r === y && n + 2 < e.length) {
297
+ if (r === v && n + 2 < e.length) {
298
298
  var a = e.charCodeAt(n + 1), o = e.charCodeAt(n + 2);
299
- if ((a >= V && a <= H || a >= U && a <= j || a >= me && a <= M) && (o >= V && o <= H || o >= U && o <= j || o >= me && o <= M)) {
299
+ if ((a >= V && a <= H || a >= U && a <= A || a >= pe && a <= j) && (o >= V && o <= H || o >= U && o <= A || o >= pe && o <= j)) {
300
300
  i += e[n] + e[n + 1] + e[n + 2], n += 2;
301
301
  continue;
302
302
  }
@@ -305,10 +305,10 @@ function Ue(e) {
305
305
  }
306
306
  return i;
307
307
  }
308
- function We(...e) {
308
+ function Ue(...e) {
309
309
  return e.filter(Boolean).join(" ");
310
310
  }
311
- var Ge = new Set([
311
+ var We = new Set([
312
312
  "title",
313
313
  "textarea",
314
314
  "style",
@@ -318,24 +318,24 @@ var Ge = new Set([
318
318
  "noframes",
319
319
  "script",
320
320
  "plaintext"
321
- ]), Ke = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
321
+ ]), Ge = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
322
+ function Ke(e) {
323
+ return We.has(e.toLowerCase());
324
+ }
322
325
  function qe(e) {
323
- return Ge.has(e.toLowerCase());
326
+ return Ge.lastIndex = 0, Ge.test(e);
324
327
  }
325
328
  function Je(e) {
326
- return Ke.lastIndex = 0, Ke.test(e);
327
- }
328
- function Ye(e) {
329
- return Ke.lastIndex = 0, e.replace(Ke, function(e, t, n, r) {
329
+ return Ge.lastIndex = 0, e.replace(Ge, function(e, t, n, r) {
330
330
  return "&lt;" + t + n + r;
331
331
  });
332
332
  }
333
- var Xe = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Ze = /^<[A-Z]/, Qe = [
333
+ var Ye = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Xe = /^<[A-Z]/, Ze = [
334
334
  "script",
335
335
  "pre",
336
336
  "style",
337
337
  "textarea"
338
- ], $e = new Set(Qe), et = /<(?:pre|script|style|textarea)\b/i, tt = new Set([
338
+ ], Qe = new Set(Ze), $e = /<(?:pre|script|style|textarea)\b/i, et = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, tt = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, nt = new Set([
339
339
  "table",
340
340
  "thead",
341
341
  "tbody",
@@ -343,57 +343,57 @@ var Xe = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Ze = /^<[A-Z]/, Qe = [
343
343
  "tr",
344
344
  "td",
345
345
  "th"
346
- ]), nt = new Uint8Array(128);
346
+ ]), rt = new Uint8Array(128);
347
347
  (function() {
348
348
  for (var e = [
349
349
  f,
350
+ S,
350
351
  C,
351
- w,
352
352
  p,
353
- x,
353
+ b,
354
354
  m,
355
- O,
356
- T,
357
- S,
358
- pe,
355
+ D,
356
+ w,
357
+ x,
358
+ fe,
359
+ M,
359
360
  N,
360
- P,
361
- M
362
- ], t = 0; t < e.length; t++) nt[e[t]] = 1;
361
+ j
362
+ ], t = 0; t < e.length; t++) rt[e[t]] = 1;
363
363
  })();
364
- var rt = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
365
- function it(e) {
366
- return $e.has(e);
367
- }
364
+ var it = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
368
365
  function at(e) {
369
- return et.test(e);
366
+ return Qe.has(e);
367
+ }
368
+ function ot(e) {
369
+ return $e.test(e);
370
370
  }
371
- function ot(e, t, n) {
371
+ function st(e, t, n) {
372
372
  for (var r = t, i = n; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
373
373
  if (r >= i) return !1;
374
- e.charCodeAt(r) === se && r++;
374
+ e.charCodeAt(r) === B && r++;
375
375
  for (var a = 0; r < i;) {
376
376
  for (; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
377
377
  if (r >= i) break;
378
- if (e.charCodeAt(r) === se && a > 0) {
378
+ if (e.charCodeAt(r) === B && a > 0) {
379
379
  for (var o = r + 1; o < i && (e.charCodeAt(o) === c || e.charCodeAt(o) === l);) o++;
380
380
  if (o >= i) return !0;
381
381
  }
382
- if (e.charCodeAt(r) === A && r++, r >= i || e.charCodeAt(r) !== b) return !1;
383
- for (; r < i && e.charCodeAt(r) === b;) r++;
384
- for (r < i && e.charCodeAt(r) === A && r++, a++; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
385
- if (r < i) if (e.charCodeAt(r) === se) r++;
382
+ if (e.charCodeAt(r) === k && r++, r >= i || e.charCodeAt(r) !== y) return !1;
383
+ for (; r < i && e.charCodeAt(r) === y;) r++;
384
+ for (r < i && e.charCodeAt(r) === k && r++, a++; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
385
+ if (r < i) if (e.charCodeAt(r) === B) r++;
386
386
  else return !1;
387
387
  }
388
388
  return a > 0;
389
389
  }
390
- function st(e, t) {
391
- if (e.charCodeAt(t) !== T) return null;
390
+ function ct(e, t) {
391
+ if (e.charCodeAt(t) !== w) return null;
392
392
  let n = t + 1, r = e.length, i = !1;
393
- e.charCodeAt(n) === B && (n++, i = !0);
393
+ e.charCodeAt(n) === re && (n++, i = !0);
394
394
  let a = n, o = e.charCodeAt(n);
395
- if (!(o >= me && o <= he || o >= U && o <= W)) return null;
396
- for (; n < r && (e.charCodeAt(n) >= me && e.charCodeAt(n) <= he || e.charCodeAt(n) >= U && e.charCodeAt(n) <= W || e.charCodeAt(n) >= V && e.charCodeAt(n) <= H || e.charCodeAt(n) === b);) n++;
395
+ if (!(o >= pe && o <= me || o >= U && o <= W)) return null;
396
+ for (; n < r && (e.charCodeAt(n) >= pe && e.charCodeAt(n) <= me || e.charCodeAt(n) >= U && e.charCodeAt(n) <= W || e.charCodeAt(n) >= V && e.charCodeAt(n) <= H || e.charCodeAt(n) === y);) n++;
397
397
  let s = e.slice(a, n);
398
398
  if (!s) return null;
399
399
  let u = n;
@@ -401,7 +401,7 @@ function st(e, t) {
401
401
  let p = e.slice(u, n);
402
402
  if (n === u && n < r) {
403
403
  var m = e.charCodeAt(n);
404
- if (m !== g && m !== B) return null;
404
+ if (m !== g && m !== re) return null;
405
405
  }
406
406
  let h = n, _ = {}, v = !1;
407
407
  for (; n < r;) {
@@ -423,7 +423,7 @@ function st(e, t) {
423
423
  n++;
424
424
  continue;
425
425
  }
426
- if (t === B && n + 1 < r && e.charCodeAt(n + 1) === g) {
426
+ if (t === re && n + 1 < r && e.charCodeAt(n + 1) === g) {
427
427
  let t = e.slice(h, n);
428
428
  return v = n > h && e.charCodeAt(n - 1) === c, {
429
429
  tag: s,
@@ -436,15 +436,15 @@ function st(e, t) {
436
436
  hasSpaceBeforeSlash: v
437
437
  };
438
438
  }
439
- var y = n, S = e.charCodeAt(n);
440
- if (!(S >= me && S <= he || S >= U && S <= W || S === w || S === A)) return null;
439
+ var x = n, S = e.charCodeAt(n);
440
+ if (!(S >= pe && S <= me || S >= U && S <= W || S === C || S === k)) return null;
441
441
  for (n++; n < r;) {
442
- var C = e.charCodeAt(n);
443
- if (C >= me && C <= he || C >= U && C <= W || C >= V && C <= H || C === w || C === re || C === A || C === b) n++;
442
+ var T = e.charCodeAt(n);
443
+ if (T >= pe && T <= me || T >= U && T <= W || T >= V && T <= H || T === C || T === ne || T === k || T === y) n++;
444
444
  else break;
445
445
  }
446
- for (var E = e.slice(y, n); n < r && (e.charCodeAt(n) === c || e.charCodeAt(n) === l);) n++;
447
- if (e.charCodeAt(n) !== x) {
446
+ for (var E = e.slice(x, n); n < r && (e.charCodeAt(n) === c || e.charCodeAt(n) === l);) n++;
447
+ if (e.charCodeAt(n) !== b) {
448
448
  _[E] = "";
449
449
  continue;
450
450
  }
@@ -455,20 +455,20 @@ function st(e, t) {
455
455
  for (var O = n; n < r && e.charCodeAt(n) !== D;) n++;
456
456
  if (n >= r) return null;
457
457
  if (_[E] = e.slice(O, n), n++, n < r) {
458
- var k = e.charCodeAt(n);
459
- if (k !== c && k !== l && k !== d && k !== g && k !== B) return null;
458
+ var A = e.charCodeAt(n);
459
+ if (A !== c && A !== l && A !== d && A !== g && A !== re) return null;
460
460
  }
461
- } else if (D === ce) {
461
+ } else if (D === se) {
462
462
  var j = 1, O = n;
463
463
  for (n++; n < r && j > 0;) {
464
- var C = e.charCodeAt(n);
465
- C === ce ? j++ : C === le && j--, n++;
464
+ var T = e.charCodeAt(n);
465
+ T === se ? j++ : T === ce && j--, n++;
466
466
  }
467
467
  _[E] = e.slice(O, n);
468
468
  } else {
469
469
  for (var O = n; n < r;) {
470
470
  var M = e.charCodeAt(n);
471
- if (M === c || M === l || M === g || M === d || M === ae || M === ie || M === x || M === T || M === f) break;
471
+ if (M === c || M === l || M === g || M === d || M === ae || M === ie || M === b || M === w || M === f) break;
472
472
  n++;
473
473
  }
474
474
  if (n === O) return null;
@@ -477,22 +477,22 @@ function st(e, t) {
477
477
  }
478
478
  return null;
479
479
  }
480
- function ct(e, t, n) {
480
+ function lt(e, t, n) {
481
481
  for (var r = 0, i = e.length, a = !1, o = !1; r < i;) {
482
- for (var s = e.indexOf("\n", r), u = s < 0 ? i : s, v = r, y = 0; v < u && y < 4;) if (e.charCodeAt(v) === c) y++, v++;
483
- else if (e.charCodeAt(v) === l) y += 4, v++;
482
+ for (var s = e.indexOf("\n", r), u = s < 0 ? i : s, v = r, b = 0; v < u && b < 4;) if (e.charCodeAt(v) === c) b++, v++;
483
+ else if (e.charCodeAt(v) === l) b += 4, v++;
484
484
  else break;
485
485
  if (v >= u) {
486
486
  a = !1, r = s < 0 ? i : s + 1;
487
487
  continue;
488
488
  }
489
- if (y < 4) {
489
+ if (b < 4) {
490
490
  var x = e.charCodeAt(v);
491
491
  if (x === f || x === p) {
492
- for (var S = x, T = 0, E = v; E < u && e.charCodeAt(E) === S;) T++, E++;
492
+ for (var w = x, T = 0, E = v; E < u && e.charCodeAt(E) === w;) T++, E++;
493
493
  if (T >= 3) {
494
494
  var D = !0;
495
- if (S === f) {
495
+ if (w === f) {
496
496
  for (var O = E; O < u; O++) if (e.charCodeAt(O) === f) {
497
497
  D = !1;
498
498
  break;
@@ -507,8 +507,8 @@ function ct(e, t, n) {
507
507
  else if (M === l) j += 4, A++;
508
508
  else break;
509
509
  }
510
- if (j < 4 && A < i && e.charCodeAt(A) === S) {
511
- for (var N = 0; A < i && e.charCodeAt(A) === S;) N++, A++;
510
+ if (j < 4 && A < i && e.charCodeAt(A) === w) {
511
+ for (var N = 0; A < i && e.charCodeAt(A) === w;) N++, A++;
512
512
  if (N >= T) {
513
513
  for (; A < i && (e.charCodeAt(A) === c || e.charCodeAt(A) === l);) A++;
514
514
  if (A >= i || e.charCodeAt(A) === d) {
@@ -534,16 +534,16 @@ function ct(e, t, n) {
534
534
  if (F >= 4) break;
535
535
  a = !1;
536
536
  }
537
- if (!a && y < 4 && P < u && e.charCodeAt(P) === m && !(P + 1 < i && e.charCodeAt(P + 1) === h)) {
538
- var I = lt(e, P, t);
537
+ if (!a && b < 4 && P < u && e.charCodeAt(P) === m && !(P + 1 < i && e.charCodeAt(P + 1) === h)) {
538
+ var I = ut(e, P, t);
539
539
  if (I) {
540
540
  r = I, a = !1;
541
541
  continue;
542
542
  }
543
543
  }
544
544
  var L = e.charCodeAt(v);
545
- if (L === _ && y < 4) a = !1;
546
- else if (y < 4 && (L === b || L === C || L === w)) {
545
+ if (L === _ && b < 4) a = !1;
546
+ else if (b < 4 && (L === y || L === S || L === C)) {
547
547
  for (var R = v, ee = 0; R < u;) {
548
548
  var te = e.charCodeAt(R);
549
549
  if (te === L) ee++;
@@ -556,24 +556,24 @@ function ct(e, t, n) {
556
556
  }
557
557
  return o;
558
558
  }
559
- function lt(e, t, n) {
559
+ function ut(e, t, n) {
560
560
  let r = e.length;
561
561
  if (e.charCodeAt(t) !== m) return null;
562
562
  let i = t + 1 < r && e.charCodeAt(t + 1) === h, a = t + 1;
563
563
  for (; a < r;) {
564
564
  var o = e.charCodeAt(a);
565
- if (o === D) {
565
+ if (o === E) {
566
566
  a++;
567
567
  break;
568
568
  }
569
569
  if (o === m) return null;
570
- o === S && a + 1 < r && a++, a++;
570
+ o === x && a + 1 < r && a++, a++;
571
571
  }
572
- if (a > r || e.charCodeAt(a - 1) !== D) return null;
572
+ if (a > r || e.charCodeAt(a - 1) !== E) return null;
573
573
  let s = e.slice(t + 1, a - 1);
574
574
  if (s.length > 999) return null;
575
- let u = _t(s);
576
- if (!u || a >= r || e.charCodeAt(a) !== A) return null;
575
+ let u = mt(s);
576
+ if (!u || a >= r || e.charCodeAt(a) !== k) return null;
577
577
  a++;
578
578
  let f = !1;
579
579
  for (; a < r;) {
@@ -590,101 +590,98 @@ function lt(e, t, n) {
590
590
  }, t < 0 ? r : t + 1;
591
591
  }
592
592
  var p;
593
- if (a < r && e.charCodeAt(a) === T) {
593
+ if (a < r && e.charCodeAt(a) === w) {
594
594
  a++;
595
- for (var _ = a; a < r && e.charCodeAt(a) !== g && e.charCodeAt(a) !== d;) e.charCodeAt(a) === S && a + 1 < r && a++, a++;
595
+ for (var _ = a; a < r && e.charCodeAt(a) !== g && e.charCodeAt(a) !== d;) e.charCodeAt(a) === x && a + 1 < r && a++, a++;
596
596
  if (a >= r || e.charCodeAt(a) !== g) return null;
597
597
  p = e.slice(_, a), a++;
598
598
  for (var v = e.indexOf("\n", a), y = v < 0 ? r : v, b = a; b < y && (e.charCodeAt(b) === c || e.charCodeAt(b) === l);) b++;
599
599
  if (b < y) {
600
600
  if (b === a) return null;
601
- var x = e.charCodeAt(b);
602
- if (x !== ae && x !== ie && x !== ue) return null;
601
+ var S = e.charCodeAt(b);
602
+ if (S !== ae && S !== ie && S !== le) return null;
603
603
  }
604
604
  } else {
605
605
  for (var _ = a, C = 0; a < r;) {
606
606
  var o = e.charCodeAt(a);
607
- if (o === ue) C++;
608
- else if (o === de) {
607
+ if (o === le) C++;
608
+ else if (o === ue) {
609
609
  if (C === 0) break;
610
610
  C--;
611
611
  } else {
612
612
  if (o === c || o === l || o === d) break;
613
- o === S && a + 1 < r && a++;
613
+ o === x && a + 1 < r && a++;
614
614
  }
615
615
  a++;
616
616
  }
617
617
  if (p = e.slice(_, a), !p) return null;
618
618
  }
619
619
  for (; a < r && (e.charCodeAt(a) === c || e.charCodeAt(a) === l);) a++;
620
- var w = e.indexOf("\n", a), E = w < 0 ? r : w, O, k = !1, j = a, M = a;
621
- if (a === E && a < r) for (M = a + 1; M < r && (e.charCodeAt(M) === c || e.charCodeAt(M) === l);) M++;
620
+ var T = e.indexOf("\n", a), D = T < 0 ? r : T, O, A = !1, j = a, M = a;
621
+ if (a === D && a < r) for (M = a + 1; M < r && (e.charCodeAt(M) === c || e.charCodeAt(M) === l);) M++;
622
622
  if (M < r) {
623
623
  var N = e.charCodeAt(M);
624
- if (N === ae || N === ie || N === ue) {
625
- for (var P = N === ue ? 41 : N, F = M + 1, I = F; F < r;) {
624
+ if (N === ae || N === ie || N === le) {
625
+ for (var P = N === le ? 41 : N, F = M + 1, I = F; F < r;) {
626
626
  var L = e.charCodeAt(F);
627
627
  if (L === P) {
628
628
  for (var R = F + 1; R < r && (e.charCodeAt(R) === c || e.charCodeAt(R) === l);) R++;
629
- (R >= r || e.charCodeAt(R) === d) && (O = e.slice(I, F), k = !0, j = R < r ? R + 1 : r);
629
+ (R >= r || e.charCodeAt(R) === d) && (O = e.slice(I, F), A = !0, j = R < r ? R + 1 : r);
630
630
  break;
631
631
  }
632
- if (L === S && F + 1 < r) {
632
+ if (L === x && F + 1 < r) {
633
633
  F += 2;
634
634
  continue;
635
635
  }
636
636
  if (L === d && F + 1 < r && e.charCodeAt(F + 1) === d) break;
637
637
  F++;
638
638
  }
639
- if (!k && M === a) return null;
639
+ if (!A && M === a) return null;
640
640
  }
641
641
  }
642
- if (k) return n[u] || (n[u] = {
643
- target: yt(p),
644
- title: O === void 0 ? O : xe(yt(O))
642
+ if (A) return n[u] || (n[u] = {
643
+ target: gt(p),
644
+ title: O === void 0 ? O : ve(gt(O))
645
645
  }), j;
646
- for (; a < E && (e.charCodeAt(a) === c || e.charCodeAt(a) === l);) a++;
647
- return a < E ? null : (n[u] || (n[u] = {
648
- target: yt(p),
646
+ for (; a < D && (e.charCodeAt(a) === c || e.charCodeAt(a) === l);) a++;
647
+ return a < D ? null : (n[u] || (n[u] = {
648
+ target: gt(p),
649
649
  title: O
650
- }), w < 0 ? r : w + 1);
651
- }
652
- var ut = 1, dt = 2, Z = 4, ft = 8, pt = 16, mt = 32, ht = 64, Q = new Uint8Array(128);
653
- Q[c] = ut, Q[l] = ut, Q[d] = ut | dt, Q[u] = ut | dt, Q[_] = mt | Z, Q[g] = mt | Z, Q[b] = mt | ht | Z, Q[oe] = mt | Z, Q[C] = mt | ht | Z, Q[w] = mt | ht | Z, Q[f] = mt | ht | Z, Q[p] = mt | ht | Z, Q[T] = mt | ht | Z, Q[m] = ht | Z, Q[O] = ht | Z, Q[se] = mt | Z;
654
- for (let e = V; e <= H; e++) Q[e] = pt | mt;
655
- for (let e = U; e <= W; e++) Q[e] = ft;
656
- for (let e = me; e <= he; e++) Q[e] = ft;
657
- Q[S] = Z, Q[D] = Z, Q[ue] = Z, Q[de] = Z, Q[A] = Z, Q[ae] = Z, Q[ie] = Z, Q[k] = Z, Q[x] = Z, Q[v] = Z, Q[y] = Z, Q[te] = Z, Q[re] = Z, Q[B] = Z, Q[z] = Z, Q[ne] = Z, Q[E] = Z, Q[h] = Z, Q[ce] = Z, Q[le] = Z;
658
- function gt(e) {
650
+ }), T < 0 ? r : T + 1);
651
+ }
652
+ var dt = new Uint8Array(Ie);
653
+ for (dt[fe] = Te, dt[_] |= Ae, dt[g] |= Ae, dt[y] |= Ae | je, dt[oe] |= Ae, dt[S] |= Ae | je, dt[C] |= Ae | je, dt[f] |= Ae | je, dt[p] |= Ae | je, dt[w] |= Ae | je, dt[m] |= je, dt[D] |= je, dt[B] |= Ae, ft = V; ft <= H; ft++) dt[ft] |= Ae;
654
+ var ft;
655
+ function pt(e) {
659
656
  if (e.indexOf("[") < 0 && e.indexOf("]") < 0) return !1;
660
657
  for (var t = 0; t < e.length; t++) {
661
- if (e.charCodeAt(t) === S) {
658
+ if (e.charCodeAt(t) === x) {
662
659
  t++;
663
660
  continue;
664
661
  }
665
- if (e.charCodeAt(t) === m || e.charCodeAt(t) === D) return !0;
662
+ if (e.charCodeAt(t) === m || e.charCodeAt(t) === E) return !0;
666
663
  }
667
664
  return !1;
668
665
  }
669
- function _t(e) {
666
+ function mt(e) {
670
667
  var t = e.replace(/\s+/g, " ").trim();
671
668
  return t.indexOf("ẞ") === -1 ? t.toLowerCase() : t.replace(/\u1E9E/g, "ss").toLowerCase();
672
669
  }
673
- function vt(e) {
674
- return e < ge ? Q[e] : e === R ? ut : 0;
670
+ function ht(e) {
671
+ return e < he ? dt[e] : e === L ? Te : 0;
675
672
  }
676
- function yt(e) {
673
+ function gt(e) {
677
674
  return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
678
675
  }
679
- function bt(e, t) {
676
+ function _t(e, t) {
680
677
  var n = e.indexOf("\n", t);
681
678
  return n < 0 ? e.length : n;
682
679
  }
683
680
  function $(e, t) {
684
- let n = bt(e, t);
681
+ let n = _t(e, t);
685
682
  return n < e.length ? n + 1 : n;
686
683
  }
687
- function xt(e, t, n) {
684
+ function vt(e, t, n) {
688
685
  for (; t < n;) {
689
686
  let n = e.charCodeAt(t);
690
687
  if (n !== c && n !== l) break;
@@ -692,49 +689,49 @@ function xt(e, t, n) {
692
689
  }
693
690
  return t;
694
691
  }
695
- function St(e, t) {
692
+ function yt(e, t) {
696
693
  let n = $(e, t);
697
694
  for (; n < e.length;) {
698
- let t = bt(e, n);
699
- if (Dt(e, n, t)) return n;
695
+ let t = _t(e, n);
696
+ if (wt(e, n, t)) return n;
700
697
  n = $(e, n);
701
698
  }
702
699
  return e.length;
703
700
  }
704
- function Ct(e, t, n, r) {
701
+ function bt(e, t, n, r) {
705
702
  let i = 0;
706
703
  for (; t + i < n && e.charCodeAt(t + i) === r;) i++;
707
704
  return i;
708
705
  }
709
- var wt = 0, Tt = 0;
710
- function Et(e, t, n) {
711
- for (wt = 0, Tt = 0; t + Tt < n;) {
712
- let n = e.charCodeAt(t + Tt);
713
- if (n === l) wt += 4 - wt % 4;
714
- else if (n === c) wt++;
706
+ var xt = 0, St = 0;
707
+ function Ct(e, t, n) {
708
+ for (xt = 0, St = 0; t + St < n;) {
709
+ let n = e.charCodeAt(t + St);
710
+ if (n === l) xt += 4 - xt % 4;
711
+ else if (n === c) xt++;
715
712
  else break;
716
- Tt++;
713
+ St++;
717
714
  }
718
715
  }
719
- function Dt(e, t, n) {
720
- return xt(e, t, n) >= n;
716
+ function wt(e, t, n) {
717
+ return vt(e, t, n) >= n;
721
718
  }
722
- function Ot(e, t, n, r) {
723
- let i = bt(e, t);
724
- if (Et(e, t, i), wt > 3) return null;
725
- let a = t + Tt;
719
+ function Tt(e, t, n, r) {
720
+ let i = _t(e, t);
721
+ if (Ct(e, t, i), xt > 3) return null;
722
+ let a = t + St;
726
723
  if (e.charCodeAt(a) !== _) return null;
727
- let o = Ct(e, a, i, 35);
724
+ let o = bt(e, a, i, 35);
728
725
  if (o < 1 || o > 6 || (a += o, a < i && e.charCodeAt(a) !== c && e.charCodeAt(a) !== l)) return null;
729
- a = xt(e, a, i);
726
+ a = vt(e, a, i);
730
727
  for (var s = i; s > a && e.charCodeAt(s - 1) === c;) s--;
731
728
  for (var u = s; s > a && e.charCodeAt(s - 1) === _;) s--;
732
729
  if (s < u) if (s === a || e.charCodeAt(s - 1) === c) for (; s > a && e.charCodeAt(s - 1) === c;) s--;
733
730
  else s = u;
734
- let d = e.slice(a, s), f = xn(d, 0, d.length, n, r), p = (r?.slugify || Y)(d);
731
+ let d = e.slice(a, s), f = _n(d, 0, d.length, n, r), p = (r?.slugify || Ce)(d);
735
732
  return {
736
733
  node: {
737
- type: G.heading,
734
+ type: K.heading,
738
735
  level: o,
739
736
  children: f,
740
737
  id: p
@@ -742,18 +739,18 @@ function Ot(e, t, n, r) {
742
739
  end: $(e, i)
743
740
  };
744
741
  }
745
- function kt(e, t, n) {
742
+ function Et(e, t, n) {
746
743
  var r = e.charCodeAt(t);
747
- if (r !== x && r !== b) return !1;
744
+ if (r !== b && r !== y) return !1;
748
745
  for (var i = t; i < n && e.charCodeAt(i) === r;) i++;
749
746
  for (; i < n && (e.charCodeAt(i) === c || e.charCodeAt(i) === l);) i++;
750
747
  return i >= n;
751
748
  }
752
- function At(e, t) {
753
- let n = bt(e, t);
754
- if (Et(e, t, n), wt > 3) return null;
755
- let r = t + Tt, i = e.charCodeAt(r);
756
- if (i !== b && i !== C && i !== w) return null;
749
+ function Dt(e, t) {
750
+ let n = _t(e, t);
751
+ if (Ct(e, t, n), xt > 3) return null;
752
+ let r = t + St, i = e.charCodeAt(r);
753
+ if (i !== y && i !== S && i !== C) return null;
757
754
  let a = 0;
758
755
  for (; r < n;) {
759
756
  let t = e.charCodeAt(r);
@@ -762,37 +759,37 @@ function At(e, t) {
762
759
  r++;
763
760
  }
764
761
  return a < 3 ? null : {
765
- node: { type: G.breakThematic },
762
+ node: { type: K.breakThematic },
766
763
  end: $(e, n)
767
764
  };
768
765
  }
769
- function jt(e, t, n) {
770
- let r = bt(e, t);
771
- if (Et(e, t, r), wt > 3) return null;
772
- let i = wt, a = t + Tt, o = e.charCodeAt(a);
766
+ function Ot(e, t, n) {
767
+ let r = _t(e, t);
768
+ if (Ct(e, t, r), xt > 3) return null;
769
+ let i = xt, a = t + St, o = e.charCodeAt(a);
773
770
  if (o !== f && o !== p) return null;
774
- let s = Ct(e, a, r, o);
771
+ let s = bt(e, a, r, o);
775
772
  if (s < 3) return null;
776
773
  a += s;
777
- let u = xt(e, a, r), m = r;
774
+ let u = vt(e, a, r), m = r;
778
775
  if (o === f) {
779
776
  for (let t = u; t < r; t++) if (e.charCodeAt(t) === f) return null;
780
777
  }
781
778
  for (; m > u && (e.charCodeAt(m - 1) === c || e.charCodeAt(m - 1) === l);) m--;
782
779
  let h = e.slice(u, m), g = "", _ = "", v = h.indexOf(" ");
783
- v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = yt(g);
780
+ v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = gt(g);
784
781
  var y = void 0;
785
782
  if (_) {
786
- rt.lastIndex = 0;
787
- for (var b; (b = rt.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
783
+ it.lastIndex = 0;
784
+ for (var b; (b = it.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
788
785
  }
789
786
  let x = $(e, r), S = x, C = e.length;
790
787
  for (; S < e.length;) {
791
- let t = bt(e, S);
792
- if (Et(e, S, t), wt < 4) {
793
- let n = S + Tt;
794
- var w = Ct(e, n, t, o);
795
- if (w >= s && Dt(e, n + w, t)) {
788
+ let t = _t(e, S);
789
+ if (Ct(e, S, t), xt < 4) {
790
+ let n = S + St;
791
+ var w = bt(e, n, t, o);
792
+ if (w >= s && wt(e, n + w, t)) {
796
793
  C = $(e, t);
797
794
  break;
798
795
  }
@@ -804,14 +801,14 @@ function jt(e, t, n) {
804
801
  else {
805
802
  T = "";
806
803
  for (var E = x; E < S;) {
807
- var D = bt(e, E);
808
- Et(e, E, D), T += e.slice(E + Math.min(Tt, i), D) + "\n", E = $(e, D);
804
+ var D = _t(e, E);
805
+ Ct(e, E, D), T += e.slice(E + Math.min(St, i), D) + "\n", E = $(e, D);
809
806
  }
810
807
  T.length > 0 && T.charCodeAt(T.length - 1) === d && (T = T.slice(0, -1));
811
808
  }
812
809
  return {
813
810
  node: {
814
- type: G.codeBlock,
811
+ type: K.codeBlock,
815
812
  lang: g || void 0,
816
813
  text: T,
817
814
  infoString: _ || void 0,
@@ -820,19 +817,19 @@ function jt(e, t, n) {
820
817
  end: C
821
818
  };
822
819
  }
823
- function Mt(e, t) {
824
- if (Et(e, t, bt(e, t)), wt < 4) return null;
820
+ function kt(e, t) {
821
+ if (Ct(e, t, _t(e, t)), xt < 4) return null;
825
822
  let n = "", r = t;
826
823
  for (; r < e.length;) {
827
- let t = bt(e, r);
828
- if (Et(e, r, t), Dt(e, r, t)) {
824
+ let t = _t(e, r);
825
+ if (Ct(e, r, t), wt(e, r, t)) {
829
826
  for (var i = 0, a = $(e, t); a < e.length;) {
830
- var o = bt(e, a);
831
- if (Dt(e, a, o)) {
827
+ var o = _t(e, a);
828
+ if (wt(e, a, o)) {
832
829
  i++, a = $(e, o);
833
830
  continue;
834
831
  }
835
- if (Et(e, a, o), wt >= 4) {
832
+ if (Ct(e, a, o), xt >= 4) {
836
833
  for (var s = 0; s <= i; s++) n += "\n";
837
834
  r = a;
838
835
  break;
@@ -842,7 +839,7 @@ function Mt(e, t) {
842
839
  if (r !== a) break;
843
840
  continue;
844
841
  }
845
- if (wt < 4) break;
842
+ if (xt < 4) break;
846
843
  let d = 0, m = 0;
847
844
  var c = 0;
848
845
  for (let n = r; n < t && m < 4; n++) {
@@ -860,33 +857,36 @@ function Mt(e, t) {
860
857
  for (; n.length > 0 && n.charCodeAt(n.length - 1) === d;) n = n.slice(0, -1);
861
858
  return n ? {
862
859
  node: {
863
- type: G.codeBlock,
864
- text: n
860
+ type: K.codeBlock,
861
+ lang: void 0,
862
+ text: n,
863
+ infoString: void 0,
864
+ attrs: void 0
865
865
  },
866
866
  end: r
867
867
  } : null;
868
868
  }
869
- function Nt(e, t, n, r) {
870
- if (Et(e, t, bt(e, t)), wt > 3) return null;
871
- let i = t + Tt;
869
+ function At(e, t, n, r) {
870
+ if (Ct(e, t, _t(e, t)), xt > 3) return null;
871
+ let i = t + St;
872
872
  if (e.charCodeAt(i) !== g) return null;
873
873
  let a = "", o = t, s, u = !1, d = !1, m = !1;
874
874
  for (; o < e.length;) {
875
- let t = bt(e, o);
876
- Et(e, o, t);
877
- let n = o + Tt;
875
+ let t = _t(e, o);
876
+ Ct(e, o, t);
877
+ let n = o + St;
878
878
  if (e.charCodeAt(n) === g) {
879
879
  let r = n + 1;
880
- var h = wt + 1, v = !1;
880
+ var h = xt + 1, v = !1;
881
881
  if (r < t) {
882
- var y = e.charCodeAt(r);
883
- y === c ? (r++, h++, v = !0) : y === l && (v = !0);
882
+ var b = e.charCodeAt(r);
883
+ b === c ? (r++, h++, v = !0) : b === l && (v = !0);
884
884
  }
885
- for (var x = "", S = !1, E = r; E < t; E++) if (e.charCodeAt(E) === l) {
886
- S = !0;
885
+ for (var x = "", T = !1, E = r; E < t; E++) if (e.charCodeAt(E) === l) {
886
+ T = !0;
887
887
  break;
888
888
  }
889
- if (S) {
889
+ if (T) {
890
890
  var D = h;
891
891
  if (v && r < t && e.charCodeAt(r) === l) {
892
892
  for (var O = 4 - D % 4, k = 0; k < O - 1; k++) x += " ";
@@ -907,13 +907,13 @@ function Nt(e, t, n, r) {
907
907
  a += x + "\n";
908
908
  var N = x.trimStart();
909
909
  N.startsWith("```") || N.startsWith("~~~") ? m = !m : x.startsWith(" ") || x.startsWith(" ") ? m = !0 : N.length > 0 && !m && (m = !1), d = N.length > 0, o = $(e, t);
910
- } else if (a && !Dt(e, o, t) && d) {
911
- if (wt < 4) {
912
- var P = o + Tt, F = P < t ? e.charCodeAt(P) : 0;
913
- if (F === _ || F === g || F === f || F === p || F === T || (F === b || F === C || F === w) && At(e, o) || (F === b || F === C || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === c || e.charCodeAt(P + 1) === l)) break;
910
+ } else if (a && !wt(e, o, t) && d) {
911
+ if (xt < 4) {
912
+ var P = o + St, F = P < t ? e.charCodeAt(P) : 0;
913
+ if (F === _ || F === g || F === f || F === p || F === w || (F === y || F === S || F === C) && Dt(e, o) || (F === y || F === S || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === c || e.charCodeAt(P + 1) === l)) break;
914
914
  if (F >= V && F <= H) {
915
915
  for (var I = P; I < t && e.charCodeAt(I) >= V && e.charCodeAt(I) <= H;) I++;
916
- if (I < t && (e.charCodeAt(I) === re || e.charCodeAt(I) === de)) break;
916
+ if (I < t && (e.charCodeAt(I) === ne || e.charCodeAt(I) === ue)) break;
917
917
  }
918
918
  }
919
919
  if (m) break;
@@ -921,29 +921,28 @@ function Nt(e, t, n, r) {
921
921
  } else break;
922
922
  }
923
923
  if (!a && !s) return null;
924
- var { inBlockQuote: L, f: R } = n;
925
- n.inBlockQuote = !0, u && (n.f = !0);
926
- let ee = Cn(a || "", n, r);
927
- n.inBlockQuote = L, n.f = R;
928
- let te = {
929
- type: G.blockQuote,
930
- children: ee
931
- };
932
- return s && (te.alert = s), {
933
- node: te,
924
+ var { inBlockQuote: L, g: R } = n;
925
+ n.inBlockQuote = !0, u && (n.g = !0);
926
+ let ee = yn(a || "", n, r);
927
+ return n.inBlockQuote = L, n.g = R, {
928
+ node: {
929
+ type: K.blockQuote,
930
+ children: ee,
931
+ alert: s || void 0
932
+ },
934
933
  end: o
935
934
  };
936
935
  }
937
- function Pt(e, t, n) {
936
+ function jt(e, t, n) {
938
937
  for (var r = 0, i = t; i < n; i++) e.charCodeAt(i) === l ? r += 4 - r % 4 : r++;
939
938
  return r;
940
939
  }
941
- function Ft(e, t, n) {
942
- if (Et(e, t, n), wt > 3) return null;
943
- var r = t + Tt;
940
+ function Mt(e, t, n) {
941
+ if (Ct(e, t, n), xt > 3) return null;
942
+ var r = t + St;
944
943
  if (r >= n) return null;
945
- var i = e.charCodeAt(r), a = wt, o = r;
946
- if (i === b || i === C || i === oe) {
944
+ var i = e.charCodeAt(r), a = xt, o = r;
945
+ if (i === y || i === S || i === oe) {
947
946
  if (o = r + 1, o < n && e.charCodeAt(o) !== c && e.charCodeAt(o) !== l && e.charCodeAt(o) !== d) return null;
948
947
  } else if (i >= V && i <= H) {
949
948
  for (var s = r; s < n && s - r < 9;) {
@@ -953,12 +952,12 @@ function Ft(e, t, n) {
953
952
  }
954
953
  if (s > r && s < n) {
955
954
  var f = e.charCodeAt(s);
956
- if (f === re || f === de) {
955
+ if (f === ne || f === ue) {
957
956
  if (o = s + 1, o < n && e.charCodeAt(o) !== c && e.charCodeAt(o) !== l && e.charCodeAt(o) !== d) return null;
958
957
  } else return null;
959
958
  } else return null;
960
959
  } else return null;
961
- var p = o, m = Pt(e, t, o), h = 0, g = p, _ = m;
960
+ var p = o, m = jt(e, t, o), h = 0, g = p, _ = m;
962
961
  if (p >= n) return {
963
962
  ordered: i >= V && i <= H,
964
963
  marker: i >= V && i <= H ? e[s] : e[r],
@@ -975,26 +974,26 @@ function Ft(e, t, n) {
975
974
  } else _++;
976
975
  g++, h++;
977
976
  }
978
- var y = g >= n, x = _ - m;
979
- return y || x > 4 ? (_ = m + 1, g = p + 1, h = 1) : h === 0 && (_ = m + 1, g = p, h = 1), {
977
+ var b = g >= n, x = _ - m;
978
+ return b || x > 4 ? (_ = m + 1, g = p + 1, h = 1) : h === 0 && (_ = m + 1, g = p, h = 1), {
980
979
  ordered: i >= V && i <= H,
981
980
  marker: i >= V && i <= H ? e[s] : e[r],
982
981
  start: i >= V && i <= H ? parseInt(e.slice(r, s), 10) : void 0,
983
982
  contentStart: g,
984
983
  contentCol: _,
985
984
  markerCol: a,
986
- isEmpty: y
985
+ isEmpty: b
987
986
  };
988
987
  }
989
- var It = 0;
990
- function Lt(e, t, n, r) {
988
+ var Nt = 0;
989
+ function Pt(e, t, n, r) {
991
990
  var i = 0, a = t;
992
- for (It = 0; a < n && i < r;) {
991
+ for (Nt = 0; a < n && i < r;) {
993
992
  var o = e.charCodeAt(a);
994
993
  if (o === l) {
995
994
  var s = 4 - i % 4;
996
995
  if (i + s > r) {
997
- It = i + s - r, a++, i = r;
996
+ Nt = i + s - r, a++, i = r;
998
997
  break;
999
998
  }
1000
999
  i += s;
@@ -1004,17 +1003,17 @@ function Lt(e, t, n, r) {
1004
1003
  }
1005
1004
  return a;
1006
1005
  }
1007
- function Rt(e, t, n, r) {
1008
- var i = bt(e, t), a = Ft(e, t, i);
1006
+ function Ft(e, t, n, r) {
1007
+ var i = _t(e, t), a = Mt(e, t, i);
1009
1008
  if (!a) return null;
1010
- var o = [], s = t, h = a.contentCol, v = "", y = a.isEmpty, x = !1, S = !1;
1009
+ var o = [], s = t, h = a.contentCol, v = "", b = a.isEmpty, x = !1, T = !1;
1011
1010
  if (!a.isEmpty) {
1012
- for (var E = !1, O = a.contentStart; O < i; O++) if (e.charCodeAt(O) === l) {
1013
- E = !0;
1011
+ for (var D = !1, O = a.contentStart; O < i; O++) if (e.charCodeAt(O) === l) {
1012
+ D = !0;
1014
1013
  break;
1015
1014
  }
1016
- if (E) {
1017
- var k = "", A = Pt(e, t, a.contentStart), j = A - a.contentCol;
1015
+ if (D) {
1016
+ var k = "", A = jt(e, t, a.contentStart), j = A - a.contentCol;
1018
1017
  if (j > 0) for (var M = 0; M < j; M++) k += " ";
1019
1018
  for (var N = a.contentStart; N < i; N++) if (e.charCodeAt(N) === l) {
1020
1019
  for (var P = 4 - A % 4, F = 0; F < P; F++) k += " ";
@@ -1024,21 +1023,21 @@ function Rt(e, t, n, r) {
1024
1023
  } else v = e.slice(a.contentStart, i) + "\n";
1025
1024
  }
1026
1025
  for (s = $(e, i); s < e.length;) {
1027
- var I = bt(e, s);
1028
- Et(e, s, I);
1029
- var L = e.charCodeAt(s + Tt);
1030
- if (wt < h && (L === b || L === C || L === w) && wt <= 3 && At(e, s)) break;
1031
- var R = Ft(e, s, I);
1026
+ var I = _t(e, s);
1027
+ Ct(e, s, I);
1028
+ var L = e.charCodeAt(s + St);
1029
+ if (xt < h && (L === y || L === S || L === C) && xt <= 3 && Dt(e, s)) break;
1030
+ var R = Mt(e, s, I);
1032
1031
  if (R && R.ordered === a.ordered && R.marker === a.marker && R.markerCol < h) {
1033
1032
  o.push({
1034
1033
  contentCol: h,
1035
1034
  raw: v,
1036
1035
  hasBlankAfter: x,
1037
- isEmpty: y
1038
- }), x && (S = !0), h = R.contentCol, y = R.isEmpty, x = !1, v = R.isEmpty ? "" : e.slice(R.contentStart, I) + "\n", s = $(e, I);
1036
+ isEmpty: b
1037
+ }), x && (T = !0), h = R.contentCol, b = R.isEmpty, x = !1, v = R.isEmpty ? "" : e.slice(R.contentStart, I) + "\n", s = $(e, I);
1039
1038
  continue;
1040
1039
  }
1041
- if (Dt(e, s, I)) {
1040
+ if (wt(e, s, I)) {
1042
1041
  v += "\n", s = $(e, I);
1043
1042
  for (var ee = !1, te = 0; te < v.length; te++) {
1044
1043
  var z = v.charCodeAt(te);
@@ -1047,31 +1046,31 @@ function Rt(e, t, n, r) {
1047
1046
  break;
1048
1047
  }
1049
1048
  }
1050
- if (y && !ee) if (s < e.length) {
1051
- var ne = bt(e, s), re = Ft(e, s, ne);
1049
+ if (b && !ee) if (s < e.length) {
1050
+ var ne = _t(e, s), re = Mt(e, s, ne);
1052
1051
  if (!re || re.ordered !== a.ordered || re.marker !== a.marker) break;
1053
1052
  x = !0;
1054
1053
  } else break;
1055
1054
  if (s < e.length) {
1056
- var B = bt(e, s);
1057
- Et(e, s, B);
1058
- var ie = e.charCodeAt(s + Tt);
1059
- if ((ie === b || ie === C || ie === w) && wt <= 3 && At(e, s)) break;
1060
- var ae = Ft(e, s, B);
1061
- if (ae && ae.ordered === a.ordered && ae.marker === a.marker && ae.markerCol < h) {
1055
+ var ie = _t(e, s);
1056
+ Ct(e, s, ie);
1057
+ var ae = e.charCodeAt(s + St);
1058
+ if ((ae === y || ae === S || ae === C) && xt <= 3 && Dt(e, s)) break;
1059
+ var B = Mt(e, s, ie);
1060
+ if (B && B.ordered === a.ordered && B.marker === a.marker && B.markerCol < h) {
1062
1061
  x = !0;
1063
1062
  continue;
1064
1063
  }
1065
- if (!Dt(e, s, B) && wt < h) break;
1064
+ if (!wt(e, s, ie) && xt < h) break;
1066
1065
  }
1067
1066
  continue;
1068
1067
  }
1069
- if (wt >= h) {
1070
- var se = Lt(e, s, I, h);
1071
- if (It > 0) {
1072
- for (var ce = "", le = h, ue = 0; ue < It; ue++) ce += " ", le++;
1068
+ if (xt >= h) {
1069
+ var se = Pt(e, s, I, h);
1070
+ if (Nt > 0) {
1071
+ for (var ce = "", le = h, ue = 0; ue < Nt; ue++) ce += " ", le++;
1073
1072
  for (var de = se; de < I; de++) if (e.charCodeAt(de) === l) {
1074
- for (var fe = 4 - le % 4, pe = 0; pe < fe; pe++) ce += " ";
1073
+ for (var fe = 4 - le % 4, U = 0; U < fe; U++) ce += " ";
1075
1074
  le += fe;
1076
1075
  } else ce += e[de], le++;
1077
1076
  v += ce + "\n";
@@ -1079,16 +1078,16 @@ function Rt(e, t, n, r) {
1079
1078
  s = $(e, I);
1080
1079
  continue;
1081
1080
  }
1082
- for (var U = !1, W = 0; W < v.length; W++) {
1083
- var me = v.charCodeAt(W);
1081
+ for (var W = !1, pe = 0; pe < v.length; pe++) {
1082
+ var me = v.charCodeAt(pe);
1084
1083
  if (me !== d && me !== u && me !== c && me !== l) {
1085
- U = !0;
1084
+ W = !0;
1086
1085
  break;
1087
1086
  }
1088
1087
  }
1089
- if (!x && U && !y) {
1090
- var he = s + Tt, ge = e.charCodeAt(he);
1091
- if (!(ge === _ || ge === g || ge === T || ge === f || ge === p || (ge === b || ge === C || ge === w || ge === oe) && (At(e, s) !== null || Ft(e, s, I) !== null) || ge >= V && ge <= H && Ft(e, s, I) !== null)) {
1088
+ if (!x && W && !b) {
1089
+ var he = s + St, G = e.charCodeAt(he);
1090
+ if (!(G === _ || G === g || G === w || G === f || G === p || (G === y || G === S || G === C || G === oe) && (Dt(e, s) !== null || Mt(e, s, I) !== null) || G >= V && G <= H && Mt(e, s, I) !== null)) {
1092
1091
  v += "" + e.slice(he, I) + "\n", s = $(e, I);
1093
1092
  continue;
1094
1093
  }
@@ -1099,117 +1098,117 @@ function Rt(e, t, n, r) {
1099
1098
  contentCol: h,
1100
1099
  raw: v,
1101
1100
  hasBlankAfter: x,
1102
- isEmpty: y
1101
+ isEmpty: b
1103
1102
  }), o.length === 0) return null;
1104
- var _e = S;
1105
- if (!_e) for (var ve = 0; ve < o.length; ve++) {
1106
- if (o[ve].hasBlankAfter && ve < o.length - 1) {
1107
- _e = !0;
1103
+ var ge = T;
1104
+ if (!ge) for (var _e = 0; _e < o.length; _e++) {
1105
+ if (o[_e].hasBlankAfter && _e < o.length - 1) {
1106
+ ge = !0;
1108
1107
  break;
1109
1108
  }
1110
- if (!o[ve].isEmpty) {
1111
- for (var K = o[ve].raw, ye = K.length, q = 0, be = !1, xe = !1, Se = !1, Ce = !1, we = 0, Te = 0, J = -1; q < ye;) {
1112
- var Y = K.indexOf("\n", q);
1113
- if (Y < 0 && (Y = ye), Ce) {
1114
- Et(K, q, Y);
1115
- for (var X = K.slice(q + Tt, Y), Ee = 0; Ee < X.length && X.charCodeAt(Ee) === we;) Ee++;
1116
- Ee >= Te && X.slice(Ee).trim() === "" && (Ce = !1), q = Y < ye ? Y + 1 : ye;
1109
+ if (!o[_e].isEmpty) {
1110
+ for (var q = o[_e].raw, J = q.length, Y = 0, ve = !1, ye = !1, be = !1, xe = !1, Se = 0, X = 0, Ce = -1; Y < J;) {
1111
+ var Z = q.indexOf("\n", Y);
1112
+ if (Z < 0 && (Z = J), xe) {
1113
+ Ct(q, Y, Z);
1114
+ for (var Q = q.slice(Y + St, Z), we = 0; we < Q.length && Q.charCodeAt(we) === Se;) we++;
1115
+ we >= X && Q.slice(we).trim() === "" && (xe = !1), Y = Z < J ? Z + 1 : J;
1117
1116
  continue;
1118
1117
  }
1119
- if (Dt(K, q, Y)) {
1120
- J >= 0 ? Se = !0 : be && (xe = !0), q = Y < ye ? Y + 1 : ye;
1118
+ if (wt(q, Y, Z)) {
1119
+ Ce >= 0 ? be = !0 : ve && (ye = !0), Y = Z < J ? Z + 1 : J;
1121
1120
  continue;
1122
1121
  }
1123
- if (Et(K, q, Y), J >= 0) {
1124
- if (wt >= J) {
1125
- q = Y < ye ? Y + 1 : ye;
1122
+ if (Ct(q, Y, Z), Ce >= 0) {
1123
+ if (xt >= Ce) {
1124
+ Y = Z < J ? Z + 1 : J;
1126
1125
  continue;
1127
1126
  }
1128
- var De = Ft(K, q, Y);
1129
- if (De && De.markerCol < J && De.contentCol <= J) {
1130
- q = Y < ye ? Y + 1 : ye;
1127
+ var Te = Mt(q, Y, Z);
1128
+ if (Te && Te.markerCol < Ce && Te.contentCol <= Ce) {
1129
+ Y = Z < J ? Z + 1 : J;
1131
1130
  continue;
1132
1131
  }
1133
- if (De) {
1134
- q = Y < ye ? Y + 1 : ye;
1132
+ if (Te) {
1133
+ Y = Z < J ? Z + 1 : J;
1135
1134
  continue;
1136
1135
  }
1137
- J = -1, Se &&= (xe = !0, !1);
1136
+ Ce = -1, be &&= (ye = !0, !1);
1138
1137
  }
1139
- var Oe = K.slice(q + Tt, Y), ke = Oe.charCodeAt(0);
1140
- if ((ke === f || ke === p) && wt <= 3) {
1141
- for (var Ae = 0; Ae < Oe.length && Oe.charCodeAt(Ae) === ke;) Ae++;
1142
- if (Ae >= 3) {
1143
- if (xe && be) {
1144
- _e = !0;
1138
+ var Ee = q.slice(Y + St, Z), De = Ee.charCodeAt(0);
1139
+ if ((De === f || De === p) && xt <= 3) {
1140
+ for (var Oe = 0; Oe < Ee.length && Ee.charCodeAt(Oe) === De;) Oe++;
1141
+ if (Oe >= 3) {
1142
+ if (ye && ve) {
1143
+ ge = !0;
1145
1144
  break;
1146
1145
  }
1147
- Ce = !0, we = ke, Te = Ae, be = !0, q = Y < ye ? Y + 1 : ye;
1146
+ xe = !0, Se = De, X = Oe, ve = !0, Y = Z < J ? Z + 1 : J;
1148
1147
  continue;
1149
1148
  }
1150
1149
  }
1151
- var je = wt <= 3 ? Ft(K, q, Y) : null;
1152
- if (je && be) {
1153
- if (xe) {
1154
- _e = !0;
1150
+ var ke = xt <= 3 ? Mt(q, Y, Z) : null;
1151
+ if (ke && ve) {
1152
+ if (ye) {
1153
+ ge = !0;
1155
1154
  break;
1156
1155
  }
1157
- J = je.contentCol, Se = !1, q = Y < ye ? Y + 1 : ye, be = !0;
1156
+ Ce = ke.contentCol, be = !1, Y = Z < J ? Z + 1 : J, ve = !0;
1158
1157
  continue;
1159
1158
  }
1160
- if (xe) {
1161
- _e = !0;
1159
+ if (ye) {
1160
+ ge = !0;
1162
1161
  break;
1163
1162
  }
1164
- be = !0, q = Y < ye ? Y + 1 : ye;
1165
- }
1166
- if (_e) break;
1167
- }
1168
- }
1169
- for (var Me = [], Ne = 0; Ne < o.length; Ne++) {
1170
- for (var Pe = o[Ne], Fe = Pe.raw, Ie = Fe.length; Ie > 0 && Fe.charCodeAt(Ie - 1) === d;) Ie--;
1171
- var Le = Ie < Fe.length ? Fe.slice(0, Ie) : Fe, Re = null;
1172
- if (Le.length >= 3 && Le.charCodeAt(0) === m) {
1173
- var ze = Le[1];
1174
- (ze === " " || ze === "x" || ze === "X") && Le.charCodeAt(2) === D && (Re = {
1175
- type: G.gfmTask,
1176
- completed: ze === "x" || ze === "X"
1177
- }, Le = Le.slice(3));
1178
- }
1179
- var Be;
1180
- if (Pe.isEmpty && Le.trim() === "") Be = [];
1181
- else if (_e) {
1182
- var Ve = n.inList;
1183
- n.inList = !0, Be = Cn(Le, n, r), n.inList = Ve;
1163
+ ve = !0, Y = Z < J ? Z + 1 : J;
1164
+ }
1165
+ if (ge) break;
1166
+ }
1167
+ }
1168
+ for (var Ae = [], je = 0; je < o.length; je++) {
1169
+ for (var Me = o[je], Ne = Me.raw, Pe = Ne.length; Pe > 0 && Ne.charCodeAt(Pe - 1) === d;) Pe--;
1170
+ var Fe = Pe < Ne.length ? Ne.slice(0, Pe) : Ne, Ie = null;
1171
+ if (Fe.length >= 3 && Fe.charCodeAt(0) === m) {
1172
+ var Le = Fe[1];
1173
+ (Le === " " || Le === "x" || Le === "X") && Fe.charCodeAt(2) === E && (Ie = {
1174
+ type: K.gfmTask,
1175
+ completed: Le === "x" || Le === "X"
1176
+ }, Fe = Fe.slice(3));
1177
+ }
1178
+ var Re;
1179
+ if (Me.isEmpty && Fe.trim() === "") Re = [];
1180
+ else if (ge) {
1181
+ var ze = n.inList;
1182
+ n.inList = !0, Re = yn(Fe, n, r), n.inList = ze;
1184
1183
  } else {
1185
- var He = n.inList;
1186
- if (n.inList = !0, Be = Cn(Le, n, r), n.inList = He, Be.length === 1 && Be[0].type === G.paragraph) Be = Be[0].children;
1184
+ var Be = n.inList;
1185
+ if (n.inList = !0, Re = yn(Fe, n, r), n.inList = Be, Re.length === 1 && Re[0].type === K.paragraph) Re = Re[0].children;
1187
1186
  else {
1188
- for (var Ue = [], We = 0; We < Be.length; We++) if (Be[We].type === G.paragraph) for (var Ge = Be[We].children, Ke = 0; Ke < Ge.length; Ke++) Ue.push(Ge[Ke]);
1189
- else Ue.push(Be[We]);
1190
- Be = Ue;
1187
+ for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type === K.paragraph) for (var Ue = Re[He].children, We = 0; We < Ue.length; We++) Ve.push(Ue[We]);
1188
+ else Ve.push(Re[He]);
1189
+ Re = Ve;
1191
1190
  }
1192
1191
  }
1193
- Me.push(Re ? [
1194
- Re,
1192
+ Ae.push(Ie ? [
1193
+ Ie,
1195
1194
  {
1196
- type: G.text,
1195
+ type: K.text,
1197
1196
  text: " "
1198
1197
  },
1199
- ...Be
1200
- ] : Be);
1198
+ ...Re
1199
+ ] : Re);
1201
1200
  }
1202
1201
  return {
1203
1202
  node: {
1204
- type: a.ordered ? G.orderedList : G.unorderedList,
1203
+ type: a.ordered ? K.orderedList : K.unorderedList,
1205
1204
  start: a.ordered ? a.start : void 0,
1206
- items: Me
1205
+ items: Ae
1207
1206
  },
1208
1207
  end: s
1209
1208
  };
1210
1209
  }
1211
- var zt = new Set(/* @__PURE__ */ "address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
1212
- function Bt(e, t, n) {
1210
+ var It = new Set(/* @__PURE__ */ "address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
1211
+ function Lt(e, t, n) {
1213
1212
  let r = {};
1214
1213
  for (let [o, s] of Object.entries(e)) {
1215
1214
  let e = o, c = o.toLowerCase();
@@ -1217,7 +1216,7 @@ function Bt(e, t, n) {
1217
1216
  let t = {}, n = [], i = 0, a = 0;
1218
1217
  for (let e = 0; e < s.length; e++) {
1219
1218
  let t = s.charCodeAt(e);
1220
- t === ue ? i++ : t === de ? i-- : t === z && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
1219
+ t === le ? i++ : t === ue ? i-- : t === te && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
1221
1220
  }
1222
1221
  a < s.length && n.push(s.slice(a));
1223
1222
  let o = !1;
@@ -1238,11 +1237,11 @@ function Bt(e, t, n) {
1238
1237
  let i = n.sanitizer(s, t, c);
1239
1238
  i !== null && (r[e] = i);
1240
1239
  } else if (s === "") r[e] = !0;
1241
- else if (s.length >= 2 && s.charCodeAt(0) === ce && s.charCodeAt(s.length - 1) === le) {
1240
+ else if (s.length >= 2 && s.charCodeAt(0) === se && s.charCodeAt(s.length - 1) === ce) {
1242
1241
  var i = s.slice(1, -1);
1243
1242
  if (i.length > 0) {
1244
1243
  var a = i.charCodeAt(0);
1245
- if (a === m || a === ce) try {
1244
+ if (a === m || a === se) try {
1246
1245
  r[e] = JSON.parse(i);
1247
1246
  continue;
1248
1247
  } catch {}
@@ -1264,17 +1263,17 @@ function Bt(e, t, n) {
1264
1263
  }
1265
1264
  return r;
1266
1265
  }
1267
- function Vt(e, t, n) {
1266
+ function Rt(e, t, n) {
1268
1267
  let r = t.length;
1269
1268
  var i = t.charCodeAt(0);
1270
- i >= U && i <= W && (i += _e);
1269
+ i >= U && i <= W && (i += G);
1271
1270
  for (let o = n; o <= e.length - r; o++) {
1272
1271
  var a = e.charCodeAt(o);
1273
- if (a >= U && a <= W && (a += _e), a !== i) continue;
1272
+ if (a >= U && a <= W && (a += G), a !== i) continue;
1274
1273
  let n = !0;
1275
1274
  for (let i = 1; i < r; i++) {
1276
1275
  let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
1277
- if (r >= U && r <= W && (r += _e), a >= U && a <= W && (a += _e), r !== a) {
1276
+ if (r >= U && r <= W && (r += G), a >= U && a <= W && (a += G), r !== a) {
1278
1277
  n = !1;
1279
1278
  break;
1280
1279
  }
@@ -1283,17 +1282,17 @@ function Vt(e, t, n) {
1283
1282
  }
1284
1283
  return -1;
1285
1284
  }
1286
- function Ht(e, t, n) {
1285
+ function zt(e, t, n) {
1287
1286
  let r = t.length;
1288
1287
  var i = t.charCodeAt(0);
1289
- i >= U && i <= W && (i += _e);
1288
+ i >= U && i <= W && (i += G);
1290
1289
  for (let o = Math.min(n, e.length - r); o >= 0; o--) {
1291
1290
  var a = e.charCodeAt(o);
1292
- if (a >= U && a <= W && (a += _e), a !== i) continue;
1291
+ if (a >= U && a <= W && (a += G), a !== i) continue;
1293
1292
  let n = !0;
1294
1293
  for (let i = 1; i < r; i++) {
1295
1294
  let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
1296
- if (r >= U && r <= W && (r += _e), a >= U && a <= W && (a += _e), r !== a) {
1295
+ if (r >= U && r <= W && (r += G), a >= U && a <= W && (a += G), r !== a) {
1297
1296
  n = !1;
1298
1297
  break;
1299
1298
  }
@@ -1302,19 +1301,19 @@ function Ht(e, t, n) {
1302
1301
  }
1303
1302
  return -1;
1304
1303
  }
1305
- var Ut = -1;
1306
- function Wt(e, t, n) {
1304
+ var Bt = -1;
1305
+ function Vt(e, t, n) {
1307
1306
  let r = n.toLowerCase(), i = "<" + r, a = "</" + r, o = 1, s = t, u = e.length;
1308
- for (Ut = -1; s < u && o > 0;) {
1309
- let t = Vt(e, i, s), n = Vt(e, a, s);
1307
+ for (Bt = -1; s < u && o > 0;) {
1308
+ let t = Rt(e, i, s), n = Rt(e, a, s);
1310
1309
  if (n === -1) return -1;
1311
1310
  if (t !== -1 && t < n) {
1312
- let n = st(e, t);
1313
- n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !De(n.tag) && o++, s = n.end) : s = t + 1;
1311
+ let n = ct(e, t);
1312
+ n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !we(n.tag) && o++, s = n.end) : s = t + 1;
1314
1313
  } else {
1315
1314
  var f = n + a.length, p = f < u ? e.charCodeAt(f) : 62;
1316
1315
  if ((p === g || p === c || p === l || p === d) && (o--, o === 0)) {
1317
- Ut = n;
1316
+ Bt = n;
1318
1317
  let t = n + a.length;
1319
1318
  for (; t < u && e.charCodeAt(t) !== g;) t++;
1320
1319
  return t + 1;
@@ -1324,23 +1323,23 @@ function Wt(e, t, n) {
1324
1323
  }
1325
1324
  return -1;
1326
1325
  }
1327
- function Gt(e, t, n, r) {
1326
+ function Ht(e, t, n, r) {
1328
1327
  if (r.ignoreHTMLBlocks || r.disableParsingRawHTML) return null;
1329
- var i = bt(e, t);
1330
- if (Et(e, t, i), wt > 3 && !n.inHTML) return null;
1331
- var a = t + Tt;
1332
- if (e.charCodeAt(a) !== T) return null;
1328
+ var i = _t(e, t);
1329
+ if (Ct(e, t, i), xt > 3 && !n.inHTML) return null;
1330
+ var a = t + St;
1331
+ if (e.charCodeAt(a) !== w) return null;
1333
1332
  var o = e.indexOf(">", a + 1);
1334
1333
  if (o !== -1 && o < i) {
1335
1334
  var s = e.slice(a + 1, o);
1336
1335
  if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s) || /^[^\s@]+@[^\s@]+$/.test(s)) return null;
1337
1336
  }
1338
- var u = Kt(e, a);
1337
+ var u = Ut(e, a);
1339
1338
  if (u >= 1 && u <= 5) {
1340
1339
  var f = e.length;
1341
1340
  if (u === 1) {
1342
- for (var p = e.length, m = 0; m < Qe.length; m++) {
1343
- var h = Vt(e, "</" + Qe[m] + ">", a);
1341
+ for (var p = e.length, m = 0; m < Ze.length; m++) {
1342
+ var h = Rt(e, "</" + Ze[m] + ">", a);
1344
1343
  h >= 0 && h < p && (p = h);
1345
1344
  }
1346
1345
  if (p < e.length) {
@@ -1354,8 +1353,9 @@ function Gt(e, t, n, r) {
1354
1353
  var b = e.slice(a, f);
1355
1354
  if (u >= 2) return {
1356
1355
  node: {
1357
- type: G.htmlComment,
1356
+ type: K.htmlComment,
1358
1357
  text: b,
1358
+ h: !1,
1359
1359
  raw: !0,
1360
1360
  endPos: f
1361
1361
  },
@@ -1363,9 +1363,9 @@ function Gt(e, t, n, r) {
1363
1363
  };
1364
1364
  var x = "div", S = b.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);
1365
1365
  S && (x = S[1]);
1366
- var C = st(e, a), w = {}, E;
1367
- C && !C.isClosing && (w = Bt(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
1368
- var D = [], O = Vt(b, "</" + x.toLowerCase(), 0), k = b, A = "";
1366
+ var C = ct(e, a), T = {}, E;
1367
+ C && !C.isClosing && (T = Lt(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
1368
+ var D = [], O = Rt(b, "</" + x.toLowerCase(), 0), k = b, A = "";
1369
1369
  if (C && C.isClosing) for (k = b.slice(C.end - a); k.length > 0 && k.charCodeAt(k.length - 1) === d;) k = k.slice(0, -1);
1370
1370
  else if (C && !C.isClosing) {
1371
1371
  var j = C.end - a;
@@ -1375,30 +1375,30 @@ function Gt(e, t, n, r) {
1375
1375
  }
1376
1376
  return {
1377
1377
  node: {
1378
- type: G.htmlBlock,
1378
+ type: K.htmlBlock,
1379
1379
  tag: x,
1380
- attrs: w,
1381
- e: E,
1380
+ attrs: T,
1381
+ f: E,
1382
1382
  children: D,
1383
1383
  a: k,
1384
1384
  text: A,
1385
1385
  c: !0,
1386
1386
  b: C ? C.isClosing : !1,
1387
1387
  endPos: f,
1388
- canInterruptParagraph: !0
1388
+ e: !0
1389
1389
  },
1390
1390
  end: f
1391
1391
  };
1392
1392
  }
1393
1393
  if (u === 6 || u === 7) {
1394
- var M = St(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), F = M < e.length ? $(e, M) : e.length, I = st(e, a);
1394
+ var M = yt(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), F = M < e.length ? $(e, M) : e.length, I = ct(e, a);
1395
1395
  if (I) {
1396
1396
  var L = I.tag, R = L.toLowerCase();
1397
1397
  if (I.isClosing) {
1398
1398
  var ee = e.slice(I.end, N);
1399
1399
  return {
1400
1400
  node: {
1401
- type: G.htmlBlock,
1401
+ type: K.htmlBlock,
1402
1402
  tag: L,
1403
1403
  attrs: {},
1404
1404
  children: [],
@@ -1407,287 +1407,287 @@ function Gt(e, t, n, r) {
1407
1407
  c: !0,
1408
1408
  b: !0,
1409
1409
  endPos: N,
1410
- canInterruptParagraph: u === 6
1410
+ e: u === 6
1411
1411
  },
1412
1412
  end: F
1413
1413
  };
1414
1414
  }
1415
- if (I.selfClosing || De(L)) return {
1415
+ if (I.selfClosing || we(L)) return {
1416
1416
  node: {
1417
- type: G.htmlBlock,
1417
+ type: K.htmlBlock,
1418
1418
  tag: L,
1419
- attrs: Bt(I.attrs, L, r),
1420
- e: I.whitespaceBeforeAttrs + I.rawAttrs,
1419
+ attrs: Lt(I.attrs, L, r),
1420
+ f: I.whitespaceBeforeAttrs + I.rawAttrs,
1421
1421
  children: [],
1422
1422
  a: "",
1423
1423
  text: "",
1424
1424
  c: !1,
1425
1425
  b: !1,
1426
1426
  endPos: I.end,
1427
- canInterruptParagraph: u === 6
1427
+ e: u === 6
1428
1428
  },
1429
1429
  end: $(e, I.end)
1430
1430
  };
1431
- var te = n.d || 0, z = e.slice(a, N), ne = -1, re = -1;
1431
+ var te = n.d || 0, z = e.slice(a, N), ne = -1, ie = -1;
1432
1432
  if (te < 10) {
1433
- for (var ie = "</" + R, ae = I.end - a, oe = 1, se = ae; se < z.length && oe > 0;) {
1434
- var ce = Vt(z, "<" + R, se), le = Vt(z, ie, se);
1433
+ for (var ae = "</" + R, oe = I.end - a, B = 1, se = oe; se < z.length && B > 0;) {
1434
+ var ce = Rt(z, "<" + R, se), le = Rt(z, ae, se);
1435
1435
  if (le === -1) break;
1436
1436
  if (ce !== -1 && ce < le) {
1437
1437
  var ue = ce + R.length + 1;
1438
1438
  if (ue < z.length) {
1439
1439
  var de = z.charCodeAt(ue);
1440
- (de === c || de === l || de === d || de === g || de === B) && oe++;
1440
+ (de === c || de === l || de === d || de === g || de === re) && B++;
1441
1441
  }
1442
1442
  se = ce + 1;
1443
1443
  } else {
1444
- var fe = le + ie.length;
1444
+ var fe = le + ae.length;
1445
1445
  if (fe < z.length) {
1446
- var pe = z.charCodeAt(fe);
1447
- if ((pe === g || pe === c || pe === l || pe === d) && (oe--, oe === 0)) {
1446
+ var V = z.charCodeAt(fe);
1447
+ if ((V === g || V === c || V === l || V === d) && (B--, B === 0)) {
1448
1448
  ne = le;
1449
- for (var V = fe; V < z.length && z.charCodeAt(V) !== g;) V++;
1450
- re = V + 1;
1449
+ for (var H = fe; H < z.length && z.charCodeAt(H) !== g;) H++;
1450
+ ie = H + 1;
1451
1451
  break;
1452
1452
  }
1453
- } else if (oe--, oe === 0) {
1454
- ne = le, re = z.length;
1453
+ } else if (B--, B === 0) {
1454
+ ne = le, ie = z.length;
1455
1455
  break;
1456
1456
  }
1457
1457
  se = le + 1;
1458
1458
  }
1459
1459
  }
1460
- var H = !1;
1461
- if (ne === -1 && u === 6 && !I.isClosing && !tt.has(R)) {
1462
- var me = Wt(e, I.end, R);
1460
+ var pe = !1;
1461
+ if (ne === -1 && u === 6 && !I.isClosing && !nt.has(R)) {
1462
+ var me = Vt(e, I.end, R);
1463
1463
  if (me !== -1) {
1464
- var he = Ut;
1464
+ var he = Bt;
1465
1465
  if (e.substring(I.end, he).indexOf("\n\n") !== -1) {
1466
- var ge = bt(e, me);
1467
- N = ge, F = $(e, ge), z = e.slice(a, N), P = e.slice(a, N), ne = he - a, re = me - a, H = !0;
1466
+ var G = _t(e, me);
1467
+ N = G, F = $(e, G), z = e.slice(a, N), P = e.slice(a, N), ne = he - a, ie = me - a, pe = !0;
1468
1468
  }
1469
1469
  }
1470
1470
  }
1471
1471
  }
1472
- var _e = I.rawAttrs.indexOf("\n") !== -1 || I.whitespaceBeforeAttrs.indexOf("\n") !== -1, ve = !1;
1473
- ne !== -1 && (ve = z.slice(re).trim().length === 0);
1474
- var K = !1, ye = N, q = F;
1472
+ var ge = I.rawAttrs.indexOf("\n") !== -1 || I.whitespaceBeforeAttrs.indexOf("\n") !== -1, _e = !1;
1473
+ ne !== -1 && (_e = z.slice(ie).trim().length === 0);
1474
+ var q = !1, J = N, Y = F;
1475
1475
  if (ne !== -1) {
1476
- var be = a + re, xe = bt(e, be - 1);
1477
- if (be < xe) {
1478
- for (var Se = be; Se < xe && (e.charCodeAt(Se) === c || e.charCodeAt(Se) === l);) Se++;
1479
- if (Se < xe && e.charCodeAt(Se) === T) {
1480
- var Ce = st(e, Se);
1481
- Ce && !Ce.isClosing && (K = !0, ye = be, q = be, ve = !0);
1476
+ var ve = a + ie, ye = _t(e, ve - 1);
1477
+ if (ve < ye) {
1478
+ for (var be = ve; be < ye && (e.charCodeAt(be) === c || e.charCodeAt(be) === l);) be++;
1479
+ if (be < ye && e.charCodeAt(be) === w) {
1480
+ var xe = ct(e, be);
1481
+ xe && !xe.isClosing && (q = !0, J = ve, Y = ve, _e = !0);
1482
1482
  }
1483
1483
  }
1484
- if (!K) {
1485
- var we = $(e, xe);
1486
- if (we < N) {
1487
- for (var Te = we; Te < N && (e.charCodeAt(Te) === c || e.charCodeAt(Te) === l);) Te++;
1488
- Te < N && e.charCodeAt(Te) === T && st(e, Te) && (K = !0, ye = xe, q = we, ve = !0);
1484
+ if (!q) {
1485
+ var Se = $(e, ye);
1486
+ if (Se < N) {
1487
+ for (var X = Se; X < N && (e.charCodeAt(X) === c || e.charCodeAt(X) === l);) X++;
1488
+ X < N && e.charCodeAt(X) === w && ct(e, X) && (q = !0, J = ye, Y = Se, _e = !0);
1489
1489
  }
1490
1490
  }
1491
- !K && n.inHTML && (K = !0, ye = xe, q = $(e, xe), ve = e.slice(be, xe).trim().length === 0);
1491
+ !q && n.inHTML && (q = !0, J = ye, Y = $(e, ye), _e = e.slice(ve, ye).trim().length === 0);
1492
1492
  }
1493
- var J = [], Y = "";
1493
+ var Ce = [], Z = "";
1494
1494
  if (ne !== -1) {
1495
- Y = z.slice(I.end - a, ne);
1496
- var X = Y.trim();
1497
- if (X) {
1498
- var { inline: Ee, inHTML: Oe, d: ke } = n;
1499
- if (n.inHTML = !0, n.d = te + 1, R === "p") n.inline = !0, J = xn(X, 0, X.length, n, r);
1495
+ Z = z.slice(I.end - a, ne);
1496
+ var Q = Z.trim();
1497
+ if (Q) {
1498
+ var { inline: Te, inHTML: Ee, d: De } = n;
1499
+ if (n.inHTML = !0, n.d = te + 1, R === "p") n.inline = !0, Ce = _n(Q, 0, Q.length, n, r);
1500
1500
  else {
1501
- var Ae = Y.indexOf("\n\n") !== -1, je = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(X), Me = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(X);
1502
- Ae || je || n.inHTML && Me || Me ? (n.inline = !1, J = Cn(Y, n, r)) : (n.inline = !0, J = xn(X, 0, X.length, n, r));
1501
+ var Oe = Z.indexOf("\n\n") !== -1, ke = et.test(Q), Ae = tt.test(Q);
1502
+ Oe || ke || n.inHTML && Ae || Ae ? (n.inline = !1, Ce = yn(Z, n, r)) : (n.inline = !0, Ce = _n(Q, 0, Q.length, n, r));
1503
1503
  }
1504
- n.inline = Ee, n.inHTML = Oe, n.d = ke;
1504
+ n.inline = Te, n.inHTML = Ee, n.d = De;
1505
1505
  }
1506
1506
  }
1507
- var Ne = !1;
1508
- if (u === 6 && ne !== -1 && !n.inHTML && !_e) {
1509
- var Pe = Y, Fe = /<[a-zA-Z][^>]*>/.test(Pe), Ie = /\n\n/.test(Pe) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Pe);
1510
- Fe && !Ie && (Ne = !0);
1511
- }
1512
- if (n.inHTML || u === 7 || _e || !ve || Ne) {
1513
- var Le;
1514
- if (ne !== -1 && K) {
1515
- var Re = !1;
1516
- if (n.inHTML && re < z.length) {
1517
- for (var ze = re; ze < z.length && z.charCodeAt(ze) !== d;) ze++;
1518
- var Be = z.slice(re, ze).trim();
1519
- Re = Be.length > 1 && Be.charCodeAt(0) === T && Be.charCodeAt(1) !== B;
1507
+ var je = !1;
1508
+ if (u === 6 && ne !== -1 && !n.inHTML && !ge) {
1509
+ var Me = Z, Ne = /<[a-zA-Z][^>]*>/.test(Me), Pe = /\n\n/.test(Me) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Me);
1510
+ Ne && !Pe && (je = !0);
1511
+ }
1512
+ if (n.inHTML || u === 7 || ge || !_e || je) {
1513
+ var Fe;
1514
+ if (ne !== -1 && q) {
1515
+ var Ie = !1;
1516
+ if (n.inHTML && ie < z.length) {
1517
+ for (var Le = ie; Le < z.length && z.charCodeAt(Le) !== d;) Le++;
1518
+ var Re = z.slice(ie, Le).trim();
1519
+ Ie = Re.length > 1 && Re.charCodeAt(0) === w && Re.charCodeAt(1) !== re;
1520
1520
  }
1521
- Le = Re ? z.slice(I.end - a) : Y;
1522
- } else (u === 7 || n.inHTML) && ne !== -1 ? (Le = z.slice(I.end - a), Le.charCodeAt(0) === d && (Le = Le.slice(1))) : K ? Le = e.slice(a, ye) : _e ? Le = P : (Le = z.slice(I.end - a), Le.charCodeAt(0) === d && (Le = Le.slice(1)));
1521
+ Fe = Ie ? z.slice(I.end - a) : Z;
1522
+ } else (u === 7 || n.inHTML) && ne !== -1 ? (Fe = z.slice(I.end - a), Fe.charCodeAt(0) === d && (Fe = Fe.slice(1))) : q ? Fe = e.slice(a, J) : ge ? Fe = P : (Fe = z.slice(I.end - a), Fe.charCodeAt(0) === d && (Fe = Fe.slice(1)));
1523
1523
  return {
1524
1524
  node: {
1525
- type: G.htmlBlock,
1525
+ type: K.htmlBlock,
1526
1526
  tag: L,
1527
- attrs: Bt(I.attrs, L, r),
1528
- e: I.whitespaceBeforeAttrs + I.rawAttrs,
1529
- children: J,
1530
- a: Le,
1531
- text: Le,
1527
+ attrs: Lt(I.attrs, L, r),
1528
+ f: I.whitespaceBeforeAttrs + I.rawAttrs,
1529
+ children: Ce,
1530
+ a: Fe,
1531
+ text: Fe,
1532
1532
  c: !0,
1533
1533
  b: !1,
1534
- endPos: ye,
1535
- canInterruptParagraph: u === 6
1534
+ endPos: J,
1535
+ e: u === 6
1536
1536
  },
1537
- end: q
1537
+ end: Y
1538
1538
  };
1539
1539
  }
1540
1540
  return {
1541
1541
  node: {
1542
- type: G.htmlBlock,
1542
+ type: K.htmlBlock,
1543
1543
  tag: L,
1544
- attrs: Bt(I.attrs, L, r),
1545
- e: I.whitespaceBeforeAttrs + I.rawAttrs,
1546
- children: J,
1547
- a: H ? "" : Y,
1548
- text: Y,
1544
+ attrs: Lt(I.attrs, L, r),
1545
+ f: I.whitespaceBeforeAttrs + I.rawAttrs,
1546
+ children: Ce,
1547
+ a: pe ? "" : Z,
1548
+ text: Z,
1549
1549
  c: !1,
1550
1550
  b: !1,
1551
- endPos: ye,
1552
- canInterruptParagraph: u === 6
1551
+ endPos: J,
1552
+ e: u === 6
1553
1553
  },
1554
- end: q
1554
+ end: Y
1555
1555
  };
1556
1556
  }
1557
- var Ve = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), He = Ve ? Ve[2] : "div", Ue = Ve ? Ve[1] === "/" : !1, We = P;
1558
- if (Ue) {
1559
- var Ge = P.indexOf(">");
1560
- Ge !== -1 && (We = P.slice(Ge + 1));
1557
+ var ze = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), Be = ze ? ze[2] : "div", Ve = ze ? ze[1] === "/" : !1, He = P;
1558
+ if (Ve) {
1559
+ var Ue = P.indexOf(">");
1560
+ Ue !== -1 && (He = P.slice(Ue + 1));
1561
1561
  }
1562
1562
  return {
1563
1563
  node: {
1564
- type: G.htmlBlock,
1565
- tag: He,
1564
+ type: K.htmlBlock,
1565
+ tag: Be,
1566
1566
  attrs: {},
1567
1567
  children: [],
1568
- a: We,
1569
- text: We,
1568
+ a: He,
1569
+ text: He,
1570
1570
  c: !0,
1571
- b: Ue,
1571
+ b: Ve,
1572
1572
  endPos: N,
1573
- canInterruptParagraph: u === 6
1573
+ e: u === 6
1574
1574
  },
1575
1575
  end: F
1576
1576
  };
1577
1577
  }
1578
- var Ke = st(e, a);
1579
- if (!Ke) return null;
1580
- var qe = Ke.tag, Je = qe.toLowerCase(), Ye = qe.charCodeAt(0), Xe = Ye >= U && Ye <= W;
1581
- if (!Xe && !zt.has(Je) && !$e.has(Je) && !Je.includes("-")) return null;
1582
- if (Ke.isClosing) return {
1578
+ var We = ct(e, a);
1579
+ if (!We) return null;
1580
+ var Ge = We.tag, Ke = Ge.toLowerCase(), qe = Ge.charCodeAt(0), Je = qe >= U && qe <= W;
1581
+ if (!Je && !It.has(Ke) && !Qe.has(Ke) && !Ke.includes("-")) return null;
1582
+ if (We.isClosing) return {
1583
1583
  node: {
1584
- type: G.htmlSelfClosing,
1585
- tag: qe,
1584
+ type: K.htmlSelfClosing,
1585
+ tag: Ge,
1586
1586
  attrs: {},
1587
- endPos: Ke.end,
1587
+ a: e.slice(a, We.end),
1588
1588
  b: !0,
1589
- a: e.slice(a, Ke.end)
1589
+ endPos: We.end
1590
1590
  },
1591
- end: Ke.end
1591
+ end: We.end
1592
1592
  };
1593
- var Ze = Wt(e, Ke.end, qe), et = [];
1594
- if (Ze !== -1) {
1595
- var nt = e.slice(Ke.end, Ut), rt = nt.trim();
1593
+ var Ye = Vt(e, We.end, Ge), Xe = [];
1594
+ if (Ye !== -1) {
1595
+ var $e = e.slice(We.end, Bt), rt = $e.trim();
1596
1596
  if (rt) {
1597
- var it = nt.indexOf("\n\n") !== -1, at = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(rt), ot = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im.test(rt), ct = n.inline, lt = n.inHTML, ut = n.d;
1598
- n.inHTML = !0, n.d = (n.d || 0) + 1, it || at || ot ? (n.inline = !1, et = Cn(nt, n, r)) : (n.inline = !0, et = xn(rt, 0, rt.length, n, r)), n.inline = ct, n.inHTML = lt, n.d = ut;
1597
+ var it = $e.indexOf("\n\n") !== -1, at = et.test(rt), ot = tt.test(rt), st = n.inline, lt = n.inHTML, ut = n.d;
1598
+ n.inHTML = !0, n.d = (n.d || 0) + 1, it || at || ot ? (n.inline = !1, Xe = yn($e, n, r)) : (n.inline = !0, Xe = _n(rt, 0, rt.length, n, r)), n.inline = st, n.inHTML = lt, n.d = ut;
1599
1599
  }
1600
- var dt = bt(e, Ze), Z = e.slice(Ze, dt).trim() ? Ze : $(e, Ze), ft = Xe ? e.slice(a, Ze) : e.slice(a, Z), pt = Xe ? Ze : Z;
1600
+ var dt = _t(e, Ye), ft = e.slice(Ye, dt).trim() ? Ye : $(e, Ye), pt = Je ? e.slice(a, Ye) : e.slice(a, ft), mt = Je ? Ye : ft;
1601
1601
  return {
1602
1602
  node: {
1603
- type: G.htmlBlock,
1604
- tag: qe,
1605
- attrs: Bt(Ke.attrs, qe, r),
1606
- e: Ke.whitespaceBeforeAttrs + Ke.rawAttrs,
1607
- children: et,
1608
- a: ft,
1609
- text: Xe ? nt : ft,
1603
+ type: K.htmlBlock,
1604
+ tag: Ge,
1605
+ attrs: Lt(We.attrs, Ge, r),
1606
+ f: We.whitespaceBeforeAttrs + We.rawAttrs,
1607
+ children: Xe,
1608
+ a: pt,
1609
+ text: Je ? $e : pt,
1610
1610
  c: !0,
1611
1611
  b: !1,
1612
- endPos: pt,
1613
- canInterruptParagraph: !1
1612
+ endPos: mt,
1613
+ e: !1
1614
1614
  },
1615
- end: Z
1615
+ end: ft
1616
1616
  };
1617
1617
  }
1618
- var mt = St(e, Ke.end), ht = mt < e.length ? $(e, mt) : mt, Q = e.slice(Ke.end, mt);
1619
- if (Q.trim()) {
1620
- var { inline: gt, inHTML: _t, d: vt } = n;
1621
- n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, et = Cn(Q, n, r), n.inline = gt, n.inHTML = _t, n.d = vt;
1618
+ var ht = yt(e, We.end), gt = ht < e.length ? $(e, ht) : ht, vt = e.slice(We.end, ht);
1619
+ if (vt.trim()) {
1620
+ var { inline: bt, inHTML: wt, d: Tt } = n;
1621
+ n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, Xe = yn(vt, n, r), n.inline = bt, n.inHTML = wt, n.d = Tt;
1622
1622
  }
1623
- var yt = e.slice(Ke.end, mt);
1623
+ var Et = e.slice(We.end, ht);
1624
1624
  return {
1625
1625
  node: {
1626
- type: G.htmlBlock,
1627
- tag: qe,
1628
- attrs: Bt(Ke.attrs, qe, r),
1629
- e: Ke.whitespaceBeforeAttrs + Ke.rawAttrs,
1630
- children: et,
1631
- a: yt,
1632
- text: Q,
1626
+ type: K.htmlBlock,
1627
+ tag: Ge,
1628
+ attrs: Lt(We.attrs, Ge, r),
1629
+ f: We.whitespaceBeforeAttrs + We.rawAttrs,
1630
+ children: Xe,
1631
+ a: Et,
1632
+ text: vt,
1633
1633
  c: !0,
1634
1634
  b: !1,
1635
- endPos: mt,
1636
- canInterruptParagraph: !1
1635
+ endPos: ht,
1636
+ e: !1
1637
1637
  },
1638
- end: ht
1638
+ end: gt
1639
1639
  };
1640
1640
  }
1641
- function Kt(e, t) {
1642
- if (e.charCodeAt(t) !== T) return 0;
1641
+ function Ut(e, t) {
1642
+ if (e.charCodeAt(t) !== w) return 0;
1643
1643
  var n = t + 1, r = e.length;
1644
- if (e.charCodeAt(n) === O && e.charCodeAt(n + 1) === b && e.charCodeAt(n + 2) === b) return 2;
1645
- if (e.charCodeAt(n) === ne) return 3;
1646
- if (e.charCodeAt(n) === O) {
1644
+ if (e.charCodeAt(n) === D && e.charCodeAt(n + 1) === y && e.charCodeAt(n + 2) === y) return 2;
1645
+ if (e.charCodeAt(n) === z) return 3;
1646
+ if (e.charCodeAt(n) === D) {
1647
1647
  var i = e.charCodeAt(n + 1);
1648
1648
  if (i >= U && i <= W) return 4;
1649
1649
  if (e.slice(n + 1, n + 8) === "[CDATA[") return 5;
1650
1650
  }
1651
- for (var a = e.charCodeAt(n) === B, o = a ? n + 1 : n, s = o; s < r;) {
1651
+ for (var a = e.charCodeAt(n) === re, o = a ? n + 1 : n, s = o; s < r;) {
1652
1652
  var u = e.charCodeAt(s);
1653
- if (u >= U && u <= W || u >= me && u <= he || u >= V && u <= H || u === b) s++;
1653
+ if (u >= U && u <= W || u >= pe && u <= me || u >= V && u <= H || u === y) s++;
1654
1654
  else break;
1655
1655
  }
1656
1656
  if (s === o) return 0;
1657
1657
  var f = e.slice(o, s);
1658
- if ($e.has(f.toLowerCase())) {
1658
+ if (Qe.has(f.toLowerCase())) {
1659
1659
  if (a) return 0;
1660
1660
  var p = e.charCodeAt(s);
1661
1661
  return p === c || p === l || p === g || p === d || s >= r ? 1 : 0;
1662
1662
  }
1663
- if (zt.has(f.toLowerCase())) {
1663
+ if (It.has(f.toLowerCase())) {
1664
1664
  if (a) {
1665
1665
  for (var m = s; m < r && (e.charCodeAt(m) === c || e.charCodeAt(m) === l);) m++;
1666
1666
  return m < r && e.charCodeAt(m) === g ? 6 : 0;
1667
1667
  }
1668
1668
  var h = s < r ? e.charCodeAt(s) : -1;
1669
- return h === c || h === l || h === g || h === d || h === B || h === -1 ? 6 : 0;
1669
+ return h === c || h === l || h === g || h === d || h === re || h === -1 ? 6 : 0;
1670
1670
  }
1671
1671
  if (a) {
1672
1672
  for (var _ = s; _ < r && (e.charCodeAt(_) === c || e.charCodeAt(_) === l);) _++;
1673
1673
  if (_ < r && e.charCodeAt(_) === g) {
1674
- var v = bt(e, t);
1674
+ var v = _t(e, t);
1675
1675
  if (e.slice(_ + 1, v).trim() === "") return 7;
1676
1676
  }
1677
1677
  } else {
1678
- var y = bt(e, t), x = st(e, t);
1679
- if (x && x.end <= y && e.slice(x.end, y).trim() === "") return 7;
1678
+ var b = _t(e, t), x = ct(e, t);
1679
+ if (x && x.end <= b && e.slice(x.end, b).trim() === "") return 7;
1680
1680
  }
1681
1681
  return 0;
1682
1682
  }
1683
- function qt(e, t, n) {
1683
+ function Wt(e, t, n) {
1684
1684
  for (var r = 0, i = e.length; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
1685
1685
  for (; i > r && (e.charCodeAt(i - 1) === c || e.charCodeAt(i - 1) === l);) i--;
1686
- r < i && e.charCodeAt(r) === se && r++, i > r && e.charCodeAt(i - 1) === se && (i - 2 < r || e.charCodeAt(i - 2) !== S) && i--;
1686
+ r < i && e.charCodeAt(r) === B && r++, i > r && e.charCodeAt(i - 1) === B && (i - 2 < r || e.charCodeAt(i - 2) !== x) && i--;
1687
1687
  for (var a = [], o = r, s = !1, u = [], d = r; d < i;) {
1688
1688
  var p = e.charCodeAt(d);
1689
- if (p === S && d + 1 < i) {
1690
- e.charCodeAt(d + 1) === se ? (s || (s = !0, u = []), u.push(e.slice(o, d)), u.push("|"), d += 2, o = d) : d += 2;
1689
+ if (p === x && d + 1 < i) {
1690
+ e.charCodeAt(d + 1) === B ? (s || (s = !0, u = []), u.push(e.slice(o, d)), u.push("|"), d += 2, o = d) : d += 2;
1691
1691
  continue;
1692
1692
  }
1693
1693
  if (p === f) {
@@ -1698,7 +1698,7 @@ function qt(e, t, n) {
1698
1698
  }
1699
1699
  continue;
1700
1700
  }
1701
- if (p === se) {
1701
+ if (p === B) {
1702
1702
  var _ = s ? (u.push(e.slice(o, d)), u.join("")) : e.slice(o, d);
1703
1703
  a.push(_.trim()), d++, o = d, s = !1, u = [];
1704
1704
  continue;
@@ -1708,89 +1708,89 @@ function qt(e, t, n) {
1708
1708
  var v = s ? (u.push(e.slice(o, i)), u.join("")) : e.slice(o, i);
1709
1709
  return a.push(v.trim()), a.map(function(e) {
1710
1710
  var r = e.indexOf("\\|") === -1 ? e : e.replace(/\\\|/g, "|");
1711
- return xn(r, 0, r.length, t, n);
1711
+ return _n(r, 0, r.length, t, n);
1712
1712
  });
1713
1713
  }
1714
- function Jt(e, t, n, r) {
1715
- let i = bt(e, t);
1714
+ function Gt(e, t, n, r) {
1715
+ let i = _t(e, t);
1716
1716
  var a = e.indexOf("|", t);
1717
1717
  if (a < 0 || a >= i) return null;
1718
1718
  let o = $(e, i);
1719
1719
  if (o >= e.length) return null;
1720
- let s = bt(e, o);
1721
- if (!ot(e, o, s)) return null;
1720
+ let s = _t(e, o);
1721
+ if (!st(e, o, s)) return null;
1722
1722
  let u = e.slice(t, i), d = e.slice(o, s);
1723
1723
  for (var m = [], h = 0, v = d.length; h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
1724
- for (h < v && d.charCodeAt(h) === se && h++; h < v;) {
1724
+ for (h < v && d.charCodeAt(h) === B && h++; h < v;) {
1725
1725
  for (; h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
1726
- if (h >= v || d.charCodeAt(h) === se) break;
1727
- var y = d.charCodeAt(h) === A;
1728
- for (y && h++; h < v && d.charCodeAt(h) === b;) h++;
1729
- var x = h < v && d.charCodeAt(h) === A;
1730
- for (x && h++, m.push(y && x ? "center" : x ? "right" : y ? "left" : null); h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
1731
- h < v && d.charCodeAt(h) === se && h++;
1732
- }
1733
- let S = qt(u, n, r);
1734
- if (m.length !== S.length) return null;
1726
+ if (h >= v || d.charCodeAt(h) === B) break;
1727
+ var b = d.charCodeAt(h) === k;
1728
+ for (b && h++; h < v && d.charCodeAt(h) === y;) h++;
1729
+ var x = h < v && d.charCodeAt(h) === k;
1730
+ for (x && h++, m.push(b && x ? "center" : x ? "right" : b ? "left" : null); h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
1731
+ h < v && d.charCodeAt(h) === B && h++;
1732
+ }
1733
+ let w = Wt(u, n, r);
1734
+ if (m.length !== w.length) return null;
1735
1735
  let T = [], E = $(e, s);
1736
1736
  for (; E < e.length;) {
1737
- let t = bt(e, E), i = e.slice(E, t);
1738
- if (Dt(e, E, t)) break;
1739
- if (Et(e, E, t), wt < 4) {
1740
- var D = e.charCodeAt(E + Tt);
1741
- if (D === g || D === _ || (D === b || D === C || D === w) && At(e, E)) break;
1737
+ let t = _t(e, E), i = e.slice(E, t);
1738
+ if (wt(e, E, t)) break;
1739
+ if (Ct(e, E, t), xt < 4) {
1740
+ var D = e.charCodeAt(E + St);
1741
+ if (D === g || D === _ || (D === y || D === S || D === C) && Dt(e, E)) break;
1742
1742
  if (D === f || D === p) {
1743
- for (var O = E + Tt, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
1744
- if (k >= 3) break;
1743
+ for (var O = E + St, A = 0; O < t && e.charCodeAt(O) === D;) A++, O++;
1744
+ if (A >= 3) break;
1745
1745
  }
1746
1746
  }
1747
- T.push(qt(i, n, r)), E = $(e, t);
1747
+ T.push(Wt(i, n, r)), E = $(e, t);
1748
1748
  }
1749
1749
  if ((r.streaming || r.optimizeForStreaming) && T.length === 0) return null;
1750
- for (var j = S.length, M = 0; M < T.length; M++) if (T[M].length < j) for (; T[M].length < j;) T[M].push([]);
1750
+ for (var j = w.length, M = 0; M < T.length; M++) if (T[M].length < j) for (; T[M].length < j;) T[M].push([]);
1751
1751
  else T[M].length > j && (T[M].length = j);
1752
1752
  return {
1753
1753
  node: {
1754
- type: G.table,
1755
- header: S,
1754
+ type: K.table,
1755
+ header: w,
1756
1756
  cells: T,
1757
1757
  align: m
1758
1758
  },
1759
1759
  end: E
1760
1760
  };
1761
1761
  }
1762
- function Yt(e, t, n) {
1763
- if (Et(e, t, bt(e, t)), wt > 3) return null;
1764
- var r = t + Tt;
1762
+ function Kt(e, t, n) {
1763
+ if (Ct(e, t, _t(e, t)), xt > 3) return null;
1764
+ var r = t + St;
1765
1765
  if (e.charCodeAt(r) !== m) return null;
1766
- if (r + 1 < e.length && e.charCodeAt(r + 1) === h) return Xt(e, r, n) || null;
1766
+ if (r + 1 < e.length && e.charCodeAt(r + 1) === h) return qt(e, r, n) || null;
1767
1767
  n.refs ||= {};
1768
- var i = lt(e, r, n.refs);
1768
+ var i = ut(e, r, n.refs);
1769
1769
  return i === null ? null : {
1770
- node: { type: G.refCollection },
1770
+ node: { type: K.refCollection },
1771
1771
  end: i
1772
1772
  };
1773
1773
  }
1774
- function Xt(e, t, n) {
1774
+ function qt(e, t, n) {
1775
1775
  var r = e.length;
1776
1776
  if (e.charCodeAt(t) !== m || t + 1 >= r || e.charCodeAt(t + 1) !== h) return null;
1777
- for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== D;) {
1777
+ for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== E;) {
1778
1778
  if (e.charCodeAt(i) === d) return null;
1779
1779
  i++;
1780
1780
  }
1781
1781
  if (i >= r) return null;
1782
1782
  var o = ("^" + e.slice(a, i)).toLowerCase();
1783
- if (i++, i >= r || e.charCodeAt(i) !== A) return null;
1783
+ if (i++, i >= r || e.charCodeAt(i) !== k) return null;
1784
1784
  for (i++; i < r && (e.charCodeAt(i) === c || e.charCodeAt(i) === l);) i++;
1785
1785
  if (i < r && e.charCodeAt(i) === d) for (i++; i < r && (e.charCodeAt(i) === c || e.charCodeAt(i) === l);) i++;
1786
1786
  var s = e.indexOf("\n", i);
1787
1787
  s < 0 && (s = r);
1788
1788
  for (var u = e.slice(i, s).trim(), f = s < r ? s + 1 : r; f < r;) {
1789
- var p = bt(e, f);
1790
- if (Et(e, f, p), wt >= 2 && !Dt(e, f, p)) u += "\n" + e.slice(f, p), f = $(e, p);
1791
- else if (Dt(e, f, p)) {
1789
+ var p = _t(e, f);
1790
+ if (Ct(e, f, p), xt >= 2 && !wt(e, f, p)) u += "\n" + e.slice(f, p), f = $(e, p);
1791
+ else if (wt(e, f, p)) {
1792
1792
  var g = $(e, p);
1793
- if (g < r && (Et(e, g, bt(e, g)), wt >= 2)) {
1793
+ if (g < r && (Ct(e, g, _t(e, g)), xt >= 2)) {
1794
1794
  u += "\n", f = $(e, p);
1795
1795
  continue;
1796
1796
  }
@@ -1801,23 +1801,23 @@ function Xt(e, t, n) {
1801
1801
  target: u,
1802
1802
  title: void 0
1803
1803
  }), {
1804
- node: { type: G.footnote },
1804
+ node: { type: K.footnote },
1805
1805
  end: f
1806
1806
  };
1807
1807
  }
1808
- function Zt(e, t, n, r) {
1808
+ function Jt(e, t, n, r) {
1809
1809
  let i = t, a = 0, o = 0, s = -1;
1810
1810
  for (; i < e.length;) {
1811
- let t = s >= 0 ? s : bt(e, i);
1812
- if (s = -1, Dt(e, i, t)) break;
1813
- if (Et(e, i, t), wt < 4 && o > 0 && !n.f) {
1814
- let n = e.charCodeAt(i + Tt);
1815
- if (n === x || n === b) {
1816
- let r = i + Tt;
1811
+ let t = s >= 0 ? s : _t(e, i);
1812
+ if (s = -1, wt(e, i, t)) break;
1813
+ if (Ct(e, i, t), xt < 4 && o > 0 && !n.g) {
1814
+ let n = e.charCodeAt(i + St);
1815
+ if (n === b || n === y) {
1816
+ let r = i + St;
1817
1817
  for (; r < t && e.charCodeAt(r) === n;) r++;
1818
1818
  for (; r < t && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
1819
1819
  if (r >= t) {
1820
- a = n === x ? 1 : 2, i = $(e, t);
1820
+ a = n === b ? 1 : 2, i = $(e, t);
1821
1821
  break;
1822
1822
  }
1823
1823
  }
@@ -1825,78 +1825,78 @@ function Zt(e, t, n, r) {
1825
1825
  o = t;
1826
1826
  let u = $(e, t);
1827
1827
  if (u < e.length) {
1828
- if (e.charCodeAt(u) === fe) {
1829
- var m = bt(e, u);
1828
+ if (e.charCodeAt(u) === de) {
1829
+ var m = _t(e, u);
1830
1830
  i = $(e, m), o = m;
1831
1831
  continue;
1832
1832
  }
1833
- let t = bt(e, u);
1834
- if (s = t, Et(e, u, t), wt < 4) {
1835
- let a = e.charCodeAt(u + Tt);
1833
+ let t = _t(e, u);
1834
+ if (s = t, Ct(e, u, t), xt < 4) {
1835
+ let a = e.charCodeAt(u + St);
1836
1836
  if (a === g) {
1837
1837
  i = u;
1838
1838
  break;
1839
1839
  }
1840
- if (a === _ && Ot(e, u, n, r)) {
1840
+ if (a === _ && Tt(e, u, n, r)) {
1841
1841
  i = u;
1842
1842
  break;
1843
1843
  }
1844
1844
  if (a === f || a === p) {
1845
- for (var h = u + Tt, v = 0; h < t && e.charCodeAt(h) === a;) v++, h++;
1845
+ for (var h = u + St, v = 0; h < t && e.charCodeAt(h) === a;) v++, h++;
1846
1846
  if (v >= 3) {
1847
1847
  i = u;
1848
1848
  break;
1849
1849
  }
1850
1850
  }
1851
- if (a === T) {
1852
- var y = u + Tt + 1, S = y < t ? e.charCodeAt(y) : 0, E = S === O || S === ne;
1853
- if (!E && S === B) {
1854
- for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >= U && e.charCodeAt(k) <= W || e.charCodeAt(k) >= me && e.charCodeAt(k) <= he || e.charCodeAt(k) >= V && e.charCodeAt(k) <= H || e.charCodeAt(k) === b);) k++;
1855
- k > D && (E = zt.has(e.slice(D, k).toLowerCase()));
1851
+ if (a === w) {
1852
+ var x = u + St + 1, T = x < t ? e.charCodeAt(x) : 0, E = T === D || T === z;
1853
+ if (!E && T === re) {
1854
+ for (var O = x + 1, k = O; k < t && (e.charCodeAt(k) >= U && e.charCodeAt(k) <= W || e.charCodeAt(k) >= pe && e.charCodeAt(k) <= me || e.charCodeAt(k) >= V && e.charCodeAt(k) <= H || e.charCodeAt(k) === y);) k++;
1855
+ k > O && (E = It.has(e.slice(O, k).toLowerCase()));
1856
1856
  } else if (!E) {
1857
- for (var A = y; A < t && (e.charCodeAt(A) >= U && e.charCodeAt(A) <= W || e.charCodeAt(A) >= me && e.charCodeAt(A) <= he || e.charCodeAt(A) >= V && e.charCodeAt(A) <= H || e.charCodeAt(A) === b);) A++;
1858
- if (A > y) {
1859
- var j = e.slice(y, A).toLowerCase();
1860
- E = zt.has(j) || $e.has(j);
1857
+ for (var A = x; A < t && (e.charCodeAt(A) >= U && e.charCodeAt(A) <= W || e.charCodeAt(A) >= pe && e.charCodeAt(A) <= me || e.charCodeAt(A) >= V && e.charCodeAt(A) <= H || e.charCodeAt(A) === y);) A++;
1858
+ if (A > x) {
1859
+ var j = e.slice(x, A).toLowerCase();
1860
+ E = It.has(j) || Qe.has(j);
1861
1861
  }
1862
1862
  }
1863
- if (E && Gt(e, u, n, r)) {
1863
+ if (E && Ht(e, u, n, r)) {
1864
1864
  i = u;
1865
1865
  break;
1866
1866
  }
1867
1867
  }
1868
- if (a === b || a === C || a === oe) {
1869
- let n = u + Tt + 1;
1870
- if (n < t && (e.charCodeAt(n) === c || e.charCodeAt(n) === l) && xt(e, n, t) < t && !At(e, u)) {
1868
+ if (a === y || a === S || a === oe) {
1869
+ let n = u + St + 1;
1870
+ if (n < t && (e.charCodeAt(n) === c || e.charCodeAt(n) === l) && vt(e, n, t) < t && !Dt(e, u)) {
1871
1871
  i = u;
1872
1872
  break;
1873
1873
  }
1874
1874
  }
1875
1875
  if (a >= V && a <= H) {
1876
- let n = u + Tt;
1876
+ let n = u + St;
1877
1877
  for (; n < t && e.charCodeAt(n) >= V && e.charCodeAt(n) <= H;) n++;
1878
- if (n < t && (e.charCodeAt(n) === re || e.charCodeAt(n) === de) && n - (u + Tt) === 1 && e.charCodeAt(u + Tt) === 49) {
1878
+ if (n < t && (e.charCodeAt(n) === ne || e.charCodeAt(n) === ue) && n - (u + St) === 1 && e.charCodeAt(u + St) === 49) {
1879
1879
  var M = n + 1;
1880
- if (M < t && (e.charCodeAt(M) === c || e.charCodeAt(M) === l) && xt(e, M, t) < t) {
1880
+ if (M < t && (e.charCodeAt(M) === c || e.charCodeAt(M) === l) && vt(e, M, t) < t) {
1881
1881
  i = u;
1882
1882
  break;
1883
1883
  }
1884
1884
  }
1885
1885
  }
1886
- if (a === se) {
1886
+ if (a === B) {
1887
1887
  let n = $(e, t);
1888
- if (n < e.length && ot(e, n, bt(e, n))) {
1888
+ if (n < e.length && st(e, n, _t(e, n))) {
1889
1889
  i = u;
1890
1890
  break;
1891
1891
  }
1892
1892
  }
1893
- if ((a === b || a === C || a === w) && At(e, u)) {
1894
- if (a !== b) {
1893
+ if ((a === y || a === S || a === C) && Dt(e, u)) {
1894
+ if (a !== y) {
1895
1895
  i = u;
1896
1896
  break;
1897
1897
  }
1898
- let n = 0, r = u + Tt;
1899
- for (; r < t && e.charCodeAt(r) === b;) n++, r++;
1898
+ let n = 0, r = u + St;
1899
+ for (; r < t && e.charCodeAt(r) === y;) n++, r++;
1900
1900
  for (; r < t && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
1901
1901
  if (r < t) {
1902
1902
  i = u;
@@ -1910,18 +1910,18 @@ function Zt(e, t, n, r) {
1910
1910
  for (var N = a ? o : i; N > t && (e.charCodeAt(N - 1) === d || e.charCodeAt(N - 1) === u || e.charCodeAt(N - 1) === c || e.charCodeAt(N - 1) === l);) N--;
1911
1911
  for (var P = t; P < N && (e.charCodeAt(P) === c || e.charCodeAt(P) === l);) P++;
1912
1912
  if (P >= N) return null;
1913
- for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === fe) {
1913
+ for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === de) {
1914
1914
  F = !0;
1915
1915
  break;
1916
1916
  }
1917
1917
  var L = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
1918
1918
  if (!L) return null;
1919
- let R = Qt(L, 0, L.length, n, r);
1919
+ let R = Yt(L, 0, L.length, n, r);
1920
1920
  if (a) {
1921
- let e = (r?.slugify || Y)(L);
1921
+ let e = (r?.slugify || Ce)(L);
1922
1922
  return {
1923
1923
  node: {
1924
- type: G.heading,
1924
+ type: K.heading,
1925
1925
  level: a,
1926
1926
  children: R,
1927
1927
  id: e
@@ -1931,19 +1931,19 @@ function Zt(e, t, n, r) {
1931
1931
  }
1932
1932
  return {
1933
1933
  node: {
1934
- type: G.paragraph,
1934
+ type: K.paragraph,
1935
1935
  children: R
1936
1936
  },
1937
1937
  end: i
1938
1938
  };
1939
1939
  }
1940
- function Qt(e, t, n, r, i) {
1940
+ function Yt(e, t, n, r, i) {
1941
1941
  var a = e.indexOf("\n", t);
1942
- if (a < 0 || a >= n) return xn(e, t, n, r, i);
1942
+ if (a < 0 || a >= n) return _n(e, t, n, r, i);
1943
1943
  for (var o = "", s = t, l = t; l < n;) {
1944
1944
  var u = e.charCodeAt(l);
1945
1945
  if (u === f) {
1946
- var p = en(e, l, n);
1946
+ var p = Zt(e, l, n);
1947
1947
  if (p > l) {
1948
1948
  for (var m = !1, h = l; h < p; h++) if (e.charCodeAt(h) === d) {
1949
1949
  m = !0;
@@ -1953,8 +1953,8 @@ function Qt(e, t, n, r, i) {
1953
1953
  continue;
1954
1954
  }
1955
1955
  }
1956
- if (u === T) {
1957
- var g = tn(e, l, n);
1956
+ if (u === w) {
1957
+ var g = Qt(e, l, n);
1958
1958
  if (g > l) {
1959
1959
  l = g;
1960
1960
  continue;
@@ -1962,15 +1962,15 @@ function Qt(e, t, n, r, i) {
1962
1962
  }
1963
1963
  if (u === d) {
1964
1964
  var _ = !1, v = 0;
1965
- if (l > t && e.charCodeAt(l - 1) === S) _ = !0, v = 1;
1965
+ if (l > t && e.charCodeAt(l - 1) === x) _ = !0, v = 1;
1966
1966
  else {
1967
1967
  for (var y = 0, b = l - 1; b >= t && e.charCodeAt(b) === c;) y++, b--;
1968
1968
  y >= 2 && (_ = !0, v = y);
1969
1969
  }
1970
1970
  if (_) o += e.slice(s, l - v), o += "";
1971
1971
  else {
1972
- for (var x = l; x > s && e.charCodeAt(x - 1) === c;) x--;
1973
- o += e.slice(s, x) + "\n";
1972
+ for (var S = l; S > s && e.charCodeAt(S - 1) === c;) S--;
1973
+ o += e.slice(s, S) + "\n";
1974
1974
  }
1975
1975
  for (l++; l < n && e.charCodeAt(l) === c;) l++;
1976
1976
  s = l;
@@ -1978,20 +1978,20 @@ function Qt(e, t, n, r, i) {
1978
1978
  }
1979
1979
  l++;
1980
1980
  }
1981
- return s < n && (o += e.slice(s, n)), xn(o, 0, o.length, r, i);
1981
+ return s < n && (o += e.slice(s, n)), _n(o, 0, o.length, r, i);
1982
1982
  }
1983
- function $t(e, t, n) {
1983
+ function Xt(e, t, n) {
1984
1984
  if (e.charCodeAt(t) !== f) return null;
1985
- let r = Ct(e, t, n, 96), i = t + r;
1985
+ let r = bt(e, t, n, 96), i = t + r;
1986
1986
  for (; i < n;) {
1987
1987
  let a = e.indexOf("`", i);
1988
1988
  if (a < 0 || a >= n) return null;
1989
- let o = Ct(e, a, n, 96);
1989
+ let o = bt(e, a, n, 96);
1990
1990
  if (o === r) {
1991
1991
  let n = e.slice(t + r, a);
1992
1992
  return n = n.replace(/\n/g, " "), n.length > 0 && n[0] === " " && n[n.length - 1] === " " && n.trim().length > 0 && (n = n.slice(1, -1)), {
1993
1993
  node: {
1994
- type: G.codeInline,
1994
+ type: K.codeInline,
1995
1995
  text: n
1996
1996
  },
1997
1997
  end: a + o
@@ -2001,33 +2001,33 @@ function $t(e, t, n) {
2001
2001
  }
2002
2002
  return null;
2003
2003
  }
2004
- function en(e, t, n) {
2004
+ function Zt(e, t, n) {
2005
2005
  if (e.charCodeAt(t) !== f) return t;
2006
- let r = Ct(e, t, n, 96), i = t + r;
2006
+ let r = bt(e, t, n, 96), i = t + r;
2007
2007
  for (; i < n;) {
2008
2008
  let a = e.indexOf("`", i);
2009
2009
  if (a < 0 || a >= n) return t;
2010
- let o = Ct(e, a, n, 96);
2010
+ let o = bt(e, a, n, 96);
2011
2011
  if (o === r) return a + o;
2012
2012
  i = a + o;
2013
2013
  }
2014
2014
  return t;
2015
2015
  }
2016
- function tn(e, t, n) {
2017
- if (e.charCodeAt(t) !== T) return t;
2018
- if (t + 1 < n && e.charCodeAt(t + 1) === B) {
2016
+ function Qt(e, t, n) {
2017
+ if (e.charCodeAt(t) !== w) return t;
2018
+ if (t + 1 < n && e.charCodeAt(t + 1) === re) {
2019
2019
  let r = t + 2;
2020
2020
  for (; r < n && e.charCodeAt(r) !== g;) r++;
2021
2021
  return r < n ? r + 1 : t;
2022
2022
  }
2023
- if (t + 3 < n && e.charCodeAt(t + 1) === O && e.charCodeAt(t + 2) === b && e.charCodeAt(t + 3) === b) {
2023
+ if (t + 3 < n && e.charCodeAt(t + 1) === D && e.charCodeAt(t + 2) === y && e.charCodeAt(t + 3) === y) {
2024
2024
  let n = e.indexOf("-->", t + 4);
2025
2025
  return n >= 0 ? n + 3 : t;
2026
2026
  }
2027
2027
  let r = t + 1, i = r;
2028
2028
  for (; r < n;) {
2029
2029
  let t = e.charCodeAt(r);
2030
- if (t >= U && t <= W || t >= me && t <= he || t >= V && t <= H || t === b) r++;
2030
+ if (t >= U && t <= W || t >= pe && t <= me || t >= V && t <= H || t === y) r++;
2031
2031
  else break;
2032
2032
  }
2033
2033
  if (r === i) return t;
@@ -2038,7 +2038,7 @@ function tn(e, t, n) {
2038
2038
  r++;
2039
2039
  break;
2040
2040
  }
2041
- if (i === B && r + 1 < n && e.charCodeAt(r + 1) === g) {
2041
+ if (i === re && r + 1 < n && e.charCodeAt(r + 1) === g) {
2042
2042
  r += 2, o = !0;
2043
2043
  break;
2044
2044
  }
@@ -2051,11 +2051,11 @@ function tn(e, t, n) {
2051
2051
  if (i === d) return t;
2052
2052
  r++;
2053
2053
  }
2054
- if (o || De(a)) return r;
2054
+ if (o || we(a)) return r;
2055
2055
  let c = 1;
2056
- for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) === B) {
2056
+ for (; r < n && c > 0;) if (e.charCodeAt(r) === w) if (r + 1 < n && e.charCodeAt(r + 1) === re) {
2057
2057
  let t = r + 2, i = t;
2058
- for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= me && e.charCodeAt(i) <= he);) i++;
2058
+ for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= pe && e.charCodeAt(i) <= me);) i++;
2059
2059
  if (e.slice(t, i).toLowerCase() === a) {
2060
2060
  for (; i < n && e.charCodeAt(i) !== g;) i++;
2061
2061
  if (i < n && i++, c--, c === 0) return i;
@@ -2063,86 +2063,85 @@ function tn(e, t, n) {
2063
2063
  r = i;
2064
2064
  } else {
2065
2065
  let t = r + 1, i = t;
2066
- for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= me && e.charCodeAt(i) <= he);) i++;
2066
+ for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= pe && e.charCodeAt(i) <= me);) i++;
2067
2067
  e.slice(t, i).toLowerCase() === a && c++, r++;
2068
2068
  }
2069
2069
  else r++;
2070
2070
  return r;
2071
2071
  }
2072
- function nn(e, t, n, r, i) {
2072
+ function $t(e, t, n, r, i) {
2073
2073
  if (e.charCodeAt(t) !== p || t + 1 >= n || e.charCodeAt(t + 1) !== p) return null;
2074
2074
  let a = t + 2;
2075
2075
  for (; a + 1 < n;) {
2076
2076
  let o = e.charCodeAt(a);
2077
2077
  if (o === f) {
2078
- let t = en(e, a, n);
2078
+ let t = Zt(e, a, n);
2079
2079
  if (t > a) {
2080
2080
  a = t;
2081
2081
  continue;
2082
2082
  }
2083
2083
  }
2084
2084
  if (o === p && e.charCodeAt(a + 1) === p) {
2085
- let n = e.slice(t + 2, a), o = xn(n, 0, n.length, r, i);
2085
+ let n = e.slice(t + 2, a), o = _n(n, 0, n.length, r, i);
2086
2086
  return {
2087
2087
  node: {
2088
- type: G.textFormatted,
2088
+ type: K.textFormatted,
2089
2089
  tag: "del",
2090
2090
  children: o
2091
2091
  },
2092
2092
  end: a + 2
2093
2093
  };
2094
2094
  }
2095
- o === S && a + 1 < n && a++, a++;
2095
+ o === x && a + 1 < n && a++, a++;
2096
2096
  }
2097
2097
  return null;
2098
2098
  }
2099
- function rn(e, t, n, r, i) {
2100
- if (e.charCodeAt(t) !== x || t + 1 >= n || e.charCodeAt(t + 1) !== x) return null;
2099
+ function en(e, t, n, r, i) {
2100
+ if (e.charCodeAt(t) !== b || t + 1 >= n || e.charCodeAt(t + 1) !== b) return null;
2101
2101
  let a = t + 2;
2102
2102
  for (; a + 1 < n;) {
2103
2103
  let o = e.charCodeAt(a);
2104
2104
  if (o === f) {
2105
- let t = en(e, a, n);
2105
+ let t = Zt(e, a, n);
2106
2106
  if (t > a) {
2107
2107
  a = t;
2108
2108
  continue;
2109
2109
  }
2110
2110
  }
2111
- if (o === x && e.charCodeAt(a + 1) === x && a > t + 2) {
2112
- let n = e.slice(t + 2, a), o = xn(n, 0, n.length, r, i);
2111
+ if (o === b && e.charCodeAt(a + 1) === b && a > t + 2) {
2112
+ let n = e.slice(t + 2, a), o = _n(n, 0, n.length, r, i);
2113
2113
  return {
2114
2114
  node: {
2115
- type: G.textFormatted,
2115
+ type: K.textFormatted,
2116
2116
  tag: "mark",
2117
2117
  children: o
2118
2118
  },
2119
2119
  end: a + 2
2120
2120
  };
2121
2121
  }
2122
- o === S && a + 1 < n && a++, a++;
2122
+ o === x && a + 1 < n && a++, a++;
2123
2123
  }
2124
2124
  return null;
2125
2125
  }
2126
- var an = /[\p{P}\p{S}]/u;
2127
- function on(e, t, n) {
2128
- return e < ge ? !!(vt(e) & Z) : an.test(t[n]);
2126
+ function tn(e, t, n) {
2127
+ return e < he ? !!(ht(e) & De) : Le.test(t[n]);
2129
2128
  }
2130
- function sn(e, t, n) {
2131
- return e < ge ? !!(vt(e) & ut) : /\p{Zs}/u.test(t[n]);
2129
+ function nn(e, t, n) {
2130
+ return e < he ? !!(ht(e) & Te) : Re.test(t[n]);
2132
2131
  }
2133
- function cn(e, t, n) {
2132
+ function rn(e, t, n) {
2134
2133
  var r = e.charCodeAt(t);
2135
- if (r !== C && r !== w) return null;
2136
- var i = Ct(e, t, n, r);
2134
+ if (r !== S && r !== C) return null;
2135
+ var i = bt(e, t, n, r);
2137
2136
  if (i === 0) return null;
2138
- var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = sn(a, e, t - 1), c = sn(o, e, t + i), l = t > 0 ? on(a, e, t - 1) : !1, u = t + i < n ? on(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
2139
- return r === C ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
2137
+ var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = nn(a, e, t - 1), c = nn(o, e, t + i), l = t > 0 ? tn(a, e, t - 1) : !1, u = t + i < n ? tn(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
2138
+ return r === S ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
2140
2139
  len: i,
2141
2140
  canOpen: p,
2142
2141
  canClose: m
2143
2142
  };
2144
2143
  }
2145
- function ln(e, t, n, r) {
2144
+ function an(e, t, n, r) {
2146
2145
  if (t.length !== 0) {
2147
2146
  for (var i = [], a = 0; a < 12; a++) i[a] = -1;
2148
2147
  for (var o = 0; o < t.length;) {
@@ -2151,7 +2150,7 @@ function ln(e, t, n, r) {
2151
2150
  o++;
2152
2151
  continue;
2153
2152
  }
2154
- for (var c = (s.ch === C ? 0 : 1) * 6 + s.len % 3 * 2 + (s.canOpen ? 1 : 0), l = i[c] === void 0 ? -1 : i[c], u = -1, d = o - 1; d > l; d--) {
2153
+ for (var c = (s.ch === S ? 0 : 1) * 6 + s.len % 3 * 2 + (s.canOpen ? 1 : 0), l = i[c] === void 0 ? -1 : i[c], u = -1, d = o - 1; d > l; d--) {
2155
2154
  var f = t[d];
2156
2155
  if (!(!f.active || f.ch !== s.ch || !f.canOpen) && !((s.canOpen || f.canClose) && (f.len + s.len) % 3 == 0 && f.len % 3 != 0)) {
2157
2156
  u = d;
@@ -2167,12 +2166,12 @@ function ln(e, t, n, r) {
2167
2166
  var g = e[p.idx], _ = e[s.idx];
2168
2167
  g.text = g.text.slice(0, g.text.length - h), _.text = _.text.slice(h);
2169
2168
  var v = p.idx + 1, y = s.idx, b = e.slice(v, y), x = {
2170
- type: G.textFormatted,
2169
+ type: K.textFormatted,
2171
2170
  tag: m ? "strong" : "em",
2172
2171
  children: b
2173
2172
  };
2174
2173
  e.splice(v, y - v, x);
2175
- for (var S = y - v - 1, w = 0; w < t.length; w++) t[w].idx > p.idx && (t[w].idx -= S);
2174
+ for (var C = y - v - 1, w = 0; w < t.length; w++) t[w].idx > p.idx && (t[w].idx -= C);
2176
2175
  for (var T = u + 1; T < o; T++) t[T].active = !1;
2177
2176
  if (p.len === 0 && (p.active = !1, g.text === "")) {
2178
2177
  e.splice(p.idx, 1);
@@ -2190,10 +2189,10 @@ function ln(e, t, n, r) {
2190
2189
  }
2191
2190
  for (var k = 0, A = 0; A < e.length; A++) {
2192
2191
  var j = e[A];
2193
- if (j.type === G.text) {
2192
+ if (j.type === K.text) {
2194
2193
  var M = j;
2195
2194
  if (M.text === "") continue;
2196
- if (k > 0 && e[k - 1].type === G.text) {
2195
+ if (k > 0 && e[k - 1].type === K.text) {
2197
2196
  e[k - 1].text += M.text;
2198
2197
  continue;
2199
2198
  }
@@ -2203,98 +2202,98 @@ function ln(e, t, n, r) {
2203
2202
  e.length = k;
2204
2203
  }
2205
2204
  }
2206
- function un(e, t, n, r, i) {
2207
- let a = e.charCodeAt(t) === O, o = a ? t + 1 : t;
2205
+ function on(e, t, n, r, i) {
2206
+ let a = e.charCodeAt(t) === D, o = a ? t + 1 : t;
2208
2207
  if (e.charCodeAt(o) !== m) return null;
2209
2208
  var s = e.indexOf("]", o + 1);
2210
2209
  if (s < 0 || s >= n) return null;
2211
2210
  for (var l = o + 1, u = 1; l < n && u > 0;) {
2212
2211
  var p = e.charCodeAt(l);
2213
- if (p === S && l + 1 < n) {
2212
+ if (p === x && l + 1 < n) {
2214
2213
  l += 2;
2215
2214
  continue;
2216
2215
  }
2217
2216
  if (p === f) {
2218
- var h = en(e, l, n);
2217
+ var h = Zt(e, l, n);
2219
2218
  if (h > l) {
2220
2219
  l = h;
2221
2220
  continue;
2222
2221
  }
2223
2222
  }
2224
- if (p === T) {
2225
- var _ = dn(e, l, n);
2223
+ if (p === w) {
2224
+ var _ = sn(e, l, n);
2226
2225
  if (_) {
2227
2226
  l = _.end;
2228
2227
  continue;
2229
2228
  }
2230
- var v = tn(e, l, n);
2229
+ var v = Qt(e, l, n);
2231
2230
  if (v > l) {
2232
2231
  l = v;
2233
2232
  continue;
2234
2233
  }
2235
2234
  }
2236
- p === m ? u++ : p === D && u--, l++;
2235
+ p === m ? u++ : p === E && u--, l++;
2237
2236
  }
2238
2237
  if (u !== 0) return null;
2239
- var y = l - 1, b = e.slice(o + 1, y), x = l < n ? e.charCodeAt(l) : 0, C = !1;
2240
- if (x === ue) {
2241
- var w = !0;
2238
+ var y = l - 1, b = e.slice(o + 1, y), S = l < n ? e.charCodeAt(l) : 0, C = !1;
2239
+ if (S === le) {
2240
+ var T = !0;
2242
2241
  for (l++; l < n && (e.charCodeAt(l) === c || e.charCodeAt(l) === d);) l++;
2243
- var E = "", k = l;
2244
- if (l < n && e.charCodeAt(l) === T) {
2242
+ var O = "", k = l;
2243
+ if (l < n && e.charCodeAt(l) === w) {
2245
2244
  for (l++, k = l; k < n && e.charCodeAt(k) !== g;) {
2246
- if (e.charCodeAt(k) === S && k + 1 < n) {
2245
+ if (e.charCodeAt(k) === x && k + 1 < n) {
2247
2246
  k += 2;
2248
2247
  continue;
2249
2248
  }
2250
2249
  if (e.charCodeAt(k) === d) {
2251
- w = !1;
2250
+ T = !1;
2252
2251
  break;
2253
2252
  }
2254
2253
  k++;
2255
2254
  }
2256
- w && (k >= n || e.charCodeAt(k) !== g) && (w = !1), w && (E = e.slice(l, k), k++);
2257
- } else if (w) {
2255
+ T && (k >= n || e.charCodeAt(k) !== g) && (T = !1), T && (O = e.slice(l, k), k++);
2256
+ } else if (T) {
2258
2257
  for (var A = 0; k < n;) {
2259
2258
  var j = e.charCodeAt(k);
2260
- if (j === S && k + 1 < n) {
2259
+ if (j === x && k + 1 < n) {
2261
2260
  k += 2;
2262
2261
  continue;
2263
2262
  }
2264
- if (j === ue) A++;
2265
- else if (j === de) {
2263
+ if (j === le) A++;
2264
+ else if (j === ue) {
2266
2265
  if (A === 0) break;
2267
2266
  A--;
2268
2267
  } else if (j === c || j === d) break;
2269
2268
  k++;
2270
2269
  }
2271
- E = e.slice(l, k);
2270
+ O = e.slice(l, k);
2272
2271
  }
2273
- if (w) {
2272
+ if (T) {
2274
2273
  for (l = k; l < n && (e.charCodeAt(l) === c || e.charCodeAt(l) === d);) l++;
2275
2274
  var M;
2276
2275
  if (l < n) {
2277
2276
  var N = e.charCodeAt(l);
2278
- if (N === ae || N === ie || N === ue) {
2279
- var P = N === ue ? 41 : N;
2277
+ if (N === ae || N === ie || N === le) {
2278
+ var P = N === le ? 41 : N;
2280
2279
  l++;
2281
- for (var F = l; l < n && e.charCodeAt(l) !== P;) e.charCodeAt(l) === S && l + 1 < n && l++, l++;
2282
- l >= n ? w = !1 : (M = e.slice(F, l), l++);
2280
+ for (var F = l; l < n && e.charCodeAt(l) !== P;) e.charCodeAt(l) === x && l + 1 < n && l++, l++;
2281
+ l >= n ? T = !1 : (M = e.slice(F, l), l++);
2283
2282
  }
2284
2283
  }
2285
- if (w) {
2284
+ if (T) {
2286
2285
  for (; l < n && (e.charCodeAt(l) === c || e.charCodeAt(l) === d);) l++;
2287
- (l >= n || e.charCodeAt(l) !== de) && (w = !1);
2286
+ (l >= n || e.charCodeAt(l) !== ue) && (T = !1);
2288
2287
  }
2289
2288
  }
2290
- if (w) {
2291
- l++, E = yt(E), M !== void 0 && (M = xe(yt(M)));
2292
- var I = (i?.sanitizer || Ce)(E, a ? "img" : "a", a ? "src" : "href") === null ? null : E;
2289
+ if (T) {
2290
+ l++, O = gt(O), M !== void 0 && (M = ve(gt(M)));
2291
+ var I = (i?.sanitizer || be)(O, a ? "img" : "a", a ? "src" : "href") === null ? null : O;
2293
2292
  if (a) {
2294
- var L = gn(xn(b, 0, b.length, r, i));
2293
+ var L = fn(_n(b, 0, b.length, r, i));
2295
2294
  return {
2296
2295
  node: {
2297
- type: G.image,
2296
+ type: K.image,
2298
2297
  target: I,
2299
2298
  alt: L,
2300
2299
  title: M
@@ -2305,12 +2304,12 @@ function un(e, t, n, r, i) {
2305
2304
  var R = r.inAnchor;
2306
2305
  r.inAnchor = !0;
2307
2306
  var ee = R ? [{
2308
- type: G.text,
2307
+ type: K.text,
2309
2308
  text: b
2310
- }] : xn(b, 0, b.length, r, i);
2311
- return r.inAnchor = R, !r.inAnchor && hn(ee) ? null : {
2309
+ }] : _n(b, 0, b.length, r, i);
2310
+ return r.inAnchor = R, !r.inAnchor && dn(ee) ? null : {
2312
2311
  node: {
2313
- type: G.link,
2312
+ type: K.link,
2314
2313
  target: I,
2315
2314
  title: M,
2316
2315
  children: ee
@@ -2321,11 +2320,11 @@ function un(e, t, n, r, i) {
2321
2320
  } else l = y + 1, C = !0;
2322
2321
  }
2323
2322
  var te = "", z = l;
2324
- if (!C && x === m) {
2323
+ if (!C && S === m) {
2325
2324
  var ne = l + 1;
2326
2325
  z = ne;
2327
- for (var re = !1; z < n && e.charCodeAt(z) !== D;) {
2328
- if (e.charCodeAt(z) === S && z + 1 < n) {
2326
+ for (var re = !1; z < n && e.charCodeAt(z) !== E;) {
2327
+ if (e.charCodeAt(z) === x && z + 1 < n) {
2329
2328
  z += 2;
2330
2329
  continue;
2331
2330
  }
@@ -2336,258 +2335,265 @@ function un(e, t, n, r, i) {
2336
2335
  z++;
2337
2336
  }
2338
2337
  if (re || z >= n) return null;
2339
- var B = e.slice(ne, z);
2340
- if (B.trim()) te = _t(B);
2338
+ var oe = e.slice(ne, z);
2339
+ if (oe.trim()) te = mt(oe);
2341
2340
  else {
2342
- if (gt(b)) return null;
2343
- te = _t(b);
2341
+ if (pt(b)) return null;
2342
+ te = mt(b);
2344
2343
  }
2345
2344
  z += 1;
2346
2345
  } else {
2347
- if (gt(b)) return null;
2348
- te = _t(b);
2346
+ if (pt(b)) return null;
2347
+ te = mt(b);
2349
2348
  }
2350
- var oe = r.refs[te];
2351
- if (!oe) return null;
2349
+ var B = r.refs[te];
2350
+ if (!B) return null;
2352
2351
  if (a) return {
2353
2352
  node: {
2354
- type: G.image,
2355
- target: oe.target,
2356
- alt: gn(xn(b, 0, b.length, r, i)),
2357
- title: oe.title
2353
+ type: K.image,
2354
+ target: B.target,
2355
+ alt: fn(_n(b, 0, b.length, r, i)),
2356
+ title: B.title
2358
2357
  },
2359
2358
  end: z
2360
2359
  };
2361
2360
  var se = r.inAnchor;
2362
2361
  r.inAnchor = !0;
2363
2362
  var ee = se ? [{
2364
- type: G.text,
2363
+ type: K.text,
2365
2364
  text: b
2366
- }] : xn(b, 0, b.length, r, i);
2367
- return r.inAnchor = se, !r.inAnchor && hn(ee) ? null : {
2365
+ }] : _n(b, 0, b.length, r, i);
2366
+ return r.inAnchor = se, !r.inAnchor && dn(ee) ? null : {
2368
2367
  node: {
2369
- type: G.link,
2370
- target: oe.target,
2371
- title: oe.title,
2368
+ type: K.link,
2369
+ target: B.target,
2370
+ title: B.title,
2372
2371
  children: ee
2373
2372
  },
2374
2373
  end: z
2375
2374
  };
2376
2375
  }
2377
- function dn(e, t, n) {
2378
- if (e.charCodeAt(t) !== T) return null;
2376
+ function sn(e, t, n) {
2377
+ if (e.charCodeAt(t) !== w) return null;
2379
2378
  for (var r = t + 1; r < n;) {
2380
2379
  var i = e.charCodeAt(r);
2381
2380
  if (i === g) break;
2382
- if (i === c || i === d || i === u || i === T) return null;
2381
+ if (i === c || i === d || i === u || i === w) return null;
2383
2382
  r++;
2384
2383
  }
2385
2384
  if (r >= n || e.charCodeAt(r) !== g) return null;
2386
2385
  var a = e.slice(t + 1, r);
2387
2386
  return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/) ? {
2388
2387
  node: {
2389
- type: G.link,
2388
+ type: K.link,
2390
2389
  target: a,
2390
+ title: void 0,
2391
2391
  children: [{
2392
- type: G.text,
2392
+ type: K.text,
2393
2393
  text: a
2394
2394
  }]
2395
2395
  },
2396
2396
  end: r + 1
2397
2397
  } : a.indexOf("@") !== -1 && /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a) ? {
2398
2398
  node: {
2399
- type: G.link,
2399
+ type: K.link,
2400
2400
  target: "mailto:" + a,
2401
+ title: void 0,
2401
2402
  children: [{
2402
- type: G.text,
2403
+ type: K.text,
2403
2404
  text: a
2404
2405
  }]
2405
2406
  },
2406
2407
  end: r + 1
2407
2408
  } : null;
2408
2409
  }
2409
- function fn(e, t, n, r) {
2410
+ function cn(e, t, n, r) {
2410
2411
  if (e.charCodeAt(t) !== m || t + 1 >= n || e.charCodeAt(t + 1) !== h) return null;
2411
2412
  let i = t + 2;
2412
- for (; i < n && e.charCodeAt(i) !== D && e.charCodeAt(i) !== d;) i++;
2413
- if (i >= n || e.charCodeAt(i) !== D) return null;
2413
+ for (; i < n && e.charCodeAt(i) !== E && e.charCodeAt(i) !== d;) i++;
2414
+ if (i >= n || e.charCodeAt(i) !== E) return null;
2414
2415
  let a = e.slice(t + 2, i);
2415
2416
  return a ? {
2416
2417
  node: {
2417
- type: G.footnoteReference,
2418
- target: "#" + Y(a),
2418
+ type: K.footnoteReference,
2419
+ target: "#" + Ce(a),
2419
2420
  text: a
2420
2421
  },
2421
2422
  end: i + 1
2422
2423
  } : null;
2423
2424
  }
2424
- function pn(e, t, n, r) {
2425
+ function ln(e, t, n, r) {
2425
2426
  if (r.disableBareUrls) return null;
2426
2427
  var i = "", a = !1, o = e.charCodeAt(t);
2427
- if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === L && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) === B && e.charCodeAt(t + 7) === B ? i = "https://" : e.charCodeAt(t + 4) === A && e.charCodeAt(t + 5) === B && e.charCodeAt(t + 6) === B && (i = "http://")) : o === M || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === I && e.charCodeAt(t + 3) === A && e.charCodeAt(t + 4) === B && e.charCodeAt(t + 5) === B && (i = "ftp://") : (o === P || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === re && (i = "www.", a = !0), !i) return null;
2428
+ if (o === M || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === F && (e.charCodeAt(t + 4) === I && e.charCodeAt(t + 5) === k && e.charCodeAt(t + 6) === re && e.charCodeAt(t + 7) === re ? i = "https://" : e.charCodeAt(t + 4) === k && e.charCodeAt(t + 5) === re && e.charCodeAt(t + 6) === re && (i = "http://")) : o === j || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === k && e.charCodeAt(t + 4) === re && e.charCodeAt(t + 5) === re && (i = "ftp://") : (o === N || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === N && e.charCodeAt(t + 2) === N && e.charCodeAt(t + 3) === ne && (i = "www.", a = !0), !i) return null;
2428
2429
  let s = t + i.length;
2429
2430
  for (; s < n;) {
2430
2431
  let t = e.charCodeAt(s);
2431
- if (t === c || t === d || t === l || t === u || t === T || t === g) break;
2432
+ if (t === c || t === d || t === l || t === u || t === w || t === g) break;
2432
2433
  s++;
2433
2434
  }
2434
- for (var f = 0, p = 0, m = t; m < s; m++) {
2435
- var h = e.charCodeAt(m);
2436
- h === ue ? f++ : h === de && p++;
2437
- }
2438
- let _ = s;
2439
- for (; _ > t + i.length;) {
2440
- let n = e.charCodeAt(_ - 1);
2441
- if (n === re || n === te || n === A || n === O || n === ne || n === de) {
2442
- if (n === de) {
2443
- if (f >= p) break;
2444
- p--;
2445
- }
2446
- _--;
2447
- } else if (n === z) {
2448
- for (var v = _ - 2; v > t && (e.charCodeAt(v) >= U && e.charCodeAt(v) <= W || e.charCodeAt(v) >= me && e.charCodeAt(v) <= he || e.charCodeAt(v) >= V && e.charCodeAt(v) <= H);) v--;
2449
- v >= t && e.charCodeAt(v) === k ? _ = v : _--;
2435
+ for (var f = 0, m = 0, h = t; h < s; h++) {
2436
+ var _ = e.charCodeAt(h);
2437
+ _ === le ? f++ : _ === ue && m++;
2438
+ }
2439
+ let v = s;
2440
+ for (; v > t + i.length;) {
2441
+ let n = e.charCodeAt(v - 1);
2442
+ if (n === ne || n === ee || n === k || n === D || n === z || n === ue || n === S || n === C || n === p) {
2443
+ if (n === ue) {
2444
+ if (f >= m) break;
2445
+ m--;
2446
+ }
2447
+ v--;
2448
+ } else if (n === te) {
2449
+ for (var y = v - 2; y > t && (e.charCodeAt(y) >= U && e.charCodeAt(y) <= W || e.charCodeAt(y) >= pe && e.charCodeAt(y) <= me || e.charCodeAt(y) >= V && e.charCodeAt(y) <= H);) y--;
2450
+ y >= t && e.charCodeAt(y) === O ? v = y : v--;
2450
2451
  } else break;
2451
2452
  }
2452
- if (_ <= t + i.length) return null;
2453
- var y = t + (a ? 4 : i.length), b = e.indexOf("/", y);
2454
- if ((b < 0 || b > _) && (b = _), a && e.indexOf(".", y) === -1) return null;
2455
- for (var x = -1, S = -1, C = b - 1; C >= y; C--) if (e.charCodeAt(C) === re) if (x < 0) x = C;
2453
+ if (v <= t + i.length) return null;
2454
+ var b = t + (a ? 4 : i.length), x = e.indexOf("/", b);
2455
+ if ((x < 0 || x > v) && (x = v), a && e.indexOf(".", b) === -1) return null;
2456
+ for (var T = -1, E = -1, A = x - 1; A >= b; A--) if (e.charCodeAt(A) === ne) if (T < 0) T = A;
2456
2457
  else {
2457
- S = C;
2458
+ E = A;
2458
2459
  break;
2459
2460
  }
2460
- for (var C = S >= 0 ? S + 1 : y; C < b; C++) if (e.charCodeAt(C) === w) return null;
2461
- var E = e.slice(t, _), D = a ? "http://" + E : E;
2461
+ for (var A = E >= 0 ? E + 1 : b; A < x; A++) if (e.charCodeAt(A) === C) return null;
2462
+ var L = e.slice(t, v), R = a ? "http://" + L : L;
2462
2463
  return {
2463
2464
  node: {
2464
- type: G.link,
2465
- target: D,
2465
+ type: K.link,
2466
+ target: R,
2467
+ title: void 0,
2466
2468
  children: [{
2467
- type: G.text,
2468
- text: E
2469
+ type: K.text,
2470
+ text: L
2469
2471
  }]
2470
2472
  },
2471
- end: _
2473
+ end: v
2472
2474
  };
2473
2475
  }
2474
- function mn(e, t, n, r) {
2476
+ function un(e, t, n, r) {
2475
2477
  if (r.disableBareUrls) return null;
2476
2478
  for (var i = t, a = i; i < n;) {
2477
2479
  var o = e.charCodeAt(i);
2478
- if (o >= U && o <= W || o >= me && o <= he || o >= V && o <= H || o === re || o === O || o === _ || o === 36 || o === y || o === k || o === ie || o === C || o === oe || o === B || o === x || o === ne || o === h || o === w || o === f || o === ce || o === se || o === le || o === p || o === b) i++;
2480
+ if (o >= U && o <= W || o >= pe && o <= me || o >= V && o <= H || o === ne || o === D || o === _ || o === 36 || o === v || o === O || o === ie || o === S || o === oe || o === re || o === b || o === z || o === h || o === C || o === f || o === se || o === B || o === ce || o === p || o === y) i++;
2479
2481
  else break;
2480
2482
  }
2481
- if (i === a || i >= n || e.charCodeAt(i) !== E) return null;
2483
+ if (i === a || i >= n || e.charCodeAt(i) !== T) return null;
2482
2484
  i++;
2483
2485
  for (var s = i, c = -1, l = i; i < n;) {
2484
2486
  var o = e.charCodeAt(i);
2485
- if (o >= U && o <= W || o >= me && o <= he || o >= V && o <= H) i++;
2486
- else if ((o === b || o === w) && i > s) i++;
2487
- else if (o === re) {
2487
+ if (o >= U && o <= W || o >= pe && o <= me || o >= V && o <= H) i++;
2488
+ else if ((o === y || o === C) && i > s) i++;
2489
+ else if (o === ne) {
2488
2490
  if (i === s) break;
2489
2491
  var u = e.charCodeAt(i - 1);
2490
- if (u === b || u === w || i - l > 63) break;
2492
+ if (u === y || u === C || i - l > 63) break;
2491
2493
  if (i + 1 < n) {
2492
2494
  var d = e.charCodeAt(i + 1);
2493
- if (d >= U && d <= W || d >= me && d <= he || d >= V && d <= H) c = i, l = i + 1, i++;
2495
+ if (d >= U && d <= W || d >= pe && d <= me || d >= V && d <= H) c = i, l = i + 1, i++;
2494
2496
  else break;
2495
2497
  } else break;
2496
2498
  } else break;
2497
2499
  }
2498
2500
  if (i - l > 63 || c < 0) return null;
2499
2501
  var m = e.charCodeAt(i - 1);
2500
- if (!(m >= U && m <= W || m >= me && m <= he || m >= V && m <= H) || i <= c + 1) return null;
2501
- for (var g = -1, v = c - 1; v >= s; v--) if (e.charCodeAt(v) === re) {
2502
- g = v;
2502
+ if (!(m >= U && m <= W || m >= pe && m <= me || m >= V && m <= H) || i <= c + 1) return null;
2503
+ for (var g = -1, x = c - 1; x >= s; x--) if (e.charCodeAt(x) === ne) {
2504
+ g = x;
2503
2505
  break;
2504
2506
  }
2505
- for (var v = g >= 0 ? g + 1 : s; v < i; v++) if (e.charCodeAt(v) === w) return null;
2506
- var S = e.slice(t, i);
2507
+ for (var x = g >= 0 ? g + 1 : s; x < i; x++) if (e.charCodeAt(x) === C) return null;
2508
+ var w = e.slice(t, i);
2507
2509
  return {
2508
2510
  node: {
2509
- type: G.link,
2510
- target: "mailto:" + S,
2511
+ type: K.link,
2512
+ target: "mailto:" + w,
2513
+ title: void 0,
2511
2514
  children: [{
2512
- type: G.text,
2513
- text: S
2515
+ type: K.text,
2516
+ text: w
2514
2517
  }]
2515
2518
  },
2516
2519
  end: i
2517
2520
  };
2518
2521
  }
2519
- function hn(e) {
2520
- for (var t = 0; t < e.length; t++) if (e[t].type === G.link || "children" in e[t] && Array.isArray(e[t].children) && hn(e[t].children)) return !0;
2522
+ function dn(e) {
2523
+ for (var t = 0; t < e.length; t++) if (e[t].type === K.link || "children" in e[t] && Array.isArray(e[t].children) && dn(e[t].children)) return !0;
2521
2524
  return !1;
2522
2525
  }
2523
- function gn(e) {
2526
+ function fn(e) {
2524
2527
  for (var t = "", n = 0; n < e.length; n++) {
2525
2528
  var r = e[n];
2526
- r.type === G.text ? t += r.text : r.type === G.breakLine ? t += " " : r.type === G.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += gn(r.children) : r.type === G.image ? t += r.alt || "" : r.type === G.link && (t += gn(r.children));
2529
+ r.type === K.text ? t += r.text : r.type === K.breakLine ? t += " " : r.type === K.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += fn(r.children) : r.type === K.image ? t += r.alt || "" : r.type === K.link && (t += fn(r.children));
2527
2530
  }
2528
2531
  return t;
2529
2532
  }
2530
- function _n(e) {
2531
- let t = e.includes("&") ? xe(e) : e;
2533
+ function pn(e) {
2534
+ let t = e.includes("&") ? ve(e) : e;
2532
2535
  return {
2533
- type: G.text,
2536
+ type: K.text,
2534
2537
  text: t
2535
2538
  };
2536
2539
  }
2537
- function vn(e, t, n, r, i) {
2538
- if (e.charCodeAt(t) !== T) return null;
2540
+ function mn(e, t, n, r, i) {
2541
+ if (e.charCodeAt(t) !== w) return null;
2539
2542
  var a = t + 1;
2540
2543
  if (a >= n) return null;
2541
2544
  var o = e.charCodeAt(a);
2542
- if (o === O && a + 1 < n && e.charCodeAt(a + 1) === b && a + 2 < n && e.charCodeAt(a + 2) === b) {
2545
+ if (o === D && a + 1 < n && e.charCodeAt(a + 1) === y && a + 2 < n && e.charCodeAt(a + 2) === y) {
2543
2546
  var s = a + 3;
2544
2547
  if (s < n && e.charCodeAt(s) === g) return {
2545
2548
  node: {
2546
- type: G.htmlComment,
2549
+ type: K.htmlComment,
2547
2550
  text: "",
2548
- endsWithGreaterThan: !0
2551
+ h: !0
2549
2552
  },
2550
2553
  end: s + 1
2551
2554
  };
2552
- if (s + 1 < n && e.charCodeAt(s) === b && e.charCodeAt(s + 1) === g) return {
2555
+ if (s + 1 < n && e.charCodeAt(s) === y && e.charCodeAt(s + 1) === g) return {
2553
2556
  node: {
2554
- type: G.htmlComment,
2557
+ type: K.htmlComment,
2555
2558
  text: "-",
2556
- endsWithGreaterThan: !0
2559
+ h: !0
2557
2560
  },
2558
2561
  end: s + 2
2559
2562
  };
2560
2563
  var u = e.indexOf("-->", s);
2561
2564
  return u !== -1 && u <= n - 3 ? {
2562
2565
  node: {
2563
- type: G.htmlComment,
2564
- text: e.slice(t + 4, u)
2566
+ type: K.htmlComment,
2567
+ text: e.slice(t + 4, u),
2568
+ h: !1
2565
2569
  },
2566
2570
  end: u + 3
2567
2571
  } : null;
2568
2572
  }
2569
- if (o === ne) {
2573
+ if (o === z) {
2570
2574
  var f = e.indexOf("?>", a + 1);
2571
2575
  return f !== -1 && f < n ? {
2572
2576
  node: {
2573
- type: G.htmlSelfClosing,
2577
+ type: K.htmlSelfClosing,
2574
2578
  tag: "?",
2575
2579
  attrs: {},
2576
- a: e.slice(t, f + 2)
2580
+ a: e.slice(t, f + 2),
2581
+ b: !1
2577
2582
  },
2578
2583
  end: f + 2
2579
2584
  } : null;
2580
2585
  }
2581
- if (o === O && a + 1 < n) {
2586
+ if (o === D && a + 1 < n) {
2582
2587
  var p = e.charCodeAt(a + 1);
2583
2588
  if (p === m && e.slice(a + 1, a + 8) === "[CDATA[") {
2584
2589
  var h = e.indexOf("]]>", a + 8);
2585
2590
  return h !== -1 && h < n ? {
2586
2591
  node: {
2587
- type: G.htmlSelfClosing,
2592
+ type: K.htmlSelfClosing,
2588
2593
  tag: "![CDATA[",
2589
2594
  attrs: {},
2590
- a: e.slice(t, h + 3)
2595
+ a: e.slice(t, h + 3),
2596
+ b: !1
2591
2597
  },
2592
2598
  end: h + 3
2593
2599
  } : null;
@@ -2596,23 +2602,24 @@ function vn(e, t, n, r, i) {
2596
2602
  var _ = e.indexOf(">", a + 2);
2597
2603
  return _ !== -1 && _ < n ? {
2598
2604
  node: {
2599
- type: G.htmlSelfClosing,
2605
+ type: K.htmlSelfClosing,
2600
2606
  tag: "!" + e.slice(a + 1, _),
2601
2607
  attrs: {},
2602
- a: e.slice(t, _ + 1)
2608
+ a: e.slice(t, _ + 1),
2609
+ b: !1
2603
2610
  },
2604
2611
  end: _ + 1
2605
2612
  } : null;
2606
2613
  }
2607
2614
  }
2608
- if (o === B) {
2615
+ if (o === re) {
2609
2616
  var v = a + 1;
2610
2617
  if (v >= n) return null;
2611
- var y = e.charCodeAt(v);
2612
- if (!(y >= U && y <= W || y >= me && y <= he)) return null;
2618
+ var b = e.charCodeAt(v);
2619
+ if (!(b >= U && b <= W || b >= pe && b <= me)) return null;
2613
2620
  for (v++; v < n;) {
2614
2621
  var x = e.charCodeAt(v);
2615
- if (x >= U && x <= W || x >= me && x <= he || x >= V && x <= H || x === b) v++;
2622
+ if (x >= U && x <= W || x >= pe && x <= me || x >= V && x <= H || x === y) v++;
2616
2623
  else break;
2617
2624
  }
2618
2625
  for (; v < n && (e.charCodeAt(v) === c || e.charCodeAt(v) === l || e.charCodeAt(v) === d);) v++;
@@ -2620,7 +2627,7 @@ function vn(e, t, n, r, i) {
2620
2627
  var S = e.slice(a + 1, v).trim();
2621
2628
  return {
2622
2629
  node: {
2623
- type: G.htmlSelfClosing,
2630
+ type: K.htmlSelfClosing,
2624
2631
  tag: S,
2625
2632
  attrs: {},
2626
2633
  a: e.slice(t, v + 1),
@@ -2631,58 +2638,64 @@ function vn(e, t, n, r, i) {
2631
2638
  }
2632
2639
  return null;
2633
2640
  }
2634
- if (!(o >= U && o <= W || o >= me && o <= he)) return null;
2635
- var C = st(e, t);
2641
+ if (!(o >= U && o <= W || o >= pe && o <= me)) return null;
2642
+ var C = ct(e, t);
2636
2643
  if (!C) return null;
2637
- var w = C.tag, E = w.toLowerCase();
2638
- if (C.selfClosing || De(w)) return {
2644
+ var T = C.tag, E = T.toLowerCase();
2645
+ if (C.selfClosing || we(T)) return {
2639
2646
  node: {
2640
- type: G.htmlSelfClosing,
2641
- tag: w,
2642
- attrs: Bt(C.attrs, w, i),
2643
- a: e.slice(t, C.end)
2647
+ type: K.htmlSelfClosing,
2648
+ tag: T,
2649
+ attrs: Lt(C.attrs, T, i),
2650
+ a: e.slice(t, C.end),
2651
+ b: !1
2644
2652
  },
2645
2653
  end: C.end
2646
2654
  };
2647
- var D = $e.has(E), k = Wt(e.slice(0, n), C.end, w);
2655
+ var O = Qe.has(E), k = Vt(e.slice(0, n), C.end, T);
2648
2656
  if (k === -1) return {
2649
2657
  node: {
2650
- type: G.htmlSelfClosing,
2651
- tag: w,
2652
- attrs: Bt(C.attrs, w, i),
2653
- a: e.slice(t, C.end)
2658
+ type: K.htmlSelfClosing,
2659
+ tag: T,
2660
+ attrs: Lt(C.attrs, T, i),
2661
+ a: e.slice(t, C.end),
2662
+ b: !1
2654
2663
  },
2655
2664
  end: C.end
2656
2665
  };
2657
- var A = Ht(e, "</" + E, k), j = e.slice(C.end, A), M = [];
2658
- if (D) j.trim() && (M = [{
2659
- type: G.text,
2666
+ var A = zt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
2667
+ if (O) j.trim() && (M = [{
2668
+ type: K.text,
2660
2669
  text: j
2661
2670
  }]);
2662
2671
  else {
2663
2672
  var N = j.trim();
2664
2673
  if (N) {
2665
2674
  var { inAnchor: P, inline: F } = r;
2666
- E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = Cn(N, r, i)) : M = xn(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
2675
+ E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = yn(N, r, i)) : M = _n(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
2667
2676
  }
2668
2677
  }
2669
2678
  return {
2670
2679
  node: {
2671
- type: G.htmlBlock,
2672
- tag: w,
2673
- attrs: Bt(C.attrs, w, i),
2674
- e: C.rawAttrs,
2680
+ type: K.htmlBlock,
2681
+ tag: T,
2682
+ attrs: Lt(C.attrs, T, i),
2683
+ f: C.rawAttrs,
2675
2684
  children: M,
2685
+ a: void 0,
2676
2686
  text: j,
2677
- c: !1
2687
+ c: !1,
2688
+ b: !1,
2689
+ endPos: k,
2690
+ e: !1
2678
2691
  },
2679
2692
  end: k
2680
2693
  };
2681
2694
  }
2682
- var yn = 200, bn = 0;
2683
- function xn(e, t, n, r, i) {
2684
- if (bn++, bn > yn) return bn--, [{
2685
- type: G.text,
2695
+ var hn = 200, gn = 0;
2696
+ function _n(e, t, n, r, i) {
2697
+ if (gn++, gn > hn) return gn--, [{
2698
+ type: K.text,
2686
2699
  text: e.slice(t, n)
2687
2700
  }];
2688
2701
  let a = r;
@@ -2691,44 +2704,44 @@ function xn(e, t, n, r, i) {
2691
2704
  for (var n = 1, r = t + 1; r < e.length; r++) {
2692
2705
  var i = e.charCodeAt(r);
2693
2706
  if (i === m) n++;
2694
- else if (i === D && (n--, n === 0)) return r;
2707
+ else if (i === E && (n--, n === 0)) return r;
2695
2708
  }
2696
2709
  return -1;
2697
2710
  }, i = e.slice(t, n), a = i;
2698
- for (var o = 0, s = 0, c = 0, l = 0, u = 0, d = -1, g = -1, _ = -1, v = -1, y = -1, b = 0; b < i.length; b++) {
2699
- var E = i.charCodeAt(b);
2700
- E === C ? b + 1 < i.length && i.charCodeAt(b + 1) === C ? (o++, d = b, b++) : (s++, g = b) : E === w ? b + 1 < i.length && i.charCodeAt(b + 1) === w ? (c++, _ = b, b++) : (l++, v = b) : E === p && b + 1 < i.length && i.charCodeAt(b + 1) === p && (u++, y = b, b++);
2711
+ for (var o = 0, s = 0, c = 0, l = 0, u = 0, d = -1, g = -1, _ = -1, v = -1, y = -1, T = 0; T < i.length; T++) {
2712
+ var O = i.charCodeAt(T);
2713
+ O === S ? T + 1 < i.length && i.charCodeAt(T + 1) === S ? (o++, d = T, T++) : (s++, g = T) : O === C ? T + 1 < i.length && i.charCodeAt(T + 1) === C ? (c++, _ = T, T++) : (l++, v = T) : O === p && T + 1 < i.length && i.charCodeAt(T + 1) === p && (u++, y = T, T++);
2701
2714
  }
2702
2715
  var k = [];
2703
2716
  u % 2 == 1 && y >= 0 && k.push([y, 2]), c % 2 == 1 && _ >= 0 && k.push([_, 2]), l % 2 == 1 && v >= 0 && k.push([v, 1]), o % 2 == 1 && d >= 0 && k.push([d, 2]), s % 2 == 1 && g >= 0 && k.push([g, 1]), k.sort(function(e, t) {
2704
2717
  return t[0] - e[0];
2705
2718
  });
2706
2719
  for (var A = 0; A < k.length; A++) {
2707
- var j = k[A][0], F = k[A][1];
2708
- i = i.slice(0, j) + i.slice(j + F);
2720
+ var P = k[A][0], F = k[A][1];
2721
+ i = i.slice(0, P) + i.slice(P + F);
2709
2722
  }
2710
- let h = 0, x = -1;
2711
- for (let e = 0; e < i.length; e++) i.charCodeAt(e) === f && (h++, x = e);
2712
- if (h % 2 == 1 && x !== -1) {
2723
+ let h = 0, b = -1;
2724
+ for (let e = 0; e < i.length; e++) i.charCodeAt(e) === f && (h++, b = e);
2725
+ if (h % 2 == 1 && b !== -1) {
2713
2726
  let e = !1, t = -1, n = 0;
2714
2727
  for (; n < i.length;) i.charCodeAt(n) === f && (e ? (e = !1, t = -1) : (t = n, e = !0)), n++;
2715
2728
  e && t !== -1 && (i = i.slice(0, t));
2716
2729
  }
2717
2730
  for (var I = !0; I;) {
2718
2731
  I = !1;
2719
- for (var L = -1, R = -1, ee = -1, te = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === m && (z === 0 || i.charCodeAt(z - 1) !== S)) {
2720
- var ne = z > 0 && i.charCodeAt(z - 1) === O, re = ne ? z - 1 : z, B = r(i, z);
2721
- if (B === -1) L = re, te = ne, R = z + 1, ee = i.length;
2732
+ for (var L = -1, R = -1, ee = -1, te = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === m && (z === 0 || i.charCodeAt(z - 1) !== x)) {
2733
+ var ne = z > 0 && i.charCodeAt(z - 1) === D, re = ne ? z - 1 : z, ie = r(i, z);
2734
+ if (ie === -1) L = re, te = ne, R = z + 1, ee = i.length;
2722
2735
  else {
2723
- var ie = B + 1;
2724
- if (ie >= i.length) L = re, te = ne, R = z + 1, ee = B;
2725
- else if (i.charCodeAt(ie) === ue) {
2726
- var ae = i.indexOf(")", ie + 1);
2727
- ae === -1 ? (L = re, te = ne, R = z + 1, ee = B, z = i.length) : z = ae;
2728
- } else if (i.charCodeAt(ie) === m) {
2729
- var oe = i.indexOf("]", ie + 1);
2730
- oe === -1 ? (L = re, te = ne, R = z + 1, ee = B, z = i.length) : z = oe;
2731
- } else z = B;
2736
+ var ae = ie + 1;
2737
+ if (ae >= i.length) L = re, te = ne, R = z + 1, ee = ie;
2738
+ else if (i.charCodeAt(ae) === le) {
2739
+ var oe = i.indexOf(")", ae + 1);
2740
+ oe === -1 ? (L = re, te = ne, R = z + 1, ee = ie, z = i.length) : z = oe;
2741
+ } else if (i.charCodeAt(ae) === m) {
2742
+ var B = i.indexOf("]", ae + 1);
2743
+ B === -1 ? (L = re, te = ne, R = z + 1, ee = ie, z = i.length) : z = B;
2744
+ } else z = ie;
2732
2745
  }
2733
2746
  }
2734
2747
  if (L >= 0) {
@@ -2736,203 +2749,203 @@ function xn(e, t, n, r, i) {
2736
2749
  i = i.slice(0, L) + se, I = !0;
2737
2750
  }
2738
2751
  }
2739
- let T = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
2740
- if (T && T.index !== void 0) {
2741
- for (var ce = !1, le = 0, de = 0; de < T.index; de++) i.charCodeAt(de) === f && le++;
2742
- if (ce = le % 2 == 1, !ce) {
2743
- let e = T[1];
2744
- Vt(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
2752
+ let w = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
2753
+ if (w && w.index !== void 0) {
2754
+ for (var ce = !1, ue = 0, de = 0; de < w.index; de++) i.charCodeAt(de) === f && ue++;
2755
+ if (ce = ue % 2 == 1, !ce) {
2756
+ let e = w[1];
2757
+ Rt(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
2745
2758
  }
2746
2759
  }
2747
2760
  i !== a && (e = e.slice(0, t) + i, n = t + i.length);
2748
2761
  }
2749
- let fe = [];
2750
- var _e = [];
2751
- let ve = t;
2752
- var K = i.disableAutoLink || i.disableBareUrls || a.inAnchor ? -1 : e.indexOf("@", t);
2753
- for (K >= n && (K = -1); t < n;) {
2762
+ let G = [];
2763
+ var ge = [];
2764
+ let _e = t;
2765
+ var q = i.disableAutoLink || i.disableBareUrls || a.inAnchor ? -1 : e.indexOf("@", t);
2766
+ for (q >= n && (q = -1); t < n;) {
2754
2767
  let r = e.charCodeAt(t), o = null;
2755
2768
  if (r === f) {
2756
- if (o = $t(e, t, n), !o) {
2757
- var ye = Ct(e, t, n, f);
2758
- t += ye - 1;
2759
- }
2760
- } else if (r === C || r === w) {
2761
- var q = cn(e, t, n);
2762
- if (q) {
2763
- if (q.canOpen || q.canClose) {
2764
- t > ve && fe.push(_n(e.slice(ve, t)));
2765
- var be = _n(e.slice(t, t + q.len));
2766
- _e.push({
2767
- idx: fe.length,
2769
+ if (o = Xt(e, t, n), !o) {
2770
+ var J = bt(e, t, n, f);
2771
+ t += J - 1;
2772
+ }
2773
+ } else if (r === S || r === C) {
2774
+ var Y = rn(e, t, n);
2775
+ if (Y) {
2776
+ if (Y.canOpen || Y.canClose) {
2777
+ t > _e && G.push(pn(e.slice(_e, t)));
2778
+ var ve = pn(e.slice(t, t + Y.len));
2779
+ ge.push({
2780
+ idx: G.length,
2768
2781
  ch: r,
2769
- len: q.len,
2770
- canOpen: q.canOpen,
2771
- canClose: q.canClose,
2782
+ len: Y.len,
2783
+ canOpen: Y.canOpen,
2784
+ canClose: Y.canClose,
2772
2785
  active: !0
2773
- }), fe.push(be), t += q.len, ve = t;
2786
+ }), G.push(ve), t += Y.len, _e = t;
2774
2787
  continue;
2775
2788
  }
2776
- t += q.len - 1;
2789
+ t += Y.len - 1;
2777
2790
  }
2778
- } else r === p ? o = nn(e, t, n, a, i) : r === x ? o = rn(e, t, n, a, i) : r === m ? (t + 1 < n && e.charCodeAt(t + 1) === h && (o = fn(e, t, n, a)), o ||= un(e, t, n, a, i)) : r === O && t + 1 < n && e.charCodeAt(t + 1) === m ? o = un(e, t, n, a, i) : r === T ? (o = dn(e, t, n), !o && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (o = vn(e, t, n, a, i))) : (r === N || r === P || r === M) && !a.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== T) && (o = pn(e, t, n, i));
2779
- if (!o && K >= 0 && K - t <= 64 && !a.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= U && r <= W || r >= me && r <= he || r >= V && r <= H) && (o = mn(e, t, n, i), !o && t >= K && (K = e.indexOf("@", t + 1), K >= n && (K = -1))), r === pe) {
2780
- t > ve && fe.push(_n(e.slice(ve, t))), fe.push({ type: G.breakLine }), t++, ve = t;
2791
+ } else r === p ? o = $t(e, t, n, a, i) : r === b ? o = en(e, t, n, a, i) : r === m ? (t + 1 < n && e.charCodeAt(t + 1) === h && (o = cn(e, t, n, a)), o ||= on(e, t, n, a, i)) : r === D && t + 1 < n && e.charCodeAt(t + 1) === m ? o = on(e, t, n, a, i) : r === w ? (o = sn(e, t, n), !o && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (o = mn(e, t, n, a, i))) : (r === M || r === N || r === j) && !a.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== w) && (o = ln(e, t, n, i));
2792
+ if (!o && q >= 0 && q - t <= 64 && !a.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= U && r <= W || r >= pe && r <= me || r >= V && r <= H) && (o = un(e, t, n, i), !o && t >= q && (q = e.indexOf("@", t + 1), q >= n && (q = -1))), r === fe) {
2793
+ t > _e && G.push(pn(e.slice(_e, t))), G.push({ type: K.breakLine }), t++, _e = t;
2781
2794
  continue;
2782
2795
  }
2783
- if (o) t > ve && fe.push(_n(e.slice(ve, t))), fe.push(o.node), t = o.end, ve = t;
2796
+ if (o) t > _e && G.push(pn(e.slice(_e, t))), G.push(o.node), t = o.end, _e = t;
2784
2797
  else {
2785
- if (r === S && t + 1 < n && vt(e.charCodeAt(t + 1)) & Z) {
2786
- t > ve && fe.push(_n(e.slice(ve, t))), fe.push(_n(e[t + 1])), t += 2, ve = t;
2798
+ if (r === x && t + 1 < n && ht(e.charCodeAt(t + 1)) & De) {
2799
+ t > _e && G.push(pn(e.slice(_e, t))), G.push(pn(e[t + 1])), t += 2, _e = t;
2787
2800
  continue;
2788
2801
  }
2789
- if (t++, K < 0 || K - t > 64) for (; t < n;) {
2790
- var xe = e.charCodeAt(t);
2791
- if (xe < ge && !nt[xe]) t++;
2802
+ if (t++, q < 0 || q - t > 64) for (; t < n;) {
2803
+ var ye = e.charCodeAt(t);
2804
+ if (ye < he && !rt[ye]) t++;
2792
2805
  else break;
2793
2806
  }
2794
2807
  }
2795
2808
  }
2796
- if (n > ve) {
2797
- let t = e.slice(ve, n);
2798
- (i.streaming || i.optimizeForStreaming) && (t = t.replace(/\*\*([^*]+)$/, "$1"), t.match(/\*[^*]+$/) && (t = t.replace(/\*([^*]+)$/, "$1")), t = t.replace(/__([^_]+)$/, "$1"), t.match(/_[^_]+$/) && (t = t.replace(/_([^_]+)$/, "$1")), t = t.replace(/~~([^~]+)$/, "$1"), t = t.replace(/\[([^\]]+)$/, "$1"), t = t.replace(/\[([^\]]+)\]\([^)]*$/, "$1")), t && fe.push(_n(t));
2809
+ if (n > _e) {
2810
+ let t = e.slice(_e, n);
2811
+ t && G.push(pn(t));
2799
2812
  }
2800
- return _e.length > 0 && ln(fe, _e, r, i), bn--, fe;
2813
+ return ge.length > 0 && an(G, ge, r, i), gn--, G;
2801
2814
  }
2802
- var Sn = 500;
2803
- function Cn(e, t, n) {
2804
- var r = t.g || 0;
2805
- if (r > Sn) return [{
2806
- type: G.text,
2815
+ var vn = 500;
2816
+ function yn(e, t, n) {
2817
+ var r = t.i || 0;
2818
+ if (r > vn) return [{
2819
+ type: K.text,
2807
2820
  text: e
2808
2821
  }];
2809
- if (t.g = r + 1, (n.streaming || n.optimizeForStreaming) && !t.h) {
2822
+ if (t.i = r + 1, (n.streaming || n.optimizeForStreaming) && !t.j) {
2810
2823
  var i = e.length;
2811
2824
  i > 0 && e.charCodeAt(i - 1) === d && i--;
2812
2825
  for (var a = i; a > 0 && e.charCodeAt(a - 1) !== d;) a--;
2813
- if (a > 0 && e.charCodeAt(a) === se) {
2826
+ if (a > 0 && e.charCodeAt(a) === B) {
2814
2827
  for (var o = !0, s = a; s < i; s++) {
2815
2828
  var u = e.charCodeAt(s);
2816
- if (u !== c && u !== l && u !== b && u !== A && u !== se) {
2829
+ if (u !== c && u !== l && u !== y && u !== k && u !== B) {
2817
2830
  o = !1;
2818
2831
  break;
2819
2832
  }
2820
2833
  }
2821
2834
  if (o) {
2822
2835
  for (var h = a - 1; h > 0 && e.charCodeAt(h - 1) !== d;) h--;
2823
- e.charCodeAt(h) === se && (e = e.slice(0, h).trimEnd());
2836
+ e.charCodeAt(h) === B && (e = e.slice(0, h).trimEnd());
2824
2837
  }
2825
2838
  }
2826
- var v = e.trim(), y = v.lastIndexOf("\n"), x = y === -1 ? v : v.slice(y + 1);
2827
- if (x.length > 0 && x.charCodeAt(0) === se) {
2828
- for (var S = !1, E = !1, D = 1; D < x.length; D++) {
2839
+ var v = e.trim(), b = v.lastIndexOf("\n"), x = b === -1 ? v : v.slice(b + 1);
2840
+ if (x.length > 0 && x.charCodeAt(0) === B) {
2841
+ for (var T = !1, E = !1, D = 1; D < x.length; D++) {
2829
2842
  var O = x.charCodeAt(D);
2830
- O === se && (S = !0), O === b && (E = !0);
2843
+ O === B && (T = !0), O === y && (E = !0);
2831
2844
  }
2832
- S && E && (e = y === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
2845
+ T && E && (e = b === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
2833
2846
  }
2834
- for (var k = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === T) {
2847
+ for (var A = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === w) {
2835
2848
  var P = N + 1 < e.length ? e.charCodeAt(N + 1) : 0;
2836
- if (P >= U && P <= W || P >= me && P <= he) {
2849
+ if (P >= U && P <= W || P >= pe && P <= me) {
2837
2850
  for (var F = N + 2; F < e.length;) {
2838
2851
  var I = e.charCodeAt(F);
2839
- if (I >= U && I <= W || I >= me && I <= he || I >= V && I <= H) F++;
2852
+ if (I >= U && I <= W || I >= pe && I <= me || I >= V && I <= H) F++;
2840
2853
  else break;
2841
2854
  }
2842
2855
  for (var L = F; L < e.length && e.charCodeAt(L) !== g;) L++;
2843
2856
  if (L < e.length) {
2844
- for (var R = !1, ee = L + 1; ee < e.length; ee++) if (e.charCodeAt(ee) === T) {
2857
+ for (var R = !1, ee = L + 1; ee < e.length; ee++) if (e.charCodeAt(ee) === w) {
2845
2858
  R = !0;
2846
2859
  break;
2847
2860
  }
2848
- R || (k = N, j = F, M = L + 1);
2861
+ R || (A = N, j = F, M = L + 1);
2849
2862
  }
2850
2863
  }
2851
2864
  break;
2852
2865
  }
2853
- if (k >= 0) {
2854
- for (var te = 0, z = 0; z < k; z++) e.charCodeAt(z) === f && te++;
2866
+ if (A >= 0) {
2867
+ for (var te = 0, z = 0; z < A; z++) e.charCodeAt(z) === f && te++;
2855
2868
  if (te % 2 == 0) {
2856
- var ne = e.slice(k + 1, j);
2857
- Vt(e, "</" + ne, 0) === -1 && (e = e.slice(0, k) + e.slice(M));
2858
- }
2859
- }
2860
- for (var B = e.length; B > 0 && e.charCodeAt(B - 1) === d;) B--;
2861
- if (B > 0) {
2862
- for (var ie = B; ie > 0 && e.charCodeAt(ie - 1) !== d;) ie--;
2863
- for (var ae = ie, ce = 0; ae < B && e.charCodeAt(ae) === c && ce < 3;) ae++, ce++;
2864
- if (ie > 0 && ae < B && kt(e, ae, B)) {
2865
- for (var le = ie - 1, ue = le; ue > 0 && e.charCodeAt(ue - 1) !== d;) ue--;
2866
- Dt(e, ue, le) || (e = e.slice(0, ie).trimEnd());
2867
- }
2868
- }
2869
- var pe = e.length;
2870
- if (pe > 0) {
2871
- for (var ge = e.lastIndexOf("\n"), _e = ge === -1 ? 0 : ge + 1, K = pe, ye = _e, q = 0; ye < K && e.charCodeAt(ye) === c && q < 3;) ye++, q++;
2872
- if (ye < K) {
2873
- var be = e.charCodeAt(ye), xe = !1;
2874
- if (be === C || be === b || be === oe) {
2875
- var Se = ye + 1;
2876
- if (Se >= K || e.charCodeAt(Se) === c || e.charCodeAt(Se) === l) {
2877
- for (var Ce = Se; Ce < K && (e.charCodeAt(Ce) === c || e.charCodeAt(Ce) === l);) Ce++;
2878
- Ce >= K && (xe = !0);
2869
+ var re = e.slice(A + 1, j);
2870
+ Rt(e, "</" + re, 0) === -1 && (e = e.slice(0, A) + e.slice(M));
2871
+ }
2872
+ }
2873
+ for (var ie = e.length; ie > 0 && e.charCodeAt(ie - 1) === d;) ie--;
2874
+ if (ie > 0) {
2875
+ for (var ae = ie; ae > 0 && e.charCodeAt(ae - 1) !== d;) ae--;
2876
+ for (var se = ae, ce = 0; se < ie && e.charCodeAt(se) === c && ce < 3;) se++, ce++;
2877
+ if (ae > 0 && se < ie && Et(e, se, ie)) {
2878
+ for (var le = ae - 1, fe = le; fe > 0 && e.charCodeAt(fe - 1) !== d;) fe--;
2879
+ wt(e, fe, le) || (e = e.slice(0, ae).trimEnd());
2880
+ }
2881
+ }
2882
+ var he = e.length;
2883
+ if (he > 0) {
2884
+ for (var G = e.lastIndexOf("\n"), _e = G === -1 ? 0 : G + 1, q = he, J = _e, Y = 0; J < q && e.charCodeAt(J) === c && Y < 3;) J++, Y++;
2885
+ if (J < q) {
2886
+ var ve = e.charCodeAt(J), ye = !1;
2887
+ if (ve === S || ve === y || ve === oe) {
2888
+ var be = J + 1;
2889
+ if (be >= q || e.charCodeAt(be) === c || e.charCodeAt(be) === l) {
2890
+ for (var xe = be; xe < q && (e.charCodeAt(xe) === c || e.charCodeAt(xe) === l);) xe++;
2891
+ xe >= q && (ye = !0);
2879
2892
  }
2880
- } else if (be >= V && be <= H) {
2881
- for (var we = ye; we < K && e.charCodeAt(we) >= V && e.charCodeAt(we) <= H;) we++;
2882
- if (we < K && (e.charCodeAt(we) === re || e.charCodeAt(we) === de)) {
2883
- var Te = we + 1;
2884
- if (Te >= K || e.charCodeAt(Te) === c || e.charCodeAt(Te) === l) {
2885
- for (var J = Te; J < K && (e.charCodeAt(J) === c || e.charCodeAt(J) === l);) J++;
2886
- J >= K && (xe = !0);
2893
+ } else if (ve >= V && ve <= H) {
2894
+ for (var Se = J; Se < q && e.charCodeAt(Se) >= V && e.charCodeAt(Se) <= H;) Se++;
2895
+ if (Se < q && (e.charCodeAt(Se) === ne || e.charCodeAt(Se) === ue)) {
2896
+ var X = Se + 1;
2897
+ if (X >= q || e.charCodeAt(X) === c || e.charCodeAt(X) === l) {
2898
+ for (var Ce = X; Ce < q && (e.charCodeAt(Ce) === c || e.charCodeAt(Ce) === l);) Ce++;
2899
+ Ce >= q && (ye = !0);
2887
2900
  }
2888
2901
  }
2889
2902
  }
2890
- xe && (e = e.slice(0, _e).trimEnd());
2903
+ ye && (e = e.slice(0, _e).trimEnd());
2891
2904
  }
2892
2905
  }
2893
2906
  }
2894
- if (t.inline) return xn(e, 0, e.length, t, n);
2895
- let Y = [], X = 0, Ee = e.length;
2896
- if (X === 0 && e.startsWith("---")) {
2897
- let t = ve(e);
2907
+ if (t.inline) return _n(e, 0, e.length, t, n);
2908
+ let Z = [], Q = 0, we = e.length;
2909
+ if (Q === 0 && e.startsWith("---")) {
2910
+ let t = ge(e);
2898
2911
  if (t && t.hasValidYaml) {
2899
2912
  if (n.preserveFrontmatter !== !1) {
2900
2913
  let n = e.slice(0, t.endPos).trimEnd();
2901
- Y.push({
2902
- type: G.frontmatter,
2914
+ Z.push({
2915
+ type: K.frontmatter,
2903
2916
  text: n
2904
2917
  });
2905
2918
  }
2906
- X = t.endPos;
2919
+ Q = t.endPos;
2907
2920
  }
2908
2921
  }
2909
- for (; X < Ee;) {
2910
- for (var De = e.indexOf("\n", X), Oe = De < 0 ? Ee : De; X < Ee && Dt(e, X, Oe);) X = Oe < Ee ? Oe + 1 : Oe, X < Ee && (De = e.indexOf("\n", X), Oe = De < 0 ? Ee : De);
2911
- if (X >= Ee) break;
2912
- e.charCodeAt(X), Et(e, X, Oe);
2922
+ for (; Q < we;) {
2923
+ for (var Te = e.indexOf("\n", Q), Ee = Te < 0 ? we : Te; Q < we && wt(e, Q, Ee);) Q = Ee < we ? Ee + 1 : Ee, Q < we && (Te = e.indexOf("\n", Q), Ee = Te < 0 ? we : Te);
2924
+ if (Q >= we) break;
2925
+ e.charCodeAt(Q), Ct(e, Q, Ee);
2913
2926
  let r = null;
2914
- if (e.charCodeAt(X) !== fe && wt >= 4 && !t.inHTML) r = Mt(e, X);
2915
- else if (e.charCodeAt(X) !== fe) {
2916
- let i = X + Tt, a = e.charCodeAt(i);
2917
- a === _ ? r = Ot(e, X, t, n) : a === g ? r = Nt(e, X, t, n) : a === f || a === p ? r = jt(e, X, t) : a === b || a === C || a === w ? (r = At(e, X), !r && (r = Rt(e, X, t, n))) : a === oe || a >= V && a <= H ? r = Rt(e, X, t, n) : a === T ? r = Gt(e, X, t, n) : a === se ? r = Jt(e, X, t, n) : a === m && (r = Yt(e, X, t));
2927
+ if (e.charCodeAt(Q) !== de && xt >= 4 && !t.inHTML) r = kt(e, Q);
2928
+ else if (e.charCodeAt(Q) !== de) {
2929
+ let i = Q + St, a = e.charCodeAt(i);
2930
+ a === _ ? r = Tt(e, Q, t, n) : a === g ? r = At(e, Q, t, n) : a === f || a === p ? r = Ot(e, Q, t) : a === y || a === S || a === C ? (r = Dt(e, Q), !r && (r = Ft(e, Q, t, n))) : a === oe || a >= V && a <= H ? r = Ft(e, Q, t, n) : a === w ? r = Ht(e, Q, t, n) : a === B ? r = Gt(e, Q, t, n) : a === m && (r = Kt(e, Q, t));
2918
2931
  }
2919
2932
  if (!r) {
2920
- for (var ke = !1, Ae = X; Ae < Oe; Ae++) if (e.charCodeAt(Ae) === se) {
2921
- ke = !0;
2933
+ for (var De = !1, Oe = Q; Oe < Ee; Oe++) if (e.charCodeAt(Oe) === B) {
2934
+ De = !0;
2922
2935
  break;
2923
2936
  }
2924
- ke && (r = Jt(e, X, t, n));
2937
+ De && (r = Gt(e, Q, t, n));
2925
2938
  }
2926
- if (r ||= Zt(e, X, t, n), r) r.node.type !== G.refCollection && Y.push(r.node), X = r.end;
2939
+ if (r ||= Jt(e, Q, t, n), r) r.node.type !== K.refCollection && Z.push(r.node), Q = r.end;
2927
2940
  else {
2928
- var je = e.indexOf("\n", X);
2929
- X = je < 0 ? Ee : je + 1;
2941
+ var ke = e.indexOf("\n", Q);
2942
+ Q = ke < 0 ? we : ke + 1;
2930
2943
  }
2931
2944
  }
2932
- return t.g = r, Y;
2945
+ return t.i = r, Z;
2933
2946
  }
2934
- function wn(e, t, n, r) {
2935
- var i = st(e, t);
2947
+ function bn(e, t, n, r) {
2948
+ var i = ct(e, t);
2936
2949
  return i ? {
2937
2950
  tagName: i.tag,
2938
2951
  tagLower: i.tag.toLowerCase(),
@@ -2945,73 +2958,76 @@ function wn(e, t, n, r) {
2945
2958
  endPos: i.end
2946
2959
  } : null;
2947
2960
  }
2948
- function Tn(e, t, n) {
2949
- bn = 0, e = Ve(e), !t.refs && (t.refs = {}), t.h = ct(e, t.refs, n);
2950
- let r = Cn(e, t, n);
2961
+ function xn(e, t, n) {
2962
+ gn = 0, e = Be(e), !t.refs && (t.refs = {}), t.j = lt(e, t.refs, n);
2963
+ let r = yn(e, t, n);
2951
2964
  return t.refs && Object.keys(t.refs).length > 0 ? [{
2952
- type: G.refCollection,
2965
+ type: K.refCollection,
2953
2966
  refs: t.refs
2954
2967
  }, ...r] : r;
2955
2968
  }
2956
- var En = /^\n+/, Dn;
2969
+ var Sn = /^\n+/, Cn;
2957
2970
  try {
2958
- Dn = t.createElement("div").$$typeof;
2971
+ Cn = t.createElement("div").$$typeof;
2959
2972
  } catch {
2960
- Dn = Symbol.for("react.transitional.element");
2973
+ Cn = Symbol.for("react.transitional.element");
2961
2974
  }
2962
- function On(e, t, n) {
2975
+ function wn(e, t, n) {
2963
2976
  return {
2964
- $$typeof: Dn,
2977
+ $$typeof: Cn,
2965
2978
  type: e,
2966
2979
  key: n == null ? null : "" + n,
2967
2980
  ref: null,
2968
2981
  props: t,
2969
- i: null
2982
+ _owner: null,
2983
+ _store: {},
2984
+ k: null,
2985
+ l: null
2970
2986
  };
2971
2987
  }
2972
- var kn = typeof t.createContext < "u" ? t.createContext(void 0) : void 0;
2973
- function An(e, n, r, i, a, o, s, c) {
2988
+ var Tn = typeof t.createContext < "u" ? t.createContext(void 0) : void 0;
2989
+ function En(e, n, r, i, a, o, s, c) {
2974
2990
  switch (e.type) {
2975
- case G.blockQuote: {
2991
+ case K.blockQuote: {
2976
2992
  let t = { key: r.key };
2977
- return e.alert && (t.className = "markdown-alert-" + o(e.alert.toLowerCase(), Y), e.children.unshift({
2993
+ return e.alert && (t.className = "markdown-alert-" + o(e.alert.toLowerCase(), Ce), e.children.unshift({
2978
2994
  attrs: {},
2979
2995
  children: [{
2980
- type: G.text,
2996
+ type: K.text,
2981
2997
  text: e.alert
2982
2998
  }],
2983
2999
  c: !0,
2984
- type: G.htmlBlock,
3000
+ type: K.htmlBlock,
2985
3001
  tag: "header"
2986
3002
  })), i("blockquote", t, n(e.children, r));
2987
3003
  }
2988
- case G.breakLine: return i("br", { key: r.key });
2989
- case G.breakThematic: return i("hr", { key: r.key });
2990
- case G.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
2991
- case G.codeBlock:
2992
- let h = e.lang ? xe(e.lang) : "";
3004
+ case K.breakLine: return i("br", { key: r.key });
3005
+ case K.breakThematic: return i("hr", { key: r.key });
3006
+ case K.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
3007
+ case K.codeBlock:
3008
+ let h = e.lang ? ve(e.lang) : "";
2993
3009
  return i("pre", { key: r.key }, i("code", {
2994
- ...q(e.attrs || {}),
3010
+ ...J(e.attrs || {}),
2995
3011
  className: h ? `language-${h} lang-${h}` : ""
2996
3012
  }, e.text));
2997
- case G.codeInline: return i("code", { key: r.key }, e.text);
2998
- case G.footnoteReference: return i("a", {
3013
+ case K.codeInline: return i("code", { key: r.key }, e.text);
3014
+ case K.footnoteReference: return i("a", {
2999
3015
  key: r.key,
3000
3016
  href: a(e.target, "a", "href") || void 0
3001
3017
  }, i("sup", { key: r.key }, e.text));
3002
- case G.gfmTask: return i("input", {
3018
+ case K.gfmTask: return i("input", {
3003
3019
  checked: e.completed,
3004
3020
  key: r.key,
3005
3021
  readOnly: !0,
3006
3022
  type: "checkbox"
3007
3023
  });
3008
- case G.heading: return i(`h${e.level}`, {
3024
+ case K.heading: return i(`h${e.level}`, {
3009
3025
  id: e.id,
3010
3026
  key: r.key
3011
3027
  }, n(e.children, r));
3012
- case G.htmlBlock: {
3028
+ case K.htmlBlock: {
3013
3029
  let h = e;
3014
- if (c.tagfilter && qe(h.tag)) {
3030
+ if (c.tagfilter && Ke(h.tag)) {
3015
3031
  var l = "";
3016
3032
  if (h.attrs) for (var u in h.attrs) {
3017
3033
  var d = h.attrs[u];
@@ -3021,33 +3037,33 @@ function An(e, n, r, i, a, o, s, c) {
3021
3037
  }
3022
3038
  if (h.a && h.c) {
3023
3039
  let l = function(e) {
3024
- if ((e.type === G.htmlSelfClosing || e.type === G.htmlBlock) && e.b) return [];
3025
- if (e.type === G.paragraph) {
3040
+ if ((e.type === K.htmlSelfClosing || e.type === K.htmlBlock) && e.b) return [];
3041
+ if (e.type === K.paragraph) {
3026
3042
  let t = e.children;
3027
3043
  return t ? t.flatMap(l) : [];
3028
3044
  }
3029
- return e.type === G.text ? e.text?.trim() ? [e] : [] : e.type === G.htmlBlock && e.children ? [{
3045
+ return e.type === K.text ? e.text?.trim() ? [e] : [] : e.type === K.htmlBlock && e.children ? [{
3030
3046
  ...e,
3031
3047
  children: e.children?.flatMap(l)
3032
3048
  }] : [e];
3033
3049
  }, u = function(e) {
3034
- for (var t = 0; t < e.length; t++) e[t].type === G.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
3050
+ for (var t = 0; t < e.length; t++) e[t].type === K.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
3035
3051
  }, d = function(e, t) {
3036
3052
  for (var n = 0; n < e.length; n++) {
3037
3053
  var r = e[n];
3038
- if (r.type === G.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
3054
+ if (r.type === K.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
3039
3055
  var o = i[a];
3040
- if (o.type === G.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
3056
+ if (o.type === K.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
3041
3057
  var s = e.slice(0, n);
3042
3058
  a > 0 && s.push({
3043
- type: G.paragraph,
3059
+ type: K.paragraph,
3044
3060
  children: i.slice(0, a)
3045
3061
  });
3046
3062
  var c = [];
3047
3063
  if (a + 1 < i.length) {
3048
3064
  var l = i.slice(a + 1);
3049
3065
  l = l.filter(function(e) {
3050
- return !(e.type === G.htmlSelfClosing && e.b);
3066
+ return !(e.type === K.htmlSelfClosing && e.b);
3051
3067
  }), l.length > 0 && (c = l);
3052
3068
  }
3053
3069
  return c = c.concat(e.slice(n + 1)), {
@@ -3057,7 +3073,7 @@ function An(e, n, r, i, a, o, s, c) {
3057
3073
  };
3058
3074
  }
3059
3075
  }
3060
- if ((r.type === G.htmlSelfClosing || r.type === G.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
3076
+ if ((r.type === K.htmlSelfClosing || r.type === K.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
3061
3077
  found: !0,
3062
3078
  beforeClose: e.slice(0, n),
3063
3079
  afterClose: e.slice(n + 1)
@@ -3068,44 +3084,44 @@ function An(e, n, r, i, a, o, s, c) {
3068
3084
  beforeClose: e,
3069
3085
  afterClose: []
3070
3086
  };
3071
- }, g = h.tag.toLowerCase(), _ = it(g), v = h.children && h.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(h.a);
3087
+ }, g = h.tag.toLowerCase(), _ = at(g), v = h.children && h.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(h.a);
3072
3088
  if (_) {
3073
3089
  let t = h.a.replace(RegExp("\\s*</" + g + ">\\s*$", "i"), "");
3074
- return c.tagfilter && (t = Ye(t)), y ? i(e.tag, {
3090
+ return c.tagfilter && (t = Je(t)), y ? i(e.tag, {
3075
3091
  key: r.key,
3076
- ...q(e.attrs || {}),
3092
+ ...J(e.attrs || {}),
3077
3093
  dangerouslySetInnerHTML: { __html: t }
3078
3094
  }) : i(e.tag, {
3079
3095
  key: r.key,
3080
- ...q(e.attrs || {})
3096
+ ...J(e.attrs || {})
3081
3097
  }, t);
3082
3098
  }
3083
3099
  let b = RegExp(`^<${h.tag}(\\s|>)`, "i").test(h.a);
3084
- if (v && !b && c.tagfilter && Je(h.a)) return i(e.tag, {
3100
+ if (v && !b && c.tagfilter && qe(h.a)) return i(e.tag, {
3085
3101
  key: r.key,
3086
- ...q(e.attrs || {})
3102
+ ...J(e.attrs || {})
3087
3103
  }, n(h.children, r));
3088
- if (at(h.a)) {
3089
- let t = c.tagfilter ? Ye(h.a) : h.a;
3104
+ if (ot(h.a)) {
3105
+ let t = c.tagfilter ? Je(h.a) : h.a;
3090
3106
  return i(e.tag, {
3091
3107
  key: r.key,
3092
- ...q(e.attrs || {}),
3108
+ ...J(e.attrs || {}),
3093
3109
  dangerouslySetInnerHTML: { __html: t }
3094
3110
  });
3095
3111
  }
3096
3112
  let x = {
3097
- slugify: (e) => o(e, Y),
3113
+ slugify: (e) => o(e, Ce),
3098
3114
  sanitizer: a,
3099
3115
  tagfilter: !0
3100
3116
  }, S = h.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
3101
3117
  if (RegExp(`^<${h.tag}(\\s[^>]*)?>(\\s*</${h.tag}>)?$`, "i").test(S)) return h.children && h.children.length > 0 ? i(e.tag, {
3102
3118
  key: r.key,
3103
- ...q(e.attrs || {})
3119
+ ...J(e.attrs || {})
3104
3120
  }, n(h.children, r)) : i(e.tag, {
3105
3121
  key: r.key,
3106
- ...q(e.attrs || {})
3122
+ ...J(e.attrs || {})
3107
3123
  });
3108
- let C = Tn(S, {
3124
+ let C = xn(S, {
3109
3125
  inline: !1,
3110
3126
  refs: s,
3111
3127
  inHTML: !1
@@ -3114,33 +3130,33 @@ function An(e, n, r, i, a, o, s, c) {
3114
3130
  let w = h.tag.toLowerCase(), T = "</" + w + ">", E = RegExp(`^<${h.tag}(\\s|>)`, "i").test(S), D = S.toLowerCase().trimEnd().endsWith(T), O = E && D;
3115
3131
  if (O && v) return i(e.tag, {
3116
3132
  key: r.key,
3117
- ...q(e.attrs || {})
3133
+ ...J(e.attrs || {})
3118
3134
  }, n(h.children, r));
3119
3135
  if (O) return n(C.flatMap(l), r);
3120
3136
  var f = d(C, w);
3121
3137
  if (f.found && f.afterClose.length > 0) {
3122
3138
  var p = f.beforeClose.flatMap(l), m = f.afterClose.flatMap(l);
3123
- return On(t.Fragment, { children: [i(e.tag, {
3139
+ return wn(t.Fragment, { children: [i(e.tag, {
3124
3140
  key: r.key,
3125
- ...q(e.attrs || {})
3141
+ ...J(e.attrs || {})
3126
3142
  }, n(p, r)), n(m, r)] }, null);
3127
3143
  }
3128
3144
  return i(e.tag, {
3129
3145
  key: r.key,
3130
- ...q(e.attrs || {})
3146
+ ...J(e.attrs || {})
3131
3147
  }, n(C.flatMap(l), r));
3132
3148
  }
3133
- return De(e.tag) ? i(e.tag, {
3149
+ return we(e.tag) ? i(e.tag, {
3134
3150
  key: r.key,
3135
- ...q(e.attrs || {})
3151
+ ...J(e.attrs || {})
3136
3152
  }) : i(e.tag, {
3137
3153
  key: r.key,
3138
- ...q(e.attrs || {})
3154
+ ...J(e.attrs || {})
3139
3155
  }, e.children ? n(e.children, r) : "");
3140
3156
  }
3141
- case G.htmlSelfClosing: {
3157
+ case K.htmlSelfClosing: {
3142
3158
  let t = e;
3143
- if (c.tagfilter && qe(t.tag)) {
3159
+ if (c.tagfilter && Ke(t.tag)) {
3144
3160
  var l = "";
3145
3161
  if (t.attrs) for (var u in t.attrs) {
3146
3162
  var d = t.attrs[u];
@@ -3150,10 +3166,10 @@ function An(e, n, r, i, a, o, s, c) {
3150
3166
  }
3151
3167
  return i(e.tag, {
3152
3168
  key: r.key,
3153
- ...q(e.attrs || {})
3169
+ ...J(e.attrs || {})
3154
3170
  });
3155
3171
  }
3156
- case G.image: {
3172
+ case K.image: {
3157
3173
  let t = e.target == null ? null : a(e.target, "img", "src");
3158
3174
  return i("img", {
3159
3175
  key: r.key,
@@ -3162,18 +3178,18 @@ function An(e, n, r, i, a, o, s, c) {
3162
3178
  src: t || void 0
3163
3179
  });
3164
3180
  }
3165
- case G.link: {
3181
+ case K.link: {
3166
3182
  let t = { key: r.key };
3167
- return e.target != null && (t.href = Ue(e.target)), e.title && (t.title = e.title), i("a", t, n(e.children, r));
3183
+ return e.target != null && (t.href = He(e.target)), e.title && (t.title = e.title), i("a", t, n(e.children, r));
3168
3184
  }
3169
- case G.table: {
3185
+ case K.table: {
3170
3186
  let t = e;
3171
3187
  return i("table", { key: r.key }, i("thead", null, i("tr", null, t.header.map(function(e, a) {
3172
3188
  return i("th", {
3173
3189
  key: a,
3174
3190
  style: t.align[a] == null ? {} : { textAlign: t.align[a] }
3175
3191
  }, n(e, r));
3176
- }))), i("tbody", null, t.cells.map(function(e, a) {
3192
+ }))), t.cells.length > 0 && i("tbody", null, t.cells.map(function(e, a) {
3177
3193
  return i("tr", { key: a }, e.map(function(e, a) {
3178
3194
  return i("td", {
3179
3195
  key: a,
@@ -3182,21 +3198,21 @@ function An(e, n, r, i, a, o, s, c) {
3182
3198
  }));
3183
3199
  })));
3184
3200
  }
3185
- case G.text: return e.text;
3186
- case G.textFormatted: return i(e.tag, { key: r.key }, n(e.children, r));
3187
- case G.orderedList:
3188
- case G.unorderedList: return i(e.type === G.orderedList ? "ol" : "ul", {
3201
+ case K.text: return e.text;
3202
+ case K.textFormatted: return i(e.tag, { key: r.key }, n(e.children, r));
3203
+ case K.orderedList:
3204
+ case K.unorderedList: return i(e.type === K.orderedList ? "ol" : "ul", {
3189
3205
  key: r.key,
3190
- start: e.type === G.orderedList ? e.start : void 0
3206
+ start: e.type === K.orderedList ? e.start : void 0
3191
3207
  }, e.items.map(function(e, t) {
3192
3208
  return i("li", { key: t }, n(e, r));
3193
3209
  }));
3194
- case G.paragraph: return i("p", { key: r.key }, n(e.children, r));
3195
- case G.ref: return null;
3210
+ case K.paragraph: return i("p", { key: r.key }, n(e.children, r));
3211
+ case K.ref: return null;
3196
3212
  default: return null;
3197
3213
  }
3198
3214
  }
3199
- var jn = (e, t, n, r, i, a) => {
3215
+ var Dn = (e, t, n, r, i, a) => {
3200
3216
  var o = (e) => e.map(function(e) {
3201
3217
  return "text" in e ? e.text : "";
3202
3218
  }), s = (c, l = {}) => {
@@ -3205,7 +3221,7 @@ var jn = (e, t, n, r, i, a) => {
3205
3221
  l.renderDepth = u;
3206
3222
  for (var d = l.key, f = [], p = !1, m = 0; m < c.length; m++) {
3207
3223
  l.key = m;
3208
- var h = e ? e(An.bind(null, c[m], s, l, t, n, r, i, a), c[m], s, l) : An(c[m], s, l, t, n, r, i, a), g = typeof h == "string";
3224
+ var h = e ? e(En.bind(null, c[m], s, l, t, n, r, i, a), c[m], s, l) : En(c[m], s, l, t, n, r, i, a), g = typeof h == "string";
3209
3225
  if (g && p) f[f.length - 1] += h;
3210
3226
  else if (h !== null) if (Array.isArray(h)) for (var _ = 0; _ < h.length; _++) f.push(h[_]);
3211
3227
  else f.push(h);
@@ -3214,14 +3230,14 @@ var jn = (e, t, n, r, i, a) => {
3214
3230
  return l.key = d, l.renderDepth = u - 1, f;
3215
3231
  };
3216
3232
  return s;
3217
- }, Mn = (e, t) => {
3218
- let n = He(t, e, void 0);
3219
- return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : He(t, `${e}.component`, e) : e;
3233
+ }, On = (e, t) => {
3234
+ let n = Ve(t, e, void 0);
3235
+ return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : Ve(t, `${e}.component`, e) : e;
3220
3236
  };
3221
- function Nn(e, t) {
3237
+ function kn(e, t) {
3222
3238
  let n = { ...t || {} };
3223
3239
  n.overrides = n.overrides || {};
3224
- let r = n.slugify || Y, i = n.sanitizer || Ce, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => Pn(e, {
3240
+ let r = n.slugify || Ce, i = n.sanitizer || be, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => An(e, {
3225
3241
  ...n,
3226
3242
  wrapper: null
3227
3243
  });
@@ -3229,32 +3245,32 @@ function Nn(e, t) {
3229
3245
  var i = t || {};
3230
3246
  for (var c in i) {
3231
3247
  var l = i[c];
3232
- if (typeof l == "string" && l.length > 0 && l.charCodeAt(0) === T && (Xe.test(l) || Ze.test(l) || wn(l, 0))) {
3248
+ if (typeof l == "string" && l.length > 0 && l.charCodeAt(0) === w && (Ye.test(l) || Xe.test(l) || bn(l, 0))) {
3233
3249
  var u = s(l.trim());
3234
3250
  i[c] = c === "innerHTML" && Array.isArray(u) ? u[0] : u;
3235
3251
  }
3236
3252
  }
3237
3253
  var d = e;
3238
3254
  if (o) {
3239
- var f = He(n.overrides, e + ".props", {});
3240
- d = Mn(e, n.overrides), i = {
3255
+ var f = Ve(n.overrides, e + ".props", {});
3256
+ d = On(e, n.overrides), i = {
3241
3257
  ...i,
3242
3258
  ...f,
3243
- className: We(i.className, f.className) || void 0
3259
+ className: Ue(i.className, f.className) || void 0
3244
3260
  };
3245
3261
  }
3246
3262
  if (!a) {
3247
3263
  var p = i.key;
3248
- return p != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), On(d, i, p);
3264
+ return p != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), wn(d, i, p);
3249
3265
  }
3250
3266
  return a(d, i, ...r);
3251
3267
  }
3252
3268
  let l = {
3253
3269
  ...n,
3254
- slugify: (e) => r(e, Y),
3270
+ slugify: (e) => r(e, Ce),
3255
3271
  sanitizer: i,
3256
3272
  tagfilter: n.tagfilter !== !1
3257
- }, u = e[0] && e[0].type === G.refCollection ? e[0].refs : {}, d = jn(n.renderRule, c, i, r, u, n), f = d(e, {
3273
+ }, u = e[0] && e[0].type === K.refCollection ? e[0].refs : {}, d = Dn(n.renderRule, c, i, r, u, n), f = d(e, {
3258
3274
  inline: n.forceInline,
3259
3275
  refs: u
3260
3276
  }), p = [];
@@ -3263,12 +3279,12 @@ function Nn(e, t) {
3263
3279
  footnote: u[e].target
3264
3280
  });
3265
3281
  if (p.length && f.push(c("footer", { key: "footer" }, p.map(function(e) {
3266
- let t = e.identifier.charCodeAt(0) === h ? e.identifier.slice(1) : e.identifier, n = Tn(e.footnote, {
3282
+ let t = e.identifier.charCodeAt(0) === h ? e.identifier.slice(1) : e.identifier, n = xn(e.footnote, {
3267
3283
  inline: !0,
3268
3284
  refs: u
3269
3285
  }, l);
3270
3286
  return c("div", {
3271
- id: r(t, Y),
3287
+ id: r(t, Ce),
3272
3288
  key: e.identifier
3273
3289
  }, t + ": ", d(n, {
3274
3290
  inline: !0,
@@ -3279,25 +3295,25 @@ function Nn(e, t) {
3279
3295
  if (f.length > 1 || n.forceWrapper) g = f;
3280
3296
  else return f.length === 1 ? f[0] : null;
3281
3297
  var _ = n.wrapperProps ? { ...n.wrapperProps } : {};
3282
- return _.children = g, On(m, _, "outer");
3298
+ return _.children = g, wn(m, _, "outer");
3283
3299
  }
3284
- function Pn(e = "", t = {}) {
3300
+ function An(e = "", t = {}) {
3285
3301
  let n = { ...t || {} };
3286
3302
  n.overrides = n.overrides || {};
3287
- let r = n.slugify || Y, i = n.sanitizer || Ce;
3303
+ let r = n.slugify || Ce, i = n.sanitizer || be;
3288
3304
  function a(e) {
3289
- let t = n.forceInline || !n.forceBlock && !be.test(e), a = {
3305
+ let t = n.forceInline || !n.forceBlock && !Y.test(e), a = {
3290
3306
  ...n,
3291
- slugify: (e) => r(e, Y),
3307
+ slugify: (e) => r(e, Ce),
3292
3308
  sanitizer: i,
3293
3309
  tagfilter: n.tagfilter !== !1
3294
3310
  };
3295
- t || ct(e, o, a);
3311
+ t || lt(e, o, a);
3296
3312
  let s = e;
3297
3313
  if (!t) {
3298
3314
  let e = s.length;
3299
3315
  for (; e > 0 && (s[e - 1] === "\n" || s[e - 1] === "\r");) e--;
3300
- s = s.slice(0, e), s = `${s.replace(En, "")}
3316
+ s = s.slice(0, e), s = `${s.replace(Sn, "")}
3301
3317
 
3302
3318
  `;
3303
3319
  }
@@ -3305,7 +3321,7 @@ function Pn(e = "", t = {}) {
3305
3321
  let e = s.lastIndexOf("<");
3306
3322
  e !== -1 && s.slice(e).indexOf(">") === -1 && (s = s.slice(0, e));
3307
3323
  }
3308
- return Nn(Tn(t ? e : s, {
3324
+ return kn(xn(t ? e : s, {
3309
3325
  inline: t,
3310
3326
  refs: o
3311
3327
  }, a), {
@@ -3316,19 +3332,16 @@ function Pn(e = "", t = {}) {
3316
3332
  let o = {};
3317
3333
  return a(e);
3318
3334
  }
3319
- var Fn = ({ children: e, options: n, ...r }) => {
3320
- if (!(typeof t.useContext < "u")) {
3321
- let t = {
3322
- ...n,
3323
- overrides: { ...n?.overrides },
3324
- wrapperProps: {
3325
- ...n?.wrapperProps,
3326
- ...r
3327
- }
3328
- };
3329
- return Pn(e ?? "", t);
3330
- }
3331
- let i = t.useContext(kn), a = t.useMemo(() => ({
3335
+ var jn = ({ children: e, options: n, ...r }) => {
3336
+ if (!(typeof t.useContext < "u")) return An(e ?? "", {
3337
+ ...n,
3338
+ overrides: { ...n?.overrides },
3339
+ wrapperProps: {
3340
+ ...n?.wrapperProps,
3341
+ ...r
3342
+ }
3343
+ });
3344
+ let i = t.useContext(Tn), a = t.useMemo(() => ({
3332
3345
  ...i,
3333
3346
  ...n,
3334
3347
  overrides: {
@@ -3345,8 +3358,8 @@ var Fn = ({ children: e, options: n, ...r }) => {
3345
3358
  n,
3346
3359
  r
3347
3360
  ]), o = e ?? "";
3348
- return t.useMemo(() => Pn(o, a), [o, a]);
3349
- }, In = /* @__PURE__ */ e({ default: () => zn }), Ln = {
3361
+ return t.useMemo(() => An(o, a), [o, a]);
3362
+ }, Mn = /* @__PURE__ */ e({ default: () => Fn }), Nn = {
3350
3363
  small: {
3351
3364
  1: "dc:text-lg",
3352
3365
  2: "dc:text-base",
@@ -3362,11 +3375,11 @@ var Fn = ({ children: e, options: n, ...r }) => {
3362
3375
  2: "dc:text-4xl",
3363
3376
  3: "dc:text-3xl"
3364
3377
  }
3365
- }, Rn = {
3378
+ }, Pn = {
3366
3379
  1: "dc:mb-4",
3367
3380
  2: "dc:mb-3",
3368
3381
  3: "dc:mb-2"
3369
- }, zn = n.memo(function({ displayConfig: e = {}, height: t = "100%", colorPalette: n }) {
3382
+ }, Fn = n.memo(function({ displayConfig: e = {}, height: t = "100%", colorPalette: n }) {
3370
3383
  let o = e.content || "", s = e.accentColorIndex ?? 0, c = e.fontSize || "medium", l = e.alignment || "left", u = !!e.transparentBackground, d = e.accentBorder || "none", f = r(() => n?.colors && s < n.colors.length ? n.colors[s] : "#8884d8", [n, s]), p = {
3371
3384
  small: "dc:text-sm",
3372
3385
  medium: "dc:text-lg",
@@ -3377,15 +3390,15 @@ var Fn = ({ children: e, options: n, ...r }) => {
3377
3390
  right: "dc:text-right"
3378
3391
  }, h = r(() => ({ overrides: {
3379
3392
  h1: { props: {
3380
- className: `dc:font-bold ${Ln[c]?.[1] || "dc:text-3xl"} ${Rn[1]}`,
3393
+ className: `dc:font-bold ${Nn[c]?.[1] || "dc:text-3xl"} ${Pn[1]}`,
3381
3394
  style: { color: f }
3382
3395
  } },
3383
3396
  h2: { props: {
3384
- className: `dc:font-bold ${Ln[c]?.[2] || "dc:text-2xl"} ${Rn[2]}`,
3397
+ className: `dc:font-bold ${Nn[c]?.[2] || "dc:text-2xl"} ${Pn[2]}`,
3385
3398
  style: { color: f }
3386
3399
  } },
3387
3400
  h3: { props: {
3388
- className: `dc:font-bold ${Ln[c]?.[3] || "dc:text-xl"} ${Rn[3]}`,
3401
+ className: `dc:font-bold ${Nn[c]?.[3] || "dc:text-xl"} ${Pn[3]}`,
3389
3402
  style: { color: f }
3390
3403
  } },
3391
3404
  p: { props: { className: "dc:mb-3 dc:leading-relaxed text-dc-text" } },
@@ -3445,13 +3458,13 @@ var Fn = ({ children: e, options: n, ...r }) => {
3445
3458
  height: t === "100%" ? "100%" : t,
3446
3459
  ...g
3447
3460
  },
3448
- children: /* @__PURE__ */ i(Fn, {
3461
+ children: /* @__PURE__ */ i(jn, {
3449
3462
  options: h,
3450
3463
  children: o
3451
3464
  })
3452
3465
  });
3453
3466
  });
3454
3467
  //#endregion
3455
- export { In as n, Fn as r, zn as t };
3468
+ export { Mn as n, jn as r, Fn as t };
3456
3469
 
3457
- //# sourceMappingURL=chart-markdown-DXxc43w1.js.map
3470
+ //# sourceMappingURL=chart-markdown-B2X4IwLO.js.map