@8wave/ai-elements 0.125.0-beta.10 → 0.125.0-beta.11

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 (97) hide show
  1. package/dist/_chunks/{PkChatbotFilePreview-DuvRnOes.js → PkChatbotFilePreview-fbgRmR9n.js} +58 -55
  2. package/dist/_chunks/PkChatbotFilePreview-fbgRmR9n.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-BM-DSTPr.js → PkStreamingMarkdown-CfdkyZqP.js} +803 -799
  4. package/dist/_chunks/PkStreamingMarkdown-CfdkyZqP.js.map +1 -0
  5. package/dist/_chunks/{PkToolChatFile-DbeOmRPh.js → PkToolChatFile-ClZrtYIz.js} +2 -2
  6. package/dist/_chunks/{PkToolChatFile-DbeOmRPh.js.map → PkToolChatFile-ClZrtYIz.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShareDocument-Buzu27rQ.js → PkToolShareDocument-DLRwzPaL.js} +2 -2
  8. package/dist/_chunks/{PkToolShareDocument-Buzu27rQ.js.map → PkToolShareDocument-DLRwzPaL.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-utxGuLLt.js → PkToolShowArtifact-Dc4YM786.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-utxGuLLt.js.map → PkToolShowArtifact-Dc4YM786.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowContactForm-DTtE93D3.js → PkToolShowContactForm-CU1Sv3DA.js} +2 -2
  12. package/dist/_chunks/{PkToolShowContactForm-DTtE93D3.js.map → PkToolShowContactForm-CU1Sv3DA.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowDiagram-BHd-C_cx.js → PkToolShowDiagram-BDrdT_AB.js} +4 -2
  14. package/dist/_chunks/PkToolShowDiagram-BDrdT_AB.js.map +1 -0
  15. package/dist/_chunks/{PkToolShowForm-I4pKopEI.js → PkToolShowForm-DDgEmFRc.js} +2 -2
  16. package/dist/_chunks/{PkToolShowForm-I4pKopEI.js.map → PkToolShowForm-DDgEmFRc.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowImageGallery-skV87BlD.js → PkToolShowImageGallery-BCSO1iSG.js} +9 -4
  18. package/dist/_chunks/PkToolShowImageGallery-BCSO1iSG.js.map +1 -0
  19. package/dist/_chunks/{PkToolShowSources-DLmVS3bL.js → PkToolShowSources-DDI2s76O.js} +2 -2
  20. package/dist/_chunks/{PkToolShowSources-DLmVS3bL.js.map → PkToolShowSources-DDI2s76O.js.map} +1 -1
  21. package/dist/_chunks/{useLightbox-BigL4WLe.js → useLightbox-BEEzZ0qT.js} +112 -41
  22. package/dist/_chunks/useLightbox-BEEzZ0qT.js.map +1 -0
  23. package/dist/ai-elements.es.js +2420 -2409
  24. package/dist/ai-elements.es.js.map +1 -1
  25. package/dist-vue/PkChatbot.js +1 -1
  26. package/dist-vue/PkChatbotEmptyState.js +1 -1
  27. package/dist-vue/PkChatbotFilePreview.js +1 -1
  28. package/dist-vue/PkChatbotInput.js +1 -1
  29. package/dist-vue/PkChatbotMessages.js +1 -1
  30. package/dist-vue/PkChatbotSteps.js +1 -1
  31. package/dist-vue/PkChatbotViewChat.js +1 -1
  32. package/dist-vue/_chunks/{PkChatbot-CLOfTLQy.js → PkChatbot-D4SNWH_2.js} +3 -3
  33. package/dist-vue/_chunks/{PkChatbot-CLOfTLQy.js.map → PkChatbot-D4SNWH_2.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkChatbotEmptyState-C9aUiynZ.js → PkChatbotEmptyState-BnCCmm10.js} +2 -2
  35. package/dist-vue/_chunks/{PkChatbotEmptyState-C9aUiynZ.js.map → PkChatbotEmptyState-BnCCmm10.js.map} +1 -1
  36. package/dist-vue/_chunks/PkChatbotFilePreview-BpVM850N.js +291 -0
  37. package/dist-vue/_chunks/PkChatbotFilePreview-BpVM850N.js.map +1 -0
  38. package/dist-vue/_chunks/{PkChatbotInput-Bs8nn-Jz.js → PkChatbotInput-COjn57UP.js} +3 -3
  39. package/dist-vue/_chunks/{PkChatbotInput-Bs8nn-Jz.js.map → PkChatbotInput-COjn57UP.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkChatbotMessages-BxkCGmqV.js → PkChatbotMessages-D-m0cOqM.js} +282 -279
  41. package/dist-vue/_chunks/PkChatbotMessages-D-m0cOqM.js.map +1 -0
  42. package/dist-vue/_chunks/{PkChatbotSteps-MTSA_RrY.js → PkChatbotSteps-BWKjM1Z4.js} +2 -2
  43. package/dist-vue/_chunks/{PkChatbotSteps-MTSA_RrY.js.map → PkChatbotSteps-BWKjM1Z4.js.map} +1 -1
  44. package/dist-vue/_chunks/{PkChatbotViewChat-BwXOt2WW.js → PkChatbotViewChat-DIh2wVa_.js} +5 -5
  45. package/dist-vue/_chunks/{PkChatbotViewChat-BwXOt2WW.js.map → PkChatbotViewChat-DIh2wVa_.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkStreamingMarkdown-DlcTV5je.js → PkStreamingMarkdown-BZPAHAni.js} +760 -757
  47. package/dist-vue/_chunks/PkStreamingMarkdown-BZPAHAni.js.map +1 -0
  48. package/dist-vue/_chunks/{PkSvgViewer-DBYr0CUi.js → PkSvgViewer-DmkElalq.js} +4 -2
  49. package/dist-vue/_chunks/PkSvgViewer-DmkElalq.js.map +1 -0
  50. package/dist-vue/_chunks/{PkToolChatFile-HWGjtuaT.js → PkToolChatFile-BGH2cQuM.js} +2 -2
  51. package/dist-vue/_chunks/{PkToolChatFile-HWGjtuaT.js.map → PkToolChatFile-BGH2cQuM.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkToolShareDocument-CsS5OTDj.js → PkToolShareDocument-BIZkgcJ3.js} +2 -2
  53. package/dist-vue/_chunks/{PkToolShareDocument-CsS5OTDj.js.map → PkToolShareDocument-BIZkgcJ3.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkToolShowArtifact-C8OIF_sy.js → PkToolShowArtifact-DCe8yizN.js} +2 -2
  55. package/dist-vue/_chunks/{PkToolShowArtifact-C8OIF_sy.js.map → PkToolShowArtifact-DCe8yizN.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkToolShowContactForm-K6Z5MUXk.js → PkToolShowContactForm-4bO4fM5O.js} +2 -2
  57. package/dist-vue/_chunks/{PkToolShowContactForm-K6Z5MUXk.js.map → PkToolShowContactForm-4bO4fM5O.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkToolShowDiagram-DrlGh_v6.js → PkToolShowDiagram-DNRUCCt8.js} +2 -2
  59. package/dist-vue/_chunks/{PkToolShowDiagram-DrlGh_v6.js.map → PkToolShowDiagram-DNRUCCt8.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkToolShowForm-DzsXJfOl.js → PkToolShowForm-CQwXQwgt.js} +2 -2
  61. package/dist-vue/_chunks/{PkToolShowForm-DzsXJfOl.js.map → PkToolShowForm-CQwXQwgt.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkToolShowImageGallery-sCyrPOIT.js → PkToolShowImageGallery-CgDng1Gr.js} +17 -12
  63. package/dist-vue/_chunks/PkToolShowImageGallery-CgDng1Gr.js.map +1 -0
  64. package/dist-vue/_chunks/{PkToolShowLocation-DAQEuCuQ.js → PkToolShowLocation-DCPaDtBI.js} +3 -3
  65. package/dist-vue/_chunks/PkToolShowLocation-DCPaDtBI.js.map +1 -0
  66. package/dist-vue/_chunks/{PkToolShowProductList-DPDDeVu4.js → PkToolShowProductList-DyPyz1pU.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolShowProductList-DPDDeVu4.js.map → PkToolShowProductList-DyPyz1pU.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowSources-D4zjssdh.js → PkToolShowSources-C3JjevRj.js} +2 -2
  69. package/dist-vue/_chunks/{PkToolShowSources-D4zjssdh.js.map → PkToolShowSources-C3JjevRj.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolShowVideo-C77DAqoZ.js → PkToolShowVideo--qiiAK7R.js} +2 -2
  71. package/dist-vue/_chunks/{PkToolShowVideo-C77DAqoZ.js.map → PkToolShowVideo--qiiAK7R.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowWebPages-D_tqGI6o.js → PkToolShowWebPages-Cw9FPQuL.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowWebPages-D_tqGI6o.js.map → PkToolShowWebPages-Cw9FPQuL.js.map} +1 -1
  74. package/dist-vue/_chunks/useLightbox-gSzoBgNv.js +190 -0
  75. package/dist-vue/_chunks/useLightbox-gSzoBgNv.js.map +1 -0
  76. package/dist-vue/composables.js +8 -0
  77. package/dist-vue/composables.js.map +1 -1
  78. package/dist-vue/index.js +2899 -2898
  79. package/dist-vue/index.js.map +1 -1
  80. package/dist-vue/locales.js +10 -0
  81. package/dist-vue/packages/components/src/composables/useLightbox.d.ts +33 -3
  82. package/dist-vue/style.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/_chunks/PkChatbotFilePreview-DuvRnOes.js.map +0 -1
  85. package/dist/_chunks/PkStreamingMarkdown-BM-DSTPr.js.map +0 -1
  86. package/dist/_chunks/PkToolShowDiagram-BHd-C_cx.js.map +0 -1
  87. package/dist/_chunks/PkToolShowImageGallery-skV87BlD.js.map +0 -1
  88. package/dist/_chunks/useLightbox-BigL4WLe.js.map +0 -1
  89. package/dist-vue/_chunks/PkChatbotFilePreview-KxVpL0UT.js +0 -391
  90. package/dist-vue/_chunks/PkChatbotFilePreview-KxVpL0UT.js.map +0 -1
  91. package/dist-vue/_chunks/PkChatbotMessages-BxkCGmqV.js.map +0 -1
  92. package/dist-vue/_chunks/PkStreamingMarkdown-DlcTV5je.js.map +0 -1
  93. package/dist-vue/_chunks/PkSvgViewer-DBYr0CUi.js.map +0 -1
  94. package/dist-vue/_chunks/PkToolShowImageGallery-sCyrPOIT.js.map +0 -1
  95. package/dist-vue/_chunks/PkToolShowLocation-DAQEuCuQ.js.map +0 -1
  96. package/dist-vue/_chunks/cdn-css-C3_zuSx6.js +0 -15
  97. package/dist-vue/_chunks/cdn-css-C3_zuSx6.js.map +0 -1
@@ -1,28 +1,28 @@
1
1
  import { W as e } from "./Agent-BtXBSGy6.js";
2
- import { n as t, t as n } from "./cdn-css-C3_zuSx6.js";
2
+ import { a as t, i as n, o as r } from "./useLightbox-gSzoBgNv.js";
3
3
  import "./src-nb8MU1sh.js";
4
- import { _ as r } from "./utils-CX4JuhXz.js";
5
- import { i, n as a } from "./url-validation-CJV9pp4v.js";
6
- import { n as o } from "./useShortUrlResolver-KJDk7QLj.js";
7
- import { computed as s, createElementBlock as c, defineComponent as l, inject as u, nextTick as d, onBeforeUnmount as f, onMounted as p, openBlock as ee, provide as m, ref as h, toRef as g, useTemplateRef as te, watch as _ } from "vue";
8
- import { useI18n as ne } from "vue-i18n";
9
- import { refThrottled as re } from "@vueuse/core";
4
+ import { _ as i } from "./utils-CX4JuhXz.js";
5
+ import { i as a, n as o } from "./url-validation-CJV9pp4v.js";
6
+ import { n as s } from "./useShortUrlResolver-KJDk7QLj.js";
7
+ import { computed as c, createElementBlock as l, defineComponent as u, inject as d, nextTick as f, onBeforeUnmount as p, onMounted as ee, openBlock as m, provide as h, ref as g, toRef as te, unref as ne, useTemplateRef as re, watch as _ } from "vue";
8
+ import { useI18n as ie } from "vue-i18n";
9
+ import { refThrottled as v } from "@vueuse/core";
10
10
  // ../../packages/utils/src/citations.ts
