@mashkovd/pelican-vue 0.2.0 → 0.3.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.
- package/README.md +15 -1
- package/dist/index.d.ts +8 -0
- package/dist/pelican-libertex-social.mjs +607 -598
- package/dist/pelican-libertex-social.mjs.map +1 -1
- package/dist/pelican-libertex-social.umd.cjs +1 -1
- package/dist/pelican-libertex-social.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { onScopeDispose as
|
|
1
|
+
import { onScopeDispose as de, defineComponent as F, ref as R, watch as E, openBlock as p, createElementBlock as y, createElementVNode as o, createTextVNode as D, toDisplayString as b, Fragment as U, renderList as K, unref as v, normalizeClass as B, computed as k, createCommentVNode as O, createVNode as P, withDirectives as ge, vShow as he, inject as De, withModifiers as te, renderSlot as q, createBlock as ie, withCtx as re, mergeProps as Ue, normalizeStyle as Ve, shallowRef as Ee, triggerRef as ae, reactive as Pe, provide as ne, toRef as ye, 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) => {
|
|
5
5
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
6
6
|
a = null, e(...c);
|
|
7
7
|
}, t);
|
|
8
|
-
},
|
|
8
|
+
}, s = () => {
|
|
9
9
|
a && (clearTimeout(a), a = null);
|
|
10
10
|
};
|
|
11
|
-
return
|
|
11
|
+
return de(s), { wrapped: n, cancel: s };
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const Ge = 20, ze = 350, He = 2e3, je = 2e4, We = 30, qe = [
|
|
14
14
|
"return-desc",
|
|
15
15
|
"return-asc",
|
|
16
16
|
"copiers-desc",
|
|
@@ -60,7 +60,7 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
|
|
|
60
60
|
fee: ["fee-asc", "fee-desc"],
|
|
61
61
|
age: ["age-desc", "age-asc"],
|
|
62
62
|
balance: ["balance-desc", "balance-asc"]
|
|
63
|
-
}, Je = { class: "pelican-toolbar" }, Qe = { class: "counts" }, et = ["value"], tt = { class: "sort" }, at = ["value"], nt = ["value"], lt = /* @__PURE__ */
|
|
63
|
+
}, Je = { class: "pelican-toolbar" }, Qe = { class: "counts" }, et = ["value"], tt = { class: "sort" }, at = ["value"], nt = ["value"], lt = /* @__PURE__ */ F({
|
|
64
64
|
__name: "Toolbar",
|
|
65
65
|
props: {
|
|
66
66
|
search: {},
|
|
@@ -72,91 +72,91 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
|
|
|
72
72
|
},
|
|
73
73
|
emits: ["update:search", "update:sortKey", "refresh", "toggle-filters"],
|
|
74
74
|
setup(e, { emit: t }) {
|
|
75
|
-
const a = e, n = t,
|
|
76
|
-
|
|
75
|
+
const a = e, n = t, s = R(a.search);
|
|
76
|
+
E(
|
|
77
77
|
() => a.search,
|
|
78
78
|
(u) => {
|
|
79
|
-
u !==
|
|
79
|
+
u !== s.value && (s.value = u);
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
|
-
const { wrapped: c } = Ye((u) => n("update:search", u),
|
|
82
|
+
const { wrapped: c } = Ye((u) => n("update:search", u), ze);
|
|
83
83
|
function l(u) {
|
|
84
84
|
const m = u.target.value;
|
|
85
|
-
|
|
85
|
+
s.value = m, c(m);
|
|
86
86
|
}
|
|
87
87
|
function i(u) {
|
|
88
88
|
n("update:sortKey", u.target.value);
|
|
89
89
|
}
|
|
90
|
-
return (u, m) => (
|
|
91
|
-
|
|
90
|
+
return (u, m) => (p(), y("div", Je, [
|
|
91
|
+
o("button", {
|
|
92
92
|
class: "btn-flat filters-toggle",
|
|
93
93
|
type: "button",
|
|
94
|
-
onClick: m[0] || (m[0] = (
|
|
94
|
+
onClick: m[0] || (m[0] = (g) => n("toggle-filters"))
|
|
95
95
|
}, " Filters "),
|
|
96
|
-
|
|
97
|
-
m[2] || (m[2] =
|
|
98
|
-
|
|
99
|
-
m[3] || (m[3] =
|
|
100
|
-
|
|
101
|
-
m[4] || (m[4] =
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
o("div", Qe, [
|
|
97
|
+
m[2] || (m[2] = D(" Showing ", -1)),
|
|
98
|
+
o("b", null, b(e.filteredTotal.toLocaleString("en-US")), 1),
|
|
99
|
+
m[3] || (m[3] = D(" of ", -1)),
|
|
100
|
+
o("b", null, b(e.total.toLocaleString("en-US")), 1),
|
|
101
|
+
m[4] || (m[4] = D(" · page ", -1)),
|
|
102
|
+
o("b", null, b(e.page), 1),
|
|
103
|
+
D(" / " + b(e.totalPages), 1)
|
|
104
104
|
]),
|
|
105
|
-
|
|
105
|
+
o("input", {
|
|
106
106
|
class: "search",
|
|
107
107
|
type: "search",
|
|
108
108
|
placeholder: "Search by signal name…",
|
|
109
109
|
autocomplete: "off",
|
|
110
|
-
value:
|
|
110
|
+
value: s.value,
|
|
111
111
|
onInput: l
|
|
112
112
|
}, null, 40, et),
|
|
113
|
-
|
|
114
|
-
m[5] || (m[5] =
|
|
115
|
-
|
|
113
|
+
o("div", tt, [
|
|
114
|
+
m[5] || (m[5] = o("label", null, "Sort:", -1)),
|
|
115
|
+
o("select", {
|
|
116
116
|
value: e.sortKey,
|
|
117
117
|
onChange: i
|
|
118
118
|
}, [
|
|
119
|
-
(
|
|
120
|
-
key:
|
|
121
|
-
value:
|
|
122
|
-
},
|
|
119
|
+
(p(!0), y(U, null, K(v(qe), (g) => (p(), y("option", {
|
|
120
|
+
key: g,
|
|
121
|
+
value: g
|
|
122
|
+
}, b(v(Xe)[g]), 9, nt))), 128))
|
|
123
123
|
], 40, at)
|
|
124
124
|
]),
|
|
125
|
-
|
|
125
|
+
o("button", {
|
|
126
126
|
class: "btn-flat",
|
|
127
127
|
type: "button",
|
|
128
128
|
title: "reload",
|
|
129
|
-
onClick: m[1] || (m[1] = (
|
|
129
|
+
onClick: m[1] || (m[1] = (g) => n("refresh"))
|
|
130
130
|
}, " ↻ reload ")
|
|
131
131
|
]));
|
|
132
132
|
}
|
|
133
|
-
}),
|
|
133
|
+
}), N = (e, t) => {
|
|
134
134
|
const a = e.__vccOpts || e;
|
|
135
|
-
for (const [n,
|
|
136
|
-
a[n] =
|
|
135
|
+
for (const [n, s] of t)
|
|
136
|
+
a[n] = s;
|
|
137
137
|
return a;
|
|
138
|
-
}, st = /* @__PURE__ */
|
|
138
|
+
}, st = /* @__PURE__ */ N(lt, [["__scopeId", "data-v-9803823c"]]), ot = { class: "pelican-chips" }, it = ["onClick"], rt = /* @__PURE__ */ F({
|
|
139
139
|
__name: "RiskChips",
|
|
140
140
|
props: {
|
|
141
141
|
modelValue: {}
|
|
142
142
|
},
|
|
143
143
|
emits: ["update:modelValue"],
|
|
144
144
|
setup(e, { emit: t }) {
|
|
145
|
-
const a = e, n = t,
|
|
145
|
+
const a = e, n = t, s = ["Low", "Medium", "High"];
|
|
146
146
|
function c(l) {
|
|
147
147
|
const i = new Set(a.modelValue);
|
|
148
148
|
i.has(l) ? i.delete(l) : i.add(l), n("update:modelValue", i);
|
|
149
149
|
}
|
|
150
|
-
return (l, i) => (
|
|
151
|
-
(
|
|
150
|
+
return (l, i) => (p(), y("div", ot, [
|
|
151
|
+
(p(), y(U, null, K(s, (u) => o("button", {
|
|
152
152
|
key: u,
|
|
153
153
|
type: "button",
|
|
154
|
-
class:
|
|
154
|
+
class: B(["chip", ["risk-" + u.toLowerCase(), { on: e.modelValue.has(u) }]]),
|
|
155
155
|
onClick: (m) => c(u)
|
|
156
|
-
},
|
|
156
|
+
}, b(u), 11, it)), 64))
|
|
157
157
|
]));
|
|
158
158
|
}
|
|
159
|
-
}), ut = /* @__PURE__ */
|
|
159
|
+
}), ut = /* @__PURE__ */ N(rt, [["__scopeId", "data-v-742a6c3b"]]), ct = { class: "pelican-fgroup" }, dt = { class: "title-row" }, mt = { class: "title" }, ft = { class: "val" }, vt = ["min", "max", "step", "value"], pt = /* @__PURE__ */ F({
|
|
160
160
|
__name: "RangeSingle",
|
|
161
161
|
props: {
|
|
162
162
|
label: {},
|
|
@@ -170,17 +170,17 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
|
|
|
170
170
|
},
|
|
171
171
|
emits: ["update:modelValue"],
|
|
172
172
|
setup(e, { emit: t }) {
|
|
173
|
-
const a = e, n = t,
|
|
173
|
+
const a = e, n = t, s = k(() => a.anyAt ?? a.min), c = k(() => !!a.inverted), l = k(() => a.modelValue == null ? c.value ? a.max : s.value : a.modelValue), i = k(() => a.modelValue == null ? "any" : a.format ? a.format(a.modelValue) : String(a.modelValue));
|
|
174
174
|
function u(m) {
|
|
175
|
-
const
|
|
176
|
-
isNaN(
|
|
175
|
+
const g = parseInt(m.target.value, 10);
|
|
176
|
+
isNaN(g) || (c.value && g >= a.max || !c.value && g <= s.value ? n("update:modelValue", null) : n("update:modelValue", g));
|
|
177
177
|
}
|
|
178
|
-
return (m,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
return (m, g) => (p(), y("div", ct, [
|
|
179
|
+
o("div", dt, [
|
|
180
|
+
o("label", mt, b(e.label), 1),
|
|
181
|
+
o("span", ft, b(i.value), 1)
|
|
182
182
|
]),
|
|
183
|
-
|
|
183
|
+
o("input", {
|
|
184
184
|
type: "range",
|
|
185
185
|
class: "range",
|
|
186
186
|
min: e.min,
|
|
@@ -192,10 +192,10 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
|
|
|
192
192
|
}, null, 40, vt)
|
|
193
193
|
]));
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), z = /* @__PURE__ */ N(pt, [["__scopeId", "data-v-10c5fe1c"]]), gt = { class: "pelican-fgroup" }, ht = { class: "title-row" }, yt = { class: "title" }, Mt = { class: "val" }, bt = { class: "dual-track" }, xt = ["min", "max", "value"], wt = ["min", "max", "value"], $t = {
|
|
196
196
|
key: 0,
|
|
197
197
|
class: "scale"
|
|
198
|
-
}, kt = /* @__PURE__ */
|
|
198
|
+
}, kt = /* @__PURE__ */ F({
|
|
199
199
|
__name: "RangeDual",
|
|
200
200
|
props: {
|
|
201
201
|
label: {},
|
|
@@ -211,65 +211,65 @@ const ze = 20, Ge = 350, He = 2e3, je = 2e4, We = 30, qe = [
|
|
|
211
211
|
},
|
|
212
212
|
emits: ["update:modelValueMin", "update:modelValueMax"],
|
|
213
213
|
setup(e, { emit: t }) {
|
|
214
|
-
const a = e, n = t,
|
|
215
|
-
() => l.value <=
|
|
216
|
-
), m =
|
|
214
|
+
const a = e, n = t, s = k(() => a.rawMin ?? 0), c = k(() => a.rawMax ?? 100), l = k(() => a.modelValueMin ?? s.value), i = k(() => a.modelValueMax ?? c.value), u = k(
|
|
215
|
+
() => l.value <= s.value ? a.minLabel ?? "any" : a.formatRaw(a.rawToDomain(l.value))
|
|
216
|
+
), m = k(
|
|
217
217
|
() => i.value >= c.value ? a.maxLabel ?? "any" : a.formatRaw(a.rawToDomain(i.value))
|
|
218
|
-
),
|
|
219
|
-
function
|
|
218
|
+
), g = k(() => l.value <= s.value && i.value >= c.value ? "any" : `${u.value} – ${m.value}`);
|
|
219
|
+
function f(r) {
|
|
220
220
|
let w = parseInt(r.target.value, 10);
|
|
221
|
-
isNaN(w) || (w > i.value && (w = i.value), n("update:modelValueMin", w <=
|
|
221
|
+
isNaN(w) || (w > i.value && (w = i.value), n("update:modelValueMin", w <= s.value ? null : w));
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function d(r) {
|
|
224
224
|
let w = parseInt(r.target.value, 10);
|
|
225
225
|
isNaN(w) || (w < l.value && (w = l.value), n("update:modelValueMax", w >= c.value ? null : w));
|
|
226
226
|
}
|
|
227
227
|
return (r, w) => {
|
|
228
228
|
var I;
|
|
229
|
-
return
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
return p(), y("div", gt, [
|
|
230
|
+
o("div", ht, [
|
|
231
|
+
o("label", yt, b(e.label), 1),
|
|
232
|
+
o("span", Mt, b(g.value), 1)
|
|
233
233
|
]),
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
o("div", bt, [
|
|
235
|
+
o("input", {
|
|
236
236
|
type: "range",
|
|
237
237
|
class: "range-dual",
|
|
238
|
-
min:
|
|
238
|
+
min: s.value,
|
|
239
239
|
max: c.value,
|
|
240
240
|
value: l.value,
|
|
241
|
-
onInput:
|
|
242
|
-
onChange:
|
|
241
|
+
onInput: f,
|
|
242
|
+
onChange: f
|
|
243
243
|
}, null, 40, xt),
|
|
244
|
-
|
|
244
|
+
o("input", {
|
|
245
245
|
type: "range",
|
|
246
246
|
class: "range-dual",
|
|
247
|
-
min:
|
|
247
|
+
min: s.value,
|
|
248
248
|
max: c.value,
|
|
249
249
|
value: i.value,
|
|
250
|
-
onInput:
|
|
251
|
-
onChange:
|
|
250
|
+
onInput: d,
|
|
251
|
+
onChange: d
|
|
252
252
|
}, null, 40, wt)
|
|
253
253
|
]),
|
|
254
|
-
(I = e.scaleHints) != null && I.length ? (
|
|
255
|
-
(
|
|
256
|
-
])) :
|
|
254
|
+
(I = e.scaleHints) != null && I.length ? (p(), y("div", $t, [
|
|
255
|
+
(p(!0), y(U, null, K(e.scaleHints, (_) => (p(), y("span", { key: _ }, b(_), 1))), 128))
|
|
256
|
+
])) : O("", !0)
|
|
257
257
|
]);
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
}),
|
|
261
|
-
function
|
|
260
|
+
}), Me = /* @__PURE__ */ N(kt, [["__scopeId", "data-v-a0c09424"]]);
|
|
261
|
+
function be(e, t = 2) {
|
|
262
262
|
if (e == null || isNaN(Number(e))) return null;
|
|
263
263
|
const a = Number(e);
|
|
264
264
|
return { text: `${a.toFixed(t)}%`, positive: a >= 0 };
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function xe(e, t = "en-US") {
|
|
267
267
|
if (e == null || isNaN(Number(e))) return "—";
|
|
268
|
-
const a = Number(e), n = a < 0 ? "-" : "",
|
|
268
|
+
const a = Number(e), n = a < 0 ? "-" : "", s = Math.abs(a);
|
|
269
269
|
let c;
|
|
270
|
-
return
|
|
270
|
+
return s >= 1e6 ? c = (s / 1e6).toFixed(2) + "M" : s >= 1e3 ? c = Math.round(s).toLocaleString(t) : c = s.toFixed(2), `${n}$${c}`;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function H(e, t = "en-US") {
|
|
273
273
|
if (e == null || isNaN(Number(e))) return "—";
|
|
274
274
|
const a = Number(e);
|
|
275
275
|
return `${a < 0 ? "-" : ""}$${Math.abs(a).toLocaleString(t, {
|
|
@@ -277,13 +277,13 @@ function Y(e, t = "en-US") {
|
|
|
277
277
|
maximumFractionDigits: 2
|
|
278
278
|
})}`;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function we(e, t = "en-US") {
|
|
281
281
|
return e == null ? "—" : Number(e).toLocaleString(t);
|
|
282
282
|
}
|
|
283
283
|
function It(e) {
|
|
284
284
|
return e.Fee == null ? e._meta ? "free" : "—" : `${(e.Fee * 100).toFixed(0)}%`;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function $e(e, t = "en-US") {
|
|
287
287
|
if (!e) return "—";
|
|
288
288
|
const a = new Date(e);
|
|
289
289
|
return isNaN(a.getTime()) ? "—" : a.toLocaleString(t, {
|
|
@@ -303,7 +303,7 @@ function _t(e) {
|
|
|
303
303
|
const a = Math.floor(e / 365), n = Math.floor((e - a * 365) / 30);
|
|
304
304
|
return n ? `${a}y ${n}mo` : `${a}y`;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function ue(e) {
|
|
307
307
|
return e >= 1e6 ? "$" + (e / 1e6).toFixed(2) + "M" : e >= 1e3 ? "$" + Math.round(e / 1e3) + "K" : "$" + Math.round(e);
|
|
308
308
|
}
|
|
309
309
|
function St(e) {
|
|
@@ -312,20 +312,20 @@ function St(e) {
|
|
|
312
312
|
function Rt(e) {
|
|
313
313
|
return e && e.trim().split(/\s+/).slice(0, 2).map((a) => a.charAt(0).toUpperCase()).join("") || "?";
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function j(e) {
|
|
316
316
|
if (!e) return null;
|
|
317
317
|
const t = new Date(e);
|
|
318
318
|
return isNaN(t.getTime()) ? null : Math.floor((Date.now() - t.getTime()) / 864e5);
|
|
319
319
|
}
|
|
320
|
-
const
|
|
320
|
+
const le = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), ke = (e) => e <= 0 ? 0 : Math.max(1, Math.min(100, Math.round(1 + (Math.log10(e) - 1) * 99 / 6))), se = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, (e - 1) / 99 * 4.7)), Pt = { class: "pelican-fgroup" }, Ct = { class: "title-row" }, Tt = { class: "val" }, At = ["value"], Ft = /* @__PURE__ */ F({
|
|
321
321
|
__name: "InvestAmount",
|
|
322
322
|
props: {
|
|
323
323
|
modelValue: {}
|
|
324
324
|
},
|
|
325
325
|
emits: ["update:modelValue", "apply"],
|
|
326
326
|
setup(e, { emit: t }) {
|
|
327
|
-
const a = e, n = t,
|
|
328
|
-
() => a.modelValue == null ? "any" :
|
|
327
|
+
const a = e, n = t, s = k(
|
|
328
|
+
() => a.modelValue == null ? "any" : ue(a.modelValue)
|
|
329
329
|
);
|
|
330
330
|
function c(l) {
|
|
331
331
|
const i = l.target.value.trim();
|
|
@@ -338,14 +338,14 @@ const ee = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), b
|
|
|
338
338
|
n("update:modelValue", null), n("apply", null);
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
n("update:modelValue", u), n("apply", { min:
|
|
341
|
+
n("update:modelValue", u), n("apply", { min: ke(50), max: ke(u) });
|
|
342
342
|
}
|
|
343
|
-
return (l, i) => (
|
|
344
|
-
|
|
345
|
-
i[0] || (i[0] =
|
|
346
|
-
|
|
343
|
+
return (l, i) => (p(), y("div", Pt, [
|
|
344
|
+
o("div", Ct, [
|
|
345
|
+
i[0] || (i[0] = o("label", { class: "title" }, "Your Investment Amount, $", -1)),
|
|
346
|
+
o("span", Tt, b(s.value), 1)
|
|
347
347
|
]),
|
|
348
|
-
|
|
348
|
+
o("input", {
|
|
349
349
|
type: "number",
|
|
350
350
|
min: 50,
|
|
351
351
|
step: 50,
|
|
@@ -356,7 +356,7 @@ const ee = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), b
|
|
|
356
356
|
}, null, 40, At)
|
|
357
357
|
]));
|
|
358
358
|
}
|
|
359
|
-
}), Nt = /* @__PURE__ */
|
|
359
|
+
}), Nt = /* @__PURE__ */ N(Ft, [["__scopeId", "data-v-a76acc6c"]]), Lt = { class: "ftitle-row" }, Dt = /* @__PURE__ */ F({
|
|
360
360
|
__name: "FiltersPanel",
|
|
361
361
|
props: {
|
|
362
362
|
filters: {},
|
|
@@ -365,44 +365,44 @@ const ee = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), b
|
|
|
365
365
|
},
|
|
366
366
|
emits: ["update:filters", "update:investAmount", "reset"],
|
|
367
367
|
setup(e, { emit: t }) {
|
|
368
|
-
const a = e, n = t,
|
|
369
|
-
|
|
370
|
-
n("update:filters", { retMin:
|
|
371
|
-
}),
|
|
372
|
-
n("update:filters", { retMax:
|
|
373
|
-
}),
|
|
374
|
-
n("update:filters", { balanceMin:
|
|
375
|
-
}),
|
|
376
|
-
n("update:filters", { balanceMax:
|
|
377
|
-
}),
|
|
368
|
+
const a = e, n = t, s = R(0), c = R(100), l = R(0), i = R(100);
|
|
369
|
+
E(s, (f) => {
|
|
370
|
+
n("update:filters", { retMin: f <= 0 ? null : se(f) });
|
|
371
|
+
}), E(c, (f) => {
|
|
372
|
+
n("update:filters", { retMax: f >= 100 ? null : se(f) });
|
|
373
|
+
}), E(l, (f) => {
|
|
374
|
+
n("update:filters", { balanceMin: f <= 0 ? null : le(f) });
|
|
375
|
+
}), E(i, (f) => {
|
|
376
|
+
n("update:filters", { balanceMax: f >= 100 ? null : le(f) });
|
|
377
|
+
}), E(
|
|
378
378
|
() => [a.filters.retMin, a.filters.retMax],
|
|
379
|
-
([
|
|
380
|
-
|
|
379
|
+
([f, d]) => {
|
|
380
|
+
f == null && (s.value = 0), d == null && (c.value = 100);
|
|
381
381
|
}
|
|
382
|
-
),
|
|
382
|
+
), E(
|
|
383
383
|
() => [a.filters.balanceMin, a.filters.balanceMax],
|
|
384
|
-
([
|
|
385
|
-
|
|
384
|
+
([f, d]) => {
|
|
385
|
+
f == null && (l.value = 0), d == null && (i.value = 100);
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
|
-
function u(
|
|
389
|
-
n("update:filters",
|
|
388
|
+
function u(f) {
|
|
389
|
+
n("update:filters", f);
|
|
390
390
|
}
|
|
391
|
-
function m(
|
|
392
|
-
u({ risk:
|
|
391
|
+
function m(f) {
|
|
392
|
+
u({ risk: f });
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
|
|
394
|
+
function g(f) {
|
|
395
|
+
f == null ? (u({ balanceMin: null, balanceMax: null }), l.value = 0, i.value = 100) : (l.value = f.min, i.value = f.max);
|
|
396
396
|
}
|
|
397
|
-
return (
|
|
398
|
-
class:
|
|
397
|
+
return (f, d) => (p(), y("aside", {
|
|
398
|
+
class: B(["pelican-filters", { open: e.open }])
|
|
399
399
|
}, [
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
400
|
+
o("div", Lt, [
|
|
401
|
+
d[13] || (d[13] = o("label", { class: "ftitle" }, "Risk", -1)),
|
|
402
|
+
o("button", {
|
|
403
403
|
class: "btn-reset",
|
|
404
404
|
type: "button",
|
|
405
|
-
onClick:
|
|
405
|
+
onClick: d[0] || (d[0] = (r) => n("reset"))
|
|
406
406
|
}, "reset filters")
|
|
407
407
|
]),
|
|
408
408
|
P(ut, {
|
|
@@ -411,21 +411,21 @@ const ee = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), b
|
|
|
411
411
|
}, null, 8, ["model-value"]),
|
|
412
412
|
P(Nt, {
|
|
413
413
|
"model-value": e.investAmount,
|
|
414
|
-
"onUpdate:modelValue":
|
|
415
|
-
onApply:
|
|
414
|
+
"onUpdate:modelValue": d[1] || (d[1] = (r) => n("update:investAmount", r)),
|
|
415
|
+
onApply: g
|
|
416
416
|
}, null, 8, ["model-value"]),
|
|
417
|
-
P(
|
|
417
|
+
P(Me, {
|
|
418
418
|
label: "Return %",
|
|
419
|
-
"model-value-min":
|
|
419
|
+
"model-value-min": s.value,
|
|
420
420
|
"model-value-max": c.value,
|
|
421
|
-
"format-raw": (r) =>
|
|
422
|
-
"raw-to-domain": (r) =>
|
|
421
|
+
"format-raw": (r) => v(St)(r),
|
|
422
|
+
"raw-to-domain": (r) => v(se)(r),
|
|
423
423
|
"scale-hints": ["0%", "200%", "50K%+"],
|
|
424
424
|
"max-label": "50K%+",
|
|
425
|
-
"onUpdate:modelValueMin":
|
|
426
|
-
"onUpdate:modelValueMax":
|
|
425
|
+
"onUpdate:modelValueMin": d[2] || (d[2] = (r) => s.value = r ?? 0),
|
|
426
|
+
"onUpdate:modelValueMax": d[3] || (d[3] = (r) => c.value = r ?? 100)
|
|
427
427
|
}, null, 8, ["model-value-min", "model-value-max", "format-raw", "raw-to-domain"]),
|
|
428
|
-
P(
|
|
428
|
+
P(z, {
|
|
429
429
|
label: "Max Drawdown ≤",
|
|
430
430
|
"model-value": e.filters.ddMax,
|
|
431
431
|
min: 0,
|
|
@@ -434,20 +434,20 @@ const ee = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), b
|
|
|
434
434
|
"any-at": 100,
|
|
435
435
|
inverted: !0,
|
|
436
436
|
format: (r) => r + "%",
|
|
437
|
-
"onUpdate:modelValue":
|
|
437
|
+
"onUpdate:modelValue": d[4] || (d[4] = (r) => u({ ddMax: r == null || r >= 100 ? null : r }))
|
|
438
438
|
}, null, 8, ["model-value", "format"]),
|
|
439
|
-
P(
|
|
439
|
+
P(Me, {
|
|
440
440
|
label: "Balance",
|
|
441
441
|
"model-value-min": l.value,
|
|
442
442
|
"model-value-max": i.value,
|
|
443
|
-
"format-raw": (r) =>
|
|
444
|
-
"raw-to-domain": (r) =>
|
|
443
|
+
"format-raw": (r) => v(ue)(r),
|
|
444
|
+
"raw-to-domain": (r) => v(le)(r),
|
|
445
445
|
"scale-hints": ["$0", "$10K", "$10M"],
|
|
446
446
|
"max-label": "$10M+",
|
|
447
|
-
"onUpdate:modelValueMin":
|
|
448
|
-
"onUpdate:modelValueMax":
|
|
447
|
+
"onUpdate:modelValueMin": d[5] || (d[5] = (r) => l.value = r ?? 0),
|
|
448
|
+
"onUpdate:modelValueMax": d[6] || (d[6] = (r) => i.value = r ?? 100)
|
|
449
449
|
}, null, 8, ["model-value-min", "model-value-max", "format-raw", "raw-to-domain"]),
|
|
450
|
-
P(
|
|
450
|
+
P(z, {
|
|
451
451
|
label: "Mgmt Fee ≤",
|
|
452
452
|
"model-value": e.filters.feeMax,
|
|
453
453
|
min: 0,
|
|
@@ -456,56 +456,56 @@ const ee = (e) => e <= 0 ? 0 : Math.round(Math.pow(10, 1 + (e - 1) / 99 * 6)), b
|
|
|
456
456
|
"any-at": 100,
|
|
457
457
|
inverted: !0,
|
|
458
458
|
format: (r) => r + "%",
|
|
459
|
-
"onUpdate:modelValue":
|
|
459
|
+
"onUpdate:modelValue": d[7] || (d[7] = (r) => u({ feeMax: r == null || r >= 100 ? null : r }))
|
|
460
460
|
}, null, 8, ["model-value", "format"]),
|
|
461
|
-
P(
|
|
461
|
+
P(z, {
|
|
462
462
|
label: "Copiers AUM ≥",
|
|
463
463
|
"model-value": e.filters.aumMin,
|
|
464
464
|
min: 0,
|
|
465
465
|
max: 5e6,
|
|
466
466
|
step: 5e4,
|
|
467
|
-
format: (r) => "≥ " +
|
|
468
|
-
"onUpdate:modelValue":
|
|
467
|
+
format: (r) => "≥ " + v(ue)(r),
|
|
468
|
+
"onUpdate:modelValue": d[8] || (d[8] = (r) => u({ aumMin: r && r > 0 ? r : null }))
|
|
469
469
|
}, null, 8, ["model-value", "format"]),
|
|
470
|
-
P(
|
|
470
|
+
P(z, {
|
|
471
471
|
label: "Copiers ≥",
|
|
472
472
|
"model-value": e.filters.copiersMin,
|
|
473
473
|
min: 0,
|
|
474
474
|
max: 3e3,
|
|
475
475
|
step: 10,
|
|
476
476
|
format: (r) => "≥ " + r,
|
|
477
|
-
"onUpdate:modelValue":
|
|
477
|
+
"onUpdate:modelValue": d[9] || (d[9] = (r) => u({ copiersMin: r && r > 0 ? r : null }))
|
|
478
478
|
}, null, 8, ["model-value", "format"]),
|
|
479
|
-
P(
|
|
479
|
+
P(z, {
|
|
480
480
|
label: "Age ≥ (days)",
|
|
481
481
|
"model-value": e.filters.ageMin,
|
|
482
482
|
min: 0,
|
|
483
483
|
max: 3e3,
|
|
484
484
|
step: 10,
|
|
485
485
|
format: (r) => "≥ " + r + "d",
|
|
486
|
-
"onUpdate:modelValue":
|
|
486
|
+
"onUpdate:modelValue": d[10] || (d[10] = (r) => u({ ageMin: r && r > 0 ? r : null }))
|
|
487
487
|
}, null, 8, ["model-value", "format"]),
|
|
488
|
-
P(
|
|
488
|
+
P(z, {
|
|
489
489
|
label: "Trades ≥",
|
|
490
490
|
"model-value": e.filters.tradesMin,
|
|
491
491
|
min: 0,
|
|
492
492
|
max: 1e4,
|
|
493
493
|
step: 50,
|
|
494
494
|
format: (r) => "≥ " + r,
|
|
495
|
-
"onUpdate:modelValue":
|
|
495
|
+
"onUpdate:modelValue": d[11] || (d[11] = (r) => u({ tradesMin: r && r > 0 ? r : null }))
|
|
496
496
|
}, null, 8, ["model-value", "format"]),
|
|
497
|
-
P(
|
|
497
|
+
P(z, {
|
|
498
498
|
label: "Win Rate ≥",
|
|
499
499
|
"model-value": e.filters.winrateMin,
|
|
500
500
|
min: 0,
|
|
501
501
|
max: 100,
|
|
502
502
|
step: 5,
|
|
503
503
|
format: (r) => "≥ " + r + "%",
|
|
504
|
-
"onUpdate:modelValue":
|
|
504
|
+
"onUpdate:modelValue": d[12] || (d[12] = (r) => u({ winrateMin: r && r > 0 ? r : null }))
|
|
505
505
|
}, null, 8, ["model-value", "format"])
|
|
506
506
|
], 2));
|
|
507
507
|
}
|
|
508
|
-
}), Ut = /* @__PURE__ */
|
|
508
|
+
}), Ut = /* @__PURE__ */ N(Dt, [["__scopeId", "data-v-67cc5448"]]), Ie = [
|
|
509
509
|
"#f97316",
|
|
510
510
|
"#3b82f6",
|
|
511
511
|
"#10b981",
|
|
@@ -532,46 +532,46 @@ function Vt(e, t = 140, a = 34) {
|
|
|
532
532
|
startX: 1,
|
|
533
533
|
endX: t - 1
|
|
534
534
|
};
|
|
535
|
-
const n = e.map((
|
|
535
|
+
const n = e.map((S) => Date.parse(S.Timestamp)), s = n[0], c = n[n.length - 1], l = c - s || 1, i = e.map((S) => S.AccountReturn), u = Math.min(0, ...i), g = Math.max(0, ...i) - u || 1, f = (S) => (S - s) / l * (t - 2) + 1, d = (S) => a - 2 - (S - u) / g * (a - 4), r = e.map((S, x) => `${f(n[x]).toFixed(1)},${d(S.AccountReturn).toFixed(1)}`), w = i[i.length - 1], I = d(0), _ = f(s), h = f(c), C = `M ${r.join(" L ")}`, V = `M ${r[0]} ` + r.slice(1).map((S) => `L ${S}`).join(" ") + ` L ${h.toFixed(1)},${I.toFixed(1)} L ${_.toFixed(1)},${I.toFixed(1)} Z`;
|
|
536
536
|
return {
|
|
537
537
|
hasData: !0,
|
|
538
538
|
width: t,
|
|
539
539
|
height: a,
|
|
540
540
|
zeroY: I,
|
|
541
|
-
areaPath:
|
|
542
|
-
linePath:
|
|
541
|
+
areaPath: V,
|
|
542
|
+
linePath: C,
|
|
543
543
|
positive: w >= 0,
|
|
544
544
|
startX: _,
|
|
545
|
-
endX:
|
|
545
|
+
endX: h
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
function Et(e, t = 520, a = 280) {
|
|
549
|
-
const n = e.slice().sort((
|
|
550
|
-
let
|
|
551
|
-
const
|
|
552
|
-
return n.forEach((
|
|
553
|
-
const w = (
|
|
554
|
-
|
|
555
|
-
const
|
|
556
|
-
let
|
|
549
|
+
const n = e.slice().sort((d, r) => (r.c || 0) - (d.c || 0)), s = n.reduce((d, r) => d + (r.c || 0), 0) || 1, c = t / 2, l = a / 2, i = 90, u = 52, m = i + 10;
|
|
550
|
+
let g = -Math.PI / 2;
|
|
551
|
+
const f = [];
|
|
552
|
+
return n.forEach((d, r) => {
|
|
553
|
+
const w = (d.c || 0) / s, I = w * Math.PI * 2, _ = g, h = g + I;
|
|
554
|
+
g = h;
|
|
555
|
+
const C = (_ + h) / 2, V = I > Math.PI ? 1 : 0, S = c + i * Math.cos(_), x = l + i * Math.sin(_), $ = c + i * Math.cos(h), M = l + i * Math.sin(h), T = c + u * Math.cos(_), Y = l + u * Math.sin(_), G = c + u * Math.cos(h), L = l + u * Math.sin(h), A = `M ${S.toFixed(2)} ${x.toFixed(2)} A ${i} ${i} 0 ${V} 1 ${$.toFixed(2)} ${M.toFixed(2)} L ${G.toFixed(2)} ${L.toFixed(2)} A ${u} ${u} 0 ${V} 0 ${T.toFixed(2)} ${Y.toFixed(2)} Z`, Ae = Ie[r % Ie.length];
|
|
556
|
+
let me = null, fe = 0, ve = 0, pe = "start";
|
|
557
557
|
if (w >= 0.015) {
|
|
558
|
-
const
|
|
559
|
-
|
|
558
|
+
const Q = Math.cos(C) < 0, Fe = c + i * Math.cos(C), Ne = l + i * Math.sin(C), X = c + m * Math.cos(C), ee = l + m * Math.sin(C), Le = Q ? X - 4 : X + 4;
|
|
559
|
+
me = `${Fe.toFixed(1)},${Ne.toFixed(1)} ${X.toFixed(1)},${ee.toFixed(1)} ${Le.toFixed(1)},${ee.toFixed(1)}`, fe = Q ? X - 6 : X + 6, ve = ee + 4, pe = Q ? "end" : "start";
|
|
560
560
|
}
|
|
561
|
-
|
|
562
|
-
marketName:
|
|
563
|
-
count:
|
|
561
|
+
f.push({
|
|
562
|
+
marketName: d.n,
|
|
563
|
+
count: d.c,
|
|
564
564
|
fraction: w,
|
|
565
|
-
color:
|
|
566
|
-
arcPath:
|
|
567
|
-
labelLine:
|
|
568
|
-
labelX:
|
|
569
|
-
labelY:
|
|
570
|
-
labelAnchor:
|
|
565
|
+
color: Ae,
|
|
566
|
+
arcPath: A,
|
|
567
|
+
labelLine: me,
|
|
568
|
+
labelX: fe,
|
|
569
|
+
labelY: ve,
|
|
570
|
+
labelAnchor: pe
|
|
571
571
|
});
|
|
572
|
-
}), { width: t, height: a, cx: c, cy: l, outerR: i, innerR: u, slices:
|
|
572
|
+
}), { width: t, height: a, cx: c, cy: l, outerR: i, innerR: u, slices: f };
|
|
573
573
|
}
|
|
574
|
-
const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2", "y1", "y2"], Yt = ["d", "fill"],
|
|
574
|
+
const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2", "y1", "y2"], Yt = ["d", "fill"], Gt = ["d", "stroke"], zt = /* @__PURE__ */ F({
|
|
575
575
|
__name: "Sparkline",
|
|
576
576
|
props: {
|
|
577
577
|
history: {},
|
|
@@ -579,8 +579,8 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
579
579
|
height: { default: 34 }
|
|
580
580
|
},
|
|
581
581
|
setup(e) {
|
|
582
|
-
const t = e, a =
|
|
583
|
-
return (n,
|
|
582
|
+
const t = e, a = k(() => Vt(t.history, t.width, t.height));
|
|
583
|
+
return (n, s) => a.value.hasData ? (p(), y("svg", {
|
|
584
584
|
key: 1,
|
|
585
585
|
class: "pelican-spark",
|
|
586
586
|
width: a.value.width,
|
|
@@ -590,7 +590,7 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
590
590
|
role: "img",
|
|
591
591
|
"aria-label": "Equity curve"
|
|
592
592
|
}, [
|
|
593
|
-
|
|
593
|
+
o("line", {
|
|
594
594
|
x1: "0",
|
|
595
595
|
x2: a.value.width,
|
|
596
596
|
y1: a.value.zeroY,
|
|
@@ -600,12 +600,12 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
600
600
|
"stroke-width": "1",
|
|
601
601
|
"vector-effect": "non-scaling-stroke"
|
|
602
602
|
}, null, 8, Kt),
|
|
603
|
-
|
|
603
|
+
o("path", {
|
|
604
604
|
d: a.value.areaPath,
|
|
605
605
|
fill: a.value.positive ? "var(--area-green)" : "var(--area-red)",
|
|
606
606
|
stroke: "none"
|
|
607
607
|
}, null, 8, Yt),
|
|
608
|
-
|
|
608
|
+
o("path", {
|
|
609
609
|
d: a.value.linePath,
|
|
610
610
|
fill: "none",
|
|
611
611
|
stroke: a.value.positive ? "var(--green)" : "var(--red)",
|
|
@@ -613,16 +613,16 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
613
613
|
"stroke-linejoin": "round",
|
|
614
614
|
"stroke-linecap": "round",
|
|
615
615
|
"vector-effect": "non-scaling-stroke"
|
|
616
|
-
}, null, 8,
|
|
617
|
-
], 8, Ot)) : (
|
|
616
|
+
}, null, 8, Gt)
|
|
617
|
+
], 8, Ot)) : (p(), y("svg", {
|
|
618
618
|
key: 0,
|
|
619
619
|
class: "pelican-spark",
|
|
620
620
|
width: a.value.width,
|
|
621
621
|
height: a.value.height,
|
|
622
622
|
role: "img",
|
|
623
623
|
"aria-label": "No equity data"
|
|
624
|
-
}, [...
|
|
625
|
-
|
|
624
|
+
}, [...s[0] || (s[0] = [
|
|
625
|
+
o("text", {
|
|
626
626
|
x: "2",
|
|
627
627
|
y: "20",
|
|
628
628
|
"font-size": "11",
|
|
@@ -630,13 +630,13 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
630
630
|
}, "no data", -1)
|
|
631
631
|
])], 8, Bt));
|
|
632
632
|
}
|
|
633
|
-
}), Ht = /* @__PURE__ */
|
|
633
|
+
}), Ht = /* @__PURE__ */ N(zt, [["__scopeId", "data-v-a9b85847"]]), jt = {
|
|
634
634
|
key: 0,
|
|
635
635
|
class: "dim"
|
|
636
636
|
}, Wt = ["viewBox"], qt = ["d", "fill"], Xt = ["points", "stroke"], Zt = ["x", "y", "text-anchor"], Jt = {
|
|
637
637
|
fill: "var(--muted)",
|
|
638
638
|
"font-weight": "400"
|
|
639
|
-
}, Qt = /* @__PURE__ */
|
|
639
|
+
}, Qt = /* @__PURE__ */ F({
|
|
640
640
|
__name: "MarketsDonut",
|
|
641
641
|
props: {
|
|
642
642
|
markets: {},
|
|
@@ -644,8 +644,8 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
644
644
|
height: { default: 280 }
|
|
645
645
|
},
|
|
646
646
|
setup(e) {
|
|
647
|
-
const t = e, a =
|
|
648
|
-
return (
|
|
647
|
+
const t = e, a = k(() => !t.markets || t.markets.length === 0), n = k(() => Et(t.markets, t.width, t.height));
|
|
648
|
+
return (s, c) => a.value ? (p(), y("span", jt, "no market data")) : (p(), y("svg", {
|
|
649
649
|
key: 1,
|
|
650
650
|
class: "pelican-donut",
|
|
651
651
|
viewBox: `0 0 ${n.value.width} ${n.value.height}`,
|
|
@@ -654,8 +654,8 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
654
654
|
role: "img",
|
|
655
655
|
"aria-label": "Markets donut chart"
|
|
656
656
|
}, [
|
|
657
|
-
|
|
658
|
-
(
|
|
657
|
+
o("g", null, [
|
|
658
|
+
(p(!0), y(U, null, K(n.value.slices, (l) => (p(), y("path", {
|
|
659
659
|
key: l.marketName + l.fraction,
|
|
660
660
|
d: l.arcPath,
|
|
661
661
|
fill: l.color,
|
|
@@ -663,19 +663,19 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
663
663
|
"stroke-width": "1.5"
|
|
664
664
|
}, null, 8, qt))), 128))
|
|
665
665
|
]),
|
|
666
|
-
|
|
667
|
-
(
|
|
666
|
+
o("g", null, [
|
|
667
|
+
(p(!0), y(U, null, K(n.value.slices, (l) => ge((p(), y("polyline", {
|
|
668
668
|
key: `l-${l.marketName}`,
|
|
669
669
|
points: l.labelLine ?? "",
|
|
670
670
|
stroke: l.color,
|
|
671
671
|
"stroke-width": "1",
|
|
672
672
|
fill: "none"
|
|
673
673
|
}, null, 8, Xt)), [
|
|
674
|
-
[
|
|
674
|
+
[he, l.labelLine]
|
|
675
675
|
])), 128))
|
|
676
676
|
]),
|
|
677
|
-
|
|
678
|
-
(
|
|
677
|
+
o("g", null, [
|
|
678
|
+
(p(!0), y(U, null, K(n.value.slices, (l) => ge((p(), y("text", {
|
|
679
679
|
key: `t-${l.marketName}`,
|
|
680
680
|
x: l.labelX,
|
|
681
681
|
y: l.labelY,
|
|
@@ -684,15 +684,15 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
684
684
|
fill: "var(--text)",
|
|
685
685
|
"font-weight": "500"
|
|
686
686
|
}, [
|
|
687
|
-
|
|
688
|
-
|
|
687
|
+
D(b(l.marketName) + " ", 1),
|
|
688
|
+
o("tspan", Jt, b(l.count), 1)
|
|
689
689
|
], 8, Zt)), [
|
|
690
|
-
[
|
|
690
|
+
[he, l.labelLine]
|
|
691
691
|
])), 128))
|
|
692
692
|
])
|
|
693
693
|
], 8, Wt));
|
|
694
694
|
}
|
|
695
|
-
}), ea = /* @__PURE__ */
|
|
695
|
+
}), ea = /* @__PURE__ */ N(Qt, [["__scopeId", "data-v-c514d53f"]]), ta = { class: "pelican-trades" }, aa = { class: "hd" }, na = {
|
|
696
696
|
key: 0,
|
|
697
697
|
class: "dim"
|
|
698
698
|
}, la = {
|
|
@@ -701,7 +701,7 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
701
701
|
}, sa = {
|
|
702
702
|
key: 2,
|
|
703
703
|
class: "list"
|
|
704
|
-
}, oa = { class: "market" }, ia = { class: "trade-time" }, ra = /* @__PURE__ */
|
|
704
|
+
}, oa = { class: "market" }, ia = { class: "trade-time" }, ra = /* @__PURE__ */ F({
|
|
705
705
|
__name: "TradesPanel",
|
|
706
706
|
props: {
|
|
707
707
|
kind: {},
|
|
@@ -710,67 +710,67 @@ const Bt = ["width", "height"], Ot = ["width", "height", "viewBox"], Kt = ["x2",
|
|
|
710
710
|
locale: {}
|
|
711
711
|
},
|
|
712
712
|
setup(e) {
|
|
713
|
-
const t = e, a =
|
|
713
|
+
const t = e, a = k(() => t.kind === "open" ? "Open Trades" : "Trade History (30d)"), n = k(
|
|
714
714
|
() => !t.loading && (t.trades == null || t.trades.length === 0)
|
|
715
715
|
);
|
|
716
|
-
return (
|
|
717
|
-
|
|
718
|
-
e.loading ? (
|
|
719
|
-
(
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
class:
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
l.CloseTimestamp ? (
|
|
727
|
-
|
|
728
|
-
], 64)) :
|
|
716
|
+
return (s, c) => (p(), y("div", ta, [
|
|
717
|
+
o("div", aa, b(a.value), 1),
|
|
718
|
+
e.loading ? (p(), y("div", na, "Loading…")) : n.value ? (p(), y("div", la, "No trades.")) : (p(), y("ul", sa, [
|
|
719
|
+
(p(!0), y(U, null, K(e.trades ?? [], (l, i) => (p(), y("li", { key: i }, [
|
|
720
|
+
o("span", oa, b(l.MarketName ?? "—"), 1),
|
|
721
|
+
o("span", {
|
|
722
|
+
class: B(["dir", l.Direction === "Sell" ? "red" : "green"])
|
|
723
|
+
}, b(l.Direction ?? ""), 3),
|
|
724
|
+
o("span", ia, [
|
|
725
|
+
D(b(v($e)(l.OpenTimestamp, e.locale)) + " ", 1),
|
|
726
|
+
l.CloseTimestamp ? (p(), y(U, { key: 0 }, [
|
|
727
|
+
D(" → " + b(v($e)(l.CloseTimestamp, e.locale)), 1)
|
|
728
|
+
], 64)) : O("", !0)
|
|
729
729
|
]),
|
|
730
|
-
l.Pnl != null ? (
|
|
730
|
+
l.Pnl != null ? (p(), y("span", {
|
|
731
731
|
key: 0,
|
|
732
|
-
class:
|
|
733
|
-
},
|
|
732
|
+
class: B(["pnl", l.Pnl >= 0 ? "green" : "red"])
|
|
733
|
+
}, b(v(H)(l.Pnl, e.locale)), 3)) : O("", !0)
|
|
734
734
|
]))), 128))
|
|
735
735
|
]))
|
|
736
736
|
]));
|
|
737
737
|
}
|
|
738
|
-
}),
|
|
739
|
-
function
|
|
738
|
+
}), _e = /* @__PURE__ */ N(ra, [["__scopeId", "data-v-aa7cbcd7"]]);
|
|
739
|
+
function W(e) {
|
|
740
740
|
const t = e.Wins ?? 0, a = e.Losses ?? 0, n = t + a;
|
|
741
741
|
return n ? t / n * 100 : -1;
|
|
742
742
|
}
|
|
743
|
-
const ua = Symbol("pelican.apiBase"),
|
|
743
|
+
const ua = Symbol("pelican.apiBase"), ca = Symbol("pelican.catalogBase"), Ce = Symbol("pelican.locale"), da = ["data-id"], ma = { class: "name" }, fa = { class: "avatar" }, va = { class: "avatar-fallback" }, pa = ["src"], ga = { class: "nm" }, ha = { class: "title" }, ya = {
|
|
744
744
|
key: 0,
|
|
745
745
|
class: "free-badge"
|
|
746
|
-
},
|
|
746
|
+
}, Ma = { class: "by" }, ba = {
|
|
747
747
|
class: "c-spark",
|
|
748
748
|
"data-label": "Equity curve"
|
|
749
|
-
},
|
|
749
|
+
}, xa = {
|
|
750
750
|
class: "c-num",
|
|
751
751
|
"data-label": "Return"
|
|
752
|
-
},
|
|
752
|
+
}, wa = { key: 1 }, $a = {
|
|
753
753
|
class: "c-num",
|
|
754
754
|
"data-label": "Copiers"
|
|
755
|
-
},
|
|
755
|
+
}, ka = {
|
|
756
756
|
class: "c-num",
|
|
757
757
|
"data-label": "Copiers AUM"
|
|
758
|
-
},
|
|
758
|
+
}, Ia = {
|
|
759
759
|
class: "c-num",
|
|
760
760
|
"data-label": "Max DD"
|
|
761
|
-
},
|
|
761
|
+
}, _a = { key: 1 }, Sa = {
|
|
762
762
|
class: "c-num",
|
|
763
763
|
"data-label": "Age"
|
|
764
|
-
},
|
|
764
|
+
}, Ra = {
|
|
765
765
|
class: "c-num",
|
|
766
766
|
"data-label": "Balance"
|
|
767
|
-
},
|
|
767
|
+
}, Pa = {
|
|
768
768
|
class: "c-num",
|
|
769
769
|
"data-label": "Fee"
|
|
770
|
-
},
|
|
770
|
+
}, Ca = ["href"], Ta = { class: "grid" }, Aa = { class: "col-stats" }, Fa = { class: "field" }, Na = { class: "value" }, La = { class: "field" }, Da = { class: "value" }, Ua = { class: "field" }, Va = { class: "value" }, Ea = { class: "field" }, Ba = { class: "value" }, Oa = { class: "field" }, Ka = { class: "value" }, Ya = { class: "field" }, Ga = { class: "value" }, za = { class: "field" }, Ha = { class: "value" }, ja = { class: "field" }, Wa = { class: "value" }, qa = { key: 0 }, Xa = {
|
|
771
771
|
key: 1,
|
|
772
772
|
class: "dim"
|
|
773
|
-
},
|
|
773
|
+
}, Za = { class: "col-donut" }, Ja = { class: "trade-toggles" }, Qa = /* @__PURE__ */ F({
|
|
774
774
|
__name: "StrategyRow",
|
|
775
775
|
props: {
|
|
776
776
|
s: {},
|
|
@@ -780,172 +780,172 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
780
780
|
},
|
|
781
781
|
emits: ["toggle", "load-trades", "select"],
|
|
782
782
|
setup(e, { emit: t }) {
|
|
783
|
-
const a = e, n = t,
|
|
783
|
+
const a = e, n = t, s = De(Ce, "en-US"), c = k(() => be(a.s.Return, 1)), l = k(() => a.s.MaxDD != null ? be(a.s.MaxDD, 2) : null), i = k(() => j(a.s.Inception)), u = k(() => W(a.s)), m = k(() => u.value >= 0 ? 100 - u.value : -1), g = k(
|
|
784
784
|
() => {
|
|
785
|
-
var _,
|
|
786
|
-
return ((_ = a.s.Profile) == null ? void 0 : _.Name) ?? ((
|
|
785
|
+
var _, h;
|
|
786
|
+
return ((_ = a.s.Profile) == null ? void 0 : _.Name) ?? ((h = a.s.Profile) != null && h.Id ? "#" + a.s.Profile.Id : "");
|
|
787
787
|
}
|
|
788
|
-
),
|
|
788
|
+
), f = k(() => `https://libertex.copy-trade.io/strategy/${a.s.Id}`), d = R(!1), r = R(!1);
|
|
789
789
|
function w() {
|
|
790
|
-
|
|
790
|
+
d.value = !d.value, d.value && !a.openTrades && n("load-trades", "open");
|
|
791
791
|
}
|
|
792
792
|
function I() {
|
|
793
793
|
r.value = !r.value, r.value && !a.closedTrades && n("load-trades", "closed");
|
|
794
794
|
}
|
|
795
|
-
return (_,
|
|
796
|
-
var
|
|
797
|
-
return
|
|
798
|
-
|
|
799
|
-
class:
|
|
795
|
+
return (_, h) => {
|
|
796
|
+
var C, V, S, x;
|
|
797
|
+
return p(), y(U, null, [
|
|
798
|
+
o("div", {
|
|
799
|
+
class: B(["pelican-row", { open: e.expanded }]),
|
|
800
800
|
"data-id": e.s.Id,
|
|
801
|
-
onClick:
|
|
801
|
+
onClick: h[3] || (h[3] = ($) => n("toggle"))
|
|
802
802
|
}, [
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
e.s.ImageUploaded ? (
|
|
803
|
+
o("div", ma, [
|
|
804
|
+
o("div", fa, [
|
|
805
|
+
o("span", va, b(v(Rt)(e.s.Name)), 1),
|
|
806
|
+
e.s.ImageUploaded ? (p(), y("img", {
|
|
807
807
|
key: 0,
|
|
808
808
|
class: "avatar-img",
|
|
809
809
|
src: `https://assets.copy-trade.io/images/strategies/thumbnails/${e.s.Id}`,
|
|
810
810
|
alt: "",
|
|
811
811
|
loading: "lazy",
|
|
812
812
|
decoding: "async",
|
|
813
|
-
onError:
|
|
814
|
-
}, null, 40,
|
|
813
|
+
onError: h[0] || (h[0] = ($) => $.target.remove())
|
|
814
|
+
}, null, 40, pa)) : O("", !0)
|
|
815
815
|
]),
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
e.s._meta && e.s.Fee == null ? (
|
|
816
|
+
o("div", ga, [
|
|
817
|
+
o("div", ha, [
|
|
818
|
+
D(b(e.s.Name || "#" + e.s.Id) + " ", 1),
|
|
819
|
+
e.s._meta && e.s.Fee == null ? (p(), y("span", ya, "free")) : O("", !0)
|
|
820
820
|
]),
|
|
821
|
-
|
|
821
|
+
o("div", Ma, b(g.value), 1)
|
|
822
822
|
])
|
|
823
823
|
]),
|
|
824
|
-
|
|
824
|
+
o("div", ba, [
|
|
825
825
|
P(Ht, {
|
|
826
826
|
history: e.s.History
|
|
827
827
|
}, null, 8, ["history"])
|
|
828
828
|
]),
|
|
829
|
-
|
|
830
|
-
c.value ? (
|
|
829
|
+
o("div", xa, [
|
|
830
|
+
c.value ? (p(), y("span", {
|
|
831
831
|
key: 0,
|
|
832
|
-
class:
|
|
833
|
-
},
|
|
832
|
+
class: B(c.value.positive ? "green" : "red")
|
|
833
|
+
}, b(c.value.text), 3)) : (p(), y("span", wa, "—"))
|
|
834
834
|
]),
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
l.value ? (
|
|
835
|
+
o("div", $a, b(v(we)(e.s.NumCopiers, v(s))), 1),
|
|
836
|
+
o("div", ka, b(v(xe)(e.s.CopiersAUM, v(s))), 1),
|
|
837
|
+
o("div", Ia, [
|
|
838
|
+
l.value ? (p(), y("span", {
|
|
839
839
|
key: 0,
|
|
840
|
-
class:
|
|
841
|
-
},
|
|
840
|
+
class: B(l.value.positive ? "green" : "red")
|
|
841
|
+
}, b(l.value.text), 3)) : (p(), y("span", _a, "—"))
|
|
842
842
|
]),
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
843
|
+
o("div", Sa, b(v(_t)(i.value)), 1),
|
|
844
|
+
o("div", Ra, b(v(xe)(e.s.AccountBalance, v(s))), 1),
|
|
845
|
+
o("div", Pa, b(v(It)(e.s)), 1),
|
|
846
|
+
o("div", {
|
|
847
847
|
class: "c-link",
|
|
848
|
-
onClick:
|
|
848
|
+
onClick: h[2] || (h[2] = te(() => {
|
|
849
849
|
}, ["stop"]))
|
|
850
850
|
}, [
|
|
851
|
-
|
|
851
|
+
o("a", {
|
|
852
852
|
class: "signal-link",
|
|
853
|
-
href:
|
|
853
|
+
href: f.value,
|
|
854
854
|
target: "_blank",
|
|
855
855
|
rel: "noopener",
|
|
856
|
-
onClick:
|
|
856
|
+
onClick: h[1] || (h[1] = te(() => {
|
|
857
857
|
}, ["stop"]))
|
|
858
|
-
}, " Get connected ", 8,
|
|
859
|
-
|
|
858
|
+
}, " Get connected ", 8, Ca),
|
|
859
|
+
q(_.$slots, "row-actions", { strategy: e.s }, void 0, !0)
|
|
860
860
|
])
|
|
861
|
-
], 10,
|
|
862
|
-
e.expanded ? (
|
|
861
|
+
], 10, da),
|
|
862
|
+
e.expanded ? (p(), y("div", {
|
|
863
863
|
key: 0,
|
|
864
864
|
class: "pelican-row-expanded",
|
|
865
|
-
onClick:
|
|
865
|
+
onClick: h[4] || (h[4] = te(() => {
|
|
866
866
|
}, ["stop"]))
|
|
867
867
|
}, [
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
868
|
+
o("div", Ta, [
|
|
869
|
+
o("div", Aa, [
|
|
870
|
+
o("div", Fa, [
|
|
871
|
+
h[5] || (h[5] = o("div", { class: "label" }, "Currency", -1)),
|
|
872
|
+
o("div", Na, b(e.s.Currency ?? "USD"), 1)
|
|
873
873
|
]),
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
874
|
+
o("div", La, [
|
|
875
|
+
h[6] || (h[6] = o("div", { class: "label" }, "Monthly profit", -1)),
|
|
876
|
+
o("div", Da, b(v(H)(e.s.MonthlyProfit, v(s))), 1)
|
|
877
877
|
]),
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
878
|
+
o("div", Ua, [
|
|
879
|
+
h[7] || (h[7] = o("div", { class: "label" }, "Yearly profit", -1)),
|
|
880
|
+
o("div", Va, b(v(H)(e.s.YearlyProfit, v(s))), 1)
|
|
881
881
|
]),
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
882
|
+
o("div", Ea, [
|
|
883
|
+
h[8] || (h[8] = o("div", { class: "label" }, "Balance", -1)),
|
|
884
|
+
o("div", Ba, b(v(H)(e.s.AccountBalance, v(s))), 1)
|
|
885
885
|
]),
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
886
|
+
o("div", Oa, [
|
|
887
|
+
h[9] || (h[9] = o("div", { class: "label" }, "Realized P/L", -1)),
|
|
888
|
+
o("div", Ka, b(v(H)(e.s.RealisedPnl, v(s))), 1)
|
|
889
889
|
]),
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
890
|
+
o("div", Ya, [
|
|
891
|
+
h[10] || (h[10] = o("div", { class: "label" }, "Unrealized P/L", -1)),
|
|
892
|
+
o("div", Ga, b(v(H)(e.s.UnrealisedPnl, v(s))), 1)
|
|
893
893
|
]),
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
894
|
+
o("div", za, [
|
|
895
|
+
h[11] || (h[11] = o("div", { class: "label" }, "Trades total", -1)),
|
|
896
|
+
o("div", Ha, b(v(we)(e.s.TradesTotal, v(s))), 1)
|
|
897
897
|
]),
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
u.value >= 0 ? (
|
|
898
|
+
o("div", ja, [
|
|
899
|
+
h[12] || (h[12] = o("div", { class: "label" }, "Win rate", -1)),
|
|
900
|
+
o("div", Wa, [
|
|
901
|
+
u.value >= 0 ? (p(), y("span", qa, b(u.value.toFixed(1)) + "% / " + b(m.value.toFixed(1)) + "%", 1)) : (p(), y("span", Xa, "—"))
|
|
902
902
|
])
|
|
903
903
|
])
|
|
904
904
|
]),
|
|
905
|
-
|
|
906
|
-
|
|
905
|
+
o("div", Za, [
|
|
906
|
+
h[13] || (h[13] = o("div", { class: "hd" }, "Markets", -1)),
|
|
907
907
|
P(ea, {
|
|
908
908
|
markets: e.s.Markets
|
|
909
909
|
}, null, 8, ["markets"])
|
|
910
910
|
])
|
|
911
911
|
]),
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
class:
|
|
912
|
+
o("div", Ja, [
|
|
913
|
+
o("button", {
|
|
914
|
+
class: B(["pill", { on: d.value }]),
|
|
915
915
|
type: "button",
|
|
916
916
|
onClick: w
|
|
917
|
-
},
|
|
918
|
-
|
|
919
|
-
class:
|
|
917
|
+
}, b(d.value ? "Hide" : "Open Trades"), 3),
|
|
918
|
+
o("button", {
|
|
919
|
+
class: B(["pill", { on: r.value }]),
|
|
920
920
|
type: "button",
|
|
921
921
|
onClick: I
|
|
922
|
-
},
|
|
922
|
+
}, b(r.value ? "Hide" : "Trade History"), 3)
|
|
923
923
|
]),
|
|
924
|
-
|
|
924
|
+
d.value ? (p(), ie(_e, {
|
|
925
925
|
key: 0,
|
|
926
926
|
kind: "open",
|
|
927
|
-
trades: ((
|
|
928
|
-
loading: !!((
|
|
929
|
-
locale:
|
|
930
|
-
}, null, 8, ["trades", "loading", "locale"])) :
|
|
931
|
-
r.value ? (
|
|
927
|
+
trades: ((C = e.openTrades) == null ? void 0 : C.trades) ?? null,
|
|
928
|
+
loading: !!((V = e.openTrades) != null && V.loading),
|
|
929
|
+
locale: v(s)
|
|
930
|
+
}, null, 8, ["trades", "loading", "locale"])) : O("", !0),
|
|
931
|
+
r.value ? (p(), ie(_e, {
|
|
932
932
|
key: 1,
|
|
933
933
|
kind: "closed",
|
|
934
|
-
trades: ((
|
|
935
|
-
loading: !!((
|
|
936
|
-
locale:
|
|
937
|
-
}, null, 8, ["trades", "loading", "locale"])) :
|
|
938
|
-
])) :
|
|
934
|
+
trades: ((S = e.closedTrades) == null ? void 0 : S.trades) ?? null,
|
|
935
|
+
loading: !!((x = e.closedTrades) != null && x.loading),
|
|
936
|
+
locale: v(s)
|
|
937
|
+
}, null, 8, ["trades", "loading", "locale"])) : O("", !0)
|
|
938
|
+
])) : O("", !0)
|
|
939
939
|
], 64);
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
|
-
}),
|
|
942
|
+
}), en = /* @__PURE__ */ N(Qa, [["__scopeId", "data-v-61c1236b"]]), tn = {
|
|
943
943
|
key: 0,
|
|
944
944
|
class: "pelican-pager"
|
|
945
|
-
},
|
|
945
|
+
}, an = ["disabled"], nn = {
|
|
946
946
|
key: 0,
|
|
947
947
|
class: "gap"
|
|
948
|
-
},
|
|
948
|
+
}, ln = ["onClick"], sn = ["disabled"], on = { class: "info" }, rn = ["max", "value"], un = /* @__PURE__ */ F({
|
|
949
949
|
__name: "Pager",
|
|
950
950
|
props: {
|
|
951
951
|
page: {},
|
|
@@ -955,45 +955,45 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
955
955
|
emits: ["go"],
|
|
956
956
|
setup(e, { emit: t }) {
|
|
957
957
|
const a = e, n = t;
|
|
958
|
-
function
|
|
958
|
+
function s(l) {
|
|
959
959
|
n("go", l);
|
|
960
960
|
}
|
|
961
961
|
function c(l) {
|
|
962
962
|
const i = parseInt(l.target.value, 10);
|
|
963
963
|
isNaN(i) || n("go", i);
|
|
964
964
|
}
|
|
965
|
-
return (l, i) => a.totalPages > 1 ? (
|
|
966
|
-
|
|
965
|
+
return (l, i) => a.totalPages > 1 ? (p(), y("nav", tn, [
|
|
966
|
+
o("button", {
|
|
967
967
|
disabled: e.page <= 1,
|
|
968
|
-
onClick: i[0] || (i[0] = (u) =>
|
|
969
|
-
}, "‹ prev", 8,
|
|
970
|
-
(
|
|
971
|
-
u === "…" ? (
|
|
968
|
+
onClick: i[0] || (i[0] = (u) => s("prev"))
|
|
969
|
+
}, "‹ prev", 8, an),
|
|
970
|
+
(p(!0), y(U, null, K(e.range, (u, m) => (p(), y(U, { key: m }, [
|
|
971
|
+
u === "…" ? (p(), y("span", nn, "…")) : (p(), y("button", {
|
|
972
972
|
key: 1,
|
|
973
|
-
class:
|
|
974
|
-
onClick: (
|
|
975
|
-
},
|
|
973
|
+
class: B(["page", { cur: u === e.page }]),
|
|
974
|
+
onClick: (g) => s(u)
|
|
975
|
+
}, b(u), 11, ln))
|
|
976
976
|
], 64))), 128)),
|
|
977
|
-
|
|
977
|
+
o("button", {
|
|
978
978
|
disabled: e.page >= e.totalPages,
|
|
979
|
-
onClick: i[1] || (i[1] = (u) =>
|
|
980
|
-
}, "next ›", 8,
|
|
981
|
-
|
|
982
|
-
i[2] || (i[2] =
|
|
983
|
-
|
|
979
|
+
onClick: i[1] || (i[1] = (u) => s("next"))
|
|
980
|
+
}, "next ›", 8, sn),
|
|
981
|
+
o("span", on, [
|
|
982
|
+
i[2] || (i[2] = D(" go to ", -1)),
|
|
983
|
+
o("input", {
|
|
984
984
|
type: "number",
|
|
985
985
|
min: 1,
|
|
986
986
|
max: e.totalPages,
|
|
987
987
|
value: e.page,
|
|
988
988
|
onChange: c
|
|
989
|
-
}, null, 40,
|
|
989
|
+
}, null, 40, rn)
|
|
990
990
|
])
|
|
991
|
-
])) :
|
|
991
|
+
])) : O("", !0);
|
|
992
992
|
}
|
|
993
|
-
}),
|
|
993
|
+
}), cn = /* @__PURE__ */ N(un, [["__scopeId", "data-v-42928155"]]), dn = { class: "pelican-table" }, mn = { class: "row head" }, fn = ["onClick"], vn = {
|
|
994
994
|
key: 0,
|
|
995
995
|
class: "empty"
|
|
996
|
-
},
|
|
996
|
+
}, pn = /* @__PURE__ */ F({
|
|
997
997
|
__name: "StrategyTable",
|
|
998
998
|
props: {
|
|
999
999
|
pageItems: {},
|
|
@@ -1007,7 +1007,7 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
1007
1007
|
},
|
|
1008
1008
|
emits: ["toggle-row", "toggle-sort", "load-trades", "select", "go"],
|
|
1009
1009
|
setup(e, { emit: t }) {
|
|
1010
|
-
const a = e, n = t,
|
|
1010
|
+
const a = e, n = t, s = [
|
|
1011
1011
|
{ key: "return", label: "Return %" },
|
|
1012
1012
|
{ key: "copiers", label: "Copiers" },
|
|
1013
1013
|
{ key: "aum", label: "Copiers AUM" },
|
|
@@ -1019,22 +1019,22 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
1019
1019
|
function c(l) {
|
|
1020
1020
|
return a.sortKey === `${l}-asc` ? "active-asc" : a.sortKey === `${l}-desc` ? "active-desc" : "";
|
|
1021
1021
|
}
|
|
1022
|
-
return (l, i) => (
|
|
1023
|
-
|
|
1024
|
-
i[1] || (i[1] =
|
|
1025
|
-
i[2] || (i[2] =
|
|
1026
|
-
(
|
|
1022
|
+
return (l, i) => (p(), y("section", dn, [
|
|
1023
|
+
o("div", mn, [
|
|
1024
|
+
i[1] || (i[1] = o("div", null, "Name", -1)),
|
|
1025
|
+
i[2] || (i[2] = o("div", null, "Equity curve", -1)),
|
|
1026
|
+
(p(), y(U, null, K(s, (u) => o("div", {
|
|
1027
1027
|
key: u.key,
|
|
1028
|
-
class:
|
|
1028
|
+
class: B(["c-num sortable", c(u.key)]),
|
|
1029
1029
|
onClick: (m) => n("toggle-sort", u.key)
|
|
1030
|
-
},
|
|
1031
|
-
i[3] || (i[3] =
|
|
1030
|
+
}, b(u.label), 11, fn)), 64)),
|
|
1031
|
+
i[3] || (i[3] = o("div", null, null, -1))
|
|
1032
1032
|
]),
|
|
1033
|
-
e.pageItems.length === 0 ? (
|
|
1034
|
-
|
|
1035
|
-
i[4] || (i[4] =
|
|
1033
|
+
e.pageItems.length === 0 ? (p(), y("div", vn, [
|
|
1034
|
+
q(l.$slots, "empty", {}, () => [
|
|
1035
|
+
i[4] || (i[4] = D("No matches.", -1))
|
|
1036
1036
|
], !0)
|
|
1037
|
-
])) : (
|
|
1037
|
+
])) : (p(!0), y(U, { key: 1 }, K(e.pageItems, (u) => (p(), ie(en, {
|
|
1038
1038
|
key: u.Id,
|
|
1039
1039
|
s: u,
|
|
1040
1040
|
expanded: e.expanded.has(u.Id),
|
|
@@ -1044,12 +1044,12 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
1044
1044
|
onLoadTrades: (m) => n("load-trades", { id: u.Id, kind: m }),
|
|
1045
1045
|
onSelect: (m) => n("select", u)
|
|
1046
1046
|
}, {
|
|
1047
|
-
"row-actions":
|
|
1048
|
-
|
|
1047
|
+
"row-actions": re((m) => [
|
|
1048
|
+
q(l.$slots, "row-actions", Ue({ ref_for: !0 }, m), void 0, !0)
|
|
1049
1049
|
]),
|
|
1050
1050
|
_: 3
|
|
1051
1051
|
}, 8, ["s", "expanded", "open-trades", "closed-trades", "onToggle", "onLoadTrades", "onSelect"]))), 128)),
|
|
1052
|
-
P(
|
|
1052
|
+
P(cn, {
|
|
1053
1053
|
page: e.page,
|
|
1054
1054
|
"total-pages": e.totalPages,
|
|
1055
1055
|
range: e.pageRange,
|
|
@@ -1057,10 +1057,10 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
1057
1057
|
}, null, 8, ["page", "total-pages", "range"])
|
|
1058
1058
|
]));
|
|
1059
1059
|
}
|
|
1060
|
-
}),
|
|
1060
|
+
}), gn = /* @__PURE__ */ N(pn, [["__scopeId", "data-v-c61b9ce8"]]), hn = {
|
|
1061
1061
|
key: 0,
|
|
1062
1062
|
class: "pelican-progress"
|
|
1063
|
-
},
|
|
1063
|
+
}, yn = { class: "bar" }, Mn = { class: "caption" }, bn = { class: "hint" }, xn = /* @__PURE__ */ F({
|
|
1064
1064
|
__name: "ProgressBar",
|
|
1065
1065
|
props: {
|
|
1066
1066
|
loaded: {},
|
|
@@ -1068,40 +1068,40 @@ const ua = Symbol("pelican.apiBase"), _e = Symbol("pelican.locale"), ca = ["data
|
|
|
1068
1068
|
active: { type: Boolean }
|
|
1069
1069
|
},
|
|
1070
1070
|
setup(e) {
|
|
1071
|
-
const t = e, a =
|
|
1071
|
+
const t = e, a = k(
|
|
1072
1072
|
() => t.total > 0 ? Math.min(100, t.loaded / t.total * 100) : 0
|
|
1073
1073
|
);
|
|
1074
|
-
return (n,
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
style:
|
|
1074
|
+
return (n, s) => e.active ? (p(), y("div", hn, [
|
|
1075
|
+
o("div", yn, [
|
|
1076
|
+
o("span", {
|
|
1077
|
+
style: Ve({ width: a.value.toFixed(1) + "%" })
|
|
1078
1078
|
}, null, 4)
|
|
1079
1079
|
]),
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1080
|
+
o("div", Mn, [
|
|
1081
|
+
s[0] || (s[0] = D(" Building full catalog: ", -1)),
|
|
1082
|
+
o("b", null, b(e.loaded.toLocaleString("en-US")), 1),
|
|
1083
|
+
D(" / " + b(e.total.toLocaleString("en-US")) + " strategies (" + b(a.value.toFixed(0)) + "%) · ", 1),
|
|
1084
|
+
s[1] || (s[1] = o("i", null, "upstream rate-limited", -1))
|
|
1085
1085
|
]),
|
|
1086
|
-
|
|
1087
|
-
])) :
|
|
1086
|
+
o("div", bn, " All " + b(e.total.toLocaleString("en-US")) + " strategies are visible. Stats fill in as the build progresses; refresh of data every 20 sec. ", 1)
|
|
1087
|
+
])) : O("", !0);
|
|
1088
1088
|
}
|
|
1089
|
-
}),
|
|
1090
|
-
function
|
|
1091
|
-
const t =
|
|
1089
|
+
}), wn = /* @__PURE__ */ N(xn, [["__scopeId", "data-v-8767a909"]]), Te = "pelican-theme";
|
|
1090
|
+
function $n(e = "auto") {
|
|
1091
|
+
const t = kn(), a = R(t ?? e), n = R("dark"), s = typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null, c = () => {
|
|
1092
1092
|
const m = a.value;
|
|
1093
|
-
n.value = m === "dark" ? "dark" : m === "light" ? "light" :
|
|
1093
|
+
n.value = m === "dark" ? "dark" : m === "light" ? "light" : s != null && s.matches ? "dark" : "light";
|
|
1094
1094
|
}, l = () => {
|
|
1095
1095
|
a.value === "auto" && c();
|
|
1096
1096
|
};
|
|
1097
|
-
|
|
1097
|
+
s && (s.addEventListener ? s.addEventListener("change", l) : s.addListener(l)), E(a, (m) => {
|
|
1098
1098
|
try {
|
|
1099
|
-
localStorage.setItem(
|
|
1099
|
+
localStorage.setItem(Te, m);
|
|
1100
1100
|
} catch {
|
|
1101
1101
|
}
|
|
1102
1102
|
c();
|
|
1103
|
-
}), c(),
|
|
1104
|
-
|
|
1103
|
+
}), c(), de(() => {
|
|
1104
|
+
s && (s.removeEventListener ? s.removeEventListener("change", l) : s.removeListener(l));
|
|
1105
1105
|
});
|
|
1106
1106
|
function i(m) {
|
|
1107
1107
|
a.value = m;
|
|
@@ -1111,135 +1111,142 @@ function wn(e = "auto") {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
return { mode: a, resolved: n, setMode: i, cycle: u };
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function kn() {
|
|
1115
1115
|
try {
|
|
1116
|
-
const e = localStorage.getItem(
|
|
1116
|
+
const e = localStorage.getItem(Te);
|
|
1117
1117
|
return e === "dark" || e === "light" || e === "auto" ? e : null;
|
|
1118
1118
|
} catch {
|
|
1119
1119
|
return null;
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Z(e, t, a) {
|
|
1123
1123
|
const n = new Error(t);
|
|
1124
1124
|
return n.code = e, a !== void 0 && (n.status = a), n;
|
|
1125
1125
|
}
|
|
1126
|
-
async function
|
|
1127
|
-
const a =
|
|
1126
|
+
async function oe(e, t) {
|
|
1127
|
+
const a = J(t, e);
|
|
1128
1128
|
let n;
|
|
1129
1129
|
try {
|
|
1130
1130
|
n = await fetch(a);
|
|
1131
|
-
} catch (
|
|
1132
|
-
throw
|
|
1131
|
+
} catch (s) {
|
|
1132
|
+
throw Z("fetch_failed", s.message ?? "fetch failed");
|
|
1133
1133
|
}
|
|
1134
1134
|
if (n.status === 401 || n.status === 503)
|
|
1135
|
-
throw
|
|
1135
|
+
throw Z("no_token", "Proxy has no token yet", n.status);
|
|
1136
1136
|
if (!n.ok) {
|
|
1137
|
-
const
|
|
1138
|
-
throw
|
|
1137
|
+
const s = await n.text().catch(() => "");
|
|
1138
|
+
throw Z("http_error", `${n.status}: ${s.slice(0, 120)}`, n.status);
|
|
1139
1139
|
}
|
|
1140
1140
|
return await n.json();
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function J(e, t) {
|
|
1143
1143
|
if (!e) return t;
|
|
1144
1144
|
const a = e.endsWith("/") ? e.slice(0, -1) : e, n = t.startsWith("/") ? t : "/" + t;
|
|
1145
1145
|
return a + n;
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1148
|
-
const
|
|
1149
|
-
let
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1147
|
+
function In({ apiBase: e, catalogBase: t, onError: a }) {
|
|
1148
|
+
const n = Ee(/* @__PURE__ */ new Map()), s = R(!1), c = R(!1), l = R(0), i = R(0), u = R(null), m = k(() => Array.from(n.value.values()));
|
|
1149
|
+
let g = !1;
|
|
1150
|
+
const f = (M) => {
|
|
1151
|
+
a ? a(M) : console.warn("[pelican-vue]", M);
|
|
1152
|
+
}, d = () => {
|
|
1153
|
+
const M = t == null ? void 0 : t.value;
|
|
1154
|
+
return !!M && M !== e.value;
|
|
1155
|
+
}, r = () => (t == null ? void 0 : t.value) || e.value;
|
|
1156
|
+
async function w(M) {
|
|
1154
1157
|
try {
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
const
|
|
1158
|
-
for (const
|
|
1159
|
-
|
|
1160
|
-
} catch (
|
|
1161
|
-
|
|
1158
|
+
const Y = await oe(M ? "/api/strategies-full?partial=1" : "/api/strategies-full", r());
|
|
1159
|
+
i.value = Y.length;
|
|
1160
|
+
const G = n.value;
|
|
1161
|
+
for (const L of Y) G.set(L.Id, { ...G.get(L.Id), ...L });
|
|
1162
|
+
ae(n);
|
|
1163
|
+
} catch (T) {
|
|
1164
|
+
f(T);
|
|
1162
1165
|
}
|
|
1163
1166
|
}
|
|
1164
|
-
async function
|
|
1167
|
+
async function I() {
|
|
1165
1168
|
try {
|
|
1166
|
-
const
|
|
1167
|
-
return
|
|
1168
|
-
} catch (
|
|
1169
|
-
return
|
|
1169
|
+
const M = await oe("/api/strategies-full/progress", r());
|
|
1170
|
+
return l.value = M.loaded, i.value = M.total || i.value, c.value = M.building, u.value = M.built_at, M;
|
|
1171
|
+
} catch (M) {
|
|
1172
|
+
return f(M), null;
|
|
1170
1173
|
}
|
|
1171
1174
|
}
|
|
1172
|
-
async function
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1175
|
+
async function _() {
|
|
1176
|
+
if (d()) {
|
|
1177
|
+
await w(!1), I(), s.value = !0;
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1180
|
+
await w(!0);
|
|
1181
|
+
let M = Date.now();
|
|
1182
|
+
for (; !g; ) {
|
|
1183
|
+
const T = await I();
|
|
1184
|
+
if (!T) {
|
|
1185
|
+
await Re(1500);
|
|
1179
1186
|
continue;
|
|
1180
1187
|
}
|
|
1181
|
-
if (
|
|
1182
|
-
Date.now() -
|
|
1188
|
+
if (T.ready) break;
|
|
1189
|
+
Date.now() - M > je && (await w(!0), M = Date.now()), await Re(He);
|
|
1183
1190
|
}
|
|
1184
|
-
|
|
1191
|
+
g || (await w(!1), s.value = !0);
|
|
1185
1192
|
}
|
|
1186
|
-
const
|
|
1187
|
-
async function
|
|
1188
|
-
if (
|
|
1189
|
-
const
|
|
1190
|
-
if (!(
|
|
1191
|
-
|
|
1193
|
+
const h = /* @__PURE__ */ new Set();
|
|
1194
|
+
async function C(M) {
|
|
1195
|
+
if (h.has(M)) return;
|
|
1196
|
+
const T = n.value.get(M);
|
|
1197
|
+
if (!(T != null && T._enrichAttempted && T._meta && T._stats)) {
|
|
1198
|
+
h.add(M);
|
|
1192
1199
|
try {
|
|
1193
|
-
const [
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
]),
|
|
1197
|
-
|
|
1200
|
+
const [Y, G] = await Promise.all([
|
|
1201
|
+
Se(J(e.value, `/api/strategies/${M}`)),
|
|
1202
|
+
Se(J(e.value, `/api/strategies/${M}/stats`))
|
|
1203
|
+
]), L = n.value, A = L.get(M) ?? { Id: M };
|
|
1204
|
+
_n(A, Y), Sn(A, G), A._enrichAttempted = !0, A.IsEnabled === !1 ? L.delete(M) : L.set(M, A), ae(n);
|
|
1198
1205
|
} finally {
|
|
1199
|
-
|
|
1206
|
+
h.delete(M);
|
|
1200
1207
|
}
|
|
1201
1208
|
}
|
|
1202
1209
|
}
|
|
1203
|
-
async function
|
|
1204
|
-
if (!(!
|
|
1210
|
+
async function V(M) {
|
|
1211
|
+
if (!(!M || !s.value))
|
|
1205
1212
|
try {
|
|
1206
|
-
const
|
|
1207
|
-
`/api/strategies?filter=${encodeURIComponent(
|
|
1213
|
+
const T = await oe(
|
|
1214
|
+
`/api/strategies?filter=${encodeURIComponent(M)}`,
|
|
1208
1215
|
e.value
|
|
1209
|
-
),
|
|
1210
|
-
let
|
|
1211
|
-
for (const
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
for (const
|
|
1215
|
-
} catch (
|
|
1216
|
-
|
|
1216
|
+
), Y = n.value, G = [];
|
|
1217
|
+
let L = 0;
|
|
1218
|
+
for (const A of T)
|
|
1219
|
+
Y.has(A.Id) || (Y.set(A.Id, { ...A, _stats: !1, _meta: !1 }), G.push(A.Id), L++);
|
|
1220
|
+
L && (i.value += L, ae(n));
|
|
1221
|
+
for (const A of G) C(A);
|
|
1222
|
+
} catch (T) {
|
|
1223
|
+
f(T);
|
|
1217
1224
|
}
|
|
1218
1225
|
}
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1226
|
+
function S() {
|
|
1227
|
+
g = !1, _();
|
|
1221
1228
|
}
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1229
|
+
function x() {
|
|
1230
|
+
g = !0;
|
|
1224
1231
|
}
|
|
1225
|
-
async function
|
|
1226
|
-
|
|
1232
|
+
async function $() {
|
|
1233
|
+
x(), n.value = /* @__PURE__ */ new Map(), s.value = !1, l.value = 0, i.value = 0, u.value = null, S();
|
|
1227
1234
|
}
|
|
1228
|
-
return
|
|
1229
|
-
catalog:
|
|
1230
|
-
ready:
|
|
1231
|
-
building:
|
|
1232
|
-
loaded:
|
|
1233
|
-
total:
|
|
1234
|
-
builtAt:
|
|
1235
|
-
enrichOne:
|
|
1236
|
-
searchExtra:
|
|
1237
|
-
refresh:
|
|
1238
|
-
start:
|
|
1239
|
-
stop:
|
|
1235
|
+
return de(x), {
|
|
1236
|
+
catalog: m,
|
|
1237
|
+
ready: s,
|
|
1238
|
+
building: c,
|
|
1239
|
+
loaded: l,
|
|
1240
|
+
total: i,
|
|
1241
|
+
builtAt: u,
|
|
1242
|
+
enrichOne: C,
|
|
1243
|
+
searchExtra: V,
|
|
1244
|
+
refresh: $,
|
|
1245
|
+
start: S,
|
|
1246
|
+
stop: x
|
|
1240
1247
|
};
|
|
1241
1248
|
}
|
|
1242
|
-
async function
|
|
1249
|
+
async function Se(e) {
|
|
1243
1250
|
try {
|
|
1244
1251
|
const t = await fetch(e);
|
|
1245
1252
|
return t.ok ? await t.json() : null;
|
|
@@ -1247,19 +1254,19 @@ async function $e(e) {
|
|
|
1247
1254
|
return null;
|
|
1248
1255
|
}
|
|
1249
1256
|
}
|
|
1250
|
-
function
|
|
1257
|
+
function _n(e, t) {
|
|
1251
1258
|
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);
|
|
1252
1259
|
}
|
|
1253
|
-
function
|
|
1254
|
-
var i, u, m,
|
|
1260
|
+
function Sn(e, t) {
|
|
1261
|
+
var i, u, m, g, f, d;
|
|
1255
1262
|
if (!t) return;
|
|
1256
|
-
const a = ((i = t.Profitability) == null ? void 0 : i.Inception) ?? {}, n = ((u = t.Trades) == null ? void 0 : u.Inception) ?? {},
|
|
1257
|
-
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((r) => ({ n: r.MarketName, c: r.Count })) : [], e.AccountBalance = ((m = t.Status) == null ? void 0 : m.Balance) ?? null, e.CopiersAUM = ((
|
|
1263
|
+
const a = ((i = t.Profitability) == null ? void 0 : i.Inception) ?? {}, n = ((u = t.Trades) == null ? void 0 : u.Inception) ?? {}, s = a.History ?? [], c = s.length > 60 ? Math.ceil(s.length / 60) : 1, l = s.filter((r, w) => w % c === 0 || w === s.length - 1).map((r) => ({ Timestamp: r.Timestamp, AccountReturn: r.AccountReturn }));
|
|
1264
|
+
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((r) => ({ n: r.MarketName, c: r.Count })) : [], e.AccountBalance = ((m = t.Status) == null ? void 0 : m.Balance) ?? null, e.CopiersAUM = ((g = t.CopiersBalance) == null ? void 0 : g.Balance) ?? null, e.MonthlyProfit = ((f = t.CopiersProfit) == null ? void 0 : f.Month) ?? null, e.YearlyProfit = ((d = t.CopiersProfit) == null ? void 0 : d.Year) ?? null, e._stats = !0;
|
|
1258
1265
|
}
|
|
1259
|
-
function
|
|
1266
|
+
function Re(e) {
|
|
1260
1267
|
return new Promise((t) => setTimeout(t, e));
|
|
1261
1268
|
}
|
|
1262
|
-
function
|
|
1269
|
+
function ce() {
|
|
1263
1270
|
return {
|
|
1264
1271
|
risk: /* @__PURE__ */ new Set(),
|
|
1265
1272
|
retMin: null,
|
|
@@ -1276,32 +1283,32 @@ function oe() {
|
|
|
1276
1283
|
search: ""
|
|
1277
1284
|
};
|
|
1278
1285
|
}
|
|
1279
|
-
function
|
|
1280
|
-
const a =
|
|
1286
|
+
function Rn(e, t = {}) {
|
|
1287
|
+
const a = ce(), n = Pe({
|
|
1281
1288
|
...a,
|
|
1282
1289
|
...t,
|
|
1283
1290
|
risk: new Set(t.risk ?? a.risk)
|
|
1284
|
-
}),
|
|
1291
|
+
}), s = k(() => e.value.filter((l) => Pn(l, n)));
|
|
1285
1292
|
function c() {
|
|
1286
|
-
const l =
|
|
1293
|
+
const l = ce();
|
|
1287
1294
|
n.risk = l.risk, n.retMin = null, n.retMax = null, n.ddMax = null, n.aumMin = null, n.copiersMin = null, n.ageMin = null, n.tradesMin = null, n.winrateMin = null, n.feeMax = null, n.balanceMin = null, n.balanceMax = null, n.search = "";
|
|
1288
1295
|
}
|
|
1289
|
-
return { filters: n, filtered:
|
|
1296
|
+
return { filters: n, filtered: s, reset: c };
|
|
1290
1297
|
}
|
|
1291
|
-
function
|
|
1292
|
-
var
|
|
1298
|
+
function Pn(e, t) {
|
|
1299
|
+
var s;
|
|
1293
1300
|
if (t.search) {
|
|
1294
1301
|
const c = t.search.toLowerCase();
|
|
1295
|
-
if (!(e.Name || "").toLowerCase().includes(c) && !(((
|
|
1302
|
+
if (!(e.Name || "").toLowerCase().includes(c) && !(((s = e.Profile) == null ? void 0 : s.Name) || "").toLowerCase().includes(c))
|
|
1296
1303
|
return !1;
|
|
1297
1304
|
}
|
|
1298
1305
|
if (t.risk.size && e.RiskProfile && !t.risk.has(e.RiskProfile) || e.IsSimulated || e._stats && !e.TradesTotal || t.copiersMin != null && (e.NumCopiers ?? 0) < t.copiersMin || t.aumMin != null && (e.CopiersAUM ?? 0) < t.aumMin || t.balanceMin != null && (e.AccountBalance ?? 0) < t.balanceMin || t.balanceMax != null && (e.AccountBalance ?? 1 / 0) > t.balanceMax || t.feeMax != null && e.Fee != null && e.Fee * 100 > t.feeMax || t.tradesMin != null && (e.TradesTotal ?? 0) < t.tradesMin) return !1;
|
|
1299
|
-
const a =
|
|
1306
|
+
const a = W(e);
|
|
1300
1307
|
if (t.winrateMin != null && (a < 0 || a < t.winrateMin)) return !1;
|
|
1301
|
-
const n =
|
|
1308
|
+
const n = j(e.Inception);
|
|
1302
1309
|
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);
|
|
1303
1310
|
}
|
|
1304
|
-
const
|
|
1311
|
+
const Cn = {
|
|
1305
1312
|
"return-desc": (e, t) => (t.Return ?? -1e18) - (e.Return ?? -1e18),
|
|
1306
1313
|
"return-asc": (e, t) => (e.Return ?? 1e18) - (t.Return ?? 1e18),
|
|
1307
1314
|
"dd-asc": (e, t) => Math.abs(e.MaxDD ?? 1e9) - Math.abs(t.MaxDD ?? 1e9),
|
|
@@ -1312,55 +1319,55 @@ const Pn = {
|
|
|
1312
1319
|
"copiers-asc": (e, t) => (e.NumCopiers ?? 1 / 0) - (t.NumCopiers ?? 1 / 0),
|
|
1313
1320
|
"fee-asc": (e, t) => (e.Fee ?? 1 / 0) - (t.Fee ?? 1 / 0),
|
|
1314
1321
|
"fee-desc": (e, t) => (t.Fee ?? -1) - (e.Fee ?? -1),
|
|
1315
|
-
"age-desc": (e, t) => (
|
|
1316
|
-
"age-asc": (e, t) => (
|
|
1322
|
+
"age-desc": (e, t) => (j(t.Inception) ?? -1) - (j(e.Inception) ?? -1),
|
|
1323
|
+
"age-asc": (e, t) => (j(e.Inception) ?? 1 / 0) - (j(t.Inception) ?? 1 / 0),
|
|
1317
1324
|
"balance-desc": (e, t) => (t.AccountBalance ?? -1) - (e.AccountBalance ?? -1),
|
|
1318
1325
|
"balance-asc": (e, t) => (e.AccountBalance ?? 1 / 0) - (t.AccountBalance ?? 1 / 0),
|
|
1319
|
-
"winrate-desc": (e, t) =>
|
|
1320
|
-
"winrate-asc": (e, t) =>
|
|
1326
|
+
"winrate-desc": (e, t) => W(t) - W(e),
|
|
1327
|
+
"winrate-asc": (e, t) => W(e) - W(t),
|
|
1321
1328
|
"trades-desc": (e, t) => (t.TradesTotal ?? -1) - (e.TradesTotal ?? -1),
|
|
1322
1329
|
"trades-asc": (e, t) => (e.TradesTotal ?? 1 / 0) - (t.TradesTotal ?? 1 / 0),
|
|
1323
1330
|
"monthly-desc": (e, t) => (t.MonthlyProfit ?? -1e18) - (e.MonthlyProfit ?? -1e18),
|
|
1324
1331
|
"monthly-asc": (e, t) => (e.MonthlyProfit ?? 1e18) - (t.MonthlyProfit ?? 1e18)
|
|
1325
1332
|
};
|
|
1326
1333
|
function Tn(e, t = "return-desc") {
|
|
1327
|
-
const a =
|
|
1328
|
-
const c =
|
|
1334
|
+
const a = R(t), n = k(() => {
|
|
1335
|
+
const c = Cn[a.value] ?? (() => 0);
|
|
1329
1336
|
return e.value.slice().sort(c);
|
|
1330
1337
|
});
|
|
1331
|
-
function
|
|
1338
|
+
function s(c) {
|
|
1332
1339
|
const [l, i] = Ze[c];
|
|
1333
1340
|
a.value = a.value === l ? i : l;
|
|
1334
1341
|
}
|
|
1335
1342
|
return {
|
|
1336
1343
|
sortKey: a,
|
|
1337
1344
|
sorted: n,
|
|
1338
|
-
toggleColumn:
|
|
1345
|
+
toggleColumn: s,
|
|
1339
1346
|
setKey: (c) => {
|
|
1340
1347
|
a.value = c;
|
|
1341
1348
|
}
|
|
1342
1349
|
};
|
|
1343
1350
|
}
|
|
1344
|
-
function
|
|
1345
|
-
const a =
|
|
1346
|
-
|
|
1351
|
+
function An(e, t) {
|
|
1352
|
+
const a = R(1), n = k(() => Math.max(1, Math.ceil(e.value.length / t)));
|
|
1353
|
+
E(n, (l) => {
|
|
1347
1354
|
a.value > l && (a.value = l), a.value < 1 && (a.value = 1);
|
|
1348
1355
|
});
|
|
1349
|
-
const
|
|
1356
|
+
const s = k(() => {
|
|
1350
1357
|
const l = (a.value - 1) * t;
|
|
1351
1358
|
return e.value.slice(l, l + t);
|
|
1352
|
-
}), c =
|
|
1359
|
+
}), c = k(() => {
|
|
1353
1360
|
const l = a.value, i = n.value;
|
|
1354
1361
|
if (i <= 1) return [];
|
|
1355
|
-
const m = [.../* @__PURE__ */ new Set([1, i, l, l - 1, l + 1, l - 2, l + 2, 2, i - 1])].filter((
|
|
1356
|
-
for (let
|
|
1357
|
-
|
|
1358
|
-
return
|
|
1362
|
+
const m = [.../* @__PURE__ */ new Set([1, i, l, l - 1, l + 1, l - 2, l + 2, 2, i - 1])].filter((f) => f >= 1 && f <= i).sort((f, d) => f - d), g = [];
|
|
1363
|
+
for (let f = 0; f < m.length; f++)
|
|
1364
|
+
f && m[f] - m[f - 1] > 1 && g.push("…"), g.push(m[f]);
|
|
1365
|
+
return g;
|
|
1359
1366
|
});
|
|
1360
1367
|
return {
|
|
1361
1368
|
page: a,
|
|
1362
1369
|
totalPages: n,
|
|
1363
|
-
pageItems:
|
|
1370
|
+
pageItems: s,
|
|
1364
1371
|
pageRange: c,
|
|
1365
1372
|
setPage: (l) => {
|
|
1366
1373
|
a.value = Math.max(1, Math.min(n.value, l));
|
|
@@ -1373,158 +1380,160 @@ function Cn(e, t) {
|
|
|
1373
1380
|
}
|
|
1374
1381
|
};
|
|
1375
1382
|
}
|
|
1376
|
-
function
|
|
1377
|
-
const t =
|
|
1383
|
+
function Fn(e) {
|
|
1384
|
+
const t = R(/* @__PURE__ */ new Map()), a = R(/* @__PURE__ */ new Map());
|
|
1378
1385
|
function n(c, l) {
|
|
1379
1386
|
return (l === "open" ? t.value : a.value).get(c) ?? null;
|
|
1380
1387
|
}
|
|
1381
|
-
async function
|
|
1388
|
+
async function s(c, l) {
|
|
1382
1389
|
const i = l === "open" ? t : a, u = i.value.get(c);
|
|
1383
1390
|
if (u && (u.loading || u.trades !== null)) return;
|
|
1384
1391
|
const m = new Map(i.value);
|
|
1385
1392
|
m.set(c, { loading: !0, trades: null, error: null }), i.value = m;
|
|
1386
|
-
let
|
|
1393
|
+
let g = "";
|
|
1387
1394
|
if (l === "closed") {
|
|
1388
|
-
const I = /* @__PURE__ */ new Date(), _ = new Date(Date.now() - We * 864e5),
|
|
1389
|
-
|
|
1395
|
+
const I = /* @__PURE__ */ new Date(), _ = new Date(Date.now() - We * 864e5), h = (C) => C.toISOString().replace(/\.\d+Z$/, "Z");
|
|
1396
|
+
g = `?startDate=${encodeURIComponent(h(_))}&endDate=${encodeURIComponent(h(I))}`;
|
|
1390
1397
|
}
|
|
1391
|
-
const
|
|
1392
|
-
let
|
|
1398
|
+
const f = J(e.value, `/api/strategies/${c}/signals/${l}${g}`);
|
|
1399
|
+
let d = [], r = null;
|
|
1393
1400
|
try {
|
|
1394
|
-
const I = await fetch(
|
|
1395
|
-
if (!I.ok) throw
|
|
1396
|
-
|
|
1401
|
+
const I = await fetch(f);
|
|
1402
|
+
if (!I.ok) throw Z("http_error", `${I.status}`);
|
|
1403
|
+
d = await I.json();
|
|
1397
1404
|
} catch (I) {
|
|
1398
|
-
r = I.code ? I :
|
|
1405
|
+
r = I.code ? I : Z("fetch_failed", I.message), d = [];
|
|
1399
1406
|
}
|
|
1400
1407
|
const w = new Map(i.value);
|
|
1401
|
-
w.set(c, { loading: !1, trades:
|
|
1408
|
+
w.set(c, { loading: !1, trades: d, error: r }), i.value = w;
|
|
1402
1409
|
}
|
|
1403
|
-
return { open: t, closed: a, load:
|
|
1410
|
+
return { open: t, closed: a, load: s, get: n };
|
|
1404
1411
|
}
|
|
1405
|
-
const
|
|
1412
|
+
const Nn = ["data-theme"], Ln = { class: "brand-row" }, Dn = ["title"], Un = { "aria-hidden": "true" }, Vn = { class: "pelican-main" }, En = /* @__PURE__ */ F({
|
|
1406
1413
|
__name: "PelicanLibertexSocial",
|
|
1407
1414
|
props: {
|
|
1408
1415
|
apiBase: {},
|
|
1416
|
+
catalogBase: {},
|
|
1409
1417
|
theme: { default: "auto" },
|
|
1410
1418
|
defaultSort: { default: "return-desc" },
|
|
1411
1419
|
defaultFilters: {},
|
|
1412
1420
|
columns: {},
|
|
1413
1421
|
locale: { default: "en-US" },
|
|
1414
|
-
pageSize: { default:
|
|
1422
|
+
pageSize: { default: Ge }
|
|
1415
1423
|
},
|
|
1416
1424
|
emits: ["update:theme", "select-strategy", "error"],
|
|
1417
1425
|
setup(e, { emit: t }) {
|
|
1418
1426
|
const a = e, n = t;
|
|
1419
|
-
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1427
|
+
ne(ua, a.apiBase), ne(ca, a.catalogBase ?? a.apiBase), ne(Ce, a.locale);
|
|
1428
|
+
const s = ye(a, "apiBase"), c = ye(a, "catalogBase"), l = $n(a.theme);
|
|
1429
|
+
E(l.mode, (x) => n("update:theme", x)), E(
|
|
1422
1430
|
() => a.theme,
|
|
1423
|
-
(
|
|
1431
|
+
(x) => l.setMode(x)
|
|
1424
1432
|
);
|
|
1425
|
-
const
|
|
1426
|
-
apiBase:
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
+
const i = In({
|
|
1434
|
+
apiBase: s,
|
|
1435
|
+
catalogBase: c,
|
|
1436
|
+
onError: (x) => n("error", x)
|
|
1437
|
+
}), u = Rn(i.catalog, a.defaultFilters ?? {}), m = Tn(u.filtered, a.defaultSort), g = An(m.sorted, a.pageSize), f = Fn(s), d = Pe(/* @__PURE__ */ new Set()), r = R(!1), w = R(null);
|
|
1438
|
+
function I(x) {
|
|
1439
|
+
d.has(x) ? d.delete(x) : d.add(x);
|
|
1440
|
+
const $ = i.catalog.value.find((M) => M.Id === x);
|
|
1441
|
+
$ && ((!$._meta || !$._stats) && !$._enrichAttempted && i.enrichOne(x), n("select-strategy", $));
|
|
1433
1442
|
}
|
|
1434
|
-
function
|
|
1435
|
-
|
|
1443
|
+
function _(x) {
|
|
1444
|
+
m.toggleColumn(x), g.setPage(1);
|
|
1436
1445
|
}
|
|
1437
|
-
function
|
|
1438
|
-
Object.assign(
|
|
1446
|
+
function h(x) {
|
|
1447
|
+
Object.assign(u.filters, x), g.setPage(1);
|
|
1439
1448
|
}
|
|
1440
|
-
function
|
|
1441
|
-
const
|
|
1442
|
-
Object.assign(
|
|
1449
|
+
function C() {
|
|
1450
|
+
const x = ce();
|
|
1451
|
+
Object.assign(u.filters, x), u.filters.risk = x.risk, w.value = null, g.setPage(1);
|
|
1443
1452
|
}
|
|
1444
|
-
function
|
|
1445
|
-
|
|
1453
|
+
function V({ id: x, kind: $ }) {
|
|
1454
|
+
f.load(x, $);
|
|
1446
1455
|
}
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1456
|
+
function S(x) {
|
|
1457
|
+
x === "prev" ? g.prev() : x === "next" ? g.next() : g.setPage(x);
|
|
1449
1458
|
}
|
|
1450
|
-
return Be(() =>
|
|
1459
|
+
return Be(() => i.start()), (x, $) => (p(), y("div", {
|
|
1451
1460
|
class: "pelican-libsoc",
|
|
1452
|
-
"data-theme":
|
|
1461
|
+
"data-theme": v(l).resolved.value
|
|
1453
1462
|
}, [
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1463
|
+
o("header", Ln, [
|
|
1464
|
+
q(x.$slots, "brand", {}, () => [
|
|
1465
|
+
$[6] || ($[6] = o("div", { class: "default-brand" }, "Libertex Social — Copy Trading", -1))
|
|
1457
1466
|
], !0),
|
|
1458
|
-
|
|
1467
|
+
o("button", {
|
|
1459
1468
|
class: "theme-toggle",
|
|
1460
1469
|
type: "button",
|
|
1461
|
-
title:
|
|
1462
|
-
onClick:
|
|
1463
|
-
(...
|
|
1470
|
+
title: v(l).mode.value,
|
|
1471
|
+
onClick: $[0] || ($[0] = //@ts-ignore
|
|
1472
|
+
(...M) => v(l).cycle && v(l).cycle(...M))
|
|
1464
1473
|
}, [
|
|
1465
|
-
|
|
1466
|
-
], 8,
|
|
1474
|
+
o("span", Un, b(v(l).resolved.value === "dark" ? "🌙" : "☀️"), 1)
|
|
1475
|
+
], 8, Dn)
|
|
1467
1476
|
]),
|
|
1468
1477
|
P(st, {
|
|
1469
|
-
search:
|
|
1470
|
-
"sort-key":
|
|
1471
|
-
total:
|
|
1472
|
-
"filtered-total":
|
|
1473
|
-
page:
|
|
1474
|
-
"total-pages":
|
|
1475
|
-
"onUpdate:search":
|
|
1476
|
-
"onUpdate:sortKey":
|
|
1477
|
-
onRefresh:
|
|
1478
|
-
onToggleFilters:
|
|
1478
|
+
search: v(u).filters.search,
|
|
1479
|
+
"sort-key": v(m).sortKey.value,
|
|
1480
|
+
total: v(i).total.value,
|
|
1481
|
+
"filtered-total": v(u).filtered.value.length,
|
|
1482
|
+
page: v(g).page.value,
|
|
1483
|
+
"total-pages": v(g).totalPages.value,
|
|
1484
|
+
"onUpdate:search": $[1] || ($[1] = (M) => h({ search: M })),
|
|
1485
|
+
"onUpdate:sortKey": $[2] || ($[2] = (M) => v(m).setKey(M)),
|
|
1486
|
+
onRefresh: v(i).refresh,
|
|
1487
|
+
onToggleFilters: $[3] || ($[3] = (M) => r.value = !r.value)
|
|
1479
1488
|
}, null, 8, ["search", "sort-key", "total", "filtered-total", "page", "total-pages", "onRefresh"]),
|
|
1480
|
-
P(
|
|
1481
|
-
loaded:
|
|
1482
|
-
total:
|
|
1483
|
-
active:
|
|
1489
|
+
P(wn, {
|
|
1490
|
+
loaded: v(i).loaded.value,
|
|
1491
|
+
total: v(i).total.value,
|
|
1492
|
+
active: v(i).building.value && !v(i).ready.value
|
|
1484
1493
|
}, null, 8, ["loaded", "total", "active"]),
|
|
1485
|
-
|
|
1494
|
+
o("main", Vn, [
|
|
1486
1495
|
P(Ut, {
|
|
1487
|
-
filters:
|
|
1488
|
-
"invest-amount":
|
|
1489
|
-
open:
|
|
1490
|
-
"onUpdate:filters":
|
|
1491
|
-
"onUpdate:investAmount":
|
|
1492
|
-
onReset:
|
|
1496
|
+
filters: v(u).filters,
|
|
1497
|
+
"invest-amount": w.value,
|
|
1498
|
+
open: r.value,
|
|
1499
|
+
"onUpdate:filters": h,
|
|
1500
|
+
"onUpdate:investAmount": $[4] || ($[4] = (M) => w.value = M),
|
|
1501
|
+
onReset: C
|
|
1493
1502
|
}, null, 8, ["filters", "invest-amount", "open"]),
|
|
1494
|
-
P(
|
|
1495
|
-
"page-items":
|
|
1496
|
-
expanded:
|
|
1497
|
-
"sort-key":
|
|
1498
|
-
page:
|
|
1499
|
-
"total-pages":
|
|
1500
|
-
"page-range":
|
|
1501
|
-
"open-signals":
|
|
1502
|
-
"closed-signals":
|
|
1503
|
-
onToggleRow:
|
|
1504
|
-
onToggleSort:
|
|
1505
|
-
onLoadTrades:
|
|
1506
|
-
onSelect:
|
|
1507
|
-
onGo:
|
|
1503
|
+
P(gn, {
|
|
1504
|
+
"page-items": v(g).pageItems.value,
|
|
1505
|
+
expanded: d,
|
|
1506
|
+
"sort-key": v(m).sortKey.value,
|
|
1507
|
+
page: v(g).page.value,
|
|
1508
|
+
"total-pages": v(g).totalPages.value,
|
|
1509
|
+
"page-range": v(g).pageRange.value,
|
|
1510
|
+
"open-signals": v(f).open.value,
|
|
1511
|
+
"closed-signals": v(f).closed.value,
|
|
1512
|
+
onToggleRow: I,
|
|
1513
|
+
onToggleSort: _,
|
|
1514
|
+
onLoadTrades: V,
|
|
1515
|
+
onSelect: $[5] || ($[5] = (M) => n("select-strategy", M)),
|
|
1516
|
+
onGo: S
|
|
1508
1517
|
}, {
|
|
1509
|
-
empty:
|
|
1510
|
-
|
|
1511
|
-
|
|
1518
|
+
empty: re(() => [
|
|
1519
|
+
q(x.$slots, "empty", {}, () => [
|
|
1520
|
+
$[7] || ($[7] = D("No matches.", -1))
|
|
1512
1521
|
], !0)
|
|
1513
1522
|
]),
|
|
1514
|
-
"row-actions":
|
|
1515
|
-
|
|
1523
|
+
"row-actions": re((M) => [
|
|
1524
|
+
q(x.$slots, "row-actions", Oe(Ke(M)), void 0, !0)
|
|
1516
1525
|
]),
|
|
1517
1526
|
_: 3
|
|
1518
1527
|
}, 8, ["page-items", "expanded", "sort-key", "page", "total-pages", "page-range", "open-signals", "closed-signals"])
|
|
1519
1528
|
])
|
|
1520
|
-
], 8,
|
|
1529
|
+
], 8, Nn));
|
|
1521
1530
|
}
|
|
1522
|
-
}),
|
|
1531
|
+
}), On = /* @__PURE__ */ N(En, [["__scopeId", "data-v-33b03803"]]);
|
|
1523
1532
|
export {
|
|
1524
|
-
|
|
1533
|
+
On as PelicanLibertexSocial,
|
|
1525
1534
|
qe as SORT_KEYS,
|
|
1526
1535
|
Xe as SORT_LABELS,
|
|
1527
1536
|
Ze as SORT_TOGGLE,
|
|
1528
|
-
|
|
1537
|
+
ce as defaultFilters
|
|
1529
1538
|
};
|
|
1530
1539
|
//# sourceMappingURL=pelican-libertex-social.mjs.map
|