@roudanio/awesome-comment 0.4.3 → 0.4.4

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.
@@ -964,8 +964,8 @@ function Mn(e) {
964
964
  }
965
965
  let R = I;
966
966
  if (T && w !== !1) {
967
- const A = Object.keys(T), { shapeFlag: W } = R;
968
- A.length && W & 7 && (r && A.some(lo) && (T = Vr(
967
+ const A = Object.keys(T), { shapeFlag: H } = R;
968
+ A.length && H & 7 && (r && A.some(lo) && (T = Vr(
969
969
  T,
970
970
  r
971
971
  )), R = vt(R, T));
@@ -1071,7 +1071,7 @@ function ci(e, t, { immediate: n, deep: o, flush: s, onTrack: i, onTrigger: r }
1071
1071
  if (t) {
1072
1072
  const A = O.run();
1073
1073
  (o || f || (d ? A.some(
1074
- (W, fe) => Ft(W, w[fe])
1074
+ (H, fe) => Ft(H, w[fe])
1075
1075
  ) : Ft(A, w))) && (p && p(), Ce(t, a, 3, [
1076
1076
  A,
1077
1077
  // pass undefined as the old value when it's changed for the first time
@@ -1401,9 +1401,9 @@ function pc(e) {
1401
1401
  beforeUnmount: O,
1402
1402
  destroyed: R,
1403
1403
  unmounted: A,
1404
- render: W,
1404
+ render: H,
1405
1405
  renderTracked: fe,
1406
- renderTriggered: H,
1406
+ renderTriggered: Z,
1407
1407
  errorCaptured: L,
1408
1408
  serverPrefetch: K,
1409
1409
  // public API
@@ -1446,10 +1446,10 @@ function pc(e) {
1446
1446
  });
1447
1447
  }
1448
1448
  f && Go(f, e, "c");
1449
- function Z(te, B) {
1449
+ function V(te, B) {
1450
1450
  N(B) ? B.forEach((Je) => te(Je.bind(n))) : B && te(B.bind(n));
1451
1451
  }
1452
- if (Z(nc, d), Z(fi, p), Z(oc, g), Z(sc, b), Z(Qr, w), Z(ec, I), Z(lc, L), Z(ac, fe), Z(cc, H), Z(ic, O), Z(di, A), Z(rc, K), N(oe))
1452
+ if (V(nc, d), V(fi, p), V(oc, g), V(sc, b), V(Qr, w), V(ec, I), V(lc, L), V(ac, fe), V(cc, Z), V(ic, O), V(di, A), V(rc, K), N(oe))
1453
1453
  if (oe.length) {
1454
1454
  const te = e.exposed || (e.exposed = {});
1455
1455
  oe.forEach((B) => {
@@ -1460,7 +1460,7 @@ function pc(e) {
1460
1460
  });
1461
1461
  } else
1462
1462
  e.exposed || (e.exposed = {});
1463
- W && e.render === Ie && (e.render = W), pe != null && (e.inheritAttrs = pe), Se && (e.components = Se), lt && (e.directives = lt);
1463
+ H && e.render === Ie && (e.render = H), pe != null && (e.inheritAttrs = pe), Se && (e.components = Se), lt && (e.directives = lt);
1464
1464
  }
1465
1465
  function mc(e, t, n = Ie) {
1466
1466
  N(e) && (e = Qn(e));
@@ -1999,7 +1999,7 @@ function Pc(e, t) {
1999
1999
  );
2000
2000
  break;
2001
2001
  default:
2002
- P & 1 ? W(
2002
+ P & 1 ? H(
2003
2003
  u,
2004
2004
  h,
2005
2005
  m,
@@ -2069,7 +2069,7 @@ function Pc(e, t) {
2069
2069
  for (; u && u !== h; )
2070
2070
  m = p(u), s(u), u = m;
2071
2071
  s(h);
2072
- }, W = (u, h, m, y, _, x, S, k, C) => {
2072
+ }, H = (u, h, m, y, _, x, S, k, C) => {
2073
2073
  S = S || h.type === "svg", u == null ? fe(
2074
2074
  h,
2075
2075
  m,
@@ -2105,13 +2105,13 @@ function Pc(e, t) {
2105
2105
  x && E !== "foreignObject",
2106
2106
  S,
2107
2107
  k
2108
- ), $ && qe(u, null, y, "created"), H(C, u, u.scopeId, S, y), P) {
2109
- for (const V in P)
2110
- V !== "value" && !en(V) && i(
2108
+ ), $ && qe(u, null, y, "created"), Z(C, u, u.scopeId, S, y), P) {
2109
+ for (const X in P)
2110
+ X !== "value" && !en(X) && i(
2111
2111
  C,
2112
- V,
2112
+ X,
2113
2113
  null,
2114
- P[V],
2114
+ P[X],
2115
2115
  x,
2116
2116
  u.children,
2117
2117
  y,
@@ -2125,7 +2125,7 @@ function Pc(e, t) {
2125
2125
  J && M.beforeEnter(C), o(C, h, m), ((v = P && P.onVnodeMounted) || J || $) && de(() => {
2126
2126
  v && je(v, y, u), J && M.enter(C), $ && qe(u, null, y, "mounted");
2127
2127
  }, _);
2128
- }, H = (u, h, m, y, _) => {
2128
+ }, Z = (u, h, m, y, _) => {
2129
2129
  if (m && g(u, m), y)
2130
2130
  for (let x = 0; x < y.length; x++)
2131
2131
  g(u, y[x]);
@@ -2133,7 +2133,7 @@ function Pc(e, t) {
2133
2133
  let x = _.subTree;
2134
2134
  if (h === x) {
2135
2135
  const S = _.vnode;
2136
- H(
2136
+ Z(
2137
2137
  u,
2138
2138
  S,
2139
2139
  S.scopeId,
@@ -2196,8 +2196,8 @@ function Pc(e, t) {
2196
2196
  );
2197
2197
  else if (C & 2 && P.class !== j.class && i(k, "class", null, j.class, _), C & 4 && i(k, "style", P.style, j.style, _), C & 8) {
2198
2198
  const J = h.dynamicProps;
2199
- for (let V = 0; V < J.length; V++) {
2200
- const se = J[V], we = P[se], ft = j[se];
2199
+ for (let X = 0; X < J.length; X++) {
2200
+ const se = J[X], we = P[se], ft = j[se];
2201
2201
  (ft !== we || se === "value") && i(
2202
2202
  k,
2203
2203
  se,
@@ -2351,13 +2351,13 @@ function Pc(e, t) {
2351
2351
  _
2352
2352
  );
2353
2353
  if (li(u) && (k.ctx.renderer = ut), zc(k), k.asyncDep) {
2354
- if (_ && _.registerDep(k, Z), !u.el) {
2354
+ if (_ && _.registerDep(k, V), !u.el) {
2355
2355
  const C = k.subTree = Oe(ct);
2356
2356
  T(null, C, h, m);
2357
2357
  }
2358
2358
  return;
2359
2359
  }
2360
- Z(
2360
+ V(
2361
2361
  k,
2362
2362
  u,
2363
2363
  h,
@@ -2376,11 +2376,11 @@ function Pc(e, t) {
2376
2376
  y.next = h, zr(y.update), y.update();
2377
2377
  else
2378
2378
  h.el = u.el, y.vnode = h;
2379
- }, Z = (u, h, m, y, _, x, S) => {
2379
+ }, V = (u, h, m, y, _, x, S) => {
2380
2380
  const k = () => {
2381
2381
  if (u.isMounted) {
2382
- let { next: E, bu: P, u: j, parent: M, vnode: $ } = u, J = E, V;
2383
- Ge(u, !1), E ? (E.el = $.el, te(u, E, S)) : E = $, P && tn(P), (V = E.props && E.props.onVnodeBeforeUpdate) && je(V, M, E, $), Ge(u, !0);
2382
+ let { next: E, bu: P, u: j, parent: M, vnode: $ } = u, J = E, X;
2383
+ Ge(u, !1), E ? (E.el = $.el, te(u, E, S)) : E = $, P && tn(P), (X = E.props && E.props.onVnodeBeforeUpdate) && je(X, M, E, $), Ge(u, !0);
2384
2384
  const se = Mn(u), we = u.subTree;
2385
2385
  u.subTree = se, w(
2386
2386
  we,
@@ -2392,14 +2392,14 @@ function Pc(e, t) {
2392
2392
  u,
2393
2393
  _,
2394
2394
  x
2395
- ), E.el = se.el, J === null && Br(u, se.el), j && de(j, _), (V = E.props && E.props.onVnodeUpdated) && de(
2396
- () => je(V, M, E, $),
2395
+ ), E.el = se.el, J === null && Br(u, se.el), j && de(j, _), (X = E.props && E.props.onVnodeUpdated) && de(
2396
+ () => je(X, M, E, $),
2397
2397
  _
2398
2398
  );
2399
2399
  } else {
2400
2400
  let E;
2401
- const { el: P, props: j } = h, { bm: M, m: $, parent: J } = u, V = on(h);
2402
- if (Ge(u, !1), M && tn(M), !V && (E = j && j.onVnodeBeforeMount) && je(E, J, h), Ge(u, !0), P && Nn) {
2401
+ const { el: P, props: j } = h, { bm: M, m: $, parent: J } = u, X = on(h);
2402
+ if (Ge(u, !1), M && tn(M), !X && (E = j && j.onVnodeBeforeMount) && je(E, J, h), Ge(u, !0), P && Nn) {
2403
2403
  const se = () => {
2404
2404
  u.subTree = Mn(u), Nn(
2405
2405
  P,
@@ -2409,7 +2409,7 @@ function Pc(e, t) {
2409
2409
  null
2410
2410
  );
2411
2411
  };
2412
- V ? h.type.__asyncLoader().then(
2412
+ X ? h.type.__asyncLoader().then(
2413
2413
  // note: we are moving the render call into an async callback,
2414
2414
  // which means it won't track dependencies - but it's ok because
2415
2415
  // a server-rendered async wrapper is already in resolved state
@@ -2428,7 +2428,7 @@ function Pc(e, t) {
2428
2428
  x
2429
2429
  ), h.el = se.el;
2430
2430
  }
2431
- if ($ && de($, _), !V && (E = j && j.onVnodeMounted)) {
2431
+ if ($ && de($, _), !X && (E = j && j.onVnodeMounted)) {
2432
2432
  const se = h;
2433
2433
  de(
2434
2434
  () => je(E, J, se),
@@ -2600,7 +2600,7 @@ function Pc(e, t) {
2600
2600
  const me = h[v] = C ? He(h[v]) : Ae(h[v]);
2601
2601
  me.key != null && J.set(me.key, v);
2602
2602
  }
2603
- let V, se = 0;
2603
+ let X, se = 0;
2604
2604
  const we = j - $ + 1;
2605
2605
  let ft = !1, Fo = 0;
2606
2606
  const Tt = new Array(we);
@@ -2616,9 +2616,9 @@ function Pc(e, t) {
2616
2616
  if (me.key != null)
2617
2617
  Ee = J.get(me.key);
2618
2618
  else
2619
- for (V = $; V <= j; V++)
2620
- if (Tt[V - $] === 0 && Ot(me, h[V])) {
2621
- Ee = V;
2619
+ for (X = $; X <= j; X++)
2620
+ if (Tt[X - $] === 0 && Ot(me, h[X])) {
2621
+ Ee = X;
2622
2622
  break;
2623
2623
  }
2624
2624
  Ee === void 0 ? Pe(me, _, x, !0) : (Tt[Ee - $] = v + 1, Ee >= Fo ? Fo = Ee : ft = !0, w(
@@ -2634,7 +2634,7 @@ function Pc(e, t) {
2634
2634
  ), se++);
2635
2635
  }
2636
2636
  const $o = ft ? Ec(Tt) : bt;
2637
- for (V = $o.length - 1, v = we - 1; v >= 0; v--) {
2637
+ for (X = $o.length - 1, v = we - 1; v >= 0; v--) {
2638
2638
  const me = $ + v, Ee = h[me], Ko = me + 1 < E ? h[me + 1].el : y;
2639
2639
  Tt[v] === 0 ? w(
2640
2640
  null,
@@ -2646,7 +2646,7 @@ function Pc(e, t) {
2646
2646
  S,
2647
2647
  k,
2648
2648
  C
2649
- ) : ft && (V < 0 || v !== $o[V] ? Ye(Ee, m, Ko, 2) : V--);
2649
+ ) : ft && (X < 0 || v !== $o[X] ? Ye(Ee, m, Ko, 2) : X--);
2650
2650
  }
2651
2651
  }
2652
2652
  }, Ye = (u, h, m, y, _ = null) => {
@@ -2833,7 +2833,7 @@ function xi(e) {
2833
2833
  }
2834
2834
  function q(e, t, n, o, s, i) {
2835
2835
  return xi(
2836
- X(
2836
+ W(
2837
2837
  e,
2838
2838
  t,
2839
2839
  n,
@@ -2869,7 +2869,7 @@ const On = "__vInternal", Ii = ({ key: e }) => e ?? null, sn = ({
2869
2869
  ref_key: t,
2870
2870
  ref_for: n
2871
2871
  }) => (typeof e == "number" && (e = "" + e), e != null ? ie(e) || ne(e) || F(e) ? { i: _e, r: e, k: t, f: !!n } : e : null);
2872
- function X(e, t = null, n = null, o = 0, s = null, i = e === ye ? 0 : 1, r = !1, c = !1) {
2872
+ function W(e, t = null, n = null, o = 0, s = null, i = e === ye ? 0 : 1, r = !1, c = !1) {
2873
2873
  const a = {
2874
2874
  __v_isVNode: !0,
2875
2875
  __v_skip: !0,
@@ -2925,7 +2925,7 @@ function Nc(e, t = null, n = null, o = 0, s = null, i = !1) {
2925
2925
  c && !ie(c) && (t.class = _n(c)), ee(a) && (Ys(a) && !N(a) && (a = ce({}, a)), t.style = bn(a));
2926
2926
  }
2927
2927
  const r = ie(e) ? 1 : Jr(e) ? 128 : jc(e) ? 64 : ee(e) ? 4 : F(e) ? 2 : 0;
2928
- return X(
2928
+ return W(
2929
2929
  e,
2930
2930
  t,
2931
2931
  n,
@@ -3666,26 +3666,26 @@ function Ei(e, t, n = {}, o, s, i) {
3666
3666
  return function() {
3667
3667
  En(o);
3668
3668
  const oe = Array.from(arguments), pe = [], Se = [];
3669
- function lt(Z) {
3670
- pe.push(Z);
3669
+ function lt(V) {
3670
+ pe.push(V);
3671
3671
  }
3672
- function Ct(Z) {
3673
- Se.push(Z);
3672
+ function Ct(V) {
3673
+ Se.push(V);
3674
3674
  }
3675
3675
  ht(p, {
3676
3676
  args: oe,
3677
3677
  name: L,
3678
- store: W,
3678
+ store: H,
3679
3679
  after: lt,
3680
3680
  onError: Ct
3681
3681
  });
3682
3682
  let Ue;
3683
3683
  try {
3684
- Ue = K.apply(this && this.$id === e ? this : W, oe);
3685
- } catch (Z) {
3686
- throw ht(Se, Z), Z;
3684
+ Ue = K.apply(this && this.$id === e ? this : H, oe);
3685
+ } catch (V) {
3686
+ throw ht(Se, V), V;
3687
3687
  }
3688
- return Ue instanceof Promise ? Ue.then((Z) => (ht(pe, Z), Z)).catch((Z) => (ht(Se, Z), Promise.reject(Z))) : (ht(pe, Ue), Ue);
3688
+ return Ue instanceof Promise ? Ue.then((V) => (ht(pe, V), V)).catch((V) => (ht(Se, V), Promise.reject(V))) : (ht(pe, Ue), Ue);
3689
3689
  };
3690
3690
  }
3691
3691
  const A = {
@@ -3706,19 +3706,19 @@ function Ei(e, t, n = {}, o, s, i) {
3706
3706
  return oe;
3707
3707
  },
3708
3708
  $dispose: O
3709
- }, W = wn(A);
3710
- o._s.set(e, W);
3711
- const fe = o._a && o._a.runWithContext || xa, H = o._e.run(() => (r = Fs(), fe(() => r.run(t))));
3712
- for (const L in H) {
3713
- const K = H[L];
3709
+ }, H = wn(A);
3710
+ o._s.set(e, H);
3711
+ const fe = o._a && o._a.runWithContext || xa, Z = o._e.run(() => (r = Fs(), fe(() => r.run(t))));
3712
+ for (const L in Z) {
3713
+ const K = Z[L];
3714
3714
  if (ne(K) && !Ta(K) || Ve(K))
3715
3715
  i || (b && Ca(K) && (ne(K) ? K.value = b[L] : so(K, b[L])), o.state.value[e][L] = K);
3716
3716
  else if (typeof K == "function") {
3717
3717
  const oe = R(L, K);
3718
- H[L] = oe, c.actions[L] = K;
3718
+ Z[L] = oe, c.actions[L] = K;
3719
3719
  }
3720
3720
  }
3721
- return We(W, H), We(U(W), H), Object.defineProperty(W, "$state", {
3721
+ return We(H, Z), We(U(H), Z), Object.defineProperty(H, "$state", {
3722
3722
  get: () => o.state.value[e],
3723
3723
  set: (L) => {
3724
3724
  I((K) => {
@@ -3726,13 +3726,13 @@ function Ei(e, t, n = {}, o, s, i) {
3726
3726
  });
3727
3727
  }
3728
3728
  }), o._p.forEach((L) => {
3729
- We(W, r.run(() => L({
3730
- store: W,
3729
+ We(H, r.run(() => L({
3730
+ store: H,
3731
3731
  app: o._a,
3732
3732
  pinia: o,
3733
3733
  options: c
3734
3734
  })));
3735
- }), b && i && n.hydrate && n.hydrate(W.$state, b), l = !0, f = !0, W;
3735
+ }), b && i && n.hydrate && n.hydrate(H.$state, b), l = !0, f = !0, H;
3736
3736
  }
3737
3737
  function Sa(e, t, n) {
3738
3738
  let o, s;
@@ -4101,9 +4101,9 @@ async function Ra(e, t) {
4101
4101
  }
4102
4102
  if (O)
4103
4103
  throw O;
4104
- const R = T.json, { error: A, error_description: W } = R, fe = Re(R, ["error", "error_description"]), { ok: H } = T;
4105
- if (!H) {
4106
- const L = W || `HTTP error. Unable to fetch ${f}`;
4104
+ const R = T.json, { error: A, error_description: H } = R, fe = Re(R, ["error", "error_description"]), { ok: Z } = T;
4105
+ if (!Z) {
4106
+ const L = H || `HTTP error. Unable to fetch ${f}`;
4107
4107
  throw A === "mfa_required" ? new Ro(A, L, fe.mfa_token) : A === "missing_refresh_token" ? new jn(p, g) : new ae(A || "request_error", L);
4108
4108
  }
4109
4109
  return fe;
@@ -4632,18 +4632,18 @@ class Ha {
4632
4632
  const R = window.document.createElement("iframe");
4633
4633
  R.setAttribute("width", "0"), R.setAttribute("height", "0"), R.style.display = "none";
4634
4634
  const A = () => {
4635
- window.document.body.contains(R) && (window.document.body.removeChild(R), window.removeEventListener("message", W, !1));
4635
+ window.document.body.contains(R) && (window.document.body.removeChild(R), window.removeEventListener("message", H, !1));
4636
4636
  };
4637
- let W;
4637
+ let H;
4638
4638
  const fe = setTimeout(() => {
4639
4639
  O(new Ht()), A();
4640
4640
  }, 1e3 * I);
4641
- W = function(H) {
4642
- if (H.origin != w || !H.data || H.data.type !== "authorization_response")
4641
+ H = function(Z) {
4642
+ if (Z.origin != w || !Z.data || Z.data.type !== "authorization_response")
4643
4643
  return;
4644
- const L = H.source;
4645
- L && L.close(), H.data.response.error ? O(ae.fromPayload(H.data.response)) : T(H.data.response), clearTimeout(fe), window.removeEventListener("message", W, !1), setTimeout(A, 2e3);
4646
- }, window.addEventListener("message", W, !1), window.document.body.appendChild(R), R.setAttribute("src", b);
4644
+ const L = Z.source;
4645
+ L && L.close(), Z.data.response.error ? O(ae.fromPayload(Z.data.response)) : T(Z.data.response), clearTimeout(fe), window.removeEventListener("message", H, !1), setTimeout(A, 2e3);
4646
+ }, window.addEventListener("message", H, !1), window.document.body.appendChild(R), R.setAttribute("src", b);
4647
4647
  }))(s, this.domainUrl, d);
4648
4648
  if (i !== p.state)
4649
4649
  throw new ae("state_mismatch", "Invalid state");
@@ -4805,16 +4805,16 @@ const An = Sa("store", () => {
4805
4805
  sub: O = "",
4806
4806
  name: R = "",
4807
4807
  picture: A = "",
4808
- email: W = "",
4808
+ email: H = "",
4809
4809
  nickname: fe = ""
4810
- } = w, H = {
4810
+ } = w, Z = {
4811
4811
  id: g,
4812
4812
  postId: e,
4813
4813
  content: b,
4814
4814
  createdAt: /* @__PURE__ */ new Date(),
4815
4815
  user: {
4816
4816
  avatar: A,
4817
- email: W,
4817
+ email: H,
4818
4818
  name: fe || R
4819
4819
  },
4820
4820
  userId: O,
@@ -4822,16 +4822,16 @@ const An = Sa("store", () => {
4822
4822
  isNew: !0
4823
4823
  };
4824
4824
  if (I || T) {
4825
- H.ancestorId = I, H.parentId = T;
4825
+ Z.ancestorId = I, Z.parentId = T;
4826
4826
  const L = i.value[I];
4827
4827
  if (I === T)
4828
- L.children || (L.children = []), L.children.unshift(H);
4828
+ L.children || (L.children = []), L.children.unshift(Z);
4829
4829
  else {
4830
4830
  const K = L.children.findIndex((oe) => Number(oe.id) === T);
4831
- L.children.splice(K + 1, 0, H);
4831
+ L.children.splice(K + 1, 0, Z);
4832
4832
  }
4833
4833
  } else
4834
- H.ancestorId = 0, H.parentId = 0, i.value = { [g]: H, ...i.value };
4834
+ Z.ancestorId = 0, Z.parentId = 0, i.value = { [g]: Z, ...i.value };
4835
4835
  r.value++;
4836
4836
  }
4837
4837
  return {
@@ -4846,7 +4846,7 @@ const An = Sa("store", () => {
4846
4846
  loadComments: d,
4847
4847
  addComment: p
4848
4848
  };
4849
- }), Ba = ["onSubmit"], Ja = { class: "ac-form-control border border-neutral bg-base-200 rounded-lg" }, Ya = /* @__PURE__ */ X("label", {
4849
+ }), Ba = ["onSubmit"], Ja = { class: "ac-form-control border border-neutral bg-base-200 rounded-lg" }, Ya = /* @__PURE__ */ W("label", {
4850
4850
  class: "sr-only",
4851
4851
  for: "ac-comment"
4852
4852
  }, "Your comment", -1), qa = ["onKeydown"], Ga = { class: "p-2 rounded-b-lg bg-base-300 flex items-center" }, Qa = {
@@ -4869,7 +4869,7 @@ const An = Sa("store", () => {
4869
4869
  },
4870
4870
  emits: ["close"],
4871
4871
  setup(e, { emit: t }) {
4872
- const n = e, o = $i(), s = An(), i = Te("ApiBaseUrl"), r = Te("Auth0Domain"), c = "0.4.3", a = Q(), l = Q(!1), f = Q(""), d = Q("");
4872
+ const n = e, o = $i(), s = An(), i = Te("ApiBaseUrl"), r = Te("Auth0Domain"), c = "0.4.4", a = Q(), l = Q(!1), f = Q(""), d = Q("");
4873
4873
  async function p(I) {
4874
4874
  if (!o.user.value)
4875
4875
  return g();
@@ -4915,9 +4915,9 @@ const An = Sa("store", () => {
4915
4915
  class: "mb-6",
4916
4916
  onSubmit: ma(p, ["prevent"])
4917
4917
  }, [
4918
- X("div", Ja, [
4918
+ W("div", Ja, [
4919
4919
  Ya,
4920
- Gr(X("textarea", {
4920
+ Gr(W("textarea", {
4921
4921
  class: "ac-textarea ac-textarea-bordered bg-base-200 rounded-b-none focus:outline-none",
4922
4922
  id: "ac-comment",
4923
4923
  ref_key: "textarea",
@@ -4933,10 +4933,10 @@ const An = Sa("store", () => {
4933
4933
  }, null, 40, qa), [
4934
4934
  [da, f.value]
4935
4935
  ]),
4936
- X("div", Ga, [
4936
+ W("div", Ga, [
4937
4937
  I.noVersion ? be("", !0) : (D(), q("div", Qa, "v" + ve(Y(c)), 1)),
4938
4938
  d.value ? (D(), q("div", el, ve(d.value), 1)) : be("", !0),
4939
- X("button", {
4939
+ W("button", {
4940
4940
  class: "ac-btn ac-btn-primary ac-btn-sm ml-auto",
4941
4941
  disabled: l.value
4942
4942
  }, [
@@ -4998,21 +4998,24 @@ function Ss(e) {
4998
4998
  }
4999
4999
  return n;
5000
5000
  }
5001
- const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-gray-900" }, al = { class: "flex justify-between items-center mb-2" }, ll = { class: "flex items-center text-sm text-base-content dark:text-white" }, ul = { class: "avatar mr-2" }, fl = {
5001
+ const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-gray-900" }, al = { class: "flex justify-between items-center font-sans mb-2" }, ll = { class: "flex items-center text-sm text-base-content dark:text-white" }, ul = { class: "ac-avatar mr-2" }, fl = {
5002
5002
  key: 0,
5003
5003
  class: "w-6 h-6"
5004
5004
  }, dl = ["src", "alt"], hl = { class: "text-neutral-content mix-blend-color-dodge uppercase font-bold leading-6" }, pl = {
5005
5005
  key: 0,
5006
- class: "bi bi-patch-check-fill text-success ml-2"
5007
- }, ml = ["datetime", "title"], gl = ["href"], bl = /* @__PURE__ */ X("i", { class: "bi bi-reply-fill h-4 w-4" }, null, -1), _l = [
5008
- bl
5009
- ], yl = ["innerHTML"], wl = {
5006
+ class: "ac-tooltip ml-2",
5007
+ "data-tip": "Admin"
5008
+ }, ml = /* @__PURE__ */ W("i", { class: "bi bi-patch-check-fill text-success" }, null, -1), gl = [
5009
+ ml
5010
+ ], bl = ["href"], _l = ["datetime", "title"], yl = ["href"], wl = /* @__PURE__ */ W("i", { class: "bi bi-reply-fill h-4 w-4" }, null, -1), vl = [
5011
+ wl
5012
+ ], kl = ["innerHTML"], xl = {
5010
5013
  key: 0,
5011
5014
  class: "italic mt-4 text-gray-500 mb-0 text-sm dark:text-gray-400"
5012
- }, vl = {
5015
+ }, Il = {
5013
5016
  name: "CommentItem"
5014
- }, kl = /* @__PURE__ */ In({
5015
- ...vl,
5017
+ }, Cl = /* @__PURE__ */ In({
5018
+ ...Il,
5016
5019
  props: {
5017
5020
  comment: {},
5018
5021
  isFirstLevel: { type: Boolean },
@@ -5020,107 +5023,115 @@ const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-g
5020
5023
  },
5021
5024
  setup(e) {
5022
5025
  const t = e, n = An();
5023
- function o(s) {
5024
- return t.ancestorId && n.comments[t.ancestorId]?.children?.find((c) => Number(c.id) === Number(s))?.user?.name || "";
5026
+ function o(i) {
5027
+ return `${location.origin}${location.pathname}#awcm-${i}`;
5025
5028
  }
5026
- return (s, i) => {
5027
- const r = uc("comment-item", !0);
5029
+ function s(i) {
5030
+ return t.ancestorId && n.comments[t.ancestorId]?.children?.find((a) => Number(a.id) === Number(i))?.user?.name || "";
5031
+ }
5032
+ return (i, r) => {
5033
+ const c = uc("comment-item", !0);
5028
5034
  return D(), q("div", {
5029
- class: _n(["comment-item rounded-lg my-4", { "animated flash": s.comment.isNew }]),
5030
- id: "awcm-" + s.comment.id,
5031
- onAnimationend: i[2] || (i[2] = (c) => s.comment.isNew = !1)
5035
+ class: _n(["comment-item rounded-lg my-4", { "animated flash": i.comment.isNew }]),
5036
+ id: "awcm-" + i.comment.id,
5037
+ onAnimationend: r[2] || (r[2] = (a) => i.comment.isNew = !1)
5032
5038
  }, [
5033
- X("article", cl, [
5034
- X("header", al, [
5035
- X("div", ll, [
5036
- X("div", ul, [
5037
- s.comment.user.avatar ? (D(), q("div", fl, [
5038
- X("img", {
5039
+ W("article", cl, [
5040
+ W("header", al, [
5041
+ W("div", ll, [
5042
+ W("div", ul, [
5043
+ i.comment.user.avatar ? (D(), q("div", fl, [
5044
+ W("img", {
5039
5045
  class: "rounded-full max-w-full max-h-full",
5040
- src: s.comment.user.avatar,
5041
- alt: s.comment.user.name
5046
+ src: i.comment.user.avatar,
5047
+ alt: i.comment.user.name
5042
5048
  }, null, 8, dl)
5043
5049
  ])) : (D(), q("div", {
5044
5050
  key: 1,
5045
5051
  class: "avatar-char rounded-full w-6 h-6 text-center",
5046
- style: bn({ "background-color": Y(il)(s.comment.user.name || "Anonymous") })
5052
+ style: bn({ "background-color": Y(il)(i.comment.user.name || "Anonymous") })
5047
5053
  }, [
5048
- X("span", hl, ve((s.comment.user.name || "Anonymous").substring(0, 1)), 1)
5054
+ W("span", hl, ve((i.comment.user.name || "Anonymous").substring(0, 1)), 1)
5049
5055
  ], 4))
5050
5056
  ]),
5051
- Sn(ve(s.comment.user.name), 1),
5052
- s.comment.isAdmin ? (D(), q("i", pl)) : be("", !0),
5053
- X("time", {
5054
- class: "text-xs text-gray-600 ml-4 dark:text-gray-400",
5055
- pubdate: "",
5056
- datetime: s.comment.createdAt,
5057
- title: Y(Ss)(s.comment.createdAt)
5058
- }, ve(Y(Ss)(s.comment.createdAt)), 9, ml),
5059
- !s.isFirstLevel && s.comment.parent_id !== s.comment.ancestor_id ? (D(), q("a", {
5057
+ Sn(ve(i.comment.user.name), 1),
5058
+ i.comment.isAdmin ? (D(), q("div", pl, gl)) : be("", !0),
5059
+ W("a", {
5060
+ class: "ml-4 no-underline hover:underline",
5061
+ href: o(i.comment.id)
5062
+ }, [
5063
+ W("time", {
5064
+ class: "text-xs text-gray-600 dark:text-gray-400",
5065
+ pubdate: "",
5066
+ datetime: i.comment.createdAt,
5067
+ title: Y(Ss)(i.comment.createdAt)
5068
+ }, ve(Y(Ss)(i.comment.createdAt)), 9, _l)
5069
+ ], 8, bl),
5070
+ !i.isFirstLevel && i.comment.parent_id !== i.comment.ancestor_id ? (D(), q("a", {
5060
5071
  key: 1,
5061
5072
  class: "text-xs link link-hover ml-4",
5062
- href: "#awcm-" + s.comment.parent_id
5063
- }, "reply to " + ve(o(s.comment.parent_id)) + "(#" + ve(s.comment.parent_id) + ")", 9, gl)) : be("", !0)
5073
+ href: "#awcm-" + i.comment.parent_id
5074
+ }, "reply to " + ve(s(i.comment.parent_id)) + "(#" + ve(i.comment.parent_id) + ")", 9, yl)) : be("", !0)
5064
5075
  ]),
5065
- X("button", {
5076
+ W("button", {
5066
5077
  class: "ac-btn ac-btn-sm ac-btn-circle border-0",
5067
5078
  type: "button",
5068
- onClick: i[0] || (i[0] = (c) => s.comment.isReplying = !s.comment.isReplying)
5069
- }, _l)
5079
+ onClick: r[0] || (r[0] = (a) => i.comment.isReplying = !i.comment.isReplying)
5080
+ }, vl)
5070
5081
  ]),
5071
- X("p", {
5082
+ W("p", {
5072
5083
  class: "text-gray-500 dark:text-gray-400",
5073
- innerHTML: Y(co)(s.comment.content)
5074
- }, null, 8, yl),
5075
- s.comment.status === Y(No).Pending ? (D(), q("p", wl, "comments normally got approved within 24 hours")) : be("", !0)
5084
+ innerHTML: Y(co)(i.comment.content)
5085
+ }, null, 8, kl),
5086
+ i.comment.status === Y(No).Pending ? (D(), q("p", xl, "comments normally got approved within 24 hours")) : be("", !0)
5076
5087
  ]),
5077
- s.comment.isReplying && s.isFirstLevel ? (D(), Lt(ro, {
5088
+ i.comment.isReplying && i.isFirstLevel ? (D(), Lt(ro, {
5078
5089
  key: 0,
5079
5090
  class: "mt-3 ml-12",
5080
5091
  "no-version": "",
5081
- "ancestor-id": Number(s.ancestorId),
5082
- "parent-id": Number(s.comment.id),
5083
- onClose: i[1] || (i[1] = (c) => s.comment.isReplying = !1)
5092
+ "ancestor-id": Number(i.ancestorId),
5093
+ "parent-id": Number(i.comment.id),
5094
+ onClose: r[1] || (r[1] = (a) => i.comment.isReplying = !1)
5084
5095
  }, null, 8, ["ancestor-id", "parent-id"])) : be("", !0),
5085
- s.comment.children?.length ? (D(!0), q(ye, { key: 1 }, pi(s.comment.children, (c) => (D(), Lt(r, {
5096
+ i.comment.children?.length ? (D(!0), q(ye, { key: 1 }, pi(i.comment.children, (a) => (D(), Lt(c, {
5086
5097
  class: "ml-12",
5087
- key: c.id,
5088
- comment: c,
5089
- "ancestor-id": Number(s.ancestorId),
5098
+ key: a.id,
5099
+ comment: a,
5100
+ "ancestor-id": Number(i.ancestorId),
5090
5101
  "is-first-level": !1
5091
5102
  }, null, 8, ["comment", "ancestor-id"]))), 128)) : be("", !0),
5092
- s.comment.isReplying && !s.isFirstLevel ? (D(), Lt(ro, {
5103
+ i.comment.isReplying && !i.isFirstLevel ? (D(), Lt(ro, {
5093
5104
  key: 2,
5094
5105
  class: "mt-3 ml-12",
5095
- "ancestor-id": Number(s.ancestorId),
5096
- "parent-id": Number(s.comment.id)
5106
+ "ancestor-id": Number(i.ancestorId),
5107
+ "parent-id": Number(i.comment.id)
5097
5108
  }, null, 8, ["ancestor-id", "parent-id"])) : be("", !0)
5098
5109
  ], 42, rl);
5099
5110
  };
5100
5111
  }
5101
- }), xl = {
5112
+ }), Tl = {
5102
5113
  key: 0,
5103
5114
  class: "comments-wrapper"
5104
- }, Il = ["disabled"], Cl = {
5115
+ }, Ol = ["disabled"], Sl = {
5105
5116
  key: 0,
5106
5117
  class: "ac-loading ac-loading-xs ac-loading-spinner"
5107
- }, Tl = {
5118
+ }, Pl = {
5108
5119
  key: 1,
5109
5120
  class: "pt-8 text-center"
5110
- }, Ol = /* @__PURE__ */ X("span", { class: "ac-loading ac-loading-spinner" }, null, -1), Sl = [
5111
- Ol
5112
- ], Pl = {
5121
+ }, El = /* @__PURE__ */ W("span", { class: "ac-loading ac-loading-spinner" }, null, -1), jl = [
5122
+ El
5123
+ ], Al = {
5113
5124
  name: "CommentSections"
5114
- }, El = /* @__PURE__ */ In({
5115
- ...Pl,
5125
+ }, Rl = /* @__PURE__ */ In({
5126
+ ...Al,
5116
5127
  setup(e) {
5117
5128
  const t = An();
5118
5129
  t.loadComments();
5119
5130
  function n() {
5120
5131
  t.start += 20, t.loadComments();
5121
5132
  }
5122
- return (o, s) => Y(t).isLoaded ? (D(), q("div", xl, [
5123
- (D(!0), q(ye, null, pi(Object.values(Y(t).comments).reverse(), (i) => (D(), Lt(kl, {
5133
+ return (o, s) => Y(t).isLoaded ? (D(), q("div", Tl, [
5134
+ (D(!0), q(ye, null, pi(Object.values(Y(t).comments).reverse(), (i) => (D(), Lt(Cl, {
5124
5135
  key: i.id,
5125
5136
  comment: i,
5126
5137
  "ancestor-id": Number(i.id),
@@ -5133,35 +5144,35 @@ const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-g
5133
5144
  onClick: n,
5134
5145
  disabled: Y(t).loadingMore
5135
5146
  }, [
5136
- Y(t).loadingMore ? (D(), q("span", Cl)) : be("", !0),
5147
+ Y(t).loadingMore ? (D(), q("span", Sl)) : be("", !0),
5137
5148
  Sn("Load More")
5138
- ], 8, Il)) : be("", !0)
5139
- ])) : (D(), q("div", Tl, Sl));
5149
+ ], 8, Ol)) : be("", !0)
5150
+ ])) : (D(), q("div", Pl, jl));
5140
5151
  }
5141
- }), jl = { class: "awesome-comment" }, Al = {
5152
+ }), Nl = { class: "awesome-comment" }, Ll = {
5142
5153
  key: 0,
5143
5154
  class: "ac-alert ac-alert-error mb-4"
5144
- }, Rl = { class: "flex justify-between items-center py-2" }, Nl = { class: "text-lg font-bold text-base-content my-0" }, Ll = {
5155
+ }, Ml = { class: "flex justify-between items-center py-2" }, Fl = { class: "text-lg font-bold text-base-content my-0" }, $l = {
5145
5156
  key: 0,
5146
5157
  class: "ac-loading ac-loading-spinner"
5147
- }, Ml = {
5158
+ }, Kl = {
5148
5159
  key: 1,
5149
5160
  class: "ac-dropdown ac-dropdown-end"
5150
- }, Fl = {
5161
+ }, zl = {
5151
5162
  key: 0,
5152
5163
  class: "ac-avatar flex",
5153
5164
  tabindex: "0"
5154
- }, $l = { class: "w-6 h-6 rounded-full" }, Kl = ["alt", "src"], zl = {
5165
+ }, Ul = { class: "w-6 h-6 rounded-full" }, Dl = ["alt", "src"], Wl = {
5155
5166
  key: 1,
5156
5167
  class: "ac-btn ac-btn-ghost",
5157
5168
  tabindex: "0"
5158
- }, Ul = {
5169
+ }, Hl = {
5159
5170
  class: "ac-dropdown-content z-10 ac-menu p-2 shadow bg-base-100 rounded-box w-52",
5160
5171
  tabindex: "0"
5161
- }, Dl = {
5172
+ }, Zl = {
5162
5173
  key: 0,
5163
5174
  class: "border-b border-neutral pb-2 mb-2 pointer-events-none"
5164
- }, Wl = { class: "text-base-content" }, Hl = ["disabled"], Zl = ["disabled"], Vl = /* @__PURE__ */ In({
5175
+ }, Vl = { class: "text-base-content" }, Xl = ["disabled"], Bl = ["disabled"], Jl = /* @__PURE__ */ In({
5165
5176
  __name: "App",
5166
5177
  setup(e) {
5167
5178
  const t = An(), {
@@ -5171,13 +5182,13 @@ const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-g
5171
5182
  loginWithPopup: i,
5172
5183
  logout: r
5173
5184
  } = $i(), c = Oo(() => {
5174
- const f = t.total > 20 || t.total === 20 && t.hasMore ? t.total + "+" : t.total;
5185
+ const f = t.hasMore ? t.total + "+" : t.total;
5175
5186
  if (t.total === 0)
5176
5187
  return "0";
5177
5188
  const d = new CustomEvent("AwesomeComment:total", {
5178
5189
  bubbles: !0,
5179
5190
  cancelable: !0,
5180
- detail: f
5191
+ detail: t.total
5181
5192
  });
5182
5193
  return document.body.dispatchEvent(d), f;
5183
5194
  });
@@ -5189,34 +5200,34 @@ const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-g
5189
5200
  openUrl: !1
5190
5201
  });
5191
5202
  }
5192
- return (f, d) => (D(), q("div", jl, [
5193
- Y(t).message ? (D(), q("div", Al, [
5194
- X("p", null, ve(Y(t).message), 1)
5203
+ return (f, d) => (D(), q("div", Nl, [
5204
+ Y(t).message ? (D(), q("div", Ll, [
5205
+ W("p", null, ve(Y(t).message), 1)
5195
5206
  ])) : be("", !0),
5196
- X("header", Rl, [
5197
- X("h2", Nl, "Discussion (" + ve(c.value) + ")", 1),
5198
- Y(o) ? (D(), q("span", Ll)) : (D(), q("div", Ml, [
5207
+ W("header", Ml, [
5208
+ W("h2", Fl, "Discussion (" + ve(c.value) + ")", 1),
5209
+ Y(o) ? (D(), q("span", $l)) : (D(), q("div", Kl, [
5199
5210
  Y(n) && Y(s) ? (D(), q(ye, { key: 0 }, [
5200
- Y(s).picture ? (D(), q("label", Fl, [
5201
- X("div", $l, [
5202
- X("img", {
5211
+ Y(s).picture ? (D(), q("label", zl, [
5212
+ W("div", Ul, [
5213
+ W("img", {
5203
5214
  class: "w-full h-full block",
5204
5215
  alt: Y(s).name || Y(s).email,
5205
5216
  src: Y(s).picture
5206
- }, null, 8, Kl)
5217
+ }, null, 8, Dl)
5207
5218
  ])
5208
- ])) : (D(), q("label", zl, ve(Y(s).email), 1)),
5209
- X("ul", Ul, [
5210
- Y(s).picture ? (D(), q("li", Dl, [
5211
- X("span", Wl, ve(Y(s).email), 1)
5219
+ ])) : (D(), q("label", Wl, ve(Y(s).email), 1)),
5220
+ W("ul", Hl, [
5221
+ Y(s).picture ? (D(), q("li", Zl, [
5222
+ W("span", Vl, ve(Y(s).email), 1)
5212
5223
  ])) : be("", !0),
5213
- X("li", null, [
5214
- X("button", {
5224
+ W("li", null, [
5225
+ W("button", {
5215
5226
  class: "border-0 bg-base-100",
5216
5227
  type: "button",
5217
5228
  disabled: Y(o),
5218
5229
  onClick: l
5219
- }, "Logout", 8, Hl)
5230
+ }, "Logout", 8, Xl)
5220
5231
  ])
5221
5232
  ])
5222
5233
  ], 64)) : (D(), q("button", {
@@ -5225,17 +5236,17 @@ const rl = ["id"], cl = { class: "p-6 text-base bg-base-200 rounded-lg dark:bg-g
5225
5236
  type: "button",
5226
5237
  disabled: Y(o),
5227
5238
  onClick: a
5228
- }, "Login", 8, Zl))
5239
+ }, "Login", 8, Bl))
5229
5240
  ]))
5230
5241
  ]),
5231
5242
  Oe(ro),
5232
- Oe(El)
5243
+ Oe(Rl)
5233
5244
  ]));
5234
5245
  }
5235
5246
  }), Ps = [];
5236
5247
  let Ki = null;
5237
- function Xl(e, t) {
5238
- const n = ya(Vl), o = ka(), s = Ki || Fi({
5248
+ function Yl(e, t) {
5249
+ const n = ya(Jl), o = ka(), s = Ki || Fi({
5239
5250
  domain: e,
5240
5251
  clientId: t,
5241
5252
  authorizationParams: {
@@ -5244,14 +5255,14 @@ function Xl(e, t) {
5244
5255
  });
5245
5256
  return n.use(s), n.use(o), n;
5246
5257
  }
5247
- const Bl = {
5258
+ const ql = {
5248
5259
  postId: "",
5249
5260
  apiUrl: "",
5250
5261
  domain: "",
5251
5262
  clientId: "",
5252
5263
  init(e, t, n, o, s) {
5253
5264
  t ??= this.postId, n ??= this.apiUrl, o ??= this.domain, s ??= this.clientId;
5254
- const i = Xl(o, s);
5265
+ const i = Yl(o, s);
5255
5266
  i.provide("ApiBaseUrl", n), i.provide("postId", t), i.provide("Auth0Domain", o), i.provide("comments", Ps), i.mount(e);
5256
5267
  },
5257
5268
  async preload(e, t, n, o) {
@@ -5269,5 +5280,5 @@ const Bl = {
5269
5280
  }
5270
5281
  };
5271
5282
  export {
5272
- Bl as default
5283
+ ql as default
5273
5284
  };