11
- var ie = /[ \t]*\uE200[^\uE201]*\uE201/g, v = /(?<![ \t])[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, ae = /[\uE200-\uE20F]/g;
12
- function oe(e) {
13
- return e && e.replace(ie, "").replace(v, "").replace(ae, "");
11
+ var ae = /[ \t]*\uE200[^\uE201]*\uE201/g, oe = /(?<![ \t])[ \t]*(?:cite|filecite|videocite|audiocite|imagecite|screenshot)(?:turn\d+[a-z]+\d+)+/gi, se = /[\uE200-\uE20F]/g;
12
+ function y(e) {
13
+ return e && e.replace(ae, "").replace(oe, "").replace(se, "");
14
14
  }
15
15
  // ../../node_modules/.pnpm/remend@1.4.0/node_modules/remend/dist/index.js
16
- var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnPropertyDescriptors, le = Object.getOwnPropertySymbols, ue = Object.prototype.hasOwnProperty, de = Object.prototype.propertyIsEnumerable, fe = (e, t, n) => t in e ? se(e, t, {
16
+ var b = Object.defineProperty, ce = Object.defineProperties, le = Object.getOwnPropertyDescriptors, x = Object.getOwnPropertySymbols, ue = Object.prototype.hasOwnProperty, de = Object.prototype.propertyIsEnumerable, fe = (e, t, n) => t in e ? b(e, t, {
17
17
  enumerable: !0,
18
18
  configurable: !0,
19
19
  writable: !0,
20
20
  value: n
21
21
  }) : e[t] = n, pe = (e, t) => {
22
22
  for (var n in t ||= {}) ue.call(t, n) && fe(e, n, t[n]);
23
- if (le) for (var n of le(t)) de.call(t, n) && fe(e, n, t[n]);
23
+ if (x) for (var n of x(t)) de.call(t, n) && fe(e, n, t[n]);
24
24
  return e;
25
- }, me = (e, t) => y(e, ce(t)), b = {
25
+ }, me = (e, t) => ce(e, le(t)), S = {
26
26
  PROSE: 0,
27
27
  FENCE_MARKER: 1,
28
28
  FENCE_INFO: 2,
@@ -54,7 +54,7 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
54
54
  };
55
55
  o = t, a = !0;
56
56
  }
57
- }, ye = (e, t, n, r) => {
57
+ }, C = (e, t, n, r) => {
58
58
  let i = t;
59
59
  for (let t = 0; t < r; t += 1) {
60
60
  for (; i < n && e[i] === " ";) i += 1;
@@ -62,10 +62,10 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
62
62
  i += 1, e[i] === " " && (i += 1);
63
63
  }
64
64
  return i;
65
- }, be = (e, t, n, r, i) => {
65
+ }, ye = (e, t, n, r, i) => {
66
66
  let a = t + r;
67
- e.fill(b.FENCE_MARKER, a, a + i), e.fill(b.FENCE_INFO, a + i, Math.min(n + 1, e.length));
68
- }, x = (e, t, n, r) => {
67
+ e.fill(S.FENCE_MARKER, a, a + i), e.fill(S.FENCE_INFO, a + i, Math.min(n + 1, e.length));
68
+ }, be = (e, t, n, r) => {
69
69
  let i = t;
70
70
  for (; i < n && e[i] === " ";) i += 1;
71
71
  let a = 0;
@@ -80,14 +80,14 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
80
80
  let i = r > n && e[r - 1] === "\r" ? r - 1 : r, a = ve(e, n, i), o = e.slice(a.contentStart, i).match(he);
81
81
  if (!o) return null;
82
82
  let [, s, c] = o, l = s[0];
83
- return l === "`" && c.includes("`") ? null : (be(t, n, r, a.contentStart - n, s.length), {
83
+ return l === "`" && c.includes("`") ? null : (ye(t, n, r, a.contentStart - n, s.length), {
84
84
  char: l,
85
85
  length: s.length,
86
86
  listIndent: a.listIndent,
87
87
  quoteDepth: a.quoteDepth
88
88
  });
89
89
  }, Se = (e, t, n, r) => {
90
- let i = ye(e, t, n, r.quoteDepth);
90
+ let i = C(e, t, n, r.quoteDepth);
91
91
  if (i === -1 || r.listIndent === 0) return i;
92
92
  let a = i;
93
93
  for (; a < n && e[a] === " ";) a += 1;
@@ -98,7 +98,7 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
98
98
  let a = e.indexOf("\n", i);
99
99
  a === -1 && (a = n);
100
100
  let o = r ? Se(e, i, a, r) : -1;
101
- r && o === -1 && (r = null), r ? x(e, o, a, r) ? (t.fill(b.FENCE_MARKER, i, a), r = null) : t.fill(b.FENCE_BODY, i, Math.min(a + 1, n)) : r = xe(e, t, i, a), i = a + 1;
101
+ r && o === -1 && (r = null), r ? be(e, o, a, r) ? (t.fill(S.FENCE_MARKER, i, a), r = null) : t.fill(S.FENCE_BODY, i, Math.min(a + 1, n)) : r = xe(e, t, i, a), i = a + 1;
102
102
  }
103
103
  return r;
104
104
  }, we = (e, t) => {
@@ -114,8 +114,8 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
114
114
  for (;;) {
115
115
  let n = e.indexOf("`", r);
116
116
  if (n === -1) return -1;
117
- let i = n > r && e[n - 1] === "\\" && t[n - 1] === b.PROSE;
118
- if (t[n] === b.PROSE && !i) return n;
117
+ let i = n > r && e[n - 1] === "\\" && t[n - 1] === S.PROSE;
118
+ if (t[n] === S.PROSE && !i) return n;
119
119
  r = n + 1;
120
120
  }
121
121
  }, De = (e, t) => {
@@ -127,8 +127,8 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
127
127
  r = a, i = n - a, a = n;
128
128
  continue;
129
129
  }
130
- if (t[a] !== b.PROSE) {
131
- t.fill(b.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
130
+ if (t[a] !== S.PROSE) {
131
+ t.fill(S.CODE_SPAN_OPEN, r, a), r = -1, a += 1;
132
132
  continue;
133
133
  }
134
134
  if (e[a] === "\n" && Te(e, a)) {
@@ -140,13 +140,13 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
140
140
  continue;
141
141
  }
142
142
  let n = we(e, a);
143
- n - a === i && (t.fill(b.CODE_SPAN, r, n), r = -1), a = n;
143
+ n - a === i && (t.fill(S.CODE_SPAN, r, n), r = -1), a = n;
144
144
  }
145
- return r >= 0 ? (t.fill(b.CODE_SPAN_OPEN, r, n), {
145
+ return r >= 0 ? (t.fill(S.CODE_SPAN_OPEN, r, n), {
146
146
  start: r,
147
147
  runLength: i
148
148
  }) : null;
149
- }, Oe = (e) => {
149
+ }, w = (e) => {
150
150
  let t = new Uint8Array(e.length);
151
151
  return {
152
152
  text: e,
@@ -157,17 +157,17 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
157
157
  linkUrlMask: null,
158
158
  htmlTagMask: null
159
159
  };
160
- }, ke = null, S = null, C = (e) => {
161
- if (S !== null && e === ke) return S;
162
- let t = Oe(e);
163
- return ke = e, S = t, t;
164
- }, w = () => {
165
- ke = null, S = null;
166
- }, Ae = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== b.PROSE, T = (e, t) => e.regions[t] === b.CODE_SPAN, je = (e, t) => {
167
- let n = C(e), r = t + t, i = 0;
168
- for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === b.PROSE ? (i += 1, t += 2) : t += 1;
160
+ }, Oe = null, T = null, E = (e) => {
161
+ if (T !== null && e === Oe) return T;
162
+ let t = w(e);
163
+ return Oe = e, T = t, t;
164
+ }, D = () => {
165
+ Oe = null, T = null;
166
+ }, ke = (e, t) => t >= e.regions.length ? e.openFence !== null || e.openSpan !== null : t < 0 ? !1 : e.regions[t] !== S.PROSE, Ae = (e, t) => e.regions[t] === S.CODE_SPAN, O = (e, t) => {
167
+ let n = E(e), r = t + t, i = 0;
168
+ for (let t = e.indexOf(r); t !== -1; t = e.indexOf(r, t)) n.regions[t] === S.PROSE ? (i += 1, t += 2) : t += 1;
169
169
  return i;
170
- }, Me = /* @__PURE__ */ new Uint8Array(), E = (e) => e === "inlineLatex" || e === "blockLatex", Ne = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, Pe = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", Fe = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), Ie = (e, t, n) => {
170
+ }, je = /* @__PURE__ */ new Uint8Array(), Me = (e) => e === "inlineLatex" || e === "blockLatex", Ne = (e, t) => t === "[" && e === "none" ? "blockLatex" : t === "]" && e === "blockLatex" ? "none" : t === "(" && e === "none" ? "inlineLatex" : t === ")" && e === "inlineLatex" ? "none" : null, Pe = (e, t) => t ? e === "blockDollar" ? "none" : "blockDollar" : e === "blockDollar" ? e : e === "inlineDollar" ? "none" : "inlineDollar", Fe = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), Ie = (e, t, n) => {
171
171
  let r = e[t + 1];
172
172
  if (e[t] === "\\") {
173
173
  if (r === "$") return {
@@ -180,7 +180,7 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
180
180
  length: 2
181
181
  };
182
182
  }
183
- if (e[t] === "$" && !E(n)) {
183
+ if (e[t] === "$" && !Me(n)) {
184
184
  let e = r === "$";
185
185
  return {
186
186
  context: Pe(n, e),
@@ -188,30 +188,30 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
188
188
  };
189
189
  }
190
190
  return null;
191
- }, D = (e) => {
191
+ }, Le = (e) => {
192
192
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = "none", o = 0;
193
193
  for (; o < r;) {
194
194
  i[o] = a === "none" ? 0 : 1;
195
- let e = n[o] === b.PROSE ? Ie(t, o, a) : null;
195
+ let e = n[o] === S.PROSE ? Ie(t, o, a) : null;
196
196
  e === null ? o += 1 : (a = e.context, e.length === 2 && (i[o + 1] = a === "none" ? 0 : 1), o += e.length);
197
197
  }
198
198
  return i;
199
- }, O = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = Fe(e.text) ? D(e) : Me), e.mathMask[t] === 1), Le = (e, t, n, r) => {
199
+ }, Re = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.mathMask === null && (e.mathMask = Fe(e.text) ? Le(e) : je), e.mathMask[t] === 1), ze = (e, t, n, r) => {
200
200
  let { text: i, regions: a } = e, o = new Uint8Array(n - t), s = 0;
201
- for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === b.PROSE && (s = 1), o[e - t] = s;
201
+ for (let e = n - 1; e >= t; --e) i[e] === ")" && a[e] === S.PROSE && (s = 1), o[e - t] = s;
202
202
  let c = !1;
203
- for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === b.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
204
- }, Re = (e) => {
203
+ for (let e = t; e < n; e += 1) c && o[e - t] === 1 && (r[e] = 1), a[e] === S.PROSE && (i[e] === ")" ? c = !1 : i[e] === "(" && (c = e > 0 && i[e - 1] === "]"));
204
+ }, Be = (e) => {
205
205
  let { text: t } = e, n = t.length, r = new Uint8Array(n), i = 0;
206
206
  for (; i < n;) {
207
207
  let a = t.indexOf("\n", i);
208
- a === -1 && (a = n), Le(e, i, a, r), i = a + 1;
208
+ a === -1 && (a = n), ze(e, i, a, r), i = a + 1;
209
209
  }
210
210
  return r;
211
- }, ze = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? Re(e) : Me), e.linkUrlMask[t] === 1), Be = (e) => {
211
+ }, Ve = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.linkUrlMask === null && (e.linkUrlMask = e.text.includes("](") ? Be(e) : je), e.linkUrlMask[t] === 1), He = (e) => {
212
212
  let { text: t, regions: n } = e, r = t.length, i = new Uint8Array(r), a = !1;
213
213
  for (let e = 0; e < r; e += 1) if (t[e] === "\n") a = !1;
214
- else if (i[e] = +!!a, n[e] === b.PROSE) {
214
+ else if (i[e] = +!!a, n[e] === S.PROSE) {
215
215
  if (t[e] === ">") a = !1;
216
216
  else if (t[e] === "<") {
217
217
  let n = t[e + 1];
@@ -219,56 +219,56 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
219
219
  }
220
220
  }
221
221
  return i;
222
- }, Ve = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? Be(e) : Me), e.htmlTagMask[t] === 1), k = (e, t) => Ae(C(e), t), A = (e, t) => T(C(e), t), He = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, Ue = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(He, (t, n, r, i) => k(e, i) ? t : `${n}\\>${r}`), j = (e, { delimiter: t, markerLength: n, regex: r }) => {
222
+ }, Ue = (e, t) => t < 0 || t >= e.text.length ? !1 : (e.htmlTagMask === null && (e.htmlTagMask = e.text.includes("<") ? He(e) : je), e.htmlTagMask[t] === 1), k = (e, t) => ke(E(e), t), A = (e, t) => Ae(E(e), t), We = /^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm, Ge = (e) => !e || typeof e != "string" || !e.includes(">") ? e : e.replace(We, (t, n, r, i) => k(e, i) ? t : `${n}\\>${r}`), j = (e, { delimiter: t, markerLength: n, regex: r }) => {
223
223
  let i = e.lastIndexOf(t, e.length - 2), a = i === -1 ? e.length - 1 : i;
224
224
  return e.slice(Math.max(0, a - n + 1)).match(r);
225
- }, We = {
225
+ }, Ke = {
226
226
  delimiter: "*",
227
227
  markerLength: 2,
228
228
  regex: /(\*\*)([^*]*\*?)$/
229
- }, Ge = {
229
+ }, qe = {
230
230
  delimiter: "_",
231
231
  markerLength: 2,
232
232
  regex: /(__)([^_]*?)$/
233
- }, Ke = {
233
+ }, Je = {
234
234
  delimiter: "*",
235
235
  markerLength: 3,
236
236
  regex: /(\*\*\*)([^*]*?)$/
237
- }, qe = {
237
+ }, Ye = {
238
238
  delimiter: "*",
239
239
  markerLength: 1,
240
240
  regex: /(\*)([^*]*?)$/
241
- }, Je = {
241
+ }, Xe = {
242
242
  delimiter: "_",
243
243
  markerLength: 1,
244
244
  regex: /(_)([^_]*?)$/
245
- }, Ye = {
245
+ }, Ze = {
246
246
  delimiter: "~",
247
247
  markerLength: 2,
248
248
  regex: /(~~)([^~]*?)$/
249
- }, Xe = {
249
+ }, Qe = {
250
250
  delimiter: "_",
251
251
  markerLength: 2,
252
252
  regex: /(__)([^_]+)_$/
253
- }, Ze = {
253
+ }, $e = {
254
254
  delimiter: "~",
255
255
  markerLength: 2,
256
256
  regex: /(~~)([^~]+)~$/
257
- }, M = /^[\s_~*`]*$/, Qe = /^[\s]*[-*+][\s]+$/, $e = /[\p{L}\p{N}_]/u, et = /^\*{4,}$/, N = (e) => {
257
+ }, et = /^[\s_~*`]*$/, tt = /^[\s]*[-*+][\s]+$/, nt = /[\p{L}\p{N}_]/u, M = /^\*{4,}$/, N = (e) => {
258
258
  if (!e) return !1;
259
259
  let t = e.charCodeAt(0);
260
- return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || $e.test(e);
261
- }, P = (e, t) => {
260
+ return t >= 48 && t <= 57 || t >= 65 && t <= 90 || t >= 97 && t <= 122 || t === 95 || nt.test(e);
261
+ }, rt = (e, t) => {
262
262
  let n = 1;
263
263
  for (let r = t - 1; r >= 0; --r) if (e[r] === "]") n += 1;
264
264
  else if (e[r] === "[" && (--n, n === 0)) return r;
265
265
  return -1;
266
- }, tt = (e, t) => {
266
+ }, it = (e, t) => {
267
267
  let n = 1;
268
268
  for (let r = t + 1; r < e.length; r += 1) if (e[r] === "[") n += 1;
269
269
  else if (e[r] === "]" && (--n, n === 0)) return r;
270
270
  return -1;
271
- }, nt = (e, t) => O(C(e), t), rt = (e, t, n) => {
271
+ }, at = (e, t) => Re(E(e), t), ot = (e, t, n) => {
272
272
  let r = 0;
273
273
  for (let n = t - 1; n >= 0; --n) if (e[n] === "\n") {
274
274
  r = n + 1;
@@ -286,184 +286,184 @@ var se = Object.defineProperty, y = Object.defineProperties, ce = Object.getOwnP
286
286
  break;
287
287
  }
288
288
  return o >= 3 && !s;
289
- }, it = (e, t, n, r) => n === "\\" || O(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), at = (e) => e === " " || e === " " || e === "\n", ot = (e, t) => !!(e && t && N(e) && N(t)), st = (e, t, n, r) => {
290
- let i = ot(e, t), a = !!t && !at(t), o = !!e && !at(e);
289
+ }, st = (e, t, n, r) => n === "\\" || Re(e, t) ? !0 : n !== "*" && r === "*" ? (t < e.text.length - 2 ? e.text[t + 2] : "") !== "*" : n === "*" || (!n || n === " " || n === " " || n === "\n") && (!r || r === " " || r === " " || r === "\n"), ct = (e) => e === " " || e === " " || e === "\n", lt = (e, t) => !!(e && t && N(e) && N(t)), ut = (e, t, n, r) => {
290
+ let i = lt(e, t), a = !!t && !ct(t), o = !!e && !ct(e);
291
291
  return i && n % 2 == 0 && !r ? { count: !1 } : o && n % 2 == 1 || a ? {
292
292
  count: !0,
293
293
  inWordAsteriskChain: i
294
294
  } : { count: !1 };
295
- }, ct = (e) => {
296
- let t = C(e), n = 0, r = !1, i = e.length;
295
+ }, dt = (e) => {
296
+ let t = E(e), n = 0, r = !1, i = e.length;
297
297
  for (let a = 0; a < i; a += 1) {
298
- if (e[a] !== "*" || t.regions[a] !== b.PROSE) {
298
+ if (e[a] !== "*" || t.regions[a] !== S.PROSE) {
299
299
  N(e[a]) || (r = !1);
300
300
  continue;
301
301
  }
302
302
  let o = a > 0 ? e[a - 1] : "", s = a < i - 1 ? e[a + 1] : "";
303
- if (it(t, a, o, s)) continue;
304
- let c = st(o, s, n, r);
303
+ if (st(t, a, o, s)) continue;
304
+ let c = ut(o, s, n, r);
305
305
  c.count && (n += 1, r = c.inWordAsteriskChain);
306
306
  }
307
307
  return n;
308
- }, lt = (e, t, n, r) => !!(n === "\\" || O(e, t) || ze(e, t) || Ve(e, t) || n === "_" || r === "_" || n && r && N(n) && N(r)), ut = (e) => {
309
- let t = C(e), n = 0, r = e.length;
308
+ }, ft = (e, t, n, r) => !!(n === "\\" || Re(e, t) || Ve(e, t) || Ue(e, t) || n === "_" || r === "_" || n && r && N(n) && N(r)), P = (e) => {
309
+ let t = E(e), n = 0, r = e.length;
310
310
  for (let i = 0; i < r; i += 1) {
311
- if (e[i] !== "_" || t.regions[i] !== b.PROSE) continue;
311
+ if (e[i] !== "_" || t.regions[i] !== S.PROSE) continue;
312
312
  let a = i > 0 ? e[i - 1] : "", o = i < r - 1 ? e[i + 1] : "";
313
- lt(t, i, a, o) || (n += 1);
313
+ ft(t, i, a, o) || (n += 1);
314
314
  }
315
315
  return n;
316
- }, dt = (e) => {
317
- let t = C(e), n = 0, r = 0;
318
- for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === b.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
316
+ }, pt = (e) => {
317
+ let t = E(e), n = 0, r = 0;
318
+ for (let i = 0; i < e.length; i += 1) e[i] === "*" && t.regions[i] === S.PROSE ? r += 1 : (r >= 3 && (n += Math.floor(r / 3)), r = 0);
319
319
  return r >= 3 && (n += Math.floor(r / 3)), n;
320
- }, F = (e) => je(e, "*"), ft = (e) => e === "" || e === " " || e === " " || e === "\n", pt = (e, t, n, r, i) => {
321
- if (!(ft(n) && ft(r))) return !1;
320
+ }, mt = (e) => O(e, "*"), ht = (e) => e === "" || e === " " || e === " " || e === "\n", gt = (e, t, n, r, i) => {
321
+ if (!(ht(n) && ht(r))) return !1;
322
322
  if (t > i.lineEnd) {
323
323
  let n = e.indexOf("\n", t);
324
- i.lineEnd = n === -1 ? e.length : n, i.result = rt(e, t, "_");
324
+ i.lineEnd = n === -1 ? e.length : n, i.result = ot(e, t, "_");
325
325
  }
326
326
  return i.result;
327
- }, mt = (e, t, n, r) => {
327
+ }, _t = (e, t, n, r) => {
328
328
  let i = e.text, a = t, o = !1;
329
329
  a > 0 && i[a - 1] === "\\" && (a += 1, o = !0);
330
330
  let s = n - a;
331
331
  if (s < 2) return !1;
332
332
  let c = a > 0 ? i[a - 1] : "", l = o ? "\\" : c, u = n < i.length ? i[n] : "";
333
- return N(l) && N(u) || pt(i, a, l, u, r) || O(e, a) || ze(e, a) || Ve(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
334
- }, ht = (e) => {
335
- let t = C(e), n = e.length, r = {
333
+ return N(l) && N(u) || gt(i, a, l, u, r) || Re(e, a) || Ve(e, a) || Ue(e, a) ? !1 : Math.floor(s / 2) % 2 == 1;
334
+ }, vt = (e) => {
335
+ let t = E(e), n = e.length, r = {
336
336
  lineEnd: -1,
337
337
  result: !1
338
338
  }, i = !1, a = 0;
339
339
  for (; a < n;) {
340
- if (e[a] !== "_" || t.regions[a] !== b.PROSE) {
340
+ if (e[a] !== "_" || t.regions[a] !== S.PROSE) {
341
341
  a += 1;
342
342
  continue;
343
343
  }
344
344
  let o = a, s = a + 1;
345
- for (; s < n && e[s] === "_" && t.regions[s] === b.PROSE;) s += 1;
346
- a = s, mt(t, o, s, r) && (i = !i);
345
+ for (; s < n && e[s] === "_" && t.regions[s] === S.PROSE;) s += 1;
346
+ a = s, _t(t, o, s, r) && (i = !i);
347
347
  }
348
348
  return i;
349
- }, gt = (e, t, n) => {
350
- if (!t || M.test(t)) return !0;
349
+ }, yt = (e, t, n) => {
350
+ if (!t || et.test(t)) return !0;
351
351
  let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
352
- return Qe.test(a) && t.includes("\n") ? !0 : rt(e, n, "*");
353
- }, _t = (e) => {
354
- let t = j(e, We);
352
+ return tt.test(a) && t.includes("\n") ? !0 : ot(e, n, "*");
353
+ }, bt = (e) => {
354
+ let t = j(e, Ke);
355
355
  if (!t) return e;
356
356
  let n = t[2], r = e.lastIndexOf(t[1]);
357
- return k(e, r) || A(e, r) || gt(e, n, r) ? e : F(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
358
- }, vt = (e, t, n) => {
359
- if (!t || M.test(t)) return !0;
357
+ return k(e, r) || A(e, r) || yt(e, n, r) ? e : mt(e) % 2 == 1 ? n.endsWith("*") ? `${e}*` : `${e}**` : e;
358
+ }, xt = (e, t, n) => {
359
+ if (!t || et.test(t)) return !0;
360
360
  let r = e.substring(0, n).lastIndexOf("\n"), i = r === -1 ? 0 : r + 1, a = e.substring(i, n);
361
- return Qe.test(a) && t.includes("\n") ? !0 : rt(e, n, "_");
362
- }, yt = (e) => {
363
- let t = j(e, Ge);
361
+ return tt.test(a) && t.includes("\n") ? !0 : ot(e, n, "_");
362
+ }, St = (e) => {
363
+ let t = j(e, qe);
364
364
  if (!t) {
365
- let t = j(e, Xe);
365
+ let t = j(e, Qe);
366
366
  if (t) {
367
367
  let n = e.lastIndexOf(t[1]);
368
- if (!(k(e, n) || A(e, n)) && ht(e)) return `${e}_`;
368
+ if (!(k(e, n) || A(e, n)) && vt(e)) return `${e}_`;
369
369
  }
370
370
  return e;
371
371
  }
372
372
  let n = t[2], r = e.lastIndexOf(t[1]);
373
- return k(e, r) || A(e, r) || vt(e, n, r) ? e : ht(e) ? `${e}__` : e;
374
- }, bt = (e, t) => {
373
+ return k(e, r) || A(e, r) || xt(e, n, r) ? e : vt(e) ? `${e}__` : e;
374
+ }, Ct = (e, t) => {
375
375
  let { text: n } = e;
376
- return n[t] === "*" && e.regions[t] === b.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !O(e, t);
377
- }, xt = (e) => {
378
- let t = C(e);
376
+ return n[t] === "*" && e.regions[t] === S.PROSE && n[t - 1] !== "*" && n[t + 1] !== "*" && n[t - 1] !== "\\" && !Re(e, t);
377
+ }, wt = (e) => {
378
+ let t = E(e);
379
379
  for (let n = e.indexOf("*"); n !== -1; n = e.indexOf("*", n + 1)) {
380
- if (!bt(t, n)) continue;
381
- let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || at(r), o = !i || at(i);
380
+ if (!Ct(t, n)) continue;
381
+ let r = n > 0 ? e[n - 1] : "", i = n < e.length - 1 ? e[n + 1] : "", a = !r || ct(r), o = !i || ct(i);
382
382
  if (!(a && o) && !(r && i && N(r) && N(i)) && !o) return n;
383
383
  }
384
384
  return -1;
385
- }, St = (e) => {
386
- if (!j(e, qe)) return e;
387
- let t = xt(e);
385
+ }, Tt = (e) => {
386
+ if (!j(e, Ye)) return e;
387
+ let t = wt(e);
388
388
  if (t === -1 || k(e, t) || A(e, t)) return e;
389
389
  let n = e.substring(t + 1);
390
- return !n || M.test(n) ? e : ct(e) % 2 == 1 ? `${e}*` : e;
391
- }, Ct = (e) => {
392
- let t = C(e);
393
- for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === b.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !O(t, n) && !ze(t, n)) {
390
+ return !n || et.test(n) ? e : dt(e) % 2 == 1 ? `${e}*` : e;
391
+ }, Et = (e) => {
392
+ let t = E(e);
393
+ for (let n = e.indexOf("_"); n !== -1; n = e.indexOf("_", n + 1)) if (t.regions[n] === S.PROSE && e[n - 1] !== "_" && e[n + 1] !== "_" && e[n - 1] !== "\\" && !Re(t, n) && !Ve(t, n)) {
394
394
  let t = n > 0 ? e[n - 1] : "", r = n < e.length - 1 ? e[n + 1] : "";
395
395
  if (t && r && N(t) && N(r)) continue;
396
396
  return n;
397
397
  }
398
398
  return -1;
399
- }, wt = (e) => {
399
+ }, Dt = (e) => {
400
400
  let t = e.length;
401
401
  for (; t > 0 && e[t - 1] === "\n";) --t;
402
402
  return t < e.length ? `${e.slice(0, t)}_${e.slice(t)}` : `${e}_`;
403
- }, Tt = (e) => {
403
+ }, Ot = (e) => {
404
404
  if (!e.endsWith("**")) return null;
405
405
  let t = e.slice(0, -2);
406
- if (F(t) % 2 != 1) return null;
407
- let n = t.indexOf("**"), r = Ct(t);
406
+ if (mt(t) % 2 != 1) return null;
407
+ let n = t.indexOf("**"), r = Et(t);
408
408
  return n !== -1 && r !== -1 && n < r ? `${t}_**` : null;
409
- }, Et = (e) => {
410
- if (!j(e, Je)) return e;
411
- let t = Ct(e);
409
+ }, kt = (e) => {
410
+ if (!j(e, Xe)) return e;
411
+ let t = Et(e);
412
412
  if (t === -1) return e;
413
413
  let n = e.substring(t + 1);
414
- if (!n || M.test(n) || k(e, t) || A(e, t)) return e;
415
- if (ut(e) % 2 == 1) {
416
- let t = Tt(e);
417
- return t === null ? wt(e) : t;
414
+ if (!n || et.test(n) || k(e, t) || A(e, t)) return e;
415
+ if (P(e) % 2 == 1) {
416
+ let t = Ot(e);
417
+ return t === null ? Dt(e) : t;
418
418
  }
419
419
  return e;
420
- }, Dt = (e) => {
421
- let t = F(e), n = ct(e);
420
+ }, At = (e) => {
421
+ let t = mt(e), n = dt(e);
422
422
  return t % 2 == 0 && n % 2 == 0;
423
- }, Ot = (e, t, n) => !t || M.test(t) || k(e, n) || A(e, n) ? !0 : rt(e, n, "*"), kt = (e) => {
424
- if (et.test(e)) return e;
425
- let t = j(e, Ke);
423
+ }, jt = (e, t, n) => !t || et.test(t) || k(e, n) || A(e, n) ? !0 : ot(e, n, "*"), Mt = (e) => {
424
+ if (M.test(e)) return e;
425
+ let t = j(e, Je);
426
426
  if (!t) return e;
427
427
  let n = t[2];
428
- return Ot(e, n, e.lastIndexOf(t[1])) ? e : dt(e) % 2 == 1 ? Dt(e) ? e : `${e}***` : e;
429
- }, At = /<[a-zA-Z/][^>]*$/, jt = /[a-zA-Z/]/, Mt = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), Nt = (e, t) => {
428
+ return jt(e, n, e.lastIndexOf(t[1])) ? e : pt(e) % 2 == 1 ? At(e) ? e : `${e}***` : e;
429
+ }, Nt = /<[a-zA-Z/][^>]*$/, Pt = /[a-zA-Z/]/, Ft = (e) => e.includes("$") || e.includes("\\(") || e.includes("\\["), It = (e, t) => {
430
430
  let n = e[t + 1];
431
- return n !== void 0 && jt.test(n);
432
- }, Pt = (e) => {
433
- let t = e.match(At);
431
+ return n !== void 0 && Pt.test(n);
432
+ }, Lt = (e) => {
433
+ let t = e.match(Nt);
434
434
  if (!t || t.index === void 0) return e;
435
- let n = Mt(e);
436
- for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && Nt(e, r) && !k(e, r) && !(n && nt(e, r))) return e.substring(0, r).trimEnd();
435
+ let n = Ft(e);
436
+ for (let r = t.index; r < e.length; r += 1) if (e[r] === "<" && It(e, r) && !k(e, r) && !(n && at(e, r))) return e.substring(0, r).trimEnd();
437
437
  return e;
438
- }, Ft = (e) => {
439
- let t = C(e);
438
+ }, Rt = (e) => {
439
+ let t = E(e);
440
440
  if (t.openFence) return e;
441
441
  let n = t.openSpan;
442
442
  if (!n) return e;
443
443
  let r = e.slice(n.start + n.runLength);
444
- if (!r || M.test(r)) return e;
444
+ if (!r || et.test(r)) return e;
445
445
  let i = 0, a = e.length - 1;
446
446
  for (; a >= 0 && e[a] === "`";) i += 1, --a;
447
447
  return i >= n.runLength ? e : e + "`".repeat(n.runLength - i);
448
- }, It = (e) => je(e, "$"), Lt = (e) => {
449
- let t = C(e), n = 0;
450
- for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === b.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
448
+ }, zt = (e) => O(e, "$"), Bt = (e) => {
449
+ let t = E(e), n = 0;
450
+ for (let r = 0; r < e.length; r += 1) e[r] === "\\" ? r += 1 : t.regions[r] === S.PROSE && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : n += 1);
451
451
  return n;
452
- }, Rt = (e) => {
452
+ }, Vt = (e) => {
453
453
  if (e.endsWith("$") && !e.endsWith("$$")) return `${e}$`;
454
454
  let t = e.indexOf("$$");
455
455
  return t !== -1 && e.indexOf("\n", t) !== -1 && !e.endsWith("\n") ? `${e}
456
456
  $$` : `${e}$$`;
457
- }, zt = (e) => It(e) % 2 == 0 ? e : Rt(e), Bt = (e) => Lt(e) % 2 == 1 ? `${e}$` : e, Vt = "streamdown:incomplete-image", Ht = (e, t, n) => {
457
+ }, Ht = (e) => zt(e) % 2 == 0 ? e : Vt(e), Ut = (e) => Bt(e) % 2 == 1 ? `${e}$` : e, F = "streamdown:incomplete-image", Wt = (e, t, n) => {
458
458
  if (e.substring(t + 2).includes(")")) return null;
459
- let r = P(e, t);
459
+ let r = rt(e, t);
460
460
  if (r === -1 || k(e, r)) return null;
461
461
  let i = r > 0 && e[r - 1] === "!", a = i ? r - 1 : r, o = e.substring(0, a), s = e.substring(r + 1, t);
462
- return i ? `${o}![${s}](${Vt})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
463
- }, Ut = (e, t) => {
462
+ return i ? `${o}![${s}](${F})` : n === "text-only" ? `${o}${s}` : `${o}[${s}](streamdown:incomplete-link)`;
463
+ }, I = (e, t) => {
464
464
  for (let n = 0; n < t; n++) if (e[n] === "[" && !k(e, n)) {
465
465
  if (n > 0 && e[n - 1] === "!") continue;
466
- let t = tt(e, n);
466
+ let t = it(e, n);
467
467
  if (t === -1) return n;
468
468
  if (t + 1 < e.length && e[t + 1] === "(") {
469
469
  let r = e.indexOf(")", t + 2);
@@ -471,69 +471,69 @@ $$` : `${e}$$`;
471
471
  }
472
472
  }
473
473
  return t;
474
- }, Wt = (e, t, n) => {
474
+ }, Gt = (e, t, n) => {
475
475
  let r = t > 0 && e[t - 1] === "!", i = r ? t - 1 : t;
476
- if (!e.substring(t + 1).includes("]") || tt(e, t) === -1) {
476
+ if (!e.substring(t + 1).includes("]") || it(e, t) === -1) {
477
477
  let a = e.substring(0, i);
478
- if (r) return `${a}![${e.substring(t + 1)}](${Vt})`;
478
+ if (r) return `${a}![${e.substring(t + 1)}](${F})`;
479
479
  if (n === "text-only") {
480
- let n = Ut(e, t);
480
+ let n = I(e, t);
481
481
  return e.substring(0, n) + e.substring(n + 1);
482
482
  }
483
483
  return `${e}](streamdown:incomplete-link)`;
484
484
  }
485
485
  return null;
486
- }, I = (e, t) => {
486
+ }, Kt = (e, t) => {
487
487
  let n = e.lastIndexOf("](");
488
488
  if (n !== -1 && !k(e, n)) {
489
- let r = Ht(e, n, t);
489
+ let r = Wt(e, n, t);
490
490
  if (r !== null) return r;
491
491
  }
492
492
  for (let n = e.lastIndexOf("["); n !== -1; n = n === 0 ? -1 : e.lastIndexOf("[", n - 1)) if (!k(e, n)) {
493
- let r = Wt(e, n, t);
493
+ let r = Gt(e, n, t);
494
494
  if (r !== null) return r;
495
495
  }
496
496
  return e;
497
- }, Gt = 32, Kt = (e, t = "protocol") => {
497
+ }, qt = 32, Jt = (e, t = "protocol") => {
498
498
  let n = e;
499
- for (let e = 0; e < Gt; e += 1) {
500
- let e = I(n, t);
499
+ for (let e = 0; e < qt; e += 1) {
500
+ let e = Kt(n, t);
501
501
  if (e.length >= n.length) return e;
502
502
  n = e;
503
503
  }
504
504
  return n;
505
- }, qt = /^-{1,2}$/, Jt = /^[\s]*-{1,2}[\s]+$/, Yt = /^={1,2}$/, Xt = /^[\s]*={1,2}[\s]+$/, Zt = (e) => {
505
+ }, Yt = /^-{1,2}$/, Xt = /^[\s]*-{1,2}[\s]+$/, Zt = /^={1,2}$/, Qt = /^[\s]*={1,2}[\s]+$/, $t = (e) => {
506
506
  if (!e || typeof e != "string") return e;
507
507
  let t = e.lastIndexOf("\n");
508
508
  if (t === -1) return e;
509
509
  let n = e.substring(t + 1), r = e.substring(0, t), i = n.trim();
510
- if (qt.test(i) && !n.match(Jt)) {
510
+ if (Yt.test(i) && !n.match(Xt)) {
511
511
  let t = r.split("\n").at(-1);
512
512
  if (t && t.trim().length > 0) return `${e}\u200B`;
513
513
  }
514
- if (Yt.test(i) && !n.match(Xt)) {
514
+ if (Zt.test(i) && !n.match(Qt)) {
515
515
  let t = r.split("\n").at(-1);
516
516
  if (t && t.trim().length > 0) return `${e}\u200B`;
517
517
  }
518
518
  return e;
519
- }, Qt = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, $t = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(Qt, (t, n, r) => k(e, r + n.length) ? t : `${n}\\~`), en = (e) => je(e, "~"), tn = (e) => {
520
- let t = j(e, Ye);
519
+ }, en = /([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu, tn = (e) => !e || typeof e != "string" || !e.includes("~") ? e : e.replace(en, (t, n, r) => k(e, r + n.length) ? t : `${n}\\~`), nn = (e) => O(e, "~"), rn = (e) => {
520
+ let t = j(e, Ze);
521
521
  if (t) {
522
522
  let n = t[2];
523
- if (!n || M.test(n)) return e;
523
+ if (!n || et.test(n)) return e;
524
524
  let r = e.lastIndexOf(t[1]);
525
525
  if (k(e, r) || A(e, r)) return e;
526
- if (en(e) % 2 == 1) return `${e}~~`;
526
+ if (nn(e) % 2 == 1) return `${e}~~`;
527
527
  } else {
528
- let t = j(e, Ze);
528
+ let t = j(e, $e);
529
529
  if (t) {
530
530
  let n = e.lastIndexOf(t[0].slice(0, 2));
531
531
  if (k(e, n) || A(e, n)) return e;
532
- if (en(e) % 2 == 1) return `${e}~`;
532
+ if (nn(e) % 2 == 1) return `${e}~`;
533
533
  }
534
534
  }
535
535
  return e;
536
- }, nn = (e) => e !== !1, rn = (e) => e === !0, L = {
536
+ }, an = (e) => e !== !1, on = (e) => e === !0, L = {
537
537
  SINGLE_TILDE: 0,
538
538
  COMPARISON_OPERATORS: 5,
539
539
  HTML_TAGS: 10,
@@ -549,11 +549,11 @@ $$` : `${e}$$`;
549
549
  KATEX: 70,
550
550
  INLINE_KATEX: 75,
551
551
  DEFAULT: 100
552
- }, an = [
552
+ }, sn = [
553
553
  {
554
554
  handler: {
555
555
  name: "singleTilde",
556
- handle: $t,
556
+ handle: tn,
557
557
  priority: L.SINGLE_TILDE
558
558
  },
559
559
  optionKey: "singleTilde"
@@ -561,7 +561,7 @@ $$` : `${e}$$`;
561
561
  {
562
562
  handler: {
563
563
  name: "comparisonOperators",
564
- handle: Ue,
564
+ handle: Ge,
565
565
  priority: L.COMPARISON_OPERATORS
566
566
  },
567
567
  optionKey: "comparisonOperators"
@@ -569,7 +569,7 @@ $$` : `${e}$$`;
569
569
  {
570
570
  handler: {
571
571
  name: "htmlTags",
572
- handle: Pt,
572
+ handle: Lt,
573
573
  priority: L.HTML_TAGS
574
574
  },
575
575
  optionKey: "htmlTags"
@@ -577,7 +577,7 @@ $$` : `${e}$$`;
577
577
  {
578
578
  handler: {
579
579
  name: "setextHeadings",
580
- handle: Zt,
580
+ handle: $t,
581
581
  priority: L.SETEXT_HEADINGS
582
582
  },
583
583
  optionKey: "setextHeadings"
@@ -585,7 +585,7 @@ $$` : `${e}$$`;
585
585
  {
586
586
  handler: {
587
587
  name: "links",
588
- handle: Kt,
588
+ handle: Jt,
589
589
  priority: L.LINKS
590
590
  },
591
591
  optionKey: "links",
@@ -594,7 +594,7 @@ $$` : `${e}$$`;
594
594
  {
595
595
  handler: {
596
596
  name: "boldItalic",
597
- handle: kt,
597
+ handle: Mt,
598
598
  priority: L.BOLD_ITALIC
599
599
  },
600
600
  optionKey: "boldItalic"
@@ -602,7 +602,7 @@ $$` : `${e}$$`;
602
602
  {
603
603
  handler: {
604
604
  name: "bold",
605
- handle: _t,
605
+ handle: bt,
606
606
  priority: L.BOLD
607
607
  },
608
608
  optionKey: "bold"
@@ -610,7 +610,7 @@ $$` : `${e}$$`;
610
610
  {
611
611
  handler: {
612
612
  name: "italicDoubleUnderscore",
613
- handle: yt,
613
+ handle: St,
614
614
  priority: L.ITALIC_DOUBLE_UNDERSCORE
615
615
  },
616
616
  optionKey: "italic"
@@ -618,7 +618,7 @@ $$` : `${e}$$`;
618
618
  {
619
619
  handler: {
620
620
  name: "italicSingleAsterisk",
621
- handle: St,
621
+ handle: Tt,
622
622
  priority: L.ITALIC_SINGLE_ASTERISK
623
623
  },
624
624
  optionKey: "italic"
@@ -626,7 +626,7 @@ $$` : `${e}$$`;
626
626
  {
627
627
  handler: {
628
628
  name: "italicSingleUnderscore",
629
- handle: Et,
629
+ handle: kt,
630
630
  priority: L.ITALIC_SINGLE_UNDERSCORE
631
631
  },
632
632
  optionKey: "italic"
@@ -634,7 +634,7 @@ $$` : `${e}$$`;
634
634
  {
635
635
  handler: {
636
636
  name: "inlineCode",
637
- handle: Ft,
637
+ handle: Rt,
638
638
  priority: L.INLINE_CODE
639
639
  },
640
640
  optionKey: "inlineCode"
@@ -642,7 +642,7 @@ $$` : `${e}$$`;
642
642
  {
643
643
  handler: {
644
644
  name: "strikethrough",
645
- handle: tn,
645
+ handle: rn,
646
646
  priority: L.STRIKETHROUGH
647
647
  },
648
648
  optionKey: "strikethrough"
@@ -650,7 +650,7 @@ $$` : `${e}$$`;
650
650
  {
651
651
  handler: {
652
652
  name: "katex",
653
- handle: zt,
653
+ handle: Ht,
654
654
  priority: L.KATEX
655
655
  },
656
656
  optionKey: "katex"
@@ -658,23 +658,23 @@ $$` : `${e}$$`;
658
658
  {
659
659
  handler: {
660
660
  name: "inlineKatex",
661
- handle: Bt,
661
+ handle: Ut,
662
662
  priority: L.INLINE_KATEX
663
663
  },
664
664
  optionKey: "inlineKatex"
665
665
  }
666
- ], on = (e) => {
666
+ ], cn = (e) => {
667
667
  let t = e?.linkMode ?? "protocol";
668
- return an.filter(({ handler: t, optionKey: n }) => t.name === "links" ? nn(e?.links) || nn(e?.images) : t.name === "inlineKatex" ? rn(e?.inlineKatex) : nn(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
669
- handler: me(pe({}, e), { handle: (e) => Kt(e, t) }),
668
+ return sn.filter(({ handler: t, optionKey: n }) => t.name === "links" ? an(e?.links) || an(e?.images) : t.name === "inlineKatex" ? on(e?.inlineKatex) : an(e?.[n])).map(({ handler: e, earlyReturn: n }) => e.name === "links" ? {
669
+ handler: me(pe({}, e), { handle: (e) => Jt(e, t) }),
670
670
  earlyReturn: t === "protocol" ? n : void 0
671
671
  } : {
672
672
  handler: e,
673
673
  earlyReturn: n
674
674
  });
675
- }, sn = (e, t) => {
675
+ }, ln = (e, t) => {
676
676
  if (!e || typeof e != "string") return e;
677
- let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = on(t), i = (t?.handlers ?? []).map((e) => ({
677
+ let n = e.endsWith(" ") && !e.endsWith(" ") ? e.slice(0, -1) : e, r = cn(t), i = (t?.handlers ?? []).map((e) => ({
678
678
  handler: me(pe({}, e), { priority: e.priority ?? L.DEFAULT }),
679
679
  earlyReturn: void 0
680
680
  })), a = [...r, ...i].sort((e, t) => (e.handler.priority ?? 0) - (t.handler.priority ?? 0));
@@ -682,11 +682,11 @@ $$` : `${e}$$`;
682
682
  for (let { handler: e, earlyReturn: t } of a) if (n = e.handle(n), t != null && t(n)) return n;
683
683
  return n.endsWith(" ") && !n.endsWith(" ") ? n.slice(0, -1) : n;
684
684
  } finally {
685
- w();
685
+ D();
686
686
  }
687
687
  };
688
688
  // ../../node_modules/.pnpm/marked@18.1.2/node_modules/marked/lib/marked.esm.js
689
- function cn() {
689
+ function un() {
690
690
  return {
691
691
  async: !1,
692
692
  breaks: !1,
@@ -700,12 +700,12 @@ function cn() {
700
700
  walkTokens: null
701
701
  };
702
702
  }
703
- var ln = cn();
704
- function un(e) {
705
- ln = e;
706
- }
707
- var dn = { exec: () => null };
703
+ var dn = un();
708
704
  function fn(e) {
705
+ dn = e;
706
+ }
707
+ var pn = { exec: () => null };
708
+ function mn(e) {
709
709
  let t = [];
710
710
  return (n) => {
711
711
  let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
@@ -722,7 +722,7 @@ function R(e, t = "") {
722
722
  };
723
723
  return r;
724
724
  }
725
- var pn = ((e = "") => {
725
+ var hn = ((e = "") => {
726
726
  try {
727
727
  return !!RegExp("(?<=1)(?<!1)" + e);
728
728
  } catch {
@@ -784,114 +784,114 @@ var pn = ((e = "") => {
784
784
  notSpaceStart: /^\S*/,
785
785
  endingNewline: /\n$/,
786
786
  listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
787
- nextBulletRegex: fn((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
788
- hrRegex: fn((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
789
- fencesBeginRegex: fn((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
790
- headingBeginRegex: fn((e) => RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),
791
- pedanticHeadingBeginRegex: fn((e) => RegExp(`^ {0,${e}}#`)),
792
- htmlBeginRegex: fn((e) => RegExp(`^ {0,${e}}(?:</?(?:${On})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
793
- blockquoteBeginRegex: fn((e) => RegExp(`^ {0,${e}}>`))
794
- }, mn = /^(?:[ \t]*(?:\n|$))+/, hn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, gn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, _n = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, vn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, yn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, bn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, xn = R(bn).replace(/bull/g, yn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Sn = R(bn).replace(/bull/g, yn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Cn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, wn = /^[^\n]+/, Tn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, En = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Tn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Dn = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, yn).getRegex(), On = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", kn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, An = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", kn).replace("tag", On).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), jn = (e) => R(Cn).replace("hr", _n).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", On).getRegex(), Mn = jn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Nn = jn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Pn = {
795
- blockquote: R(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph", Nn).getRegex(),
796
- code: hn,
797
- def: En,
798
- fences: gn,
799
- heading: vn,
800
- hr: _n,
801
- html: An,
802
- lheading: xn,
803
- list: Dn,
804
- newline: mn,
805
- paragraph: Mn,
806
- table: dn,
807
- text: wn
808
- }, Fn = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", _n).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", On).getRegex(), In = {
809
- ...Pn,
810
- lheading: Sn,
811
- table: Fn,
812
- paragraph: R(Cn).replace("hr", _n).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Fn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", On).getRegex()
813
- }, Ln = {
814
- ...Pn,
815
- html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", kn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
787
+ nextBulletRegex: mn((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
788
+ hrRegex: mn((e) => RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),
789
+ fencesBeginRegex: mn((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
790
+ headingBeginRegex: mn((e) => RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),
791
+ pedanticHeadingBeginRegex: mn((e) => RegExp(`^ {0,${e}}#`)),
792
+ htmlBeginRegex: mn((e) => RegExp(`^ {0,${e}}(?:</?(?:${An})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`, "i")),
793
+ blockquoteBeginRegex: mn((e) => RegExp(`^ {0,${e}}>`))
794
+ }, gn = /^(?:[ \t]*(?:\n|$))+/, _n = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, vn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, yn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, bn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, xn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Sn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Cn = R(Sn).replace(/bull/g, xn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), wn = R(Sn).replace(/bull/g, xn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Tn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, En = /^[^\n]+/, Dn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, On = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), kn = R(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, xn).getRegex(), An = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", jn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Mn = R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", jn).replace("tag", An).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Nn = (e) => R(Tn).replace("hr", yn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", e).replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", An).getRegex(), Pn = Nn(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Fn = Nn(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), In = {
795
+ blockquote: R(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph", Fn).getRegex(),
796
+ code: _n,
797
+ def: On,
798
+ fences: vn,
799
+ heading: bn,
800
+ hr: yn,
801
+ html: Mn,
802
+ lheading: Cn,
803
+ list: kn,
804
+ newline: gn,
805
+ paragraph: Pn,
806
+ table: pn,
807
+ text: En
808
+ }, Ln = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", yn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", An).getRegex(), Rn = {
809
+ ...In,
810
+ lheading: wn,
811
+ table: Ln,
812
+ paragraph: R(Tn).replace("hr", yn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ln).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", " {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag", An).getRegex()
813
+ }, zn = {
814
+ ...In,
815
+ html: R("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", jn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
816
816
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
817
817
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
818
- fences: dn,
818
+ fences: pn,
819
819
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
820
- paragraph: R(Cn).replace("hr", _n).replace("heading", " *#{1,6} *[^\n]").replace("lheading", xn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
821
- }, Rn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, zn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Bn = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Vn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, Hn = /[\s\p{P}\p{S}]/u, Un = /[^\s\p{P}\p{S}]/u, Wn = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Hn).getRegex(), Gn = /[\p{Pi}\p{Ps}"']/u, Kn = /(?!~)[\p{P}\p{S}]/u, qn = /(?!~)[\s\p{P}\p{S}]/u, Jn = /(?:[^\s\p{P}\p{S}]|~)/u, Yn = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", pn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Xn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Zn = R(Xn, "u").replace(/punct/g, B).getRegex(), Qn = R(Xn, "u").replace(/punct/g, Kn).getRegex(), $n = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Gn).replace(/punct/g, B).getRegex(), er = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", tr = R(er, "gu").replace(/notPunctSpace/g, Un).replace(/punctSpace/g, Hn).replace(/punct/g, B).getRegex(), nr = R(er, "gu").replace(/notPunctSpace/g, Jn).replace(/punctSpace/g, qn).replace(/punct/g, Kn).getRegex(), rr = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Un).replace(/punctSpace/g, Hn).replace(/punct/g, B).getRegex(), ir = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Un).replace(/punctSpace/g, Hn).replace(/punct/g, B).getRegex(), ar = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Un).replace(/punctSpace/g, Hn).replace(/punct/g, B).getRegex(), or = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), sr = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Un).replace(/punctSpace/g, Hn).replace(/punct/g, B).getRegex(), cr = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), lr = R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, B).getRegex(), ur = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), dr = R(kn).replace("(?:-->|$)", "-->").getRegex(), fr = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", dr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), pr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, mr = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", pr).getRegex(), hr = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", mr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), gr = R(/^!?\[(label)\]\[(ref)\]/).replace("label", mr).replace("ref", Tn).getRegex(), _r = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Tn).getRegex(), vr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, yr = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", pr).getRegex(), br = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", yr).replace("ref", vr).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", vr).getRegex()).getRegex(), xr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Sr = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), Cr = {
822
- _backpedal: dn,
823
- anyPunctuation: cr,
824
- anyPunctuationOutsideCode: lr,
825
- autolink: ur,
826
- blockSkip: Yn,
827
- br: Bn,
828
- code: zn,
829
- del: dn,
830
- delLDelim: dn,
831
- delRDelim: dn,
832
- emStrongLDelim: Zn,
833
- emStrongRDelimAst: tr,
834
- emStrongRDelimUnd: ir,
835
- escape: Rn,
836
- link: hr,
837
- nolink: _r,
838
- punctuation: Wn,
839
- reflink: gr,
840
- reflinkSearch: br,
841
- tag: fr,
842
- text: Vn,
843
- url: dn
844
- }, wr = {
845
- ...Cr,
820
+ paragraph: R(Tn).replace("hr", yn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Cn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
821
+ }, Bn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Vn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Hn = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Un = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, Wn = /[\s\p{P}\p{S}]/u, Gn = /[^\s\p{P}\p{S}]/u, Kn = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Wn).getRegex(), qn = /[\p{Pi}\p{Ps}"']/u, Jn = /(?!~)[\p{P}\p{S}]/u, Yn = /(?!~)[\s\p{P}\p{S}]/u, Xn = /(?:[^\s\p{P}\p{S}]|~)/u, Zn = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", hn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Qn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, $n = R(Qn, "u").replace(/punct/g, B).getRegex(), er = R(Qn, "u").replace(/punct/g, Jn).getRegex(), tr = R(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, qn).replace(/punct/g, B).getRegex(), nr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rr = R(nr, "gu").replace(/notPunctSpace/g, Gn).replace(/punctSpace/g, Wn).replace(/punct/g, B).getRegex(), ir = R(nr, "gu").replace(/notPunctSpace/g, Xn).replace(/punctSpace/g, Yn).replace(/punct/g, Jn).getRegex(), ar = R("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Gn).replace(/punctSpace/g, Wn).replace(/punct/g, B).getRegex(), or = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Gn).replace(/punctSpace/g, Wn).replace(/punct/g, B).getRegex(), sr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Gn).replace(/punctSpace/g, Wn).replace(/punct/g, B).getRegex(), cr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, B).getRegex(), lr = R("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Gn).replace(/punctSpace/g, Wn).replace(/punct/g, B).getRegex(), ur = R(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), dr = R(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/, "gu").replace(/punct/g, B).getRegex(), fr = R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), pr = R(jn).replace("(?:-->|$)", "-->").getRegex(), mr = R("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", pr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), hr = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, gr = R(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", hr).getRegex(), _r = R(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", gr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vr = R(/^!?\[(label)\]\[(ref)\]/).replace("label", gr).replace("ref", Dn).getRegex(), yr = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Dn).getRegex(), br = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, xr = R(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", hr).getRegex(), Sr = R("reflink|nolink(?!\\()", "g").replace("reflink", R(/^!?\[(label)\]\[(ref)\]/).replace("label", xr).replace("ref", br).getRegex()).replace("nolink", R(/^!?\[(ref)\](?:\[\])?/).replace("ref", br).getRegex()).getRegex(), Cr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, wr = R(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), Tr = {
822
+ _backpedal: pn,
823
+ anyPunctuation: ur,
824
+ anyPunctuationOutsideCode: dr,
825
+ autolink: fr,
826
+ blockSkip: Zn,
827
+ br: Hn,
828
+ code: Vn,
829
+ del: pn,
830
+ delLDelim: pn,
831
+ delRDelim: pn,
846
832
  emStrongLDelim: $n,
847
833
  emStrongRDelimAst: rr,
848
- emStrongRDelimUnd: ar,
849
- link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", mr).getRegex(),
850
- reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", mr).getRegex()
851
- }, Tr = {
852
- ...Cr,
853
- emStrongRDelimAst: nr,
854
- emStrongLDelim: Qn,
855
- delLDelim: or,
856
- delRDelim: sr,
857
- url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", Sr).replace("protocol", xr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
858
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
859
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
860
- text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", xr).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
834
+ emStrongRDelimUnd: or,
835
+ escape: Bn,
836
+ link: _r,
837
+ nolink: yr,
838
+ punctuation: Kn,
839
+ reflink: vr,
840
+ reflinkSearch: Sr,
841
+ tag: mr,
842
+ text: Un,
843
+ url: pn
861
844
  }, Er = {
862
845
  ...Tr,
863
- br: R(Bn).replace("{2,}", "*").getRegex(),
864
- text: R(Tr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
846
+ emStrongLDelim: tr,
847
+ emStrongRDelimAst: ar,
848
+ emStrongRDelimUnd: sr,
849
+ link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", gr).getRegex(),
850
+ reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gr).getRegex()
865
851
  }, Dr = {
866
- normal: Pn,
867
- gfm: In,
868
- pedantic: Ln
852
+ ...Tr,
853
+ emStrongRDelimAst: ir,
854
+ emStrongLDelim: er,
855
+ delLDelim: cr,
856
+ delRDelim: lr,
857
+ url: R(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", wr).replace("protocol", Cr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
858
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
859
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
860
+ text: R(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", Cr).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
869
861
  }, Or = {
870
- normal: Cr,
871
- gfm: Tr,
872
- breaks: Er,
873
- pedantic: wr
862
+ ...Dr,
863
+ br: R(Hn).replace("{2,}", "*").getRegex(),
864
+ text: R(Dr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
874
865
  }, kr = {
866
+ normal: In,
867
+ gfm: Rn,
868
+ pedantic: zn
869
+ }, Ar = {
870
+ normal: Tr,
871
+ gfm: Dr,
872
+ breaks: Or,
873
+ pedantic: Er
874
+ }, jr = {
875
875
  "&": "&amp;",
876
876
  "<": "&lt;",
877
877
  ">": "&gt;",
878
878
  "\"": "&quot;",
879
879
  "'": "&#39;"
880
- }, Ar = (e) => kr[e];
880
+ }, Mr = (e) => jr[e];
881
881
  function V(e, t) {
882
882
  if (t) {
883
- if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, Ar);
884
- } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, Ar);
883
+ if (z.escapeTest.test(e)) return e.replace(z.escapeReplace, Mr);
884
+ } else if (z.escapeTestNoEncode.test(e)) return e.replace(z.escapeReplaceNoEncode, Mr);
885
885
  return e;
886
886
  }
887
- function jr(e) {
887
+ function Nr(e) {
888
888
  return z.numericCharacterReference.test(e) ? e.replace(z.numericCharacterReferenceOrAmpersand, (e, t, n) => {
889
889
  if (t === void 0 && n === void 0) return "&amp;";
890
890
  let r = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
891
891
  return r === 0 || r > 1114111 || r >= 55296 && r <= 57343 ? "�" : r === 38 ? "&amp;" : String.fromCodePoint(r);
892
892
  }) : e;
893
893
  }
894
- function Mr(e) {
894
+ function Pr(e) {
895
895
  try {
896
896
  e = encodeURI(e).replace(z.percentDecode, "%");
897
897
  } catch {
@@ -899,7 +899,7 @@ function Mr(e) {
899
899
  }
900
900
  return e;
901
901
  }
902
- function Nr(e, t) {
902
+ function Fr(e, t) {
903
903
  let n = e.replace(z.findPipe, (e, t, n) => {
904
904
  let r = !1, i = t;
905
905
  for (; --i >= 0 && n[i] === "\\";) r = !r;
@@ -912,7 +912,7 @@ function Nr(e, t) {
912
912
  for (; r < n.length; r++) n[r] = n[r].trim().replace(z.slashPipe, "|");
913
913
  return n;
914
914
  }
915
- function Pr(e, t, n) {
915
+ function Ir(e, t, n) {
916
916
  let r = e.length;
917
917
  if (r === 0) return "";
918
918
  let i = 0;
@@ -924,15 +924,15 @@ function Pr(e, t, n) {
924
924
  }
925
925
  return e.slice(0, r - i);
926
926
  }
927
- function Fr(e) {
927
+ function Lr(e) {
928
928
  let t = e.split("\n"), n = t.length - 1;
929
929
  for (; n >= 0 && z.blankLine.test(t[n]);) n--;
930
930
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
931
931
  }
932
- function Ir(e) {
932
+ function Rr(e) {
933
933
  return e.trim().toLowerCase().toUpperCase().toLowerCase();
934
934
  }
935
- function Lr(e, t) {
935
+ function zr(e, t) {
936
936
  if (e.indexOf(t[0]) === -1 && e.indexOf(t[1]) === -1) return -1;
937
937
  let n = 0;
938
938
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -940,7 +940,7 @@ function Lr(e, t) {
940
940
  else if (e[r] === t[1] && (n--, n < 0)) return r;
941
941
  return n > 0 ? -2 : -1;
942
942
  }
943
- function Rr(e, t = 0) {
943
+ function Br(e, t = 0) {
944
944
  let n = t, r = "";
945
945
  for (let t of e) if (t === " ") {
946
946
  let e = 4 - n % 4;
@@ -948,7 +948,7 @@ function Rr(e, t = 0) {
948
948
  } else r += t, n++;
949
949
  return r;
950
950
  }
951
- function zr(e, t, n, r, i) {
951
+ function Vr(e, t, n, r, i) {
952
952
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1"), c = e[0].charAt(0) === "!", l = r.state.inLink, u = r.state.linkEmitted, d = r.state.inRawBlock;
953
953
  r.state.inLink = !0, r.state.linkEmitted = !1;
954
954
  let f = r.inlineTokens(s), p = r.state.linkEmitted;
@@ -968,7 +968,7 @@ function zr(e, t, n, r, i) {
968
968
  tokens: f
969
969
  };
970
970
  }
971
- function Br(e, t, n) {
971
+ function Hr(e, t, n) {
972
972
  let r = e.match(n.other.indentCodeCompensation);
973
973
  if (r === null) return t;
974
974
  let i = r[1];
@@ -979,7 +979,7 @@ function Br(e, t, n) {
979
979
  return e.slice(Math.min(r.length, i.length));
980
980
  }).join("\n");
981
981
  }
982
- function Vr(e, t, n, r) {
982
+ function Ur(e, t, n, r) {
983
983
  if (!t.includes("<")) return !1;
984
984
  for (let i = 0; i < t.length; i++) {
985
985
  if (t[i] === "\\") {
@@ -1002,12 +1002,12 @@ function Vr(e, t, n, r) {
1002
1002
  }
1003
1003
  return !1;
1004
1004
  }
1005
- var Hr = class {
1005
+ var Wr = class {
1006
1006
  options;
1007
1007
  rules;
1008
1008
  lexer;
1009
1009
  constructor(e) {
1010
- this.options = e || ln;
1010
+ this.options = e || dn;
1011
1011
  }
1012
1012
  space(e) {
1013
1013
  let t = this.rules.block.newline.exec(e);
@@ -1019,7 +1019,7 @@ var Hr = class {
1019
1019
  code(e) {
1020
1020
  let t = this.rules.block.code.exec(e);
1021
1021
  if (t) {
1022
- let e = this.options.pedantic ? t[0] : Fr(t[0]);
1022
+ let e = this.options.pedantic ? t[0] : Lr(t[0]);
1023
1023
  return {
1024
1024
  type: "code",
1025
1025
  raw: e,
@@ -1031,7 +1031,7 @@ var Hr = class {
1031
1031
  fences(e) {
1032
1032
  let t = this.rules.block.fences.exec(e);
1033
1033
  if (t) {
1034
- let e = t[0], n = Br(e, t[3] || "", this.rules);
1034
+ let e = t[0], n = Hr(e, t[3] || "", this.rules);
1035
1035
  return {
1036
1036
  type: "code",
1037
1037
  raw: e,
@@ -1045,12 +1045,12 @@ var Hr = class {
1045
1045
  if (t) {
1046
1046
  let e = t[2].trim();
1047
1047
  if (this.rules.other.endingHash.test(e)) {
1048
- let t = Pr(e, "#");
1048
+ let t = Ir(e, "#");
1049
1049
  (this.options.pedantic || !t || this.rules.other.endingSpaceTabChar.test(t)) && (e = t.trim());
1050
1050
  }
1051
1051
  return {
1052
1052
  type: "heading",
1053
- raw: Pr(t[0], "\n"),
1053
+ raw: Ir(t[0], "\n"),
1054
1054
  depth: t[1].length,
1055
1055
  text: e,
1056
1056
  tokens: this.lexer.inline(e)
@@ -1061,20 +1061,20 @@ var Hr = class {
1061
1061
  let t = this.rules.block.hr.exec(e);
1062
1062
  if (t) return {
1063
1063
  type: "hr",
1064
- raw: Pr(t[0], "\n")
1064
+ raw: Ir(t[0], "\n")
1065
1065
  };
1066
1066
  }
1067
1067
  blockquote(e) {
1068
1068
  let t = this.rules.block.blockquote.exec(e);
1069
1069
  if (t) {
1070
- let e = Pr(t[0], "\n").split("\n"), n = "", r = "", i = [];
1070
+ let e = Ir(t[0], "\n").split("\n"), n = "", r = "", i = [];
1071
1071
  for (; e.length > 0;) {
1072
1072
  let t = !1, a = [], o = 0;
1073
1073
  for (; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
1074
1074
  else if (!t) a.push(e[o]);
1075
1075
  else break;
1076
1076
  e = e.slice(o);
1077
- let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteMarkerWhitespace, (e, t, n) => t + Rr(n, t.length)).replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1077
+ let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteMarkerWhitespace, (e, t, n) => t + Br(n, t.length)).replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
1078
1078
  n = n ? `${n}
1079
1079
  ${s}` : s, r = r ? `${r}
1080
1080
  ${c}` : c;
@@ -1129,12 +1129,12 @@ ${t}`;
1129
1129
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
1130
1130
  let l = r();
1131
1131
  e = e.substring(t[0].length);
1132
- let u = t[2].split("\n", 1)[0], d = t[1].length, f = this.options.pedantic ? Rr(u, d) : u.replace(this.rules.other.leadingSpaceTab, (e) => Rr(e, d)), p = e.split("\n", 1)[0], ee = !f.trim(), m = 0;
1132
+ let u = t[2].split("\n", 1)[0], d = t[1].length, f = this.options.pedantic ? Br(u, d) : u.replace(this.rules.other.leadingSpaceTab, (e) => Br(e, d)), p = e.split("\n", 1)[0], ee = !f.trim(), m = 0;
1133
1133
  if (this.options.pedantic ? (m = 2, a = f.trimStart()) : ee ? m = d + 1 : (m = f.search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, a = f.slice(m), m += d), ee && this.rules.other.blankLine.test(p) && (e = e.substring(p.length + 1), i = !0), !i) {
1134
1134
  let t = this.rules.other.nextBulletRegex(m), n = this.rules.other.hrRegex(m), r = this.rules.other.fencesBeginRegex(m), i = this.options.pedantic ? this.rules.other.pedanticHeadingBeginRegex(m) : this.rules.other.headingBeginRegex(m), o = this.rules.other.htmlBeginRegex(m), s = this.rules.other.blockquoteBeginRegex(m);
1135
1135
  for (; e;) {
1136
1136
  let c = e.split("\n", 1)[0], l;
1137
- if (p = c, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), l = p) : l = p.replace(this.rules.other.leadingSpaceTab, (e) => Rr(e)), r.test(p) || i.test(p) || o.test(p) || s.test(p) || t.test(p) || n.test(p)) break;
1137
+ if (p = c, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), l = p) : l = p.replace(this.rules.other.leadingSpaceTab, (e) => Br(e)), r.test(p) || i.test(p) || o.test(p) || s.test(p) || t.test(p) || n.test(p)) break;
1138
1138
  if (l.search(this.rules.other.nonSpaceChar) >= m || !p.trim()) a += "\n" + l.slice(m);
1139
1139
  else {
1140
1140
  if (ee || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || r.test(f) || i.test(f) || n.test(f)) break;
@@ -1197,7 +1197,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1197
1197
  html(e) {
1198
1198
  let t = this.rules.block.html.exec(e);
1199
1199
  if (t) {
1200
- let e = Fr(t[0]);
1200
+ let e = Lr(t[0]);
1201
1201
  return {
1202
1202
  type: "html",
1203
1203
  block: !0,
@@ -1210,12 +1210,12 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1210
1210
  def(e) {
1211
1211
  let t = this.rules.block.def.exec(e);
1212
1212
  if (t) {
1213
- if (!this.rules.other.startAngleBracket.test(t[2]) && Lr(t[2], "()") !== -1) return;
1214
- let e = Ir(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1213
+ if (!this.rules.other.startAngleBracket.test(t[2]) && zr(t[2], "()") !== -1) return;
1214
+ let e = Rr(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
1215
1215
  return {
1216
1216
  type: "def",
1217
1217
  tag: e,
1218
- raw: Pr(t[0], "\n"),
1218
+ raw: Ir(t[0], "\n"),
1219
1219
  href: n,
1220
1220
  title: r
1221
1221
  };
@@ -1224,9 +1224,9 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1224
1224
  table(e) {
1225
1225
  let t = this.rules.block.table.exec(e);
1226
1226
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1227
- let n = Nr(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1227
+ let n = Fr(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
1228
1228
  type: "table",
1229
- raw: Pr(t[0], "\n"),
1229
+ raw: Ir(t[0], "\n"),
1230
1230
  header: [],
1231
1231
  align: [],
1232
1232
  rows: []
@@ -1239,7 +1239,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1239
1239
  header: !0,
1240
1240
  align: a.align[e]
1241
1241
  });
1242
- for (let e of i) a.rows.push(Nr(e, a.header.length).map((e, t) => ({
1242
+ for (let e of i) a.rows.push(Fr(e, a.header.length).map((e, t) => ({
1243
1243
  text: e,
1244
1244
  tokens: this.lexer.inline(e),
1245
1245
  header: !1,
@@ -1254,7 +1254,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1254
1254
  let e = t[1].trim();
1255
1255
  return {
1256
1256
  type: "heading",
1257
- raw: Pr(t[0], "\n"),
1257
+ raw: Ir(t[0], "\n"),
1258
1258
  depth: t[2].charAt(0) === "=" ? 1 : 2,
1259
1259
  text: e,
1260
1260
  tokens: this.lexer.inline(e)
@@ -1306,14 +1306,14 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1306
1306
  let t = this.rules.inline.link.exec(e);
1307
1307
  if (t) {
1308
1308
  let n = t[0].charAt(0) === "!" ? 2 : 1;
1309
- if (!this.options.pedantic && Vr(e, t[1], n, this.rules)) return;
1309
+ if (!this.options.pedantic && Ur(e, t[1], n, this.rules)) return;
1310
1310
  let r = t[2].trim();
1311
1311
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
1312
1312
  if (!this.rules.other.endAngleBracket.test(r)) return;
1313
- let e = Pr(r.slice(0, -1), "\\");
1313
+ let e = Ir(r.slice(0, -1), "\\");
1314
1314
  if ((r.length - e.length) % 2 == 0) return;
1315
1315
  } else {
1316
- let e = Lr(t[2], "()");
1316
+ let e = zr(t[2], "()");
1317
1317
  if (e === -2) return;
1318
1318
  if (e > -1) {
1319
1319
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -1325,7 +1325,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1325
1325
  let e = this.rules.other.pedanticHrefTitle.exec(i);
1326
1326
  e && (i = e[1], a = e[3]);
1327
1327
  } else a = t[3] ? t[3].slice(1, -1) : "";
1328
- return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), zr(t, {
1328
+ return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (i = this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? i.slice(1) : i.slice(1, -1)), Vr(t, {
1329
1329
  href: i && i.replace(this.rules.inline.anyPunctuation, "$1"),
1330
1330
  title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
1331
1331
  }, t[0], this.lexer, this.rules);
@@ -1335,8 +1335,8 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1335
1335
  let n;
1336
1336
  if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
1337
1337
  let r = n[0].charAt(0) === "!" ? 2 : 1;
1338
- if (!this.options.pedantic && Vr(e, n[1], r, this.rules)) return;
1339
- let i = t[Ir((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1338
+ if (!this.options.pedantic && Ur(e, n[1], r, this.rules)) return;
1339
+ let i = t[Rr((n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "))];
1340
1340
  if (!i) {
1341
1341
  let e = n[0].charAt(0);
1342
1342
  return {
@@ -1345,7 +1345,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1345
1345
  text: e
1346
1346
  };
1347
1347
  }
1348
- return zr(n, i, n[0], this.lexer, this.rules);
1348
+ return Vr(n, i, n[0], this.lexer, this.rules);
1349
1349
  }
1350
1350
  }
1351
1351
  emStrong(e, t, n = "") {
@@ -1486,7 +1486,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1486
1486
  return {
1487
1487
  type: "text",
1488
1488
  raw: t[0],
1489
- text: e ? t[0] : jr(t[0]),
1489
+ text: e ? t[0] : Nr(t[0]),
1490
1490
  escaped: e
1491
1491
  };
1492
1492
  }
@@ -1498,7 +1498,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1498
1498
  inlineQueue;
1499
1499
  tokenizer;
1500
1500
  constructor(e) {
1501
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || ln, this.options.tokenizer = this.options.tokenizer || new Hr(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1501
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || dn, this.options.tokenizer = this.options.tokenizer || new Wr(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1502
1502
  inLink: !1,
1503
1503
  inRawBlock: !1,
1504
1504
  linkEmitted: !1,
@@ -1507,15 +1507,15 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1507
1507
  };
1508
1508
  let t = {
1509
1509
  other: z,
1510
- block: Dr.normal,
1511
- inline: Or.normal
1510
+ block: kr.normal,
1511
+ inline: Ar.normal
1512
1512
  };
1513
- this.options.pedantic ? (t.block = Dr.pedantic, t.inline = Or.pedantic) : this.options.gfm && (t.block = Dr.gfm, t.inline = this.options.breaks ? Or.breaks : Or.gfm), this.tokenizer.rules = t;
1513
+ this.options.pedantic ? (t.block = kr.pedantic, t.inline = Ar.pedantic) : this.options.gfm && (t.block = kr.gfm, t.inline = this.options.breaks ? Ar.breaks : Ar.gfm), this.tokenizer.rules = t;
1514
1514
  }
1515
1515
  static get rules() {
1516
1516
  return {
1517
- block: Dr,
1518
- inline: Or
1517
+ block: kr,
1518
+ inline: Ar
1519
1519
  };
1520
1520
  }
1521
1521
  static lex(t, n) {
@@ -1605,7 +1605,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1605
1605
  for (let n of e.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t.test(n[0]) && e.charAt(n.index - 1) !== "!") return !0;
1606
1606
  for (let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
1607
1607
  let e = t[0], n = e.lastIndexOf("[");
1608
- if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, Ir(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1608
+ if (e.charAt(0) !== "!" && Object.hasOwn(this.tokens.links, Rr(e.slice(n + 1, -1))) && !(n > 1 && this.linkInText(e.slice(1, n - 1)))) return !0;
1609
1609
  }
1610
1610
  return !1;
1611
1611
  }
@@ -1620,7 +1620,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1620
1620
  }
1621
1621
  }
1622
1622
  #e(e, t) {
1623
- let n = e.includes("*") || e.includes("_") || e.includes("~") || this.options.hooks?.emStrongMask || this.tokenizer.emStrong !== Hr.prototype.emStrong || this.tokenizer.del !== Hr.prototype.del ? this.#t(e) : e, r = !1, i = "", a = 1 / 0;
1623
+ let n = e.includes("*") || e.includes("_") || e.includes("~") || this.options.hooks?.emStrongMask || this.tokenizer.emStrong !== Wr.prototype.emStrong || this.tokenizer.del !== Wr.prototype.del ? this.#t(e) : e, r = !1, i = "", a = 1 / 0;
1624
1624
  for (; e;) {
1625
1625
  if (e.length < a) a = e.length;
1626
1626
  else {
@@ -1667,7 +1667,7 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1667
1667
  if (this.tokens.links && e.includes("[")) {
1668
1668
  let e = this.tokenizer.rules.inline.reflinkSearch, n = (t) => {
1669
1669
  let r = t.lastIndexOf("[");
1670
- if (!Object.hasOwn(this.tokens.links, Ir(t.slice(r + 1, -1)))) return t;
1670
+ if (!Object.hasOwn(this.tokens.links, Rr(t.slice(r + 1, -1)))) return t;
1671
1671
  if (r > 1 && t.charAt(0) !== "!") {
1672
1672
  let i = t.slice(1, r - 1);
1673
1673
  if (this.linkInText(i)) return "[" + i.replace(e, n) + "][" + "a".repeat(t.length - r - 2) + "]";
@@ -1686,11 +1686,11 @@ ${p}`) ? ` ${l.replace(/^ {0,3}/, "")}` : p;
1686
1686
  if (this.options.silent) console.error(t);
1687
1687
  else throw Error(t);
1688
1688
  }
1689
- }, Ur = class {
1689
+ }, Gr = class {
1690
1690
  options;
1691
1691
  parser;
1692
1692
  constructor(e) {
1693
- this.options = e || ln;
1693
+ this.options = e || dn;
1694
1694
  }
1695
1695
  space(e) {
1696
1696
  return "";
@@ -1776,7 +1776,7 @@ ${e}</tr>
1776
1776
  return `<del>${this.parser.parseInline(e)}</del>`;
1777
1777
  }
1778
1778
  link({ href: e, title: t, text: n, tokens: r, autolink: i }) {
1779
- let a = i ? V(n, !0) : this.parser.parseInline(r), o = Mr(e);
1779
+ let a = i ? V(n, !0) : this.parser.parseInline(r), o = Pr(e);
1780
1780
  if (o === null) return a;
1781
1781
  e = V(o, i);
1782
1782
  let s = "<a href=\"" + e + "\"";
@@ -1784,7 +1784,7 @@ ${e}</tr>
1784
1784
  }
1785
1785
  image({ href: e, title: t, text: n, tokens: r }) {
1786
1786
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1787
- let i = Mr(e);
1787
+ let i = Pr(e);
1788
1788
  if (i === null) return V(n);
1789
1789
  e = i;
1790
1790
  let a = `<img src="${V(e)}" alt="${V(n)}"`;
@@ -1793,7 +1793,7 @@ ${e}</tr>
1793
1793
  text(e) {
1794
1794
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : V(e.text);
1795
1795
  }
1796
- }, Wr = class {
1796
+ }, Kr = class {
1797
1797
  parser;
1798
1798
  strong({ text: e, tokens: t }) {
1799
1799
  return t ? this.parser.parseInline(t, this) : e;
@@ -1830,7 +1830,7 @@ ${e}</tr>
1830
1830
  renderer;
1831
1831
  textRenderer;
1832
1832
  constructor(e) {
1833
- this.options = e || ln, this.options.renderer = this.options.renderer || new Ur(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Wr(), this.textRenderer.parser = this;
1833
+ this.options = e || dn, this.options.renderer = this.options.renderer || new Gr(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Kr(), this.textRenderer.parser = this;
1834
1834
  }
1835
1835
  static parse(t, n) {
1836
1836
  return new e(n).parse(t);
@@ -1978,11 +1978,11 @@ ${e}</tr>
1978
1978
  }
1979
1979
  return n;
1980
1980
  }
1981
- }, Gr = class {
1981
+ }, qr = class {
1982
1982
  options;
1983
1983
  block;
1984
1984
  constructor(e) {
1985
- this.options = e || ln;
1985
+ this.options = e || dn;
1986
1986
  }
1987
1987
  static passThroughHooks = /* @__PURE__ */ new Set([
1988
1988
  "preprocess",
@@ -2014,44 +2014,44 @@ ${e}</tr>
2014
2014
  return e ? U.parse : U.parseInline;
2015
2015
  }
2016
2016
  };
2017
- function Kr(e, t) {
2017
+ function Jr(e, t) {
2018
2018
  if (Array.isArray(t)) for (let n = 0; n < t.length; n++) e.push(t[n]);
2019
2019
  else e.push(t);
2020
2020
  }
2021
- var qr = new class {
2022
- defaults = cn();
2021
+ var Yr = new class {
2022
+ defaults = un();
2023
2023
  options = this.setOptions;
2024
2024
  parse = this.parseMarkdown(!0);
2025
2025
  parseInline = this.parseMarkdown(!1);
2026
2026
  Parser = U;
2027
- Renderer = Ur;
2028
- TextRenderer = Wr;
2027
+ Renderer = Gr;
2028
+ TextRenderer = Kr;
2029
2029
  Lexer = H;
2030
- Tokenizer = Hr;
2031
- Hooks = Gr;
2030
+ Tokenizer = Wr;
2031
+ Hooks = qr;
2032
2032
  constructor(...e) {
2033
2033
  this.use(...e);
2034
2034
  }
2035
2035
  walkTokens(e, t) {
2036
2036
  let n = [];
2037
- for (let r of e) switch (Kr(n, t.call(this, r)), r.type) {
2037
+ for (let r of e) switch (Jr(n, t.call(this, r)), r.type) {
2038
2038
  case "table": {
2039
2039
  let e = r;
2040
- for (let r of e.header) Kr(n, this.walkTokens(r.tokens, t));
2041
- for (let r of e.rows) for (let e of r) Kr(n, this.walkTokens(e.tokens, t));
2040
+ for (let r of e.header) Jr(n, this.walkTokens(r.tokens, t));
2041
+ for (let r of e.rows) for (let e of r) Jr(n, this.walkTokens(e.tokens, t));
2042
2042
  break;
2043
2043
  }
2044
2044
  case "list": {
2045
2045
  let e = r;
2046
- Kr(n, this.walkTokens(e.items, t));
2046
+ Jr(n, this.walkTokens(e.items, t));
2047
2047
  break;
2048
2048
  }
2049
2049
  default: {
2050
2050
  let e = r;
2051
2051
  this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
2052
2052
  let i = e[r].flat(1 / 0);
2053
- Kr(n, this.walkTokens(i, t));
2054
- }) : e.tokens && Kr(n, this.walkTokens(e.tokens, t));
2053
+ Jr(n, this.walkTokens(i, t));
2054
+ }) : e.tokens && Jr(n, this.walkTokens(e.tokens, t));
2055
2055
  }
2056
2056
  }
2057
2057
  return n;
@@ -2079,7 +2079,7 @@ var qr = new class {
2079
2079
  }
2080
2080
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
2081
2081
  }), n.extensions = t), e.renderer) {
2082
- let t = this.defaults.renderer || new Ur(this.defaults);
2082
+ let t = this.defaults.renderer || new Gr(this.defaults);
2083
2083
  for (let n in e.renderer) {
2084
2084
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
2085
2085
  if (["options", "parser"].includes(n)) continue;
@@ -2092,7 +2092,7 @@ var qr = new class {
2092
2092
  n.renderer = t;
2093
2093
  }
2094
2094
  if (e.tokenizer) {
2095
- let t = this.defaults.tokenizer || new Hr(this.defaults);
2095
+ let t = this.defaults.tokenizer || new Wr(this.defaults);
2096
2096
  for (let n in e.tokenizer) {
2097
2097
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
2098
2098
  if ([
@@ -2109,13 +2109,13 @@ var qr = new class {
2109
2109
  n.tokenizer = t;
2110
2110
  }
2111
2111
  if (e.hooks) {
2112
- let t = this.defaults.hooks || new Gr();
2112
+ let t = this.defaults.hooks || new qr();
2113
2113
  for (let n in e.hooks) {
2114
2114
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
2115
2115
  if (["options", "block"].includes(n)) continue;
2116
2116
  let r = n, i = e.hooks[r], a = t[r];
2117
- t[r] = Gr.passThroughHooks.has(n) ? (e) => {
2118
- if (t.options.async && Gr.passThroughHooksRespectAsync.has(n)) return (async () => {
2117
+ t[r] = qr.passThroughHooks.has(n) ? (e) => {
2118
+ if (t.options.async && qr.passThroughHooksRespectAsync.has(n)) return (async () => {
2119
2119
  let n = await i.call(t, e);
2120
2120
  return a.call(t, n);
2121
2121
  })();
@@ -2136,7 +2136,7 @@ var qr = new class {
2136
2136
  let t = this.defaults.walkTokens, r = e.walkTokens;
2137
2137
  n.walkTokens = function(e) {
2138
2138
  let n = [];
2139
- return n.push(r.call(this, e)), t && Kr(n, t.call(this, e)), n;
2139
+ return n.push(r.call(this, e)), t && Jr(n, t.call(this, e)), n;
2140
2140
  };
2141
2141
  }
2142
2142
  this.defaults = {
@@ -2195,30 +2195,30 @@ var qr = new class {
2195
2195
  }
2196
2196
  }();
2197
2197
  function W(e, t) {
2198
- return qr.parse(e, t);
2198
+ return Yr.parse(e, t);
2199
2199
  }
2200
2200
  W.options = W.setOptions = function(e) {
2201
- return qr.setOptions(e), W.defaults = qr.defaults, un(W.defaults), W;
2202
- }, W.getDefaults = cn, W.defaults = ln;
2203
- function Jr(...e) {
2204
- return qr.use(...e), W.defaults = qr.defaults, un(W.defaults), W;
2201
+ return Yr.setOptions(e), W.defaults = Yr.defaults, fn(W.defaults), W;
2202
+ }, W.getDefaults = un, W.defaults = dn;
2203
+ function Xr(...e) {
2204
+ return Yr.use(...e), W.defaults = Yr.defaults, fn(W.defaults), W;
2205
2205
  }
2206
- W.use = Jr, W.walkTokens = function(e, t) {
2207
- return qr.walkTokens(e, t);
2208
- }, W.parseInline = qr.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = Ur, W.TextRenderer = Wr, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Hr, W.Hooks = Gr, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2206
+ W.use = Xr, W.walkTokens = function(e, t) {
2207
+ return Yr.walkTokens(e, t);
2208
+ }, W.parseInline = Yr.parseInline, W.Parser = U, W.parser = U.parse, W.Renderer = Gr, W.TextRenderer = Kr, W.Lexer = H, W.lexer = H.lex, W.Tokenizer = Wr, W.Hooks = qr, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, U.parse, H.lex;
2209
2209
  // ../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
2210
- function Yr(e, t) {
2210
+ function Zr(e, t) {
2211
2211
  this.v = e, this.k = t;
2212
2212
  }
2213
- function Xr(e, t) {
2213
+ function Qr(e, t) {
2214
2214
  (t == null || t > e.length) && (t = e.length);
2215
2215
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2216
2216
  return r;
2217
2217
  }
2218
- function Zr(e) {
2218
+ function $r(e) {
2219
2219
  if (Array.isArray(e)) return e;
2220
2220
  }
2221
- function Qr(e, t) {
2221
+ function ei(e, t) {
2222
2222
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2223
2223
  if (n != null) {
2224
2224
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -2239,24 +2239,24 @@ function Qr(e, t) {
2239
2239
  return s;
2240
2240
  }
2241
2241
  }
2242
- function $r() {
2242
+ function ti() {
2243
2243
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2244
2244
  }
2245
- function ei(e, t) {
2246
- return Zr(e) || Qr(e, t) || ti(e, t) || $r();
2245
+ function ni(e, t) {
2246
+ return $r(e) || ei(e, t) || ri(e, t) || ti();
2247
2247
  }
2248
- function ti(e, t) {
2248
+ function ri(e, t) {
2249
2249
  if (e) {
2250
- if (typeof e == "string") return Xr(e, t);
2250
+ if (typeof e == "string") return Qr(e, t);
2251
2251
  var n = {}.toString.call(e).slice(8, -1);
2252
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Xr(e, t) : void 0;
2252
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Qr(e, t) : void 0;
2253
2253
  }
2254
2254
  }
2255
- function ni(e) {
2255
+ function ii(e) {
2256
2256
  var t, n;
2257
2257
  function r(t, n) {
2258
2258
  try {
2259
- var a = e[t](n), o = a.value, s = o instanceof Yr;
2259
+ var a = e[t](n), o = a.value, s = o instanceof Zr;
2260
2260
  Promise.resolve(s ? o.v : o).then(function(n) {
2261
2261
  if (s) {
2262
2262
  var c = t === "return" && o.k ? t : "next";
@@ -2290,119 +2290,119 @@ function ni(e) {
2290
2290
  });
2291
2291
  }, typeof e.return != "function" && (this.return = void 0);
2292
2292
  }
2293
- ni.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2293
+ ii.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
2294
2294
  return this;
2295
- }, ni.prototype.next = function(e) {
2295
+ }, ii.prototype.next = function(e) {
2296
2296
  return this._invoke("next", e);
2297
- }, ni.prototype.throw = function(e) {
2297
+ }, ii.prototype.throw = function(e) {
2298
2298
  return this._invoke("throw", e);
2299
- }, ni.prototype.return = function(e) {
2299
+ }, ii.prototype.return = function(e) {
2300
2300
  return this._invoke("return", e);
2301
2301
  };
2302
- var ri = Object.entries, ii = Object.setPrototypeOf, ai = Object.isFrozen, oi = Object.getPrototypeOf, si = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, ci = Object.create, li = typeof Reflect < "u" && Reflect, ui = li.apply, di = li.construct;
2302
+ var ai = Object.entries, oi = Object.setPrototypeOf, si = Object.isFrozen, ci = Object.getPrototypeOf, li = Object.getOwnPropertyDescriptor, G = Object.freeze, K = Object.seal, ui = Object.create, di = typeof Reflect < "u" && Reflect, fi = di.apply, pi = di.construct;
2303
2303
  G ||= function(e) {
2304
2304
  return e;
2305
2305
  }, K ||= function(e) {
2306
2306
  return e;
2307
- }, ui ||= function(e, t) {
2307
+ }, fi ||= function(e, t) {
2308
2308
  var n = [...arguments].slice(2);
2309
2309
  return e.apply(t, n);
2310
- }, di ||= function(e) {
2310
+ }, pi ||= function(e) {
2311
2311
  return new e(...[...arguments].slice(1));
2312
2312
  };
2313
- var fi = Y(Array.prototype.forEach);
2313
+ var mi = Y(Array.prototype.forEach);
2314
2314
  Array.prototype.indexOf;
2315
- var pi = Y(Array.prototype.lastIndexOf), mi = Y(Array.prototype.pop), hi = Y(Array.prototype.push), gi = Y(Array.prototype.slice), _i = Y(Array.prototype.splice), vi = Array.isArray, yi = Pi(Set), bi = Y(Set.prototype.add), xi = Y(Set.prototype.has), Si = Y(String.prototype.toLowerCase), Ci = Y(String.prototype.toString), wi = Y(String.prototype.match), Ti = Y(String.prototype.replace), Ei = Y(String.prototype.indexOf), Di = Y(String.prototype.trim), Oi = Y(Number.prototype.toString), ki = Y(Boolean.prototype.toString), Ai = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), ji = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), Mi = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), Ni = Pi(TypeError);
2315
+ var hi = Y(Array.prototype.lastIndexOf), gi = Y(Array.prototype.pop), _i = Y(Array.prototype.push), vi = Y(Array.prototype.slice), yi = Y(Array.prototype.splice), bi = Array.isArray, xi = Ii(Set), Si = Y(Set.prototype.add), Ci = Y(Set.prototype.has), wi = Y(String.prototype.toLowerCase), Ti = Y(String.prototype.toString), Ei = Y(String.prototype.match), Di = Y(String.prototype.replace), Oi = Y(String.prototype.indexOf), ki = Y(String.prototype.trim), Ai = Y(Number.prototype.toString), ji = Y(Boolean.prototype.toString), Mi = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), Ni = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), q = Y(Object.prototype.hasOwnProperty), Pi = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), Fi = Ii(TypeError);
2316
2316
  function Y(e) {
2317
2317
  return function(t) {
2318
2318
  t instanceof RegExp && (t.lastIndex = 0);
2319
2319
  var n = [...arguments].slice(1);
2320
- return ui(e, t, n);
2320
+ return fi(e, t, n);
2321
2321
  };
2322
2322
  }
2323
- function Pi(e) {
2323
+ function Ii(e) {
2324
2324
  return function() {
2325
- return di(e, [...arguments]);
2325
+ return pi(e, [...arguments]);
2326
2326
  };
2327
2327
  }
2328
2328
  function X(e, t) {
2329
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Si;
2330
- if (ii && ii(e, null), !vi(t)) return e;
2329
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wi;
2330
+ if (oi && oi(e, null), !bi(t)) return e;
2331
2331
  let r = t.length;
2332
2332
  for (; r--;) {
2333
2333
  let i = t[r];
2334
2334
  if (typeof i == "string") {
2335
2335
  let e = n(i);
2336
- e !== i && (ai(t) || (t[r] = e), i = e);
2336
+ e !== i && (si(t) || (t[r] = e), i = e);
2337
2337
  }
2338
2338
  e[i] = !0;
2339
2339
  }
2340
2340
  return e;
2341
2341
  }
2342
- function Fi(e) {
2342
+ function Li(e) {
2343
2343
  for (let t = 0; t < e.length; t++) q(e, t) || (e[t] = null);
2344
2344
  return e;
2345
2345
  }
2346
2346
  function Z(e) {
2347
- let t = ci(null);
2348
- for (let r of ri(e)) {
2349
- var n = ei(r, 2);
2347
+ let t = ui(null);
2348
+ for (let r of ai(e)) {
2349
+ var n = ni(r, 2);
2350
2350
  let i = n[0], a = n[1];
2351
- q(e, i) && (t[i] = vi(a) ? Fi(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2351
+ q(e, i) && (t[i] = bi(a) ? Li(a) : a && typeof a == "object" && a.constructor === Object ? Z(a) : a);
2352
2352
  }
2353
2353
  return t;
2354
2354
  }
2355
- function Ii(e) {
2355
+ function Ri(e) {
2356
2356
  switch (typeof e) {
2357
2357
  case "string": return e;
2358
- case "number": return Oi(e);
2359
- case "boolean": return ki(e);
2360
- case "bigint": return Ai ? Ai(e) : "0";
2361
- case "symbol": return ji ? ji(e) : "Symbol()";
2362
- case "undefined": return Mi(e);
2358
+ case "number": return Ai(e);
2359
+ case "boolean": return ji(e);
2360
+ case "bigint": return Mi ? Mi(e) : "0";
2361
+ case "symbol": return Ni ? Ni(e) : "Symbol()";
2362
+ case "undefined": return Pi(e);
2363
2363
  case "function":
2364
2364
  case "object": {
2365
- if (e === null) return Mi(e);
2365
+ if (e === null) return Pi(e);
2366
2366
  let t = e, n = Q(t, "toString");
2367
2367
  if (typeof n == "function") {
2368
2368
  let e = n(t);
2369
- return typeof e == "string" ? e : Mi(e);
2369
+ return typeof e == "string" ? e : Pi(e);
2370
2370
  }
2371
- return Mi(e);
2371
+ return Pi(e);
2372
2372
  }
2373
- default: return Mi(e);
2373
+ default: return Pi(e);
2374
2374
  }
2375
2375
  }
2376
2376
  function Q(e, t) {
2377
2377
  for (; e !== null;) {
2378
- let n = si(e, t);
2378
+ let n = li(e, t);
2379
2379
  if (n) {
2380
2380
  if (n.get) return Y(n.get);
2381
2381
  if (typeof n.value == "function") return Y(n.value);
2382
2382
  }
2383
- e = oi(e);
2383
+ e = ci(e);
2384
2384
  }
2385
2385
  function n() {
2386
2386
  return null;
2387
2387
  }
2388
2388
  return n;
2389
2389
  }
2390
- function Li(e, t) {
2390
+ function zi(e, t) {
2391
2391
  for (; e !== null;) {
2392
- let n = si(e, t);
2392
+ let n = li(e, t);
2393
2393
  if (n) return n.get ? Y(n.get) : null;
2394
- e = oi(e);
2394
+ e = ci(e);
2395
2395
  }
2396
2396
  return null;
2397
2397
  }
2398
- function Ri(e) {
2398
+ function Bi(e) {
2399
2399
  try {
2400
2400
  return J(e, ""), !0;
2401
2401
  } catch {
2402
2402
  return !1;
2403
2403
  }
2404
2404
  }
2405
- var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Bi = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Vi = G([
2405
+ var Vi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Hi = G(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Ui = G([
2406
2406
  "feBlend",
2407
2407
  "feColorMatrix",
2408
2408
  "feComponentTransfer",
@@ -2428,7 +2428,7 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2428
2428
  "feSpotLight",
2429
2429
  "feTile",
2430
2430
  "feTurbulence"
2431
- ]), Hi = G([
2431
+ ]), Wi = G([
2432
2432
  "animate",
2433
2433
  "color-profile",
2434
2434
  "cursor",
@@ -2451,7 +2451,7 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2451
2451
  "solidcolor",
2452
2452
  "unknown",
2453
2453
  "use"
2454
- ]), Ui = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Wi = G([
2454
+ ]), Gi = G(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Ki = G([
2455
2455
  "maction",
2456
2456
  "maligngroup",
2457
2457
  "malignmark",
@@ -2467,13 +2467,13 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2467
2467
  "annotation-xml",
2468
2468
  "mprescripts",
2469
2469
  "none"
2470
- ]), Gi = G(["#text"]), Ki = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), qi = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ji = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Yi = G([
2470
+ ]), qi = G(["#text"]), Ji = G(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Yi = G(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Xi = G(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Zi = G([
2471
2471
  "xlink:href",
2472
2472
  "xml:id",
2473
2473
  "xlink:title",
2474
2474
  "xml:space",
2475
2475
  "xmlns:xlink"
2476
- ]), Xi = K(/{{[\w\W]*|^[\w\W]*}}/g), Zi = K(/<%[\w\W]*|^[\w\W]*%>/g), Qi = K(/\${[\w\W]*/g), $i = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), ea = K(/^aria-[\-\w]+$/), ta = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), na = K(/^(?:\w+script|data):/i), ra = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), ia = K(/^html$/i), aa = K(/^[a-z][.\w]*(-[.\w]+)+$/i), oa = K(/<[/\w!]/g), sa = K(/<[/\w]/g), ca = K(/<\/no(script|embed|frames)/i), la = K(/\/>/i), $ = {
2476
+ ]), Qi = K(/{{[\w\W]*|^[\w\W]*}}/g), $i = K(/<%[\w\W]*|^[\w\W]*%>/g), ea = K(/\${[\w\W]*/g), ta = K(/^data-[\-\w.\u00B7-\uFFFF]+$/), na = K(/^aria-[\-\w]+$/), ra = K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ia = K(/^(?:\w+script|data):/i), aa = K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), oa = K(/^html$/i), sa = K(/^[a-z][.\w]*(-[.\w]+)+$/i), ca = K(/<[/\w!]/g), la = K(/<[/\w]/g), ua = K(/<\/no(script|embed|frames)/i), da = K(/\/>/i), $ = {
2477
2477
  element: 1,
2478
2478
  attribute: 2,
2479
2479
  text: 3,
@@ -2486,7 +2486,7 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2486
2486
  documentType: 10,
2487
2487
  documentFragment: 11,
2488
2488
  notation: 12
2489
- }, ua = G(X({}, [
2489
+ }, fa = G(X({}, [
2490
2490
  "style",
2491
2491
  "script",
2492
2492
  "xmp",
@@ -2495,9 +2495,9 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2495
2495
  "noframes",
2496
2496
  "plaintext",
2497
2497
  "noscript"
2498
- ])), da = function() {
2498
+ ])), pa = function() {
2499
2499
  return typeof window > "u" ? null : window;
2500
- }, fa = function(e, t) {
2500
+ }, ma = function(e, t) {
2501
2501
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
2502
2502
  let n = null, r = "data-tt-policy-suffix";
2503
2503
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -2514,7 +2514,7 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2514
2514
  } catch {
2515
2515
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
2516
2516
  }
2517
- }, pa = function() {
2517
+ }, ha = function() {
2518
2518
  return {
2519
2519
  afterSanitizeAttributes: [],
2520
2520
  afterSanitizeElements: [],
@@ -2526,62 +2526,62 @@ var zi = G(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
2526
2526
  uponSanitizeElement: [],
2527
2527
  uponSanitizeShadowNode: []
2528
2528
  };
2529
- }, ma = function(e, t, n, r) {
2530
- return q(e, t) && vi(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2531
- }, ha = function(e, t, n) {
2529
+ }, ga = function(e, t, n, r) {
2530
+ return q(e, t) && bi(e[t]) ? X(r.base ? Z(r.base) : {}, e[t], r.transform) : n;
2531
+ }, _a = function(e, t, n) {
2532
2532
  let r = q(e, t) ? e[t] : void 0;
2533
2533
  return r && typeof r == "object" ? Z(r) : n();
2534
2534
  };
2535
- function ga() {
2536
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : da(), t = (e) => ga(e);
2535
+ function va() {
2536
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : pa(), t = (e) => va(e);
2537
2537
  if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== $.document || !e.Element) return t.isSupported = !1, t;
2538
2538
  let n = e.document, r = n, i = r.currentScript;
2539
2539
  e.DocumentFragment;
2540
2540
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
2541
2541
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
2542
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), m = Q(d, "nextSibling"), h = Q(d, "childNodes"), g = Q(d, "parentNode"), te = Q(d, "shadowRoot"), _ = Q(d, "attributes"), ne = o && o.prototype ? Q(o.prototype, "nodeType") : null, re = o && o.prototype ? Q(o.prototype, "nodeName") : null, ie = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, v = function(e) {
2543
- return ne ? ne(e) : e.nodeType;
2542
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Q(d, "cloneNode"), p = Q(d, "remove"), ee = Q(d, "removeAttributeNode"), m = Q(d, "nextSibling"), h = Q(d, "childNodes"), g = Q(d, "parentNode"), te = Q(d, "shadowRoot"), ne = Q(d, "attributes"), re = o && o.prototype ? Q(o.prototype, "nodeType") : null, _ = o && o.prototype ? Q(o.prototype, "nodeName") : null, ie = o && o.prototype ? Q(o.prototype, "ownerDocument") : null, v = function(e) {
2543
+ return re ? re(e) : e.nodeType;
2544
2544
  }, ae = function(e) {
2545
- return re ? re(e) : e.nodeName;
2546
- }, oe = Li(d, "namespaceURI"), se = function(e) {
2545
+ return _ ? _(e) : e.nodeName;
2546
+ }, oe = zi(d, "namespaceURI"), se = function(e) {
2547
2547
  return oe ? oe(e) : e.namespaceURI;
2548
2548
  };
2549
2549
  if (typeof a == "function") {
2550
2550
  let e = n.createElement("template");
2551
2551
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
2552
2552
  }
2553
- let y, ce = "", le, ue = !1, de = 0, fe = function() {
2554
- if (de > 0) throw Ni("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
2555
- }, pe = function(e) {
2556
- fe(), de++;
2553
+ let y, b = "", ce, le = !1, x = 0, ue = function() {
2554
+ if (x > 0) throw Fi("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
2555
+ }, de = function(e) {
2556
+ ue(), x++;
2557
2557
  try {
2558
2558
  return y.createHTML(e);
2559
2559
  } finally {
2560
- de--;
2560
+ x--;
2561
2561
  }
2562
- }, me = function(e) {
2563
- fe(), de++;
2562
+ }, fe = function(e) {
2563
+ ue(), x++;
2564
2564
  try {
2565
2565
  return y.createScriptURL(e);
2566
2566
  } finally {
2567
- de--;
2568
- }
2569
- }, b = function() {
2570
- return ue ||= (le = fa(u, i), !0), le;
2571
- }, he = n, ge = he.implementation, _e = he.createNodeIterator, ve = he.createDocumentFragment, ye = he.getElementsByTagName, be = r.importNode, x = pa();
2572
- t.isSupported = typeof ri == "function" && typeof g == "function" && ge && ge.createHTMLDocument !== void 0;
2573
- let xe = Xi, Se = Zi, Ce = Qi, we = $i, Te = ea, Ee = na, De = ra, Oe = aa, ke = ta, S = null, C = X({}, [
2574
- ...zi,
2575
- ...Bi,
2567
+ x--;
2568
+ }
2569
+ }, pe = function() {
2570
+ return le ||= (ce = ma(u, i), !0), ce;
2571
+ }, me = n, S = me.implementation, he = me.createNodeIterator, ge = me.createDocumentFragment, _e = me.getElementsByTagName, ve = r.importNode, C = ha();
2572
+ t.isSupported = typeof ai == "function" && typeof g == "function" && S && S.createHTMLDocument !== void 0;
2573
+ let ye = Qi, be = $i, xe = ea, Se = ta, Ce = na, we = ia, Te = aa, Ee = sa, De = ra, w = null, Oe = X({}, [
2576
2574
  ...Vi,
2575
+ ...Hi,
2577
2576
  ...Ui,
2578
- ...Gi
2579
- ]), w = null, Ae = X({}, [
2580
- ...Ki,
2581
- ...qi,
2577
+ ...Gi,
2578
+ ...qi
2579
+ ]), T = null, E = X({}, [
2582
2580
  ...Ji,
2583
- ...Yi
2584
- ]), T = Object.seal(ci(null, {
2581
+ ...Yi,
2582
+ ...Xi,
2583
+ ...Zi
2584
+ ]), D = Object.seal(ui(null, {
2585
2585
  tagNameCheck: {
2586
2586
  writable: !0,
2587
2587
  configurable: !1,
@@ -2600,7 +2600,7 @@ function ga() {
2600
2600
  enumerable: !0,
2601
2601
  value: !1
2602
2602
  }
2603
- })), je = null, Me = null, E = Object.seal(ci(null, {
2603
+ })), ke = null, Ae = null, O = Object.seal(ui(null, {
2604
2604
  tagCheck: {
2605
2605
  writable: !0,
2606
2606
  configurable: !1,
@@ -2613,14 +2613,14 @@ function ga() {
2613
2613
  enumerable: !0,
2614
2614
  value: null
2615
2615
  }
2616
- })), Ne = !0, Pe = !0, Fe = !1, Ie = !0, D = !1, O = !0, Le = !1, Re = !1, ze = null, Be = null, Ve = !1, k = !1, A = !1, He = !1, Ue = !0, j = !1, We = "user-content-", Ge = !0, Ke = !1, qe = null, Je = {}, Ye = null, Xe = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ze = null, M = X({}, [
2616
+ })), je = !0, Me = !0, Ne = !1, Pe = !0, Fe = !1, Ie = !0, Le = !1, Re = !1, ze = null, Be = null, Ve = !1, He = !1, Ue = !1, k = !1, A = !0, We = !1, Ge = "user-content-", j = !0, Ke = !1, qe = null, Je = {}, Ye = null, Xe = X({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ze = null, Qe = X({}, [
2617
2617
  "audio",
2618
2618
  "video",
2619
2619
  "img",
2620
2620
  "source",
2621
2621
  "image",
2622
2622
  "track"
2623
- ]), Qe = null, $e = X({}, [
2623
+ ]), $e = null, et = X({}, [
2624
2624
  "alt",
2625
2625
  "class",
2626
2626
  "for",
@@ -2635,72 +2635,72 @@ function ga() {
2635
2635
  "value",
2636
2636
  "style",
2637
2637
  "xmlns"
2638
- ]), et = "http://www.w3.org/1998/Math/MathML", N = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml", tt = P, nt = !1, rt = null, it = X({}, [
2639
- et,
2640
- N,
2641
- P
2642
- ], Ci), at = G([
2638
+ ]), tt = "http://www.w3.org/1998/Math/MathML", nt = "http://www.w3.org/2000/svg", M = "http://www.w3.org/1999/xhtml", N = M, rt = !1, it = null, at = X({}, [
2639
+ tt,
2640
+ nt,
2641
+ M
2642
+ ], Ti), ot = G([
2643
2643
  "mi",
2644
2644
  "mo",
2645
2645
  "mn",
2646
2646
  "ms",
2647
2647
  "mtext"
2648
- ]), ot = X({}, at), st = G(["annotation-xml"]), ct = X({}, st), lt = X({}, [
2648
+ ]), st = X({}, ot), ct = G(["annotation-xml"]), lt = X({}, ct), ut = X({}, [
2649
2649
  "title",
2650
2650
  "style",
2651
2651
  "font",
2652
2652
  "a",
2653
2653
  "script"
2654
- ]), ut = null, dt = ["application/xhtml+xml", "text/html"], F = null, ft = null, pt = n.createElement("form"), mt = function(e) {
2654
+ ]), dt = null, ft = ["application/xhtml+xml", "text/html"], P = null, pt = null, mt = n.createElement("form"), ht = function(e) {
2655
2655
  return e instanceof RegExp || e instanceof Function;
2656
- }, ht = function() {
2656
+ }, gt = function() {
2657
2657
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2658
- if (ft && ft === e) return;
2659
- e && typeof e == "object" || (e = {}), e = Z(e), ut = dt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, F = ut === "application/xhtml+xml" ? Ci : Si, S = ma(e, "ALLOWED_TAGS", C, { transform: F }), w = ma(e, "ALLOWED_ATTR", Ae, { transform: F }), rt = ma(e, "ALLOWED_NAMESPACES", it, { transform: Ci }), Qe = ma(e, "ADD_URI_SAFE_ATTR", $e, {
2660
- transform: F,
2661
- base: $e
2662
- }), Ze = ma(e, "ADD_DATA_URI_TAGS", M, {
2663
- transform: F,
2664
- base: M
2665
- }), Ye = ma(e, "FORBID_CONTENTS", Xe, { transform: F }), je = ma(e, "FORBID_TAGS", Z({}), { transform: F }), Me = ma(e, "FORBID_ATTR", Z({}), { transform: F }), Je = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, Ne = e.ALLOW_ARIA_ATTR !== !1, Pe = e.ALLOW_DATA_ATTR !== !1, Fe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ie = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, D = e.SAFE_FOR_TEMPLATES || !1, O = e.SAFE_FOR_XML !== !1, Le = e.WHOLE_DOCUMENT || !1, k = e.RETURN_DOM || !1, A = e.RETURN_DOM_FRAGMENT || !1, He = e.RETURN_TRUSTED_TYPE || !1, Ve = e.FORCE_BODY || !1, Ue = e.SANITIZE_DOM !== !1, j = e.SANITIZE_NAMED_PROPS || !1, Ge = e.KEEP_CONTENT !== !1, Ke = e.IN_PLACE || !1, ke = Ri(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : ta, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : P, ot = ha(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, at)), ct = ha(e, "HTML_INTEGRATION_POINTS", () => X({}, st));
2666
- let t = ha(e, "CUSTOM_ELEMENT_HANDLING", () => ci(null));
2667
- if (T = ci(null), q(t, "tagNameCheck") && mt(t.tagNameCheck) && (T.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && mt(t.attributeNameCheck) && (T.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (T.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(T), D && (Pe = !1), A && (k = !0), Je && (S = X({}, Gi), w = ci(null), Je.html === !0 && (X(S, zi), X(w, Ki)), Je.svg === !0 && (X(S, Bi), X(w, qi), X(w, Yi)), Je.svgFilters === !0 && (X(S, Vi), X(w, qi), X(w, Yi)), Je.mathMl === !0 && (X(S, Ui), X(w, Ji), X(w, Yi))), E.tagCheck = null, E.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? E.tagCheck = e.ADD_TAGS : vi(e.ADD_TAGS) && (S === C && (S = Z(S)), X(S, e.ADD_TAGS, F))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? E.attributeCheck = e.ADD_ATTR : vi(e.ADD_ATTR) && (w === Ae && (w = Z(w)), X(w, e.ADD_ATTR, F))), q(e, "ADD_FORBID_CONTENTS") && vi(e.ADD_FORBID_CONTENTS) && (Ye === Xe && (Ye = Z(Ye)), X(Ye, e.ADD_FORBID_CONTENTS, F)), Ge && (S["#text"] = !0), Le && X(S, [
2658
+ if (pt && pt === e) return;
2659
+ e && typeof e == "object" || (e = {}), e = Z(e), dt = ft.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, P = dt === "application/xhtml+xml" ? Ti : wi, w = ga(e, "ALLOWED_TAGS", Oe, { transform: P }), T = ga(e, "ALLOWED_ATTR", E, { transform: P }), it = ga(e, "ALLOWED_NAMESPACES", at, { transform: Ti }), $e = ga(e, "ADD_URI_SAFE_ATTR", et, {
2660
+ transform: P,
2661
+ base: et
2662
+ }), Ze = ga(e, "ADD_DATA_URI_TAGS", Qe, {
2663
+ transform: P,
2664
+ base: Qe
2665
+ }), Ye = ga(e, "FORBID_CONTENTS", Xe, { transform: P }), ke = ga(e, "FORBID_TAGS", Z({}), { transform: P }), Ae = ga(e, "FORBID_ATTR", Z({}), { transform: P }), Je = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Z(e.USE_PROFILES) : e.USE_PROFILES : !1, je = e.ALLOW_ARIA_ATTR !== !1, Me = e.ALLOW_DATA_ATTR !== !1, Ne = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Pe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Fe = e.SAFE_FOR_TEMPLATES || !1, Ie = e.SAFE_FOR_XML !== !1, Le = e.WHOLE_DOCUMENT || !1, He = e.RETURN_DOM || !1, Ue = e.RETURN_DOM_FRAGMENT || !1, k = e.RETURN_TRUSTED_TYPE || !1, Ve = e.FORCE_BODY || !1, A = e.SANITIZE_DOM !== !1, We = e.SANITIZE_NAMED_PROPS || !1, j = e.KEEP_CONTENT !== !1, Ke = e.IN_PLACE || !1, De = Bi(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : ra, N = typeof e.NAMESPACE == "string" ? e.NAMESPACE : M, st = _a(e, "MATHML_TEXT_INTEGRATION_POINTS", () => X({}, ot)), lt = _a(e, "HTML_INTEGRATION_POINTS", () => X({}, ct));
2666
+ let t = _a(e, "CUSTOM_ELEMENT_HANDLING", () => ui(null));
2667
+ if (D = ui(null), q(t, "tagNameCheck") && ht(t.tagNameCheck) && (D.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && ht(t.attributeNameCheck) && (D.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (D.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), K(D), Fe && (Me = !1), Ue && (He = !0), Je && (w = X({}, qi), T = ui(null), Je.html === !0 && (X(w, Vi), X(T, Ji)), Je.svg === !0 && (X(w, Hi), X(T, Yi), X(T, Zi)), Je.svgFilters === !0 && (X(w, Ui), X(T, Yi), X(T, Zi)), Je.mathMl === !0 && (X(w, Gi), X(T, Xi), X(T, Zi))), O.tagCheck = null, O.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? O.tagCheck = e.ADD_TAGS : bi(e.ADD_TAGS) && (w === Oe && (w = Z(w)), X(w, e.ADD_TAGS, P))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? O.attributeCheck = e.ADD_ATTR : bi(e.ADD_ATTR) && (T === E && (T = Z(T)), X(T, e.ADD_ATTR, P))), q(e, "ADD_FORBID_CONTENTS") && bi(e.ADD_FORBID_CONTENTS) && (Ye === Xe && (Ye = Z(Ye)), X(Ye, e.ADD_FORBID_CONTENTS, P)), j && (w["#text"] = !0), Le && X(w, [
2668
2668
  "html",
2669
2669
  "head",
2670
2670
  "body"
2671
- ]), S.table && (X(S, ["tbody"]), delete je.tbody), e.TRUSTED_TYPES_POLICY) {
2672
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Ni("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2673
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Ni("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2671
+ ]), w.table && (X(w, ["tbody"]), delete ke.tbody), e.TRUSTED_TYPES_POLICY) {
2672
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Fi("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
2673
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Fi("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
2674
2674
  let t = y;
2675
2675
  y = e.TRUSTED_TYPES_POLICY;
2676
2676
  try {
2677
- ce = pe("");
2677
+ b = de("");
2678
2678
  } catch (e) {
2679
2679
  throw y = t, e;
2680
2680
  }
2681
- } else e.TRUSTED_TYPES_POLICY === null ? (y = void 0, ce = "") : (y === void 0 && (y = b()), y && typeof ce == "string" && (ce = pe("")));
2682
- G && G(e), ft = e;
2683
- }, gt = X({}, [
2684
- ...Bi,
2685
- ...Vi,
2686
- ...Hi
2687
- ]), _t = X({}, [...Ui, ...Wi]), vt = function(e, t, n) {
2688
- return t.namespaceURI === P ? e === "svg" : t.namespaceURI === et ? e === "svg" && (n === "annotation-xml" || ot[n]) : !!gt[e];
2689
- }, yt = function(e, t, n) {
2690
- return t.namespaceURI === P ? e === "math" : t.namespaceURI === N ? e === "math" && ct[n] : !!_t[e];
2681
+ } else e.TRUSTED_TYPES_POLICY === null ? (y = void 0, b = "") : (y === void 0 && (y = pe()), y && typeof b == "string" && (b = de("")));
2682
+ G && G(e), pt = e;
2683
+ }, _t = X({}, [
2684
+ ...Hi,
2685
+ ...Ui,
2686
+ ...Wi
2687
+ ]), vt = X({}, [...Gi, ...Ki]), yt = function(e, t, n) {
2688
+ return t.namespaceURI === M ? e === "svg" : t.namespaceURI === tt ? e === "svg" && (n === "annotation-xml" || st[n]) : !!_t[e];
2691
2689
  }, bt = function(e, t, n) {
2692
- return t.namespaceURI === N && !ct[n] || t.namespaceURI === et && !ot[n] ? !1 : !_t[e] && (lt[e] || !gt[e]);
2693
- }, xt = function(e) {
2694
- let t = se(e), n = Si(ae(e)), r = g(e), i, a;
2695
- return r && v(r) === $.element ? (i = { namespaceURI: se(r) }, a = Si(ae(r))) : (i = { namespaceURI: tt }, a = "template"), rt[t] ? t === N ? vt(n, i, a) : t === et ? yt(n, i, a) : t === P ? bt(n, i, a) : !!(ut === "application/xhtml+xml" && rt[t]) : !1;
2690
+ return t.namespaceURI === M ? e === "math" : t.namespaceURI === nt ? e === "math" && lt[n] : !!vt[e];
2691
+ }, xt = function(e, t, n) {
2692
+ return t.namespaceURI === nt && !lt[n] || t.namespaceURI === tt && !st[n] ? !1 : !vt[e] && (ut[e] || !_t[e]);
2696
2693
  }, St = function(e) {
2697
- hi(t.removed, { element: e });
2694
+ let t = se(e), n = wi(ae(e)), r = g(e), i, a;
2695
+ return r && v(r) === $.element ? (i = { namespaceURI: se(r) }, a = wi(ae(r))) : (i = { namespaceURI: N }, a = "template"), it[t] ? t === nt ? yt(n, i, a) : t === tt ? bt(n, i, a) : t === M ? xt(n, i, a) : !!(dt === "application/xhtml+xml" && it[t]) : !1;
2696
+ }, Ct = function(e) {
2697
+ _i(t.removed, { element: e });
2698
2698
  try {
2699
2699
  g(e).removeChild(e);
2700
2700
  } catch {
2701
- if (p(e), !g(e)) throw Ni("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2701
+ if (p(e), !g(e)) throw Fi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2702
2702
  }
2703
- }, Ct = function(e, t, n) {
2703
+ }, wt = function(e, t, n) {
2704
2704
  try {
2705
2705
  ee(e, t);
2706
2706
  } catch {
@@ -2708,26 +2708,26 @@ function ga() {
2708
2708
  e.removeAttribute(n);
2709
2709
  } catch {}
2710
2710
  }
2711
- }, wt = function(e) {
2712
- Ot(e);
2711
+ }, Tt = function(e) {
2712
+ kt(e);
2713
2713
  let t = h(e);
2714
- t && fi(gi(t), (e) => {
2714
+ t && mi(vi(t), (e) => {
2715
2715
  try {
2716
2716
  p(e);
2717
2717
  } catch {}
2718
2718
  });
2719
- let n = v(e) === $.element ? _(e) : null;
2719
+ let n = v(e) === $.element ? ne(e) : null;
2720
2720
  if (n) for (let t = n.length - 1; t >= 0; --t) {
2721
2721
  let r = n[t], i = r && r.name;
2722
- typeof i == "string" && Ct(e, r, i);
2722
+ typeof i == "string" && wt(e, r, i);
2723
2723
  }
2724
- }, Tt = function(e, n, r) {
2724
+ }, Et = function(e, n, r) {
2725
2725
  if (!r) try {
2726
2726
  r = n.getAttributeNode(e);
2727
2727
  } catch {
2728
2728
  r = null;
2729
2729
  }
2730
- hi(t.removed, {
2730
+ _i(t.removed, {
2731
2731
  attribute: r || null,
2732
2732
  from: n
2733
2733
  });
@@ -2739,155 +2739,155 @@ function ga() {
2739
2739
  } catch {}
2740
2740
  }
2741
2741
  if (e === "is") {
2742
- if (k || A) try {
2743
- St(n);
2742
+ if (He || Ue) try {
2743
+ Ct(n);
2744
2744
  } catch {}
2745
2745
  else try {
2746
2746
  n.setAttribute(e, "");
2747
2747
  } catch {}
2748
2748
  }
2749
- }, Et = function(e) {
2750
- let t = _(e);
2749
+ }, Dt = function(e) {
2750
+ let t = ne(e);
2751
2751
  if (t) for (let n = t.length - 1; n >= 0; --n) {
2752
2752
  let r = t[n], i = r && r.name;
2753
- typeof i != "string" || w[F(i)] || Ct(e, r, i);
2753
+ typeof i != "string" || T[P(i)] || wt(e, r, i);
2754
2754
  }
2755
- }, Dt = function(e, t) {
2755
+ }, Ot = function(e, t) {
2756
2756
  let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
2757
2757
  for (; r.length > 0;) {
2758
2758
  let e = r.pop();
2759
2759
  if (t(e) === !1) continue;
2760
2760
  if (n && v(e) === $.element) {
2761
2761
  let t = te(e);
2762
- Ut(t) && r.push(t);
2762
+ F(t) && r.push(t);
2763
2763
  }
2764
2764
  let i = h(e);
2765
2765
  if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
2766
2766
  }
2767
- }, Ot = function(e) {
2768
- Dt(e, (e) => {
2769
- v(e) === $.element && Et(e);
2770
- });
2771
2767
  }, kt = function(e) {
2768
+ Ot(e, (e) => {
2769
+ v(e) === $.element && Dt(e);
2770
+ });
2771
+ }, At = function(e) {
2772
2772
  let t = [];
2773
- return Dt(e, (e) => {
2773
+ return Ot(e, (e) => {
2774
2774
  t.push(e);
2775
2775
  }, !0), t;
2776
- }, At = function(e, t) {
2777
- let n = yi();
2778
- fi(kt(e), (e) => {
2779
- v(e) === $.element && bi(n, e);
2780
- }), fi(t, (e) => {
2781
- v(e) === $.element && !xi(n, e) && Et(e);
2776
+ }, jt = function(e, t) {
2777
+ let n = xi();
2778
+ mi(At(e), (e) => {
2779
+ v(e) === $.element && Si(n, e);
2780
+ }), mi(t, (e) => {
2781
+ v(e) === $.element && !Ci(n, e) && Dt(e);
2782
2782
  });
2783
- }, jt = function(e, n) {
2783
+ }, Mt = function(e, n) {
2784
2784
  let r = !1;
2785
- return fi(t.removed, (t) => {
2786
- t.element && (r ||= t.element === e, Ot(t.element));
2787
- }), At(e, n), r;
2788
- }, Mt = function(e, t) {
2789
- let n = qe, r = null, i = () => (r || (r = yi(), fi(t, (e) => {
2790
- bi(r, e);
2785
+ return mi(t.removed, (t) => {
2786
+ t.element && (r ||= t.element === e, kt(t.element));
2787
+ }), jt(e, n), r;
2788
+ }, Nt = function(e, t) {
2789
+ let n = qe, r = null, i = () => (r || (r = xi(), mi(t, (e) => {
2790
+ Si(r, e);
2791
2791
  })), r);
2792
2792
  for (let t = 0;; t++) {
2793
- let r = kt(e), a = [e], o = !1;
2794
- if (fi(r, (e) => {
2795
- v(e) === $.documentFragment ? hi(a, e) : !o && !xi(n, e) && (o = xi(i(), e));
2793
+ let r = At(e), a = [e], o = !1;
2794
+ if (mi(r, (e) => {
2795
+ v(e) === $.documentFragment ? _i(a, e) : !o && !Ci(n, e) && (o = Ci(i(), e));
2796
2796
  }), !o) return;
2797
- if (t >= 8) throw Ni("the tree kept changing during in-place sanitization; refusing to return it");
2798
- fi(a, (t, n) => {
2799
- Nt(t, n > 0, e, i());
2797
+ if (t >= 8) throw Fi("the tree kept changing during in-place sanitization; refusing to return it");
2798
+ mi(a, (t, n) => {
2799
+ Pt(t, n > 0, e, i());
2800
2800
  });
2801
2801
  }
2802
- }, Nt = function(e, t, n, r) {
2803
- let i = Rt(e), a;
2804
- for (; a = i.nextNode();) xi(r, a) && !xi(qe, a) && (t && I(x.uponSanitizeShadowNode, a, null), Xt(a, n), rn(a, n), Ut(a.content) && L(a.content));
2805
- }, Pt = function(e) {
2806
- qe && bi(qe, e);
2807
- }, Ft = function(e, t) {
2808
- return O ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
2809
- }, It = function(e) {
2810
- O && Dt(e, (e) => {
2802
+ }, Pt = function(e, t, n, r) {
2803
+ let i = zt(e), a;
2804
+ for (; a = i.nextNode();) Ci(r, a) && !Ci(qe, a) && (t && I(C.uponSanitizeShadowNode, a, null), Xt(a, n), rn(a, n), F(a.content) && an(a.content));
2805
+ }, Ft = function(e) {
2806
+ qe && Si(qe, e);
2807
+ }, It = function(e, t) {
2808
+ return Ie ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
2809
+ }, Lt = function(e) {
2810
+ Ie && Ot(e, (e) => {
2811
2811
  let t = v(e);
2812
- if (t === $.processingInstruction || t === $.comment && J(sa, e.data)) {
2812
+ if (t === $.processingInstruction || t === $.comment && J(la, e.data)) {
2813
2813
  try {
2814
2814
  p(e);
2815
2815
  } catch {}
2816
2816
  return !1;
2817
2817
  }
2818
2818
  if (t === $.element) {
2819
- let t = e, n = F(ae(e));
2819
+ let t = e, n = P(ae(e));
2820
2820
  try {
2821
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && Ft("for", n) && t.removeAttribute("for");
2821
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && It("for", n) && t.removeAttribute("for");
2822
2822
  } catch {}
2823
2823
  }
2824
2824
  return !0;
2825
2825
  });
2826
- }, Lt = function(e) {
2826
+ }, Rt = function(e) {
2827
2827
  let t = null, r = null;
2828
2828
  if (Ve) e = "<remove></remove>" + e;
2829
2829
  else {
2830
- let t = wi(e, /^[\r\n\t ]+/);
2830
+ let t = Ei(e, /^[\r\n\t ]+/);
2831
2831
  r = t && t[0];
2832
2832
  }
2833
- ut === "application/xhtml+xml" && tt === P && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
2834
- let i = y ? pe(e) : e;
2835
- if (tt === P) try {
2836
- t = new l().parseFromString(i, ut);
2833
+ dt === "application/xhtml+xml" && N === M && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
2834
+ let i = y ? de(e) : e;
2835
+ if (N === M) try {
2836
+ t = new l().parseFromString(i, dt);
2837
2837
  } catch {}
2838
2838
  if (!t || !t.documentElement) {
2839
- t = ge.createDocument(tt, "template", null);
2839
+ t = S.createDocument(N, "template", null);
2840
2840
  try {
2841
- t.documentElement.innerHTML = nt ? ce : i;
2841
+ t.documentElement.innerHTML = rt ? b : i;
2842
2842
  } catch {}
2843
2843
  }
2844
2844
  let a = t.body || t.documentElement;
2845
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), tt === P ? ye.call(t, Le ? "html" : "body")[0] : Le ? t.documentElement : a;
2846
- }, Rt = function(e) {
2847
- let t = ie ? ie(e) : e.ownerDocument;
2848
- return _e.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
2845
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), N === M ? _e.call(t, Le ? "html" : "body")[0] : Le ? t.documentElement : a;
2849
2846
  }, zt = function(e) {
2850
- return e = Ti(e, xe, " "), e = Ti(e, Se, " "), e = Ti(e, Ce, " "), e;
2847
+ let t = ie ? ie(e) : e.ownerDocument;
2848
+ return he.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
2851
2849
  }, Bt = function(e) {
2852
- Vt(e);
2850
+ return e = Di(e, ye, " "), e = Di(e, be, " "), e = Di(e, xe, " "), e;
2851
+ }, Vt = function(e) {
2852
+ Ht(e);
2853
2853
  let t = e.querySelectorAll?.call(e, "template");
2854
- t && fi(t, (e) => {
2855
- Ut(e.content) && Bt(e.content);
2854
+ t && mi(t, (e) => {
2855
+ F(e.content) && Vt(e.content);
2856
2856
  });
2857
- }, Vt = function(e) {
2858
- e.normalize();
2859
- let t = ie ? ie(e) : e.ownerDocument, n = _e.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
2860
- for (; r;) r.data = zt(r.data), r = n.nextNode();
2861
2857
  }, Ht = function(e) {
2862
- let t = re ? re(e) : null;
2863
- return typeof t != "string" || F(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== _(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== ne(e) || e.childNodes !== h(e);
2858
+ e.normalize();
2859
+ let t = ie ? ie(e) : e.ownerDocument, n = he.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
2860
+ for (; r;) r.data = Bt(r.data), r = n.nextNode();
2864
2861
  }, Ut = function(e) {
2865
- if (!ne || typeof e != "object" || !e) return !1;
2862
+ let t = _ ? _(e) : null;
2863
+ return typeof t != "string" || P(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ne(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== re(e) || e.childNodes !== h(e);
2864
+ }, F = function(e) {
2865
+ if (!re || typeof e != "object" || !e) return !1;
2866
2866
  try {
2867
- return ne(e) === $.documentFragment;
2867
+ return re(e) === $.documentFragment;
2868
2868
  } catch {
2869
2869
  return !1;
2870
2870
  }
2871
2871
  }, Wt = function(e) {
2872
- if (!ne || typeof e != "object" || !e) return !1;
2872
+ if (!re || typeof e != "object" || !e) return !1;
2873
2873
  try {
2874
- return typeof ne(e) == "number";
2874
+ return typeof re(e) == "number";
2875
2875
  } catch {
2876
2876
  return !1;
2877
2877
  }
2878
2878
  };
2879
2879
  function I(e, n, r) {
2880
- e.length !== 0 && fi(e, (e) => {
2881
- e.call(t, n, r, ft);
2880
+ e.length !== 0 && mi(e, (e) => {
2881
+ e.call(t, n, r, pt);
2882
2882
  });
2883
2883
  }
2884
2884
  let Gt = function(e, t) {
2885
- return !!(O && e.hasChildNodes() && !Wt(e.firstElementChild) && J(oa, e.textContent) && J(oa, e.innerHTML) || O && ua[t] && v(e) === $.element && se(e) === P && (Wt(e.firstElementChild) || typeof e.textContent == "string" && J(oa, e.textContent)) || e.nodeType === $.processingInstruction || O && e.nodeType === $.comment && J(sa, e.data));
2885
+ return !!(Ie && e.hasChildNodes() && !Wt(e.firstElementChild) && J(ca, e.textContent) && J(ca, e.innerHTML) || Ie && fa[t] && v(e) === $.element && se(e) === M && (Wt(e.firstElementChild) || typeof e.textContent == "string" && J(ca, e.textContent)) || e.nodeType === $.processingInstruction || Ie && e.nodeType === $.comment && J(la, e.data));
2886
2886
  }, Kt = function(e, t) {
2887
2887
  return e instanceof RegExp ? J(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
2888
2888
  }, qt = function(e, t, n) {
2889
- if (!je[t] && $t(t) && Kt(T.tagNameCheck, t)) return !1;
2890
- if (Ge && !Ye[t] && !Ye[Si(t)]) {
2889
+ if (!ke[t] && $t(t) && Kt(D.tagNameCheck, t)) return !1;
2890
+ if (j && !Ye[t] && !Ye[wi(t)]) {
2891
2891
  let t = g(e), r = h(e);
2892
2892
  if (r && t) {
2893
2893
  let i = r.length;
@@ -2897,34 +2897,34 @@ function ga() {
2897
2897
  }
2898
2898
  }
2899
2899
  }
2900
- return St(e), !0;
2900
+ return Ct(e), !0;
2901
2901
  }, Jt = function(e, t, n, r) {
2902
2902
  return e.length === 0 ? t : t === n || t === r ? Z(t) : t;
2903
2903
  }, Yt = function(e, t) {
2904
- return e === t || g(e) !== null ? !1 : (Ke && Ot(e), !0);
2904
+ return e === t || g(e) !== null ? !1 : (Ke && kt(e), !0);
2905
2905
  }, Xt = function(e, n) {
2906
- if (Pt(e), I(x.beforeSanitizeElements, e, null), Yt(e, n)) return !0;
2907
- if (Ht(e)) return St(e), !0;
2908
- let r = F(ae(e));
2909
- if (S = Jt(x.uponSanitizeElement, S, C, ze), I(x.uponSanitizeElement, e, {
2906
+ if (Ft(e), I(C.beforeSanitizeElements, e, null), Yt(e, n)) return !0;
2907
+ if (Ut(e)) return Ct(e), !0;
2908
+ let r = P(ae(e));
2909
+ if (w = Jt(C.uponSanitizeElement, w, Oe, ze), I(C.uponSanitizeElement, e, {
2910
2910
  tagName: r,
2911
- allowedTags: S
2911
+ allowedTags: w
2912
2912
  }), Yt(e, n)) return !0;
2913
- if (Gt(e, r)) return St(e), !0;
2914
- if (je[r] || !(E.tagCheck instanceof Function && E.tagCheck(r)) && !S[r]) {
2913
+ if (Gt(e, r)) return Ct(e), !0;
2914
+ if (ke[r] || !(O.tagCheck instanceof Function && O.tagCheck(r)) && !w[r]) {
2915
2915
  let t = qt(e, r, n);
2916
- return t === !1 && (I(x.afterSanitizeElements, e, null), Yt(e, n)) ? !0 : t;
2916
+ return t === !1 && (I(C.afterSanitizeElements, e, null), Yt(e, n)) ? !0 : t;
2917
2917
  }
2918
- if (v(e) === $.element && !xt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(ca, e.innerHTML)) return St(e), !0;
2919
- if (D && e.nodeType === $.text) {
2920
- let n = zt(e.textContent);
2921
- e.textContent !== n && (hi(t.removed, { element: e.cloneNode() }), e.textContent = n);
2918
+ if (v(e) === $.element && !St(e) || (r === "noscript" || r === "noembed" || r === "noframes") && J(ua, e.innerHTML)) return Ct(e), !0;
2919
+ if (Fe && e.nodeType === $.text) {
2920
+ let n = Bt(e.textContent);
2921
+ e.textContent !== n && (_i(t.removed, { element: e.cloneNode() }), e.textContent = n);
2922
2922
  }
2923
- return I(x.afterSanitizeElements, e, null), Yt(e, n);
2923
+ return I(C.afterSanitizeElements, e, null), Yt(e, n);
2924
2924
  }, Zt = function(e, t, r) {
2925
- if (Me[t] || Ft(t, e) || Ue && (t === "id" || t === "name") && (r in n || r in pt)) return !1;
2926
- let i = w[t] || E.attributeCheck instanceof Function && E.attributeCheck(t, e);
2927
- return Pe && J(we, t) || Ne && J(Te, t) ? !0 : i ? Qe[t] || J(ke, Ti(r, De, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Ei(r, "data:") === 0 && Ze[e] || Fe && !J(Ee, Ti(r, De, "")) ? !0 : !r : $t(e) && Kt(T.tagNameCheck, e) && Kt(T.attributeNameCheck, t, e) || t === "is" && T.allowCustomizedBuiltInElements && Kt(T.tagNameCheck, r);
2925
+ if (Ae[t] || It(t, e) || A && (t === "id" || t === "name") && (r in n || r in mt)) return !1;
2926
+ let i = T[t] || O.attributeCheck instanceof Function && O.attributeCheck(t, e);
2927
+ return Me && J(Se, t) || je && J(Ce, t) ? !0 : i ? $e[t] || J(De, Di(r, Te, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Oi(r, "data:") === 0 && Ze[e] || Ne && !J(we, Di(r, Te, "")) ? !0 : !r : $t(e) && Kt(D.tagNameCheck, e) && Kt(D.attributeNameCheck, t, e) || t === "is" && D.allowCustomizedBuiltInElements && Kt(D.tagNameCheck, r);
2928
2928
  }, Qt = X({}, [
2929
2929
  "annotation-xml",
2930
2930
  "color-profile",
@@ -2935,46 +2935,46 @@ function ga() {
2935
2935
  "font-face-uri",
2936
2936
  "missing-glyph"
2937
2937
  ]), $t = function(e) {
2938
- return !Qt[Si(e)] && J(Oe, e);
2938
+ return !Qt[wi(e)] && J(Ee, e);
2939
2939
  }, en = function(e, t, n, r) {
2940
2940
  if (y && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
2941
- case "TrustedHTML": return pe(r);
2942
- case "TrustedScriptURL": return me(r);
2941
+ case "TrustedHTML": return de(r);
2942
+ case "TrustedScriptURL": return fe(r);
2943
2943
  }
2944
2944
  return r;
2945
2945
  }, tn = function(e, t, n, r) {
2946
2946
  try {
2947
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Ht(e) || (St(e), !1);
2947
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Ut(e) || (Ct(e), !1);
2948
2948
  } catch {
2949
- return Tt(t, e), !1;
2949
+ return Et(t, e), !1;
2950
2950
  }
2951
2951
  }, nn = function(e, t) {
2952
- return O && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : Si(e) === "attributename" && wi(t, "href") !== null;
2952
+ return Ie && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : wi(e) === "attributename" && Ei(t, "href") !== null;
2953
2953
  }, rn = function(e, n) {
2954
- if (I(x.beforeSanitizeAttributes, e, null), Yt(e, n)) return;
2954
+ if (I(C.beforeSanitizeAttributes, e, null), Yt(e, n)) return;
2955
2955
  let r = e.attributes;
2956
- if (!r || Ht(e)) return;
2957
- w = Jt(x.uponSanitizeAttribute, w, Ae, Be);
2956
+ if (!r || Ut(e)) return;
2957
+ T = Jt(C.uponSanitizeAttribute, T, E, Be);
2958
2958
  let i = {
2959
2959
  attrName: "",
2960
2960
  attrValue: "",
2961
2961
  keepAttr: !0,
2962
- allowedAttributes: w,
2962
+ allowedAttributes: T,
2963
2963
  forceKeepAttr: void 0
2964
- }, a = r.length, o = F(e.nodeName);
2964
+ }, a = r.length, o = P(e.nodeName);
2965
2965
  for (; a--;) {
2966
- let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = F(s), d = l, f = s === "value" ? d : Di(d), p = !1;
2967
- i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(x.uponSanitizeAttribute, e, i), f = i.attrValue, j && (u === "id" || u === "name") && Ei(f, We) !== 0 && (Tt(s, e, n), f = We + f, p = !0), nn(s, f) ? Tt(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Ie && J(la, f) ? Tt(s, e, n) : (D && (f = zt(f)), Zt(o, u, f) ? (f = en(o, u, c, f), f !== d && tn(e, s, c, f) && p && mi(t.removed)) : Tt(s, e, n)) : Tt(s, e, n));
2966
+ let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = P(s), d = l, f = s === "value" ? d : ki(d), p = !1;
2967
+ i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, I(C.uponSanitizeAttribute, e, i), f = i.attrValue, We && (u === "id" || u === "name") && Oi(f, Ge) !== 0 && (Et(s, e, n), f = Ge + f, p = !0), nn(s, f) ? Et(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Pe && J(da, f) ? Et(s, e, n) : (Fe && (f = Bt(f)), Zt(o, u, f) ? (f = en(o, u, c, f), f !== d && tn(e, s, c, f) && p && gi(t.removed)) : Et(s, e, n)) : Et(s, e, n));
2968
2968
  }
2969
- I(x.afterSanitizeAttributes, e, null), Yt(e, n);
2970
- }, L = function(e) {
2971
- let t = null, n = Rt(e);
2972
- for (I(x.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(x.uponSanitizeShadowNode, t, null), Xt(t, e), rn(t, e), Ut(t.content) && L(t.content), v(t) === $.element) {
2969
+ I(C.afterSanitizeAttributes, e, null), Yt(e, n);
2970
+ }, an = function(e) {
2971
+ let t = null, n = zt(e);
2972
+ for (I(C.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (I(C.uponSanitizeShadowNode, t, null), Xt(t, e), rn(t, e), F(t.content) && an(t.content), v(t) === $.element) {
2973
2973
  let e = te(t);
2974
- Ut(e) && (an(e), L(e));
2974
+ F(e) && (on(e), an(e));
2975
2975
  }
2976
- D && Vt(e), I(x.afterSanitizeShadowDOM, e, null);
2977
- }, an = function(e) {
2976
+ Fe && Ht(e), I(C.afterSanitizeShadowDOM, e, null);
2977
+ }, on = function(e) {
2978
2978
  let t = [{
2979
2979
  node: e,
2980
2980
  shadow: null
@@ -2982,7 +2982,7 @@ function ga() {
2982
2982
  for (; t.length > 0;) {
2983
2983
  let e = t.pop();
2984
2984
  if (e.shadow) {
2985
- L(e.shadow);
2985
+ an(e.shadow);
2986
2986
  continue;
2987
2987
  }
2988
2988
  let n = e.node, r = v(n) === $.element, i = h(n);
@@ -2991,10 +2991,10 @@ function ga() {
2991
2991
  shadow: null
2992
2992
  });
2993
2993
  if (r) {
2994
- let e = re ? re(n) : null;
2995
- if (typeof e == "string" && F(e) === "template") {
2994
+ let e = _ ? _(n) : null;
2995
+ if (typeof e == "string" && P(e) === "template") {
2996
2996
  let e = n.content;
2997
- Ut(e) && t.push({
2997
+ F(e) && t.push({
2998
2998
  node: e,
2999
2999
  shadow: null
3000
3000
  });
@@ -3002,7 +3002,7 @@ function ga() {
3002
3002
  }
3003
3003
  if (r) {
3004
3004
  let e = te(n);
3005
- Ut(e) && t.push({
3005
+ F(e) && t.push({
3006
3006
  node: null,
3007
3007
  shadow: e
3008
3008
  }, {
@@ -3014,81 +3014,81 @@ function ga() {
3014
3014
  };
3015
3015
  return t.sanitize = function(e) {
3016
3016
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
3017
- if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Wt(e) && (e = Ii(e), typeof e != "string")) throw Ni("dirty is not a string, aborting");
3017
+ if (rt = !e, rt && (e = "<!-->"), typeof e != "string" && !Wt(e) && (e = Ri(e), typeof e != "string")) throw Fi("dirty is not a string, aborting");
3018
3018
  if (!t.isSupported) return e;
3019
- Re ? (S = ze, w = Be) : ht(n), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (S = Z(S)), x.uponSanitizeAttribute.length > 0 && (w = Z(w)), t.removed = [];
3019
+ Re ? (w = ze, T = Be) : gt(n), (C.uponSanitizeElement.length > 0 || C.uponSanitizeAttribute.length > 0) && (w = Z(w)), C.uponSanitizeAttribute.length > 0 && (T = Z(T)), t.removed = [];
3020
3020
  let c = Ke && typeof e != "string" && Wt(e), l = [], u = qe;
3021
3021
  if (c) {
3022
- It(e);
3022
+ Lt(e);
3023
3023
  let t = ae(e);
3024
3024
  if (typeof t == "string") {
3025
- let n = F(t);
3026
- if (!S[n] || je[n]) throw wt(e), Ni("root node is forbidden and cannot be sanitized in-place");
3025
+ let n = P(t);
3026
+ if (!w[n] || ke[n]) throw Tt(e), Fi("root node is forbidden and cannot be sanitized in-place");
3027
3027
  }
3028
- if (Ht(e)) throw wt(e), Ni("root node is clobbered and cannot be sanitized in-place");
3029
- l = kt(e), qe = yi();
3030
- } else if (Wt(e)) i = Lt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), an(i);
3028
+ if (Ut(e)) throw Tt(e), Fi("root node is clobbered and cannot be sanitized in-place");
3029
+ l = At(e), qe = xi();
3030
+ } else if (Wt(e)) i = Rt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === $.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), on(i);
3031
3031
  else {
3032
- if (!k && !D && !Le && e.indexOf("<") === -1) return y && He ? pe(e) : e;
3033
- if (i = Lt(e), !i) return k ? null : He ? ce : "";
3032
+ if (!He && !Fe && !Le && e.indexOf("<") === -1) return y && k ? de(e) : e;
3033
+ if (i = Rt(e), !i) return He ? null : k ? b : "";
3034
3034
  }
3035
- i && Ve && St(i.firstChild);
3035
+ i && Ve && Ct(i.firstChild);
3036
3036
  let d = c ? e : i;
3037
3037
  try {
3038
- c && an(e);
3039
- let t = Rt(d);
3040
- for (; o = t.nextNode();) Xt(o, d), rn(o, d), Ut(o.content) && L(o.content);
3041
- c && Mt(e, l);
3038
+ c && on(e);
3039
+ let t = zt(d);
3040
+ for (; o = t.nextNode();) Xt(o, d), rn(o, d), F(o.content) && an(o.content);
3041
+ c && Nt(e, l);
3042
3042
  } catch (t) {
3043
- throw c && (wt(e), jt(e, l)), t;
3043
+ throw c && (Tt(e), Mt(e, l)), t;
3044
3044
  } finally {
3045
3045
  qe = u;
3046
3046
  }
3047
3047
  if (c) {
3048
- if (jt(e, l)) throw Ni("a node selected for removal could not be safely returned; refusing to sanitize in place");
3049
- return D && Bt(e), e;
3048
+ if (Mt(e, l)) throw Fi("a node selected for removal could not be safely returned; refusing to sanitize in place");
3049
+ return Fe && Vt(e), e;
3050
3050
  }
3051
- if (k) {
3052
- if (D && Bt(i), A) for (s = ve.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3051
+ if (He) {
3052
+ if (Fe && Vt(i), Ue) for (s = ge.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
3053
3053
  else s = i;
3054
- return (w.shadowroot || w.shadowrootmode) && (s = be.call(r, s, !0)), s;
3054
+ return (T.shadowroot || T.shadowrootmode) && (s = ve.call(r, s, !0)), s;
3055
3055
  }
3056
3056
  let f = Le ? i.outerHTML : i.innerHTML;
3057
- return Le && S["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(ia, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), D && (f = zt(f)), y && He ? pe(f) : f;
3057
+ return Le && w["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && J(oa, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Fe && (f = Bt(f)), y && k ? de(f) : f;
3058
3058
  }, t.setConfig = function() {
3059
3059
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3060
- ht(e), Re = !0, ze = S, Be = w;
3060
+ gt(e), Re = !0, ze = w, Be = T;
3061
3061
  }, t.clearConfig = function() {
3062
- ft = null, Re = !1, ze = null, Be = null, y = le, ce = "";
3062
+ pt = null, Re = !1, ze = null, Be = null, y = ce, b = "";
3063
3063
  }, t.isValidAttribute = function(e, t, n) {
3064
- ft || ht({});
3065
- let r = F(e), i = F(t);
3066
- return typeof n == "string" && (nn(t, n) || !Ie && J(la, n)) ? !1 : Zt(r, i, n);
3064
+ pt || gt({});
3065
+ let r = P(e), i = P(t);
3066
+ return typeof n == "string" && (nn(t, n) || !Pe && J(da, n)) ? !1 : Zt(r, i, n);
3067
3067
  }, t.addHook = function(e, t) {
3068
- typeof t == "function" && q(x, e) && hi(x[e], t);
3068
+ typeof t == "function" && q(C, e) && _i(C[e], t);
3069
3069
  }, t.removeHook = function(e, t) {
3070
- if (q(x, e)) {
3070
+ if (q(C, e)) {
3071
3071
  if (t !== void 0) {
3072
- let n = pi(x[e], t);
3073
- return n === -1 ? void 0 : _i(x[e], n, 1)[0];
3072
+ let n = hi(C[e], t);
3073
+ return n === -1 ? void 0 : yi(C[e], n, 1)[0];
3074
3074
  }
3075
- return mi(x[e]);
3075
+ return gi(C[e]);
3076
3076
  }
3077
3077
  }, t.removeHooks = function(e) {
3078
- q(x, e) && (x[e] = []);
3078
+ q(C, e) && (C[e] = []);
3079
3079
  }, t.removeAllHooks = function() {
3080
- x = pa();
3080
+ C = ha();
3081
3081
  }, t;
3082
3082
  }
3083
- var _a = ga();
3083
+ var ya = va();
3084
3084
  // ../../packages/components/src/chat/markdownHtml.ts
3085
- function va(e) {
3085
+ function ba(e) {
3086
3086
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3087
3087
  }
3088
- function ya(e, t) {
3088
+ function xa(e, t) {
3089
3089
  return `<span class="katex-pending" data-katex="${encodeURIComponent(e)}" data-display="${t}"></span>`;
3090
3090
  }
3091
- var ba = {
3091
+ var Sa = {
3092
3092
  ADD_ATTR: ["target"],
3093
3093
  ALLOW_UNKNOWN_PROTOCOLS: !0,
3094
3094
  FORBID_TAGS: [
@@ -3109,63 +3109,63 @@ var ba = {
3109
3109
  "background"
3110
3110
  ]
3111
3111
  };
3112
- _a.addHook("uponSanitizeAttribute", (e, t) => {
3113
- t.attrName === "src" && e.nodeName !== "IMG" && (t.keepAttr = !1);
3112
+ ya.addHook("uponSanitizeAttribute", (e, t) => {
3113
+ t.attrName === "src" && e.nodeName !== "IMG" && (t.keepAttr = !1), (t.attrName.startsWith("data-pswp-") || t.attrName === "data-held-src") && (t.keepAttr = !1);
3114
3114
  });
3115
- var xa = "data-held-src";
3116
- function Sa(e, t) {
3117
- if (!t) return _a.sanitize(e, ba);
3118
- let n = _a.sanitize(e, {
3119
- ...ba,
3115
+ var Ca = "data-held-src";
3116
+ function wa(e, t) {
3117
+ if (!t) return ya.sanitize(e, Sa);
3118
+ let n = ya.sanitize(e, {
3119
+ ...Sa,
3120
3120
  RETURN_DOM_FRAGMENT: !0
3121
3121
  });
3122
3122
  for (let e of Array.from(n.querySelectorAll("img"))) {
3123
3123
  let n = e.getAttribute("src") ?? "";
3124
3124
  if (t.canLoad(n)) continue;
3125
3125
  let r = e.ownerDocument.createElement("button");
3126
- r.type = "button", r.className = "markdown-held-image", r.setAttribute(xa, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3126
+ r.type = "button", r.className = "markdown-held-image", r.setAttribute(Ca, n), r.textContent = t.label(t.hostOf(n) ?? n), e.replaceWith(r);
3127
3127
  }
3128
3128
  let r = n.ownerDocument.createElement("div");
3129
3129
  return r.append(n), r.innerHTML;
3130
3130
  }
3131
3131
  // ../../packages/components/src/chat/chatImagePolicy.ts
3132
- var Ca = Symbol("ChatImagePolicy");
3133
- function wa(t, n) {
3134
- m(Ca, s(() => ({
3132
+ var Ta = Symbol("ChatImagePolicy");
3133
+ function Ea(t, n) {
3134
+ h(Ta, c(() => ({
3135
3135
  hosts: (t() ?? []).map(e),
3136
- platformOrigins: [i(n())].filter((e) => !!e)
3136
+ platformOrigins: [a(n())].filter((e) => !!e)
3137
3137
  })));
3138
3138
  }
3139
- function Ta(e, t) {
3139
+ function Da(e, t) {
3140
3140
  try {
3141
3141
  return new URL(e, t).hostname || void 0;
3142
3142
  } catch {
3143
3143
  return;
3144
3144
  }
3145
3145
  }
3146
- var Ea = /^\/api\/v1\/(?:public\/medias\/[^/]+|[^/]+\/agents\/[^/]+\/chats\/[^/]+\/media\/[^/]+\/(?:view|download))$/;
3147
- function Da(e, t, n) {
3146
+ var Oa = /^\/api\/v1\/(?:public\/medias\/[^/]+|[^/]+\/agents\/[^/]+\/chats\/[^/]+\/media\/[^/]+\/(?:view|download))$/;
3147
+ function ka(e, t, n) {
3148
3148
  let r;
3149
3149
  try {
3150
3150
  r = new URL(e, n);
3151
3151
  } catch {
3152
3152
  return !1;
3153
3153
  }
3154
- return r.protocol === "data:" || r.protocol === "blob:" ? !0 : t.platformOrigins.includes(r.origin) ? Ea.test(r.pathname) : r.protocol === "https:" && t.hosts.includes(r.hostname);
3154
+ return r.protocol === "data:" || r.protocol === "blob:" ? !0 : t.platformOrigins.includes(r.origin) ? Oa.test(r.pathname) : r.protocol === "https:" && t.hosts.includes(r.hostname);
3155
3155
  }
3156
- function Oa() {
3157
- let e = u(Ca, void 0), t = o(), n = h(/* @__PURE__ */ new Set()), r = () => typeof window > "u" ? "https://localhost/" : window.location.href, i = (e) => t.resolve(e).value.url ?? e;
3156
+ function Aa() {
3157
+ let e = d(Ta, void 0), t = s(), n = g(/* @__PURE__ */ new Set()), r = () => typeof window > "u" ? "https://localhost/" : window.location.href, i = (e) => t.resolve(e).value.url ?? e;
3158
3158
  return {
3159
- isGated: s(() => !!e),
3160
- canLoad: (t) => !t || !e || n.value.has(t) || Da(i(t), e.value, r()),
3159
+ isGated: c(() => !!e),
3160
+ canLoad: (t) => !t || !e || n.value.has(t) || ka(i(t), e.value, r()),
3161
3161
  release: (e) => {
3162
3162
  n.value = new Set(n.value).add(e);
3163
3163
  },
3164
- hostOf: (e) => Ta(i(e), r())
3164
+ hostOf: (e) => Da(i(e), r())
3165
3165
  };
3166
3166
  }
3167
3167
  // ../../packages/components/src/chat/PkStreamingMarkdown.vue?vue&type=script&setup=true&lang.ts
3168
- var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3168
+ var ja = ["data-pswp-images", "innerHTML"], Ma = 100, Na = /* @__PURE__ */ u({
3169
3169
  __name: "PkStreamingMarkdown",
3170
3170
  props: {
3171
3171
  markdown: { default: "" },
@@ -3182,15 +3182,15 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3182
3182
  tailLength: { default: void 0 }
3183
3183
  },
3184
3184
  setup(e) {
3185
- let i = e, { t: l } = ne({ useScope: "global" }), u = null;
3186
- function m() {
3187
- return u ||= import("beautiful-mermaid"), u;
3185
+ let a = e, { t: u } = ie({ useScope: "global" }), d = null;
3186
+ function h() {
3187
+ return d ||= import("beautiful-mermaid"), d;
3188
3188
  }
3189
- let h = null;
3190
- function ie() {
3191
- return h ||= import("katex").then((e) => e.default), h;
3189
+ let g = null;
3190
+ function ae() {
3191
+ return g ||= import("katex").then((e) => e.default), g;
3192
3192
  }
3193
- let v = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, ae = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3193
+ let oe = /^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n$]))\1(?=[\s?!.,:\uFF1F\uFF01\u3002\uFF0C\uFF1A]|$)/, se = /^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;
3194
3194
  W.use({ extensions: [{
3195
3195
  name: "inlineKatex",
3196
3196
  level: "inline",
@@ -3199,7 +3199,7 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3199
3199
  if (t !== -1 && (t === 0 || e.charAt(t - 1) === " ")) return t;
3200
3200
  },
3201
3201
  tokenizer(e) {
3202
- let t = e.match(v);
3202
+ let t = e.match(oe);
3203
3203
  if (t) return {
3204
3204
  type: "inlineKatex",
3205
3205
  raw: t[0],
@@ -3208,13 +3208,13 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3208
3208
  };
3209
3209
  },
3210
3210
  renderer(e) {
3211
- return ya(e.text, e.displayMode);
3211
+ return xa(e.text, e.displayMode);
3212
3212
  }
3213
3213
  }, {
3214
3214
  name: "blockKatex",
3215
3215
  level: "block",
3216
3216
  tokenizer(e) {
3217
- let t = e.match(ae);
3217
+ let t = e.match(se);
3218
3218
  if (t) return {
3219
3219
  type: "blockKatex",
3220
3220
  raw: t[0],
@@ -3223,7 +3223,7 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3223
3223
  };
3224
3224
  },
3225
3225
  renderer(e) {
3226
- return ya(e.text, e.displayMode) + "\n";
3226
+ return xa(e.text, e.displayMode) + "\n";
3227
3227
  }
3228
3228
  }] }), W.use({ extensions: [{
3229
3229
  name: "thinking",
@@ -3244,26 +3244,26 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3244
3244
  return `<div class="thinking-block">${this.parser.parse(e.tokens ?? [])}</div>`;
3245
3245
  }
3246
3246
  }] });
3247
- let se = new W.Renderer(), y = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ce = /^(?:javascript|data|vbscript|file):/i, le = !1, ue = (e) => y(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3248
- se.link = function({ href: e, title: t, text: n, tokens: r }) {
3249
- let i = this.parser.parseInline(r), o = (e ?? "").trim().replace(/[\x00-\x1f]/g, "");
3250
- if (!o || ce.test(o)) return i;
3251
- let s = le && n === o, c = t || (s ? o : ""), l = c ? ` title="${y(c)}"` : "", u = a(o) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3252
- return `<a href="${y(o)}"${l}${u}>${s ? ue(o) : i}</a>`;
3253
- }, se.table = function(e) {
3254
- le = !0;
3247
+ let b = new W.Renderer(), ce = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), le = /^(?:javascript|data|vbscript|file):/i, x = !1, ue = (e) => ce(e.replace(/^https?:\/\/(?:www\.)?/i, "").replace(/\/$/, "")).replace(/\//g, "/<wbr>");
3248
+ b.link = function({ href: e, title: t, text: n, tokens: r }) {
3249
+ let i = this.parser.parseInline(r), a = (e ?? "").trim().replace(/[\x00-\x1f]/g, "");
3250
+ if (!a || le.test(a)) return i;
3251
+ let s = x && n === a, c = t || (s ? a : ""), l = c ? ` title="${ce(c)}"` : "", u = o(a) ? "" : " target=\"_blank\" rel=\"noopener noreferrer\"";
3252
+ return `<a href="${ce(a)}"${l}${u}>${s ? ue(a) : i}</a>`;
3253
+ }, b.table = function(e) {
3254
+ x = !0;
3255
3255
  try {
3256
- let t = e.header.map((e) => y(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3256
+ let t = e.header.map((e) => ce(this.parser.parseInline(e.tokens, this.parser.textRenderer))), n = (e) => `<tr role="row">${e.map((e, n) => {
3257
3257
  let r = this.parser.parseInline(e.tokens), i = e.align ? ` align="${e.align}"` : "";
3258
3258
  return e.header ? `<th role="columnheader"${i}>${r}</th>` : `<td role="cell" data-label="${t[n] ?? ""}"${i}><span>${r}</span></td>`;
3259
3259
  }).join("")}</tr>`, r = e.rows.length ? `<tbody role="rowgroup">${e.rows.map(n).join("")}</tbody>` : "";
3260
3260
  return `<div class="table-wrapper u-table-scroll"><table class="${e.header.length >= 3 && e.rows.length ? "u-table u-table--stack" : "u-table"}" role="table"><thead role="rowgroup">${n(e.header)}</thead>${r}</table></div>\n`;
3261
3261
  } finally {
3262
- le = !1;
3262
+ x = !1;
3263
3263
  }
3264
3264
  };
3265
3265
  let de = /^(sequenceDiagram|graph|classDiagram|stateDiagram|erDiagram|flowchart|xychart-beta)/;
3266
- se.code = ({ text: e }) => de.test(e) ? `<pre class="mermaid">${va(e)}</pre>` : `<pre><code>${va(e)}</code></pre>`;
3266
+ b.code = ({ text: e }) => de.test(e) ? `<pre class="mermaid">${ba(e)}</pre>` : `<pre><code>${ba(e)}</code></pre>`;
3267
3267
  function fe(e) {
3268
3268
  return e.replace(/\\\[([\s\S]*?)\\\]/g, (e, t) => `$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g, (e, t) => `$${t}$`).replace(/^(\d+)\.(?!\s)/gm, "$1\\.");
3269
3269
  }
@@ -3280,32 +3280,32 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3280
3280
  }).replace(/\n{3,}/g, "\n\n");
3281
3281
  }
3282
3282
  let me = [
3283
- oe,
3283
+ y,
3284
3284
  pe,
3285
- sn,
3285
+ ln,
3286
3286
  fe
3287
- ], b = te("container"), he = re(g(i, "markdown"), Aa), ge = s(() => i.tailLength ? r(he.value, i.tailLength) : he.value), { resolveText: _e } = o(), ve = _e(ge), ye = Oa(), be = s(() => {
3287
+ ], S = re("container"), he = v(te(a, "markdown"), Ma), ge = c(() => a.tailLength ? i(he.value, a.tailLength) : he.value), { resolveText: _e } = s(), ve = _e(ge), C = Aa(), ye = n(), be = c(() => {
3288
3288
  let e = me.reduce((e, t) => t(e), ve.value);
3289
- return Sa(W.parse(e, {
3289
+ return wa(W.parse(e, {
3290
3290
  async: !1,
3291
3291
  breaks: !0,
3292
- renderer: se
3293
- }), ye.isGated.value ? {
3294
- canLoad: ye.canLoad,
3295
- hostOf: ye.hostOf,
3296
- label: (e) => l("label.imageHeld", { host: e })
3292
+ renderer: b
3293
+ }), C.isGated.value ? {
3294
+ canLoad: C.canLoad,
3295
+ hostOf: C.hostOf,
3296
+ label: (e) => u("label.imageHeld", { host: e })
3297
3297
  } : void 0);
3298
3298
  });
3299
- function x(e) {
3300
- let t = (e.target?.closest?.(`[${xa}]`))?.getAttribute(xa);
3301
- t && (e.preventDefault(), e.stopPropagation(), ye.release(t));
3302
- }
3303
- async function xe() {
3304
- if (i.loading) return;
3305
- await d();
3306
- let e = b.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
3299
+ function xe(e) {
3300
+ let t = (e.target?.closest?.(`[${Ca}]`))?.getAttribute(Ca);
3301
+ t && (e.preventDefault(), e.stopPropagation(), C.release(t));
3302
+ }
3303
+ async function Se() {
3304
+ if (a.loading) return;
3305
+ await f();
3306
+ let e = S.value?.querySelectorAll("pre.mermaid:not([data-rendered])");
3307
3307
  if (!e?.length) return;
3308
- let { renderMermaidSVG: t, THEMES: n } = await m(), r = i.isDark ? n["github-dark"] : n["github-light"];
3308
+ let { renderMermaidSVG: t, THEMES: n } = await h(), r = a.isDark ? n["github-dark"] : n["github-light"];
3309
3309
  for (let n of Array.from(e)) {
3310
3310
  if (!n.isConnected) continue;
3311
3311
  let e = n.textContent?.trim();
@@ -3315,37 +3315,37 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3315
3315
  } catch {}
3316
3316
  }
3317
3317
  }
3318
- async function Se() {
3319
- await d();
3320
- let e = b.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3318
+ async function Ce() {
3319
+ await f();
3320
+ let e = S.value?.querySelectorAll("pre:not(.mermaid) > code:not([data-highlighted])");
3321
3321
  if (!e?.length) return;
3322
3322
  let t = (await import("highlight.js/lib/common")).default;
3323
3323
  for (let n of e) t.highlightElement(n), n.setAttribute("data-highlighted", "true");
3324
3324
  }
3325
- async function Ce() {
3326
- await d();
3327
- let e = b.value?.querySelectorAll(".katex-pending");
3325
+ async function we() {
3326
+ await f();
3327
+ let e = S.value?.querySelectorAll(".katex-pending");
3328
3328
  if (!e?.length) return;
3329
- let r = await ie();
3330
- t("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", n(b.value));
3329
+ let n = await ae();
3330
+ r("https://cdn.jsdelivr.net/npm/katex@0.18/dist/katex.min.css", t(S.value));
3331
3331
  for (let t of Array.from(e)) {
3332
3332
  if (!t.isConnected) continue;
3333
3333
  let e = t.dataset.katex;
3334
3334
  if (!e) continue;
3335
- let n = t.dataset.display === "true";
3335
+ let r = t.dataset.display === "true";
3336
3336
  try {
3337
- t.innerHTML = r.renderToString(decodeURIComponent(e), {
3337
+ t.innerHTML = n.renderToString(decodeURIComponent(e), {
3338
3338
  throwOnError: !1,
3339
- displayMode: n
3339
+ displayMode: r
3340
3340
  }), t.classList.remove("katex-pending");
3341
3341
  } catch {}
3342
3342
  }
3343
3343
  }
3344
- async function we() {
3345
- await d();
3346
- let e = b.value?.querySelectorAll("pre.mermaid[data-rendered]");
3344
+ async function Te() {
3345
+ await f();
3346
+ let e = S.value?.querySelectorAll("pre.mermaid[data-rendered]");
3347
3347
  if (!e?.length) return;
3348
- let { renderMermaidSVG: t, THEMES: n } = await m(), r = i.isDark ? n["github-dark"] : n["github-light"];
3348
+ let { renderMermaidSVG: t, THEMES: n } = await h(), r = a.isDark ? n["github-dark"] : n["github-light"];
3349
3349
  for (let n of Array.from(e)) {
3350
3350
  if (!n.isConnected) continue;
3351
3351
  let e = n.dataset.code;
@@ -3354,19 +3354,21 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3354
3354
  } catch {}
3355
3355
  }
3356
3356
  }
3357
- function Te(e) {
3357
+ function Ee(e) {
3358
3358
  let t = e.target;
3359
3359
  if (!(t instanceof HTMLImageElement) || t.dataset.broken) return;
3360
3360
  t.dataset.broken = "true";
3361
3361
  let n = document.createElement("span");
3362
- n.className = "markdown-broken-image", n.textContent = t.alt || l("label.imageLoadError"), n.title = t.src, t.replaceWith(n);
3363
- }
3364
- p(() => {
3365
- b.value?.addEventListener("error", Te, !0);
3366
- }), f(() => {
3367
- b.value?.removeEventListener("error", Te, !0);
3368
- }), _([be, () => i.loading], xe, { immediate: !0 }), _(() => i.isDark, we), _(be, Se, { immediate: !0 }), _(be, Ce, { immediate: !0 });
3369
- let Ee = 0, De = {
3362
+ n.className = "markdown-broken-image", n.textContent = t.alt || u("label.imageLoadError"), n.title = t.src, t.replaceWith(n);
3363
+ }
3364
+ ee(() => {
3365
+ S.value?.addEventListener("error", Ee, !0);
3366
+ }), p(() => {
3367
+ S.value?.removeEventListener("error", Ee, !0);
3368
+ }), _([be, () => a.loading], Se, { immediate: !0 }), _(() => a.isDark, Te), _(be, Ce, { immediate: !0 }), _(be, we, { immediate: !0 }), ye && _(be, (e) => {
3369
+ e.includes("<img") && ye.join();
3370
+ }, { immediate: !0 });
3371
+ let De = 0, w = {
3370
3372
  fadeIn: "pk-streaming-markdown-fade-in",
3371
3373
  blurIn: "pk-streaming-markdown-blur-in",
3372
3374
  dropIn: "pk-streaming-markdown-drop-in",
@@ -3374,53 +3376,54 @@ var ka = ["innerHTML"], Aa = 100, ja = /* @__PURE__ */ l({
3374
3376
  fadeAndScale: "pk-streaming-markdown-fade-and-scale"
3375
3377
  };
3376
3378
  function Oe(e, t) {
3377
- let n = document.createElement("span"), r = i.animation ? De[i.animation] : "none";
3378
- return n.style.cssText = `animation:${r} ${i.animationDuration} ease-out ${t}ms both;display:inline-block`, n.textContent = e, n.addEventListener("animationend", () => {
3379
+ let n = document.createElement("span"), r = a.animation ? w[a.animation] : "none";
3380
+ return n.style.cssText = `animation:${r} ${a.animationDuration} ease-out ${t}ms both;display:inline-block`, n.textContent = e, n.addEventListener("animationend", () => {
3379
3381
  let t = n.parentNode;
3380
3382
  t && (t.replaceChild(document.createTextNode(e), n), t.normalize());
3381
3383
  }, { once: !0 }), n;
3382
3384
  }
3383
- function ke(e, t, n, r) {
3385
+ function T(e, t, n, r) {
3384
3386
  let i = r, a = e.split(/(\s+)/);
3385
3387
  for (let e of a) e && (/^\s+$/.test(e) ? t.insertBefore(document.createTextNode(e), n) : (t.insertBefore(Oe(e, i * 30), n), i++));
3386
3388
  return i;
3387
3389
  }
3388
- function S(e) {
3390
+ function E(e) {
3389
3391
  let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(e) {
3390
3392
  return e.parentElement?.closest("pre, code, .katex-pending, .markdown-broken-image") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3391
3393
  } }), n = [];
3392
3394
  for (; t.nextNode();) n.push(t.currentNode);
3393
3395
  return n;
3394
3396
  }
3395
- function C() {
3396
- if (!b.value || !i.loading || !i.animation) return;
3397
- let e = S(b.value), t = 0, n = 0;
3397
+ function D() {
3398
+ if (!S.value || !a.loading || !a.animation) return;
3399
+ let e = E(S.value), t = 0, n = 0;
3398
3400
  for (let r of e) {
3399
3401
  let e = r.textContent || "", i = t, a = t + e.length;
3400
- if (t = a, a <= Ee) continue;
3402
+ if (t = a, a <= De) continue;
3401
3403
  let o = r.parentNode;
3402
3404
  if (!o) continue;
3403
- if (i >= Ee) {
3405
+ if (i >= De) {
3404
3406
  let t = r.nextSibling;
3405
- o.removeChild(r), n = ke(e, o, t, n);
3407
+ o.removeChild(r), n = T(e, o, t, n);
3406
3408
  continue;
3407
3409
  }
3408
- let s = Ee - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3409
- o.removeChild(c), n = ke(l, o, u, n);
3410
+ let s = De - i, c = r.splitText(s), l = c.textContent || "", u = c.nextSibling;
3411
+ o.removeChild(c), n = T(l, o, u, n);
3410
3412
  }
3411
- Ee = t;
3413
+ De = t;
3412
3414
  }
3413
3415
  return _(be, async () => {
3414
- await d(), C();
3415
- }, { immediate: !0 }), _(() => i.markdown, (e, t) => {
3416
- (!e || t && e.length < t.length) && (Ee = 0);
3417
- }), (e, t) => (ee(), c("div", {
3416
+ await f(), D();
3417
+ }, { immediate: !0 }), _(() => a.markdown, (e, t) => {
3418
+ (!e || t && e.length < t.length) && (De = 0);
3419
+ }), (e, t) => (m(), l("div", {
3418
3420
  ref: "container",
3419
- onClick: x,
3421
+ "data-pswp-images": ne(ye) ? "" : void 0,
3422
+ onClick: xe,
3420
3423
  innerHTML: be.value
3421
- }, null, 8, ka));
3424
+ }, null, 8, ja));
3422
3425
  }
3423
3426
  });
3424
- export { wa as n, Oa as r, ja as t };
3427
+ export { Ea as n, Aa as r, Na as t };
3425
3428
 
3426
- //# sourceMappingURL=PkStreamingMarkdown-DlcTV5je.js.map
3429
+ //# sourceMappingURL=PkStreamingMarkdown-BZPAHAni.js.map