@waline/client 2.13.1 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/api.cjs +1 -1
  2. package/dist/api.cjs.map +1 -1
  3. package/dist/api.d.cts +60 -34
  4. package/dist/api.d.mts +60 -34
  5. package/dist/api.d.ts +60 -34
  6. package/dist/api.mjs +1 -1
  7. package/dist/api.mjs.map +1 -1
  8. package/dist/comment.cjs +1 -1
  9. package/dist/comment.cjs.map +1 -1
  10. package/dist/comment.d.cts +1 -1
  11. package/dist/comment.d.mts +1 -1
  12. package/dist/comment.d.ts +1 -1
  13. package/dist/comment.js +40 -45
  14. package/dist/comment.js.map +1 -1
  15. package/dist/comment.mjs +1 -1
  16. package/dist/comment.mjs.map +1 -1
  17. package/dist/component.mjs +1 -1
  18. package/dist/component.mjs.map +1 -1
  19. package/dist/legacy.umd.d.ts +13 -3
  20. package/dist/legacy.umd.js +1 -1
  21. package/dist/legacy.umd.js.map +1 -1
  22. package/dist/pageview.cjs +1 -1
  23. package/dist/pageview.cjs.map +1 -1
  24. package/dist/pageview.js +44 -49
  25. package/dist/pageview.js.map +1 -1
  26. package/dist/pageview.mjs +1 -1
  27. package/dist/pageview.mjs.map +1 -1
  28. package/dist/shim.cjs +1 -1
  29. package/dist/shim.cjs.map +1 -1
  30. package/dist/shim.d.cts +15 -9
  31. package/dist/shim.d.mts +15 -9
  32. package/dist/shim.mjs +1 -1
  33. package/dist/shim.mjs.map +1 -1
  34. package/dist/waline.cjs +1 -1
  35. package/dist/waline.cjs.map +1 -1
  36. package/dist/waline.css +1 -1
  37. package/dist/waline.css.map +1 -1
  38. package/dist/waline.d.cts +15 -9
  39. package/dist/waline.d.mts +15 -9
  40. package/dist/waline.d.ts +15 -9
  41. package/dist/waline.js +441 -449
  42. package/dist/waline.js.map +1 -1
  43. package/dist/waline.mjs +1 -1
  44. package/dist/waline.mjs.map +1 -1
  45. package/package.json +1 -1
  46. package/src/api/articleCounter.ts +3 -7
  47. package/src/api/comment.ts +60 -49
  48. package/src/api/commentCount.ts +0 -2
  49. package/src/api/pageview.ts +2 -2
  50. package/src/api/recentComment.ts +2 -5
  51. package/src/api/user.ts +2 -4
  52. package/src/api/utils.ts +17 -10
  53. package/src/comment.ts +1 -1
  54. package/src/compact/convert.ts +1 -1
  55. package/src/components/CommentBox.vue +14 -11
  56. package/src/components/Waline.vue +35 -34
  57. package/src/pageview.ts +3 -3
  58. package/src/styles/index.scss +2 -2
  59. package/src/styles/{nomalize.scss → normalize.scss} +0 -0
  60. package/src/styles/panel.scss +1 -1
  61. package/src/styles/{userlist.scss → user-list.scss} +0 -0
  62. package/src/typings/base.ts +5 -1
  63. package/src/typings/comment.ts +1 -5
  64. package/src/typings/waline.ts +13 -2
  65. package/src/utils/config.ts +2 -0
  66. package/src/utils/date.ts +3 -3
package/dist/waline.js CHANGED
@@ -108,7 +108,7 @@
108
108
  },
109
109
  b = function (e) {
110
110
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
111
- if ("object" == typeof e && e.errno) throw new TypeError(`Fetch ${t} failed with ${e.errno}: ${e.errmsg}`);
111
+ if ("object" == typeof e && e.errno) throw new TypeError(`${t} failed with ${e.errno}: ${e.errmsg}`);
112
112
  return e;
113
113
  },
114
114
  k = _ref2 => {
@@ -121,7 +121,7 @@
121
121
  } = _ref2;
122
122
  return fetch(`${e}/article?path=${encodeURIComponent(n.join(","))}&type=${encodeURIComponent(r.join(","))}&lang=${t}`, {
123
123
  signal: i
124
- }).then(e => e.json()).then(e => b(e, "article count"));
124
+ }).then(e => e.json());
125
125
  },
126
126
  x = _ref3 => {
127
127
  let {
@@ -139,7 +139,7 @@
139
139
  type: r,
140
140
  action: i
141
141
  })
142
- }).then(e => e.json()).then(e => b(e, "article count"));
142
+ }).then(e => e.json());
143
143
  },
144
144
  _ = _ref4 => {
145
145
  let {
@@ -156,7 +156,7 @@
156
156
  Authorization: `Bearer ${n}`
157
157
  },
158
158
  body: JSON.stringify(i)
159
- }).then(e => e.json());
159
+ }).then(e => e.json()).then(e => b(e, "Update comment"));
160
160
  },
161
161
  C = e => {
162
162
  try {
@@ -164,17 +164,17 @@
164
164
  } catch (e) {}
165
165
  return e;
166
166
  },
