@mashkovd/pelican-vue 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { onScopeDispose as fe, defineComponent as F, ref as P, watch as V, openBlock as g, createElementBlock as M, createElementVNode as i, createTextVNode as L, toDisplayString as b, Fragment as D, renderList as Y, unref as p, normalizeClass as B, computed as $, normalizeStyle as Q, createCommentVNode as K, createVNode as T, withDirectives as ye, vShow as Me, inject as Ue, withModifiers as ne, renderSlot as X, createBlock as ue, withCtx as ce, mergeProps as Ve, shallowRef as Ee, triggerRef as le, reactive as Te, provide as se, toRef as be, onMounted as Be, normalizeProps as Oe, guardReactiveProps as Ke } from "vue";
1
+ import { onScopeDispose as fe, defineComponent as F, ref as P, watch as U, openBlock as g, createElementBlock as M, createElementVNode as i, createTextVNode as B, toDisplayString as b, Fragment as D, renderList as Y, unref as p, normalizeClass as E, computed as $, normalizeStyle as Q, createCommentVNode as K, createVNode as T, withDirectives as ye, vShow as Me, inject as Ue, withModifiers as ne, renderSlot as X, createBlock as ue, withCtx as ce, mergeProps as Ve, shallowRef as Ee, triggerRef as le, reactive as Te, provide as se, toRef as be, onMounted as Be, normalizeProps as Oe, guardReactiveProps as Ke } from "vue";
2
2
  function Ye(e, t) {
3
3
  let a = null;
4
4
  const n = (...c) => {
@@ -73,7 +73,7 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
73
73
  emits: ["update:search", "update:sortKey", "refresh", "toggle-filters"],
74
74
  setup(e, { emit: t }) {
75
75
  const a = e, n = t, s = P(a.search);
76
- V(
76
+ U(
77
77
  () => a.search,
78
78
  (r) => {
79
79
  r !== s.value && (s.value = r);
@@ -94,13 +94,13 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
94
94
  onClick: m[0] || (m[0] = (h) => n("toggle-filters"))
95
95
  }, " Filters "),
96
96
  i("div", Qe, [
97
- m[2] || (m[2] = L(" Showing ", -1)),
97
+ m[2] || (m[2] = B(" Showing ", -1)),
98
98
  i("b", null, b(e.filteredTotal.toLocaleString("en-US")), 1),
99
- m[3] || (m[3] = L(" of ", -1)),
99
+ m[3] || (m[3] = B(" of ", -1)),
100
100
  i("b", null, b(e.total.toLocaleString("en-US")), 1),
101
- m[4] || (m[4] = L(" · page ", -1)),
101
+ m[4] || (m[4] = B(" · page ", -1)),
102
102
  i("b", null, b(e.page), 1),
103
- L(" / " + b(e.totalPages), 1)
103
+ B(" / " + b(e.totalPages), 1)
104
104
  ]),
105
105
  i("input", {
106
106
  class: "search",
@@ -151,7 +151,7 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
151
151
  (g(), M(D, null, Y(s, (r) => i("button", {
152
152
  key: r,
153
153
  type: "button",
154
- class: B(["chip", ["risk-" + r.toLowerCase(), { on: e.modelValue.has(r) }]]),
154
+ class: E(["chip", ["risk-" + r.toLowerCase(), { on: e.modelValue.has(r) }]]),
155
155
  onClick: (m) => c(r)
156
156
  }, b(r), 11, it)), 64))
157
157
  ]));
@@ -224,16 +224,16 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
224
224
  var(--track-bg, #e2e8f0) ${d.value}%,
225
225
  var(--track-bg, #e2e8f0) 100%)`
226
226
  }));
227
- function I(_) {
228
- let f = parseInt(_.target.value, 10);
227
+ function _(I) {
228
+ let f = parseInt(I.target.value, 10);
229
229
  isNaN(f) || (f > o.value && (f = o.value), n("update:modelValueMin", f <= s.value ? null : f));
230
230
  }
231
- function k(_) {
232
- let f = parseInt(_.target.value, 10);
231
+ function k(I) {
232
+ let f = parseInt(I.target.value, 10);
233
233
  isNaN(f) || (f < l.value && (f = l.value), n("update:modelValueMax", f >= c.value ? null : f));
234
234
  }
235
- return (_, f) => {
236
- var R;
235
+ return (I, f) => {
236
+ var S;
237
237
  return g(), M("div", gt, [
238
238
  i("div", ht, [
239
239
  i("label", yt, b(e.label), 1),
@@ -250,8 +250,8 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
250
250
  max: c.value,
251
251
  value: l.value,
252
252
  style: Q({ zIndex: l.value <= s.value || l.value >= o.value ? 5 : 4 }),
253
- onInput: I,
254
- onChange: I
253
+ onInput: _,
254
+ onChange: _
255
255
  }, null, 44, bt),
256
256
  i("input", {
257
257
  type: "range",
@@ -264,7 +264,7 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
264
264
  onChange: k
265
265
  }, null, 44, xt)
266
266
  ], 4),
267
- (R = e.scaleHints) != null && R.length ? (g(), M("div", wt, [
267
+ (S = e.scaleHints) != null && S.length ? (g(), M("div", wt, [
268
268
  (g(!0), M(D, null, Y(e.scaleHints, (A) => (g(), M("span", { key: A }, b(A), 1))), 128))
269
269
  ])) : K("", !0)
270
270
  ]);
@@ -296,7 +296,7 @@ function ke(e, t = "en-US") {
296
296
  function kt(e) {
297
297
  return e.Fee == null ? e._meta ? "free" : "—" : `${(e.Fee * 100).toFixed(0)}%`;
298
298
  }
299
- function Ie(e, t = "en-US") {
299
+ function _e(e, t = "en-US") {
300
300
  if (!e) return "—";
301
301
  const a = new Date(e);
302
302
  return isNaN(a.getTime()) ? "—" : a.toLocaleString(t, {
@@ -308,7 +308,7 @@ function Ie(e, t = "en-US") {
308
308
  hour12: !1
309
309
  });
310
310
  }
311
- function It(e) {
311
+ function _t(e) {
312
312
  if (e == null) return "—";
313
313
  if (e < 30) return `${e}d`;
314
314
  const t = Math.floor(e / 30);
@@ -319,10 +319,10 @@ function It(e) {
319
319
  function de(e) {
320
320
  return e >= 1e6 ? "$" + (e / 1e6).toFixed(2) + "M" : e >= 1e3 ? "$" + Math.round(e / 1e3) + "K" : "$" + Math.round(e);
321
321
  }
322
- function _t(e) {
322
+ function It(e) {
323
323
  return e >= 1e3 ? (e / 1e3).toFixed(1).replace(/\.0$/, "") + "K%" : Math.round(e) + "%";
324
324
  }
325
- function St(e) {
325
+ function Rt(e) {
326
326
  return e && e.trim().split(/\s+/).slice(0, 2).map((a) => a.charAt(0).toUpperCase()).join("") || "?";
327
327
  }
328
328
  function W(e) {
@@ -330,7 +330,7 @@ function W(e) {
330
330
  const t = new Date(e);
331
331
  return isNaN(t.getTime()) ? null : Math.floor((Date.now() - t.getTime()) / 864e5);
332
332
  }
333
- const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _e = (e) => e <= 0 ? 0 : Math.max(1, Math.min(100, Math.round(1 + (Math.log10(e) - 1) * 99 / 6))), ie = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, (e - 1) / 99 * 4.7)), Rt = { class: "pelican-fgroup" }, Pt = { class: "title-row" }, Ct = { class: "val" }, Tt = ["value"], At = /* @__PURE__ */ F({
333
+ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), Ie = (e) => e <= 0 ? 0 : Math.max(1, Math.min(100, Math.round(1 + (Math.log10(e) - 1) * 99 / 6))), ie = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, (e - 1) / 99 * 4.7)), St = { class: "pelican-fgroup" }, Pt = { class: "title-row" }, Ct = { class: "val" }, Tt = ["value"], At = /* @__PURE__ */ F({
334
334
  __name: "InvestAmount",
335
335
  props: {
336
336
  modelValue: {}
@@ -351,9 +351,9 @@ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _
351
351
  n("update:modelValue", null), n("apply", null);
352
352
  return;
353
353
  }
354
- n("update:modelValue", r), n("apply", { min: _e(50), max: _e(r) });
354
+ n("update:modelValue", r), n("apply", { min: Ie(50), max: Ie(r) });
355
355
  }
356
- return (l, o) => (g(), M("div", Rt, [
356
+ return (l, o) => (g(), M("div", St, [
357
357
  i("div", Pt, [
358
358
  o[0] || (o[0] = i("label", { class: "title" }, "Your Investment Amount, $", -1)),
359
359
  i("span", Ct, b(s.value), 1)
@@ -369,7 +369,7 @@ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _
369
369
  }, null, 40, Tt)
370
370
  ]));
371
371
  }
372
- }), Ft = /* @__PURE__ */ N(At, [["__scopeId", "data-v-a76acc6c"]]), Nt = { class: "ftitle-row" }, Lt = /* @__PURE__ */ F({
372
+ }), Ft = /* @__PURE__ */ N(At, [["__scopeId", "data-v-a76acc6c"]]), Nt = { class: "ftitle-row" }, Dt = /* @__PURE__ */ F({
373
373
  __name: "FiltersPanel",
374
374
  props: {
375
375
  filters: {},
@@ -379,20 +379,20 @@ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _
379
379
  emits: ["update:filters", "update:investAmount", "reset"],
380
380
  setup(e, { emit: t }) {
381
381
  const a = e, n = t, s = P(0), c = P(100), l = P(0), o = P(100);
382
- V(s, (v) => {
382
+ U(s, (v) => {
383
383
  n("update:filters", { retMin: v <= 0 ? null : ie(v) });
384
- }), V(c, (v) => {
384
+ }), U(c, (v) => {
385
385
  n("update:filters", { retMax: v >= 100 ? null : ie(v) });
386
- }), V(l, (v) => {
386
+ }), U(l, (v) => {
387
387
  n("update:filters", { balanceMin: v <= 0 ? null : oe(v) });
388
- }), V(o, (v) => {
388
+ }), U(o, (v) => {
389
389
  n("update:filters", { balanceMax: v >= 100 ? null : oe(v) });
390
- }), V(
390
+ }), U(
391
391
  () => [a.filters.retMin, a.filters.retMax],
392
392
  ([v, d]) => {
393
393
  v == null && (s.value = 0), d == null && (c.value = 100);
394
394
  }
395
- ), V(
395
+ ), U(
396
396
  () => [a.filters.balanceMin, a.filters.balanceMax],
397
397
  ([v, d]) => {
398
398
  v == null && (l.value = 0), d == null && (o.value = 100);
@@ -408,7 +408,7 @@ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _
408
408
  v == null ? (r({ balanceMin: null, balanceMax: null }), l.value = 0, o.value = 100) : (l.value = v.min, o.value = v.max);
409
409
  }
410
410
  return (v, d) => (g(), M("aside", {
411
- class: B(["pelican-filters", { open: e.open }])
411
+ class: E(["pelican-filters", { open: e.open }])
412
412
  }, [
413
413
  i("div", Nt, [
414
414
  d[13] || (d[13] = i("label", { class: "ftitle" }, "Risk", -1)),
@@ -431,7 +431,7 @@ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _
431
431
  label: "Return %",
432
432
  "model-value-min": s.value,
433
433
  "model-value-max": c.value,
434
- "format-raw": (u) => p(_t)(u),
434
+ "format-raw": (u) => p(It)(u),
435
435
  "raw-to-domain": (u) => p(ie)(u),
436
436
  "scale-hints": ["0%", "200%", "50K%+"],
437
437
  "max-label": "50K%+",
@@ -518,7 +518,7 @@ const oe = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), _
518
518
  }, null, 8, ["model-value", "format"])
519
519
  ], 2));
520
520
  }
521
- }), Dt = /* @__PURE__ */ N(Lt, [["__scopeId", "data-v-67cc5448"]]), Se = [
521
+ }), Lt = /* @__PURE__ */ N(Dt, [["__scopeId", "data-v-67cc5448"]]), Re = [
522
522
  "#f97316",
523
523
  "#3b82f6",
524
524
  "#10b981",
@@ -545,16 +545,16 @@ function Ut(e, t = 140, a = 34) {
545
545
  startX: 1,
546
546
  endX: t - 1
547
547
  };
548
- const n = e.map((S) => Date.parse(S.Timestamp)), s = n[0], c = n[n.length - 1], l = c - s || 1, o = e.map((S) => S.AccountReturn), r = Math.min(0, ...o), h = Math.max(0, ...o) - r || 1, v = (S) => (S - s) / l * (t - 2) + 1, d = (S) => a - 2 - (S - r) / h * (a - 4), u = e.map((S, x) => `${v(n[x]).toFixed(1)},${d(S.AccountReturn).toFixed(1)}`), I = o[o.length - 1], k = d(0), _ = v(s), f = v(c), R = `M ${u.join(" L ")}`, A = `M ${u[0]} ` + u.slice(1).map((S) => `L ${S}`).join(" ") + ` L ${f.toFixed(1)},${k.toFixed(1)} L ${_.toFixed(1)},${k.toFixed(1)} Z`;
548
+ const n = e.map((R) => Date.parse(R.Timestamp)), s = n[0], c = n[n.length - 1], l = c - s || 1, o = e.map((R) => R.AccountReturn), r = Math.min(0, ...o), h = Math.max(0, ...o) - r || 1, v = (R) => (R - s) / l * (t - 2) + 1, d = (R) => a - 2 - (R - r) / h * (a - 4), u = e.map((R, x) => `${v(n[x]).toFixed(1)},${d(R.AccountReturn).toFixed(1)}`), _ = o[o.length - 1], k = d(0), I = v(s), f = v(c), S = `M ${u.join(" L ")}`, A = `M ${u[0]} ` + u.slice(1).map((R) => `L ${R}`).join(" ") + ` L ${f.toFixed(1)},${k.toFixed(1)} L ${I.toFixed(1)},${k.toFixed(1)} Z`;
549
549
  return {
550
550
  hasData: !0,
551
551
  width: t,
552
552
  height: a,
553
553
  zeroY: k,
554
554
  areaPath: A,
555
- linePath: R,
556
- positive: I >= 0,
557
- startX: _,
555
+ linePath: S,
556
+ positive: _ >= 0,
557
+ startX: I,
558
558
  endX: f
559
559
  };
560
560
  }
@@ -563,20 +563,20 @@ function Vt(e, t = 520, a = 280) {
563
563
  let h = -Math.PI / 2;
564
564
  const v = [];
565
565
  return n.forEach((d, u) => {
566
- const I = (d.c || 0) / s, k = I * Math.PI * 2, _ = h, f = h + k;
566
+ const _ = (d.c || 0) / s, k = _ * Math.PI * 2, I = h, f = h + k;
567
567
  h = f;
568
- const R = (_ + f) / 2, A = k > Math.PI ? 1 : 0, S = c + o * Math.cos(_), x = l + o * Math.sin(_), w = c + o * Math.cos(f), y = l + o * Math.sin(f), C = c + r * Math.cos(_), O = l + r * Math.sin(_), z = c + r * Math.cos(f), E = l + r * Math.sin(f), U = `M ${S.toFixed(2)} ${x.toFixed(2)} A ${o} ${o} 0 ${A} 1 ${w.toFixed(2)} ${y.toFixed(2)} L ${z.toFixed(2)} ${E.toFixed(2)} A ${r} ${r} 0 ${A} 0 ${C.toFixed(2)} ${O.toFixed(2)} Z`, G = Se[u % Se.length];
568
+ const S = (I + f) / 2, A = k > Math.PI ? 1 : 0, R = c + o * Math.cos(I), x = l + o * Math.sin(I), w = c + o * Math.cos(f), y = l + o * Math.sin(f), C = c + r * Math.cos(I), O = l + r * Math.sin(I), z = c + r * Math.cos(f), V = l + r * Math.sin(f), L = `M ${R.toFixed(2)} ${x.toFixed(2)} A ${o} ${o} 0 ${A} 1 ${w.toFixed(2)} ${y.toFixed(2)} L ${z.toFixed(2)} ${V.toFixed(2)} A ${r} ${r} 0 ${A} 0 ${C.toFixed(2)} ${O.toFixed(2)} Z`, G = Re[u % Re.length];
569
569
  let ve = null, pe = 0, ge = 0, he = "start";
570
- if (I >= 0.015) {
571
- const te = Math.cos(R) < 0, Ne = c + o * Math.cos(R), Le = l + o * Math.sin(R), Z = c + m * Math.cos(R), ae = l + m * Math.sin(R), De = te ? Z - 4 : Z + 4;
572
- ve = `${Ne.toFixed(1)},${Le.toFixed(1)} ${Z.toFixed(1)},${ae.toFixed(1)} ${De.toFixed(1)},${ae.toFixed(1)}`, pe = te ? Z - 6 : Z + 6, ge = ae + 4, he = te ? "end" : "start";
570
+ if (_ >= 0.015) {
571
+ const te = Math.cos(S) < 0, Ne = c + o * Math.cos(S), De = l + o * Math.sin(S), Z = c + m * Math.cos(S), ae = l + m * Math.sin(S), Le = te ? Z - 4 : Z + 4;
572
+ ve = `${Ne.toFixed(1)},${De.toFixed(1)} ${Z.toFixed(1)},${ae.toFixed(1)} ${Le.toFixed(1)},${ae.toFixed(1)}`, pe = te ? Z - 6 : Z + 6, ge = ae + 4, he = te ? "end" : "start";
573
573
  }
574
574
  v.push({
575
575
  marketName: d.n,
576
576
  count: d.c,
577
- fraction: I,
577
+ fraction: _,
578
578
  color: G,
579
- arcPath: U,
579
+ arcPath: L,
580
580
  labelLine: ve,
581
581
  labelX: pe,
582
582
  labelY: ge,
@@ -697,7 +697,7 @@ const Et = ["width", "height"], Bt = ["width", "height", "viewBox"], Ot = ["x2",
697
697
  fill: "var(--text)",
698
698
  "font-weight": "500"
699
699
  }, [
700
- L(b(l.marketName) + " ", 1),
700
+ B(b(l.marketName) + " ", 1),
701
701
  i("tspan", Zt, b(l.count), 1)
702
702
  ], 8, Xt)), [
703
703
  [Me, l.labelLine]
@@ -732,23 +732,23 @@ const Et = ["width", "height"], Bt = ["width", "height", "viewBox"], Ot = ["x2",
732
732
  (g(!0), M(D, null, Y(e.trades ?? [], (l, o) => (g(), M("li", { key: o }, [
733
733
  i("span", sa, b(l.MarketName ?? "—"), 1),
734
734
  i("span", {
735
- class: B(["dir", l.Direction === "Sell" ? "red" : "green"])
735
+ class: E(["dir", l.Direction === "Sell" ? "red" : "green"])
736
736
  }, b(l.Direction ?? ""), 3),
737
737
  i("span", oa, [
738
- L(b(p(Ie)(l.OpenTimestamp, e.locale)) + " ", 1),
738
+ B(b(p(_e)(l.OpenTimestamp, e.locale)) + " ", 1),
739
739
  l.CloseTimestamp ? (g(), M(D, { key: 0 }, [
740
- L(" → " + b(p(Ie)(l.CloseTimestamp, e.locale)), 1)
740
+ B(" → " + b(p(_e)(l.CloseTimestamp, e.locale)), 1)
741
741
  ], 64)) : K("", !0)
742
742
  ]),
743
743
  l.Pnl != null ? (g(), M("span", {
744
744
  key: 0,
745
- class: B(["pnl", l.Pnl >= 0 ? "green" : "red"])
745
+ class: E(["pnl", l.Pnl >= 0 ? "green" : "red"])
746
746
  }, b(p(j)(l.Pnl, e.locale)), 3)) : K("", !0)
747
747
  ]))), 128))
748
748
  ]))
749
749
  ]));
750
750
  }
751
- }), Re = /* @__PURE__ */ N(ia, [["__scopeId", "data-v-aa7cbcd7"]]);
751
+ }), Se = /* @__PURE__ */ N(ia, [["__scopeId", "data-v-aa7cbcd7"]]);
752
752
  function q(e) {
753
753
  const t = e.Wins ?? 0, a = e.Losses ?? 0, n = t + a;
754
754
  return n ? t / n * 100 : -1;
@@ -771,16 +771,16 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
771
771
  }, ka = {
772
772
  class: "c-num",
773
773
  "data-label": "Max DD"
774
- }, Ia = { key: 1 }, _a = {
774
+ }, _a = { key: 1 }, Ia = {
775
775
  class: "c-num",
776
776
  "data-label": "Age"
777
- }, Sa = {
777
+ }, Ra = {
778
778
  class: "c-num",
779
779
  "data-label": "Balance"
780
- }, Ra = {
780
+ }, Sa = {
781
781
  class: "c-num",
782
782
  "data-label": "Fee"
783
- }, Pa = ["href"], Ca = { class: "grid" }, Ta = { class: "col-stats" }, Aa = { class: "field" }, Fa = { class: "value" }, Na = { class: "field" }, La = { class: "value" }, Da = { class: "field" }, Ua = { class: "value" }, Va = { class: "field" }, Ea = { class: "value" }, Ba = { class: "field" }, Oa = { class: "value" }, Ka = { class: "field" }, Ya = { class: "value" }, za = { class: "field" }, Ga = { class: "value" }, Ha = { class: "field" }, ja = { class: "value" }, Wa = { key: 0 }, qa = {
783
+ }, Pa = ["href"], Ca = { class: "grid" }, Ta = { class: "col-stats" }, Aa = { class: "field" }, Fa = { class: "value" }, Na = { class: "field" }, Da = { class: "value" }, La = { class: "field" }, Ua = { class: "value" }, Va = { class: "field" }, Ea = { class: "value" }, Ba = { class: "field" }, Oa = { class: "value" }, Ka = { class: "field" }, Ya = { class: "value" }, za = { class: "field" }, Ga = { class: "value" }, Ha = { class: "field" }, ja = { class: "value" }, Wa = { key: 0 }, qa = {
784
784
  key: 1,
785
785
  class: "dim"
786
786
  }, Xa = { class: "col-donut" }, Za = { class: "trade-toggles" }, Ja = /* @__PURE__ */ F({
@@ -795,27 +795,27 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
795
795
  setup(e, { emit: t }) {
796
796
  const a = e, n = t, s = Ue(Ae, "en-US"), c = $(() => we(a.s.Return, 1)), l = $(() => a.s.MaxDD != null ? we(a.s.MaxDD, 2) : null), o = $(() => W(a.s.Inception)), r = $(() => q(a.s)), m = $(() => r.value >= 0 ? 100 - r.value : -1), h = $(
797
797
  () => {
798
- var _, f;
799
- return ((_ = a.s.Profile) == null ? void 0 : _.Name) ?? ((f = a.s.Profile) != null && f.Id ? "#" + a.s.Profile.Id : "");
798
+ var I, f;
799
+ return ((I = a.s.Profile) == null ? void 0 : I.Name) ?? ((f = a.s.Profile) != null && f.Id ? "#" + a.s.Profile.Id : "");
800
800
  }
801
801
  ), v = $(() => `https://libertex.copy-trade.io/strategy/${a.s.Id}`), d = P(!1), u = P(!1);
802
- function I() {
802
+ function _() {
803
803
  d.value = !d.value, d.value && !a.openTrades && n("load-trades", "open");
804
804
  }
805
805
  function k() {
806
806
  u.value = !u.value, u.value && !a.closedTrades && n("load-trades", "closed");
807
807
  }
808
- return (_, f) => {
809
- var R, A, S, x;
808
+ return (I, f) => {
809
+ var S, A, R, x;
810
810
  return g(), M(D, null, [
811
811
  i("div", {
812
- class: B(["pelican-row", { open: e.expanded }]),
812
+ class: E(["pelican-row", { open: e.expanded }]),
813
813
  "data-id": e.s.Id,
814
814
  onClick: f[3] || (f[3] = (w) => n("toggle"))
815
815
  }, [
816
816
  i("div", da, [
817
817
  i("div", ma, [
818
- i("span", fa, b(p(St)(e.s.Name)), 1),
818
+ i("span", fa, b(p(Rt)(e.s.Name)), 1),
819
819
  e.s.ImageUploaded ? (g(), M("img", {
820
820
  key: 0,
821
821
  class: "avatar-img",
@@ -828,7 +828,7 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
828
828
  ]),
829
829
  i("div", pa, [
830
830
  i("div", ga, [
831
- L(b(e.s.Name || "#" + e.s.Id) + " ", 1),
831
+ B(b(e.s.Name || "#" + e.s.Id) + " ", 1),
832
832
  e.s._meta && e.s.Fee == null ? (g(), M("span", ha, "free")) : K("", !0)
833
833
  ]),
834
834
  i("div", ya, b(h.value), 1)
@@ -842,7 +842,7 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
842
842
  i("div", ba, [
843
843
  c.value ? (g(), M("span", {
844
844
  key: 0,
845
- class: B(c.value.positive ? "green" : "red")
845
+ class: E(c.value.positive ? "green" : "red")
846
846
  }, b(c.value.text), 3)) : (g(), M("span", xa, "—"))
847
847
  ]),
848
848
  i("div", wa, b(p(ke)(e.s.NumCopiers, p(s))), 1),
@@ -850,12 +850,12 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
850
850
  i("div", ka, [
851
851
  l.value ? (g(), M("span", {
852
852
  key: 0,
853
- class: B(l.value.positive ? "green" : "red")
854
- }, b(l.value.text), 3)) : (g(), M("span", Ia, "—"))
853
+ class: E(l.value.positive ? "green" : "red")
854
+ }, b(l.value.text), 3)) : (g(), M("span", _a, "—"))
855
855
  ]),
856
- i("div", _a, b(p(It)(o.value)), 1),
857
- i("div", Sa, b(p($e)(e.s.AccountBalance, p(s))), 1),
858
- i("div", Ra, b(p(kt)(e.s)), 1),
856
+ i("div", Ia, b(p(_t)(o.value)), 1),
857
+ i("div", Ra, b(p($e)(e.s.AccountBalance, p(s))), 1),
858
+ i("div", Sa, b(p(kt)(e.s)), 1),
859
859
  i("div", {
860
860
  class: "c-link",
861
861
  onClick: f[2] || (f[2] = ne(() => {
@@ -869,7 +869,7 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
869
869
  onClick: f[1] || (f[1] = ne(() => {
870
870
  }, ["stop"]))
871
871
  }, " Get connected ", 8, Pa),
872
- X(_.$slots, "row-actions", { strategy: e.s }, void 0, !0)
872
+ X(I.$slots, "row-actions", { strategy: e.s }, void 0, !0)
873
873
  ])
874
874
  ], 10, ca),
875
875
  e.expanded ? (g(), M("div", {
@@ -886,9 +886,9 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
886
886
  ]),
887
887
  i("div", Na, [
888
888
  f[6] || (f[6] = i("div", { class: "label" }, "Monthly profit", -1)),
889
- i("div", La, b(p(j)(e.s.MonthlyProfit, p(s))), 1)
889
+ i("div", Da, b(p(j)(e.s.MonthlyProfit, p(s))), 1)
890
890
  ]),
891
- i("div", Da, [
891
+ i("div", La, [
892
892
  f[7] || (f[7] = i("div", { class: "label" }, "Yearly profit", -1)),
893
893
  i("div", Ua, b(p(j)(e.s.YearlyProfit, p(s))), 1)
894
894
  ]),
@@ -924,27 +924,27 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
924
924
  ]),
925
925
  i("div", Za, [
926
926
  i("button", {
927
- class: B(["pill", { on: d.value }]),
927
+ class: E(["pill", { on: d.value }]),
928
928
  type: "button",
929
- onClick: I
929
+ onClick: _
930
930
  }, b(d.value ? "Hide" : "Open Trades"), 3),
931
931
  i("button", {
932
- class: B(["pill", { on: u.value }]),
932
+ class: E(["pill", { on: u.value }]),
933
933
  type: "button",
934
934
  onClick: k
935
935
  }, b(u.value ? "Hide" : "Trade History"), 3)
936
936
  ]),
937
- d.value ? (g(), ue(Re, {
937
+ d.value ? (g(), ue(Se, {
938
938
  key: 0,
939
939
  kind: "open",
940
- trades: ((R = e.openTrades) == null ? void 0 : R.trades) ?? null,
940
+ trades: ((S = e.openTrades) == null ? void 0 : S.trades) ?? null,
941
941
  loading: !!((A = e.openTrades) != null && A.loading),
942
942
  locale: p(s)
943
943
  }, null, 8, ["trades", "loading", "locale"])) : K("", !0),
944
- u.value ? (g(), ue(Re, {
944
+ u.value ? (g(), ue(Se, {
945
945
  key: 1,
946
946
  kind: "closed",
947
- trades: ((S = e.closedTrades) == null ? void 0 : S.trades) ?? null,
947
+ trades: ((R = e.closedTrades) == null ? void 0 : R.trades) ?? null,
948
948
  loading: !!((x = e.closedTrades) != null && x.loading),
949
949
  locale: p(s)
950
950
  }, null, 8, ["trades", "loading", "locale"])) : K("", !0)
@@ -983,7 +983,7 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
983
983
  (g(!0), M(D, null, Y(e.range, (r, m) => (g(), M(D, { key: m }, [
984
984
  r === "…" ? (g(), M("span", an, "…")) : (g(), M("button", {
985
985
  key: 1,
986
- class: B(["page", { cur: r === e.page }]),
986
+ class: E(["page", { cur: r === e.page }]),
987
987
  onClick: (h) => s(r)
988
988
  }, b(r), 11, nn))
989
989
  ], 64))), 128)),
@@ -992,7 +992,7 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
992
992
  onClick: o[1] || (o[1] = (r) => s("next"))
993
993
  }, "next ›", 8, ln),
994
994
  i("span", sn, [
995
- o[2] || (o[2] = L(" go to ", -1)),
995
+ o[2] || (o[2] = B(" go to ", -1)),
996
996
  i("input", {
997
997
  type: "number",
998
998
  min: 1,
@@ -1038,14 +1038,14 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
1038
1038
  o[2] || (o[2] = i("div", null, "Equity curve", -1)),
1039
1039
  (g(), M(D, null, Y(s, (r) => i("div", {
1040
1040
  key: r.key,
1041
- class: B(["c-num sortable", c(r.key)]),
1041
+ class: E(["c-num sortable", c(r.key)]),
1042
1042
  onClick: (m) => n("toggle-sort", r.key)
1043
1043
  }, b(r.label), 11, mn)), 64)),
1044
1044
  o[3] || (o[3] = i("div", null, null, -1))
1045
1045
  ]),
1046
1046
  e.pageItems.length === 0 ? (g(), M("div", fn, [
1047
1047
  X(l.$slots, "empty", {}, () => [
1048
- o[4] || (o[4] = L("No matches.", -1))
1048
+ o[4] || (o[4] = B("No matches.", -1))
1049
1049
  ], !0)
1050
1050
  ])) : (g(!0), M(D, { key: 1 }, Y(e.pageItems, (r) => (g(), ue(Qa, {
1051
1051
  key: r.Id,
@@ -1073,7 +1073,7 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
1073
1073
  }), pn = /* @__PURE__ */ N(vn, [["__scopeId", "data-v-c61b9ce8"]]), gn = {
1074
1074
  key: 0,
1075
1075
  class: "pelican-progress"
1076
- }, hn = { class: "bar" }, yn = { class: "caption" }, Mn = { class: "hint" }, bn = /* @__PURE__ */ F({
1076
+ }, hn = { class: "bar" }, yn = { class: "caption" }, Mn = /* @__PURE__ */ F({
1077
1077
  __name: "ProgressBar",
1078
1078
  props: {
1079
1079
  loaded: {},
@@ -1090,24 +1090,18 @@ const ra = Symbol("pelican.apiBase"), ua = Symbol("pelican.catalogBase"), Ae = S
1090
1090
  style: Q({ width: a.value.toFixed(1) + "%" })
1091
1091
  }, null, 4)
1092
1092
  ]),
1093
- i("div", yn, [
1094
- s[0] || (s[0] = L(" Building full catalog: ", -1)),
1095
- i("b", null, b(e.loaded.toLocaleString("en-US")), 1),
1096
- L(" / " + b(e.total.toLocaleString("en-US")) + " strategies (" + b(a.value.toFixed(0)) + "%) · ", 1),
1097
- s[1] || (s[1] = i("i", null, "upstream rate-limited", -1))
1098
- ]),
1099
- i("div", Mn, " All " + b(e.total.toLocaleString("en-US")) + " strategies are visible. Stats fill in as the build progresses; refresh of data every 20 sec. ", 1)
1093
+ i("div", yn, "Refreshing strategy data · " + b(a.value.toFixed(0)) + "%", 1)
1100
1094
  ])) : K("", !0);
1101
1095
  }
1102
- }), xn = /* @__PURE__ */ N(bn, [["__scopeId", "data-v-8767a909"]]), Fe = "pelican-theme";
1103
- function wn(e = "auto") {
1104
- const t = $n(), a = P(t ?? e), n = P("dark"), s = typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null, c = () => {
1096
+ }), bn = /* @__PURE__ */ N(Mn, [["__scopeId", "data-v-032fb4e2"]]), Fe = "pelican-theme";
1097
+ function xn(e = "auto") {
1098
+ const t = wn(), a = P(t ?? e), n = P("dark"), s = typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null, c = () => {
1105
1099
  const m = a.value;
1106
1100
  n.value = m === "dark" ? "dark" : m === "light" ? "light" : s != null && s.matches ? "dark" : "light";
1107
1101
  }, l = () => {
1108
1102
  a.value === "auto" && c();
1109
1103
  };
1110
- s && (s.addEventListener ? s.addEventListener("change", l) : s.addListener(l)), V(a, (m) => {
1104
+ s && (s.addEventListener ? s.addEventListener("change", l) : s.addListener(l)), U(a, (m) => {
1111
1105
  try {
1112
1106
  localStorage.setItem(Fe, m);
1113
1107
  } catch {
@@ -1124,7 +1118,7 @@ function wn(e = "auto") {
1124
1118
  }
1125
1119
  return { mode: a, resolved: n, setMode: o, cycle: r };
1126
1120
  }
1127
- function $n() {
1121
+ function wn() {
1128
1122
  try {
1129
1123
  const e = localStorage.getItem(Fe);
1130
1124
  return e === "dark" || e === "light" || e === "auto" ? e : null;
@@ -1157,7 +1151,7 @@ function ee(e, t) {
1157
1151
  const a = e.endsWith("/") ? e.slice(0, -1) : e, n = t.startsWith("/") ? t : "/" + t;
1158
1152
  return a + n;
1159
1153
  }
1160
- function kn({ apiBase: e, catalogBase: t, onError: a }) {
1154
+ function $n({ apiBase: e, catalogBase: t, onError: a }) {
1161
1155
  const n = Ee(/* @__PURE__ */ new Map()), s = P(!1), c = P(!1), l = P(0), o = P(0), r = P(null), m = $(() => Array.from(n.value.values()));
1162
1156
  let h = !1;
1163
1157
  const v = (y) => {
@@ -1166,12 +1160,12 @@ function kn({ apiBase: e, catalogBase: t, onError: a }) {
1166
1160
  const y = t == null ? void 0 : t.value;
1167
1161
  return !!y && y !== e.value;
1168
1162
  }, u = () => (t == null ? void 0 : t.value) || e.value;
1169
- async function I(y) {
1163
+ async function _(y) {
1170
1164
  try {
1171
1165
  const O = await re(y ? "/api/strategies-full?partial=1" : "/api/strategies-full", u());
1172
1166
  o.value = O.length;
1173
1167
  const z = n.value;
1174
- for (const E of O) z.set(E.Id, { ...z.get(E.Id), ...E });
1168
+ for (const V of O) z.set(V.Id, { ...z.get(V.Id), ...V });
1175
1169
  le(n);
1176
1170
  } catch (C) {
1177
1171
  v(C);
@@ -1185,12 +1179,12 @@ function kn({ apiBase: e, catalogBase: t, onError: a }) {
1185
1179
  return v(y), null;
1186
1180
  }
1187
1181
  }
1188
- async function _() {
1182
+ async function I() {
1189
1183
  if (d()) {
1190
- await I(!1), k(), s.value = !0;
1184
+ await _(!1), k(), s.value = !0;
1191
1185
  return;
1192
1186
  }
1193
- await I(!0);
1187
+ await _(!0);
1194
1188
  let y = Date.now();
1195
1189
  for (; !h; ) {
1196
1190
  const C = await k();
@@ -1199,23 +1193,23 @@ function kn({ apiBase: e, catalogBase: t, onError: a }) {
1199
1193
  continue;
1200
1194
  }
1201
1195
  if (C.ready) break;
1202
- Date.now() - y > je && (await I(!0), y = Date.now()), await Ce(He);
1196
+ Date.now() - y > je && (await _(!0), y = Date.now()), await Ce(He);
1203
1197
  }
1204
- h || (await I(!1), s.value = !0);
1198
+ h || (await _(!1), s.value = !0);
1205
1199
  }
1206
1200
  const f = /* @__PURE__ */ new Set();
1207
- async function R(y) {
1201
+ async function S(y) {
1208
1202
  var O;
1209
1203
  if (f.has(y)) return;
1210
1204
  const C = n.value.get(y);
1211
1205
  if (!(C != null && C._enrichAttempted && C._meta && C._stats && ((O = C.History) != null && O.length))) {
1212
1206
  f.add(y);
1213
1207
  try {
1214
- const [z, E] = await Promise.all([
1208
+ const [z, V] = await Promise.all([
1215
1209
  Pe(ee(e.value, `/api/strategies/${y}`)),
1216
1210
  Pe(ee(e.value, `/api/strategies/${y}/stats`))
1217
- ]), U = n.value, G = U.get(y) ?? { Id: y };
1218
- In(G, z), _n(G, E), G._enrichAttempted = !0, G.IsEnabled === !1 ? U.delete(y) : U.set(y, G), le(n);
1211
+ ]), L = n.value, G = L.get(y) ?? { Id: y };
1212
+ kn(G, z), _n(G, V), G._enrichAttempted = !0, G.IsEnabled === !1 ? L.delete(y) : L.set(y, G), le(n);
1219
1213
  } finally {
1220
1214
  f.delete(y);
1221
1215
  }
@@ -1228,23 +1222,23 @@ function kn({ apiBase: e, catalogBase: t, onError: a }) {
1228
1222
  `/api/strategies?filter=${encodeURIComponent(y)}`,
1229
1223
  e.value
1230
1224
  ), O = n.value, z = [];
1231
- let E = 0;
1232
- for (const U of C)
1233
- O.has(U.Id) || (O.set(U.Id, { ...U, _stats: !1, _meta: !1 }), z.push(U.Id), E++);
1234
- E && (o.value += E, le(n));
1235
- for (const U of z) R(U);
1225
+ let V = 0;
1226
+ for (const L of C)
1227
+ O.has(L.Id) || (O.set(L.Id, { ...L, _stats: !1, _meta: !1 }), z.push(L.Id), V++);
1228
+ V && (o.value += V, le(n));
1229
+ for (const L of z) S(L);
1236
1230
  } catch (C) {
1237
1231
  v(C);
1238
1232
  }
1239
1233
  }
1240
- function S() {
1241
- h = !1, _();
1234
+ function R() {
1235
+ h = !1, I();
1242
1236
  }
1243
1237
  function x() {
1244
1238
  h = !0;
1245
1239
  }
1246
1240
  async function w() {
1247
- x(), n.value = /* @__PURE__ */ new Map(), s.value = !1, l.value = 0, o.value = 0, r.value = null, S();
1241
+ x(), n.value = /* @__PURE__ */ new Map(), s.value = !1, l.value = 0, o.value = 0, r.value = null, R();
1248
1242
  }
1249
1243
  return fe(x), {
1250
1244
  catalog: m,
@@ -1253,10 +1247,10 @@ function kn({ apiBase: e, catalogBase: t, onError: a }) {
1253
1247
  loaded: l,
1254
1248
  total: o,
1255
1249
  builtAt: r,
1256
- enrichOne: R,
1250
+ enrichOne: S,
1257
1251
  searchExtra: A,
1258
1252
  refresh: w,
1259
- start: S,
1253
+ start: R,
1260
1254
  stop: x
1261
1255
  };
1262
1256
  }
@@ -1268,13 +1262,13 @@ async function Pe(e) {
1268
1262
  return null;
1269
1263
  }
1270
1264
  }
1271
- function In(e, t) {
1265
+ function kn(e, t) {
1272
1266
  t && (e.Name = t.Name ?? e.Name, e.NumCopiers = t.NumCopiers ?? null, e.Fee = t.Fee ?? null, e.RiskProfile = t.RiskProfile ?? null, e.IsSimulated = t.IsSimulated ?? !1, t.IsEnabled !== void 0 && (e.IsEnabled = t.IsEnabled), t.ImageUploaded !== void 0 && (e.ImageUploaded = t.ImageUploaded), e.Profile = t.Profile ?? e.Profile, e._meta = !0);
1273
1267
  }
1274
1268
  function _n(e, t) {
1275
1269
  var o, r, m, h, v, d;
1276
1270
  if (!t) return;
1277
- const a = ((o = t.Profitability) == null ? void 0 : o.Inception) ?? {}, n = ((r = t.Trades) == null ? void 0 : r.Inception) ?? {}, s = a.History ?? [], c = s.length > 60 ? Math.ceil(s.length / 60) : 1, l = s.filter((u, I) => I % c === 0 || I === s.length - 1).map((u) => ({ Timestamp: u.Timestamp, AccountReturn: u.AccountReturn }));
1271
+ const a = ((o = t.Profitability) == null ? void 0 : o.Inception) ?? {}, n = ((r = t.Trades) == null ? void 0 : r.Inception) ?? {}, s = a.History ?? [], c = s.length > 60 ? Math.ceil(s.length / 60) : 1, l = s.filter((u, _) => _ % c === 0 || _ === s.length - 1).map((u) => ({ Timestamp: u.Timestamp, AccountReturn: u.AccountReturn }));
1278
1272
  e.Inception = t.Inception ?? e.Inception, e.Currency = t.CurrencyCode || "USD", e.Return = a.UnrealisedReturn != null ? a.UnrealisedReturn * 100 : a.RealisedReturn != null ? a.RealisedReturn * 100 : null, e.MaxDD = a.MaxDrawdown != null ? a.MaxDrawdown * 100 : null, e.RealisedPnl = a.RealisedPnl ?? null, e.UnrealisedPnl = a.UnrealisedPnl ?? null, e.History = l, e.TradesTotal = n.Total ?? 0, e.Wins = n.Wins ?? 0, e.Losses = n.Losses ?? 0, e.Markets = Array.isArray(n.Markets) ? n.Markets.slice(0, 12).map((u) => ({ n: u.MarketName, c: u.Count })) : [], e.AccountBalance = ((m = t.Status) == null ? void 0 : m.Balance) ?? null, e.CopiersAUM = ((h = t.CopiersBalance) == null ? void 0 : h.Balance) ?? null, e.MonthlyProfit = ((v = t.CopiersProfit) == null ? void 0 : v.Month) ?? null, e.YearlyProfit = ((d = t.CopiersProfit) == null ? void 0 : d.Year) ?? null, e._stats = !0;
1279
1273
  }
1280
1274
  function Ce(e) {
@@ -1297,7 +1291,7 @@ function me() {
1297
1291
  search: ""
1298
1292
  };
1299
1293
  }
1300
- function Sn(e, t = {}) {
1294
+ function In(e, t = {}) {
1301
1295
  const a = me(), n = Te({
1302
1296
  ...a,
1303
1297
  ...t,
@@ -1322,7 +1316,7 @@ function Rn(e, t) {
1322
1316
  const n = W(e.Inception);
1323
1317
  return !(t.ageMin != null && (n == null || n < t.ageMin) || t.retMin != null && (e.Return == null || e.Return < t.retMin) || t.retMax != null && (e.Return == null || e.Return > t.retMax) || t.ddMax != null && e.MaxDD != null && Math.abs(e.MaxDD) > t.ddMax);
1324
1318
  }
1325
- const Pn = {
1319
+ const Sn = {
1326
1320
  "return-desc": (e, t) => (t.Return ?? -1e18) - (e.Return ?? -1e18),
1327
1321
  "return-asc": (e, t) => (e.Return ?? 1e18) - (t.Return ?? 1e18),
1328
1322
  "dd-asc": (e, t) => Math.abs(e.MaxDD ?? 1e9) - Math.abs(t.MaxDD ?? 1e9),
@@ -1344,9 +1338,9 @@ const Pn = {
1344
1338
  "monthly-desc": (e, t) => (t.MonthlyProfit ?? -1e18) - (e.MonthlyProfit ?? -1e18),
1345
1339
  "monthly-asc": (e, t) => (e.MonthlyProfit ?? 1e18) - (t.MonthlyProfit ?? 1e18)
1346
1340
  };
1347
- function Cn(e, t = "return-desc") {
1341
+ function Pn(e, t = "return-desc") {
1348
1342
  const a = P(t), n = $(() => {
1349
- const c = Pn[a.value] ?? (() => 0);
1343
+ const c = Sn[a.value] ?? (() => 0);
1350
1344
  return e.value.slice().sort(c);
1351
1345
  });
1352
1346
  function s(c) {
@@ -1362,9 +1356,9 @@ function Cn(e, t = "return-desc") {
1362
1356
  }
1363
1357
  };
1364
1358
  }
1365
- function Tn(e, t) {
1359
+ function Cn(e, t) {
1366
1360
  const a = P(1), n = $(() => Math.max(1, Math.ceil(e.value.length / t)));
1367
- V(n, (l) => {
1361
+ U(n, (l) => {
1368
1362
  a.value > l && (a.value = l), a.value < 1 && (a.value = 1);
1369
1363
  });
1370
1364
  const s = $(() => {
@@ -1394,7 +1388,7 @@ function Tn(e, t) {
1394
1388
  }
1395
1389
  };
1396
1390
  }
1397
- function An(e) {
1391
+ function Tn(e) {
1398
1392
  const t = P(/* @__PURE__ */ new Map()), a = P(/* @__PURE__ */ new Map());
1399
1393
  function n(c, l) {
1400
1394
  return (l === "open" ? t.value : a.value).get(c) ?? null;
@@ -1406,8 +1400,8 @@ function An(e) {
1406
1400
  m.set(c, { loading: !0, trades: null, error: null }), o.value = m;
1407
1401
  let h = "";
1408
1402
  if (l === "closed") {
1409
- const k = /* @__PURE__ */ new Date(), _ = new Date(Date.now() - We * 864e5), f = (R) => R.toISOString().replace(/\.\d+Z$/, "Z");
1410
- h = `?startDate=${encodeURIComponent(f(_))}&endDate=${encodeURIComponent(f(k))}`;
1403
+ const k = /* @__PURE__ */ new Date(), I = new Date(Date.now() - We * 864e5), f = (S) => S.toISOString().replace(/\.\d+Z$/, "Z");
1404
+ h = `?startDate=${encodeURIComponent(f(I))}&endDate=${encodeURIComponent(f(k))}`;
1411
1405
  }
1412
1406
  const v = ee(e.value, `/api/strategies/${c}/signals/${l}${h}`);
1413
1407
  let d = [], u = null;
@@ -1418,12 +1412,12 @@ function An(e) {
1418
1412
  } catch (k) {
1419
1413
  u = k.code ? k : J("fetch_failed", k.message), d = [];
1420
1414
  }
1421
- const I = new Map(o.value);
1422
- I.set(c, { loading: !1, trades: d, error: u }), o.value = I;
1415
+ const _ = new Map(o.value);
1416
+ _.set(c, { loading: !1, trades: d, error: u }), o.value = _;
1423
1417
  }
1424
1418
  return { open: t, closed: a, load: s, get: n };
1425
1419
  }
1426
- const Fn = ["data-theme"], Nn = { class: "brand-row" }, Ln = ["title"], Dn = { "aria-hidden": "true" }, Un = { class: "pelican-main" }, Vn = /* @__PURE__ */ F({
1420
+ const An = ["data-theme"], Fn = { class: "brand-row" }, Nn = ["title"], Dn = { "aria-hidden": "true" }, Ln = { class: "pelican-main" }, Un = /* @__PURE__ */ F({
1427
1421
  __name: "PelicanLibertexSocial",
1428
1422
  props: {
1429
1423
  apiBase: {},
@@ -1439,49 +1433,49 @@ const Fn = ["data-theme"], Nn = { class: "brand-row" }, Ln = ["title"], Dn = { "
1439
1433
  setup(e, { emit: t }) {
1440
1434
  const a = e, n = t;
1441
1435
  se(ra, a.apiBase), se(ua, a.catalogBase ?? a.apiBase), se(Ae, a.locale);
1442
- const s = be(a, "apiBase"), c = be(a, "catalogBase"), l = wn(a.theme);
1443
- V(l.mode, (x) => n("update:theme", x)), V(
1436
+ const s = be(a, "apiBase"), c = be(a, "catalogBase"), l = xn(a.theme);
1437
+ U(l.mode, (x) => n("update:theme", x)), U(
1444
1438
  () => a.theme,
1445
1439
  (x) => l.setMode(x)
1446
1440
  );
1447
- const o = kn({
1441
+ const o = $n({
1448
1442
  apiBase: s,
1449
1443
  catalogBase: c,
1450
1444
  onError: (x) => n("error", x)
1451
- }), r = Sn(o.catalog, a.defaultFilters ?? {}), m = Cn(r.filtered, a.defaultSort), h = Tn(m.sorted, a.pageSize), v = An(s);
1452
- V(h.pageItems, (x) => {
1445
+ }), r = In(o.catalog, a.defaultFilters ?? {}), m = Pn(r.filtered, a.defaultSort), h = Cn(m.sorted, a.pageSize), v = Tn(s);
1446
+ U(h.pageItems, (x) => {
1453
1447
  x.forEach((w) => {
1454
1448
  var y;
1455
1449
  (y = w.History) != null && y.length || o.enrichOne(w.Id);
1456
1450
  });
1457
1451
  }, { immediate: !0 });
1458
- const d = Te(/* @__PURE__ */ new Set()), u = P(!1), I = P(null);
1452
+ const d = Te(/* @__PURE__ */ new Set()), u = P(!1), _ = P(null);
1459
1453
  function k(x) {
1460
1454
  d.has(x) ? d.delete(x) : d.add(x);
1461
1455
  const w = o.catalog.value.find((y) => y.Id === x);
1462
1456
  w && ((!w._meta || !w._stats) && !w._enrichAttempted && o.enrichOne(x), n("select-strategy", w));
1463
1457
  }
1464
- function _(x) {
1458
+ function I(x) {
1465
1459
  m.toggleColumn(x), h.setPage(1);
1466
1460
  }
1467
1461
  function f(x) {
1468
1462
  Object.assign(r.filters, x), h.setPage(1);
1469
1463
  }
1470
- function R() {
1464
+ function S() {
1471
1465
  const x = me();
1472
- Object.assign(r.filters, x), r.filters.risk = x.risk, I.value = null, h.setPage(1);
1466
+ Object.assign(r.filters, x), r.filters.risk = x.risk, _.value = null, h.setPage(1);
1473
1467
  }
1474
1468
  function A({ id: x, kind: w }) {
1475
1469
  v.load(x, w);
1476
1470
  }
1477
- function S(x) {
1471
+ function R(x) {
1478
1472
  x === "prev" ? h.prev() : x === "next" ? h.next() : h.setPage(x);
1479
1473
  }
1480
1474
  return Be(() => o.start()), (x, w) => (g(), M("div", {
1481
1475
  class: "pelican-libsoc",
1482
1476
  "data-theme": p(l).resolved.value
1483
1477
  }, [
1484
- i("header", Nn, [
1478
+ i("header", Fn, [
1485
1479
  X(x.$slots, "brand", {}, () => [
1486
1480
  w[6] || (w[6] = i("div", { class: "default-brand" }, "Libertex Social — Copy Trading", -1))
1487
1481
  ], !0),
@@ -1493,7 +1487,7 @@ const Fn = ["data-theme"], Nn = { class: "brand-row" }, Ln = ["title"], Dn = { "
1493
1487
  (...y) => p(l).cycle && p(l).cycle(...y))
1494
1488
  }, [
1495
1489
  i("span", Dn, b(p(l).resolved.value === "dark" ? "🌙" : "☀️"), 1)
1496
- ], 8, Ln)
1490
+ ], 8, Nn)
1497
1491
  ]),
1498
1492
  T(st, {
1499
1493
  search: p(r).filters.search,
@@ -1507,19 +1501,19 @@ const Fn = ["data-theme"], Nn = { class: "brand-row" }, Ln = ["title"], Dn = { "
1507
1501
  onRefresh: p(o).refresh,
1508
1502
  onToggleFilters: w[3] || (w[3] = (y) => u.value = !u.value)
1509
1503
  }, null, 8, ["search", "sort-key", "total", "filtered-total", "page", "total-pages", "onRefresh"]),
1510
- T(xn, {
1504
+ T(bn, {
1511
1505
  loaded: p(o).loaded.value,
1512
1506
  total: p(o).total.value,
1513
1507
  active: p(o).building.value && !p(o).ready.value
1514
1508
  }, null, 8, ["loaded", "total", "active"]),
1515
- i("main", Un, [
1516
- T(Dt, {
1509
+ i("main", Ln, [
1510
+ T(Lt, {
1517
1511
  filters: p(r).filters,
1518
- "invest-amount": I.value,
1512
+ "invest-amount": _.value,
1519
1513
  open: u.value,
1520
1514
  "onUpdate:filters": f,
1521
- "onUpdate:investAmount": w[4] || (w[4] = (y) => I.value = y),
1522
- onReset: R
1515
+ "onUpdate:investAmount": w[4] || (w[4] = (y) => _.value = y),
1516
+ onReset: S
1523
1517
  }, null, 8, ["filters", "invest-amount", "open"]),
1524
1518
  T(pn, {
1525
1519
  "page-items": p(h).pageItems.value,
@@ -1531,14 +1525,14 @@ const Fn = ["data-theme"], Nn = { class: "brand-row" }, Ln = ["title"], Dn = { "
1531
1525
  "open-signals": p(v).open.value,
1532
1526
  "closed-signals": p(v).closed.value,
1533
1527
  onToggleRow: k,
1534
- onToggleSort: _,
1528
+ onToggleSort: I,
1535
1529
  onLoadTrades: A,
1536
1530
  onSelect: w[5] || (w[5] = (y) => n("select-strategy", y)),
1537
- onGo: S
1531
+ onGo: R
1538
1532
  }, {
1539
1533
  empty: ce(() => [
1540
1534
  X(x.$slots, "empty", {}, () => [
1541
- w[7] || (w[7] = L("No matches.", -1))
1535
+ w[7] || (w[7] = B("No matches.", -1))
1542
1536
  ], !0)
1543
1537
  ]),
1544
1538
  "row-actions": ce((y) => [
@@ -1547,11 +1541,11 @@ const Fn = ["data-theme"], Nn = { class: "brand-row" }, Ln = ["title"], Dn = { "
1547
1541
  _: 3
1548
1542
  }, 8, ["page-items", "expanded", "sort-key", "page", "total-pages", "page-range", "open-signals", "closed-signals"])
1549
1543
  ])
1550
- ], 8, Fn));
1544
+ ], 8, An));
1551
1545
  }
1552
- }), Bn = /* @__PURE__ */ N(Vn, [["__scopeId", "data-v-e2cce41d"]]);
1546
+ }), En = /* @__PURE__ */ N(Un, [["__scopeId", "data-v-e2cce41d"]]);
1553
1547
  export {
1554
- Bn as PelicanLibertexSocial,
1548
+ En as PelicanLibertexSocial,
1555
1549
  qe as SORT_KEYS,
1556
1550
  Xe as SORT_LABELS,
1557
1551
  Ze as SORT_TOGGLE,