md-editor-v3 2.10.0 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var Yn = Object.defineProperty;
2
2
  var Jn = (s, e, t) => e in s ? Yn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var oe = (s, e, t) => (Jn(s, typeof e != "symbol" ? e + "" : e, t), t), Zt = (s, e, t) => {
3
+ var le = (s, e, t) => (Jn(s, typeof e != "symbol" ? e + "" : e, t), t), Zt = (s, e, t) => {
4
4
  if (!e.has(s))
5
5
  throw TypeError("Cannot " + t);
6
6
  };
@@ -8,19 +8,19 @@ var a = (s, e, t) => (Zt(s, e, "read from private field"), t ? t.call(s) : e.get
8
8
  if (e.has(s))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  e instanceof WeakSet ? e.add(s) : e.set(s, t);
11
- }, O = (s, e, t, n) => (Zt(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t), Lt = (s, e, t, n) => ({
11
+ }, R = (s, e, t, n) => (Zt(s, e, "write to private field"), n ? n.call(s, t) : e.set(s, t), t), Lt = (s, e, t, n) => ({
12
12
  set _(i) {
13
- O(s, e, i, t);
13
+ R(s, e, i, t);
14
14
  },
15
15
  get _() {
16
16
  return a(s, e, n);
17
17
  }
18
- }), L = (s, e, t) => (Zt(s, e, "access private method"), t);
19
- import { reactive as xe, watch as G, onMounted as ie, onBeforeUnmount as Ct, provide as je, computed as ze, ref as ne, defineComponent as ce, createVNode as u, cloneVNode as ei, nextTick as ft, inject as U, Fragment as Kt, toRef as Bt, mergeProps as ti, isVNode as ni } from "vue";
20
- const d = "md-editor", ii = "md-editor-v3", si = "https://at.alicdn.com/t/c/font_2605852_u82y61ve02.js", J = "https://cdnjs.cloudflare.com/ajax/libs", li = `${J}/highlight.js/11.7.0/highlight.min.js`, gn = {
18
+ }), I = (s, e, t) => (Zt(s, e, "access private method"), t);
19
+ import { reactive as xe, watch as G, onMounted as ie, onBeforeUnmount as Ct, provide as je, computed as ze, ref as ne, defineComponent as ae, createVNode as u, cloneVNode as ei, nextTick as ft, inject as U, Fragment as Kt, toRef as Bt, mergeProps as ti, isVNode as ni } from "vue";
20
+ const d = "md-editor", ii = "md-editor-v3", si = "https://at.alicdn.com/t/c/font_2605852_u82y61ve02.js", J = "https://cdnjs.cloudflare.com/ajax/libs", li = `${J}/highlight.js/11.7.0/highlight.min.js`, mn = {
21
21
  main: `${J}/prettier/2.8.0/standalone.js`,
22
22
  markdown: `${J}/prettier/2.8.0/parser-markdown.js`
23
- }, pn = {
23
+ }, gn = {
24
24
  css: `${J}/cropperjs/1.5.13/cropper.min.css`,
25
25
  js: `${J}/cropperjs/1.5.13/cropper.min.js`
26
26
  }, oi = `${J}/screenfull.js/5.2.0/screenfull.min.js`, Dn = [
@@ -56,7 +56,7 @@ const d = "md-editor", ii = "md-editor-v3", si = "https://at.alicdn.com/t/c/font
56
56
  "htmlPreview",
57
57
  "catalog",
58
58
  "github"
59
- ], Hn = ["markdownTotal", "=", "scrollSwitch"], vn = {
59
+ ], Hn = ["markdownTotal", "=", "scrollSwitch"], pn = {
60
60
  "zh-CN": {
61
61
  toolbarTips: {
62
62
  bold: "加粗",
@@ -222,7 +222,7 @@ const d = "md-editor", ii = "md-editor-v3", si = "https://at.alicdn.com/t/c/font
222
222
  }, ri = `${J}/mermaid/9.4.0/mermaid.min.js`, Nt = {
223
223
  js: `${J}/KaTeX/0.16.3/katex.min.js`,
224
224
  css: `${J}/KaTeX/0.16.3/katex.min.css`
225
- }, bn = {
225
+ }, vn = {
226
226
  a11y: {
227
227
  light: `${J}/highlight.js/11.7.0/styles/a11y-light.min.css`,
228
228
  dark: `${J}/highlight.js/11.7.0/styles/a11y-dark.min.css`
@@ -271,7 +271,7 @@ const d = "md-editor", ii = "md-editor-v3", si = "https://at.alicdn.com/t/c/font
271
271
  class ci {
272
272
  constructor() {
273
273
  // 事件池
274
- oe(this, "pools", {});
274
+ le(this, "pools", {});
275
275
  }
276
276
  // 移除事件监听
277
277
  remove(e, t, n) {
@@ -303,7 +303,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
303
303
  s.setSelectionRange ? setTimeout(() => {
304
304
  s.setSelectionRange(e, t), s.focus(), n(!0);
305
305
  }, 0) : (console.error("Can not reset position!"), i());
306
- }), Yt = (s, e, t) => {
306
+ }), Qt = (s, e, t) => {
307
307
  const { deviationStart: n = 0, deviationEnd: i = 0, direct: l = !1, select: r = !1 } = t;
308
308
  let o = "";
309
309
  if (s.selectionStart || s.selectionStart === 0) {
@@ -327,7 +327,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
327
327
  s || console.error("error link!");
328
328
  const t = document.createElement("a");
329
329
  t.href = s, t.style.display = "none", e.newWindow && (t.target = "_blank"), e.nofollow && (t.rel = "noopener noreferrer"), document.body.appendChild(t), t.click(), document.body.removeChild(t);
330
- }, kn = (s, e) => {
330
+ }, bn = (s, e) => {
331
331
  const t = Gt(() => {
332
332
  s.removeEventListener("scroll", n), s.addEventListener("scroll", n), e.removeEventListener("scroll", n), e.addEventListener("scroll", n);
333
333
  }, 50), n = (i) => {
@@ -361,8 +361,8 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
361
361
  return new File([o], e, { type: i });
362
362
  }
363
363
  return null;
364
- }, Xt = (s) => {
365
- if (!s.trim())
364
+ }, kn = (s) => {
365
+ if (!s)
366
366
  return s;
367
367
  const e = s.split(`
368
368
  `), t = ['<span rn-wrapper aria-hidden="true">'];
@@ -425,14 +425,16 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
425
425
  s.removeEventListener("mousedown", t);
426
426
  };
427
427
  }, we = (s, e = "") => {
428
- const t = document.getElementById(s.id), n = (i) => {
429
- typeof s.onload == "function" && s.onload(i), s.removeEventListener("load", n);
428
+ const t = document.getElementById(s.id), n = s.onload;
429
+ s.onload = null;
430
+ const i = function(l) {
431
+ typeof n == "function" && n.bind(this)(l), s.removeEventListener("load", i);
430
432
  };
431
- t ? e !== "" && s.onload instanceof Function && (Reflect.get(window, e) ? s.dispatchEvent(new Event("load")) : t.addEventListener("load", n)) : (s.addEventListener("load", n), document.head.appendChild(s));
433
+ t ? e !== "" && typeof s.onload == "function" && (Reflect.get(window, e) ? s.dispatchEvent(new Event("load")) : t.addEventListener("load", i)) : (s.addEventListener("load", i), document.head.appendChild(s));
432
434
  }, vi = Gt((s, e, t) => {
433
435
  const n = document.getElementById(s);
434
436
  n && n.setAttribute(e, t);
435
- }, 10), Ut = "onSave", an = "changeCatalogVisible", jn = "changeFullscreen", xn = "pageFullscreenChanged", $n = "fullscreenChanged", Jt = "previewChanged", Sn = "htmlPreviewChanged", Cn = "catalogVisibleChanged", Pn = "textareaFocus", bi = (s, e) => {
437
+ }, 10), Ut = "onSave", rn = "changeCatalogVisible", jn = "changeFullscreen", xn = "pageFullscreenChanged", $n = "fullscreenChanged", Yt = "previewChanged", Sn = "htmlPreviewChanged", Cn = "catalogVisibleChanged", Pn = "textareaFocus", bi = (s, e) => {
436
438
  const { editorId: t, noPrettier: n, previewOnly: i } = s, l = xe({
437
439
  // 是否已编译成html
438
440
  buildFinished: !1,
@@ -598,22 +600,22 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
598
600
  "highlight",
599
601
  ze(() => {
600
602
  const r = {
601
- ...bn,
603
+ ...vn,
602
604
  ...n == null ? void 0 : n.css
603
605
  }, o = s.codeStyleReverse && s.codeStyleReverseList.includes(s.previewTheme) ? "dark" : s.theme;
604
606
  return {
605
607
  js: (n == null ? void 0 : n.js) || li,
606
- css: r[s.codeTheme] ? r[s.codeTheme][o] : bn.atom[o]
608
+ css: r[s.codeTheme] ? r[s.codeTheme][o] : vn.atom[o]
607
609
  };
608
610
  })
609
611
  ), je("historyLength", s.historyLength), je("previewOnly", t), je("showCodeRowNumber", s.showCodeRowNumber);
610
612
  const i = ze(() => {
611
613
  var o;
612
614
  const r = {
613
- ...vn,
615
+ ...pn,
614
616
  ...(o = te == null ? void 0 : te.editorConfig) == null ? void 0 : o.languageUserDefined
615
617
  };
616
- return r[s.language] ? r[s.language] : vn["zh-CN"];
618
+ return r[s.language] ? r[s.language] : pn["zh-CN"];
617
619
  });
618
620
  je("usedLanguageText", i), je(
619
621
  "previewTheme",
@@ -623,15 +625,15 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
623
625
  var f, h, m, v, g, $;
624
626
  const { noPrettier: e, previewOnly: t, noIconfont: n, noUploadImg: i } = s, { editorExtensions: l } = te, r = e || !!((h = (f = te.editorExtensions) == null ? void 0 : f.prettier) != null && h.prettierInstance), o = e || !!((v = (m = te.editorExtensions) == null ? void 0 : m.prettier) != null && v.parserMarkdownInstance), c = i || !!(($ = (g = te.editorExtensions) == null ? void 0 : g.cropper) != null && $.instance);
625
627
  ie(() => {
626
- var C, I, M, T;
628
+ var C, A, M, T;
627
629
  const b = document.createElement("script");
628
630
  b.src = (l == null ? void 0 : l.iconfont) || si, b.id = `${d}-icon`;
629
631
  const k = document.createElement("script"), p = document.createElement("script");
630
- k.src = ((C = l == null ? void 0 : l.prettier) == null ? void 0 : C.standaloneJs) || gn.main, k.id = `${d}-prettier`, p.src = ((I = l == null ? void 0 : l.prettier) == null ? void 0 : I.parserMarkdownJs) || gn.markdown, p.id = `${d}-prettierMD`;
632
+ k.src = ((C = l == null ? void 0 : l.prettier) == null ? void 0 : C.standaloneJs) || mn.main, k.id = `${d}-prettier`, p.src = ((A = l == null ? void 0 : l.prettier) == null ? void 0 : A.parserMarkdownJs) || mn.markdown, p.id = `${d}-prettierMD`;
631
633
  const w = document.createElement("link");
632
- w.rel = "stylesheet", w.href = ((M = l == null ? void 0 : l.cropper) == null ? void 0 : M.css) || pn.css, w.id = `${d}-cropperCss`;
634
+ w.rel = "stylesheet", w.href = ((M = l == null ? void 0 : l.cropper) == null ? void 0 : M.css) || gn.css, w.id = `${d}-cropperCss`;
633
635
  const S = document.createElement("script");
634
- S.src = ((T = l == null ? void 0 : l.cropper) == null ? void 0 : T.js) || pn.js, S.id = `${d}-cropper`, n || we(b), t || (c || (we(w), we(S)), r || we(k), o || we(p));
636
+ S.src = ((T = l == null ? void 0 : l.cropper) == null ? void 0 : T.js) || gn.js, S.id = `${d}-cropper`, n || we(b), t || (c || (we(w), we(S)), r || we(k), o || we(p));
635
637
  });
636
638
  }, wi = (s, e) => {
637
639
  const { editorId: t, previewOnly: n } = s, i = xe({
@@ -664,7 +666,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
664
666
  const { editorId: e } = s, t = ne(!1);
665
667
  ie(() => {
666
668
  x.on(e, {
667
- name: an,
669
+ name: rn,
668
670
  callback: (i) => {
669
671
  i === void 0 ? t.value = !t.value : t.value = i;
670
672
  }
@@ -687,7 +689,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
687
689
  ), G(
688
690
  () => n.preview,
689
691
  (o) => {
690
- x.emit(l, Jt, o);
692
+ x.emit(l, Yt, o);
691
693
  }
692
694
  ), G(
693
695
  () => n.htmlPreview,
@@ -720,7 +722,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
720
722
  }
721
723
  case "preview": {
722
724
  x.on(l, {
723
- name: Jt,
725
+ name: Yt,
724
726
  callback(f) {
725
727
  c(f);
726
728
  }
@@ -760,7 +762,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
760
762
  i("htmlPreview", o);
761
763
  },
762
764
  toggleCatalog(o) {
763
- x.emit(l, an, o);
765
+ x.emit(l, rn, o);
764
766
  },
765
767
  triggerSave() {
766
768
  x.emit(l, Ut);
@@ -774,7 +776,7 @@ const x = new ci(), Pe = (s, e = 0, t = e) => new Promise((n, i) => {
774
776
  };
775
777
  e.expose(r);
776
778
  };
777
- const Si = /* @__PURE__ */ ce({
779
+ const Si = /* @__PURE__ */ ae({
778
780
  setup() {
779
781
  return () => u("div", {
780
782
  class: `${d}-divider`
@@ -811,7 +813,7 @@ const Ci = () => ({
811
813
  type: String,
812
814
  default: "html"
813
815
  }
814
- }), ot = /* @__PURE__ */ ce({
816
+ }), ot = /* @__PURE__ */ ae({
815
817
  props: Ci(),
816
818
  setup(s, e) {
817
819
  const t = `${d}-dropdown-hidden`, n = xe({
@@ -905,7 +907,7 @@ const Ti = () => ({
905
907
  class: {
906
908
  type: String
907
909
  }
908
- }), cn = /* @__PURE__ */ ce({
910
+ }), an = /* @__PURE__ */ ae({
909
911
  props: Ti(),
910
912
  setup(s, e) {
911
913
  const t = ne(s.visible), n = ne([`${d}-modal`]), i = ne(), l = ne();
@@ -1020,7 +1022,7 @@ const Ti = () => ({
1020
1022
  default: () => {
1021
1023
  }
1022
1024
  }
1023
- }), zi = /* @__PURE__ */ ce({
1025
+ }), zi = /* @__PURE__ */ ae({
1024
1026
  props: Ei(),
1025
1027
  setup(s) {
1026
1028
  const e = U("usedLanguageText"), t = U("editorId"), n = ze(() => {
@@ -1041,7 +1043,7 @@ const Ti = () => ({
1041
1043
  l || setTimeout(() => {
1042
1044
  i.desc = "", i.url = "";
1043
1045
  }, 200);
1044
- }), () => u(cn, {
1046
+ }), () => u(an, {
1045
1047
  title: n.value,
1046
1048
  visible: s.visible,
1047
1049
  onClose: s.onCancel
@@ -1106,7 +1108,7 @@ const _i = () => ({
1106
1108
  default: () => {
1107
1109
  }
1108
1110
  }
1109
- }), Ai = /* @__PURE__ */ ce({
1111
+ }), Ai = /* @__PURE__ */ ae({
1110
1112
  props: _i(),
1111
1113
  setup(s) {
1112
1114
  var h, m;
@@ -1159,7 +1161,7 @@ const _i = () => ({
1159
1161
  };
1160
1162
  return () => {
1161
1163
  var v;
1162
- return u(cn, {
1164
+ return u(an, {
1163
1165
  class: `${d}-modal-clip`,
1164
1166
  title: (v = e.value.clipModalTips) == null ? void 0 : v.title,
1165
1167
  visible: s.visible,
@@ -1257,7 +1259,7 @@ const _i = () => ({
1257
1259
  default: () => {
1258
1260
  }
1259
1261
  }
1260
- }), Li = /* @__PURE__ */ ce({
1262
+ }), Li = /* @__PURE__ */ ae({
1261
1263
  props: Ii(),
1262
1264
  setup(s) {
1263
1265
  return () => u(Kt, null, [u(zi, {
@@ -1312,7 +1314,7 @@ const _i = () => ({
1312
1314
  default: () => {
1313
1315
  }
1314
1316
  }
1315
- }), Oi = /* @__PURE__ */ ce({
1317
+ }), Oi = /* @__PURE__ */ ae({
1316
1318
  name: "TableShape",
1317
1319
  props: Ri(),
1318
1320
  setup(s) {
@@ -1382,7 +1384,7 @@ const _i = () => ({
1382
1384
  noUploadImg: {
1383
1385
  type: Boolean
1384
1386
  }
1385
- }), Hi = /* @__PURE__ */ ce({
1387
+ }), Hi = /* @__PURE__ */ ae({
1386
1388
  name: "MDEditorToolbar",
1387
1389
  props: Di(),
1388
1390
  setup(s) {
@@ -1423,7 +1425,7 @@ const _i = () => ({
1423
1425
  h.value.addEventListener("change", m);
1424
1426
  });
1425
1427
  const v = (g) => {
1426
- var $, b, k, p, w, S, C, I, M, T, y, X, V, q, A, D, B, W, H, se, _, F, N, le, de, ve, Ie, He, Xe, qe, Qe, Tt, Et, nt, it, zt, _t, st, At, It, gt, fn, mn;
1428
+ var $, b, k, p, w, S, C, A, M, T, y, X, V, q, _, O, B, W, H, se, F, D, N, ce, de, ve, Ie, He, Xe, qe, Qe, Tt, Et, nt, it, zt, _t, st, At, It, gt, hn, fn;
1427
1429
  if (Dn.includes(g))
1428
1430
  switch (g) {
1429
1431
  case "-":
@@ -1512,7 +1514,7 @@ const _i = () => ({
1512
1514
  onClick: () => {
1513
1515
  r("h4");
1514
1516
  }
1515
- }, [(I = t.value.titleItem) == null ? void 0 : I.h4]), u("li", {
1517
+ }, [(A = t.value.titleItem) == null ? void 0 : A.h4]), u("li", {
1516
1518
  class: `${d}-menu-item`,
1517
1519
  onClick: () => {
1518
1520
  r("h5");
@@ -1592,7 +1594,7 @@ const _i = () => ({
1592
1594
  case "orderedList":
1593
1595
  return u("div", {
1594
1596
  class: `${d}-toolbar-item`,
1595
- title: (A = t.value.toolbarTips) == null ? void 0 : A.orderedList,
1597
+ title: (_ = t.value.toolbarTips) == null ? void 0 : _.orderedList,
1596
1598
  onClick: () => {
1597
1599
  r("orderedList");
1598
1600
  }
@@ -1605,7 +1607,7 @@ const _i = () => ({
1605
1607
  case "task":
1606
1608
  return u("div", {
1607
1609
  class: `${d}-toolbar-item`,
1608
- title: (D = t.value.toolbarTips) == null ? void 0 : D.task,
1610
+ title: (O = t.value.toolbarTips) == null ? void 0 : O.task,
1609
1611
  onClick: () => {
1610
1612
  r("task");
1611
1613
  }
@@ -1682,12 +1684,12 @@ const _i = () => ({
1682
1684
  onClick: () => {
1683
1685
  o.type = "image", o.linkVisible = !0;
1684
1686
  }
1685
- }, [(_ = t.value.imgTitleItem) == null ? void 0 : _.link]), u("li", {
1687
+ }, [(F = t.value.imgTitleItem) == null ? void 0 : F.link]), u("li", {
1686
1688
  class: `${d}-menu-item`,
1687
1689
  onClick: () => {
1688
1690
  h.value.click();
1689
1691
  }
1690
- }, [(F = t.value.imgTitleItem) == null ? void 0 : F.upload]), u("li", {
1692
+ }, [(D = t.value.imgTitleItem) == null ? void 0 : D.upload]), u("li", {
1691
1693
  class: `${d}-menu-item`,
1692
1694
  onClick: () => {
1693
1695
  o.clipVisible = !0;
@@ -1740,7 +1742,7 @@ const _i = () => ({
1740
1742
  case "revoke":
1741
1743
  return u("div", {
1742
1744
  class: `${d}-toolbar-item`,
1743
- title: (le = t.value.toolbarTips) == null ? void 0 : le.revoke,
1745
+ title: (ce = t.value.toolbarTips) == null ? void 0 : ce.revoke,
1744
1746
  onClick: () => {
1745
1747
  x.emit(e, "ctrlZ");
1746
1748
  }
@@ -1846,7 +1848,7 @@ const _i = () => ({
1846
1848
  class: `${d}-toolbar-item`,
1847
1849
  title: (Tt = t.value.toolbarTips) == null ? void 0 : Tt.catalog,
1848
1850
  onClick: () => {
1849
- x.emit(e, an);
1851
+ x.emit(e, rn);
1850
1852
  },
1851
1853
  key: "bar-catalog"
1852
1854
  }, [u("svg", {
@@ -1951,12 +1953,12 @@ const _i = () => ({
1951
1953
  onClick: () => {
1952
1954
  r("katexInline");
1953
1955
  }
1954
- }, [(fn = t.value.katex) == null ? void 0 : fn.inline]), u("li", {
1956
+ }, [(hn = t.value.katex) == null ? void 0 : hn.inline]), u("li", {
1955
1957
  class: `${d}-menu-item`,
1956
1958
  onClick: () => {
1957
1959
  r("katexBlock");
1958
1960
  }
1959
- }, [(mn = t.value.katex) == null ? void 0 : mn.block])]),
1961
+ }, [(fn = t.value.katex) == null ? void 0 : fn.block])]),
1960
1962
  key: "bar-katex"
1961
1963
  }, {
1962
1964
  default: () => {
@@ -2200,7 +2202,7 @@ function Qi(s, e) {
2200
2202
  }).join(`
2201
2203
  `);
2202
2204
  }
2203
- class un {
2205
+ class cn {
2204
2206
  constructor(e) {
2205
2207
  this.options = e || mt;
2206
2208
  }
@@ -2295,14 +2297,14 @@ class un {
2295
2297
  `, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), m = e.split(`
2296
2298
  `, 1)[0], this.options.pedantic ? (r = 2, g = h.trimLeft()) : (r = t[2].search(/[^ ]/), r = r > 4 ? 1 : r, g = h.slice(r), r += t[1].length), c = !1, !h && /^ *$/.test(m) && (n += m + `
2297
2299
  `, e = e.substring(m.length + 1), $ = !0), !$) {
2298
- const C = new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), I = new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), M = new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), T = new RegExp(`^ {0,${Math.min(3, r - 1)}}#`);
2300
+ const C = new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), A = new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), M = new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), T = new RegExp(`^ {0,${Math.min(3, r - 1)}}#`);
2299
2301
  for (; e && (v = e.split(`
2300
- `, 1)[0], m = v, this.options.pedantic && (m = m.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(M.test(m) || T.test(m) || C.test(m) || I.test(e))); ) {
2302
+ `, 1)[0], m = v, this.options.pedantic && (m = m.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(M.test(m) || T.test(m) || C.test(m) || A.test(e))); ) {
2301
2303
  if (m.search(/[^ ]/) >= r || !m.trim())
2302
2304
  g += `
2303
2305
  ` + m.slice(r);
2304
2306
  else {
2305
- if (c || h.search(/[^ ]/) >= 4 || M.test(h) || T.test(h) || I.test(h))
2307
+ if (c || h.search(/[^ ]/) >= 4 || M.test(h) || T.test(h) || A.test(h))
2306
2308
  break;
2307
2309
  g += `
2308
2310
  ` + m;
@@ -2324,8 +2326,8 @@ class un {
2324
2326
  const S = p.items.length;
2325
2327
  for (o = 0; o < S; o++)
2326
2328
  if (this.lexer.state.top = !1, p.items[o].tokens = this.lexer.blockTokens(p.items[o].text, []), !p.loose) {
2327
- const C = p.items[o].tokens.filter((M) => M.type === "space"), I = C.length > 0 && C.some((M) => /\n.*\n/.test(M.raw));
2328
- p.loose = I;
2329
+ const C = p.items[o].tokens.filter((M) => M.type === "space"), A = C.length > 0 && C.some((M) => /\n.*\n/.test(M.raw));
2330
+ p.loose = A;
2329
2331
  }
2330
2332
  if (p.loose)
2331
2333
  for (o = 0; o < S; o++)
@@ -2617,7 +2619,7 @@ class un {
2617
2619
  }
2618
2620
  }
2619
2621
  }
2620
- const R = {
2622
+ const L = {
2621
2623
  newline: /^(?: *(?:\n|$))+/,
2622
2624
  code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,
2623
2625
  fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
@@ -2634,35 +2636,35 @@ const R = {
2634
2636
  _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
2635
2637
  text: /^[^\n]+/
2636
2638
  };
2637
- R._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
2638
- R._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;
2639
- R.def = Z(R.def).replace("label", R._label).replace("title", R._title).getRegex();
2640
- R.bullet = /(?:[*+-]|\d{1,9}[.)])/;
2641
- R.listItemStart = Z(/^( *)(bull) */).replace("bull", R.bullet).getRegex();
2642
- R.list = Z(R.list).replace(/bull/g, R.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + R.def.source + ")").getRegex();
2643
- R._tag = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
2644
- R._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/;
2645
- R.html = Z(R.html, "i").replace("comment", R._comment).replace("tag", R._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
2646
- R.paragraph = Z(R._paragraph).replace("hr", R.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", R._tag).getRegex();
2647
- R.blockquote = Z(R.blockquote).replace("paragraph", R.paragraph).getRegex();
2648
- R.normal = Ae({}, R);
2649
- R.gfm = Ae({}, R.normal, {
2639
+ L._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
2640
+ L._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;
2641
+ L.def = Z(L.def).replace("label", L._label).replace("title", L._title).getRegex();
2642
+ L.bullet = /(?:[*+-]|\d{1,9}[.)])/;
2643
+ L.listItemStart = Z(/^( *)(bull) */).replace("bull", L.bullet).getRegex();
2644
+ L.list = Z(L.list).replace(/bull/g, L.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + L.def.source + ")").getRegex();
2645
+ L._tag = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
2646
+ L._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/;
2647
+ L.html = Z(L.html, "i").replace("comment", L._comment).replace("tag", L._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
2648
+ L.paragraph = Z(L._paragraph).replace("hr", L.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", L._tag).getRegex();
2649
+ L.blockquote = Z(L.blockquote).replace("paragraph", L.paragraph).getRegex();
2650
+ L.normal = Ae({}, L);
2651
+ L.gfm = Ae({}, L.normal, {
2650
2652
  table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
2651
2653
  // Cells
2652
2654
  });
2653
- R.gfm.table = Z(R.gfm.table).replace("hr", R.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", R._tag).getRegex();
2654
- R.gfm.paragraph = Z(R._paragraph).replace("hr", R.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", R.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", R._tag).getRegex();
2655
- R.pedantic = Ae({}, R.normal, {
2655
+ L.gfm.table = Z(L.gfm.table).replace("hr", L.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", L._tag).getRegex();
2656
+ L.gfm.paragraph = Z(L._paragraph).replace("hr", L.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", L.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", L._tag).getRegex();
2657
+ L.pedantic = Ae({}, L.normal, {
2656
2658
  html: Z(
2657
2659
  `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`
2658
- ).replace("comment", R._comment).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(),
2660
+ ).replace("comment", L._comment).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(),
2659
2661
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2660
2662
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2661
2663
  fences: qt,
2662
2664
  // fences not supported
2663
2665
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2664
- paragraph: Z(R.normal._paragraph).replace("hr", R.hr).replace("heading", ` *#{1,6} *[^
2665
- ]`).replace("lheading", R.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex()
2666
+ paragraph: Z(L.normal._paragraph).replace("hr", L.hr).replace("heading", ` *#{1,6} *[^
2667
+ ]`).replace("lheading", L.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex()
2666
2668
  });
2667
2669
  const E = {
2668
2670
  escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
@@ -2692,7 +2694,7 @@ E._punctuation = "!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";
2692
2694
  E.punctuation = Z(E.punctuation).replace(/punctuation/g, E._punctuation).getRegex();
2693
2695
  E.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;
2694
2696
  E.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g;
2695
- E._comment = Z(R._comment).replace("(?:-->|$)", "-->").getRegex();
2697
+ E._comment = Z(L._comment).replace("(?:-->|$)", "-->").getRegex();
2696
2698
  E.emStrong.lDelim = Z(E.emStrong.lDelim).replace(/punct/g, E._punctuation).getRegex();
2697
2699
  E.emStrong.rDelimAst = Z(E.emStrong.rDelimAst, "g").replace(/punct/g, E._punctuation).getRegex();
2698
2700
  E.emStrong.rDelimUnd = Z(E.emStrong.rDelimUnd, "g").replace(/punct/g, E._punctuation).getRegex();
@@ -2706,8 +2708,8 @@ E._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
2706
2708
  E._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;
2707
2709
  E._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
2708
2710
  E.link = Z(E.link).replace("label", E._label).replace("href", E._href).replace("title", E._title).getRegex();
2709
- E.reflink = Z(E.reflink).replace("label", E._label).replace("ref", R._label).getRegex();
2710
- E.nolink = Z(E.nolink).replace("ref", R._label).getRegex();
2711
+ E.reflink = Z(E.reflink).replace("label", E._label).replace("ref", L._label).getRegex();
2712
+ E.nolink = Z(E.nolink).replace("ref", L._label).getRegex();
2711
2713
  E.reflinkSearch = Z(E.reflinkSearch, "g").replace("reflink", E.reflink).replace("nolink", E.nolink).getRegex();
2712
2714
  E.normal = Ae({}, E);
2713
2715
  E.pedantic = Ae({}, E.normal, {
@@ -2751,23 +2753,23 @@ function In(s) {
2751
2753
  }
2752
2754
  class Ue {
2753
2755
  constructor(e) {
2754
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || mt, this.options.tokenizer = this.options.tokenizer || new un(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2756
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || mt, this.options.tokenizer = this.options.tokenizer || new cn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2755
2757
  inLink: !1,
2756
2758
  inRawBlock: !1,
2757
2759
  top: !0
2758
2760
  };
2759
2761
  const t = {
2760
- block: R.normal,
2762
+ block: L.normal,
2761
2763
  inline: E.normal
2762
2764
  };
2763
- this.options.pedantic ? (t.block = R.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = R.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
2765
+ this.options.pedantic ? (t.block = L.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = L.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
2764
2766
  }
2765
2767
  /**
2766
2768
  * Expose Rules
2767
2769
  */
2768
2770
  static get rules() {
2769
2771
  return {
2770
- block: R,
2772
+ block: L,
2771
2773
  inline: E
2772
2774
  };
2773
2775
  }
@@ -2969,7 +2971,7 @@ class Ue {
2969
2971
  return t;
2970
2972
  }
2971
2973
  }
2972
- class dn {
2974
+ class un {
2973
2975
  constructor(e) {
2974
2976
  this.options = e || mt;
2975
2977
  }
@@ -3184,7 +3186,7 @@ class Wn {
3184
3186
  }
3185
3187
  class De {
3186
3188
  constructor(e) {
3187
- this.options = e || mt, this.options.renderer = this.options.renderer || new dn(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Vn(), this.slugger = new Wn();
3189
+ this.options = e || mt, this.options.renderer = this.options.renderer || new un(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Vn(), this.slugger = new Wn();
3188
3190
  }
3189
3191
  /**
3190
3192
  * Static Parse Method
@@ -3202,7 +3204,7 @@ class De {
3202
3204
  * Parse Loop
3203
3205
  */
3204
3206
  parse(e, t = !0) {
3205
- let n = "", i, l, r, o, c, f, h, m, v, g, $, b, k, p, w, S, C, I, M;
3207
+ let n = "", i, l, r, o, c, f, h, m, v, g, $, b, k, p, w, S, C, A, M;
3206
3208
  const T = e.length;
3207
3209
  for (i = 0; i < T; i++) {
3208
3210
  if (g = e[i], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[g.type] && (M = this.options.extensions.renderers[g.type].call({ parser: this }, g), M !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(g.type))) {
@@ -3256,10 +3258,10 @@ class De {
3256
3258
  }
3257
3259
  case "list": {
3258
3260
  for ($ = g.ordered, b = g.start, k = g.loose, o = g.items.length, v = "", l = 0; l < o; l++)
3259
- w = g.items[l], S = w.checked, C = w.task, p = "", w.task && (I = this.renderer.checkbox(S), k ? w.tokens.length > 0 && w.tokens[0].type === "paragraph" ? (w.tokens[0].text = I + " " + w.tokens[0].text, w.tokens[0].tokens && w.tokens[0].tokens.length > 0 && w.tokens[0].tokens[0].type === "text" && (w.tokens[0].tokens[0].text = I + " " + w.tokens[0].tokens[0].text)) : w.tokens.unshift({
3261
+ w = g.items[l], S = w.checked, C = w.task, p = "", w.task && (A = this.renderer.checkbox(S), k ? w.tokens.length > 0 && w.tokens[0].type === "paragraph" ? (w.tokens[0].text = A + " " + w.tokens[0].text, w.tokens[0].tokens && w.tokens[0].tokens.length > 0 && w.tokens[0].tokens[0].type === "text" && (w.tokens[0].tokens[0].text = A + " " + w.tokens[0].tokens[0].text)) : w.tokens.unshift({
3260
3262
  type: "text",
3261
- text: I
3262
- }) : p += I), p += this.parse(w.tokens, k), v += this.renderer.listitem(p, C, S);
3263
+ text: A
3264
+ }) : p += A), p += this.parse(w.tokens, k), v += this.renderer.listitem(p, C, S);
3263
3265
  n += this.renderer.list(v, $, b);
3264
3266
  continue;
3265
3267
  }
@@ -3437,7 +3439,7 @@ z.use = function(...s) {
3437
3439
  }
3438
3440
  i.childTokens && (e.childTokens[i.name] = i.childTokens);
3439
3441
  }), n.extensions = e), t.renderer) {
3440
- const i = z.defaults.renderer || new dn();
3442
+ const i = z.defaults.renderer || new un();
3441
3443
  for (const l in t.renderer) {
3442
3444
  const r = i[l];
3443
3445
  i[l] = (...o) => {
@@ -3448,7 +3450,7 @@ z.use = function(...s) {
3448
3450
  n.renderer = i;
3449
3451
  }
3450
3452
  if (t.tokenizer) {
3451
- const i = z.defaults.tokenizer || new un();
3453
+ const i = z.defaults.tokenizer || new cn();
3452
3454
  for (const l in t.tokenizer) {
3453
3455
  const r = i[l];
3454
3456
  i[l] = (...o) => {
@@ -3509,11 +3511,11 @@ Please report this to https://github.com/markedjs/marked.`, e.silent)
3509
3511
  };
3510
3512
  z.Parser = De;
3511
3513
  z.parser = De.parse;
3512
- z.Renderer = dn;
3514
+ z.Renderer = un;
3513
3515
  z.TextRenderer = Vn;
3514
3516
  z.Lexer = Ue;
3515
3517
  z.lexer = Ue.lex;
3516
- z.Tokenizer = un;
3518
+ z.Tokenizer = cn;
3517
3519
  z.Slugger = Wn;
3518
3520
  z.parse = z;
3519
3521
  z.options;
@@ -3626,43 +3628,43 @@ See: https://github.com/francoischalifour/medium-zoom`);
3626
3628
  var i = document.createEvent("CustomEvent");
3627
3629
  return i.initCustomEvent(e, n.bubbles, n.cancelable, n.detail), i;
3628
3630
  }, rs = function s(e) {
3629
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = window.Promise || function(A) {
3630
- function D() {
3631
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = window.Promise || function(_) {
3632
+ function O() {
3631
3633
  }
3632
- A(D, D);
3633
- }, i = function(A) {
3634
- var D = A.target;
3635
- if (D === X) {
3634
+ _(O, O);
3635
+ }, i = function(_) {
3636
+ var O = _.target;
3637
+ if (O === X) {
3636
3638
  $();
3637
3639
  return;
3638
3640
  }
3639
- S.indexOf(D) !== -1 && b({ target: D });
3641
+ S.indexOf(O) !== -1 && b({ target: O });
3640
3642
  }, l = function() {
3641
- if (!(I || !y.original)) {
3642
- var A = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
3643
- Math.abs(M - A) > T.scrollOffset && setTimeout($, 150);
3643
+ if (!(A || !y.original)) {
3644
+ var _ = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
3645
+ Math.abs(M - _) > T.scrollOffset && setTimeout($, 150);
3644
3646
  }
3645
- }, r = function(A) {
3646
- var D = A.key || A.keyCode;
3647
- (D === "Escape" || D === "Esc" || D === 27) && $();
3647
+ }, r = function(_) {
3648
+ var O = _.key || _.keyCode;
3649
+ (O === "Escape" || O === "Esc" || O === 27) && $();
3648
3650
  }, o = function() {
3649
- var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, D = A;
3650
- if (A.background && (X.style.background = A.background), A.container && A.container instanceof Object && (D.container = Ye({}, T.container, A.container)), A.template) {
3651
- var B = Dt(A.template) ? A.template : document.querySelector(A.template);
3652
- D.template = B;
3651
+ var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, O = _;
3652
+ if (_.background && (X.style.background = _.background), _.container && _.container instanceof Object && (O.container = Ye({}, T.container, _.container)), _.template) {
3653
+ var B = Dt(_.template) ? _.template : document.querySelector(_.template);
3654
+ O.template = B;
3653
3655
  }
3654
- return T = Ye({}, T, D), S.forEach(function(W) {
3656
+ return T = Ye({}, T, O), S.forEach(function(W) {
3655
3657
  W.dispatchEvent(lt("medium-zoom:update", {
3656
3658
  detail: { zoom: V }
3657
3659
  }));
3658
3660
  }), V;
3659
3661
  }, c = function() {
3660
- var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3661
- return s(Ye({}, T, A));
3662
+ var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3663
+ return s(Ye({}, T, _));
3662
3664
  }, f = function() {
3663
- for (var A = arguments.length, D = Array(A), B = 0; B < A; B++)
3664
- D[B] = arguments[B];
3665
- var W = D.reduce(function(H, se) {
3665
+ for (var _ = arguments.length, O = Array(_), B = 0; B < _; B++)
3666
+ O[B] = arguments[B];
3667
+ var W = O.reduce(function(H, se) {
3666
3668
  return [].concat(H, Rn(se));
3667
3669
  }, []);
3668
3670
  return W.filter(function(H) {
@@ -3670,16 +3672,16 @@ See: https://github.com/francoischalifour/medium-zoom`);
3670
3672
  }).forEach(function(H) {
3671
3673
  S.push(H), H.classList.add("medium-zoom-image");
3672
3674
  }), C.forEach(function(H) {
3673
- var se = H.type, _ = H.listener, F = H.options;
3675
+ var se = H.type, F = H.listener, D = H.options;
3674
3676
  W.forEach(function(N) {
3675
- N.addEventListener(se, _, F);
3677
+ N.addEventListener(se, F, D);
3676
3678
  });
3677
3679
  }), V;
3678
3680
  }, h = function() {
3679
- for (var A = arguments.length, D = Array(A), B = 0; B < A; B++)
3680
- D[B] = arguments[B];
3681
+ for (var _ = arguments.length, O = Array(_), B = 0; B < _; B++)
3682
+ O[B] = arguments[B];
3681
3683
  y.zoomed && $();
3682
- var W = D.length > 0 ? D.reduce(function(H, se) {
3684
+ var W = O.length > 0 ? O.reduce(function(H, se) {
3683
3685
  return [].concat(H, Rn(se));
3684
3686
  }, []) : S;
3685
3687
  return W.forEach(function(H) {
@@ -3689,20 +3691,20 @@ See: https://github.com/francoischalifour/medium-zoom`);
3689
3691
  }), S = S.filter(function(H) {
3690
3692
  return W.indexOf(H) === -1;
3691
3693
  }), V;
3692
- }, m = function(A, D) {
3694
+ }, m = function(_, O) {
3693
3695
  var B = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3694
3696
  return S.forEach(function(W) {
3695
- W.addEventListener("medium-zoom:" + A, D, B);
3696
- }), C.push({ type: "medium-zoom:" + A, listener: D, options: B }), V;
3697
- }, v = function(A, D) {
3697
+ W.addEventListener("medium-zoom:" + _, O, B);
3698
+ }), C.push({ type: "medium-zoom:" + _, listener: O, options: B }), V;
3699
+ }, v = function(_, O) {
3698
3700
  var B = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3699
3701
  return S.forEach(function(W) {
3700
- W.removeEventListener("medium-zoom:" + A, D, B);
3702
+ W.removeEventListener("medium-zoom:" + _, O, B);
3701
3703
  }), C = C.filter(function(W) {
3702
- return !(W.type === "medium-zoom:" + A && W.listener.toString() === D.toString());
3704
+ return !(W.type === "medium-zoom:" + _ && W.listener.toString() === O.toString());
3703
3705
  }), V;
3704
3706
  }, g = function() {
3705
- var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, D = A.target, B = function() {
3707
+ var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, O = _.target, B = function() {
3706
3708
  var H = {
3707
3709
  width: document.documentElement.clientWidth,
3708
3710
  height: document.documentElement.clientHeight,
@@ -3710,30 +3712,30 @@ See: https://github.com/francoischalifour/medium-zoom`);
3710
3712
  top: 0,
3711
3713
  right: 0,
3712
3714
  bottom: 0
3713
- }, se = void 0, _ = void 0;
3715
+ }, se = void 0, F = void 0;
3714
3716
  if (T.container)
3715
3717
  if (T.container instanceof Object)
3716
- H = Ye({}, H, T.container), se = H.width - H.left - H.right - T.margin * 2, _ = H.height - H.top - H.bottom - T.margin * 2;
3718
+ H = Ye({}, H, T.container), se = H.width - H.left - H.right - T.margin * 2, F = H.height - H.top - H.bottom - T.margin * 2;
3717
3719
  else {
3718
- var F = Dt(T.container) ? T.container : document.querySelector(T.container), N = F.getBoundingClientRect(), le = N.width, de = N.height, ve = N.left, Ie = N.top;
3720
+ var D = Dt(T.container) ? T.container : document.querySelector(T.container), N = D.getBoundingClientRect(), ce = N.width, de = N.height, ve = N.left, Ie = N.top;
3719
3721
  H = Ye({}, H, {
3720
- width: le,
3722
+ width: ce,
3721
3723
  height: de,
3722
3724
  left: ve,
3723
3725
  top: Ie
3724
3726
  });
3725
3727
  }
3726
- se = se || H.width - T.margin * 2, _ = _ || H.height - T.margin * 2;
3727
- var He = y.zoomedHd || y.original, Xe = Fn(He) ? se : He.naturalWidth || se, qe = Fn(He) ? _ : He.naturalHeight || _, Qe = He.getBoundingClientRect(), Tt = Qe.top, Et = Qe.left, nt = Qe.width, it = Qe.height, zt = Math.min(Math.max(nt, Xe), se) / nt, _t = Math.min(Math.max(it, qe), _) / it, st = Math.min(zt, _t), At = (-Et + (se - nt) / 2 + T.margin + H.left) / st, It = (-Tt + (_ - it) / 2 + T.margin + H.top) / st, gt = "scale(" + st + ") translate3d(" + At + "px, " + It + "px, 0)";
3728
+ se = se || H.width - T.margin * 2, F = F || H.height - T.margin * 2;
3729
+ var He = y.zoomedHd || y.original, Xe = Fn(He) ? se : He.naturalWidth || se, qe = Fn(He) ? F : He.naturalHeight || F, Qe = He.getBoundingClientRect(), Tt = Qe.top, Et = Qe.left, nt = Qe.width, it = Qe.height, zt = Math.min(Math.max(nt, Xe), se) / nt, _t = Math.min(Math.max(it, qe), F) / it, st = Math.min(zt, _t), At = (-Et + (se - nt) / 2 + T.margin + H.left) / st, It = (-Tt + (F - it) / 2 + T.margin + H.top) / st, gt = "scale(" + st + ") translate3d(" + At + "px, " + It + "px, 0)";
3728
3730
  y.zoomed.style.transform = gt, y.zoomedHd && (y.zoomedHd.style.transform = gt);
3729
3731
  };
3730
3732
  return new n(function(W) {
3731
- if (D && S.indexOf(D) === -1) {
3733
+ if (O && S.indexOf(O) === -1) {
3732
3734
  W(V);
3733
3735
  return;
3734
3736
  }
3735
- var H = function le() {
3736
- I = !1, y.zoomed.removeEventListener("transitionend", le), y.original.dispatchEvent(lt("medium-zoom:opened", {
3737
+ var H = function ce() {
3738
+ A = !1, y.zoomed.removeEventListener("transitionend", ce), y.original.dispatchEvent(lt("medium-zoom:opened", {
3737
3739
  detail: { zoom: V }
3738
3740
  })), W(V);
3739
3741
  };
@@ -3741,8 +3743,8 @@ See: https://github.com/francoischalifour/medium-zoom`);
3741
3743
  W(V);
3742
3744
  return;
3743
3745
  }
3744
- if (D)
3745
- y.original = D;
3746
+ if (O)
3747
+ y.original = O;
3746
3748
  else if (S.length > 0) {
3747
3749
  var se = S;
3748
3750
  y.original = se[0];
@@ -3752,18 +3754,18 @@ See: https://github.com/francoischalifour/medium-zoom`);
3752
3754
  }
3753
3755
  if (y.original.dispatchEvent(lt("medium-zoom:open", {
3754
3756
  detail: { zoom: V }
3755
- })), M = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, I = !0, y.zoomed = os(y.original), document.body.appendChild(X), T.template) {
3756
- var _ = Dt(T.template) ? T.template : document.querySelector(T.template);
3757
- y.template = document.createElement("div"), y.template.appendChild(_.content.cloneNode(!0)), document.body.appendChild(y.template);
3757
+ })), M = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, A = !0, y.zoomed = os(y.original), document.body.appendChild(X), T.template) {
3758
+ var F = Dt(T.template) ? T.template : document.querySelector(T.template);
3759
+ y.template = document.createElement("div"), y.template.appendChild(F.content.cloneNode(!0)), document.body.appendChild(y.template);
3758
3760
  }
3759
3761
  if (y.original.parentElement && y.original.parentElement.tagName === "PICTURE" && y.original.currentSrc && (y.zoomed.src = y.original.currentSrc), document.body.appendChild(y.zoomed), window.requestAnimationFrame(function() {
3760
3762
  document.body.classList.add("medium-zoom--opened");
3761
3763
  }), y.original.classList.add("medium-zoom-image--hidden"), y.zoomed.classList.add("medium-zoom-image--opened"), y.zoomed.addEventListener("click", $), y.zoomed.addEventListener("transitionend", H), y.original.getAttribute("data-zoom-src")) {
3762
3764
  y.zoomedHd = y.zoomed.cloneNode(), y.zoomedHd.removeAttribute("srcset"), y.zoomedHd.removeAttribute("sizes"), y.zoomedHd.removeAttribute("loading"), y.zoomedHd.src = y.zoomed.getAttribute("data-zoom-src"), y.zoomedHd.onerror = function() {
3763
- clearInterval(F), console.warn("Unable to reach the zoom image target " + y.zoomedHd.src), y.zoomedHd = null, B();
3765
+ clearInterval(D), console.warn("Unable to reach the zoom image target " + y.zoomedHd.src), y.zoomedHd = null, B();
3764
3766
  };
3765
- var F = setInterval(function() {
3766
- y.zoomedHd.complete && (clearInterval(F), y.zoomedHd.classList.add("medium-zoom-image--opened"), y.zoomedHd.addEventListener("click", $), document.body.appendChild(y.zoomedHd), B());
3767
+ var D = setInterval(function() {
3768
+ y.zoomedHd.complete && (clearInterval(D), y.zoomedHd.classList.add("medium-zoom-image--opened"), y.zoomedHd.addEventListener("click", $), document.body.appendChild(y.zoomedHd), B());
3767
3769
  }, 10);
3768
3770
  } else if (y.original.hasAttribute("srcset")) {
3769
3771
  y.zoomedHd = y.zoomed.cloneNode(), y.zoomedHd.removeAttribute("sizes"), y.zoomedHd.removeAttribute("loading");
@@ -3774,30 +3776,30 @@ See: https://github.com/francoischalifour/medium-zoom`);
3774
3776
  B();
3775
3777
  });
3776
3778
  }, $ = function() {
3777
- return new n(function(A) {
3778
- if (I || !y.original) {
3779
- A(V);
3779
+ return new n(function(_) {
3780
+ if (A || !y.original) {
3781
+ _(V);
3780
3782
  return;
3781
3783
  }
3782
- var D = function B() {
3783
- y.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(y.zoomed), y.zoomedHd && document.body.removeChild(y.zoomedHd), document.body.removeChild(X), y.zoomed.classList.remove("medium-zoom-image--opened"), y.template && document.body.removeChild(y.template), I = !1, y.zoomed.removeEventListener("transitionend", B), y.original.dispatchEvent(lt("medium-zoom:closed", {
3784
+ var O = function B() {
3785
+ y.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(y.zoomed), y.zoomedHd && document.body.removeChild(y.zoomedHd), document.body.removeChild(X), y.zoomed.classList.remove("medium-zoom-image--opened"), y.template && document.body.removeChild(y.template), A = !1, y.zoomed.removeEventListener("transitionend", B), y.original.dispatchEvent(lt("medium-zoom:closed", {
3784
3786
  detail: { zoom: V }
3785
- })), y.original = null, y.zoomed = null, y.zoomedHd = null, y.template = null, A(V);
3787
+ })), y.original = null, y.zoomed = null, y.zoomedHd = null, y.template = null, _(V);
3786
3788
  };
3787
- I = !0, document.body.classList.remove("medium-zoom--opened"), y.zoomed.style.transform = "", y.zoomedHd && (y.zoomedHd.style.transform = ""), y.template && (y.template.style.transition = "opacity 150ms", y.template.style.opacity = 0), y.original.dispatchEvent(lt("medium-zoom:close", {
3789
+ A = !0, document.body.classList.remove("medium-zoom--opened"), y.zoomed.style.transform = "", y.zoomedHd && (y.zoomedHd.style.transform = ""), y.template && (y.template.style.transition = "opacity 150ms", y.template.style.opacity = 0), y.original.dispatchEvent(lt("medium-zoom:close", {
3788
3790
  detail: { zoom: V }
3789
- })), y.zoomed.addEventListener("transitionend", D);
3791
+ })), y.zoomed.addEventListener("transitionend", O);
3790
3792
  });
3791
3793
  }, b = function() {
3792
- var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, D = A.target;
3793
- return y.original ? $() : g({ target: D });
3794
+ var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, O = _.target;
3795
+ return y.original ? $() : g({ target: O });
3794
3796
  }, k = function() {
3795
3797
  return T;
3796
3798
  }, p = function() {
3797
3799
  return S;
3798
3800
  }, w = function() {
3799
3801
  return y.original;
3800
- }, S = [], C = [], I = !1, M = 0, T = t, y = {
3802
+ }, S = [], C = [], A = !1, M = 0, T = t, y = {
3801
3803
  original: null,
3802
3804
  zoomed: null,
3803
3805
  zoomedHd: null,
@@ -3850,8 +3852,8 @@ class Ht extends Array {
3850
3852
  var at;
3851
3853
  const rt = class {
3852
3854
  constructor(e, t) {
3853
- oe(this, "heap");
3854
- oe(this, "length");
3855
+ le(this, "heap");
3856
+ le(this, "length");
3855
3857
  if (!a(rt, at))
3856
3858
  throw new TypeError("instantiate Stack using Stack.create(n)");
3857
3859
  this.heap = new t(e), this.length = 0;
@@ -3860,9 +3862,9 @@ const rt = class {
3860
3862
  const t = Gn(e);
3861
3863
  if (!t)
3862
3864
  return [];
3863
- O(rt, at, !0);
3865
+ R(rt, at, !0);
3864
3866
  const n = new rt(e, t);
3865
- return O(rt, at, !1), n;
3867
+ return R(rt, at, !1), n;
3866
3868
  }
3867
3869
  push(e) {
3868
3870
  this.heap[this.length++] = e;
@@ -3874,8 +3876,8 @@ const rt = class {
3874
3876
  let jt = rt;
3875
3877
  at = new WeakMap(), // private constructor
3876
3878
  P(jt, at, !1);
3877
- var $e, be, Le, Se, ct, re, Ce, ae, Q, j, ge, ke, me, ue, Te, he, Me, Be, Ee, Fe, Ge, pe, yt, tn, Je, Ne, wt, ye, Wt, Zn, et, ut, xt, Re, We, Oe, Ke, $t, nn, dt, Pt, ht, Mt, Y, ee, St, sn, tt, kt;
3878
- const hn = class {
3879
+ var $e, be, Le, Se, ct, oe, Ce, re, Q, j, ge, ke, me, ue, Te, he, Me, Be, Ee, Fe, Ge, pe, yt, en, Je, Ne, wt, ye, Wt, Zn, et, ut, xt, Re, We, Oe, Ke, $t, tn, dt, Pt, ht, Mt, Y, ee, St, nn, tt, kt;
3880
+ const dn = class {
3879
3881
  constructor(e) {
3880
3882
  P(this, yt);
3881
3883
  P(this, Wt);
@@ -3898,67 +3900,67 @@ const hn = class {
3898
3900
  /**
3899
3901
  * {@link LRUCache.OptionsBase.ttl}
3900
3902
  */
3901
- oe(this, "ttl");
3903
+ le(this, "ttl");
3902
3904
  /**
3903
3905
  * {@link LRUCache.OptionsBase.ttlResolution}
3904
3906
  */
3905
- oe(this, "ttlResolution");
3907
+ le(this, "ttlResolution");
3906
3908
  /**
3907
3909
  * {@link LRUCache.OptionsBase.ttlAutopurge}
3908
3910
  */
3909
- oe(this, "ttlAutopurge");
3911
+ le(this, "ttlAutopurge");
3910
3912
  /**
3911
3913
  * {@link LRUCache.OptionsBase.updateAgeOnGet}
3912
3914
  */
3913
- oe(this, "updateAgeOnGet");
3915
+ le(this, "updateAgeOnGet");
3914
3916
  /**
3915
3917
  * {@link LRUCache.OptionsBase.updateAgeOnHas}
3916
3918
  */
3917
- oe(this, "updateAgeOnHas");
3919
+ le(this, "updateAgeOnHas");
3918
3920
  /**
3919
3921
  * {@link LRUCache.OptionsBase.allowStale}
3920
3922
  */
3921
- oe(this, "allowStale");
3923
+ le(this, "allowStale");
3922
3924
  /**
3923
3925
  * {@link LRUCache.OptionsBase.noDisposeOnSet}
3924
3926
  */
3925
- oe(this, "noDisposeOnSet");
3927
+ le(this, "noDisposeOnSet");
3926
3928
  /**
3927
3929
  * {@link LRUCache.OptionsBase.noUpdateTTL}
3928
3930
  */
3929
- oe(this, "noUpdateTTL");
3931
+ le(this, "noUpdateTTL");
3930
3932
  /**
3931
3933
  * {@link LRUCache.OptionsBase.maxEntrySize}
3932
3934
  */
3933
- oe(this, "maxEntrySize");
3935
+ le(this, "maxEntrySize");
3934
3936
  /**
3935
3937
  * {@link LRUCache.OptionsBase.sizeCalculation}
3936
3938
  */
3937
- oe(this, "sizeCalculation");
3939
+ le(this, "sizeCalculation");
3938
3940
  /**
3939
3941
  * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
3940
3942
  */
3941
- oe(this, "noDeleteOnFetchRejection");
3943
+ le(this, "noDeleteOnFetchRejection");
3942
3944
  /**
3943
3945
  * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
3944
3946
  */
3945
- oe(this, "noDeleteOnStaleGet");
3947
+ le(this, "noDeleteOnStaleGet");
3946
3948
  /**
3947
3949
  * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
3948
3950
  */
3949
- oe(this, "allowStaleOnFetchAbort");
3951
+ le(this, "allowStaleOnFetchAbort");
3950
3952
  /**
3951
3953
  * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
3952
3954
  */
3953
- oe(this, "allowStaleOnFetchRejection");
3955
+ le(this, "allowStaleOnFetchRejection");
3954
3956
  /**
3955
3957
  * {@link LRUCache.OptionsBase.ignoreFetchAbort}
3956
3958
  */
3957
- oe(this, "ignoreFetchAbort");
3959
+ le(this, "ignoreFetchAbort");
3958
3960
  // computed properties
3959
- P(this, re, void 0);
3961
+ P(this, oe, void 0);
3960
3962
  P(this, Ce, void 0);
3961
- P(this, ae, void 0);
3963
+ P(this, re, void 0);
3962
3964
  P(this, Q, void 0);
3963
3965
  P(this, j, void 0);
3964
3966
  P(this, ge, void 0);
@@ -3991,13 +3993,13 @@ const hn = class {
3991
3993
  throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
3992
3994
  return 0;
3993
3995
  });
3994
- const { max: t = 0, ttl: n, ttlResolution: i = 1, ttlAutopurge: l, updateAgeOnGet: r, updateAgeOnHas: o, allowStale: c, dispose: f, disposeAfter: h, noDisposeOnSet: m, noUpdateTTL: v, maxSize: g = 0, maxEntrySize: $ = 0, sizeCalculation: b, fetchMethod: k, noDeleteOnFetchRejection: p, noDeleteOnStaleGet: w, allowStaleOnFetchRejection: S, allowStaleOnFetchAbort: C, ignoreFetchAbort: I } = e;
3996
+ const { max: t = 0, ttl: n, ttlResolution: i = 1, ttlAutopurge: l, updateAgeOnGet: r, updateAgeOnHas: o, allowStale: c, dispose: f, disposeAfter: h, noDisposeOnSet: m, noUpdateTTL: v, maxSize: g = 0, maxEntrySize: $ = 0, sizeCalculation: b, fetchMethod: k, noDeleteOnFetchRejection: p, noDeleteOnStaleGet: w, allowStaleOnFetchRejection: S, allowStaleOnFetchAbort: C, ignoreFetchAbort: A } = e;
3995
3997
  if (t !== 0 && !Ve(t))
3996
3998
  throw new TypeError("max option must be a nonnegative integer");
3997
3999
  const M = t ? Gn(t) : Array;
3998
4000
  if (!M)
3999
4001
  throw new Error("invalid max value: " + t);
4000
- if (O(this, $e, t), O(this, be, g), this.maxEntrySize = $ || a(this, be), this.sizeCalculation = b, this.sizeCalculation) {
4002
+ if (R(this, $e, t), R(this, be, g), this.maxEntrySize = $ || a(this, be), this.sizeCalculation = b, this.sizeCalculation) {
4001
4003
  if (!a(this, be) && !this.maxEntrySize)
4002
4004
  throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
4003
4005
  if (typeof this.sizeCalculation != "function")
@@ -4005,23 +4007,23 @@ const hn = class {
4005
4007
  }
4006
4008
  if (k !== void 0 && typeof k != "function")
4007
4009
  throw new TypeError("fetchMethod must be a function if specified");
4008
- if (O(this, ct, k), O(this, Ge, !!k), O(this, ae, /* @__PURE__ */ new Map()), O(this, Q, new Array(t).fill(void 0)), O(this, j, new Array(t).fill(void 0)), O(this, ge, new M(t)), O(this, ke, new M(t)), O(this, me, 0), O(this, ue, 0), O(this, Te, jt.create(t)), O(this, re, 0), O(this, Ce, 0), typeof f == "function" && O(this, Le, f), typeof h == "function" ? (O(this, Se, h), O(this, he, [])) : (O(this, Se, void 0), O(this, he, void 0)), O(this, Fe, !!a(this, Le)), O(this, pe, !!a(this, Se)), this.noDisposeOnSet = !!m, this.noUpdateTTL = !!v, this.noDeleteOnFetchRejection = !!p, this.allowStaleOnFetchRejection = !!S, this.allowStaleOnFetchAbort = !!C, this.ignoreFetchAbort = !!I, this.maxEntrySize !== 0) {
4010
+ if (R(this, ct, k), R(this, Ge, !!k), R(this, re, /* @__PURE__ */ new Map()), R(this, Q, new Array(t).fill(void 0)), R(this, j, new Array(t).fill(void 0)), R(this, ge, new M(t)), R(this, ke, new M(t)), R(this, me, 0), R(this, ue, 0), R(this, Te, jt.create(t)), R(this, oe, 0), R(this, Ce, 0), typeof f == "function" && R(this, Le, f), typeof h == "function" ? (R(this, Se, h), R(this, he, [])) : (R(this, Se, void 0), R(this, he, void 0)), R(this, Fe, !!a(this, Le)), R(this, pe, !!a(this, Se)), this.noDisposeOnSet = !!m, this.noUpdateTTL = !!v, this.noDeleteOnFetchRejection = !!p, this.allowStaleOnFetchRejection = !!S, this.allowStaleOnFetchAbort = !!C, this.ignoreFetchAbort = !!A, this.maxEntrySize !== 0) {
4009
4011
  if (a(this, be) !== 0 && !Ve(a(this, be)))
4010
4012
  throw new TypeError("maxSize must be a positive integer if specified");
4011
4013
  if (!Ve(this.maxEntrySize))
4012
4014
  throw new TypeError("maxEntrySize must be a positive integer if specified");
4013
- L(this, Wt, Zn).call(this);
4015
+ I(this, Wt, Zn).call(this);
4014
4016
  }
4015
4017
  if (this.allowStale = !!c, this.noDeleteOnStaleGet = !!w, this.updateAgeOnGet = !!r, this.updateAgeOnHas = !!o, this.ttlResolution = Ve(i) || i === 0 ? i : 1, this.ttlAutopurge = !!l, this.ttl = n || 0, this.ttl) {
4016
4018
  if (!Ve(this.ttl))
4017
4019
  throw new TypeError("ttl must be a positive integer if specified");
4018
- L(this, yt, tn).call(this);
4020
+ I(this, yt, en).call(this);
4019
4021
  }
4020
4022
  if (a(this, $e) === 0 && this.ttl === 0 && a(this, be) === 0)
4021
4023
  throw new TypeError("At least one of max, maxSize, or ttl is required");
4022
4024
  if (!this.ttlAutopurge && !a(this, $e) && !a(this, be)) {
4023
4025
  const T = "LRU_CACHE_UNBOUNDED";
4024
- hs(T) && (Kn.add(T), ds("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", T, hn));
4026
+ hs(T) && (Kn.add(T), ds("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", T, dn));
4025
4027
  }
4026
4028
  }
4027
4029
  /**
@@ -4039,7 +4041,7 @@ const hn = class {
4039
4041
  starts: a(e, Be),
4040
4042
  ttls: a(e, Ee),
4041
4043
  sizes: a(e, Me),
4042
- keyMap: a(e, ae),
4044
+ keyMap: a(e, re),
4043
4045
  keyList: a(e, Q),
4044
4046
  valList: a(e, j),
4045
4047
  next: a(e, ge),
@@ -4054,23 +4056,23 @@ const hn = class {
4054
4056
  // methods
4055
4057
  isBackgroundFetch: (t) => {
4056
4058
  var n;
4057
- return L(n = e, Y, ee).call(n, t);
4059
+ return I(n = e, Y, ee).call(n, t);
4058
4060
  },
4059
4061
  backgroundFetch: (t, n, i, l) => {
4060
4062
  var r;
4061
- return L(r = e, ht, Mt).call(r, t, n, i, l);
4063
+ return I(r = e, ht, Mt).call(r, t, n, i, l);
4062
4064
  },
4063
4065
  moveToTail: (t) => {
4064
4066
  var n;
4065
- return L(n = e, tt, kt).call(n, t);
4067
+ return I(n = e, tt, kt).call(n, t);
4066
4068
  },
4067
4069
  indexes: (t) => {
4068
4070
  var n;
4069
- return L(n = e, Re, We).call(n, t);
4071
+ return I(n = e, Re, We).call(n, t);
4070
4072
  },
4071
4073
  rindexes: (t) => {
4072
4074
  var n;
4073
- return L(n = e, Oe, Ke).call(n, t);
4075
+ return I(n = e, Oe, Ke).call(n, t);
4074
4076
  },
4075
4077
  isStale: (t) => {
4076
4078
  var n;
@@ -4101,7 +4103,7 @@ const hn = class {
4101
4103
  * The number of items stored in the cache (read-only)
4102
4104
  */
4103
4105
  get size() {
4104
- return a(this, re);
4106
+ return a(this, oe);
4105
4107
  }
4106
4108
  /**
4107
4109
  * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
@@ -4125,15 +4127,15 @@ const hn = class {
4125
4127
  * Return the remaining TTL time for a given entry key
4126
4128
  */
4127
4129
  getRemainingTTL(e) {
4128
- return a(this, ae).has(e) ? 1 / 0 : 0;
4130
+ return a(this, re).has(e) ? 1 / 0 : 0;
4129
4131
  }
4130
4132
  /**
4131
4133
  * Return a generator yielding `[key, value]` pairs,
4132
4134
  * in order from most recently used to least recently used.
4133
4135
  */
4134
4136
  *entries() {
4135
- for (const e of L(this, Re, We).call(this))
4136
- a(this, j)[e] !== void 0 && a(this, Q)[e] !== void 0 && !L(this, Y, ee).call(this, a(this, j)[e]) && (yield [a(this, Q)[e], a(this, j)[e]]);
4137
+ for (const e of I(this, Re, We).call(this))
4138
+ a(this, j)[e] !== void 0 && a(this, Q)[e] !== void 0 && !I(this, Y, ee).call(this, a(this, j)[e]) && (yield [a(this, Q)[e], a(this, j)[e]]);
4137
4139
  }
4138
4140
  /**
4139
4141
  * Inverse order version of {@link LRUCache.entries}
@@ -4142,17 +4144,17 @@ const hn = class {
4142
4144
  * in order from least recently used to most recently used.
4143
4145
  */
4144
4146
  *rentries() {
4145
- for (const e of L(this, Oe, Ke).call(this))
4146
- a(this, j)[e] !== void 0 && a(this, Q)[e] !== void 0 && !L(this, Y, ee).call(this, a(this, j)[e]) && (yield [a(this, Q)[e], a(this, j)[e]]);
4147
+ for (const e of I(this, Oe, Ke).call(this))
4148
+ a(this, j)[e] !== void 0 && a(this, Q)[e] !== void 0 && !I(this, Y, ee).call(this, a(this, j)[e]) && (yield [a(this, Q)[e], a(this, j)[e]]);
4147
4149
  }
4148
4150
  /**
4149
4151
  * Return a generator yielding the keys in the cache,
4150
4152
  * in order from most recently used to least recently used.
4151
4153
  */
4152
4154
  *keys() {
4153
- for (const e of L(this, Re, We).call(this)) {
4155
+ for (const e of I(this, Re, We).call(this)) {
4154
4156
  const t = a(this, Q)[e];
4155
- t !== void 0 && !L(this, Y, ee).call(this, a(this, j)[e]) && (yield t);
4157
+ t !== void 0 && !I(this, Y, ee).call(this, a(this, j)[e]) && (yield t);
4156
4158
  }
4157
4159
  }
4158
4160
  /**
@@ -4162,9 +4164,9 @@ const hn = class {
4162
4164
  * in order from least recently used to most recently used.
4163
4165
  */
4164
4166
  *rkeys() {
4165
- for (const e of L(this, Oe, Ke).call(this)) {
4167
+ for (const e of I(this, Oe, Ke).call(this)) {
4166
4168
  const t = a(this, Q)[e];
4167
- t !== void 0 && !L(this, Y, ee).call(this, a(this, j)[e]) && (yield t);
4169
+ t !== void 0 && !I(this, Y, ee).call(this, a(this, j)[e]) && (yield t);
4168
4170
  }
4169
4171
  }
4170
4172
  /**
@@ -4172,8 +4174,8 @@ const hn = class {
4172
4174
  * in order from most recently used to least recently used.
4173
4175
  */
4174
4176
  *values() {
4175
- for (const e of L(this, Re, We).call(this))
4176
- a(this, j)[e] !== void 0 && !L(this, Y, ee).call(this, a(this, j)[e]) && (yield a(this, j)[e]);
4177
+ for (const e of I(this, Re, We).call(this))
4178
+ a(this, j)[e] !== void 0 && !I(this, Y, ee).call(this, a(this, j)[e]) && (yield a(this, j)[e]);
4177
4179
  }
4178
4180
  /**
4179
4181
  * Inverse order version of {@link LRUCache.values}
@@ -4182,8 +4184,8 @@ const hn = class {
4182
4184
  * in order from least recently used to most recently used.
4183
4185
  */
4184
4186
  *rvalues() {
4185
- for (const e of L(this, Oe, Ke).call(this))
4186
- a(this, j)[e] !== void 0 && !L(this, Y, ee).call(this, a(this, j)[e]) && (yield a(this, j)[e]);
4187
+ for (const e of I(this, Oe, Ke).call(this))
4188
+ a(this, j)[e] !== void 0 && !I(this, Y, ee).call(this, a(this, j)[e]) && (yield a(this, j)[e]);
4187
4189
  }
4188
4190
  /**
4189
4191
  * Iterating over the cache itself yields the same results as
@@ -4197,8 +4199,8 @@ const hn = class {
4197
4199
  * similar to Array.find(). fn is called as fn(value, key, cache).
4198
4200
  */
4199
4201
  find(e, t = {}) {
4200
- for (const n of L(this, Re, We).call(this)) {
4201
- const i = a(this, j)[n], l = L(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4202
+ for (const n of I(this, Re, We).call(this)) {
4203
+ const i = a(this, j)[n], l = I(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4202
4204
  if (l !== void 0 && e(l, a(this, Q)[n], this))
4203
4205
  return this.get(a(this, Q)[n], t);
4204
4206
  }
@@ -4210,8 +4212,8 @@ const hn = class {
4210
4212
  * Does not iterate over stale values.
4211
4213
  */
4212
4214
  forEach(e, t = this) {
4213
- for (const n of L(this, Re, We).call(this)) {
4214
- const i = a(this, j)[n], l = L(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4215
+ for (const n of I(this, Re, We).call(this)) {
4216
+ const i = a(this, j)[n], l = I(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4215
4217
  l !== void 0 && e.call(t, l, a(this, Q)[n], this);
4216
4218
  }
4217
4219
  }
@@ -4220,8 +4222,8 @@ const hn = class {
4220
4222
  * reverse order. (ie, less recently used items are iterated over first.)
4221
4223
  */
4222
4224
  rforEach(e, t = this) {
4223
- for (const n of L(this, Oe, Ke).call(this)) {
4224
- const i = a(this, j)[n], l = L(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4225
+ for (const n of I(this, Oe, Ke).call(this)) {
4226
+ const i = a(this, j)[n], l = I(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4225
4227
  l !== void 0 && e.call(t, l, a(this, Q)[n], this);
4226
4228
  }
4227
4229
  }
@@ -4231,7 +4233,7 @@ const hn = class {
4231
4233
  */
4232
4234
  purgeStale() {
4233
4235
  let e = !1;
4234
- for (const t of L(this, Oe, Ke).call(this, { allowStale: !0 }))
4236
+ for (const t of I(this, Oe, Ke).call(this, { allowStale: !0 }))
4235
4237
  a(this, ye).call(this, t) && (this.delete(a(this, Q)[t]), e = !0);
4236
4238
  return e;
4237
4239
  }
@@ -4241,8 +4243,8 @@ const hn = class {
4241
4243
  */
4242
4244
  dump() {
4243
4245
  const e = [];
4244
- for (const t of L(this, Re, We).call(this, { allowStale: !0 })) {
4245
- const n = a(this, Q)[t], i = a(this, j)[t], l = L(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4246
+ for (const t of I(this, Re, We).call(this, { allowStale: !0 })) {
4247
+ const n = a(this, Q)[t], i = a(this, j)[t], l = I(this, Y, ee).call(this, i) ? i.__staleWhileFetching : i;
4246
4248
  if (l === void 0 || n === void 0)
4247
4249
  continue;
4248
4250
  const r = { value: l };
@@ -4280,22 +4282,22 @@ const hn = class {
4280
4282
  const h = a(this, xt).call(this, e, t, n.size || 0, o);
4281
4283
  if (this.maxEntrySize && h > this.maxEntrySize)
4282
4284
  return c && (c.set = "miss", c.maxEntrySizeExceeded = !0), this.delete(e), this;
4283
- let m = a(this, re) === 0 ? void 0 : a(this, ae).get(e);
4285
+ let m = a(this, oe) === 0 ? void 0 : a(this, re).get(e);
4284
4286
  if (m === void 0)
4285
- m = a(this, re) === 0 ? a(this, ue) : a(this, Te).length !== 0 ? a(this, Te).pop() : a(this, re) === a(this, $e) ? L(this, dt, Pt).call(this, !1) : a(this, re), a(this, Q)[m] = e, a(this, j)[m] = t, a(this, ae).set(e, m), a(this, ge)[a(this, ue)] = m, a(this, ke)[m] = a(this, ue), O(this, ue, m), Lt(this, re)._++, a(this, ut).call(this, m, h, c), c && (c.set = "add"), f = !1;
4287
+ m = a(this, oe) === 0 ? a(this, ue) : a(this, Te).length !== 0 ? a(this, Te).pop() : a(this, oe) === a(this, $e) ? I(this, dt, Pt).call(this, !1) : a(this, oe), a(this, Q)[m] = e, a(this, j)[m] = t, a(this, re).set(e, m), a(this, ge)[a(this, ue)] = m, a(this, ke)[m] = a(this, ue), R(this, ue, m), Lt(this, oe)._++, a(this, ut).call(this, m, h, c), c && (c.set = "add"), f = !1;
4286
4288
  else {
4287
- L(this, tt, kt).call(this, m);
4289
+ I(this, tt, kt).call(this, m);
4288
4290
  const b = a(this, j)[m];
4289
4291
  if (t !== b) {
4290
- if (a(this, Ge) && L(this, Y, ee).call(this, b) ? b.__abortController.abort(new Error("replaced")) : r || (a(this, Fe) && ((v = a(this, Le)) == null || v.call(this, b, e, "set")), a(this, pe) && ((g = a(this, he)) == null || g.push([b, e, "set"]))), a(this, et).call(this, m), a(this, ut).call(this, m, h, c), a(this, j)[m] = t, c) {
4292
+ if (a(this, Ge) && I(this, Y, ee).call(this, b) ? b.__abortController.abort(new Error("replaced")) : r || (a(this, Fe) && ((v = a(this, Le)) == null || v.call(this, b, e, "set")), a(this, pe) && ((g = a(this, he)) == null || g.push([b, e, "set"]))), a(this, et).call(this, m), a(this, ut).call(this, m, h, c), a(this, j)[m] = t, c) {
4291
4293
  c.set = "replace";
4292
- const k = b && L(this, Y, ee).call(this, b) ? b.__staleWhileFetching : b;
4294
+ const k = b && I(this, Y, ee).call(this, b) ? b.__staleWhileFetching : b;
4293
4295
  k !== void 0 && (c.oldValue = k);
4294
4296
  }
4295
4297
  } else
4296
4298
  c && (c.set = "update");
4297
4299
  }
4298
- if (i !== 0 && !a(this, Ee) && L(this, yt, tn).call(this), a(this, Ee) && (f || a(this, wt).call(this, m, i, l), c && a(this, Ne).call(this, c, m)), !r && a(this, pe) && a(this, he)) {
4300
+ if (i !== 0 && !a(this, Ee) && I(this, yt, en).call(this), a(this, Ee) && (f || a(this, wt).call(this, m, i, l), c && a(this, Ne).call(this, c, m)), !r && a(this, pe) && a(this, he)) {
4299
4301
  const b = a(this, he);
4300
4302
  let k;
4301
4303
  for (; k = b == null ? void 0 : b.shift(); )
@@ -4310,9 +4312,9 @@ const hn = class {
4310
4312
  pop() {
4311
4313
  var e;
4312
4314
  try {
4313
- for (; a(this, re); ) {
4315
+ for (; a(this, oe); ) {
4314
4316
  const t = a(this, j)[a(this, me)];
4315
- if (L(this, dt, Pt).call(this, !0), L(this, Y, ee).call(this, t)) {
4317
+ if (I(this, dt, Pt).call(this, !0), I(this, Y, ee).call(this, t)) {
4316
4318
  if (t.__staleWhileFetching)
4317
4319
  return t.__staleWhileFetching;
4318
4320
  } else if (t !== void 0)
@@ -4336,7 +4338,7 @@ const hn = class {
4336
4338
  * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
4337
4339
  */
4338
4340
  has(e, t = {}) {
4339
- const { updateAgeOnHas: n = this.updateAgeOnHas, status: i } = t, l = a(this, ae).get(e);
4341
+ const { updateAgeOnHas: n = this.updateAgeOnHas, status: i } = t, l = a(this, re).get(e);
4340
4342
  if (l !== void 0)
4341
4343
  if (a(this, ye).call(this, l))
4342
4344
  i && (i.has = "stale", a(this, Ne).call(this, i, l));
@@ -4354,10 +4356,10 @@ const hn = class {
4354
4356
  * {@link LRUCache.OptionsBase.allowStale} is set.
4355
4357
  */
4356
4358
  peek(e, t = {}) {
4357
- const { allowStale: n = this.allowStale } = t, i = a(this, ae).get(e);
4359
+ const { allowStale: n = this.allowStale } = t, i = a(this, re).get(e);
4358
4360
  if (i !== void 0 && (n || !a(this, ye).call(this, i))) {
4359
4361
  const l = a(this, j)[i];
4360
- return L(this, Y, ee).call(this, l) ? l.__staleWhileFetching : l;
4362
+ return I(this, Y, ee).call(this, l) ? l.__staleWhileFetching : l;
4361
4363
  }
4362
4364
  }
4363
4365
  async fetch(e, t = {}) {
@@ -4405,21 +4407,21 @@ const hn = class {
4405
4407
  status: p,
4406
4408
  signal: w
4407
4409
  };
4408
- let C = a(this, ae).get(e);
4410
+ let C = a(this, re).get(e);
4409
4411
  if (C === void 0) {
4410
4412
  p && (p.fetch = "miss");
4411
- const I = L(this, ht, Mt).call(this, e, C, S, b);
4412
- return I.__returned = I;
4413
+ const A = I(this, ht, Mt).call(this, e, C, S, b);
4414
+ return A.__returned = A;
4413
4415
  } else {
4414
- const I = a(this, j)[C];
4415
- if (L(this, Y, ee).call(this, I)) {
4416
- const V = n && I.__staleWhileFetching !== void 0;
4417
- return p && (p.fetch = "inflight", V && (p.returnedStale = !0)), V ? I.__staleWhileFetching : I.__returned = I;
4416
+ const A = a(this, j)[C];
4417
+ if (I(this, Y, ee).call(this, A)) {
4418
+ const V = n && A.__staleWhileFetching !== void 0;
4419
+ return p && (p.fetch = "inflight", V && (p.returnedStale = !0)), V ? A.__staleWhileFetching : A.__returned = A;
4418
4420
  }
4419
4421
  const M = a(this, ye).call(this, C);
4420
4422
  if (!k && !M)
4421
- return p && (p.fetch = "hit"), L(this, tt, kt).call(this, C), i && a(this, Je).call(this, C), p && a(this, Ne).call(this, p, C), I;
4422
- const T = L(this, ht, Mt).call(this, e, C, S, b), X = T.__staleWhileFetching !== void 0 && n;
4423
+ return p && (p.fetch = "hit"), I(this, tt, kt).call(this, C), i && a(this, Je).call(this, C), p && a(this, Ne).call(this, p, C), A;
4424
+ const T = I(this, ht, Mt).call(this, e, C, S, b), X = T.__staleWhileFetching !== void 0 && n;
4423
4425
  return p && (p.fetch = M ? "stale" : "refresh", X && M && (p.returnedStale = !0)), X ? T.__staleWhileFetching : T.__returned = T;
4424
4426
  }
4425
4427
  }
@@ -4430,10 +4432,10 @@ const hn = class {
4430
4432
  * If the key is not found, get() will return `undefined`.
4431
4433
  */
4432
4434
  get(e, t = {}) {
4433
- const { allowStale: n = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: l = this.noDeleteOnStaleGet, status: r } = t, o = a(this, ae).get(e);
4435
+ const { allowStale: n = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: l = this.noDeleteOnStaleGet, status: r } = t, o = a(this, re).get(e);
4434
4436
  if (o !== void 0) {
4435
- const c = a(this, j)[o], f = L(this, Y, ee).call(this, c);
4436
- return r && a(this, Ne).call(this, r, o), a(this, ye).call(this, o) ? (r && (r.get = "stale"), f ? (r && n && c.__staleWhileFetching !== void 0 && (r.returnedStale = !0), n ? c.__staleWhileFetching : void 0) : (l || this.delete(e), r && n && (r.returnedStale = !0), n ? c : void 0)) : (r && (r.get = "hit"), f ? c.__staleWhileFetching : (L(this, tt, kt).call(this, o), i && a(this, Je).call(this, o), c));
4437
+ const c = a(this, j)[o], f = I(this, Y, ee).call(this, c);
4438
+ return r && a(this, Ne).call(this, r, o), a(this, ye).call(this, o) ? (r && (r.get = "stale"), f ? (r && n && c.__staleWhileFetching !== void 0 && (r.returnedStale = !0), n ? c.__staleWhileFetching : void 0) : (l || this.delete(e), r && n && (r.returnedStale = !0), n ? c : void 0)) : (r && (r.get = "hit"), f ? c.__staleWhileFetching : (I(this, tt, kt).call(this, o), i && a(this, Je).call(this, o), c));
4437
4439
  } else
4438
4440
  r && (r.get = "miss");
4439
4441
  }
@@ -4444,15 +4446,15 @@ const hn = class {
4444
4446
  delete(e) {
4445
4447
  var n, i, l, r;
4446
4448
  let t = !1;
4447
- if (a(this, re) !== 0) {
4448
- const o = a(this, ae).get(e);
4449
+ if (a(this, oe) !== 0) {
4450
+ const o = a(this, re).get(e);
4449
4451
  if (o !== void 0)
4450
- if (t = !0, a(this, re) === 1)
4452
+ if (t = !0, a(this, oe) === 1)
4451
4453
  this.clear();
4452
4454
  else {
4453
4455
  a(this, et).call(this, o);
4454
4456
  const c = a(this, j)[o];
4455
- L(this, Y, ee).call(this, c) ? c.__abortController.abort(new Error("deleted")) : (a(this, Fe) || a(this, pe)) && (a(this, Fe) && ((n = a(this, Le)) == null || n.call(this, c, e, "delete")), a(this, pe) && ((i = a(this, he)) == null || i.push([c, e, "delete"]))), a(this, ae).delete(e), a(this, Q)[o] = void 0, a(this, j)[o] = void 0, o === a(this, ue) ? O(this, ue, a(this, ke)[o]) : o === a(this, me) ? O(this, me, a(this, ge)[o]) : (a(this, ge)[a(this, ke)[o]] = a(this, ge)[o], a(this, ke)[a(this, ge)[o]] = a(this, ke)[o]), Lt(this, re)._--, a(this, Te).push(o);
4457
+ I(this, Y, ee).call(this, c) ? c.__abortController.abort(new Error("deleted")) : (a(this, Fe) || a(this, pe)) && (a(this, Fe) && ((n = a(this, Le)) == null || n.call(this, c, e, "delete")), a(this, pe) && ((i = a(this, he)) == null || i.push([c, e, "delete"]))), a(this, re).delete(e), a(this, Q)[o] = void 0, a(this, j)[o] = void 0, o === a(this, ue) ? R(this, ue, a(this, ke)[o]) : o === a(this, me) ? R(this, me, a(this, ge)[o]) : (a(this, ge)[a(this, ke)[o]] = a(this, ge)[o], a(this, ke)[a(this, ge)[o]] = a(this, ke)[o]), Lt(this, oe)._--, a(this, Te).push(o);
4456
4458
  }
4457
4459
  }
4458
4460
  if (a(this, pe) && ((l = a(this, he)) != null && l.length)) {
@@ -4468,16 +4470,16 @@ const hn = class {
4468
4470
  */
4469
4471
  clear() {
4470
4472
  var e, t, n;
4471
- for (const i of L(this, Oe, Ke).call(this, { allowStale: !0 })) {
4473
+ for (const i of I(this, Oe, Ke).call(this, { allowStale: !0 })) {
4472
4474
  const l = a(this, j)[i];
4473
- if (L(this, Y, ee).call(this, l))
4475
+ if (I(this, Y, ee).call(this, l))
4474
4476
  l.__abortController.abort(new Error("deleted"));
4475
4477
  else {
4476
4478
  const r = a(this, Q)[i];
4477
4479
  a(this, Fe) && ((e = a(this, Le)) == null || e.call(this, l, r, "delete")), a(this, pe) && ((t = a(this, he)) == null || t.push([l, r, "delete"]));
4478
4480
  }
4479
4481
  }
4480
- if (a(this, ae).clear(), a(this, j).fill(void 0), a(this, Q).fill(void 0), a(this, Ee) && a(this, Be) && (a(this, Ee).fill(0), a(this, Be).fill(0)), a(this, Me) && a(this, Me).fill(0), O(this, me, 0), O(this, ue, 0), a(this, Te).length = 0, O(this, Ce, 0), O(this, re, 0), a(this, pe) && a(this, he)) {
4482
+ if (a(this, re).clear(), a(this, j).fill(void 0), a(this, Q).fill(void 0), a(this, Ee) && a(this, Be) && (a(this, Ee).fill(0), a(this, Be).fill(0)), a(this, Me) && a(this, Me).fill(0), R(this, me, 0), R(this, ue, 0), a(this, Te).length = 0, R(this, Ce, 0), R(this, oe, 0), a(this, pe) && a(this, he)) {
4481
4483
  const i = a(this, he);
4482
4484
  let l;
4483
4485
  for (; l = i == null ? void 0 : i.shift(); )
@@ -4485,19 +4487,19 @@ const hn = class {
4485
4487
  }
4486
4488
  }
4487
4489
  };
4488
- let en = hn;
4489
- $e = new WeakMap(), be = new WeakMap(), Le = new WeakMap(), Se = new WeakMap(), ct = new WeakMap(), re = new WeakMap(), Ce = new WeakMap(), ae = new WeakMap(), Q = new WeakMap(), j = new WeakMap(), ge = new WeakMap(), ke = new WeakMap(), me = new WeakMap(), ue = new WeakMap(), Te = new WeakMap(), he = new WeakMap(), Me = new WeakMap(), Be = new WeakMap(), Ee = new WeakMap(), Fe = new WeakMap(), Ge = new WeakMap(), pe = new WeakMap(), yt = new WeakSet(), tn = function() {
4490
+ let Jt = dn;
4491
+ $e = new WeakMap(), be = new WeakMap(), Le = new WeakMap(), Se = new WeakMap(), ct = new WeakMap(), oe = new WeakMap(), Ce = new WeakMap(), re = new WeakMap(), Q = new WeakMap(), j = new WeakMap(), ge = new WeakMap(), ke = new WeakMap(), me = new WeakMap(), ue = new WeakMap(), Te = new WeakMap(), he = new WeakMap(), Me = new WeakMap(), Be = new WeakMap(), Ee = new WeakMap(), Fe = new WeakMap(), Ge = new WeakMap(), pe = new WeakMap(), yt = new WeakSet(), en = function() {
4490
4492
  const e = new Ht(a(this, $e)), t = new Ht(a(this, $e));
4491
- O(this, Ee, e), O(this, Be, t), O(this, wt, (l, r, o = pt.now()) => {
4493
+ R(this, Ee, e), R(this, Be, t), R(this, wt, (l, r, o = pt.now()) => {
4492
4494
  if (t[l] = r !== 0 ? o : 0, e[l] = r, r !== 0 && this.ttlAutopurge) {
4493
4495
  const c = setTimeout(() => {
4494
4496
  a(this, ye).call(this, l) && this.delete(a(this, Q)[l]);
4495
4497
  }, r + 1);
4496
4498
  c.unref && c.unref();
4497
4499
  }
4498
- }), O(this, Je, (l) => {
4500
+ }), R(this, Je, (l) => {
4499
4501
  t[l] = e[l] !== 0 ? pt.now() : 0;
4500
- }), O(this, Ne, (l, r) => {
4502
+ }), R(this, Ne, (l, r) => {
4501
4503
  if (e[r]) {
4502
4504
  const o = e[r], c = t[r];
4503
4505
  l.ttl = o, l.start = c, l.now = n || i(), l.remainingTTL = l.now + o - c;
@@ -4514,15 +4516,15 @@ $e = new WeakMap(), be = new WeakMap(), Le = new WeakMap(), Se = new WeakMap(),
4514
4516
  return l;
4515
4517
  };
4516
4518
  this.getRemainingTTL = (l) => {
4517
- const r = a(this, ae).get(l);
4519
+ const r = a(this, re).get(l);
4518
4520
  return r === void 0 ? 0 : e[r] === 0 || t[r] === 0 ? 1 / 0 : t[r] + e[r] - (n || i());
4519
- }, O(this, ye, (l) => e[l] !== 0 && t[l] !== 0 && (n || i()) - t[l] > e[l]);
4521
+ }, R(this, ye, (l) => e[l] !== 0 && t[l] !== 0 && (n || i()) - t[l] > e[l]);
4520
4522
  }, Je = new WeakMap(), Ne = new WeakMap(), wt = new WeakMap(), ye = new WeakMap(), Wt = new WeakSet(), Zn = function() {
4521
4523
  const e = new Ht(a(this, $e));
4522
- O(this, Ce, 0), O(this, Me, e), O(this, et, (t) => {
4523
- O(this, Ce, a(this, Ce) - e[t]), e[t] = 0;
4524
- }), O(this, xt, (t, n, i, l) => {
4525
- if (L(this, Y, ee).call(this, n))
4524
+ R(this, Ce, 0), R(this, Me, e), R(this, et, (t) => {
4525
+ R(this, Ce, a(this, Ce) - e[t]), e[t] = 0;
4526
+ }), R(this, xt, (t, n, i, l) => {
4527
+ if (I(this, Y, ee).call(this, n))
4526
4528
  return 0;
4527
4529
  if (!Ve(i))
4528
4530
  if (l) {
@@ -4533,31 +4535,31 @@ $e = new WeakMap(), be = new WeakMap(), Le = new WeakMap(), Se = new WeakMap(),
4533
4535
  } else
4534
4536
  throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
4535
4537
  return i;
4536
- }), O(this, ut, (t, n, i) => {
4538
+ }), R(this, ut, (t, n, i) => {
4537
4539
  if (e[t] = n, a(this, be)) {
4538
4540
  const l = a(this, be) - e[t];
4539
4541
  for (; a(this, Ce) > l; )
4540
- L(this, dt, Pt).call(this, !0);
4542
+ I(this, dt, Pt).call(this, !0);
4541
4543
  }
4542
- O(this, Ce, a(this, Ce) + e[t]), i && (i.entrySize = n, i.totalCalculatedSize = a(this, Ce));
4544
+ R(this, Ce, a(this, Ce) + e[t]), i && (i.entrySize = n, i.totalCalculatedSize = a(this, Ce));
4543
4545
  });
4544
4546
  }, et = new WeakMap(), ut = new WeakMap(), xt = new WeakMap(), Re = new WeakSet(), We = function* ({ allowStale: e = this.allowStale } = {}) {
4545
- if (a(this, re))
4546
- for (let t = a(this, ue); !(!L(this, $t, nn).call(this, t) || ((e || !a(this, ye).call(this, t)) && (yield t), t === a(this, me))); )
4547
+ if (a(this, oe))
4548
+ for (let t = a(this, ue); !(!I(this, $t, tn).call(this, t) || ((e || !a(this, ye).call(this, t)) && (yield t), t === a(this, me))); )
4547
4549
  t = a(this, ke)[t];
4548
4550
  }, Oe = new WeakSet(), Ke = function* ({ allowStale: e = this.allowStale } = {}) {
4549
- if (a(this, re))
4550
- for (let t = a(this, me); !(!L(this, $t, nn).call(this, t) || ((e || !a(this, ye).call(this, t)) && (yield t), t === a(this, ue))); )
4551
+ if (a(this, oe))
4552
+ for (let t = a(this, me); !(!I(this, $t, tn).call(this, t) || ((e || !a(this, ye).call(this, t)) && (yield t), t === a(this, ue))); )
4551
4553
  t = a(this, ge)[t];
4552
- }, $t = new WeakSet(), nn = function(e) {
4553
- return e !== void 0 && a(this, ae).get(a(this, Q)[e]) === e;
4554
+ }, $t = new WeakSet(), tn = function(e) {
4555
+ return e !== void 0 && a(this, re).get(a(this, Q)[e]) === e;
4554
4556
  }, dt = new WeakSet(), Pt = function(e) {
4555
4557
  var l, r;
4556
4558
  const t = a(this, me), n = a(this, Q)[t], i = a(this, j)[t];
4557
- return a(this, Ge) && L(this, Y, ee).call(this, i) ? i.__abortController.abort(new Error("evicted")) : (a(this, Fe) || a(this, pe)) && (a(this, Fe) && ((l = a(this, Le)) == null || l.call(this, i, n, "evict")), a(this, pe) && ((r = a(this, he)) == null || r.push([i, n, "evict"]))), a(this, et).call(this, t), e && (a(this, Q)[t] = void 0, a(this, j)[t] = void 0, a(this, Te).push(t)), a(this, re) === 1 ? (O(this, me, O(this, ue, 0)), a(this, Te).length = 0) : O(this, me, a(this, ge)[t]), a(this, ae).delete(n), Lt(this, re)._--, t;
4559
+ return a(this, Ge) && I(this, Y, ee).call(this, i) ? i.__abortController.abort(new Error("evicted")) : (a(this, Fe) || a(this, pe)) && (a(this, Fe) && ((l = a(this, Le)) == null || l.call(this, i, n, "evict")), a(this, pe) && ((r = a(this, he)) == null || r.push([i, n, "evict"]))), a(this, et).call(this, t), e && (a(this, Q)[t] = void 0, a(this, j)[t] = void 0, a(this, Te).push(t)), a(this, oe) === 1 ? (R(this, me, R(this, ue, 0)), a(this, Te).length = 0) : R(this, me, a(this, ge)[t]), a(this, re).delete(n), Lt(this, oe)._--, t;
4558
4560
  }, ht = new WeakSet(), Mt = function(e, t, n, i) {
4559
4561
  const l = t === void 0 ? void 0 : a(this, j)[t];
4560
- if (L(this, Y, ee).call(this, l))
4562
+ if (I(this, Y, ee).call(this, l))
4561
4563
  return l;
4562
4564
  const r = new AbortController(), { signal: o } = n;
4563
4565
  o == null || o.addEventListener("abort", () => r.abort(o.reason), {
@@ -4592,18 +4594,18 @@ $e = new WeakMap(), be = new WeakMap(), Le = new WeakMap(), Se = new WeakMap(),
4592
4594
  __staleWhileFetching: l,
4593
4595
  __returned: void 0
4594
4596
  });
4595
- return t === void 0 ? (this.set(e, $, { ...c.options, status: void 0 }), t = a(this, ae).get(e)) : a(this, j)[t] = $, $;
4597
+ return t === void 0 ? (this.set(e, $, { ...c.options, status: void 0 }), t = a(this, re).get(e)) : a(this, j)[t] = $, $;
4596
4598
  }, Y = new WeakSet(), ee = function(e) {
4597
4599
  if (!a(this, Ge))
4598
4600
  return !1;
4599
4601
  const t = e;
4600
4602
  return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
4601
- }, St = new WeakSet(), sn = function(e, t) {
4603
+ }, St = new WeakSet(), nn = function(e, t) {
4602
4604
  a(this, ke)[t] = e, a(this, ge)[e] = t;
4603
4605
  }, tt = new WeakSet(), kt = function(e) {
4604
- e !== a(this, ue) && (e === a(this, me) ? O(this, me, a(this, ge)[e]) : L(this, St, sn).call(this, a(this, ke)[e], a(this, ge)[e]), L(this, St, sn).call(this, a(this, ue), e), O(this, ue, e));
4606
+ e !== a(this, ue) && (e === a(this, me) ? R(this, me, a(this, ge)[e]) : I(this, St, nn).call(this, a(this, ke)[e], a(this, ge)[e]), I(this, St, nn).call(this, a(this, ue), e), R(this, ue, e));
4605
4607
  };
4606
- const fs = en, vt = (s) => {
4608
+ const fs = Jt, vt = (s) => {
4607
4609
  const e = s.value, t = e.substring(0, s.selectionStart), n = e.substring(s.selectionEnd, e.length), i = t.lastIndexOf(`
4608
4610
  `), l = t.substring(0, i + 1), r = n.indexOf(`
4609
4611
  `), o = n.substring(
@@ -4705,7 +4707,7 @@ ${p}
4705
4707
  for (let C = 0; C <= w; C++) {
4706
4708
  i += `
4707
4709
  |`;
4708
- for (let I = 0; I <= S; I++)
4710
+ for (let A = 0; A <= S; A++)
4709
4711
  i += " content |";
4710
4712
  }
4711
4713
  l = 2, r = 5 - i.length, o = !0;
@@ -4718,7 +4720,7 @@ ${p}
4718
4720
  }
4719
4721
  case "image": {
4720
4722
  const { desc: p, url: w, urls: S } = n;
4721
- S instanceof Array ? i = S.reduce((C, I) => C + `![${p}](${I})
4723
+ S instanceof Array ? i = S.reduce((C, A) => C + `![${p}](${A})
4722
4724
  `, "") : i = `![${p}](${w})
4723
4725
  `;
4724
4726
  break;
@@ -4728,10 +4730,10 @@ ${p}
4728
4730
  if (e === "")
4729
4731
  i = w;
4730
4732
  else if (/\n/.test(e)) {
4731
- const { prefixStr: S, subfixStr: C, prefixSupply: I, subfixSupply: M } = vt(t);
4732
- i = `${I}${e}${M}`.split(`
4733
+ const { prefixStr: S, subfixStr: C, prefixSupply: A, subfixSupply: M } = vt(t);
4734
+ i = `${A}${e}${M}`.split(`
4733
4735
  `).map((X) => `${w}${X}`).join(`
4734
- `), c = S.substring(0, S.length - I.length), f = C.substring(M.length, C.length), o = !0, l = p, r = -I.length - M.length;
4736
+ `), c = S.substring(0, S.length - A.length), f = C.substring(M.length, C.length), o = !0, l = p, r = -A.length - M.length;
4735
4737
  } else {
4736
4738
  const C = t.value.substring(0, t.selectionStart);
4737
4739
  /\n$/.test(C) || C === "" ? (i = `${w}${e}`, o = !0) : i = w;
@@ -4743,19 +4745,19 @@ ${p}
4743
4745
  prefixStr: w,
4744
4746
  prefixStrEndRow: S,
4745
4747
  subfixStrEndRow: C,
4746
- prefixSupply: I,
4748
+ prefixSupply: A,
4747
4749
  subfixSupply: M
4748
4750
  } = vt(t), T = new RegExp(`^\\s{${p}}`), y = (X = !1, V = !1) => {
4749
- const q = `${I}${e}${M}`;
4751
+ const q = `${A}${e}${M}`;
4750
4752
  if (T.test(q)) {
4751
- const A = w.length - (V ? 0 : p), D = X ? A + e.length - p : A;
4752
- return Pe(t, A, D), `${S}${q.replace(
4753
+ const _ = w.length - (V ? 0 : p), O = X ? _ + e.length - p : _;
4754
+ return Pe(t, _, O), `${S}${q.replace(
4753
4755
  T,
4754
4756
  ""
4755
4757
  )}${C}`;
4756
4758
  } else if (/^\s/.test(q)) {
4757
- const A = q.replace(/^\s/, ""), D = q.length - A.length, B = t.selectionStart - (V ? 0 : D), W = X ? B + e.length - D : B;
4758
- return Pe(t, B, W), `${S}${A}${C}`;
4759
+ const _ = q.replace(/^\s/, ""), O = q.length - _.length, B = t.selectionStart - (V ? 0 : O), W = X ? B + e.length - O : B;
4760
+ return Pe(t, B, W), `${S}${_}${C}`;
4759
4761
  } else
4760
4762
  i = e;
4761
4763
  };
@@ -4764,15 +4766,15 @@ ${p}
4764
4766
  if (X)
4765
4767
  return X;
4766
4768
  } else if (/\n/.test(e)) {
4767
- const V = `${I}${e}${M}`.split(`
4769
+ const V = `${A}${e}${M}`.split(`
4768
4770
  `);
4769
- let [q, A] = [0, 0];
4770
- const D = V.map((B, W) => {
4771
+ let [q, _] = [0, 0];
4772
+ const O = V.map((B, W) => {
4771
4773
  if (T.test(B))
4772
- return W === 0 && (q = p), A += p, B.replace(T, "");
4774
+ return W === 0 && (q = p), _ += p, B.replace(T, "");
4773
4775
  if (/^\s/.test(B)) {
4774
4776
  const H = B.replace(/^\s/, "");
4775
- return A += B.length - H.length, H;
4777
+ return _ += B.length - H.length, H;
4776
4778
  }
4777
4779
  return B;
4778
4780
  }).join(`
@@ -4780,8 +4782,8 @@ ${p}
4780
4782
  return Pe(
4781
4783
  t,
4782
4784
  t.selectionStart - q,
4783
- t.selectionEnd - A
4784
- ), `${S}${D}${C}`;
4785
+ t.selectionEnd - _
4786
+ ), `${S}${O}${C}`;
4785
4787
  } else {
4786
4788
  const X = y(!0, !0);
4787
4789
  if (X)
@@ -4799,10 +4801,10 @@ ${p}
4799
4801
  subfixStrEndRow: w,
4800
4802
  prefixStr: S,
4801
4803
  subfixStr: C,
4802
- prefixSupply: I,
4804
+ prefixSupply: A,
4803
4805
  subfixSupply: M
4804
4806
  } = vt(t);
4805
- return e === "" ? (bt(`${I}${M}`), Pe(t, p.length), `${p}${w.replace(/^\n/, "")}`) : (bt(e), Pe(t, S.length), `${S}${C}`);
4807
+ return e === "" ? (bt(`${A}${M}`), Pe(t, p.length), `${p}${w.replace(/^\n/, "")}`) : (bt(e), Pe(t, S.length), `${S}${C}`);
4806
4808
  }
4807
4809
  case "ctrlD": {
4808
4810
  const { prefixStrEndRow: p, subfixStrEndRow: w } = vt(t);
@@ -4905,7 +4907,7 @@ $$
4905
4907
  i = w.targetValue, o = w.select, l = w.deviationStart, r = w.deviationEnd;
4906
4908
  }
4907
4909
  }
4908
- return Yt(t, i, {
4910
+ return Qt(t, i, {
4909
4911
  deviationStart: l,
4910
4912
  deviationEnd: r,
4911
4913
  select: o,
@@ -4993,7 +4995,7 @@ $$
4993
4995
  "success",
4994
4996
  "tip",
4995
4997
  "warning"
4996
- ], Qt = new RegExp(`^!!!\\s*(${Xn.join("|")})\\s*(.*)$`), gs = /^!!!\s*$/, ps = {
4998
+ ], Xt = new RegExp(`^!!!\\s*(${Xn.join("|")})\\s*(.*)$`), gs = /^!!!\s*$/, ps = {
4997
4999
  name: "alert",
4998
5000
  level: "block",
4999
5001
  start(s) {
@@ -5004,12 +5006,12 @@ $$
5004
5006
  },
5005
5007
  tokenizer(s) {
5006
5008
  const e = s.split(/\n/);
5007
- if (Qt.test(e[0])) {
5009
+ if (Xt.test(e[0])) {
5008
5010
  const t = { x: -1, y: -1 }, n = [];
5009
5011
  for (let i = 0, l = e.length; i < l; i++)
5010
- Qt.test(e[i]) ? t.x = i : gs.test(e[i]) && (t.y = i, t.x >= 0 && (n.push({ ...t }), t.x = -1, t.y = -1));
5012
+ Xt.test(e[i]) ? t.x = i : gs.test(e[i]) && (t.y = i, t.x >= 0 && (n.push({ ...t }), t.x = -1, t.y = -1));
5011
5013
  if (n.length) {
5012
- const i = n[0], [l, r, o] = Qt.exec(e[i.x]) || [], c = e.slice(i.x + 1, i.y).join(`
5014
+ const i = n[0], [l, r, o] = Xt.exec(e[i.x]) || [], c = e.slice(i.x + 1, i.y).join(`
5013
5015
  `), h = {
5014
5016
  type: "alert",
5015
5017
  raw: e.slice(i.x, i.y + 1).join(`
@@ -5144,61 +5146,61 @@ $$
5144
5146
  max: 1e3,
5145
5147
  // 缓存10分钟
5146
5148
  ttl: 6e5
5147
- }), C = $s(s), I = ks(s, z), M = ze(() => (s.noMermaid || C.mermaidInited) && b.value && (s.noKatex || I.value));
5149
+ }), C = $s(s), A = ks(s, z), M = ze(() => (s.noMermaid || C.mermaidInited) && b.value && (s.noKatex || A.value));
5148
5150
  let T = new z.Renderer();
5149
- T.image = (_, F, N) => `<span class="figure"><img src="${_}" title="${F || ""}" alt="${N || ""}" zoom><span class="figcaption">${N || ""}</span></span>`, T.listitem = (_, F) => F ? `<li class="li-task">${_}</li>` : `<li>${_}</li>`, e instanceof Function && (T = e(T));
5151
+ T.image = (F, D, N) => `<span class="figure"><img src="${F}" title="${D || ""}" alt="${N || ""}" zoom><span class="figcaption">${N || ""}</span></span>`, T.listitem = (F, D) => D ? `<li class="li-task">${F}</li>` : `<li>${F}</li>`, e instanceof Function && (T = e(T));
5150
5152
  const y = T.code;
5151
- T.code = (_, F, N) => {
5152
- if (!s.noMermaid && F === "mermaid") {
5153
- const le = pi();
5153
+ T.code = (F, D, N) => {
5154
+ if (!s.noMermaid && D === "mermaid") {
5155
+ const ce = pi();
5154
5156
  try {
5155
5157
  if (vs)
5156
- return `<p class="${d}-mermaid">${_}</p>`;
5158
+ return `<p class="${d}-mermaid">${F}</p>`;
5157
5159
  {
5158
- const ve = S.get(_);
5160
+ const ve = S.get(F);
5159
5161
  if (ve)
5160
5162
  return `<p class="${d}-mermaid" data-processed>${ve}</p>`;
5161
5163
  const Ie = v || window.mermaid;
5162
5164
  if (C.mermaidInited) {
5163
- const Xe = (Ie.renderAsync || Ie.render)(le, _);
5165
+ const Xe = (Ie.renderAsync || Ie.render)(ce, F);
5164
5166
  Xe.then((qe) => {
5165
- S.set(_, typeof qe == "string" ? qe : qe.svg);
5167
+ S.set(F, typeof qe == "string" ? qe : qe.svg);
5166
5168
  }), p.push(Xe);
5167
5169
  } else
5168
- return `<p class="${d}-mermaid">${_}</p>`;
5170
+ return `<p class="${d}-mermaid">${F}</p>`;
5169
5171
  }
5170
- const de = `<script type="text/tmplate">${le}<\/script>`;
5172
+ const de = `<script type="text/tmplate">${ce}<\/script>`;
5171
5173
  return w.push(de), de;
5172
5174
  } catch (de) {
5173
5175
  return `<p class="${d}-mermaid-error">Error: ${(de == null ? void 0 : de.message) || ""}</p>`;
5174
5176
  }
5175
5177
  }
5176
- return y.call(T, _, F, N).replace(
5178
+ return y.call(T, F, D, N).replace(
5177
5179
  /^<pre><code\sclass="language-([^>]*)">/,
5178
5180
  '<pre><code class="language-$1" language="$1">'
5179
5181
  );
5180
5182
  };
5181
5183
  const X = T.heading, V = X !== new z.Renderer().heading;
5182
- T.heading = (_, F, N, le) => {
5183
- k.value.push({ text: N, level: F });
5184
- const de = s.markedHeadingId(N, F, k.value.length);
5184
+ T.heading = (F, D, N, ce) => {
5185
+ k.value.push({ text: N, level: D });
5186
+ const de = s.markedHeadingId(N, D, k.value.length);
5185
5187
  return V ? X.call(
5186
5188
  T,
5187
- _,
5188
5189
  F,
5190
+ D,
5189
5191
  N,
5190
- le,
5192
+ ce,
5191
5193
  k.value.length,
5192
5194
  de
5193
- ) : _ !== N ? `<h${F} id="${de}">${_}</h${F}>` : `<h${F} id="${de}"><a href="#${de}">${N}</a></h${F}>`;
5195
+ ) : F !== N ? `<h${D} id="${de}">${F}</h${D}>` : `<h${D} id="${de}"><a href="#${de}">${N}</a></h${D}>`;
5194
5196
  }, m && z.setOptions({
5195
- highlight: (_, F) => {
5197
+ highlight: (F, D) => {
5196
5198
  let N;
5197
- const le = m.getLanguage(F);
5198
- return F && le ? N = m.highlight(_, {
5199
- language: F,
5199
+ const ce = m.getLanguage(D);
5200
+ return D && ce ? N = m.highlight(F, {
5201
+ language: D,
5200
5202
  ignoreIllegals: !0
5201
- }).value : N = m.highlightAuto(_).value, r ? Xt(N) : `<span class="code-block">${N}</span>`;
5203
+ }).value : N = m.highlightAuto(F).value, r ? kn(N.trim()) : `<span class="code-block">${N.trim()}</span>`;
5202
5204
  }
5203
5205
  }), z.setOptions({
5204
5206
  breaks: !0,
@@ -5207,78 +5209,68 @@ $$
5207
5209
  extensions: t
5208
5210
  }), z.use({
5209
5211
  extensions: [ps]
5210
- }), m && z.setOptions({
5211
- highlight: (_, F) => {
5212
- let N;
5213
- const le = m.getLanguage(F);
5214
- return F && le ? N = m.highlight(_, {
5215
- language: F,
5216
- ignoreIllegals: !0
5217
- }).value : N = m.highlightAuto(_).value, r ? Xt(N) : `<span class="code-block">${N}</span>`;
5218
- }
5219
5212
  });
5220
- const q = ne(s.sanitize(z(s.value || "", { renderer: T }))), A = async (_) => {
5221
- let F = s.sanitize(z(_, { renderer: T }));
5222
- const N = [...p], le = [...w];
5213
+ const q = ne(s.sanitize(z(s.value || "", { renderer: T }))), _ = async (F) => {
5214
+ let D = s.sanitize(z(F, { renderer: T }));
5215
+ const N = [...p], ce = [...w];
5223
5216
  return w = [], p = [], (await Promise.allSettled(N)).forEach((ve, Ie) => {
5224
- ve.status === "fulfilled" ? F = F.replace(
5225
- le[Ie],
5217
+ ve.status === "fulfilled" ? D = D.replace(
5218
+ ce[Ie],
5226
5219
  `<p class="${d}-mermaid" data-processed>${typeof ve.value == "string" ? ve.value : ve.value.svg}</p>`
5227
- ) : F = F.replace(
5228
- le[Ie],
5220
+ ) : D = D.replace(
5221
+ ce[Ie],
5229
5222
  `<p class="${d}-mermaid-error">${ve.reason || ""}</p>`
5230
5223
  );
5231
- }), F;
5232
- }, D = Gt(
5224
+ }), D;
5225
+ }, O = Gt(
5233
5226
  async () => {
5234
5227
  k.value = [];
5235
- const _ = await A(s.value || "");
5236
- q.value = _, x.emit(o, "buildFinished", q.value), s.onHtmlChanged(q.value);
5228
+ const F = await _(s.value || "");
5229
+ q.value = F, x.emit(o, "buildFinished", q.value), s.onHtmlChanged(q.value);
5237
5230
  },
5238
5231
  (l == null ? void 0 : l.renderDelay) !== void 0 ? l == null ? void 0 : l.renderDelay : f ? 0 : 500
5239
5232
  );
5240
5233
  G(
5241
5234
  [M, Bt(C, "reRender"), Bt(s, "value")],
5242
- D
5235
+ O
5243
5236
  ), G([h], () => {
5244
5237
  S.clear();
5245
5238
  });
5246
5239
  const B = () => {
5247
5240
  z.setOptions({
5248
- highlight: (_, F) => {
5241
+ highlight: (F, D) => {
5249
5242
  let N;
5250
- const le = window.hljs.getLanguage(F);
5251
- return F && le ? N = window.hljs.highlight(_, {
5252
- language: F,
5243
+ const ce = window.hljs.getLanguage(D);
5244
+ return D && ce ? N = window.hljs.highlight(F, {
5245
+ language: D,
5253
5246
  ignoreIllegals: !0
5254
- }).value : N = window.hljs.highlightAuto(_).value, r ? Xt(N) : `<span class="code-block">${N}</span>`;
5247
+ }).value : N = window.hljs.highlightAuto(F).value, r ? kn(N.trim()) : `<span class="code-block">${N.trim()}</span>`;
5255
5248
  }
5256
5249
  }), b.value = !0;
5257
5250
  };
5258
5251
  return G(
5259
5252
  () => k.value,
5260
- (_) => {
5261
- s.onGetCatalog(_), x.emit(o, "catalogChanged", _);
5253
+ (F) => {
5254
+ s.onGetCatalog(F), x.emit(o, "catalogChanged", F);
5262
5255
  }
5263
5256
  ), ie(() => {
5264
5257
  if (!s.noKatex && !g) {
5265
- const _ = document.createElement("script");
5266
- _.src = ($ == null ? void 0 : $.js) || Nt.js, _.onload = () => {
5267
- I.value = !0;
5268
- }, _.id = `${d}-katex`;
5269
- const F = document.createElement("link");
5270
- F.rel = "stylesheet", F.href = ($ == null ? void 0 : $.css) || Nt.css, F.id = `${d}-katexCss`, we(_, "katex"), we(F);
5258
+ const D = document.createElement("script");
5259
+ D.src = ($ == null ? void 0 : $.js) || Nt.js, D.onload = () => {
5260
+ A.value = !0;
5261
+ }, D.id = `${d}-katex`;
5262
+ const N = document.createElement("link");
5263
+ N.rel = "stylesheet", N.href = ($ == null ? void 0 : $.css) || Nt.css, N.id = `${d}-katexCss`, we(D, "katex"), we(N);
5271
5264
  }
5272
- if (!m) {
5273
- const _ = document.createElement("link");
5274
- _.rel = "stylesheet", _.href = c.value.css, _.id = `${d}-hlCss`;
5275
- const F = document.createElement("script");
5276
- F.src = c.value.js, F.onload = B, F.id = `${d}-hljs`, we(_), we(F, "hljs");
5265
+ const F = document.createElement("link");
5266
+ if (F.rel = "stylesheet", F.href = c.value.css, F.id = `${d}-hlCss`, we(F), !m) {
5267
+ const D = document.createElement("script");
5268
+ D.src = c.value.js, D.onload = B, D.id = `${d}-hljs`, we(D, "hljs");
5277
5269
  }
5278
5270
  }), G(
5279
5271
  () => c.value.css,
5280
- (_) => {
5281
- vi(`${d}-hlCss`, "href", _);
5272
+ (F) => {
5273
+ vi(`${d}-hlCss`, "href", F);
5282
5274
  }
5283
5275
  ), ie(() => {
5284
5276
  x.on(o, {
@@ -5302,8 +5294,8 @@ $$
5302
5294
  k.setAttribute("class", "copy-button"), k.dataset.tips = b, k.innerHTML = `<svg class="${d}-icon" aria-hidden="true"><use xlink:href="#${d}-icon-copy"></use></svg>`, k.addEventListener("click", () => {
5303
5295
  var T, y;
5304
5296
  clearTimeout($);
5305
- const S = g.querySelector("code").innerText, C = bt(s.formatCopiedText(S)), I = ((T = r.value.copyCode) == null ? void 0 : T.successTips) || "已复制!", M = ((y = r.value.copyCode) == null ? void 0 : y.failTips) || "已复制!";
5306
- k.dataset.tips = C ? I : M, $ = window.setTimeout(() => {
5297
+ const S = g.querySelector("code").innerText, C = bt(s.formatCopiedText(S)), A = ((T = r.value.copyCode) == null ? void 0 : T.successTips) || "已复制!", M = ((y = r.value.copyCode) == null ? void 0 : y.failTips) || "已复制!";
5298
+ k.dataset.tips = C ? A : M, $ = window.setTimeout(() => {
5307
5299
  k.dataset.tips = b;
5308
5300
  }, 1500);
5309
5301
  }), g.appendChild(k);
@@ -5314,7 +5306,7 @@ $$
5314
5306
  });
5315
5307
  }, v = (g) => {
5316
5308
  g && !l && ft(() => {
5317
- c(), [f, c] = kn(
5309
+ c(), [f, c] = bn(
5318
5310
  t.value,
5319
5311
  n.value || i.value
5320
5312
  ), f(), h();
@@ -5326,7 +5318,7 @@ $$
5326
5318
  g ? f() : c();
5327
5319
  }
5328
5320
  ), ie(() => {
5329
- h(), !l && (n.value || i.value) && ([f, c] = kn(
5321
+ h(), !l && (n.value || i.value) && ([f, c] = bn(
5330
5322
  t.value,
5331
5323
  n.value || i.value
5332
5324
  )), s.scrollAuto && f();
@@ -5358,14 +5350,14 @@ $$
5358
5350
  - [ ] ` : `
5359
5351
  - `;
5360
5352
  s.onChange(
5361
- Yt(e.value, k, {})
5353
+ Qt(e.value, k, {})
5362
5354
  );
5363
5355
  } else {
5364
5356
  const k = b == null ? void 0 : b.match(/\d+(?=\.)/), p = k && Number(k[0]) + 1 || 1, w = /^\d\.\s+\[[x\s]\]/.test(b) ? `
5365
5357
  ${p}. [ ] ` : `
5366
5358
  ${p}. `;
5367
5359
  s.onChange(
5368
- Yt(e.value, w, {})
5360
+ Qt(e.value, w, {})
5369
5361
  );
5370
5362
  }
5371
5363
  }
@@ -5402,7 +5394,8 @@ ${p}. `;
5402
5394
  reRender: !1,
5403
5395
  mermaidInited: !1
5404
5396
  }), l = () => {
5405
- s.noMermaid || (((n == null ? void 0 : n.instance) || window.mermaid).initialize({
5397
+ const r = (n == null ? void 0 : n.instance) || window.mermaid;
5398
+ !s.noMermaid && r && (r.initialize({
5406
5399
  startOnLoad: !1,
5407
5400
  theme: e.value === "dark" ? "dark" : "default"
5408
5401
  }), i.reRender = !i.reRender);
@@ -5547,7 +5540,7 @@ ${p}. `;
5547
5540
  default: () => {
5548
5541
  }
5549
5542
  }
5550
- }), zs = /* @__PURE__ */ ce({
5543
+ }), zs = /* @__PURE__ */ ae({
5551
5544
  name: "MDEditorContent",
5552
5545
  props: Es(),
5553
5546
  setup(s) {
@@ -5596,7 +5589,7 @@ ${p}. `;
5596
5589
  }, [f.value])])])]);
5597
5590
  };
5598
5591
  }
5599
- }), _s = /* @__PURE__ */ ce({
5592
+ }), _s = /* @__PURE__ */ ae({
5600
5593
  props: {
5601
5594
  modelValue: {
5602
5595
  type: String,
@@ -5625,7 +5618,7 @@ const As = () => ({
5625
5618
  default: () => {
5626
5619
  }
5627
5620
  }
5628
- }), Is = /* @__PURE__ */ ce({
5621
+ }), Is = /* @__PURE__ */ ae({
5629
5622
  props: As(),
5630
5623
  setup(s) {
5631
5624
  return () => u("div", {
@@ -5644,7 +5637,7 @@ const As = () => ({
5644
5637
  default: () => {
5645
5638
  }
5646
5639
  }
5647
- }), Fs = /* @__PURE__ */ ce({
5640
+ }), Fs = /* @__PURE__ */ ae({
5648
5641
  props: Ls(),
5649
5642
  setup(s) {
5650
5643
  const e = U("usedLanguageText");
@@ -5683,7 +5676,7 @@ const As = () => ({
5683
5676
  defFooters: {
5684
5677
  type: Object
5685
5678
  }
5686
- }), Os = /* @__PURE__ */ ce({
5679
+ }), Os = /* @__PURE__ */ ae({
5687
5680
  name: "MDEditorFooter",
5688
5681
  props: Rs(),
5689
5682
  setup(s) {
@@ -5740,7 +5733,7 @@ const As = () => ({
5740
5733
  type: Number,
5741
5734
  default: 0
5742
5735
  }
5743
- }), Qn = /* @__PURE__ */ ce({
5736
+ }), Qn = /* @__PURE__ */ ae({
5744
5737
  props: Ds(),
5745
5738
  setup(s) {
5746
5739
  return () => {
@@ -5831,7 +5824,7 @@ const Hs = () => ({
5831
5824
  onClick: {
5832
5825
  type: Function
5833
5826
  }
5834
- }), Vt = /* @__PURE__ */ ce({
5827
+ }), Vt = /* @__PURE__ */ ae({
5835
5828
  name: "MdCatalog",
5836
5829
  props: Hs(),
5837
5830
  emits: ["onClick"],
@@ -5923,7 +5916,7 @@ const Hs = () => ({
5923
5916
  };
5924
5917
  return ie(() => {
5925
5918
  l(), x.on(t, {
5926
- name: Jt,
5919
+ name: Yt,
5927
5920
  callback(r) {
5928
5921
  r && ft(l);
5929
5922
  }
@@ -6328,7 +6321,7 @@ const Hs = () => ({
6328
6321
  "onBlur",
6329
6322
  "onFocus"
6330
6323
  ];
6331
- const Ze = /* @__PURE__ */ ce({
6324
+ const Ze = /* @__PURE__ */ ae({
6332
6325
  name: "MdEditorV3",
6333
6326
  props: Ps,
6334
6327
  emits: Ms,
@@ -6428,7 +6421,7 @@ const Ze = /* @__PURE__ */ ce({
6428
6421
  onClick: {
6429
6422
  type: Function
6430
6423
  }
6431
- }), ln = /* @__PURE__ */ ce({
6424
+ }), sn = /* @__PURE__ */ ae({
6432
6425
  name: "NormalToolbar",
6433
6426
  props: Bs(),
6434
6427
  emits: ["onClick"],
@@ -6466,7 +6459,7 @@ const Ze = /* @__PURE__ */ ce({
6466
6459
  overlay: {
6467
6460
  type: [String, Object]
6468
6461
  }
6469
- }), on = /* @__PURE__ */ ce({
6462
+ }), ln = /* @__PURE__ */ ae({
6470
6463
  name: "DropdownToolbar",
6471
6464
  props: Ns(),
6472
6465
  emits: ["onChange"],
@@ -6543,7 +6536,7 @@ const qs = () => ({
6543
6536
  onAdjust: {
6544
6537
  type: Function
6545
6538
  }
6546
- }), rn = /* @__PURE__ */ ce({
6539
+ }), on = /* @__PURE__ */ ae({
6547
6540
  name: "ModalToolbar",
6548
6541
  props: qs(),
6549
6542
  emits: ["onClick", "onClose", "onAdjust"],
@@ -6562,7 +6555,7 @@ const qs = () => ({
6562
6555
  onClick: () => {
6563
6556
  s.onClick instanceof Function ? s.onClick() : e.emit("onClick");
6564
6557
  }
6565
- }, [t]), u(cn, {
6558
+ }, [t]), u(an, {
6566
6559
  width: s.width,
6567
6560
  height: s.height,
6568
6561
  title: s.modalTitle,
@@ -6581,11 +6574,11 @@ const qs = () => ({
6581
6574
  };
6582
6575
  }
6583
6576
  });
6584
- Ze.install = (s) => (s.component(Ze.name, Ze), s.component(ln.name, ln), s.component(on.name, on), s.component(Vt.name, Vt), s.component(rn.name, rn), s);
6585
- Ze.NormalToolbar = ln;
6586
- Ze.DropdownToolbar = on;
6577
+ Ze.install = (s) => (s.component(Ze.name, Ze), s.component(sn.name, sn), s.component(ln.name, ln), s.component(Vt.name, Vt), s.component(on.name, on), s);
6578
+ Ze.NormalToolbar = sn;
6579
+ Ze.DropdownToolbar = ln;
6587
6580
  Ze.MdCatalog = Vt;
6588
- Ze.ModalToolbar = rn;
6581
+ Ze.ModalToolbar = on;
6589
6582
  Ze.config = ai;
6590
6583
  export {
6591
6584
  Ze as default