167
- $ = function () {
167
+ S = function () {
168
168
  let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
169
169
  return e.replace(/\/$/u, "");
170
170
  },
171
- S = e => /^(https?:)?\/\//.test(e),
171
+ $ = e => /^(https?:)?\/\//.test(e),
172
172
  I = e => {
173
- const t = $(e);
174
- return S(t) ? t : `https://${t}`;
173
+ const t = S(e);
174
+ return $(t) ? t : `https://${t}`;
175
175
  },
176
- R = e => Array.isArray(e) ? e : !!e && [0, e],
177
- E = (e, t) => "function" == typeof e ? e : !1 !== e && t,
176
+ E = e => Array.isArray(e) ? e : !!e && [0, e],
177
+ R = (e, t) => "function" == typeof e ? e : !1 !== e && t,
178
178
  L = "{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bgcolor:#1e1e1e;--waline-bgcolor-light:#272727;--waline-bgcolor-hover: #444;--waline-border-color:#333;--waline-disable-bgcolor:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bgcolor:#272727;--waline-info-color:#666}",
179
179
  A = (e, t) => {
180
180
  let n = e.toString();
@@ -323,10 +323,10 @@
323
323
  xe = ve(e => e.charAt(0).toUpperCase() + e.slice(1)),
324
324
  _e = ve(e => e ? `on${xe(e)}` : ""),
325
325
  Ce = (e, t) => !Object.is(e, t),
326
- $e = (e, t) => {
326
+ Se = (e, t) => {
327
327
  for (let n = 0; n < e.length; n++) e[n](t);
328
328
  },
329
- Se = (e, t, n) => {
329
+ $e = (e, t, n) => {
330
330
  Object.defineProperty(e, t, {
331
331
  configurable: !0,
332
332
  enumerable: !1,
@@ -337,28 +337,28 @@
337
337
  const t = parseFloat(e);
338
338
  return isNaN(t) ? e : t;
339
339
  };
340
- let Re;
341
340
  let Ee;
341
+ let Re;
342
342
  class Le {
343
343
  constructor() {
344
344
  let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
345
- this.detached = e, this.active = !0, this.effects = [], this.cleanups = [], this.parent = Ee, !e && Ee && (this.index = (Ee.scopes || (Ee.scopes = [])).push(this) - 1);
345
+ this.detached = e, this.active = !0, this.effects = [], this.cleanups = [], this.parent = Re, !e && Re && (this.index = (Re.scopes || (Re.scopes = [])).push(this) - 1);
346
346
  }
347
347
  run(e) {
348
348
  if (this.active) {
349
- const t = Ee;
349
+ const t = Re;
350
350
  try {
351
- return Ee = this, e();
351
+ return Re = this, e();
352
352
  } finally {
353
- Ee = t;
353
+ Re = t;
354
354
  }
355
355
  }
356
356
  }
357
357
  on() {
358
- Ee = this;
358
+ Re = this;
359
359
  }
360
360
  off() {
361
- Ee = this.parent;
361
+ Re = this.parent;
362
362
  }
363
363
  stop(e) {
364
364
  if (this.active) {
@@ -391,7 +391,7 @@
391
391
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
392
392
  let n = arguments.length > 2 ? arguments[2] : undefined;
393
393
  this.fn = e, this.scheduler = t, this.active = !0, this.deps = [], this.parent = void 0, function (e) {
394
- let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ee;
394
+ let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Re;
395
395
  t && t.active && t.effects.push(e);
396
396
  }(this, n);
397
397
  }
@@ -739,19 +739,19 @@
739
739
  e[i] = wt(i, !1, !1), n[i] = wt(i, !0, !1), t[i] = wt(i, !1, !0), r[i] = wt(i, !0, !0);
740
740
  }), [e, n, t, r];
741
741
  }
742
- const [xt, _t, Ct, $t] = kt();
743
- function St(e, t) {
744
- const n = t ? e ? $t : Ct : e ? _t : xt;
742
+ const [xt, _t, Ct, St] = kt();
743
+ function $t(e, t) {
744
+ const n = t ? e ? St : Ct : e ? _t : xt;
745
745
  return (t, r, i) => "__v_isReactive" === r ? !e : "__v_isReadonly" === r ? e : "__v_raw" === r ? t : Reflect.get(ne(n, r) && r in t ? n : t, r, i);
746
746
  }
747
747
  const It = {
748
- get: St(!1, !1)
749
- },
750
- Rt = {
751
- get: St(!1, !0)
748
+ get: $t(!1, !1)
752
749
  },
753
750
  Et = {
754
- get: St(!0, !1)
751
+ get: $t(!1, !0)
752
+ },
753
+ Rt = {
754
+ get: $t(!0, !1)
755
755
  },
756
756
  Lt = new WeakMap(),
757
757
  At = new WeakMap(),
@@ -777,7 +777,7 @@
777
777
  return Nt(e) ? e : Ut(e, !1, ot, It, Lt);
778
778
  }
779
779
  function Pt(e) {
780
- return Ut(e, !0, st, Et, zt);
780
+ return Ut(e, !0, st, Rt, zt);
781
781
  }
782
782
  function Ut(e, t, n, r, i) {
783
783
  if (!ue(e)) return e;
@@ -806,7 +806,7 @@
806
806
  return t ? Vt(t) : e;
807
807
  }
808
808
  function Bt(e) {
809
- return Se(e, "__v_skip", !0), e;
809
+ return $e(e, "__v_skip", !0), e;
810
810
  }
811
811
  const Ht = e => ue(e) ? Tt(e) : e,
812
812
  Wt = e => ue(e) ? Pt(e) : e;
@@ -971,7 +971,7 @@
971
971
  pn = 0, un.length = 0, kn(), an = !1, mn = null, (un.length || dn.length) && Cn();
972
972
  }
973
973
  }
974
- function $n(e, t) {
974
+ function Sn(e, t) {
975
975
  if (e.isUnmounted) return;
976
976
  const r = e.vnode.props || q;
977
977
  for (var _len3 = arguments.length, n = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
@@ -999,7 +999,7 @@
999
999
  e.emitted[s] = !0, on(c, e, 6, i);
1000
1000
  }
1001
1001
  }
1002
- function Sn(e, t) {
1002
+ function $n(e, t) {
1003
1003
  let n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1004
1004
  const r = t.emitsCache,
1005
1005
  i = r.get(e);
@@ -1011,11 +1011,11 @@
1011
1011
  function In(e, t) {
1012
1012
  return !(!e || !J(t)) && (t = t.slice(2).replace(/Once$/, ""), ne(e, t[0].toLowerCase() + t.slice(1)) || ne(e, ke(t)) || ne(e, t));
1013
1013
  }
1014
- let Rn = null,
1015
- En = null;
1014
+ let En = null,
1015
+ Rn = null;
1016
1016
  function Ln(e) {
1017
- const t = Rn;
1018
- return Rn = e, En = e && e.type.__scopeId || null, t;
1017
+ const t = En;
1018
+ return En = e, Rn = e && e.type.__scopeId || null, t;
1019
1019
  }
1020
1020
  function An(e) {
1021
1021
  const {
@@ -1050,7 +1050,7 @@
1050
1050
  }) : e(l, null)), v = t.props ? a : zn(a);
1051
1051
  }
1052
1052
  } catch (t) {
1053
- Rr.length = 0, sn(t, e, 1), m = Vr(Sr);
1053
+ Er.length = 0, sn(t, e, 1), m = Vr($r);
1054
1054
  }
1055
1055
  let w = m;
1056
1056
  if (v && !1 !== g) {
@@ -1083,7 +1083,7 @@
1083
1083
  }
1084
1084
  function Tn(e, t) {
1085
1085
  let n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1086
- const r = Yr || Rn;
1086
+ const r = Yr || En;
1087
1087
  if (r) {
1088
1088
  const i = null == r.parent ? r.vnode.appContext && r.vnode.appContext.provides : r.parent.provides;
1089
1089
  if (i && e in i) return i[e];
@@ -1186,7 +1186,7 @@
1186
1186
  Wn = Bn("bum"),
1187
1187
  qn = Bn("um");
1188
1188
  function Zn(e, t) {
1189
- const n = Rn;
1189
+ const n = En;
1190
1190
  if (null === n) return e;
1191
1191
  const r = li(n) || n.proxy,
1192
1192
  i = e.dirs || (e.dirs = []);
@@ -1220,7 +1220,7 @@
1220
1220
  return function (e, t) {
1221
1221
  let n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
1222
1222
  let r = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1223
- const i = Rn || Yr;
1223
+ const i = En || Yr;
1224
1224
  if (i) {
1225
1225
  const n = i.type;
1226
1226
  if ("components" === e) {
@@ -1349,9 +1349,9 @@
1349
1349
  let r = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1350
1350
  const i = {},
1351
1351
  l = {};
1352
- Se(l, Mr, 1), e.propsDefaults = Object.create(null), ir(e, t, i, l);
1352
+ $e(l, Mr, 1), e.propsDefaults = Object.create(null), ir(e, t, i, l);
1353
1353
  for (const t in e.propsOptions[0]) t in i || (i[t] = void 0);
1354
- n ? e.props = r ? i : Ut(i, !1, at, Rt, At) : e.type.props ? e.props = i : e.props = l, e.attrs = l;
1354
+ n ? e.props = r ? i : Ut(i, !1, at, Et, At) : e.type.props ? e.props = i : e.props = l, e.attrs = l;
1355
1355
  }
1356
1356
  function ir(e, t, n, r) {
1357
1357
  const [i, l] = e.propsOptions;
@@ -1437,7 +1437,7 @@
1437
1437
  hr = (e, t, n) => {
1438
1438
  if (t._n) return t;
1439
1439
  const r = function (e) {
1440
- let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Rn;
1440
+ let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : En;
1441
1441
  let n = arguments.length > 2 ? arguments[2] : undefined;
1442
1442
  if (!t) return e;
1443
1443
  if (e._n) return e;
@@ -1570,7 +1570,7 @@
1570
1570
  };
1571
1571
  function kr(e) {
1572
1572
  return function (e, t) {
1573
- (Re || (Re = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})).__VUE__ = !0;
1573
+ (Ee || (Ee = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})).__VUE__ = !0;
1574
1574
  const {
1575
1575
  insert: n,
1576
1576
  remove: r,
@@ -1600,10 +1600,10 @@
1600
1600
  shapeFlag: p
1601
1601
  } = t;
1602
1602
  switch (c) {
1603
- case $r:
1603
+ case Sr:
1604
1604
  g(e, t, n, r);
1605
1605
  break;
1606
- case Sr:
1606
+ case $r:
1607
1607
  m(e, t, n, r);
1608
1608
  break;
1609
1609
  case Ir:
@@ -1613,7 +1613,7 @@
1613
1613
  I(e, t, n, r, i, l, o, s, a);
1614
1614
  break;
1615
1615
  default:
1616
- 1 & p ? b(e, t, n, r, i, l, o, s, a) : 6 & p ? R(e, t, n, r, i, l, o, s, a) : (64 & p || 128 & p) && c.process(e, t, n, r, i, l, o, s, a, H);
1616
+ 1 & p ? b(e, t, n, r, i, l, o, s, a) : 6 & p ? E(e, t, n, r, i, l, o, s, a) : (64 & p || 128 & p) && c.process(e, t, n, r, i, l, o, s, a, H);
1617
1617
  }
1618
1618
  null != u && i && wr(u, e && e.ref, l, t || e, !t);
1619
1619
  },
@@ -1698,8 +1698,8 @@
1698
1698
  let g;
1699
1699
  n && xr(n, !1), (g = f.onVnodeBeforeUpdate) && Kr(g, n, t, e), d && Gn(t, e, n, "beforeUpdate"), n && xr(n, !0);
1700
1700
  const m = l && "foreignObject" !== t.type;
1701
- if (p ? $(e.dynamicChildren, p, a, n, r, m, o) : s || O(e, t, a, null, n, r, m, o, !1), u > 0) {
1702
- if (16 & u) S(a, t, h, f, n, r, l);else if (2 & u && h.class !== f.class && i(a, "class", null, f.class, l), 4 & u && i(a, "style", h.style, f.style, l), 8 & u) {
1701
+ if (p ? S(e.dynamicChildren, p, a, n, r, m, o) : s || O(e, t, a, null, n, r, m, o, !1), u > 0) {
1702
+ if (16 & u) $(a, t, h, f, n, r, l);else if (2 & u && h.class !== f.class && i(a, "class", null, f.class, l), 4 & u && i(a, "style", h.style, f.style, l), 8 & u) {
1703
1703
  const o = t.dynamicProps;
1704
1704
  for (let t = 0; t < o.length; t++) {
1705
1705
  const s = o[t],
@@ -1709,12 +1709,12 @@
1709
1709
  }
1710
1710
  }
1711
1711
  1 & u && e.children !== t.children && c(a, t.children);
1712
- } else s || null != p || S(a, t, h, f, n, r, l);
1712
+ } else s || null != p || $(a, t, h, f, n, r, l);
1713
1713
  ((g = f.onVnodeUpdated) || d) && br(() => {
1714
1714
  g && Kr(g, n, t, e), d && Gn(t, e, n, "updated");
1715
1715
  }, r);
1716
1716
  },
1717
- $ = (e, t, n, r, i, l, o) => {
1717
+ S = (e, t, n, r, i, l, o) => {
1718
1718
  for (let s = 0; s < t.length; s++) {
1719
1719
  const a = e[s],
1720
1720
  c = t[s],
@@ -1722,7 +1722,7 @@
1722
1722
  f(a, c, p, null, r, i, l, o, !0);
1723
1723
  }
1724
1724
  },
1725
- S = (e, t, n, r, l, o, s) => {
1725
+ $ = (e, t, n, r, l, o, s) => {
1726
1726
  if (n !== r) {
1727
1727
  if (n !== q) for (const a in n) me(a) || a in r || i(e, a, n[a], null, s, t.children, l, o, D);
1728
1728
  for (const a in r) {
@@ -1742,12 +1742,12 @@
1742
1742
  dynamicChildren: f,
1743
1743
  slotScopeIds: g
1744
1744
  } = t;
1745
- g && (c = c ? c.concat(g) : g), null == e ? (n(p, r, i), n(d, r, i), _(t.children, r, d, l, s, a, c, u)) : h > 0 && 64 & h && f && e.dynamicChildren ? ($(e.dynamicChildren, f, r, l, s, a, c), (null != t.key || l && t === l.subTree) && _r(e, t, !0)) : O(e, t, r, d, l, s, a, c, u);
1745
+ g && (c = c ? c.concat(g) : g), null == e ? (n(p, r, i), n(d, r, i), _(t.children, r, d, l, s, a, c, u)) : h > 0 && 64 & h && f && e.dynamicChildren ? (S(e.dynamicChildren, f, r, l, s, a, c), (null != t.key || l && t === l.subTree) && _r(e, t, !0)) : O(e, t, r, d, l, s, a, c, u);
1746
1746
  },
1747
- R = (e, t, n, r, i, l, o, s, a) => {
1748
- t.slotScopeIds = s, null == e ? 512 & t.shapeFlag ? i.ctx.activate(t, n, r, o, a) : E(t, n, r, i, l, o, a) : L(e, t, a);
1747
+ E = (e, t, n, r, i, l, o, s, a) => {
1748
+ t.slotScopeIds = s, null == e ? 512 & t.shapeFlag ? i.ctx.activate(t, n, r, o, a) : R(t, n, r, i, l, o, a) : L(e, t, a);
1749
1749
  },
1750
- E = (e, t, n, r, i, l, o) => {
1750
+ R = (e, t, n, r, i, l, o) => {
1751
1751
  const s = e.component = function (e, t, n) {
1752
1752
  const r = e.type,
1753
1753
  i = (t ? t.appContext : e.appContext) || Qr,
@@ -1774,7 +1774,7 @@
1774
1774
  components: null,
1775
1775
  directives: null,
1776
1776
  propsOptions: or(r, i),
1777
- emitsOptions: Sn(r, i),
1777
+ emitsOptions: $n(r, i),
1778
1778
  emit: null,
1779
1779
  emitted: null,
1780
1780
  propsDefaults: q,
@@ -1811,7 +1811,7 @@
1811
1811
  };
1812
1812
  l.ctx = {
1813
1813
  _: l
1814
- }, l.root = t ? t.root : l, l.emit = $n.bind(null, l), e.ce && e.ce(l);
1814
+ }, l.root = t ? t.root : l, l.emit = Sn.bind(null, l), e.ce && e.ce(l);
1815
1815
  return l;
1816
1816
  }(e, r, i);
1817
1817
  if (e.type.__isKeepAlive && (s.ctx.renderer = H), function (e) {
@@ -1825,9 +1825,9 @@
1825
1825
  rr(e, n, i, t), ((e, t) => {
1826
1826
  if (32 & e.vnode.shapeFlag) {
1827
1827
  const n = t._;
1828
- n ? (e.slots = Vt(t), Se(t, "_", n)) : fr(t, e.slots = {});
1828
+ n ? (e.slots = Vt(t), $e(t, "_", n)) : fr(t, e.slots = {});
1829
1829
  } else e.slots = {}, t && gr(e, t);
1830
- Se(e.slots, Mr, 1);
1830
+ $e(e.slots, Mr, 1);
1831
1831
  })(e, r);
1832
1832
  const l = i ? function (e, t) {
1833
1833
  const n = e.type;
@@ -1869,7 +1869,7 @@
1869
1869
  ni = !1;
1870
1870
  }(s), s.asyncDep) {
1871
1871
  if (i && i.registerDep(s, A), !e.el) {
1872
- const e = s.subTree = Vr(Sr);
1872
+ const e = s.subTree = Vr($r);
1873
1873
  m(null, e, t, n);
1874
1874
  }
1875
1875
  } else A(s, e, t, n, i, l, o);
@@ -1920,7 +1920,7 @@
1920
1920
  vnode: c
1921
1921
  } = e,
1922
1922
  p = n;
1923
- xr(e, !1), n ? (n.el = c.el, z(e, n, o)) : n = c, r && $e(r), (t = n.props && n.props.onVnodeBeforeUpdate) && Kr(t, a, n, c), xr(e, !0);
1923
+ xr(e, !1), n ? (n.el = c.el, z(e, n, o)) : n = c, r && Se(r), (t = n.props && n.props.onVnodeBeforeUpdate) && Kr(t, a, n, c), xr(e, !0);
1924
1924
  const d = An(e),
1925
1925
  h = e.subTree;
1926
1926
  e.subTree = d, f(h, d, u(h.el), V(h), e, i, l), n.el = d.el, null === p && function (_ref12, n) {
@@ -1942,7 +1942,7 @@
1942
1942
  parent: p
1943
1943
  } = e,
1944
1944
  d = Vn(t);
1945
- if (xr(e, !1), c && $e(c), !d && (o = a && a.onVnodeBeforeMount) && Kr(o, p, t), xr(e, !0), s && K) {
1945
+ if (xr(e, !1), c && Se(c), !d && (o = a && a.onVnodeBeforeMount) && Kr(o, p, t), xr(e, !0), s && K) {
1946
1946
  const n = () => {
1947
1947
  e.subTree = An(e), K(s, e.subTree, e, i, null);
1948
1948
  };
@@ -2212,7 +2212,7 @@
2212
2212
  subTree: o,
2213
2213
  um: s
2214
2214
  } = e;
2215
- r && $e(r), i.stop(), l && (l.active = !1, U(o, e, t, n)), s && br(s, t), br(() => {
2215
+ r && Se(r), i.stop(), l && (l.active = !1, U(o, e, t, n)), s && br(s, t), br(() => {
2216
2216
  e.isUnmounted = !0;
2217
2217
  }, t), t && t.pendingBranch && !t.isUnmounted && e.asyncDep && !e.asyncResolved && e.suspenseId === t.pendingId && (t.deps--, 0 === t.deps && t.resolve());
2218
2218
  },
@@ -2231,10 +2231,10 @@
2231
2231
  um: U,
2232
2232
  m: P,
2233
2233
  r: M,
2234
- mt: E,
2234
+ mt: R,
2235
2235
  mc: _,
2236
2236
  pc: O,
2237
- pbc: $,
2237
+ pbc: S,
2238
2238
  n: V,
2239
2239
  o: e
2240
2240
  };
@@ -2261,25 +2261,25 @@
2261
2261
  if (re(r) && re(i)) for (let e = 0; e < r.length; e++) {
2262
2262
  const t = r[e];
2263
2263
  let l = i[e];
2264
- 1 & l.shapeFlag && !l.dynamicChildren && ((l.patchFlag <= 0 || 32 === l.patchFlag) && (l = i[e] = Zr(i[e]), l.el = t.el), n || _r(t, l)), l.type === $r && (l.el = t.el);
2264
+ 1 & l.shapeFlag && !l.dynamicChildren && ((l.patchFlag <= 0 || 32 === l.patchFlag) && (l = i[e] = Zr(i[e]), l.el = t.el), n || _r(t, l)), l.type === Sr && (l.el = t.el);
2265
2265
  }
2266
2266
  }
2267
2267
  const Cr = Symbol(void 0),
2268
- $r = Symbol(void 0),
2269
2268
  Sr = Symbol(void 0),
2269
+ $r = Symbol(void 0),
2270
2270
  Ir = Symbol(void 0),
2271
- Rr = [];
2272
- let Er = null;
2271
+ Er = [];
2272
+ let Rr = null;
2273
2273
  function Lr() {
2274
2274
  let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
2275
- Rr.push(Er = e ? null : []);
2275
+ Er.push(Rr = e ? null : []);
2276
2276
  }
2277
2277
  let Ar = 1;
2278
2278
  function zr(e) {
2279
2279
  Ar += e;
2280
2280
  }
2281
2281
  function Or(e) {
2282
- return e.dynamicChildren = Ar > 0 ? Er || Z : null, Rr.pop(), Er = Rr[Rr.length - 1] || null, Ar > 0 && Er && Er.push(e), e;
2282
+ return e.dynamicChildren = Ar > 0 ? Rr || Z : null, Er.pop(), Rr = Er[Er.length - 1] || null, Ar > 0 && Rr && Rr.push(e), e;
2283
2283
  }
2284
2284
  function jr(e, t, n, r, i, l) {
2285
2285
  return Or(Dr(e, t, n, r, i, l, !0));
@@ -2307,7 +2307,7 @@
2307
2307
  ref_for: n
2308
2308
  } = _ref15;
2309
2309
  return null != e ? ae(e) || Gt(e) || se(e) ? {
2310
- i: Rn,
2310
+ i: En,
2311
2311
  r: e,
2312
2312
  k: t,
2313
2313
  f: !!n
@@ -2328,7 +2328,7 @@
2328
2328
  props: t,
2329
2329
  key: t && Nr(t),
2330
2330
  ref: t && Fr(t),
2331
- scopeId: En,
2331
+ scopeId: Rn,
2332
2332
  slotScopeIds: null,
2333
2333
  children: n,
2334
2334
  component: null,
@@ -2347,9 +2347,9 @@
2347
2347
  dynamicProps: i,
2348
2348
  dynamicChildren: null,
2349
2349
  appContext: null,
2350
- ctx: Rn
2350
+ ctx: En
2351
2351
  };
2352
- return s ? (Gr(a, n), 128 & l && e.normalize(a)) : n && (a.shapeFlag |= ae(n) ? 8 : 16), Ar > 0 && !o && Er && (a.patchFlag > 0 || 6 & l) && 32 !== a.patchFlag && Er.push(a), a;
2352
+ return s ? (Gr(a, n), 128 & l && e.normalize(a)) : n && (a.shapeFlag |= ae(n) ? 8 : 16), Ar > 0 && !o && Rr && (a.patchFlag > 0 || 6 & l) && 32 !== a.patchFlag && Rr.push(a), a;
2353
2353
  }
2354
2354
  const Vr = function (e) {
2355
2355
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
@@ -2357,10 +2357,10 @@
2357
2357
  let r = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
2358
2358
  let i = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
2359
2359
  let l = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : !1;
2360
- e && e !== Qn || (e = Sr);
2360
+ e && e !== Qn || (e = $r);
2361
2361
  if (Pr(e)) {
2362
2362
  const r = Br(e, t, !0);
2363
- return n && Gr(r, n), Ar > 0 && !l && Er && (6 & r.shapeFlag ? Er[Er.indexOf(e)] = r : Er.push(r)), r.patchFlag |= -2, r;
2363
+ return n && Gr(r, n), Ar > 0 && !l && Rr && (6 & r.shapeFlag ? Rr[Rr.indexOf(e)] = r : Rr.push(r)), r.patchFlag |= -2, r;
2364
2364
  }
2365
2365
  o = e, se(o) && "__vccOpts" in o && (e = e.__vccOpts);
2366
2366
  var o;
@@ -2429,15 +2429,15 @@
2429
2429
  function Hr() {
2430
2430
  let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : " ";
2431
2431
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2432
- return Vr($r, null, e, t);
2432
+ return Vr(Sr, null, e, t);
2433
2433
  }
2434
2434
  function Wr() {
2435
2435
  let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
2436
2436
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
2437
- return t ? (Lr(), Tr(Sr, null, e)) : Vr(Sr, null, e);
2437
+ return t ? (Lr(), Tr($r, null, e)) : Vr($r, null, e);
2438
2438
  }
2439
2439
  function qr(e) {
2440
- return null == e || "boolean" == typeof e ? Vr(Sr) : re(e) ? Vr(Cr, null, e.slice()) : "object" == typeof e ? Zr(e) : Vr($r, null, String(e));
2440
+ return null == e || "boolean" == typeof e ? Vr($r) : re(e) ? Vr(Cr, null, e.slice()) : "object" == typeof e ? Zr(e) : Vr(Sr, null, String(e));
2441
2441
  }
2442
2442
  function Zr(e) {
2443
2443
  return null === e.el && -1 !== e.patchFlag || e.memo ? e : Br(e);
@@ -2455,11 +2455,11 @@
2455
2455
  {
2456
2456
  n = 32;
2457
2457
  const r = t._;
2458
- r || Mr in t ? 3 === r && Rn && (1 === Rn.slots._ ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024)) : t._ctx = Rn;
2458
+ r || Mr in t ? 3 === r && En && (1 === En.slots._ ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024)) : t._ctx = En;
2459
2459
  }
2460
2460
  } else se(t) ? (t = {
2461
2461
  default: t,
2462
- _ctx: Rn
2462
+ _ctx: En
2463
2463
  }, n = 32) : (t = String(t), 64 & r ? (n = 16, t = [Hr(t)]) : n = 8);
2464
2464
  e.children = t, e.shapeFlag |= n;
2465
2465
  }
@@ -2616,18 +2616,18 @@
2616
2616
  let xi = 0;
2617
2617
  const _i = Promise.resolve();
2618
2618
  const Ci = /^on[a-z]/;
2619
- const $i = e => {
2619
+ const Si = e => {
2620
2620
  const t = e.props["onUpdate:modelValue"] || !1;
2621
- return re(t) ? e => $e(t, e) : t;
2621
+ return re(t) ? e => Se(t, e) : t;
2622
2622
  };
2623
- function Si(e) {
2623
+ function $i(e) {
2624
2624
  e.target.composing = !0;
2625
2625
  }
2626
2626
  function Ii(e) {
2627
2627
  const t = e.target;
2628
2628
  t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
2629
2629
  }
2630
- const Ri = {
2630
+ const Ei = {
2631
2631
  created(e, _ref16, i) {
2632
2632
  let {
2633
2633
  modifiers: {
@@ -2636,7 +2636,7 @@
2636
2636
  number: r
2637
2637
  }
2638
2638
  } = _ref16;
2639
- e._assign = $i(i);
2639
+ e._assign = Si(i);
2640
2640
  const l = r || i.props && "number" === i.props.type;
2641
2641
  wi(e, t ? "change" : "input", t => {
2642
2642
  if (t.target.composing) return;
@@ -2644,7 +2644,7 @@
2644
2644
  n && (r = r.trim()), l && (r = Ie(r)), e._assign(r);
2645
2645
  }), n && wi(e, "change", () => {
2646
2646
  e.value = e.value.trim();
2647
- }), t || (wi(e, "compositionstart", Si), wi(e, "compositionend", Ii), wi(e, "change", Ii));
2647
+ }), t || (wi(e, "compositionstart", $i), wi(e, "compositionend", Ii), wi(e, "change", Ii));
2648
2648
  },
2649
2649
  mounted(e, _ref17) {
2650
2650
  let {
@@ -2661,7 +2661,7 @@
2661
2661
  number: i
2662
2662
  }
2663
2663
  } = _ref18;
2664
- if (e._assign = $i(l), e.composing) return;
2664
+ if (e._assign = Si(l), e.composing) return;
2665
2665
  if (document.activeElement === e && "range" !== e.type) {
2666
2666
  if (n) return;
2667
2667
  if (r && e.value.trim() === t) return;
@@ -2671,10 +2671,10 @@
2671
2671
  e.value !== o && (e.value = o);
2672
2672
  }
2673
2673
  },
2674
- Ei = {
2674
+ Ri = {
2675
2675
  deep: !0,
2676
2676
  created(e, t, n) {
2677
- e._assign = $i(n), wi(e, "change", () => {
2677
+ e._assign = Si(n), wi(e, "change", () => {
2678
2678
  const t = e._modelValue,
2679
2679
  n = ji(e),
2680
2680
  r = e.checked,
@@ -2694,7 +2694,7 @@
2694
2694
  },
2695
2695
  mounted: Li,
2696
2696
  beforeUpdate(e, t, n) {
2697
- e._assign = $i(n), Li(e, t, n);
2697
+ e._assign = Si(n), Li(e, t, n);
2698
2698
  }
2699
2699
  };
2700
2700
  function Li(e, _ref19, r) {
@@ -2709,7 +2709,7 @@
2709
2709
  let {
2710
2710
  value: t
2711
2711
  } = _ref20;
2712
- e.checked = V(t, n.props.value), e._assign = $i(n), wi(e, "change", () => {
2712
+ e.checked = V(t, n.props.value), e._assign = Si(n), wi(e, "change", () => {
2713
2713
  e._assign(ji(e));
2714
2714
  });
2715
2715
  },
@@ -2718,7 +2718,7 @@
2718
2718
  value: t,
2719
2719
  oldValue: n
2720
2720
  } = _ref21;
2721
- e._assign = $i(r), t !== n && (e.checked = V(t, r.props.value));
2721
+ e._assign = Si(r), t !== n && (e.checked = V(t, r.props.value));
2722
2722
  }
2723
2723
  },
2724
2724
  zi = {
@@ -2734,7 +2734,7 @@
2734
2734
  wi(e, "change", () => {
2735
2735
  const t = Array.prototype.filter.call(e.options, e => e.selected).map(e => n ? Ie(ji(e)) : ji(e));
2736
2736
  e._assign(e.multiple ? i ? new Set(t) : t : t[0]);
2737
- }), e._assign = $i(r);
2737
+ }), e._assign = Si(r);
2738
2738
  },
2739
2739
  mounted(e, _ref23) {
2740
2740
  let {
@@ -2743,7 +2743,7 @@
2743
2743
  Oi(e, t);
2744
2744
  },
2745
2745
  beforeUpdate(e, t, n) {
2746
- e._assign = $i(n);
2746
+ e._assign = Si(n);
2747
2747
  },
2748
2748
  updated(e, _ref24) {
2749
2749
  let {
@@ -2790,15 +2790,15 @@
2790
2790
  case "SELECT":
2791
2791
  return zi;
2792
2792
  case "TEXTAREA":
2793
- return Ri;
2793
+ return Ei;
2794
2794
  default:
2795
2795
  switch (t) {
2796
2796
  case "checkbox":
2797
- return Ei;
2797
+ return Ri;
2798
2798
  case "radio":
2799
2799
  return Ai;
2800
2800
  default:
2801
- return Ri;
2801
+ return Ei;
2802
2802
  }
2803
2803
  }
2804
2804
  }(e.tagName, n.props && n.props.type)[i];
@@ -2938,8 +2938,8 @@
2938
2938
  Hi && (null == (Bi = null == window ? void 0 : window.navigator) ? void 0 : Bi.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
2939
2939
  const Gi = e => e();
2940
2940
  function Ki(e) {
2941
- return !!Ee && (function (e) {
2942
- Ee && Ee.cleanups.push(e);
2941
+ return !!Re && (function (e) {
2942
+ Re && Re.cleanups.push(e);
2943
2943
  }(e), !0);
2944
2944
  }
2945
2945
  function Qi(e) {
@@ -2962,7 +2962,7 @@
2962
2962
  }
2963
2963
  function Ji(e) {
2964
2964
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
2965
- Yr || Rn ? Hn(e) : t ? e() : vn(e);
2965
+ Yr || En ? Hn(e) : t ? e() : vn(e);
2966
2966
  }
2967
2967
  var Yi = Object.getOwnPropertySymbols,
2968
2968
  Xi = Object.prototype.hasOwnProperty,
@@ -3191,12 +3191,12 @@
3191
3191
  }
3192
3192
  }
3193
3193
  var Cl,
3194
- $l,
3195
- Sl = Object.defineProperty,
3194
+ Sl,
3195
+ $l = Object.defineProperty,
3196
3196
  Il = Object.getOwnPropertySymbols,
3197
- Rl = Object.prototype.hasOwnProperty,
3198
- El = Object.prototype.propertyIsEnumerable,
3199
- Ll = (e, t, n) => t in e ? Sl(e, t, {
3197
+ El = Object.prototype.hasOwnProperty,
3198
+ Rl = Object.prototype.propertyIsEnumerable,
3199
+ Ll = (e, t, n) => t in e ? $l(e, t, {
3200
3200
  enumerable: !0,
3201
3201
  configurable: !0,
3202
3202
  writable: !0,
@@ -3264,14 +3264,14 @@
3264
3264
  immediate: !0
3265
3265
  });
3266
3266
  return t ? ((e, t) => {
3267
- for (var n in t || (t = {})) Rl.call(t, n) && Ll(e, n, t[n]);
3268
- if (Il) for (var n of Il(t)) El.call(t, n) && Ll(e, n, t[n]);
3267
+ for (var n in t || (t = {})) El.call(t, n) && Ll(e, n, t[n]);
3268
+ if (Il) for (var n of Il(t)) Rl.call(t, n) && Ll(e, n, t[n]);
3269
3269
  return e;
3270
3270
  })({
3271
3271
  now: r
3272
3272
  }, l) : r;
3273
3273
  }
3274
- ($l = Cl || (Cl = {})).UP = "UP", $l.RIGHT = "RIGHT", $l.DOWN = "DOWN", $l.LEFT = "LEFT", $l.NONE = "NONE";
3274
+ (Sl = Cl || (Cl = {})).UP = "UP", Sl.RIGHT = "RIGHT", Sl.DOWN = "DOWN", Sl.LEFT = "LEFT", Sl.NONE = "NONE";
3275
3275
  let zl = 0;
3276
3276
  var Ol = Object.defineProperty,
3277
3277
  jl = Object.getOwnPropertySymbols,
@@ -4216,7 +4216,7 @@
4216
4216
  return e;
4217
4217
  }
4218
4218
  }
4219
- class $o {
4219
+ class So {
4220
4220
  strong(e) {
4221
4221
  return e;
4222
4222
  }
@@ -4245,7 +4245,7 @@
4245
4245
  return "";
4246
4246
  }
4247
4247
  }
4248
- class So {
4248
+ class $o {
4249
4249
  constructor() {
4250
4250
  this.seen = {};
4251
4251
  }
@@ -4271,7 +4271,7 @@
4271
4271
  }
4272
4272
  class Io {
4273
4273
  constructor(e) {
4274
- this.options = e || Wl, this.options.renderer = this.options.renderer || new Co(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new $o(), this.slugger = new So();
4274
+ this.options = e || Wl, this.options.renderer = this.options.renderer || new Co(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new So(), this.slugger = new $o();
4275
4275
  }
4276
4276
  static parse(e, t) {
4277
4277
  return new Io(t).parse(e);
@@ -4407,10 +4407,10 @@
4407
4407
  return l;
4408
4408
  }
4409
4409
  }
4410
- function Ro(e, t, n) {
4410
+ function Eo(e, t, n) {
4411
4411
  if (null == e) throw new Error("marked(): input parameter is undefined or null");
4412
4412
  if ("string" != typeof e) throw new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected");
4413
- if ("function" == typeof t && (n = t, t = null), go(t = po({}, Ro.defaults, t || {})), n) {
4413
+ if ("function" == typeof t && (n = t, t = null), go(t = po({}, Eo.defaults, t || {})), n) {
4414
4414
  const r = t.highlight;
4415
4415
  let i;
4416
4416
  try {
@@ -4421,7 +4421,7 @@
4421
4421
  const l = function (e) {
4422
4422
  let l;
4423
4423
  if (!e) try {
4424
- t.walkTokens && Ro.walkTokens(i, t.walkTokens), l = Io.parse(i, t);
4424
+ t.walkTokens && Eo.walkTokens(i, t.walkTokens), l = Io.parse(i, t);
4425
4425
  } catch (t) {
4426
4426
  e = t;
4427
4427
  }
@@ -4430,7 +4430,7 @@
4430
4430
  if (!r || r.length < 3) return l();
4431
4431
  if (delete t.highlight, !i.length) return l();
4432
4432
  let o = 0;
4433
- return Ro.walkTokens(i, function (e) {
4433
+ return Eo.walkTokens(i, function (e) {
4434
4434
  "code" === e.type && (o++, setTimeout(() => {
4435
4435
  r(e.text, e.lang, function (t, n) {
4436
4436
  if (t) return l(t);
@@ -4446,23 +4446,23 @@
4446
4446
  try {
4447
4447
  const n = _o.lex(e, t);
4448
4448
  if (t.walkTokens) {
4449
- if (t.async) return Promise.all(Ro.walkTokens(n, t.walkTokens)).then(() => Io.parse(n, t)).catch(r);
4450
- Ro.walkTokens(n, t.walkTokens);
4449
+ if (t.async) return Promise.all(Eo.walkTokens(n, t.walkTokens)).then(() => Io.parse(n, t)).catch(r);
4450
+ Eo.walkTokens(n, t.walkTokens);
4451
4451
  }
4452
4452
  return Io.parse(n, t);
4453
4453
  } catch (e) {
4454
4454
  r(e);
4455
4455
  }
4456
4456
  }
4457
- Ro.options = Ro.setOptions = function (e) {
4457
+ Eo.options = Eo.setOptions = function (e) {
4458
4458
  var t;
4459
- return po(Ro.defaults, e), t = Ro.defaults, Wl = t, Ro;
4460
- }, Ro.getDefaults = Hl, Ro.defaults = Wl, Ro.use = function () {
4459
+ return po(Eo.defaults, e), t = Eo.defaults, Wl = t, Eo;
4460
+ }, Eo.getDefaults = Hl, Eo.defaults = Wl, Eo.use = function () {
4461
4461
  for (var _len8 = arguments.length, e = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
4462
4462
  e[_key8] = arguments[_key8];
4463
4463
  }
4464
4464
  const t = po({}, ...e),
4465
- n = Ro.defaults.extensions || {
4465
+ n = Eo.defaults.extensions || {
4466
4466
  renderers: {},
4467
4467
  childTokens: {}
4468
4468
  };
@@ -4486,7 +4486,7 @@
4486
4486
  }
4487
4487
  e.childTokens && (n.childTokens[e.name] = e.childTokens);
4488
4488
  })), e.renderer) {
4489
- const n = Ro.defaults.renderer || new Co();
4489
+ const n = Eo.defaults.renderer || new Co();
4490
4490
  for (const t in e.renderer) {
4491
4491
  const r = n[t];
4492
4492
  n[t] = function () {
@@ -4500,7 +4500,7 @@
4500
4500
  t.renderer = n;
4501
4501
  }
4502
4502
  if (e.tokenizer) {
4503
- const n = Ro.defaults.tokenizer || new yo();
4503
+ const n = Eo.defaults.tokenizer || new yo();
4504
4504
  for (const t in e.tokenizer) {
4505
4505
  const r = n[t];
4506
4506
  n[t] = function () {
@@ -4514,43 +4514,43 @@
4514
4514
  t.tokenizer = n;
4515
4515
  }
4516
4516
  if (e.walkTokens) {
4517
- const n = Ro.defaults.walkTokens;
4517
+ const n = Eo.defaults.walkTokens;
4518
4518
  t.walkTokens = function (t) {
4519
4519
  let r = [];
4520
4520
  return r.push(e.walkTokens.call(this, t)), n && (r = r.concat(n.call(this, t))), r;
4521
4521
  };
4522
4522
  }
4523
- r && (t.extensions = n), Ro.setOptions(t);
4523
+ r && (t.extensions = n), Eo.setOptions(t);
4524
4524
  });
4525
- }, Ro.walkTokens = function (e, t) {
4525
+ }, Eo.walkTokens = function (e, t) {
4526
4526
  let n = [];
4527
- for (const r of e) switch (n = n.concat(t.call(Ro, r)), r.type) {
4527
+ for (const r of e) switch (n = n.concat(t.call(Eo, r)), r.type) {
4528
4528
  case "table":
4529
- for (const e of r.header) n = n.concat(Ro.walkTokens(e.tokens, t));
4530
- for (const e of r.rows) for (const r of e) n = n.concat(Ro.walkTokens(r.tokens, t));
4529
+ for (const e of r.header) n = n.concat(Eo.walkTokens(e.tokens, t));
4530
+ for (const e of r.rows) for (const r of e) n = n.concat(Eo.walkTokens(r.tokens, t));
4531
4531
  break;
4532
4532
  case "list":
4533
- n = n.concat(Ro.walkTokens(r.items, t));
4533
+ n = n.concat(Eo.walkTokens(r.items, t));
4534
4534
  break;
4535
4535
  default:
4536
- Ro.defaults.extensions && Ro.defaults.extensions.childTokens && Ro.defaults.extensions.childTokens[r.type] ? Ro.defaults.extensions.childTokens[r.type].forEach(function (e) {
4537
- n = n.concat(Ro.walkTokens(r[e], t));
4538
- }) : r.tokens && (n = n.concat(Ro.walkTokens(r.tokens, t)));
4536
+ Eo.defaults.extensions && Eo.defaults.extensions.childTokens && Eo.defaults.extensions.childTokens[r.type] ? Eo.defaults.extensions.childTokens[r.type].forEach(function (e) {
4537
+ n = n.concat(Eo.walkTokens(r[e], t));
4538
+ }) : r.tokens && (n = n.concat(Eo.walkTokens(r.tokens, t)));
4539
4539
  }
4540
4540
  return n;
4541
- }, Ro.parseInline = function (e, t) {
4541
+ }, Eo.parseInline = function (e, t) {
4542
4542
  if (null == e) throw new Error("marked.parseInline(): input parameter is undefined or null");
4543
4543
  if ("string" != typeof e) throw new Error("marked.parseInline(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected");
4544
- go(t = po({}, Ro.defaults, t || {}));
4544
+ go(t = po({}, Eo.defaults, t || {}));
4545
4545
  try {
4546
4546
  const n = _o.lexInline(e, t);
4547
- return t.walkTokens && Ro.walkTokens(n, t.walkTokens), Io.parseInline(n, t);
4547
+ return t.walkTokens && Eo.walkTokens(n, t.walkTokens), Io.parseInline(n, t);
4548
4548
  } catch (e) {
4549
4549
  if (e.message += "\nPlease report this to https://github.com/markedjs/marked.", t.silent) return "<p>An error occurred:</p><pre>" + Yl(e.message + "", !0) + "</pre>";
4550
4550
  throw e;
4551
4551
  }
4552
- }, Ro.Parser = Io, Ro.parser = Io.parse, Ro.Renderer = Co, Ro.TextRenderer = $o, Ro.Lexer = _o, Ro.lexer = _o.lex, Ro.Tokenizer = yo, Ro.Slugger = So, Ro.parse = Ro;
4553
- const Eo = /\$.*?\$/,
4552
+ }, Eo.Parser = Io, Eo.parser = Io.parse, Eo.Renderer = Co, Eo.TextRenderer = So, Eo.Lexer = _o, Eo.lexer = _o.lex, Eo.Tokenizer = yo, Eo.Slugger = $o, Eo.parse = Eo;
4553
+ const Ro = /\$.*?\$/,
4554
4554
  Lo = /^\$(.*?)\$/,
4555
4555
  Ao = /^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,
4556
4556
  zo = function () {
@@ -4564,7 +4564,7 @@
4564
4564
  highlighter: n,
4565
4565
  texRenderer: r
4566
4566
  } = _ref32;
4567
- if (Ro.setOptions({
4567
+ if (Eo.setOptions({
4568
4568
  highlight: n || void 0,
4569
4569
  breaks: !0,
4570
4570
  smartLists: !0,
@@ -4585,7 +4585,7 @@
4585
4585
  name: "inlineMath",
4586
4586
  level: "inline",
4587
4587
  start(e) {
4588
- const t = e.search(Eo);
4588
+ const t = e.search(Ro);
4589
4589
  return -1 !== t ? t : e.length;
4590
4590
  },
4591
4591
  tokenizer(t) {
@@ -4597,11 +4597,11 @@
4597
4597
  };
4598
4598
  }
4599
4599
  }])(r);
4600
- Ro.use({
4600
+ Eo.use({
4601
4601
  extensions: e
4602
4602
  });
4603
4603
  }
4604
- return Ro.parse(zo(e, t));
4604
+ return Eo.parse(zo(e, t));
4605
4605
  },
4606
4606
  jo = e => e.dataset.path || e.getAttribute("id"),
4607
4607
  To = _ref33 => {
@@ -4622,7 +4622,7 @@
4622
4622
  } = _ref34;
4623
4623
  return fetch(`${e}/comment?type=count&url=${encodeURIComponent(n.join(","))}&lang=${t}`, {
4624
4624
  signal: r
4625
- }).then(e => e.json()).then(e => b(e, "comment count")).then(e => Array.isArray(e) ? e : [e]);
4625
+ }).then(e => e.json()).then(e => Array.isArray(e) ? e : [e]);
4626
4626
  })({
4627
4627
  serverURL: I(e),
4628
4628
  paths: Array.from(l).map(e => C(e.dataset.path || e.getAttribute("id") || t)),
@@ -5363,31 +5363,31 @@
5363
5363
  list: []
5364
5364
  }),
5365
5365
  x = Kt(0),
5366
- _ = Kt(!1),
5367
- C = Kt(""),
5368
- S = Kt(!1),
5369
- I = oi(() => n.value.locale),
5366
+ C = Kt(!1),
5367
+ $ = Kt(""),
5368
+ I = Kt(!1),
5369
+ E = oi(() => n.value.locale),
5370
5370
  R = oi(() => {
5371
5371
  var _l$value;
5372
5372
  return Boolean((_l$value = l.value) === null || _l$value === void 0 ? void 0 : _l$value.token);
5373
5373
  }),
5374
- E = oi(() => !1 !== n.value.imageUploader),
5375
- L = e => {
5374
+ L = oi(() => !1 !== n.value.imageUploader),
5375
+ A = e => {
5376
5376
  const t = s.value,
5377
5377
  n = t.selectionStart,
5378
5378
  i = t.selectionEnd || 0,
5379
5379
  l = t.scrollTop;
5380
5380
  r.value = t.value.substring(0, n) + e + t.value.substring(i, t.value.length), t.focus(), t.selectionStart = n + e.length, t.selectionEnd = n + e.length, t.scrollTop = l;
5381
5381
  },
5382
- A = e => {
5382
+ z = e => {
5383
5383
  const t = `![${n.value.locale.uploading} ${e.name}]()`;
5384
- return L(t), Promise.resolve().then(() => n.value.imageUploader(e)).then(n => {
5384
+ return A(t), Promise.resolve().then(() => n.value.imageUploader(e)).then(n => {
5385
5385
  r.value = r.value.replace(t, `\r\n![${e.name}](${n})`);
5386
5386
  }).catch(e => {
5387
5387
  alert(e.message), r.value = r.value.replace(t, "");
5388
5388
  });
5389
5389
  },
5390
- z = async () => {
5390
+ O = async () => {
5391
5391
  var _l$value2, _l$value3;
5392
5392
  const {
5393
5393
  serverURL: a,
@@ -5407,7 +5407,7 @@
5407
5407
  };
5408
5408
  })(n.value.recaptchaV3Key).execute("social"));
5409
5409
  const g = {
5410
- comment: C.value,
5410
+ comment: $.value,
5411
5411
  nick: i.value.nick,
5412
5412
  mail: i.value.mail,
5413
5413
  link: i.value.link,
@@ -5418,13 +5418,23 @@
5418
5418
  if ((_l$value2 = l.value) !== null && _l$value2 !== void 0 && _l$value2.token) g.nick = l.value.display_name, g.mail = l.value.email, g.link = l.value.url;else {
5419
5419
  var _o$value$nick, _o$value$mail, _s$value;
5420
5420
  if ("force" === u) return;
5421
- if (d.indexOf("nick") > -1 && !g.nick) return (_o$value$nick = o.value.nick) !== null && _o$value$nick !== void 0 && _o$value$nick.focus(), alert(I.value.nickError);
5422
- if (d.indexOf("mail") > -1 && !g.mail || g.mail && !/^\w(?:[\w._-]*\w)?@(?:\w(?:[\w-]*\w)?\.)*\w+$/.exec(g.mail)) return (_o$value$mail = o.value.mail) !== null && _o$value$mail !== void 0 && _o$value$mail.focus(), alert(I.value.mailError);
5421
+ if (d.indexOf("nick") > -1 && !g.nick) return (_o$value$nick = o.value.nick) !== null && _o$value$nick !== void 0 && _o$value$nick.focus(), alert(E.value.nickError);
5422
+ if (d.indexOf("mail") > -1 && !g.mail || g.mail && !/^\w(?:[\w._-]*\w)?@(?:\w(?:[\w-]*\w)?\.)*\w+$/.exec(g.mail)) return (_o$value$mail = o.value.mail) !== null && _o$value$mail !== void 0 && _o$value$mail.focus(), alert(E.value.mailError);
5423
5423
  if (!g.comment) return void ((_s$value = s.value) === null || _s$value === void 0 ? void 0 : _s$value.focus());
5424
- g.nick || (g.nick = I.value.anonymous);
5424
+ g.nick || (g.nick = E.value.anonymous);
5425
5425
  }
5426
- if (!_.value) return alert(I.value.wordHint.replace("$0", p[0].toString()).replace("$1", p[1].toString()).replace("$2", b.value.toString()));
5427
- g.comment = zo(g.comment, f.value.map), e.replyId && e.rootId ? (g.pid = e.replyId, g.rid = e.rootId, g.at = e.replyUser) : e.edit && (g.eid = e.edit.objectId), S.value = !0, (_ref40 => {
5426
+ if (!C.value) return alert(E.value.wordHint.replace("$0", p[0].toString()).replace("$1", p[1].toString()).replace("$2", b.value.toString()));
5427
+ g.comment = zo(g.comment, f.value.map), e.replyId && e.rootId && (g.pid = e.replyId, g.rid = e.rootId, g.at = e.replyUser), I.value = !0;
5428
+ const m = {
5429
+ serverURL: a,
5430
+ lang: c,
5431
+ token: (_l$value3 = l.value) === null || _l$value3 === void 0 ? void 0 : _l$value3.token,
5432
+ comment: g
5433
+ };
5434
+ (e.edit ? _({
5435
+ objectId: e.edit.objectId,
5436
+ ...m
5437
+ }) : (_ref40 => {
5428
5438
  let {
5429
5439
  serverURL: e,
5430
5440
  lang: t,
@@ -5434,28 +5444,23 @@
5434
5444
  const i = {
5435
5445
  "Content-Type": "application/json"
5436
5446
  };
5437
- return n && (i.Authorization = `Bearer ${n}`), fetch(`${e}/comment${r.eid ? `/${r.eid}` : ""}?lang=${t}`, {
5438
- method: "PUT",
5447
+ return n && (i.Authorization = `Bearer ${n}`), fetch(`${e}/comment?lang=${t}`, {
5448
+ method: "POST",
5439
5449
  headers: i,
5440
5450
  body: JSON.stringify(r)
5441
5451
  }).then(e => e.json());
5442
- })({
5443
- serverURL: a,
5444
- lang: c,
5445
- token: (_l$value3 = l.value) === null || _l$value3 === void 0 ? void 0 : _l$value3.token,
5446
- comment: g
5447
- }).then(n => {
5452
+ })(m)).then(n => {
5448
5453
  var _e$edit;
5449
- if (S.value = !1, n.errmsg) return alert(n.errmsg);
5454
+ if (I.value = !1, n.errmsg) return alert(n.errmsg);
5450
5455
  t("submit", n.data), r.value = "", w.value = "", e.replyId && t("cancel-reply"), ((_e$edit = e.edit) === null || _e$edit === void 0 ? void 0 : _e$edit.objectId) && t("cancel-edit");
5451
5456
  }).catch(e => {
5452
- S.value = !1, alert(e.message);
5457
+ I.value = !1, alert(e.message);
5453
5458
  });
5454
5459
  },
5455
- O = e => {
5460
+ j = e => {
5456
5461
  c.value.contains(e.target) || u.value.contains(e.target) || (m.value = !1), p.value.contains(e.target) || d.value.contains(e.target) || (v.value = !1);
5457
5462
  },
5458
- j = async e => {
5463
+ T = async e => {
5459
5464
  var _h$value;
5460
5465
  const {
5461
5466
  scrollTop: t,
@@ -5469,19 +5474,19 @@
5469
5474
  e.target.scrollTop = t;
5470
5475
  }, 50));
5471
5476
  },
5472
- T = Qi(e => {
5473
- k.list = [], j(e);
5477
+ P = Qi(e => {
5478
+ k.list = [], T(e);
5474
5479
  }, 300);
5475
5480
  Mn([n, b], _ref41 => {
5476
5481
  let [e, t] = _ref41;
5477
5482
  const {
5478
5483
  wordLimit: n
5479
5484
  } = e;
5480
- n ? t < n[0] && 0 !== n[0] ? (x.value = n[0], _.value = !1) : t > n[1] ? (x.value = n[1], _.value = !1) : (x.value = n[1], _.value = !0) : (x.value = 0, _.value = !0);
5485
+ n ? t < n[0] && 0 !== n[0] ? (x.value = n[0], C.value = !1) : t > n[1] ? (x.value = n[1], C.value = !1) : (x.value = n[1], C.value = !0) : (x.value = 0, C.value = !0);
5481
5486
  }, {
5482
5487
  immediate: !0
5483
5488
  });
5484
- const P = _ref42 => {
5489
+ const U = _ref42 => {
5485
5490
  let {
5486
5491
  data: e
5487
5492
  } = _ref42;
@@ -5492,7 +5497,7 @@
5492
5497
  };
5493
5498
  return Hn(() => {
5494
5499
  var _e$edit2;
5495
- document.body.addEventListener("click", O), window.addEventListener("message", P), (_e$edit2 = e.edit) !== null && _e$edit2 !== void 0 && _e$edit2.objectId && (r.value = e.edit.orig), Mn(v, async e => {
5500
+ document.body.addEventListener("click", j), window.addEventListener("message", U), (_e$edit2 = e.edit) !== null && _e$edit2 !== void 0 && _e$edit2.objectId && (r.value = e.edit.orig), Mn(v, async e => {
5496
5501
  if (!e) return;
5497
5502
  const t = n.value.search;
5498
5503
  h.value && (h.value.value = ""), k.loading = !0, k.list = t.default ? await t.default() : await t.search(""), k.loading = !1;
@@ -5501,7 +5506,7 @@
5501
5506
  highlighter: t,
5502
5507
  texRenderer: r
5503
5508
  } = n.value;
5504
- C.value = e, w.value = Oo(e, {
5509
+ $.value = e, w.value = Oo(e, {
5505
5510
  emojiMap: f.value.map,
5506
5511
  highlighter: t,
5507
5512
  texRenderer: r
@@ -5509,7 +5514,7 @@
5509
5514
  }, {
5510
5515
  immediate: !0
5511
5516
  }), Mn(() => n.value.emoji, e => {
5512
- return (t = Array.isArray(e) ? e : [], Promise.all(t.map(e => "string" == typeof e ? Ml($(e)) : Promise.resolve(e))).then(e => {
5517
+ return (t = Array.isArray(e) ? e : [], Promise.all(t.map(e => "string" == typeof e ? Ml(S(e)) : Promise.resolve(e))).then(e => {
5513
5518
  const t = {
5514
5519
  tabs: [],
5515
5520
  map: {}
@@ -5540,14 +5545,14 @@
5540
5545
  immediate: !0
5541
5546
  });
5542
5547
  }), qn(() => {
5543
- document.body.removeEventListener("click", O), window.removeEventListener("message", P);
5548
+ document.body.removeEventListener("click", j), window.removeEventListener("message", U);
5544
5549
  }), {
5545
5550
  config: n,
5546
- locale: I,
5547
- insert: L,
5551
+ locale: E,
5552
+ insert: A,
5548
5553
  onChange: () => {
5549
5554
  const e = a.value;
5550
- e.files && E.value && A(e.files[0]).then(() => {
5555
+ e.files && L.value && z(e.files[0]).then(() => {
5551
5556
  e.value = "";
5552
5557
  });
5553
5558
  },
@@ -5555,17 +5560,17 @@
5555
5560
  var _e$dataTransfer;
5556
5561
  if ((_e$dataTransfer = e.dataTransfer) !== null && _e$dataTransfer !== void 0 && _e$dataTransfer.items) {
5557
5562
  const t = Bl(e.dataTransfer.items);
5558
- t && E.value && (A(t), e.preventDefault());
5563
+ t && L.value && (z(t), e.preventDefault());
5559
5564
  }
5560
5565
  },
5561
5566
  onKeyDown: e => {
5562
5567
  const t = e.key;
5563
- (e.ctrlKey || e.metaKey) && "Enter" === t && z();
5568
+ (e.ctrlKey || e.metaKey) && "Enter" === t && O();
5564
5569
  },
5565
5570
  onPaste: e => {
5566
5571
  if (e.clipboardData) {
5567
5572
  const t = Bl(e.clipboardData.items);
5568
- t && E.value && A(t);
5573
+ t && L.value && z(t);
5569
5574
  }
5570
5575
  },
5571
5576
  onLogin: e => {
@@ -5622,15 +5627,15 @@
5622
5627
  data: l.value.token
5623
5628
  }, "*");
5624
5629
  },
5625
- submitComment: z,
5626
- onImageWallScroll: j,
5627
- onGifSearch: T,
5630
+ submitComment: O,
5631
+ onImageWallScroll: T,
5632
+ onGifSearch: P,
5628
5633
  isLogin: R,
5629
5634
  userInfo: l,
5630
- isSubmitting: S,
5635
+ isSubmitting: I,
5631
5636
  wordNumber: b,
5632
5637
  wordLimit: x,
5633
- isWordNumberLegal: _,
5638
+ isWordNumberLegal: C,
5634
5639
  editor: r,
5635
5640
  userMeta: i,
5636
5641
  emoji: f,
@@ -5638,7 +5643,7 @@
5638
5643
  showEmoji: m,
5639
5644
  gifData: k,
5640
5645
  showGif: v,
5641
- canUploadImage: E,
5646
+ canUploadImage: L,
5642
5647
  previewText: w,
5643
5648
  showPreview: y,
5644
5649
  inputRefs: o,
@@ -5662,11 +5667,11 @@
5662
5667
  Cs = {
5663
5668
  class: "wl-avatar"
5664
5669
  },
5665
- $s = ["title"],
5666
5670
  Ss = ["title"],
5671
+ $s = ["title"],
5667
5672
  Is = ["src"],
5668
- Rs = ["title", "textContent"],
5669
- Es = {
5673
+ Es = ["title", "textContent"],
5674
+ Rs = {
5670
5675
  class: "wl-panel"
5671
5676
  },
5672
5677
  Ls = ["for", "textContent"],
@@ -5743,7 +5748,7 @@
5743
5748
  })
5744
5749
  }, [Vr(o, {
5745
5750
  size: 14
5746
- })], 8, $s), Dr("a", {
5751
+ })], 8, Ss), Dr("a", {
5747
5752
  href: "#",
5748
5753
  class: "wl-login-nick",
5749
5754
  "aria-label": "Profile",
@@ -5754,7 +5759,7 @@
5754
5759
  }, [Dr("img", {
5755
5760
  src: e.userInfo.avatar,
5756
5761
  alt: "avatar"
5757
- }, null, 8, Is)], 8, Ss)]), Dr("a", {
5762
+ }, null, 8, Is)], 8, $s)]), Dr("a", {
5758
5763
  href: "#",
5759
5764
  class: "wl-login-nick",
5760
5765
  "aria-label": "Profile",
@@ -5763,7 +5768,7 @@
5763
5768
  return e.onProfile && e.onProfile(...arguments);
5764
5769
  }),
5765
5770
  textContent: H(e.userInfo.display_name)
5766
- }, null, 8, Rs)])) : Wr("v-if", !0), Dr("div", Es, ["force" !== e.config.login && e.config.meta.length && !e.isLogin ? (Lr(), jr("div", {
5771
+ }, null, 8, Es)])) : Wr("v-if", !0), Dr("div", Rs, ["force" !== e.config.login && e.config.meta.length && !e.isLogin ? (Lr(), jr("div", {
5767
5772
  key: 0,
5768
5773
  class: N(["wl-header", `item${e.config.meta.length}`])
5769
5774
  }, [(Lr(!0), jr(Cr, null, Yn(e.config.meta, t => (Lr(), jr("div", {
@@ -5797,13 +5802,13 @@
5797
5802
  onPaste: t[6] || (t[6] = function () {
5798
5803
  return e.onPaste && e.onPaste(...arguments);
5799
5804
  })
5800
- }, null, 40, zs), [[Ri, e.editor]]), Zn(Dr("div", Os, [js, Dr("h4", null, H(e.locale.preview) + ":", 1), Wr(" eslint-disable-next-line vue/no-v-html "), Dr("div", {
5805
+ }, null, 40, zs), [[Ei, e.editor]]), Zn(Dr("div", Os, [js, Dr("h4", null, H(e.locale.preview) + ":", 1), Wr(" eslint-disable-next-line vue/no-v-html "), Dr("div", {
5801
5806
  class: "wl-content",
5802
5807
  innerHTML: e.previewText
5803
5808
  }, null, 8, Ts)], 512), [[Mi, e.showPreview]]), Dr("div", Ps, [Dr("div", Us, [Dr("a", Ms, [Vr(s)]), Zn(Dr("button", {
5804
5809
  ref: "emojiButtonRef",
5805
5810
  class: N(["wl-action", {
5806
- actived: e.showEmoji
5811
+ active: e.showEmoji
5807
5812
  }]),
5808
5813
  title: e.locale.emoji,
5809
5814
  onClick: t[7] || (t[7] = t => e.showEmoji = !e.showEmoji)
@@ -5811,7 +5816,7 @@
5811
5816
  key: 0,
5812
5817
  ref: "gifButtonRef",
5813
5818
  class: N(["wl-action", {
5814
- actived: e.showGif
5819
+ active: e.showGif
5815
5820
  }]),
5816
5821
  title: e.locale.gif,
5817
5822
  onClick: t[8] || (t[8] = t => e.showGif = !e.showGif)
@@ -5831,7 +5836,7 @@
5831
5836
  title: e.locale.uploadImage
5832
5837
  }, [Vr(u)], 8, Ds)) : Wr("v-if", !0), Dr("button", {
5833
5838
  class: N(["wl-action", {
5834
- actived: e.showPreview
5839
+ active: e.showPreview
5835
5840
  }]),
5836
5841
  title: e.locale.preview,
5837
5842
  onClick: t[10] || (t[10] = t => e.showPreview = !e.showPreview)
@@ -5999,7 +6004,7 @@
5999
6004
  const {
6000
6005
  link: t
6001
6006
  } = e.comment;
6002
- return t ? S(t) ? t : `https://${t}` : "";
6007
+ return t ? $(t) ? t : `https://${t}` : "";
6003
6008
  }),
6004
6009
  o = oi(() => n.value.includes(e.comment.objectId)),
6005
6010
  s = ((e, t) => {
@@ -6063,14 +6068,14 @@
6063
6068
  "aria-hidden": "true"
6064
6069
  },
6065
6070
  Ca = ["data-value", "textContent"],
6066
- $a = ["data-value", "textContent"],
6067
6071
  Sa = ["data-value", "textContent"],
6072
+ $a = ["data-value", "textContent"],
6068
6073
  Ia = ["innerHTML"],
6069
- Ra = {
6074
+ Ea = {
6070
6075
  key: 1,
6071
6076
  class: "wl-admin-actions"
6072
6077
  },
6073
- Ea = {
6078
+ Ra = {
6074
6079
  class: "wl-comment-status"
6075
6080
  },
6076
6081
  La = ["disabled", "onClick", "textContent"],
@@ -6078,150 +6083,147 @@
6078
6083
  key: 3,
6079
6084
  class: "wl-quote"
6080
6085
  };
6081
- const za = [{
6082
- key: "insertedAt_desc",
6083
- name: "latest"
6084
- }, {
6085
- key: "insertedAt_asc",
6086
- name: "oldest"
6087
- }, {
6088
- key: "like_desc",
6089
- name: "hottest"
6090
- }];
6091
- var Oa = Dn({
6086
+ var za = es(oa, [["render", function (e, t, n, r, i, l) {
6087
+ var _e$reply2;
6088
+ const o = Kn("VerifiedIcon"),
6089
+ s = Kn("EditIcon"),
6090
+ a = Kn("DeleteIcon"),
6091
+ c = Kn("LikeIcon"),
6092
+ u = Kn("ReplyIcon"),
6093
+ p = Kn("CommentBox"),
6094
+ d = Kn("CommentCard", !0);
6095
+ return Lr(), jr("div", {
6096
+ id: e.comment.objectId,
6097
+ class: "wl-item"
6098
+ }, [Dr("div", aa, [e.comment.avatar ? (Lr(), jr("img", {
6099
+ key: 0,
6100
+ src: e.comment.avatar
6101
+ }, null, 8, ca)) : Wr("v-if", !0), e.comment.type ? (Lr(), Tr(o, {
6102
+ key: 1
6103
+ })) : Wr("v-if", !0)]), Dr("div", ua, [Dr("div", pa, [e.link ? (Lr(), jr("a", {
6104
+ key: 0,
6105
+ class: "wl-nick",
6106
+ href: e.link,
6107
+ target: "_blank",
6108
+ rel: "nofollow noreferrer"
6109
+ }, H(e.comment.nick), 9, da)) : (Lr(), jr("span", ha, H(e.comment.nick), 1)), "administrator" === e.comment.type ? (Lr(), jr("span", {
6110
+ key: 2,
6111
+ class: "wl-badge",
6112
+ textContent: H(e.locale.admin)
6113
+ }, null, 8, fa)) : Wr("v-if", !0), e.comment.label ? (Lr(), jr("span", {
6114
+ key: 3,
6115
+ class: "wl-badge",
6116
+ textContent: H(e.comment.label)
6117
+ }, null, 8, ga)) : Wr("v-if", !0), e.comment.sticky ? (Lr(), jr("span", {
6118
+ key: 4,
6119
+ class: "wl-badge",
6120
+ textContent: H(e.locale.sticky)
6121
+ }, null, 8, ma)) : Wr("v-if", !0), void 0 !== e.comment.level && e.comment.level >= 0 ? (Lr(), jr("span", {
6122
+ key: 5,
6123
+ class: N(`wl-badge level${e.comment.level}`),
6124
+ textContent: H(e.locale[`level${e.comment.level}`] || `Level ${e.comment.level}`)
6125
+ }, null, 10, va)) : Wr("v-if", !0), Dr("span", {
6126
+ class: "wl-time",
6127
+ textContent: H(e.time)
6128
+ }, null, 8, ya), Dr("div", wa, [e.isAdmin || e.isOwner ? (Lr(), jr("button", {
6129
+ key: 0,
6130
+ class: "wl-edit",
6131
+ onClick: t[0] || (t[0] = t => e.$emit("edit", e.comment))
6132
+ }, [Vr(s)])) : Wr("v-if", !0), e.isAdmin || e.isOwner ? (Lr(), jr("button", {
6133
+ key: 1,
6134
+ class: "wl-delete",
6135
+ onClick: t[1] || (t[1] = t => e.$emit("delete", e.comment))
6136
+ }, [Vr(a)])) : Wr("v-if", !0), Dr("button", {
6137
+ class: "wl-like",
6138
+ title: e.like ? e.locale.cancelLike : e.locale.like,
6139
+ onClick: t[2] || (t[2] = t => e.$emit("like", e.comment))
6140
+ }, [Vr(c, {
6141
+ active: e.like
6142
+ }, null, 8, ["active"]), "like" in e.comment ? (Lr(), jr("span", {
6143
+ key: 0,
6144
+ textContent: H(e.comment.like)
6145
+ }, null, 8, ka)) : Wr("v-if", !0)], 8, ba), Dr("button", {
6146
+ class: N(["wl-reply", {
6147
+ active: e.isReplyingCurrent
6148
+ }]),
6149
+ title: e.isReplyingCurrent ? e.locale.cancelReply : e.locale.reply,
6150
+ onClick: t[3] || (t[3] = t => e.$emit("reply", e.isReplyingCurrent ? null : e.comment))
6151
+ }, [Vr(u)], 10, xa)])]), Dr("div", _a, [e.comment.addr ? (Lr(), jr("span", {
6152
+ key: 0,
6153
+ class: "wl-addr",
6154
+ "data-value": e.comment.addr,
6155
+ textContent: H(e.comment.addr)
6156
+ }, null, 8, Ca)) : Wr("v-if", !0), e.comment.browser ? (Lr(), jr("span", {
6157
+ key: 1,
6158
+ class: "wl-browser",
6159
+ "data-value": e.comment.browser,
6160
+ textContent: H(e.comment.browser)
6161
+ }, null, 8, Sa)) : Wr("v-if", !0), e.comment.os ? (Lr(), jr("span", {
6162
+ key: 2,
6163
+ class: "wl-os",
6164
+ "data-value": e.comment.os,
6165
+ textContent: H(e.comment.os)
6166
+ }, null, 8, $a)) : Wr("v-if", !0)]), Wr(" eslint-disable vue/no-v-html "), e.isEditingCurrent ? Wr("v-if", !0) : (Lr(), jr("div", {
6167
+ key: 0,
6168
+ class: "wl-content",
6169
+ innerHTML: e.comment.comment
6170
+ }, null, 8, Ia)), Wr(" eslint-enable vue/no-v-html "), e.isAdmin && !e.isEditingCurrent ? (Lr(), jr("div", Ea, [Dr("span", Ra, [(Lr(!0), jr(Cr, null, Yn(e.commentStatus, t => (Lr(), jr("button", {
6171
+ key: t,
6172
+ class: N(`wl-btn wl-${t}`),
6173
+ disabled: e.comment.status === t,
6174
+ onClick: n => e.$emit("status", {
6175
+ status: t,
6176
+ comment: e.comment
6177
+ }),
6178
+ textContent: H(e.locale[t])
6179
+ }, null, 10, La))), 128))]), e.isAdmin && !e.comment.rid ? (Lr(), jr("button", {
6180
+ key: 0,
6181
+ class: "wl-btn wl-sticky",
6182
+ onClick: t[4] || (t[4] = t => e.$emit("sticky", e.comment))
6183
+ }, H(e.comment.sticky ? e.locale.unsticky : e.locale.sticky), 1)) : Wr("v-if", !0)])) : Wr("v-if", !0), e.isReplyingCurrent || e.isEditingCurrent ? (Lr(), jr("div", {
6184
+ key: 2,
6185
+ class: N({
6186
+ "wl-reply-wrapper": e.isReplyingCurrent,
6187
+ "wl-edit-wrapper": e.isEditingCurrent
6188
+ })
6189
+ }, [Vr(p, {
6190
+ edit: e.edit,
6191
+ "reply-id": (_e$reply2 = e.reply) === null || _e$reply2 === void 0 ? void 0 : _e$reply2.objectId,
6192
+ "reply-user": e.comment.nick,
6193
+ "root-id": e.rootId,
6194
+ onSubmit: t[5] || (t[5] = t => e.$emit("submit", t)),
6195
+ onCancelReply: t[6] || (t[6] = t => e.$emit("reply", null)),
6196
+ onCancelEdit: t[7] || (t[7] = t => e.$emit("edit", null))
6197
+ }, null, 8, ["edit", "reply-id", "reply-user", "root-id"])], 2)) : Wr("v-if", !0), e.comment.children ? (Lr(), jr("div", Aa, [(Lr(!0), jr(Cr, null, Yn(e.comment.children, n => (Lr(), Tr(d, {
6198
+ key: n.objectId,
6199
+ comment: n,
6200
+ reply: e.reply,
6201
+ edit: e.edit,
6202
+ "root-id": e.rootId,
6203
+ onReply: t[8] || (t[8] = t => e.$emit("reply", t)),
6204
+ onSubmit: t[9] || (t[9] = t => e.$emit("submit", t)),
6205
+ onLike: t[10] || (t[10] = t => e.$emit("like", t)),
6206
+ onEdit: t[11] || (t[11] = t => e.$emit("edit", t)),
6207
+ onDelete: t[12] || (t[12] = t => e.$emit("delete", t)),
6208
+ onStatus: t[13] || (t[13] = t => e.$emit("status", t)),
6209
+ onSticky: t[14] || (t[14] = t => e.$emit("sticky", t))
6210
+ }, null, 8, ["comment", "reply", "edit", "root-id"]))), 128))])) : Wr("v-if", !0)])], 8, sa);
6211
+ }], ["__file", "CommentCard.vue"]]);
6212
+ const Oa = {
6213
+ latest: "insertedAt_desc",
6214
+ oldest: "insertedAt_asc",
6215
+ hottest: "like_desc"
6216
+ },
6217
+ ja = Object.keys(Oa);
6218
+ var Ta = Dn({
6092
6219
  name: "WalineRoot",
6093
6220
  components: {
6094
6221
  Reaction: us,
6095
6222
  CommentBox: ia,
6096
- CommentCard: es(oa, [["render", function (e, t, n, r, i, l) {
6097
- var _e$reply2;
6098
- const o = Kn("VerifiedIcon"),
6099
- s = Kn("EditIcon"),
6100
- a = Kn("DeleteIcon"),
6101
- c = Kn("LikeIcon"),
6102
- u = Kn("ReplyIcon"),
6103
- p = Kn("CommentBox"),
6104
- d = Kn("CommentCard", !0);
6105
- return Lr(), jr("div", {
6106
- id: e.comment.objectId,
6107
- class: "wl-item"
6108
- }, [Dr("div", aa, [e.comment.avatar ? (Lr(), jr("img", {
6109
- key: 0,
6110
- src: e.comment.avatar
6111
- }, null, 8, ca)) : Wr("v-if", !0), e.comment.type ? (Lr(), Tr(o, {
6112
- key: 1
6113
- })) : Wr("v-if", !0)]), Dr("div", ua, [Dr("div", pa, [e.link ? (Lr(), jr("a", {
6114
- key: 0,
6115
- class: "wl-nick",
6116
- href: e.link,
6117
- target: "_blank",
6118
- rel: "nofollow noreferrer"
6119
- }, H(e.comment.nick), 9, da)) : (Lr(), jr("span", ha, H(e.comment.nick), 1)), "administrator" === e.comment.type ? (Lr(), jr("span", {
6120
- key: 2,
6121
- class: "wl-badge",
6122
- textContent: H(e.locale.admin)
6123
- }, null, 8, fa)) : Wr("v-if", !0), e.comment.label ? (Lr(), jr("span", {
6124
- key: 3,
6125
- class: "wl-badge",
6126
- textContent: H(e.comment.label)
6127
- }, null, 8, ga)) : Wr("v-if", !0), e.comment.sticky ? (Lr(), jr("span", {
6128
- key: 4,
6129
- class: "wl-badge",
6130
- textContent: H(e.locale.sticky)
6131
- }, null, 8, ma)) : Wr("v-if", !0), void 0 !== e.comment.level && e.comment.level >= 0 ? (Lr(), jr("span", {
6132
- key: 5,
6133
- class: N(`wl-badge level${e.comment.level}`),
6134
- textContent: H(e.locale[`level${e.comment.level}`] || `Level ${e.comment.level}`)
6135
- }, null, 10, va)) : Wr("v-if", !0), Dr("span", {
6136
- class: "wl-time",
6137
- textContent: H(e.time)
6138
- }, null, 8, ya), Dr("div", wa, [e.isAdmin || e.isOwner ? (Lr(), jr("button", {
6139
- key: 0,
6140
- class: "wl-edit",
6141
- onClick: t[0] || (t[0] = t => e.$emit("edit", e.comment))
6142
- }, [Vr(s)])) : Wr("v-if", !0), e.isAdmin || e.isOwner ? (Lr(), jr("button", {
6143
- key: 1,
6144
- class: "wl-delete",
6145
- onClick: t[1] || (t[1] = t => e.$emit("delete", e.comment))
6146
- }, [Vr(a)])) : Wr("v-if", !0), Dr("button", {
6147
- class: "wl-like",
6148
- title: e.like ? e.locale.cancelLike : e.locale.like,
6149
- onClick: t[2] || (t[2] = t => e.$emit("like", e.comment))
6150
- }, [Vr(c, {
6151
- active: e.like
6152
- }, null, 8, ["active"]), "like" in e.comment ? (Lr(), jr("span", {
6153
- key: 0,
6154
- textContent: H(e.comment.like)
6155
- }, null, 8, ka)) : Wr("v-if", !0)], 8, ba), Dr("button", {
6156
- class: N(["wl-reply", {
6157
- active: e.isReplyingCurrent
6158
- }]),
6159
- title: e.isReplyingCurrent ? e.locale.cancelReply : e.locale.reply,
6160
- onClick: t[3] || (t[3] = t => e.$emit("reply", e.isReplyingCurrent ? null : e.comment))
6161
- }, [Vr(u)], 10, xa)])]), Dr("div", _a, [e.comment.addr ? (Lr(), jr("span", {
6162
- key: 0,
6163
- class: "wl-addr",
6164
- "data-value": e.comment.addr,
6165
- textContent: H(e.comment.addr)
6166
- }, null, 8, Ca)) : Wr("v-if", !0), e.comment.browser ? (Lr(), jr("span", {
6167
- key: 1,
6168
- class: "wl-browser",
6169
- "data-value": e.comment.browser,
6170
- textContent: H(e.comment.browser)
6171
- }, null, 8, $a)) : Wr("v-if", !0), e.comment.os ? (Lr(), jr("span", {
6172
- key: 2,
6173
- class: "wl-os",
6174
- "data-value": e.comment.os,
6175
- textContent: H(e.comment.os)
6176
- }, null, 8, Sa)) : Wr("v-if", !0)]), Wr(" eslint-disable vue/no-v-html "), e.isEditingCurrent ? Wr("v-if", !0) : (Lr(), jr("div", {
6177
- key: 0,
6178
- class: "wl-content",
6179
- innerHTML: e.comment.comment
6180
- }, null, 8, Ia)), Wr(" eslint-enable vue/no-v-html "), e.isAdmin && !e.isEditingCurrent ? (Lr(), jr("div", Ra, [Dr("span", Ea, [(Lr(!0), jr(Cr, null, Yn(e.commentStatus, t => (Lr(), jr("button", {
6181
- key: t,
6182
- class: N(`wl-btn wl-${t}`),
6183
- disabled: e.comment.status === t,
6184
- onClick: n => e.$emit("status", {
6185
- status: t,
6186
- comment: e.comment
6187
- }),
6188
- textContent: H(e.locale[t])
6189
- }, null, 10, La))), 128))]), e.isAdmin && !e.comment.rid ? (Lr(), jr("button", {
6190
- key: 0,
6191
- class: "wl-btn wl-sticky",
6192
- onClick: t[4] || (t[4] = t => e.$emit("sticky", e.comment))
6193
- }, H(e.comment.sticky ? e.locale.unsticky : e.locale.sticky), 1)) : Wr("v-if", !0)])) : Wr("v-if", !0), e.isReplyingCurrent || e.isEditingCurrent ? (Lr(), jr("div", {
6194
- key: 2,
6195
- class: N({
6196
- "wl-reply-wrapper": e.isReplyingCurrent,
6197
- "wl-edit-wrapper": e.isEditingCurrent
6198
- })
6199
- }, [Vr(p, {
6200
- edit: e.edit,
6201
- "reply-id": (_e$reply2 = e.reply) === null || _e$reply2 === void 0 ? void 0 : _e$reply2.objectId,
6202
- "reply-user": e.comment.nick,
6203
- "root-id": e.rootId,
6204
- onSubmit: t[5] || (t[5] = t => e.$emit("submit", t)),
6205
- onCancelReply: t[6] || (t[6] = t => e.$emit("reply", null)),
6206
- onCancelEdit: t[7] || (t[7] = t => e.$emit("edit", null))
6207
- }, null, 8, ["edit", "reply-id", "reply-user", "root-id"])], 2)) : Wr("v-if", !0), e.comment.children ? (Lr(), jr("div", Aa, [(Lr(!0), jr(Cr, null, Yn(e.comment.children, n => (Lr(), Tr(d, {
6208
- key: n.objectId,
6209
- comment: n,
6210
- reply: e.reply,
6211
- edit: e.edit,
6212
- "root-id": e.rootId,
6213
- onReply: t[8] || (t[8] = t => e.$emit("reply", t)),
6214
- onSubmit: t[9] || (t[9] = t => e.$emit("submit", t)),
6215
- onLike: t[10] || (t[10] = t => e.$emit("like", t)),
6216
- onEdit: t[11] || (t[11] = t => e.$emit("edit", t)),
6217
- onDelete: t[12] || (t[12] = t => e.$emit("delete", t)),
6218
- onStatus: t[13] || (t[13] = t => e.$emit("status", t)),
6219
- onSticky: t[14] || (t[14] = t => e.$emit("sticky", t))
6220
- }, null, 8, ["comment", "reply", "edit", "root-id"]))), 128))])) : Wr("v-if", !0)])], 8, sa);
6221
- }], ["__file", "CommentCard.vue"]]),
6223
+ CommentCard: za,
6222
6224
  LoadingIcon: vs
6223
6225
  },
6224
- props: ["serverURL", "path", "meta", "requiredMeta", "dark", "lang", "locale", "pageSize", "wordLimit", "emoji", "login", "highlighter", "texRenderer", "imageUploader", "search", "copyright", "recaptchaV3Key", "reaction"],
6226
+ props: ["serverURL", "path", "meta", "requiredMeta", "dark", "commentSorting", "lang", "locale", "pageSize", "wordLimit", "emoji", "login", "highlighter", "texRenderer", "imageUploader", "search", "copyright", "recaptchaV3Key", "reaction"],
6225
6227
  setup(e) {
6226
6228
  const o = e,
6227
6229
  s = oi(() => (_ref46 => {
@@ -6243,8 +6245,9 @@
6243
6245
  login: k = "enable",
6244
6246
  search: x,
6245
6247
  reaction: _,
6246
- recaptchaV3Key: $ = "",
6247
- ...S
6248
+ recaptchaV3Key: S = "",
6249
+ commentSorting: $ = "latest",
6250
+ ...L
6248
6251
  } = _ref46;
6249
6252
  return {
6250
6253
  serverURL: I(e),
@@ -6253,12 +6256,12 @@
6253
6256
  ...(y[s] || y["zh-CN"]),
6254
6257
  ...("object" == typeof a ? a : {})
6255
6258
  },
6256
- wordLimit: R(g),
6259
+ wordLimit: E(g),
6257
6260
  meta: t(p),
6258
6261
  requiredMeta: t(d),
6259
- imageUploader: E(m, n),
6260
- highlighter: E(v, c),
6261
- texRenderer: E(w, r),
6262
+ imageUploader: R(m, n),
6263
+ highlighter: R(v, c),
6264
+ texRenderer: R(w, r),
6262
6265
  lang: s,
6263
6266
  dark: h,
6264
6267
  emoji: u,
@@ -6266,9 +6269,10 @@
6266
6269
  login: k,
6267
6270
  copyright: b,
6268
6271
  search: x || i(s),
6269
- recaptchaV3Key: $,
6272
+ recaptchaV3Key: S,
6270
6273
  reaction: Array.isArray(_) ? _ : !0 === _ ? l : [],
6271
- ...S
6274
+ commentSorting: $,
6275
+ ...L
6272
6276
  };
6273
6277
  })(o)),
6274
6278
  a = Yo(),
@@ -6277,15 +6281,15 @@
6277
6281
  d = Kt(0),
6278
6282
  h = Kt(1),
6279
6283
  f = Kt(0),
6280
- g = Kt(za[0].key),
6284
+ g = Kt(s.value.commentSorting),
6281
6285
  m = Kt([]),
6282
6286
  v = Kt(null),
6283
- k = Kt(null),
6284
- x = oi(() => {
6287
+ w = Kt(null),
6288
+ k = oi(() => {
6285
6289
  return "string" == typeof (e = s.value.dark) ? "auto" === e ? `@media(prefers-color-scheme:dark){body${L}}` : `${e}${L}` : !0 === e ? `:root${L}` : "";
6286
6290
  var e;
6287
6291
  });
6288
- let $;
6292
+ let x;
6289
6293
  !function (e) {
6290
6294
  let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6291
6295
  const n = Kt(!1),
@@ -6310,16 +6314,16 @@
6310
6314
  r && n.value && (a(), r.head.removeChild(r.getElementById(o)), n.value = !1);
6311
6315
  };
6312
6316
  i && !l && Ji(c), l || Ki(u), Pt(n);
6313
- }(x);
6317
+ }(k);
6314
6318
  const S = e => {
6315
- var _$, _a$value;
6319
+ var _x, _a$value;
6316
6320
  const {
6317
6321
  serverURL: t,
6318
6322
  path: n,
6319
6323
  pageSize: r
6320
6324
  } = s.value,
6321
6325
  i = new AbortController();
6322
- p.value = "loading", (_$ = $) !== null && _$ !== void 0 && _$(), (_ref47 => {
6326
+ p.value = "loading", (_x = x) !== null && _x !== void 0 && _x(), (_ref47 => {
6323
6327
  let {
6324
6328
  serverURL: e,
6325
6329
  lang: t,
@@ -6334,13 +6338,13 @@
6334
6338
  return s && (a.Authorization = `Bearer ${s}`), fetch(`${e}/comment?path=${encodeURIComponent(n)}&pageSize=${i}&page=${r}&lang=${t}&sortBy=${l}`, {
6335
6339
  signal: o,
6336
6340
  headers: a
6337
- }).then(e => e.json()).then(e => b(e, "comment data"));
6341
+ }).then(e => e.json()).then(e => b(e, "Get comment data"));
6338
6342
  })({
6339
6343
  serverURL: t,
6340
6344
  lang: s.value.lang,
6341
6345
  path: n,
6342
6346
  pageSize: r,
6343
- sortBy: g.value,
6347
+ sortBy: Oa[g.value],
6344
6348
  page: e,
6345
6349
  signal: i.signal,
6346
6350
  token: (_a$value = a.value) === null || _a$value === void 0 ? void 0 : _a$value.token
@@ -6348,9 +6352,9 @@
6348
6352
  p.value = "success", d.value = t.count, m.value.push(...t.data), h.value = e, f.value = t.totalPages;
6349
6353
  }).catch(e => {
6350
6354
  "AbortError" !== e.name && (console.error(e.message), p.value = "error");
6351
- }), $ = i.abort.bind(i);
6355
+ }), x = i.abort.bind(i);
6352
6356
  },
6353
- A = () => {
6357
+ $ = () => {
6354
6358
  d.value = 0, m.value = [], S(1);
6355
6359
  };
6356
6360
  return function (e, t) {
@@ -6360,35 +6364,35 @@
6360
6364
  r === n && (n = Yr.provides = Object.create(r)), n[e] = t;
6361
6365
  }
6362
6366
  }("config", s), Hn(() => {
6363
- Mn(() => [o.serverURL, o.path], () => A(), {
6367
+ Mn(() => [o.serverURL, o.path], () => $(), {
6364
6368
  immediate: !0
6365
6369
  });
6366
6370
  }), qn(() => {
6367
- var _$2;
6368
- return (_$2 = $) === null || _$2 === void 0 ? void 0 : _$2();
6371
+ var _x2;
6372
+ return (_x2 = x) === null || _x2 === void 0 ? void 0 : _x2();
6369
6373
  }), {
6370
6374
  config: s,
6371
- darkmodeStyle: x,
6375
+ darkmodeStyle: k,
6372
6376
  i18n: oi(() => s.value.locale),
6373
6377
  status: p,
6374
6378
  count: d,
6375
6379
  page: h,
6376
6380
  totalPages: f,
6377
- sortBy: g,
6378
- sortByItems: za,
6381
+ commentSorting: g,
6382
+ sortingMethods: ja,
6379
6383
  data: m,
6380
6384
  reply: v,
6381
- edit: k,
6385
+ edit: w,
6382
6386
  loadMore: () => S(h.value + 1),
6383
- refresh: A,
6387
+ refresh: $,
6384
6388
  onSortByChange: e => {
6385
- g.value !== e && (g.value = e, A());
6389
+ g.value !== e && (g.value = e, $());
6386
6390
  },
6387
6391
  onReply: e => {
6388
6392
  v.value = e;
6389
6393
  },
6390
6394
  onSubmit: e => {
6391
- if (k.value) k.value.comment = e.comment, k.value.orig = e.orig;else if (e.rid) {
6395
+ if (w.value) w.value.comment = e.comment, w.value.orig = e.orig;else if (e.rid) {
6392
6396
  const t = m.value.find(_ref48 => {
6393
6397
  let {
6394
6398
  objectId: t
@@ -6440,7 +6444,7 @@
6440
6444
  headers: {
6441
6445
  Authorization: `Bearer ${n}`
6442
6446
  }
6443
- }).then(e => e.json());
6447
+ }).then(e => e.json()).then(e => b(e, "Delete comment"));
6444
6448
  })({
6445
6449
  serverURL: t,
6446
6450
  lang: n,
@@ -6464,6 +6468,7 @@
6464
6468
  }), e.sticky = !e.sticky;
6465
6469
  },
6466
6470
  onLike: async e => {
6471
+ var _a$value5;
6467
6472
  const {
6468
6473
  serverURL: t,
6469
6474
  lang: n
@@ -6472,91 +6477,78 @@
6472
6477
  objectId: r
6473
6478
  } = e,
6474
6479
  i = u.value.includes(r);
6475
- await (_ref52 => {
6476
- let {
6477
- serverURL: e,
6478
- lang: t,
6479
- objectId: n,
6480
- like: r
6481
- } = _ref52;
6482
- return fetch(`${e}/comment/${n}?lang=${t}`, {
6483
- method: "PUT",
6484
- headers: w,
6485
- body: JSON.stringify({
6486
- like: r
6487
- })
6488
- }).then(e => e.json());
6489
- })({
6480
+ await _({
6490
6481
  serverURL: t,
6491
6482
  lang: n,
6492
6483
  objectId: r,
6484
+ token: (_a$value5 = a.value) === null || _a$value5 === void 0 ? void 0 : _a$value5.token,
6493
6485
  like: !i
6494
6486
  }), i ? u.value = u.value.filter(e => e !== r) : (u.value = [...u.value, r], u.value.length > 50 && (u.value = u.value.slice(-50))), e.like = (e.like || 0) + (i ? -1 : 1);
6495
6487
  },
6496
6488
  onEdit: e => {
6497
- k.value = e;
6489
+ w.value = e;
6498
6490
  },
6499
- version: "2.13.1"
6491
+ version: "2.14.0"
6500
6492
  };
6501
6493
  }
6502
6494
  });
6503
- const ja = {
6495
+ const Pa = {
6504
6496
  "data-waline": ""
6505
6497
  },
6506
- Ta = {
6498
+ Ua = {
6507
6499
  class: "wl-meta-head"
6508
6500
  },
6509
- Pa = {
6501
+ Ma = {
6510
6502
  class: "wl-count"
6511
6503
  },
6512
- Ua = ["textContent"],
6513
- Ma = {
6504
+ Na = ["textContent"],
6505
+ Fa = {
6514
6506
  class: "wl-sort"
6515
6507
  },
6516
- Na = ["onClick"],
6517
- Fa = {
6508
+ Da = ["onClick"],
6509
+ Va = {
6518
6510
  class: "wl-cards"
6519
6511
  },
6520
- Da = {
6512
+ Ba = {
6521
6513
  key: 1,
6522
6514
  class: "wl-operation"
6523
6515
  },
6524
- Va = ["textContent"],
6525
- Ba = {
6526
- key: 0,
6527
- class: "wl-loading"
6528
- },
6529
6516
  Ha = ["textContent"],
6530
6517
  Wa = {
6531
- class: "wl-operation"
6518
+ key: 0,
6519
+ class: "wl-loading"
6532
6520
  },
6533
6521
  qa = ["textContent"],
6534
6522
  Za = {
6523
+ class: "wl-operation"
6524
+ },
6525
+ Ga = ["textContent"],
6526
+ Ka = {
6535
6527
  key: 3,
6536
6528
  class: "wl-power"
6537
6529
  },
6538
- Ga = Dr("a", {
6530
+ Qa = Dr("a", {
6539
6531
  href: "https://github.com/walinejs/waline",
6540
6532
  target: "_blank",
6541
6533
  rel: "noreferrer"
6542
6534
  }, " Waline ", -1);
6543
- var Ka = es(Oa, [["render", function (e, t, n, r, i, l) {
6535
+ var Ja = es(Ta, [["render", function (e, t, n, r, i, l) {
6544
6536
  const o = Kn("Reaction"),
6545
6537
  s = Kn("CommentBox"),
6546
6538
  a = Kn("CommentCard"),
6547
6539
  c = Kn("LoadingIcon");
6548
- return Lr(), jr("div", ja, [Vr(o), e.reply ? Wr("v-if", !0) : (Lr(), Tr(s, {
6540
+ return Lr(), jr("div", Pa, [Vr(o), e.reply ? Wr("v-if", !0) : (Lr(), Tr(s, {
6549
6541
  key: 0,
6550
6542
  onSubmit: e.onSubmit
6551
- }, null, 8, ["onSubmit"])), Dr("div", Ta, [Dr("div", Pa, [e.count ? (Lr(), jr("span", {
6543
+ }, null, 8, ["onSubmit"])), Dr("div", Ua, [Dr("div", Ma, [e.count ? (Lr(), jr("span", {
6552
6544
  key: 0,
6553
6545
  class: "wl-num",
6554
6546
  textContent: H(e.count)
6555
- }, null, 8, Ua)) : Wr("v-if", !0), Hr(" " + H(e.i18n.comment), 1)]), Dr("ul", Ma, [(Lr(!0), jr(Cr, null, Yn(e.sortByItems, t => (Lr(), jr("li", {
6556
- key: t.key,
6557
- class: N([t.key === e.sortBy ? "active" : ""]),
6558
- onClick: n => e.onSortByChange(t.key)
6559
- }, H(e.i18n[t.name]), 11, Na))), 128))])]), Dr("div", Fa, [(Lr(!0), jr(Cr, null, Yn(e.data, t => (Lr(), Tr(a, {
6547
+ }, null, 8, Na)) : Wr("v-if", !0), Hr(" " + H(e.i18n.comment), 1)]), Dr("ul", Fa, [(Lr(!0), jr(Cr, null, Yn(e.sortingMethods, t => (Lr(), jr("li", {
6548
+ key: t,
6549
+ class: N([t === e.commentSorting ? "active" : ""]),
6550
+ onClick: n => e.onSortByChange(t)
6551
+ }, H(e.i18n[t]), 11, Da))), 128))])]), Dr("div", Va, [(Lr(!0), jr(Cr, null, Yn(e.data, t => (Lr(), Tr(a, {
6560
6552
  key: t.objectId,
6561
6553
  "root-id": t.objectId,
6562
6554
  comment: t,
@@ -6569,58 +6561,58 @@
6569
6561
  onDelete: e.onDelete,
6570
6562
  onSticky: e.onSticky,
6571
6563
  onLike: e.onLike
6572
- }, null, 8, ["root-id", "comment", "reply", "edit", "onReply", "onEdit", "onSubmit", "onStatus", "onDelete", "onSticky", "onLike"]))), 128))]), "error" === e.status ? (Lr(), jr("div", Da, [Dr("button", {
6564
+ }, null, 8, ["root-id", "comment", "reply", "edit", "onReply", "onEdit", "onSubmit", "onStatus", "onDelete", "onSticky", "onLike"]))), 128))]), "error" === e.status ? (Lr(), jr("div", Ba, [Dr("button", {
6573
6565
  type: "button",
6574
6566
  class: "wl-btn",
6575
6567
  onClick: t[0] || (t[0] = function () {
6576
6568
  return e.refresh && e.refresh(...arguments);
6577
6569
  }),
6578
6570
  textContent: H(e.i18n.refresh)
6579
- }, null, 8, Va)])) : (Lr(), jr(Cr, {
6571
+ }, null, 8, Ha)])) : (Lr(), jr(Cr, {
6580
6572
  key: 2
6581
- }, ["loading" === e.status ? (Lr(), jr("div", Ba, [Vr(c, {
6573
+ }, ["loading" === e.status ? (Lr(), jr("div", Wa, [Vr(c, {
6582
6574
  size: 30
6583
6575
  })])) : e.data.length ? e.page < e.totalPages ? (Lr(), jr(Cr, {
6584
6576
  key: 2
6585
- }, [Wr(" Load more button "), Dr("div", Wa, [Dr("button", {
6577
+ }, [Wr(" Load more button "), Dr("div", Za, [Dr("button", {
6586
6578
  type: "button",
6587
6579
  class: "wl-btn",
6588
6580
  onClick: t[1] || (t[1] = function () {
6589
6581
  return e.loadMore && e.loadMore(...arguments);
6590
6582
  }),
6591
6583
  textContent: H(e.i18n.more)
6592
- }, null, 8, qa)])], 2112)) : Wr("v-if", !0) : (Lr(), jr("div", {
6584
+ }, null, 8, Ga)])], 2112)) : Wr("v-if", !0) : (Lr(), jr("div", {
6593
6585
  key: 1,
6594
6586
  class: "wl-empty",
6595
6587
  textContent: H(e.i18n.sofa)
6596
- }, null, 8, Ha))], 64)), Wr(" Copyright Information "), e.config.copyright ? (Lr(), jr("div", Za, [Hr(" Powered by "), Ga, Hr(" v" + H(e.version), 1)])) : Wr("v-if", !0)]);
6588
+ }, null, 8, qa))], 64)), Wr(" Copyright Information "), e.config.copyright ? (Lr(), jr("div", Ka, [Hr(" Powered by "), Qa, Hr(" v" + H(e.version), 1)])) : Wr("v-if", !0)]);
6597
6589
  }], ["__file", "Waline.vue"]]);
6598
- const Qa = (e, t) => {
6590
+ const Ya = (e, t) => {
6599
6591
  t.forEach((t, n) => {
6600
6592
  t.innerText = e[n].toString();
6601
6593
  });
6602
6594
  },
6603
- Ja = _ref53 => {
6595
+ Xa = _ref52 => {
6604
6596
  let {
6605
6597
  serverURL: e,
6606
6598
  path: t = window.location.pathname,
6607
6599
  selector: n = ".waline-pageview-count",
6608
6600
  update: r = !0,
6609
6601
  lang: i = "zh-CN"
6610
- } = _ref53;
6602
+ } = _ref52;
6611
6603
  const l = new AbortController(),
6612
6604
  o = Array.from(document.querySelectorAll(n)),
6613
6605
  s = e => {
6614
6606
  const n = jo(e);
6615
6607
  return null !== n && t !== n;
6616
6608
  },
6617
- a = n => (_ref54 => {
6609
+ a = n => (_ref53 => {
6618
6610
  let {
6619
6611
  serverURL: e,
6620
6612
  lang: t,
6621
6613
  paths: n,
6622
6614
  signal: r
6623
- } = _ref54;
6615
+ } = _ref53;
6624
6616
  return k({
6625
6617
  serverURL: e,
6626
6618
  lang: t,
@@ -6633,7 +6625,7 @@
6633
6625
  paths: n.map(e => jo(e) || t),
6634
6626
  lang: i,
6635
6627
  signal: l.signal
6636
- }).then(e => Qa(e, n)).catch(Fl);
6628
+ }).then(e => Ya(e, n)).catch(Fl);
6637
6629
  if (r) {
6638
6630
  const n = o.filter(e => !s(e)),
6639
6631
  r = o.filter(s);
@@ -6645,19 +6637,19 @@
6645
6637
  ...c,
6646
6638
  type: "time",
6647
6639
  action: "inc"
6648
- })).then(e => Qa(new Array(n.length).fill(e), n)), r.length && a(r);
6640
+ })).then(e => Ya(new Array(n.length).fill(e), n)), r.length && a(r);
6649
6641
  } else a(o);
6650
6642
  var c;
6651
6643
  return l.abort.bind(l);
6652
6644
  },
6653
- Ya = _ref55 => {
6645
+ ec = _ref54 => {
6654
6646
  let {
6655
6647
  el: e = "#waline",
6656
6648
  path: t = window.location.pathname,
6657
6649
  comment: n = !1,
6658
6650
  pageview: r = !1,
6659
6651
  ...i
6660
- } = _ref55;
6652
+ } = _ref54;
6661
6653
  const l = e ? Dl(e) : null;
6662
6654
  if (e && !l) throw new Error("Option 'el' do not match any domElement!");
6663
6655
  if (!i.serverURL) throw new Error("Option 'serverURL' is missing!");
@@ -6669,7 +6661,7 @@
6669
6661
  pageview: r,
6670
6662
  path: t
6671
6663
  }),
6672
- a = l ? Vi(() => si(Ka, {
6664
+ a = l ? Vi(() => si(Ja, {
6673
6665
  path: s.path,
6674
6666
  ...o
6675
6667
  })) : null;
@@ -6682,7 +6674,7 @@
6682
6674
  });
6683
6675
  }),
6684
6676
  u = Pn(() => {
6685
- s.pageview && Ja({
6677
+ s.pageview && Xa({
6686
6678
  serverURL: o.serverURL,
6687
6679
  path: s.path,
6688
6680
  selector: "string" == typeof s.pageview ? s.pageview : void 0
@@ -6697,8 +6689,8 @@
6697
6689
  path: n = window.location.pathname,
6698
6690
  ...r
6699
6691
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6700
- Object.entries(r).forEach(_ref56 => {
6701
- let [e, t] = _ref56;
6692
+ Object.entries(r).forEach(_ref55 => {
6693
+ let [e, t] = _ref55;
6702
6694
  o[e] = t;
6703
6695
  }), s.path = n, void 0 !== e && (s.comment = e), void 0 !== t && (s.pageview = t);
6704
6696
  },
@@ -6707,31 +6699,31 @@
6707
6699
  }
6708
6700
  };
6709
6701
  },
6710
- Xa = "2.13.1",
6711
- ec = _ref57 => {
6702
+ tc = "2.14.0",
6703
+ nc = _ref56 => {
6712
6704
  var _i$value;
6713
6705
  let {
6714
6706
  el: e,
6715
6707
  serverURL: t,
6716
6708
  count: n,
6717
6709
  lang: r = "zh-CN"
6718
- } = _ref57;
6710
+ } = _ref56;
6719
6711
  const i = Yo(),
6720
6712
  l = Dl(e),
6721
6713
  o = new AbortController();
6722
- return (_ref58 => {
6714
+ return (_ref57 => {
6723
6715
  let {
6724
6716
  serverURL: e,
6725
6717
  lang: t,
6726
6718
  count: n,
6727
6719
  signal: r,
6728
6720
  token: i
6729
- } = _ref58;
6721
+ } = _ref57;
6730
6722
  const l = {};
6731
6723
  return i && (l.Authorization = `Bearer ${i}`), fetch(`${e}/comment?type=recent&count=${n}&lang=${t}`, {
6732
6724
  signal: r,
6733
6725
  headers: l
6734
- }).then(e => e.json()).then(e => b(e, "recent comment"));
6726
+ }).then(e => e.json());
6735
6727
  })({
6736
6728
  serverURL: t,
6737
6729
  count: n,
@@ -6748,7 +6740,7 @@
6748
6740
  destroy: () => o.abort()
6749
6741
  });
6750
6742
  },
6751
- tc = _ref59 => {
6743
+ rc = _ref58 => {
6752
6744
  let {
6753
6745
  el: e,
6754
6746
  serverURL: t,
@@ -6756,16 +6748,16 @@
6756
6748
  locale: r,
6757
6749
  lang: i = "zh-CN",
6758
6750
  mode: l = "list"
6759
- } = _ref59;
6751
+ } = _ref58;
6760
6752
  const o = Dl(e),
6761
6753
  s = new AbortController();
6762
- return (_ref60 => {
6754
+ return (_ref59 => {
6763
6755
  let {
6764
6756
  serverURL: e,
6765
6757
  signal: t,
6766
6758
  pageSize: n,
6767
6759
  lang: r
6768
- } = _ref60;
6760
+ } = _ref59;
6769
6761
  return fetch(`${e}/user?pageSize=${n}&lang=${r}`, {
6770
6762
  signal: t
6771
6763
  }).then(e => e.json()).then(e => b(e, "user list")).then(e => e.data);
@@ -6787,10 +6779,10 @@
6787
6779
  destroy: () => s.abort()
6788
6780
  });
6789
6781
  };
6790
- _exports.UserList = tc;
6791
- _exports.RecentComments = ec;
6792
- _exports.version = Xa;
6793
- _exports.init = Ya;
6794
- _exports.pageviewCount = Ja;
6782
+ _exports.UserList = rc;
6783
+ _exports.RecentComments = nc;
6784
+ _exports.version = tc;
6785
+ _exports.init = ec;
6786
+ _exports.pageviewCount = Xa;
6795
6787
  });
6796
6788
  //# sourceMappingURL=waline.js.map