@363045841yyt/klinechart 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
- package/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +634 -617
- package/dist/web-component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/IndicatorSelector.vue +13 -5
- package/src/components/KLineChart.vue +4 -3
- package/src/index.ts +41 -14
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, vModelText as j, watch as M, withCtx as N, withDirectives as P, withKeys as F, withModifiers as I } from "vue";
|
|
2
|
-
import { COLOR_PRESET_ITEMS as
|
|
3
|
-
import { DrawingInteractionController as se, allIndicators as ce, createChartController as le, createIndicatorSelectorController as ue, findIndicator as de, kGapFromKWidth as fe,
|
|
4
|
-
import { SemanticChartController as
|
|
5
|
-
import { getRegisteredIndicatorDefinition as
|
|
6
|
-
import { DEFAULT_SETTINGS as
|
|
2
|
+
import { COLOR_PRESET_ITEMS as L, VERSION as ee, createChartController as te, createIndicatorSelectorController as R, darkTheme as ne, formatTimestamp as z, lightTheme as re, normalizeColorPresetSettings as ie, resolveThemeColors as ae, themeToCssVars as oe } from "@363045841yyt/klinechart-core";
|
|
3
|
+
import { DrawingInteractionController as se, allIndicators as ce, createChartController as le, createIndicatorSelectorController as ue, findIndicator as de, isBuiltinIndicatorsLoaded as B, kGapFromKWidth as fe, loadBuiltinIndicators as pe, zoomLevelToKWidth as me } from "@363045841yyt/klinechart-core/controllers";
|
|
4
|
+
import { SemanticChartController as he } from "@363045841yyt/klinechart-core/semantic";
|
|
5
|
+
import { getRegisteredIndicatorDefinition as ge } from "@363045841yyt/klinechart-core/indicators";
|
|
6
|
+
import { DEFAULT_SETTINGS as V, SETTINGS_STORAGE_KEY as _e } from "@363045841yyt/klinechart-core/config";
|
|
7
7
|
//#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var ve = { class: "color-preset-tools" }, ye = {
|
|
9
9
|
class: "theme-tabs",
|
|
10
10
|
role: "tablist",
|
|
11
11
|
"aria-label": "颜色主题"
|
|
12
|
-
},
|
|
12
|
+
}, H = ["onClick"], be = { class: "color-group-label" }, xe = { class: "color-grid" }, Se = ["value", "onInput"], Ce = /*@__PURE__*/ u({
|
|
13
13
|
__name: "ColorPresetPanel",
|
|
14
14
|
props: { colorPresetSettings: {} },
|
|
15
15
|
emits: ["update:colorPresetSettings"],
|
|
@@ -28,16 +28,16 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
28
28
|
}, u = r(() => Object.keys(l).map((e) => ({
|
|
29
29
|
group: e,
|
|
30
30
|
label: l[e],
|
|
31
|
-
items:
|
|
31
|
+
items: L.filter((t) => t.group === e)
|
|
32
32
|
})).filter((e) => e.items.length > 0)), d = w("light");
|
|
33
33
|
function f(e, t) {
|
|
34
|
-
return (e === "dark" ? ne :
|
|
34
|
+
return (e === "dark" ? ne : re).colors[t];
|
|
35
35
|
}
|
|
36
36
|
function p(e) {
|
|
37
|
-
return
|
|
37
|
+
return ie(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
|
|
38
38
|
}
|
|
39
39
|
function m(e, t) {
|
|
40
|
-
let n =
|
|
40
|
+
let n = ie(i.colorPresetSettings);
|
|
41
41
|
a("update:colorPresetSettings", {
|
|
42
42
|
...n,
|
|
43
43
|
[d.value]: {
|
|
@@ -47,19 +47,19 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function h() {
|
|
50
|
-
let e = { ...
|
|
50
|
+
let e = { ...ie(i.colorPresetSettings) };
|
|
51
51
|
delete e[d.value], a("update:colorPresetSettings", e);
|
|
52
52
|
}
|
|
53
|
-
return (t, n) => (S(), o("div", null, [s("div",
|
|
53
|
+
return (t, n) => (S(), o("div", null, [s("div", ve, [s("div", ye, [(S(), o(e, null, T(c, (e) => s("button", {
|
|
54
54
|
key: e.value,
|
|
55
55
|
type: "button",
|
|
56
56
|
class: g(["theme-tab", { active: d.value === e.value }]),
|
|
57
57
|
onClick: (t) => d.value = e.value
|
|
58
|
-
}, O(e.label), 11,
|
|
58
|
+
}, O(e.label), 11, H)), 64))]), s("button", {
|
|
59
59
|
type: "button",
|
|
60
60
|
class: "color-reset-btn",
|
|
61
61
|
onClick: h
|
|
62
|
-
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", be, O(t.label), 1), s("div",
|
|
62
|
+
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", be, O(t.label), 1), s("div", xe, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
|
|
63
63
|
key: e.key,
|
|
64
64
|
class: "color-item"
|
|
65
65
|
}, [s("span", null, O(e.label), 1), s("input", {
|
|
@@ -67,20 +67,20 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
67
67
|
class: "color-input",
|
|
68
68
|
value: p(e.key),
|
|
69
69
|
onInput: (t) => m(e.key, t.target.value)
|
|
70
|
-
}, null, 40,
|
|
70
|
+
}, null, 40, Se)]))), 128))])], 64))), 128))]));
|
|
71
71
|
}
|
|
72
|
-
}),
|
|
72
|
+
}), U = (e, t) => {
|
|
73
73
|
let n = e.__vccOpts || e;
|
|
74
74
|
for (let [e, r] of t) n[e] = r;
|
|
75
75
|
return n;
|
|
76
|
-
},
|
|
76
|
+
}, W = /*#__PURE__*/ U(Ce, [["__scopeId", "data-v-a52947a4"]]), we = [
|
|
77
77
|
"title",
|
|
78
78
|
"aria-expanded",
|
|
79
79
|
"onKeydown"
|
|
80
80
|
], Te = {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "dropdown__label"
|
|
83
|
-
}, Ee = { class: "dropdown__value" }, De = ["aria-selected", "onClick"],
|
|
83
|
+
}, Ee = { class: "dropdown__value" }, De = ["aria-selected", "onClick"], G = 0, Oe = null, ke = 0, K = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
84
84
|
__name: "Dropdown",
|
|
85
85
|
props: {
|
|
86
86
|
modelValue: {},
|
|
@@ -92,7 +92,7 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
92
92
|
},
|
|
93
93
|
emits: ["update:modelValue"],
|
|
94
94
|
setup(t, { emit: n }) {
|
|
95
|
-
let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++
|
|
95
|
+
let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++ke, m = r(() => i.minWidth ? { minWidth: i.minWidth } : {}), h = r(() => {
|
|
96
96
|
if (!d.value) return;
|
|
97
97
|
let e = f.value || (i.minWidth ? parseInt(i.minWidth) : 0);
|
|
98
98
|
return { width: e ? `${e}px` : void 0 };
|
|
@@ -101,10 +101,10 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
101
101
|
return e && i.options.some((t) => t.value === e) ? e : i.options[0]?.value ?? "";
|
|
102
102
|
}), b = r(() => i.options.find((e) => e.value === y.value) ?? i.options[0]);
|
|
103
103
|
function x() {
|
|
104
|
-
|
|
104
|
+
G !== p && Oe && Oe(), !d.value && (G = p, Oe = C, f.value = u.value?.offsetWidth ?? 0, d.value = !0, document.addEventListener("pointerdown", k));
|
|
105
105
|
}
|
|
106
106
|
function C() {
|
|
107
|
-
d.value && (d.value = !1,
|
|
107
|
+
d.value && (d.value = !1, G === p && (G = 0, Oe = null), document.removeEventListener("pointerdown", k));
|
|
108
108
|
}
|
|
109
109
|
function E() {
|
|
110
110
|
d.value ? C() : x();
|
|
@@ -158,10 +158,10 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
158
158
|
onClick: (t) => D(e.value)
|
|
159
159
|
}, O(e.label), 11, De))), 128))], 4)) : a("", !0)], 2));
|
|
160
160
|
}
|
|
161
|
-
}), [["__scopeId", "data-v-126e11f2"]]),
|
|
161
|
+
}), [["__scopeId", "data-v-126e11f2"]]), Ae = {
|
|
162
162
|
class: "toolbar-item color-item",
|
|
163
163
|
title: "颜色"
|
|
164
|
-
},
|
|
164
|
+
}, je = ["value"], Me = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
165
165
|
__name: "DrawingStyleToolbar",
|
|
166
166
|
props: { drawing: {} },
|
|
167
167
|
emits: ["updateStyle", "delete"],
|
|
@@ -216,7 +216,7 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
216
216
|
onPointermove: i[5] ||= I(() => {}, ["stop"]),
|
|
217
217
|
onPointerup: i[6] ||= I(() => {}, ["stop"])
|
|
218
218
|
}, [
|
|
219
|
-
s("div",
|
|
219
|
+
s("div", Ae, [s("span", {
|
|
220
220
|
class: "color-swatch",
|
|
221
221
|
style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
|
|
222
222
|
}, null, 4), s("input", {
|
|
@@ -224,15 +224,15 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
224
224
|
class: "color-input",
|
|
225
225
|
value: e.drawing.style.stroke ?? "#2962ff",
|
|
226
226
|
onInput: i[0] ||= (e) => c(e.target.value)
|
|
227
|
-
}, null, 40,
|
|
228
|
-
l(
|
|
227
|
+
}, null, 40, je)]),
|
|
228
|
+
l(K, {
|
|
229
229
|
"model-value": String(e.drawing.style.strokeWidth ?? 1),
|
|
230
230
|
options: n,
|
|
231
231
|
size: "sm",
|
|
232
232
|
title: "线宽",
|
|
233
233
|
"onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
|
|
234
234
|
}, null, 8, ["model-value"]),
|
|
235
|
-
l(
|
|
235
|
+
l(K, {
|
|
236
236
|
"model-value": e.drawing.style.strokeStyle ?? "solid",
|
|
237
237
|
options: r,
|
|
238
238
|
size: "sm",
|
|
@@ -260,32 +260,32 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
260
260
|
], -1)]])
|
|
261
261
|
], 32));
|
|
262
262
|
}
|
|
263
|
-
}), [["__scopeId", "data-v-e9b6a8a9"]]),
|
|
264
|
-
function
|
|
265
|
-
C(
|
|
263
|
+
}), [["__scopeId", "data-v-e9b6a8a9"]]), Ne = Symbol("fullscreen-teleport-target");
|
|
264
|
+
function Pe(e) {
|
|
265
|
+
C(Ne, e);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
let e = p(
|
|
267
|
+
function Fe() {
|
|
268
|
+
let e = p(Ne, null);
|
|
269
269
|
return r(() => e?.value ?? "body");
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
272
|
//#region src/components/IndicatorParams.vue?vue&type=script&setup=true&lang.ts
|
|
273
|
-
var
|
|
273
|
+
var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class: "params-title" }, ze = { class: "header-right" }, Be = {
|
|
274
274
|
key: 0,
|
|
275
275
|
class: "indicator-description"
|
|
276
|
-
},
|
|
276
|
+
}, Ve = { class: "params-body" }, He = { class: "param-header" }, Ue = { class: "param-label" }, q = { class: "param-label-text" }, J = {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "param-range"
|
|
279
|
-
},
|
|
279
|
+
}, We = { class: "input-wrapper" }, Ge = ["disabled", "onClick"], Ke = [
|
|
280
280
|
"value",
|
|
281
281
|
"min",
|
|
282
282
|
"max",
|
|
283
283
|
"step",
|
|
284
284
|
"onInput"
|
|
285
|
-
],
|
|
285
|
+
], qe = ["disabled", "onClick"], Je = {
|
|
286
286
|
key: 0,
|
|
287
287
|
class: "param-description"
|
|
288
|
-
},
|
|
288
|
+
}, Ye = { class: "params-footer" }, Xe = { class: "footer-right" }, Ze = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
289
289
|
__name: "IndicatorParams",
|
|
290
290
|
props: {
|
|
291
291
|
visible: { type: Boolean },
|
|
@@ -297,7 +297,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
297
297
|
},
|
|
298
298
|
emits: ["close", "confirm"],
|
|
299
299
|
setup(r, { emit: u }) {
|
|
300
|
-
let d = r, f = u, p = w({ ...d.values }), m = w(!0), h =
|
|
300
|
+
let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Fe();
|
|
301
301
|
M(() => d.values, (e) => {
|
|
302
302
|
p.value = { ...e };
|
|
303
303
|
}, {
|
|
@@ -333,7 +333,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
333
333
|
class: "indicator-params",
|
|
334
334
|
onClick: d[3] ||= I(() => {}, ["stop"])
|
|
335
335
|
}, [
|
|
336
|
-
s("div",
|
|
336
|
+
s("div", Ie, [s("div", Le, [s("span", Re, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", ze, [s("button", {
|
|
337
337
|
class: g(["toggle-desc-btn", { active: m.value }]),
|
|
338
338
|
onClick: d[0] ||= (e) => m.value = !m.value,
|
|
339
339
|
title: "显示/隐藏说明"
|
|
@@ -350,18 +350,18 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
350
350
|
"stroke-width": "2"
|
|
351
351
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
352
352
|
l(n, { name: "slide" }, {
|
|
353
|
-
default: N(() => [m.value && r.indicatorDescription ? (S(), o("div",
|
|
353
|
+
default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", Be, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
|
|
354
354
|
_: 1
|
|
355
355
|
}),
|
|
356
|
-
s("div",
|
|
356
|
+
s("div", Ve, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
|
|
357
357
|
key: e.key,
|
|
358
358
|
class: g(["param-item", { "has-desc": m.value && e.description }])
|
|
359
|
-
}, [s("div",
|
|
359
|
+
}, [s("div", He, [s("label", Ue, [s("span", q, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", J, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", We, [
|
|
360
360
|
s("button", {
|
|
361
361
|
class: "stepper-btn",
|
|
362
362
|
disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
|
|
363
363
|
onClick: (t) => v(e, -1)
|
|
364
|
-
}, " − ", 8,
|
|
364
|
+
}, " − ", 8, Ge),
|
|
365
365
|
e.type === "number" ? (S(), o("input", {
|
|
366
366
|
key: 0,
|
|
367
367
|
type: "number",
|
|
@@ -371,17 +371,17 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
371
371
|
max: e.max,
|
|
372
372
|
step: e.step || 1,
|
|
373
373
|
onInput: (t) => _(e.key, t)
|
|
374
|
-
}, null, 40,
|
|
374
|
+
}, null, 40, Ke)) : a("", !0),
|
|
375
375
|
s("button", {
|
|
376
376
|
class: "stepper-btn",
|
|
377
377
|
disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
|
|
378
378
|
onClick: (t) => v(e, 1)
|
|
379
|
-
}, " + ", 8,
|
|
379
|
+
}, " + ", 8, qe)
|
|
380
380
|
])]), l(n, { name: "slide" }, {
|
|
381
|
-
default: N(() => [m.value && e.description ? (S(), o("div",
|
|
381
|
+
default: N(() => [m.value && e.description ? (S(), o("div", Je, O(e.description), 1)) : a("", !0)]),
|
|
382
382
|
_: 2
|
|
383
383
|
}, 1024)], 2))), 128))]),
|
|
384
|
-
s("div",
|
|
384
|
+
s("div", Ye, [s("button", {
|
|
385
385
|
class: "params-btn reset",
|
|
386
386
|
onClick: y
|
|
387
387
|
}, [...d[8] ||= [s("svg", {
|
|
@@ -389,7 +389,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
389
389
|
fill: "none",
|
|
390
390
|
stroke: "currentColor",
|
|
391
391
|
"stroke-width": "2"
|
|
392
|
-
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div",
|
|
392
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", Xe, [s("button", {
|
|
393
393
|
class: "params-btn cancel",
|
|
394
394
|
onClick: d[2] ||= (e) => u.$emit("close")
|
|
395
395
|
}, "取消"), s("button", {
|
|
@@ -407,31 +407,31 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
407
407
|
_: 1
|
|
408
408
|
})], 8, ["to"]));
|
|
409
409
|
}
|
|
410
|
-
}), [["__scopeId", "data-v-30f2f611"]]),
|
|
410
|
+
}), [["__scopeId", "data-v-30f2f611"]]), Qe = { class: "indicator-selector" }, $e = { class: "modal-header" }, et = { class: "header-title" }, tt = { class: "title-sub" }, nt = { class: "header-actions" }, rt = {
|
|
411
411
|
key: 0,
|
|
412
412
|
viewBox: "0 0 24 24",
|
|
413
413
|
width: "16",
|
|
414
414
|
height: "16",
|
|
415
415
|
fill: "currentColor"
|
|
416
|
-
},
|
|
416
|
+
}, it = {
|
|
417
417
|
key: 1,
|
|
418
418
|
viewBox: "0 0 24 24",
|
|
419
419
|
width: "16",
|
|
420
420
|
height: "16",
|
|
421
421
|
fill: "currentColor"
|
|
422
|
-
},
|
|
422
|
+
}, at = { class: "modal-search-area" }, ot = { class: "search-box" }, st = ["value"], ct = { class: "modal-body" }, lt = {
|
|
423
423
|
key: 0,
|
|
424
424
|
class: "indicator-section"
|
|
425
|
-
},
|
|
425
|
+
}, ut = { class: "section-header" }, dt = { class: "section-count" }, ft = ["onClick"], pt = { class: "card-label" }, mt = { class: "card-tooltip" }, ht = { class: "card-header" }, gt = { class: "card-label" }, _t = { class: "card-header-actions" }, vt = ["onClick"], yt = { class: "card-name" }, bt = {
|
|
426
426
|
key: 1,
|
|
427
427
|
class: "section-divider"
|
|
428
|
-
},
|
|
428
|
+
}, xt = {
|
|
429
429
|
key: 2,
|
|
430
430
|
class: "no-results"
|
|
431
|
-
},
|
|
431
|
+
}, St = {
|
|
432
432
|
key: 3,
|
|
433
433
|
class: "indicator-section"
|
|
434
|
-
},
|
|
434
|
+
}, Ct = { class: "section-header" }, wt = { class: "section-count" }, Tt = ["onClick"], Et = { class: "card-label" }, Dt = { class: "card-tooltip" }, Ot = { class: "card-header" }, Y = { class: "card-label" }, X = { class: "card-header-actions" }, kt = ["onClick"], At = { class: "card-name" }, jt = { class: "modal-footer" }, Mt = { class: "footer-info" }, Nt = { class: "info-text" }, Pt = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
435
435
|
__name: "IndicatorSelector",
|
|
436
436
|
props: {
|
|
437
437
|
activeIndicators: {},
|
|
@@ -462,18 +462,22 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
462
462
|
}))
|
|
463
463
|
}));
|
|
464
464
|
}
|
|
465
|
-
let h = ue(
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
465
|
+
let h = ue(), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = $(h.catalog), A = r(() => D.value.length);
|
|
466
|
+
y(async () => {
|
|
467
|
+
B() || await pe(), h.catalog.set(m(ce()));
|
|
468
|
+
});
|
|
469
|
+
let j = w(!1), M = w(null), P = w(!1), F = Fe(), L = r(() => M.value ? de(M.value) : null), ee = r(() => f.activeIndicators?.length ?? 0);
|
|
469
470
|
function te(e) {
|
|
470
|
-
|
|
471
|
+
return f.activeIndicators?.includes(e) ?? !1;
|
|
471
472
|
}
|
|
472
473
|
function R(e) {
|
|
473
|
-
p("toggle", e, !
|
|
474
|
+
te(e) || de(e) && p("toggle", e, !0);
|
|
474
475
|
}
|
|
475
476
|
function ne(e) {
|
|
476
|
-
|
|
477
|
+
p("toggle", e, !1);
|
|
478
|
+
}
|
|
479
|
+
function z(e) {
|
|
480
|
+
M.value = e, j.value = !0;
|
|
477
481
|
}
|
|
478
482
|
function re(e) {
|
|
479
483
|
let t = de(e);
|
|
@@ -485,20 +489,20 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
485
489
|
return i;
|
|
486
490
|
}
|
|
487
491
|
function ie(e) {
|
|
488
|
-
|
|
492
|
+
M.value && p("updateParams", M.value, e), j.value = !1;
|
|
489
493
|
}
|
|
490
|
-
function
|
|
494
|
+
function ae(e) {
|
|
491
495
|
e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
|
|
492
496
|
}
|
|
493
497
|
return y(() => {
|
|
494
|
-
document.addEventListener("keydown",
|
|
498
|
+
document.addEventListener("keydown", ae);
|
|
495
499
|
}), x(() => {
|
|
496
|
-
document.removeEventListener("keydown",
|
|
500
|
+
document.removeEventListener("keydown", ae);
|
|
497
501
|
}), u({
|
|
498
502
|
openMenu: () => h.openMenu(),
|
|
499
503
|
closeMenu: () => h.closeMenu(),
|
|
500
504
|
toggleMenu: () => h.toggleMenu()
|
|
501
|
-
}), (r, c) => (S(), o("div",
|
|
505
|
+
}), (r, c) => (S(), o("div", Qe, [(S(), i(t, { to: k(F) }, [l(n, { name: "overlay" }, {
|
|
502
506
|
default: N(() => [k(_) ? (S(), o("div", {
|
|
503
507
|
key: 0,
|
|
504
508
|
class: "selector-overlay",
|
|
@@ -509,11 +513,11 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
509
513
|
class: "selector-modal",
|
|
510
514
|
onClick: c[4] ||= I(() => {}, ["stop"])
|
|
511
515
|
}, [
|
|
512
|
-
s("div",
|
|
513
|
-
class: g(["view-toggle-btn", { active:
|
|
514
|
-
onClick: c[0] ||= (e) =>
|
|
516
|
+
s("div", $e, [s("div", et, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", tt, O(A.value) + " 个可用指标", 1)]), s("div", nt, [s("button", {
|
|
517
|
+
class: g(["view-toggle-btn", { active: P.value }]),
|
|
518
|
+
onClick: c[0] ||= (e) => P.value = !P.value,
|
|
515
519
|
title: "简洁模式"
|
|
516
|
-
}, [
|
|
520
|
+
}, [P.value ? (S(), o("svg", it, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", rt, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
|
|
517
521
|
class: "modal-close",
|
|
518
522
|
onClick: c[1] ||= (e) => k(h).closeMenu(),
|
|
519
523
|
title: "关闭"
|
|
@@ -523,7 +527,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
523
527
|
height: "14",
|
|
524
528
|
fill: "currentColor"
|
|
525
529
|
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]),
|
|
526
|
-
s("div",
|
|
530
|
+
s("div", at, [s("div", ot, [c[11] ||= s("svg", {
|
|
527
531
|
class: "search-icon",
|
|
528
532
|
viewBox: "0 0 24 24",
|
|
529
533
|
width: "16",
|
|
@@ -535,28 +539,28 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
535
539
|
type: "text",
|
|
536
540
|
class: "search-input",
|
|
537
541
|
placeholder: "搜索指标名称..."
|
|
538
|
-
}, null, 40,
|
|
539
|
-
s("div",
|
|
540
|
-
k(b).length > 0 ? (S(), o("div",
|
|
542
|
+
}, null, 40, st)])]),
|
|
543
|
+
s("div", ct, [
|
|
544
|
+
k(b).length > 0 ? (S(), o("div", lt, [s("div", ut, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", dt, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: P.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
|
|
541
545
|
key: t.id,
|
|
542
546
|
class: g(["indicator-card", {
|
|
543
|
-
active:
|
|
544
|
-
compact:
|
|
547
|
+
active: te(t.id),
|
|
548
|
+
compact: P.value
|
|
545
549
|
}]),
|
|
546
|
-
onClick: (e) =>
|
|
547
|
-
}, [
|
|
550
|
+
onClick: (e) => te(t.id) ? ne(t.id) : R(t.id)
|
|
551
|
+
}, [P.value ? (S(), o(e, { key: 0 }, [s("span", pt, O(t.label), 1), s("span", mt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", ht, [s("span", gt, O(t.label), 1), s("div", _t, [t.params?.length ? (S(), o("button", {
|
|
548
552
|
key: 0,
|
|
549
553
|
class: "card-settings-btn",
|
|
550
|
-
onClick: I((e) =>
|
|
554
|
+
onClick: I((e) => z(t.id), ["stop"]),
|
|
551
555
|
title: "编辑参数"
|
|
552
556
|
}, [...c[13] ||= [s("svg", {
|
|
553
557
|
viewBox: "0 0 24 24",
|
|
554
558
|
width: "14",
|
|
555
559
|
height: "14",
|
|
556
560
|
fill: "currentColor"
|
|
557
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
558
|
-
k(b).length > 0 && k(C).length > 0 ? (S(), o("div",
|
|
559
|
-
!E.value && k(v).trim() ? (S(), o("div",
|
|
561
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, vt)) : a("", !0)])]), s("div", yt, O(t.name), 1)], 64))], 10, ft))), 128))], 2)])) : a("", !0),
|
|
562
|
+
k(b).length > 0 && k(C).length > 0 ? (S(), o("div", bt)) : a("", !0),
|
|
563
|
+
!E.value && k(v).trim() ? (S(), o("div", xt, [...c[14] ||= [
|
|
560
564
|
s("svg", {
|
|
561
565
|
viewBox: "0 0 24 24",
|
|
562
566
|
width: "48",
|
|
@@ -566,26 +570,26 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
566
570
|
s("p", null, "未找到匹配的指标", -1),
|
|
567
571
|
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
568
572
|
]])) : a("", !0),
|
|
569
|
-
k(C).length > 0 ? (S(), o("div",
|
|
573
|
+
k(C).length > 0 ? (S(), o("div", St, [s("div", Ct, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", wt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: P.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
|
|
570
574
|
key: t.id,
|
|
571
575
|
class: g(["indicator-card", {
|
|
572
|
-
active:
|
|
573
|
-
compact:
|
|
576
|
+
active: te(t.id),
|
|
577
|
+
compact: P.value
|
|
574
578
|
}]),
|
|
575
|
-
onClick: (e) =>
|
|
576
|
-
}, [
|
|
579
|
+
onClick: (e) => te(t.id) ? ne(t.id) : R(t.id)
|
|
580
|
+
}, [P.value ? (S(), o(e, { key: 0 }, [s("span", Et, O(t.label), 1), s("span", Dt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", Ot, [s("span", Y, O(t.label), 1), s("div", X, [t.params?.length ? (S(), o("button", {
|
|
577
581
|
key: 0,
|
|
578
582
|
class: "card-settings-btn",
|
|
579
|
-
onClick: I((e) =>
|
|
583
|
+
onClick: I((e) => z(t.id), ["stop"]),
|
|
580
584
|
title: "编辑参数"
|
|
581
585
|
}, [...c[16] ||= [s("svg", {
|
|
582
586
|
viewBox: "0 0 24 24",
|
|
583
587
|
width: "14",
|
|
584
588
|
height: "14",
|
|
585
589
|
fill: "currentColor"
|
|
586
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
590
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, kt)) : a("", !0)])]), s("div", At, O(t.name), 1)], 64))], 10, Tt))), 128))], 2)])) : a("", !0)
|
|
587
591
|
]),
|
|
588
|
-
s("div",
|
|
592
|
+
s("div", jt, [s("div", Mt, [s("span", Nt, "已激活 " + O(ee.value) + " 个指标", 1)]), s("button", {
|
|
589
593
|
class: "btn btn-confirm",
|
|
590
594
|
onClick: c[3] ||= (e) => k(h).closeMenu()
|
|
591
595
|
}, "确认")])
|
|
@@ -593,15 +597,15 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
593
597
|
_: 1
|
|
594
598
|
})])) : a("", !0)]),
|
|
595
599
|
_: 1
|
|
596
|
-
})], 8, ["to"])),
|
|
600
|
+
})], 8, ["to"])), L.value ? (S(), i(Ze, {
|
|
597
601
|
key: 0,
|
|
598
|
-
visible:
|
|
599
|
-
"indicator-id":
|
|
600
|
-
"indicator-name":
|
|
601
|
-
"indicator-description":
|
|
602
|
-
params:
|
|
603
|
-
values: re(
|
|
604
|
-
onClose: c[6] ||= (e) =>
|
|
602
|
+
visible: j.value,
|
|
603
|
+
"indicator-id": L.value.id,
|
|
604
|
+
"indicator-name": L.value.name,
|
|
605
|
+
"indicator-description": L.value.description,
|
|
606
|
+
params: L.value.params || [],
|
|
607
|
+
values: re(L.value.id),
|
|
608
|
+
onClose: c[6] ||= (e) => j.value = !1,
|
|
605
609
|
onConfirm: ie
|
|
606
610
|
}, null, 8, [
|
|
607
611
|
"visible",
|
|
@@ -612,25 +616,25 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
612
616
|
"values"
|
|
613
617
|
])) : a("", !0)]));
|
|
614
618
|
}
|
|
615
|
-
}), [["__scopeId", "data-v-
|
|
619
|
+
}), [["__scopeId", "data-v-fe4a5a7b"]]), Ft = { class: "kline-tooltip__title" }, It = { key: 0 }, Lt = { class: "kline-tooltip__grid" }, Rt = { class: "row" }, zt = { class: "row" }, Bt = { class: "row" }, Vt = { class: "row" }, Ht = {
|
|
616
620
|
key: 0,
|
|
617
621
|
class: "row"
|
|
618
|
-
},
|
|
622
|
+
}, Ut = {
|
|
619
623
|
key: 1,
|
|
620
624
|
class: "row"
|
|
621
|
-
},
|
|
625
|
+
}, Wt = {
|
|
622
626
|
key: 2,
|
|
623
627
|
class: "row"
|
|
624
|
-
},
|
|
628
|
+
}, Gt = {
|
|
625
629
|
key: 3,
|
|
626
630
|
class: "row"
|
|
627
|
-
},
|
|
631
|
+
}, Kt = {
|
|
628
632
|
key: 4,
|
|
629
633
|
class: "row"
|
|
630
|
-
},
|
|
634
|
+
}, qt = {
|
|
631
635
|
key: 5,
|
|
632
636
|
class: "row"
|
|
633
|
-
},
|
|
637
|
+
}, Z = "#6b7280", Jt = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
634
638
|
__name: "KLineTooltip",
|
|
635
639
|
props: {
|
|
636
640
|
k: {},
|
|
@@ -649,7 +653,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
649
653
|
}
|
|
650
654
|
},
|
|
651
655
|
setup(e) {
|
|
652
|
-
let t = e, n = r(() => t.k ?
|
|
656
|
+
let t = e, n = r(() => t.k ? z(t.k.timestamp, {
|
|
653
657
|
timeZone: t.timezone,
|
|
654
658
|
showTime: t.showTime
|
|
655
659
|
}) : ""), i = r(() => t.useAnchor === !0), c = r(() => t.anchorPlacement === "left-bottom" ? "anchor-left-bottom" : "anchor-right-bottom");
|
|
@@ -669,19 +673,19 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
669
673
|
}
|
|
670
674
|
let p = r(() => {
|
|
671
675
|
let e = t.k;
|
|
672
|
-
if (!e) return
|
|
676
|
+
if (!e) return Z;
|
|
673
677
|
let n = f(e, t.data, t.index);
|
|
674
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
678
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
675
679
|
}), m = r(() => {
|
|
676
680
|
let e = t.k;
|
|
677
|
-
if (!e) return
|
|
681
|
+
if (!e) return Z;
|
|
678
682
|
let n = e.close - e.open;
|
|
679
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
683
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
680
684
|
}), h = r(() => {
|
|
681
685
|
let e = t.k;
|
|
682
|
-
if (!e) return
|
|
686
|
+
if (!e) return Z;
|
|
683
687
|
let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
|
|
684
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
688
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
685
689
|
});
|
|
686
690
|
return (t, r) => e.k ? (S(), o("div", {
|
|
687
691
|
key: 0,
|
|
@@ -691,23 +695,23 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
691
695
|
left: `${e.pos.x}px`,
|
|
692
696
|
top: `${e.pos.y}px`
|
|
693
697
|
})
|
|
694
|
-
}, [s("div",
|
|
695
|
-
s("div",
|
|
696
|
-
s("div",
|
|
697
|
-
s("div",
|
|
698
|
-
s("div",
|
|
699
|
-
typeof e.k.volume == "number" ? (S(), o("div",
|
|
700
|
-
typeof e.k.turnover == "number" ? (S(), o("div",
|
|
701
|
-
typeof e.k.amplitude == "number" ? (S(), o("div",
|
|
702
|
-
typeof e.k.changePercent == "number" ? (S(), o("div",
|
|
703
|
-
typeof e.k.changeAmount == "number" ? (S(), o("div",
|
|
704
|
-
typeof e.k.turnoverRate == "number" ? (S(), o("div",
|
|
698
|
+
}, [s("div", Ft, [e.k.stockCode ? (S(), o("span", It, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(n.value), 1)]), s("div", Lt, [
|
|
699
|
+
s("div", Rt, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
|
|
700
|
+
s("div", zt, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
|
|
701
|
+
s("div", Bt, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
|
|
702
|
+
s("div", Vt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
|
|
703
|
+
typeof e.k.volume == "number" ? (S(), o("div", Ht, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
|
|
704
|
+
typeof e.k.turnover == "number" ? (S(), o("div", Ut, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
|
|
705
|
+
typeof e.k.amplitude == "number" ? (S(), o("div", Wt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
|
|
706
|
+
typeof e.k.changePercent == "number" ? (S(), o("div", Gt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
|
|
707
|
+
typeof e.k.changeAmount == "number" ? (S(), o("div", Kt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
|
|
708
|
+
typeof e.k.turnoverRate == "number" ? (S(), o("div", qt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
|
|
705
709
|
])], 6)) : a("", !0);
|
|
706
710
|
}
|
|
707
|
-
}), [["__scopeId", "data-v-80fa3a7d"]]),
|
|
711
|
+
}), [["__scopeId", "data-v-80fa3a7d"]]), Yt = { class: "marker-tooltip__title" }, Xt = {
|
|
708
712
|
key: 0,
|
|
709
713
|
class: "marker-tooltip__content"
|
|
710
|
-
},
|
|
714
|
+
}, Zt = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
711
715
|
__name: "MarkerTooltip",
|
|
712
716
|
props: {
|
|
713
717
|
marker: {},
|
|
@@ -756,18 +760,18 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
756
760
|
left: `${t.pos.x + 12}px`,
|
|
757
761
|
top: `${t.pos.y + 12}px`
|
|
758
762
|
})
|
|
759
|
-
}, [s("div",
|
|
763
|
+
}, [s("div", Yt, O(f.value), 1), m.value ? (S(), o("div", Xt, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
|
|
760
764
|
key: t,
|
|
761
765
|
class: "row"
|
|
762
766
|
}, [s("span", null, O(t), 1), s("span", null, O(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
|
|
763
767
|
}
|
|
764
|
-
}), [["__scopeId", "data-v-f2a21012"]]),
|
|
768
|
+
}), [["__scopeId", "data-v-f2a21012"]]), Qt = {
|
|
765
769
|
viewBox: "0 0 24 24",
|
|
766
770
|
width: "1.2em",
|
|
767
771
|
height: "1.2em"
|
|
768
772
|
};
|
|
769
|
-
function
|
|
770
|
-
return S(), o("svg",
|
|
773
|
+
function $t(e, t) {
|
|
774
|
+
return S(), o("svg", Qt, [...t[0] ||= [s("path", {
|
|
771
775
|
fill: "none",
|
|
772
776
|
stroke: "currentColor",
|
|
773
777
|
"stroke-linecap": "round",
|
|
@@ -776,16 +780,16 @@ function Zt(e, t) {
|
|
|
776
780
|
d: "M7.904 17.563a1.2 1.2 0 0 0 2.228.308l2.09-3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047-1.047a1.067 1.067 0 0 0 0-1.509l-4.907-4.907l3.113-2.09a1.2 1.2 0 0 0-.309-2.228L4 4z"
|
|
777
781
|
}, null, -1)]]);
|
|
778
782
|
}
|
|
779
|
-
var
|
|
783
|
+
var en = m({
|
|
780
784
|
name: "tabler-pointer",
|
|
781
|
-
render:
|
|
782
|
-
}),
|
|
785
|
+
render: $t
|
|
786
|
+
}), tn = {
|
|
783
787
|
viewBox: "0 0 24 24",
|
|
784
788
|
width: "1.2em",
|
|
785
789
|
height: "1.2em"
|
|
786
790
|
};
|
|
787
|
-
function
|
|
788
|
-
return S(), o("svg",
|
|
791
|
+
function nn(e, t) {
|
|
792
|
+
return S(), o("svg", tn, [...t[0] ||= [s("path", {
|
|
789
793
|
fill: "none",
|
|
790
794
|
stroke: "currentColor",
|
|
791
795
|
"stroke-linecap": "round",
|
|
@@ -794,16 +798,16 @@ function en(e, t) {
|
|
|
794
798
|
d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
|
|
795
799
|
}, null, -1)]]);
|
|
796
800
|
}
|
|
797
|
-
var
|
|
801
|
+
var rn = m({
|
|
798
802
|
name: "tabler-chart-line",
|
|
799
|
-
render:
|
|
800
|
-
}),
|
|
803
|
+
render: nn
|
|
804
|
+
}), an = {
|
|
801
805
|
viewBox: "0 0 24 24",
|
|
802
806
|
width: "1.2em",
|
|
803
807
|
height: "1.2em"
|
|
804
808
|
};
|
|
805
|
-
function
|
|
806
|
-
return S(), o("svg",
|
|
809
|
+
function on(e, t) {
|
|
810
|
+
return S(), o("svg", an, [...t[0] ||= [s("path", {
|
|
807
811
|
fill: "none",
|
|
808
812
|
stroke: "currentColor",
|
|
809
813
|
"stroke-linecap": "round",
|
|
@@ -812,16 +816,16 @@ function rn(e, t) {
|
|
|
812
816
|
d: "M17 7L7 17M8 7h9v9"
|
|
813
817
|
}, null, -1)]]);
|
|
814
818
|
}
|
|
815
|
-
var
|
|
819
|
+
var sn = m({
|
|
816
820
|
name: "tabler-arrow-up-right",
|
|
817
|
-
render:
|
|
818
|
-
}),
|
|
821
|
+
render: on
|
|
822
|
+
}), cn = {
|
|
819
823
|
viewBox: "0 0 24 24",
|
|
820
824
|
width: "1.2em",
|
|
821
825
|
height: "1.2em"
|
|
822
826
|
};
|
|
823
|
-
function
|
|
824
|
-
return S(), o("svg",
|
|
827
|
+
function ln(e, t) {
|
|
828
|
+
return S(), o("svg", cn, [...t[0] ||= [s("path", {
|
|
825
829
|
fill: "none",
|
|
826
830
|
stroke: "currentColor",
|
|
827
831
|
"stroke-linecap": "round",
|
|
@@ -830,16 +834,16 @@ function sn(e, t) {
|
|
|
830
834
|
d: "M5 12h14m-6 6l6-6m-6-6l6 6"
|
|
831
835
|
}, null, -1)]]);
|
|
832
836
|
}
|
|
833
|
-
var
|
|
837
|
+
var un = m({
|
|
834
838
|
name: "tabler-arrow-right",
|
|
835
|
-
render:
|
|
836
|
-
}),
|
|
839
|
+
render: ln
|
|
840
|
+
}), dn = {
|
|
837
841
|
viewBox: "0 0 24 24",
|
|
838
842
|
width: "1.2em",
|
|
839
843
|
height: "1.2em"
|
|
840
844
|
};
|
|
841
|
-
function
|
|
842
|
-
return S(), o("svg",
|
|
845
|
+
function fn(e, t) {
|
|
846
|
+
return S(), o("svg", dn, [...t[0] ||= [s("path", {
|
|
843
847
|
fill: "none",
|
|
844
848
|
stroke: "currentColor",
|
|
845
849
|
"stroke-linecap": "round",
|
|
@@ -848,16 +852,16 @@ function un(e, t) {
|
|
|
848
852
|
d: "M5 12h14"
|
|
849
853
|
}, null, -1)]]);
|
|
850
854
|
}
|
|
851
|
-
var
|
|
855
|
+
var pn = m({
|
|
852
856
|
name: "tabler-minus",
|
|
853
|
-
render:
|
|
854
|
-
}),
|
|
857
|
+
render: fn
|
|
858
|
+
}), mn = {
|
|
855
859
|
viewBox: "0 0 24 24",
|
|
856
860
|
width: "1.2em",
|
|
857
861
|
height: "1.2em"
|
|
858
862
|
};
|
|
859
|
-
function
|
|
860
|
-
return S(), o("svg",
|
|
863
|
+
function hn(e, t) {
|
|
864
|
+
return S(), o("svg", mn, [...t[0] ||= [s("path", {
|
|
861
865
|
fill: "none",
|
|
862
866
|
stroke: "currentColor",
|
|
863
867
|
"stroke-linecap": "round",
|
|
@@ -866,16 +870,16 @@ function pn(e, t) {
|
|
|
866
870
|
d: "M3 12v.01M7 12h10m4 0v.01"
|
|
867
871
|
}, null, -1)]]);
|
|
868
872
|
}
|
|
869
|
-
var
|
|
873
|
+
var gn = m({
|
|
870
874
|
name: "tabler-separator",
|
|
871
|
-
render:
|
|
872
|
-
}),
|
|
875
|
+
render: hn
|
|
876
|
+
}), _n = {
|
|
873
877
|
viewBox: "0 0 24 24",
|
|
874
878
|
width: "1.2em",
|
|
875
879
|
height: "1.2em"
|
|
876
880
|
};
|
|
877
|
-
function
|
|
878
|
-
return S(), o("svg",
|
|
881
|
+
function vn(e, t) {
|
|
882
|
+
return S(), o("svg", _n, [...t[0] ||= [s("path", {
|
|
879
883
|
fill: "none",
|
|
880
884
|
stroke: "currentColor",
|
|
881
885
|
"stroke-linecap": "round",
|
|
@@ -884,16 +888,16 @@ function gn(e, t) {
|
|
|
884
888
|
d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2M9 12h6m-3-3v6"
|
|
885
889
|
}, null, -1)]]);
|
|
886
890
|
}
|
|
887
|
-
var
|
|
891
|
+
var yn = m({
|
|
888
892
|
name: "tabler-crosshair",
|
|
889
|
-
render:
|
|
890
|
-
}),
|
|
893
|
+
render: vn
|
|
894
|
+
}), bn = {
|
|
891
895
|
viewBox: "0 0 24 24",
|
|
892
896
|
width: "1.2em",
|
|
893
897
|
height: "1.2em"
|
|
894
898
|
};
|
|
895
|
-
function
|
|
896
|
-
return S(), o("svg",
|
|
899
|
+
function xn(e, t) {
|
|
900
|
+
return S(), o("svg", bn, [...t[0] ||= [s("g", {
|
|
897
901
|
fill: "none",
|
|
898
902
|
stroke: "currentColor",
|
|
899
903
|
"stroke-linecap": "round",
|
|
@@ -901,16 +905,16 @@ function yn(e, t) {
|
|
|
901
905
|
"stroke-width": "2"
|
|
902
906
|
}, [s("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01" }), s("path", { d: "M11 12h1v4h1" })], -1)]]);
|
|
903
907
|
}
|
|
904
|
-
var
|
|
908
|
+
var Sn = m({
|
|
905
909
|
name: "tabler-info-circle",
|
|
906
|
-
render:
|
|
907
|
-
}),
|
|
910
|
+
render: xn
|
|
911
|
+
}), Cn = {
|
|
908
912
|
viewBox: "0 0 24 24",
|
|
909
913
|
width: "1.2em",
|
|
910
914
|
height: "1.2em"
|
|
911
915
|
};
|
|
912
|
-
function
|
|
913
|
-
return S(), o("svg",
|
|
916
|
+
function wn(e, t) {
|
|
917
|
+
return S(), o("svg", Cn, [...t[0] ||= [s("path", {
|
|
914
918
|
fill: "none",
|
|
915
919
|
stroke: "currentColor",
|
|
916
920
|
"stroke-linecap": "round",
|
|
@@ -919,16 +923,16 @@ function Sn(e, t) {
|
|
|
919
923
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
|
|
920
924
|
}, null, -1)]]);
|
|
921
925
|
}
|
|
922
|
-
var
|
|
926
|
+
var Tn = m({
|
|
923
927
|
name: "tabler-zoom-in",
|
|
924
|
-
render:
|
|
925
|
-
}),
|
|
928
|
+
render: wn
|
|
929
|
+
}), En = {
|
|
926
930
|
viewBox: "0 0 24 24",
|
|
927
931
|
width: "1.2em",
|
|
928
932
|
height: "1.2em"
|
|
929
933
|
};
|
|
930
|
-
function
|
|
931
|
-
return S(), o("svg",
|
|
934
|
+
function Dn(e, t) {
|
|
935
|
+
return S(), o("svg", En, [...t[0] ||= [s("path", {
|
|
932
936
|
fill: "none",
|
|
933
937
|
stroke: "currentColor",
|
|
934
938
|
"stroke-linecap": "round",
|
|
@@ -937,16 +941,16 @@ function Tn(e, t) {
|
|
|
937
941
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
|
|
938
942
|
}, null, -1)]]);
|
|
939
943
|
}
|
|
940
|
-
var
|
|
944
|
+
var On = m({
|
|
941
945
|
name: "tabler-zoom-out",
|
|
942
|
-
render:
|
|
943
|
-
}),
|
|
946
|
+
render: Dn
|
|
947
|
+
}), kn = {
|
|
944
948
|
viewBox: "0 0 24 24",
|
|
945
949
|
width: "1.2em",
|
|
946
950
|
height: "1.2em"
|
|
947
951
|
};
|
|
948
|
-
function
|
|
949
|
-
return S(), o("svg",
|
|
952
|
+
function An(e, t) {
|
|
953
|
+
return S(), o("svg", kn, [...t[0] ||= [s("path", {
|
|
950
954
|
fill: "none",
|
|
951
955
|
stroke: "currentColor",
|
|
952
956
|
"stroke-linecap": "round",
|
|
@@ -955,16 +959,16 @@ function On(e, t) {
|
|
|
955
959
|
d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2"
|
|
956
960
|
}, null, -1)]]);
|
|
957
961
|
}
|
|
958
|
-
var
|
|
962
|
+
var jn = m({
|
|
959
963
|
name: "tabler-maximize",
|
|
960
|
-
render:
|
|
961
|
-
}),
|
|
964
|
+
render: An
|
|
965
|
+
}), Mn = {
|
|
962
966
|
viewBox: "0 0 24 24",
|
|
963
967
|
width: "1.2em",
|
|
964
968
|
height: "1.2em"
|
|
965
969
|
};
|
|
966
|
-
function
|
|
967
|
-
return S(), o("svg",
|
|
970
|
+
function Nn(e, t) {
|
|
971
|
+
return S(), o("svg", Mn, [...t[0] ||= [s("path", {
|
|
968
972
|
fill: "none",
|
|
969
973
|
stroke: "currentColor",
|
|
970
974
|
"stroke-linecap": "round",
|
|
@@ -973,16 +977,16 @@ function jn(e, t) {
|
|
|
973
977
|
d: "M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"
|
|
974
978
|
}, null, -1)]]);
|
|
975
979
|
}
|
|
976
|
-
var
|
|
980
|
+
var Pn = m({
|
|
977
981
|
name: "tabler-minimize",
|
|
978
|
-
render:
|
|
979
|
-
}),
|
|
982
|
+
render: Nn
|
|
983
|
+
}), Fn = {
|
|
980
984
|
viewBox: "0 0 24 24",
|
|
981
985
|
width: "1.2em",
|
|
982
986
|
height: "1.2em"
|
|
983
987
|
};
|
|
984
|
-
function
|
|
985
|
-
return S(), o("svg",
|
|
988
|
+
function In(e, t) {
|
|
989
|
+
return S(), o("svg", Fn, [...t[0] ||= [s("g", {
|
|
986
990
|
fill: "none",
|
|
987
991
|
stroke: "currentColor",
|
|
988
992
|
"stroke-linecap": "round",
|
|
@@ -990,16 +994,16 @@ function Pn(e, t) {
|
|
|
990
994
|
"stroke-width": "2"
|
|
991
995
|
}, [s("path", { d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065" }), s("path", { d: "M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0" })], -1)]]);
|
|
992
996
|
}
|
|
993
|
-
var
|
|
997
|
+
var Ln = m({
|
|
994
998
|
name: "tabler-settings",
|
|
995
|
-
render:
|
|
996
|
-
}),
|
|
999
|
+
render: In
|
|
1000
|
+
}), Rn = {
|
|
997
1001
|
viewBox: "0 0 24 24",
|
|
998
1002
|
width: "1.2em",
|
|
999
1003
|
height: "1.2em"
|
|
1000
1004
|
};
|
|
1001
|
-
function
|
|
1002
|
-
return S(), o("svg",
|
|
1005
|
+
function zn(e, t) {
|
|
1006
|
+
return S(), o("svg", Rn, [...t[0] ||= [s("path", {
|
|
1003
1007
|
fill: "none",
|
|
1004
1008
|
stroke: "currentColor",
|
|
1005
1009
|
"stroke-linecap": "round",
|
|
@@ -1008,16 +1012,16 @@ function Ln(e, t) {
|
|
|
1008
1012
|
d: "M3 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M5 7v10M7 5h10M7 19h10m2-12v10"
|
|
1009
1013
|
}, null, -1)]]);
|
|
1010
1014
|
}
|
|
1011
|
-
var
|
|
1015
|
+
var Bn = m({
|
|
1012
1016
|
name: "tabler-shape",
|
|
1013
|
-
render:
|
|
1014
|
-
}),
|
|
1017
|
+
render: zn
|
|
1018
|
+
}), Vn = {
|
|
1015
1019
|
viewBox: "0 0 24 24",
|
|
1016
1020
|
width: "1.2em",
|
|
1017
1021
|
height: "1.2em"
|
|
1018
1022
|
};
|
|
1019
|
-
function
|
|
1020
|
-
return S(), o("svg",
|
|
1023
|
+
function Hn(e, t) {
|
|
1024
|
+
return S(), o("svg", Vn, [...t[0] ||= [s("path", {
|
|
1021
1025
|
fill: "none",
|
|
1022
1026
|
stroke: "currentColor",
|
|
1023
1027
|
"stroke-linecap": "round",
|
|
@@ -1026,16 +1030,16 @@ function Bn(e, t) {
|
|
|
1026
1030
|
d: "M3 7a2 2 0 1 0 4 0a2 2 0 1 0-4 0m11 8a2 2 0 1 0 4 0a2 2 0 1 0-4 0m1-9a3 3 0 1 0 6 0a3 3 0 1 0-6 0M3 18a3 3 0 1 0 6 0a3 3 0 1 0-6 0m6-1l5-1.5m-7.5-7l7.81 5.37M7 7l8-1"
|
|
1027
1031
|
}, null, -1)]]);
|
|
1028
1032
|
}
|
|
1029
|
-
var
|
|
1033
|
+
var Un = m({
|
|
1030
1034
|
name: "tabler-chart-dots-3",
|
|
1031
|
-
render:
|
|
1032
|
-
}),
|
|
1035
|
+
render: Hn
|
|
1036
|
+
}), Wn = {
|
|
1033
1037
|
viewBox: "0 0 24 24",
|
|
1034
1038
|
width: "1.2em",
|
|
1035
1039
|
height: "1.2em"
|
|
1036
1040
|
};
|
|
1037
|
-
function
|
|
1038
|
-
return S(), o("svg",
|
|
1041
|
+
function Gn(e, t) {
|
|
1042
|
+
return S(), o("svg", Wn, [...t[0] ||= [s("path", {
|
|
1039
1043
|
fill: "none",
|
|
1040
1044
|
stroke: "currentColor",
|
|
1041
1045
|
"stroke-linecap": "round",
|
|
@@ -1044,16 +1048,16 @@ function Un(e, t) {
|
|
|
1044
1048
|
d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
|
|
1045
1049
|
}, null, -1)]]);
|
|
1046
1050
|
}
|
|
1047
|
-
var
|
|
1051
|
+
var Kn = m({
|
|
1048
1052
|
name: "tabler-caret-up-down",
|
|
1049
|
-
render:
|
|
1050
|
-
}),
|
|
1053
|
+
render: Gn
|
|
1054
|
+
}), qn = {
|
|
1051
1055
|
viewBox: "0 0 24 24",
|
|
1052
1056
|
width: "1.2em",
|
|
1053
1057
|
height: "1.2em"
|
|
1054
1058
|
};
|
|
1055
|
-
function
|
|
1056
|
-
return S(), o("svg",
|
|
1059
|
+
function Jn(e, t) {
|
|
1060
|
+
return S(), o("svg", qn, [...t[0] ||= [s("path", {
|
|
1057
1061
|
fill: "none",
|
|
1058
1062
|
stroke: "currentColor",
|
|
1059
1063
|
"stroke-linecap": "round",
|
|
@@ -1062,34 +1066,34 @@ function Kn(e, t) {
|
|
|
1062
1066
|
d: "M8 4H5v16h3m8-16h3v16h-3"
|
|
1063
1067
|
}, null, -1)]]);
|
|
1064
1068
|
}
|
|
1065
|
-
var
|
|
1069
|
+
var Yn = m({
|
|
1066
1070
|
name: "tabler-brackets",
|
|
1067
|
-
render:
|
|
1071
|
+
render: Jn
|
|
1068
1072
|
});
|
|
1069
1073
|
//#endregion
|
|
1070
1074
|
//#region src/debug/canvasProfiler.ts
|
|
1071
|
-
function
|
|
1075
|
+
function Xn() {
|
|
1072
1076
|
return Object.create(null);
|
|
1073
1077
|
}
|
|
1074
|
-
function
|
|
1078
|
+
function Zn() {
|
|
1075
1079
|
return {
|
|
1076
|
-
ctxMethods:
|
|
1077
|
-
ctxProps:
|
|
1078
|
-
canvasProps:
|
|
1080
|
+
ctxMethods: Xn(),
|
|
1081
|
+
ctxProps: Xn(),
|
|
1082
|
+
canvasProps: Xn(),
|
|
1079
1083
|
ctxMethodSources: Object.create(null)
|
|
1080
1084
|
};
|
|
1081
1085
|
}
|
|
1082
|
-
function
|
|
1086
|
+
function Qn(e, t, n) {
|
|
1083
1087
|
let r = e[t] ??= {
|
|
1084
1088
|
count: 0,
|
|
1085
1089
|
totalTime: 0
|
|
1086
1090
|
};
|
|
1087
1091
|
r.count += 1, r.totalTime += n;
|
|
1088
1092
|
}
|
|
1089
|
-
function
|
|
1090
|
-
|
|
1093
|
+
function $n(e, t, n, r) {
|
|
1094
|
+
Qn(e.ctxMethodSources[t] ??= Xn(), n, r);
|
|
1091
1095
|
}
|
|
1092
|
-
function
|
|
1096
|
+
function er(e) {
|
|
1093
1097
|
return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
|
|
1094
1098
|
name: e,
|
|
1095
1099
|
count: t.count,
|
|
@@ -1097,12 +1101,12 @@ function Qn(e) {
|
|
|
1097
1101
|
averageTime: (t.totalTime / t.count).toFixed(4)
|
|
1098
1102
|
})).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
|
|
1099
1103
|
}
|
|
1100
|
-
var
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1104
|
+
var tr = !1, nr = /* @__PURE__ */ new Map(), rr = /* @__PURE__ */ new Map();
|
|
1105
|
+
function ir(e) {
|
|
1106
|
+
tr = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && sr() : cr();
|
|
1103
1107
|
}
|
|
1104
|
-
function
|
|
1105
|
-
if (
|
|
1108
|
+
function ar() {
|
|
1109
|
+
if (!tr) return "disabled";
|
|
1106
1110
|
let e = (/* @__PURE__ */ Error()).stack;
|
|
1107
1111
|
if (!e) return "unknown";
|
|
1108
1112
|
let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
@@ -1117,86 +1121,86 @@ function rr() {
|
|
|
1117
1121
|
}
|
|
1118
1122
|
function Q(e, t, n, r) {
|
|
1119
1123
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1120
|
-
if (
|
|
1124
|
+
if (nr.has(i)) return;
|
|
1121
1125
|
let a = Reflect.get(e, t);
|
|
1122
|
-
typeof a == "function" && (
|
|
1123
|
-
if (
|
|
1124
|
-
let i = r?.captureSource ?
|
|
1125
|
-
return
|
|
1126
|
+
typeof a == "function" && (nr.set(i, a), Reflect.set(e, t, function(...e) {
|
|
1127
|
+
if (!tr) return a.apply(this, e);
|
|
1128
|
+
let i = r?.captureSource ? ar() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
|
|
1129
|
+
return Qn(n.ctxMethods, t, c), i && $n(n, t, i, c), s;
|
|
1126
1130
|
}));
|
|
1127
1131
|
}
|
|
1128
|
-
function
|
|
1132
|
+
function or(e, t, n) {
|
|
1129
1133
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
1130
1134
|
if (!r?.set || !r.configurable) return;
|
|
1131
1135
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1132
|
-
|
|
1136
|
+
rr.has(i) || (rr.set(i, r), Object.defineProperty(e, t, {
|
|
1133
1137
|
configurable: !0,
|
|
1134
1138
|
enumerable: r.enumerable ?? !1,
|
|
1135
1139
|
get: r.get,
|
|
1136
1140
|
set(e) {
|
|
1137
|
-
if (
|
|
1141
|
+
if (!tr) {
|
|
1138
1142
|
r.set.call(this, e);
|
|
1139
1143
|
return;
|
|
1140
1144
|
}
|
|
1141
1145
|
let i = performance.now();
|
|
1142
|
-
r.set.call(this, e),
|
|
1146
|
+
r.set.call(this, e), Qn(n, t, performance.now() - i);
|
|
1143
1147
|
}
|
|
1144
1148
|
}));
|
|
1145
1149
|
}
|
|
1146
|
-
function
|
|
1150
|
+
function sr() {
|
|
1147
1151
|
if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1148
1152
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1149
1153
|
if (!e || !t) return;
|
|
1150
|
-
let n =
|
|
1151
|
-
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n),
|
|
1154
|
+
let n = Zn();
|
|
1155
|
+
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n), or(e, "font", n.ctxProps), or(e, "filter", n.ctxProps), or(e, "shadowBlur", n.ctxProps), or(e, "lineWidth", n.ctxProps), or(t, "width", n.canvasProps), or(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
|
|
1152
1156
|
let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
|
|
1153
1157
|
if (e) {
|
|
1154
|
-
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(
|
|
1158
|
+
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(er(e.ctxMethods)), console.log("ctx props"), console.table(er(e.ctxProps)), console.log("canvas props"), console.table(er(e.canvasProps));
|
|
1155
1159
|
for (let t of ["fillText", "measureText"]) {
|
|
1156
1160
|
let n = e.ctxMethodSources[t];
|
|
1157
|
-
n && (console.log(`${t} sources`), console.table(
|
|
1161
|
+
n && (console.log(`${t} sources`), console.table(er(n).slice(0, 20)));
|
|
1158
1162
|
}
|
|
1159
1163
|
console.groupEnd();
|
|
1160
1164
|
}
|
|
1161
1165
|
}, window.resetCanvasReport = () => {
|
|
1162
|
-
window.__KMAP_CANVAS_PROFILER_METRICS__ =
|
|
1166
|
+
window.__KMAP_CANVAS_PROFILER_METRICS__ = Zn();
|
|
1163
1167
|
}, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
|
|
1164
1168
|
}
|
|
1165
|
-
function
|
|
1169
|
+
function cr() {
|
|
1166
1170
|
if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1167
1171
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1168
|
-
|
|
1172
|
+
nr.forEach((n, r) => {
|
|
1169
1173
|
let i = r.match(/^(.+):(.+)$/);
|
|
1170
1174
|
if (!i) return;
|
|
1171
1175
|
let [, a, o] = i, s = null;
|
|
1172
1176
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
|
|
1173
|
-
}),
|
|
1177
|
+
}), nr.clear(), rr.forEach((n, r) => {
|
|
1174
1178
|
let i = r.match(/^(.+):(.+)$/);
|
|
1175
1179
|
if (!i) return;
|
|
1176
1180
|
let [, a, o] = i, s = null;
|
|
1177
1181
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
|
|
1178
|
-
}),
|
|
1182
|
+
}), rr.clear(), window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !1, window.__KMAP_CANVAS_PROFILER_METRICS__ = void 0, window.showCanvasReport = void 0, window.resetCanvasReport = void 0, console.info("[kmap] Canvas profiler disabled.");
|
|
1179
1183
|
}
|
|
1180
1184
|
//#endregion
|
|
1181
1185
|
//#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1182
|
-
var
|
|
1186
|
+
var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["onUpdate:modelValue"], fr = { class: "settings-label" }, pr = ["onUpdate:modelValue"], mr = { class: "settings-label" }, hr = ["onUpdate:modelValue"], gr = { class: "settings-header" }, _r = { class: "header-right" }, vr = { class: "settings-body" }, yr = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
1183
1187
|
__name: "ChartSettingsDialog",
|
|
1184
1188
|
props: { show: { type: Boolean } },
|
|
1185
1189
|
emits: ["close", "confirm"],
|
|
1186
1190
|
setup(u, { emit: d }) {
|
|
1187
|
-
let f = u, p = d, m =
|
|
1191
|
+
let f = u, p = d, m = Fe(), h = r(() => V.filter((e) => e.group === "main")), g = r(() => V.filter((e) => e.group === "experimental")), _ = r(() => V.filter((e) => e.group === "style")), v = w(!1);
|
|
1188
1192
|
function y() {
|
|
1189
1193
|
try {
|
|
1190
|
-
let e = localStorage.getItem(
|
|
1194
|
+
let e = localStorage.getItem(_e);
|
|
1191
1195
|
if (e) {
|
|
1192
1196
|
let t = JSON.parse(e), n = {};
|
|
1193
|
-
return
|
|
1197
|
+
return V.forEach((e) => {
|
|
1194
1198
|
n[e.key] = t[e.key] ?? e.default;
|
|
1195
|
-
}), n.colorPresetSettings =
|
|
1199
|
+
}), n.colorPresetSettings = ie(t.colorPresetSettings), n;
|
|
1196
1200
|
}
|
|
1197
1201
|
} catch {}
|
|
1198
1202
|
let e = {};
|
|
1199
|
-
return
|
|
1203
|
+
return V.forEach((t) => {
|
|
1200
1204
|
e[t.key] = t.default;
|
|
1201
1205
|
}), e.colorPresetSettings = {}, e;
|
|
1202
1206
|
}
|
|
@@ -1209,7 +1213,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1209
1213
|
}
|
|
1210
1214
|
function C() {
|
|
1211
1215
|
let e = {};
|
|
1212
|
-
|
|
1216
|
+
V.forEach((t) => {
|
|
1213
1217
|
e[t.key] = t.default;
|
|
1214
1218
|
}), e.colorPresetSettings = {}, b.value = e;
|
|
1215
1219
|
}
|
|
@@ -1235,16 +1239,16 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1235
1239
|
stroke: "currentColor",
|
|
1236
1240
|
"stroke-width": "2"
|
|
1237
1241
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
1238
|
-
s("div",
|
|
1242
|
+
s("div", lr, [
|
|
1239
1243
|
h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (e) => (S(), o("div", {
|
|
1240
1244
|
key: e.key,
|
|
1241
1245
|
class: "settings-item"
|
|
1242
|
-
}, [s("label",
|
|
1246
|
+
}, [s("label", ur, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
|
|
1243
1247
|
key: 0,
|
|
1244
1248
|
type: "checkbox",
|
|
1245
1249
|
class: "settings-checkbox",
|
|
1246
1250
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1247
|
-
}, null, 8,
|
|
1251
|
+
}, null, 8, dr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(K, {
|
|
1248
1252
|
key: 1,
|
|
1249
1253
|
"model-value": String(b.value[e.key]),
|
|
1250
1254
|
options: e.options,
|
|
@@ -1260,12 +1264,12 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1260
1264
|
(S(!0), o(e, null, T(_.value, (e) => (S(), o("div", {
|
|
1261
1265
|
key: e.key,
|
|
1262
1266
|
class: "settings-item"
|
|
1263
|
-
}, [s("label",
|
|
1267
|
+
}, [s("label", fr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
|
|
1264
1268
|
key: 0,
|
|
1265
1269
|
type: "checkbox",
|
|
1266
1270
|
class: "settings-checkbox",
|
|
1267
1271
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1268
|
-
}, null, 8,
|
|
1272
|
+
}, null, 8, pr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(K, {
|
|
1269
1273
|
key: 1,
|
|
1270
1274
|
"model-value": String(b.value[e.key]),
|
|
1271
1275
|
options: e.options,
|
|
@@ -1292,12 +1296,12 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1292
1296
|
g.value.length > 0 ? (S(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, T(g.value, (e) => (S(), o("div", {
|
|
1293
1297
|
key: e.key,
|
|
1294
1298
|
class: "settings-item experimental"
|
|
1295
|
-
}, [s("label",
|
|
1299
|
+
}, [s("label", mr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
|
|
1296
1300
|
key: 0,
|
|
1297
1301
|
type: "checkbox",
|
|
1298
1302
|
class: "settings-checkbox",
|
|
1299
1303
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1300
|
-
}, null, 8,
|
|
1304
|
+
}, null, 8, hr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(K, {
|
|
1301
1305
|
key: 1,
|
|
1302
1306
|
"model-value": String(b.value[e.key]),
|
|
1303
1307
|
options: e.options,
|
|
@@ -1343,7 +1347,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1343
1347
|
default: N(() => [s("div", {
|
|
1344
1348
|
class: "settings-modal",
|
|
1345
1349
|
onClick: d[4] ||= I(() => {}, ["stop"])
|
|
1346
|
-
}, [s("div",
|
|
1350
|
+
}, [s("div", gr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", _r, [s("button", {
|
|
1347
1351
|
class: "settings-close",
|
|
1348
1352
|
onClick: d[2] ||= (e) => v.value = !1
|
|
1349
1353
|
}, [...d[14] ||= [s("svg", {
|
|
@@ -1351,7 +1355,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1351
1355
|
fill: "none",
|
|
1352
1356
|
stroke: "currentColor",
|
|
1353
1357
|
"stroke-width": "2"
|
|
1354
|
-
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div",
|
|
1358
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", vr, [l(W, {
|
|
1355
1359
|
"color-preset-settings": b.value.colorPresetSettings,
|
|
1356
1360
|
"onUpdate:colorPresetSettings": d[3] ||= (e) => b.value = {
|
|
1357
1361
|
...b.value,
|
|
@@ -1363,18 +1367,18 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1363
1367
|
_: 1
|
|
1364
1368
|
})], 8, ["to"]));
|
|
1365
1369
|
}
|
|
1366
|
-
}), [["__scopeId", "data-v-e04604ac"]]),
|
|
1370
|
+
}), [["__scopeId", "data-v-e04604ac"]]), br = {
|
|
1367
1371
|
class: "left-toolbar",
|
|
1368
1372
|
"aria-label": "图表工具栏"
|
|
1369
|
-
},
|
|
1373
|
+
}, xr = { class: "left-toolbar__group" }, Sr = [
|
|
1370
1374
|
"title",
|
|
1371
1375
|
"aria-label",
|
|
1372
1376
|
"onClick"
|
|
1373
|
-
],
|
|
1377
|
+
], Cr = ["onClick"], wr = [
|
|
1374
1378
|
"title",
|
|
1375
1379
|
"aria-label",
|
|
1376
1380
|
"onClick"
|
|
1377
|
-
],
|
|
1381
|
+
], Tr = { class: "left-toolbar__group" }, Er = { class: "left-toolbar__group" }, Dr = ["title", "aria-label"], Or = { class: "left-toolbar__group" }, kr = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
1378
1382
|
__name: "LeftToolbar",
|
|
1379
1383
|
props: { isFullscreen: { type: Boolean } },
|
|
1380
1384
|
emits: [
|
|
@@ -1389,96 +1393,96 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1389
1393
|
{
|
|
1390
1394
|
id: "cursor",
|
|
1391
1395
|
title: "光标",
|
|
1392
|
-
icon:
|
|
1396
|
+
icon: en
|
|
1393
1397
|
},
|
|
1394
1398
|
{
|
|
1395
1399
|
id: "lines",
|
|
1396
1400
|
title: "线条",
|
|
1397
|
-
icon:
|
|
1401
|
+
icon: rn,
|
|
1398
1402
|
children: [
|
|
1399
1403
|
{
|
|
1400
1404
|
id: "trend-line",
|
|
1401
1405
|
title: "线段",
|
|
1402
|
-
icon:
|
|
1406
|
+
icon: rn
|
|
1403
1407
|
},
|
|
1404
1408
|
{
|
|
1405
1409
|
id: "ray",
|
|
1406
1410
|
title: "射线",
|
|
1407
|
-
icon:
|
|
1411
|
+
icon: sn
|
|
1408
1412
|
},
|
|
1409
1413
|
{
|
|
1410
1414
|
id: "h-line",
|
|
1411
1415
|
title: "水平线",
|
|
1412
|
-
icon:
|
|
1416
|
+
icon: pn
|
|
1413
1417
|
},
|
|
1414
1418
|
{
|
|
1415
1419
|
id: "h-ray",
|
|
1416
1420
|
title: "水平射线",
|
|
1417
|
-
icon:
|
|
1421
|
+
icon: un
|
|
1418
1422
|
},
|
|
1419
1423
|
{
|
|
1420
1424
|
id: "v-line",
|
|
1421
1425
|
title: "垂直线",
|
|
1422
|
-
icon:
|
|
1426
|
+
icon: gn
|
|
1423
1427
|
},
|
|
1424
1428
|
{
|
|
1425
1429
|
id: "crosshair-line",
|
|
1426
1430
|
title: "十字线",
|
|
1427
|
-
icon:
|
|
1431
|
+
icon: yn
|
|
1428
1432
|
},
|
|
1429
1433
|
{
|
|
1430
1434
|
id: "info-line",
|
|
1431
1435
|
title: "信息线",
|
|
1432
|
-
icon:
|
|
1436
|
+
icon: Sn
|
|
1433
1437
|
}
|
|
1434
1438
|
]
|
|
1435
1439
|
},
|
|
1436
1440
|
{
|
|
1437
1441
|
id: "channels",
|
|
1438
1442
|
title: "通道",
|
|
1439
|
-
icon:
|
|
1443
|
+
icon: Bn,
|
|
1440
1444
|
children: [
|
|
1441
1445
|
{
|
|
1442
1446
|
id: "parallel-channel",
|
|
1443
1447
|
title: "平行通道",
|
|
1444
|
-
icon:
|
|
1448
|
+
icon: Bn
|
|
1445
1449
|
},
|
|
1446
1450
|
{
|
|
1447
1451
|
id: "regression-channel",
|
|
1448
1452
|
title: "回归趋势",
|
|
1449
|
-
icon:
|
|
1453
|
+
icon: Un
|
|
1450
1454
|
},
|
|
1451
1455
|
{
|
|
1452
1456
|
id: "flat-line",
|
|
1453
1457
|
title: "平滑顶底",
|
|
1454
|
-
icon:
|
|
1458
|
+
icon: Kn
|
|
1455
1459
|
},
|
|
1456
1460
|
{
|
|
1457
1461
|
id: "disjoint-channel",
|
|
1458
1462
|
title: "不相交通道",
|
|
1459
|
-
icon:
|
|
1463
|
+
icon: Yn
|
|
1460
1464
|
}
|
|
1461
1465
|
]
|
|
1462
1466
|
}
|
|
1463
1467
|
], d = c, f = w("cursor"), p = w(null), m = w(!1);
|
|
1464
1468
|
function h() {
|
|
1465
1469
|
try {
|
|
1466
|
-
let e = localStorage.getItem(
|
|
1470
|
+
let e = localStorage.getItem(_e);
|
|
1467
1471
|
if (e) {
|
|
1468
1472
|
let t = JSON.parse(e), n = { ...t };
|
|
1469
|
-
return
|
|
1473
|
+
return V.forEach((e) => {
|
|
1470
1474
|
n[e.key] = t[e.key] ?? e.default;
|
|
1471
1475
|
}), n;
|
|
1472
1476
|
}
|
|
1473
1477
|
} catch {}
|
|
1474
1478
|
let e = {};
|
|
1475
|
-
return
|
|
1479
|
+
return V.forEach((t) => {
|
|
1476
1480
|
e[t.key] = t.default;
|
|
1477
1481
|
}), e;
|
|
1478
1482
|
}
|
|
1479
1483
|
function _(e) {
|
|
1480
1484
|
try {
|
|
1481
|
-
localStorage.setItem(
|
|
1485
|
+
localStorage.setItem(_e, JSON.stringify(e));
|
|
1482
1486
|
} catch {}
|
|
1483
1487
|
}
|
|
1484
1488
|
let v = w(h());
|
|
@@ -1510,17 +1514,17 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1510
1514
|
}
|
|
1511
1515
|
r({ getSettings: j });
|
|
1512
1516
|
function M(e) {
|
|
1513
|
-
v.value = { ...e }, _(v.value),
|
|
1517
|
+
v.value = { ...e }, _(v.value), ir(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
1514
1518
|
}
|
|
1515
1519
|
function P(e) {
|
|
1516
1520
|
e.target.closest(".tool-item") || (p.value = null);
|
|
1517
1521
|
}
|
|
1518
1522
|
return y(() => {
|
|
1519
|
-
document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }),
|
|
1523
|
+
document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), ir(!!v.value.enableCanvasProfiler);
|
|
1520
1524
|
}), x(() => {
|
|
1521
1525
|
document.removeEventListener("click", P, !0);
|
|
1522
|
-
}), (r, c) => (S(), o(e, null, [s("nav",
|
|
1523
|
-
s("div",
|
|
1526
|
+
}), (r, c) => (S(), o(e, null, [s("nav", br, [
|
|
1527
|
+
s("div", xr, [(S(), o(e, null, T(u, (t) => s("div", {
|
|
1524
1528
|
key: t.id,
|
|
1525
1529
|
class: "tool-item"
|
|
1526
1530
|
}, [s("button", {
|
|
@@ -1540,7 +1544,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1540
1544
|
class: g(["corner-indicator", { open: p.value === t.id }]),
|
|
1541
1545
|
onClick: I((e) => O(t.id), ["stop"]),
|
|
1542
1546
|
"aria-label": "展开子菜单"
|
|
1543
|
-
}, null, 10,
|
|
1547
|
+
}, null, 10, Cr)) : a("", !0)], 42, Sr), l(n, { name: "dropdown" }, {
|
|
1544
1548
|
default: N(() => [p.value === t.id && t.children && t.children.length ? (S(), o("div", {
|
|
1545
1549
|
key: 0,
|
|
1546
1550
|
class: "tool-dropdown",
|
|
@@ -1557,11 +1561,11 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1557
1561
|
}, [(S(), i(E(e.icon), {
|
|
1558
1562
|
class: "tool-icon",
|
|
1559
1563
|
"aria-hidden": "true"
|
|
1560
|
-
}))], 10,
|
|
1564
|
+
}))], 10, wr))), 128))], 32)) : a("", !0)]),
|
|
1561
1565
|
_: 2
|
|
1562
1566
|
}, 1024)])), 64))]),
|
|
1563
1567
|
c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1564
|
-
s("div",
|
|
1568
|
+
s("div", Tr, [s("button", {
|
|
1565
1569
|
type: "button",
|
|
1566
1570
|
class: "left-toolbar__button",
|
|
1567
1571
|
title: "放大",
|
|
@@ -1570,7 +1574,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1570
1574
|
onPointerdown: c[7] ||= I(() => {}, ["stop"]),
|
|
1571
1575
|
onPointermove: c[8] ||= I(() => {}, ["stop"]),
|
|
1572
1576
|
onPointerup: c[9] ||= I(() => {}, ["stop"])
|
|
1573
|
-
}, [l(k(
|
|
1577
|
+
}, [l(k(Tn), {
|
|
1574
1578
|
class: "tool-icon",
|
|
1575
1579
|
"aria-hidden": "true"
|
|
1576
1580
|
})], 32), s("button", {
|
|
@@ -1582,12 +1586,12 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1582
1586
|
onPointerdown: c[11] ||= I(() => {}, ["stop"]),
|
|
1583
1587
|
onPointermove: c[12] ||= I(() => {}, ["stop"]),
|
|
1584
1588
|
onPointerup: c[13] ||= I(() => {}, ["stop"])
|
|
1585
|
-
}, [l(k(
|
|
1589
|
+
}, [l(k(On), {
|
|
1586
1590
|
class: "tool-icon",
|
|
1587
1591
|
"aria-hidden": "true"
|
|
1588
1592
|
})], 32)]),
|
|
1589
1593
|
c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1590
|
-
s("div",
|
|
1594
|
+
s("div", Er, [s("button", {
|
|
1591
1595
|
type: "button",
|
|
1592
1596
|
class: "left-toolbar__button",
|
|
1593
1597
|
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
@@ -1596,17 +1600,17 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1596
1600
|
onPointerdown: c[15] ||= I(() => {}, ["stop"]),
|
|
1597
1601
|
onPointermove: c[16] ||= I(() => {}, ["stop"]),
|
|
1598
1602
|
onPointerup: c[17] ||= I(() => {}, ["stop"])
|
|
1599
|
-
}, [t.isFullscreen ? (S(), i(k(
|
|
1603
|
+
}, [t.isFullscreen ? (S(), i(k(Pn), {
|
|
1600
1604
|
key: 0,
|
|
1601
1605
|
class: "tool-icon",
|
|
1602
1606
|
"aria-hidden": "true"
|
|
1603
|
-
})) : (S(), i(k(
|
|
1607
|
+
})) : (S(), i(k(jn), {
|
|
1604
1608
|
key: 1,
|
|
1605
1609
|
class: "tool-icon",
|
|
1606
1610
|
"aria-hidden": "true"
|
|
1607
|
-
}))], 40,
|
|
1611
|
+
}))], 40, Dr)]),
|
|
1608
1612
|
c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1609
|
-
s("div",
|
|
1613
|
+
s("div", Or, [s("button", {
|
|
1610
1614
|
type: "button",
|
|
1611
1615
|
class: "left-toolbar__button",
|
|
1612
1616
|
title: "设置",
|
|
@@ -1615,17 +1619,17 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1615
1619
|
onPointerdown: c[18] ||= I(() => {}, ["stop"]),
|
|
1616
1620
|
onPointermove: c[19] ||= I(() => {}, ["stop"]),
|
|
1617
1621
|
onPointerup: c[20] ||= I(() => {}, ["stop"])
|
|
1618
|
-
}, [l(k(
|
|
1622
|
+
}, [l(k(Ln), {
|
|
1619
1623
|
class: "tool-icon",
|
|
1620
1624
|
"aria-hidden": "true"
|
|
1621
1625
|
})], 32)])
|
|
1622
|
-
]), l(
|
|
1626
|
+
]), l(yr, {
|
|
1623
1627
|
show: m.value,
|
|
1624
1628
|
onClose: c[21] ||= (e) => m.value = !1,
|
|
1625
1629
|
onConfirm: M
|
|
1626
1630
|
}, null, 8, ["show"])], 64));
|
|
1627
1631
|
}
|
|
1628
|
-
}), [["__scopeId", "data-v-66411b58"]]),
|
|
1632
|
+
}), [["__scopeId", "data-v-66411b58"]]), Ar = /* @__PURE__ */ u({
|
|
1629
1633
|
__name: "KLineLevelDropdown",
|
|
1630
1634
|
props: { modelValue: {} },
|
|
1631
1635
|
emits: ["update:modelValue"],
|
|
@@ -1672,7 +1676,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1672
1676
|
value: "yearly"
|
|
1673
1677
|
}
|
|
1674
1678
|
], r = t;
|
|
1675
|
-
return (t, a) => (S(), i(
|
|
1679
|
+
return (t, a) => (S(), i(K, {
|
|
1676
1680
|
"model-value": e.modelValue,
|
|
1677
1681
|
options: n,
|
|
1678
1682
|
label: "级别",
|
|
@@ -1681,7 +1685,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1681
1685
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1682
1686
|
}, null, 8, ["model-value"]));
|
|
1683
1687
|
}
|
|
1684
|
-
}),
|
|
1688
|
+
}), jr = /* @__PURE__ */ u({
|
|
1685
1689
|
__name: "KLineAdjustmentDropdown",
|
|
1686
1690
|
props: { modelValue: {} },
|
|
1687
1691
|
emits: ["update:modelValue"],
|
|
@@ -1704,7 +1708,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1704
1708
|
value: "none"
|
|
1705
1709
|
}
|
|
1706
1710
|
], r = t;
|
|
1707
|
-
return (t, a) => (S(), i(
|
|
1711
|
+
return (t, a) => (S(), i(K, {
|
|
1708
1712
|
"model-value": e.modelValue,
|
|
1709
1713
|
options: n,
|
|
1710
1714
|
label: "复权",
|
|
@@ -1713,13 +1717,13 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1713
1717
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1714
1718
|
}, null, 8, ["model-value"]));
|
|
1715
1719
|
}
|
|
1716
|
-
}),
|
|
1720
|
+
}), Mr = {
|
|
1717
1721
|
viewBox: "0 0 24 24",
|
|
1718
1722
|
width: "1.2em",
|
|
1719
1723
|
height: "1.2em"
|
|
1720
1724
|
};
|
|
1721
|
-
function
|
|
1722
|
-
return S(), o("svg",
|
|
1725
|
+
function Nr(e, t) {
|
|
1726
|
+
return S(), o("svg", Mr, [...t[0] ||= [s("path", {
|
|
1723
1727
|
fill: "none",
|
|
1724
1728
|
stroke: "currentColor",
|
|
1725
1729
|
"stroke-linecap": "round",
|
|
@@ -1728,26 +1732,26 @@ function jr(e, t) {
|
|
|
1728
1732
|
d: "M12 9v4m-1.637-9.409L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0M12 16h.01"
|
|
1729
1733
|
}, null, -1)]]);
|
|
1730
1734
|
}
|
|
1731
|
-
var
|
|
1735
|
+
var Pr = m({
|
|
1732
1736
|
name: "tabler-alert-triangle",
|
|
1733
|
-
render:
|
|
1734
|
-
}),
|
|
1737
|
+
render: Nr
|
|
1738
|
+
}), Fr = ["title", "aria-expanded"], Ir = { class: "symbol-chip__code" }, Lr = {
|
|
1735
1739
|
key: 0,
|
|
1736
1740
|
class: "symbol-chip__spinner",
|
|
1737
1741
|
"aria-hidden": "true"
|
|
1738
|
-
},
|
|
1742
|
+
}, Rr = {
|
|
1739
1743
|
key: 0,
|
|
1740
1744
|
class: "symbol-popover",
|
|
1741
1745
|
role: "dialog",
|
|
1742
1746
|
"aria-label": "切换合约"
|
|
1743
|
-
},
|
|
1747
|
+
}, zr = { class: "symbol-search" }, Br = {
|
|
1744
1748
|
class: "symbol-list",
|
|
1745
1749
|
role: "listbox",
|
|
1746
1750
|
"aria-label": "商品列表"
|
|
1747
|
-
},
|
|
1751
|
+
}, Vr = {
|
|
1748
1752
|
key: 0,
|
|
1749
1753
|
class: "symbol-list__empty"
|
|
1750
|
-
},
|
|
1754
|
+
}, Hr = {
|
|
1751
1755
|
width: "32",
|
|
1752
1756
|
height: "32",
|
|
1753
1757
|
viewBox: "0 0 32 32",
|
|
@@ -1756,7 +1760,7 @@ var Mr = m({
|
|
|
1756
1760
|
"margin-bottom": "8px",
|
|
1757
1761
|
opacity: "0.35"
|
|
1758
1762
|
}
|
|
1759
|
-
},
|
|
1763
|
+
}, Ur = ["aria-selected", "onClick"], Wr = { class: "symbol-list__left" }, Gr = { class: "symbol-list__code" }, Kr = { class: "symbol-list__desc" }, qr = { class: "symbol-list__exchange" }, Jr = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
1760
1764
|
__name: "SymbolSelector",
|
|
1761
1765
|
props: {
|
|
1762
1766
|
symbol: {},
|
|
@@ -1799,12 +1803,12 @@ var Mr = m({
|
|
|
1799
1803
|
"aria-expanded": f.value,
|
|
1800
1804
|
"aria-haspopup": "dialog",
|
|
1801
1805
|
onClick: E
|
|
1802
|
-
}, [s("span",
|
|
1806
|
+
}, [s("span", Ir, O(x.value), 1), t.loading ? (S(), o("span", Lr)) : t.error ? (S(), i(k(Pr), {
|
|
1803
1807
|
key: 1,
|
|
1804
1808
|
class: "symbol-chip__warn",
|
|
1805
1809
|
"aria-hidden": "true"
|
|
1806
|
-
})) : a("", !0)], 10,
|
|
1807
|
-
default: N(() => [f.value ? (S(), o("div",
|
|
1810
|
+
})) : a("", !0)], 10, Fr), l(n, { name: "symbol-popover" }, {
|
|
1811
|
+
default: N(() => [f.value ? (S(), o("div", Rr, [s("div", zr, [
|
|
1808
1812
|
c[2] ||= s("span", {
|
|
1809
1813
|
class: "symbol-search__icon",
|
|
1810
1814
|
"aria-hidden": "true"
|
|
@@ -1860,7 +1864,7 @@ var Mr = m({
|
|
|
1860
1864
|
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
1861
1865
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
1862
1866
|
], -1)]])) : a("", !0)
|
|
1863
|
-
]), s("div",
|
|
1867
|
+
]), s("div", Br, [C.value.length === 0 ? (S(), o("div", Vr, [(S(), o("svg", Hr, [...c[3] ||= [s("circle", {
|
|
1864
1868
|
cx: "13",
|
|
1865
1869
|
cy: "13",
|
|
1866
1870
|
r: "10",
|
|
@@ -1881,32 +1885,32 @@ var Mr = m({
|
|
|
1881
1885
|
role: "option",
|
|
1882
1886
|
"aria-selected": e.code === t.symbol,
|
|
1883
1887
|
onClick: (t) => F(e)
|
|
1884
|
-
}, [s("span",
|
|
1888
|
+
}, [s("span", Wr, [s("span", Gr, O(e.code), 1), s("span", Kr, O(e.description), 1)]), s("span", qr, O(e.exchange), 1)], 10, Ur))), 128))])])) : a("", !0)]),
|
|
1885
1889
|
_: 1
|
|
1886
1890
|
})], 512));
|
|
1887
1891
|
}
|
|
1888
|
-
}), [["__scopeId", "data-v-864e9451"]]),
|
|
1892
|
+
}), [["__scopeId", "data-v-864e9451"]]), Yr = ["aria-expanded"], Xr = {
|
|
1889
1893
|
key: 0,
|
|
1890
1894
|
class: "compare-chip__spinner"
|
|
1891
|
-
},
|
|
1895
|
+
}, Zr = {
|
|
1892
1896
|
key: 1,
|
|
1893
1897
|
class: "compare-chip__badge"
|
|
1894
|
-
},
|
|
1898
|
+
}, Qr = {
|
|
1895
1899
|
key: 0,
|
|
1896
1900
|
class: "compare-popover",
|
|
1897
1901
|
role: "dialog",
|
|
1898
1902
|
"aria-label": "比较商品"
|
|
1899
|
-
},
|
|
1903
|
+
}, $r = { class: "compare-search" }, ei = {
|
|
1900
1904
|
key: 0,
|
|
1901
1905
|
class: "compare-selected"
|
|
1902
|
-
},
|
|
1906
|
+
}, ti = { class: "compare-selected__list" }, ni = { class: "compare-selected__code" }, ri = { class: "compare-selected__desc" }, ii = ["aria-label", "onClick"], ai = {
|
|
1903
1907
|
class: "compare-list",
|
|
1904
1908
|
role: "listbox",
|
|
1905
1909
|
"aria-label": "商品列表"
|
|
1906
|
-
},
|
|
1910
|
+
}, oi = {
|
|
1907
1911
|
key: 0,
|
|
1908
1912
|
class: "compare-list__empty"
|
|
1909
|
-
},
|
|
1913
|
+
}, si = {
|
|
1910
1914
|
width: "32",
|
|
1911
1915
|
height: "32",
|
|
1912
1916
|
viewBox: "0 0 32 32",
|
|
@@ -1915,11 +1919,11 @@ var Mr = m({
|
|
|
1915
1919
|
"margin-bottom": "8px",
|
|
1916
1920
|
opacity: "0.35"
|
|
1917
1921
|
}
|
|
1918
|
-
},
|
|
1922
|
+
}, ci = ["aria-selected", "onClick"], li = { class: "compare-list__left" }, ui = { class: "compare-list__code" }, di = { class: "compare-list__desc" }, fi = { class: "compare-list__right" }, pi = { class: "compare-list__exchange" }, mi = {
|
|
1919
1923
|
key: 0,
|
|
1920
1924
|
class: "compare-list__check",
|
|
1921
1925
|
"aria-hidden": "true"
|
|
1922
|
-
},
|
|
1926
|
+
}, hi = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
1923
1927
|
__name: "CompareSymbolSelector",
|
|
1924
1928
|
props: {
|
|
1925
1929
|
symbols: {},
|
|
@@ -1971,11 +1975,11 @@ var Mr = m({
|
|
|
1971
1975
|
"aria-hidden": "true"
|
|
1972
1976
|
}, "+", -1),
|
|
1973
1977
|
i[2] ||= s("span", { class: "compare-chip__text" }, "比较商品", -1),
|
|
1974
|
-
t.comparisonLoading ? (S(), o("span",
|
|
1975
|
-
t.selected.length > 0 ? (S(), o("span",
|
|
1976
|
-
], 10,
|
|
1977
|
-
default: N(() => [d.value ? (S(), o("div",
|
|
1978
|
-
s("div",
|
|
1978
|
+
t.comparisonLoading ? (S(), o("span", Xr)) : a("", !0),
|
|
1979
|
+
t.selected.length > 0 ? (S(), o("span", Zr, O(t.selected.length), 1)) : a("", !0)
|
|
1980
|
+
], 10, Yr), l(n, { name: "symbol-popover" }, {
|
|
1981
|
+
default: N(() => [d.value ? (S(), o("div", Qr, [
|
|
1982
|
+
s("div", $r, [
|
|
1979
1983
|
i[4] ||= s("span", {
|
|
1980
1984
|
class: "compare-search__icon",
|
|
1981
1985
|
"aria-hidden": "true"
|
|
@@ -2031,7 +2035,7 @@ var Mr = m({
|
|
|
2031
2035
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
2032
2036
|
], -1)]])) : a("", !0)
|
|
2033
2037
|
]),
|
|
2034
|
-
t.selected.length > 0 ? (S(), o("div",
|
|
2038
|
+
t.selected.length > 0 ? (S(), o("div", ei, [i[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", ti, [(S(!0), o(e, null, T(x.value, (e) => (S(), o("div", {
|
|
2035
2039
|
key: e.code,
|
|
2036
2040
|
class: "compare-selected__item"
|
|
2037
2041
|
}, [
|
|
@@ -2039,8 +2043,8 @@ var Mr = m({
|
|
|
2039
2043
|
class: "compare-selected__color",
|
|
2040
2044
|
style: _({ background: t.comparisonColors?.get(e.code) ?? "#888" })
|
|
2041
2045
|
}, null, 4),
|
|
2042
|
-
s("span",
|
|
2043
|
-
s("span",
|
|
2046
|
+
s("span", ni, O(e.code), 1),
|
|
2047
|
+
s("span", ri, O(e.description), 1),
|
|
2044
2048
|
s("button", {
|
|
2045
2049
|
type: "button",
|
|
2046
2050
|
class: "compare-selected__remove",
|
|
@@ -2055,9 +2059,9 @@ var Mr = m({
|
|
|
2055
2059
|
"stroke-width": "2",
|
|
2056
2060
|
"stroke-linecap": "round",
|
|
2057
2061
|
"stroke-linejoin": "round"
|
|
2058
|
-
}, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8,
|
|
2062
|
+
}, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, ii)
|
|
2059
2063
|
]))), 128))])])) : a("", !0),
|
|
2060
|
-
s("div",
|
|
2064
|
+
s("div", ai, [C.value.length === 0 ? (S(), o("div", oi, [(S(), o("svg", si, [...i[7] ||= [s("circle", {
|
|
2061
2065
|
cx: "13",
|
|
2062
2066
|
cy: "13",
|
|
2063
2067
|
r: "10",
|
|
@@ -2078,7 +2082,7 @@ var Mr = m({
|
|
|
2078
2082
|
role: "option",
|
|
2079
2083
|
"aria-selected": E(e.code),
|
|
2080
2084
|
onClick: (t) => D(e)
|
|
2081
|
-
}, [s("span",
|
|
2085
|
+
}, [s("span", li, [s("span", ui, O(e.code), 1), s("span", di, O(e.description), 1)]), s("span", fi, [s("span", pi, O(e.exchange), 1), E(e.code) ? (S(), o("span", mi, [...i[9] ||= [s("svg", {
|
|
2082
2086
|
viewBox: "0 0 24 24",
|
|
2083
2087
|
width: "16",
|
|
2084
2088
|
height: "16",
|
|
@@ -2087,12 +2091,12 @@ var Mr = m({
|
|
|
2087
2091
|
"stroke-width": "2.5",
|
|
2088
2092
|
"stroke-linecap": "round",
|
|
2089
2093
|
"stroke-linejoin": "round"
|
|
2090
|
-
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10,
|
|
2094
|
+
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, ci))), 128))])
|
|
2091
2095
|
])) : a("", !0)]),
|
|
2092
2096
|
_: 1
|
|
2093
2097
|
})], 512));
|
|
2094
2098
|
}
|
|
2095
|
-
}), [["__scopeId", "data-v-9513ad09"]]),
|
|
2099
|
+
}), [["__scopeId", "data-v-9513ad09"]]), gi = { class: "top-toolbar" }, _i = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
2096
2100
|
__name: "TopToolbar",
|
|
2097
2101
|
props: {
|
|
2098
2102
|
symbol: {},
|
|
@@ -2203,8 +2207,8 @@ var Mr = m({
|
|
|
2203
2207
|
function p(e) {
|
|
2204
2208
|
c("symbolChange", e);
|
|
2205
2209
|
}
|
|
2206
|
-
return (t, n) => (S(), o("div",
|
|
2207
|
-
d.value ? (S(), i(
|
|
2210
|
+
return (t, n) => (S(), o("div", gi, [
|
|
2211
|
+
d.value ? (S(), i(Jr, {
|
|
2208
2212
|
key: 0,
|
|
2209
2213
|
symbol: d.value,
|
|
2210
2214
|
symbols: f.value,
|
|
@@ -2217,7 +2221,7 @@ var Mr = m({
|
|
|
2217
2221
|
"loading",
|
|
2218
2222
|
"error"
|
|
2219
2223
|
])) : a("", !0),
|
|
2220
|
-
l(
|
|
2224
|
+
l(hi, {
|
|
2221
2225
|
symbols: f.value,
|
|
2222
2226
|
selected: e.overlaySymbols,
|
|
2223
2227
|
"comparison-colors": e.comparisonColors,
|
|
@@ -2230,11 +2234,11 @@ var Mr = m({
|
|
|
2230
2234
|
"comparison-colors",
|
|
2231
2235
|
"comparison-loading"
|
|
2232
2236
|
]),
|
|
2233
|
-
l(
|
|
2237
|
+
l(Ar, {
|
|
2234
2238
|
"model-value": e.kLineLevel,
|
|
2235
2239
|
"onUpdate:modelValue": n[2] ||= (e) => c("kLineLevelChange", e)
|
|
2236
2240
|
}, null, 8, ["model-value"]),
|
|
2237
|
-
l(
|
|
2241
|
+
l(jr, {
|
|
2238
2242
|
"model-value": e.kLineAdjust,
|
|
2239
2243
|
"onUpdate:modelValue": n[3] ||= (e) => c("kLineAdjustChange", e)
|
|
2240
2244
|
}, null, 8, ["model-value"]),
|
|
@@ -2250,16 +2254,16 @@ var Mr = m({
|
|
|
2250
2254
|
}, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
|
|
2251
2255
|
]));
|
|
2252
2256
|
}
|
|
2253
|
-
}), [["__scopeId", "data-v-c612b21d"]]),
|
|
2257
|
+
}), [["__scopeId", "data-v-c612b21d"]]), vi = ["data-theme"], yi = {
|
|
2254
2258
|
class: "pane-separator-layer",
|
|
2255
2259
|
"aria-hidden": "true"
|
|
2256
|
-
},
|
|
2260
|
+
}, bi = {
|
|
2257
2261
|
class: "canvas-layer",
|
|
2258
2262
|
ref: "canvasLayerRef"
|
|
2259
|
-
},
|
|
2263
|
+
}, xi = {
|
|
2260
2264
|
class: "x-axis-canvas",
|
|
2261
2265
|
ref: "xAxisCanvasRef"
|
|
2262
|
-
},
|
|
2266
|
+
}, Si = 4, Ci = /*#__PURE__*/ U(/* @__PURE__ */ u({
|
|
2263
2267
|
__name: "KLineChart",
|
|
2264
2268
|
props: {
|
|
2265
2269
|
semanticConfig: {},
|
|
@@ -2289,21 +2293,21 @@ var Mr = m({
|
|
|
2289
2293
|
setup(n, { expose: c, emit: u }) {
|
|
2290
2294
|
let d = n, f = u, p = w(d.semanticConfig?.data?.period ?? "daily"), m = w(d.semanticConfig?.data?.adjust ?? "none"), v = r(() => p.value.includes("min")), b = w("选择商品"), C = w(null), E = w(!1), O = w(!1), k = w([]), A = w([]);
|
|
2291
2295
|
function j(e) {
|
|
2292
|
-
p.value = e, f("kLineLevelChange", e),
|
|
2296
|
+
p.value = e, f("kLineLevelChange", e), ee();
|
|
2293
2297
|
}
|
|
2294
2298
|
function N(e) {
|
|
2295
|
-
m.value = e, f("kLineAdjustChange", e),
|
|
2299
|
+
m.value = e, f("kLineAdjustChange", e), ee();
|
|
2296
2300
|
}
|
|
2297
2301
|
function P(e) {
|
|
2298
|
-
O.value = !1, b.value = e.code, C.value = e,
|
|
2302
|
+
O.value = !1, b.value = e.code, C.value = e, ee();
|
|
2299
2303
|
}
|
|
2300
2304
|
function F(e) {
|
|
2301
|
-
C.value?.code !== e.code && (k.value.includes(e.code) || (A.value = [...A.value, e], k.value = A.value.map((e) => e.code), te(), B.value?.addComparisonSymbol(
|
|
2305
|
+
C.value?.code !== e.code && (k.value.includes(e.code) || (A.value = [...A.value, e], k.value = A.value.map((e) => e.code), te(), B.value?.addComparisonSymbol(L(e))));
|
|
2302
2306
|
}
|
|
2303
2307
|
function I(e) {
|
|
2304
2308
|
A.value = A.value.filter((t) => t.code !== e), k.value = A.value.map((e) => e.code), B.value?.removeComparisonSymbol(e);
|
|
2305
2309
|
}
|
|
2306
|
-
function
|
|
2310
|
+
function L(e) {
|
|
2307
2311
|
return {
|
|
2308
2312
|
symbol: e.code,
|
|
2309
2313
|
exchange: e.exchange,
|
|
@@ -2314,37 +2318,37 @@ var Mr = m({
|
|
|
2314
2318
|
adjust: m.value
|
|
2315
2319
|
};
|
|
2316
2320
|
}
|
|
2317
|
-
function
|
|
2318
|
-
C.value && B.value?.setSymbols([
|
|
2321
|
+
function ee() {
|
|
2322
|
+
C.value && B.value?.setSymbols([L(C.value), ...A.value.map(L)]);
|
|
2319
2323
|
}
|
|
2320
2324
|
function te() {
|
|
2321
|
-
if (
|
|
2325
|
+
if (G.value.axisType === "percent") return;
|
|
2322
2326
|
let e = {
|
|
2323
|
-
...
|
|
2327
|
+
...G.value,
|
|
2324
2328
|
axisType: "percent"
|
|
2325
2329
|
};
|
|
2326
|
-
|
|
2330
|
+
G.value = e, B.value?.updateSettingsFacade(e);
|
|
2327
2331
|
try {
|
|
2328
|
-
localStorage.setItem(
|
|
2332
|
+
localStorage.setItem(_e, JSON.stringify(e));
|
|
2329
2333
|
} catch {}
|
|
2330
2334
|
}
|
|
2331
|
-
let R = w(null),
|
|
2332
|
-
|
|
2333
|
-
let B = D(null),
|
|
2334
|
-
|
|
2335
|
+
let R = w(null), z = w(null), ie = w(null), ce = w(null), ue = w(null), de = w(null);
|
|
2336
|
+
Pe(ie);
|
|
2337
|
+
let B = D(null), pe = D(null), V = w(0), ve = w(0), ye = w(1), H = w(d.initialZoomLevel ?? 1), be = w(0), xe = w(1), Se = w(0), Ce = w({}), U = w(null), W = w([]), we = w(/* @__PURE__ */ new Map()), Te = w(!1), Ee = H.value;
|
|
2338
|
+
be.value = me(Ee, {
|
|
2335
2339
|
minKWidth: d.minKWidth,
|
|
2336
2340
|
maxKWidth: d.maxKWidth,
|
|
2337
2341
|
zoomLevelCount: d.zoomLevels,
|
|
2338
|
-
dpr:
|
|
2339
|
-
}),
|
|
2340
|
-
let
|
|
2341
|
-
let e =
|
|
2342
|
+
dpr: ye.value
|
|
2343
|
+
}), xe.value = fe(be.value, ye.value);
|
|
2344
|
+
let De = w("light"), G = w({}), Oe = r(() => {
|
|
2345
|
+
let e = G.value.isAsiaMarket ?? !1, t = ae(De.value, e);
|
|
2342
2346
|
return {
|
|
2343
2347
|
upColor: t.candleUpBody,
|
|
2344
2348
|
downColor: t.candleDownBody
|
|
2345
2349
|
};
|
|
2346
2350
|
}), ke = r(() => {
|
|
2347
|
-
let e =
|
|
2351
|
+
let e = De.value === "dark" ? ne : re, t = G.value.colorPresetSettings?.[De.value];
|
|
2348
2352
|
return t && Object.keys(t).length > 0 ? oe({
|
|
2349
2353
|
...e,
|
|
2350
2354
|
colors: {
|
|
@@ -2353,18 +2357,18 @@ var Mr = m({
|
|
|
2353
2357
|
}
|
|
2354
2358
|
}) : oe(e);
|
|
2355
2359
|
}), K = null;
|
|
2356
|
-
function
|
|
2360
|
+
function Ae(e) {
|
|
2357
2361
|
B.value?.setTheme(e.matches ? "dark" : "light");
|
|
2358
2362
|
}
|
|
2359
|
-
function
|
|
2363
|
+
function je(e, t) {
|
|
2360
2364
|
if (!(!e || !t)) if (t === "auto") {
|
|
2361
2365
|
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2362
|
-
e.setTheme(t.matches ? "dark" : "light"), K !== t && (K?.removeEventListener("change",
|
|
2363
|
-
} else K?.removeEventListener("change",
|
|
2366
|
+
e.setTheme(t.matches ? "dark" : "light"), K !== t && (K?.removeEventListener("change", Ae), K = t, t.addEventListener("change", Ae));
|
|
2367
|
+
} else K?.removeEventListener("change", Ae), K = null, e.setTheme(t);
|
|
2364
2368
|
}
|
|
2365
|
-
function
|
|
2369
|
+
function Ne() {}
|
|
2366
2370
|
function Fe(e) {
|
|
2367
|
-
|
|
2371
|
+
G.value = e, je(B.value, e.theme), B.value?.updateSettingsFacade(e);
|
|
2368
2372
|
}
|
|
2369
2373
|
function Ie(e, t, n) {
|
|
2370
2374
|
let r = e.getBoundingClientRect();
|
|
@@ -2382,20 +2386,20 @@ var Mr = m({
|
|
|
2382
2386
|
}
|
|
2383
2387
|
function Re(e) {
|
|
2384
2388
|
e && h(() => {
|
|
2385
|
-
e.isConnected && (
|
|
2389
|
+
e.isConnected && (Ke.value = Ie(e, 120, 60));
|
|
2386
2390
|
});
|
|
2387
2391
|
}
|
|
2388
2392
|
let ze = w({
|
|
2389
2393
|
x: 0,
|
|
2390
2394
|
y: 0
|
|
2391
|
-
}),
|
|
2392
|
-
function
|
|
2393
|
-
|
|
2395
|
+
}), Be = w(!1), Ve = null;
|
|
2396
|
+
function He() {
|
|
2397
|
+
Ve = null;
|
|
2394
2398
|
}
|
|
2395
|
-
function
|
|
2396
|
-
return
|
|
2399
|
+
function Ue(e) {
|
|
2400
|
+
return Ve ||= e.getBoundingClientRect(), Ve;
|
|
2397
2401
|
}
|
|
2398
|
-
let
|
|
2402
|
+
let q = D({
|
|
2399
2403
|
crosshairPos: null,
|
|
2400
2404
|
crosshairIndex: null,
|
|
2401
2405
|
crosshairPrice: null,
|
|
@@ -2413,14 +2417,14 @@ var Mr = m({
|
|
|
2413
2417
|
isHoveringPaneBoundary: !1,
|
|
2414
2418
|
hoveredPaneBoundaryId: null,
|
|
2415
2419
|
isHoveringRightAxis: !1
|
|
2416
|
-
}),
|
|
2417
|
-
let e =
|
|
2418
|
-
return e ?
|
|
2419
|
-
}),
|
|
2420
|
+
}), J = D(null), We = r(() => {
|
|
2421
|
+
let e = U.value;
|
|
2422
|
+
return e ? W.value.find((t) => t.id === e) ?? null : null;
|
|
2423
|
+
}), Ge = w([]), Ke = w({
|
|
2420
2424
|
width: 220,
|
|
2421
2425
|
height: 120
|
|
2422
|
-
}),
|
|
2423
|
-
let e = R.value, t =
|
|
2426
|
+
}), qe = r(() => {
|
|
2427
|
+
let e = R.value, t = z.value;
|
|
2424
2428
|
return !e || !t ? {
|
|
2425
2429
|
x: 0,
|
|
2426
2430
|
y: 0
|
|
@@ -2428,63 +2432,60 @@ var Mr = m({
|
|
|
2428
2432
|
x: e.offsetLeft,
|
|
2429
2433
|
y: e.offsetTop
|
|
2430
2434
|
};
|
|
2431
|
-
}),
|
|
2432
|
-
r(() =>
|
|
2433
|
-
let
|
|
2434
|
-
let e =
|
|
2435
|
+
}), Je = r(() => q.value.hoveredMarkerData), Ye = r(() => q.value.hoveredCustomMarker), Xe = r(() => q.value.isDragging), Ze = r(() => q.value.isResizingPaneBoundary), Qe = r(() => q.value.isHoveringPaneBoundary), $e = r(() => q.value.hoveredPaneBoundaryId), et = r(() => q.value.isHoveringRightAxis), tt = r(() => q.value.hoveredIndex);
|
|
2436
|
+
r(() => q.value.crosshairIndex);
|
|
2437
|
+
let nt = r(() => Xe.value ? "grabbing" : Ze.value || Qe.value ? "ns-resize" : tt.value === null ? "crosshair" : "pointer"), rt = r(() => {
|
|
2438
|
+
let e = q.value.hoveredIndex;
|
|
2435
2439
|
if (typeof e != "number") return null;
|
|
2436
|
-
|
|
2440
|
+
ve.value;
|
|
2437
2441
|
let t = B.value?.getData();
|
|
2438
2442
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
2439
|
-
}),
|
|
2440
|
-
x:
|
|
2441
|
-
y:
|
|
2442
|
-
})), ot = r(() => ({
|
|
2443
|
-
left: `${at.value.x}px`,
|
|
2444
|
-
top: `${at.value.y}px`
|
|
2443
|
+
}), it = r(() => q.value.hoveredIndex), at = r(() => q.value.tooltipPos), ot = r(() => ({
|
|
2444
|
+
x: at.value.x + qe.value.x,
|
|
2445
|
+
y: at.value.y + qe.value.y
|
|
2445
2446
|
})), st = r(() => ({
|
|
2446
|
-
|
|
2447
|
-
|
|
2447
|
+
left: `${ot.value.x}px`,
|
|
2448
|
+
top: `${ot.value.y}px`
|
|
2448
2449
|
})), ct = r(() => ({
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
})), lt = r(() =>
|
|
2450
|
+
x: ze.value.x + qe.value.x,
|
|
2451
|
+
y: ze.value.y + qe.value.y
|
|
2452
|
+
})), lt = r(() => ({
|
|
2453
|
+
left: `${ct.value.x}px`,
|
|
2454
|
+
top: `${ct.value.y}px`
|
|
2455
|
+
})), ut = r(() => q.value.tooltipAnchorPlacement), dt = r(() => {
|
|
2452
2456
|
let e = B.value?.viewport.peek(), t = R.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
2453
|
-
return ze.value.x + 12 +
|
|
2454
|
-
}),
|
|
2455
|
-
function
|
|
2456
|
-
|
|
2457
|
+
return ze.value.x + 12 + Ke.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
2458
|
+
}), ft = r(() => (ve.value, B.value?.getData() ?? []));
|
|
2459
|
+
function pt(e) {
|
|
2460
|
+
J.value?.setTool(e);
|
|
2457
2461
|
}
|
|
2458
|
-
function
|
|
2462
|
+
function mt() {
|
|
2459
2463
|
de.value?.toggleMenu();
|
|
2460
2464
|
}
|
|
2461
|
-
function
|
|
2462
|
-
let t =
|
|
2463
|
-
!t || !
|
|
2465
|
+
function ht(e) {
|
|
2466
|
+
let t = We.value;
|
|
2467
|
+
!t || !J.value || (J.value.updateDrawingStyle(t.id, e), W.value = J.value.getDrawings());
|
|
2464
2468
|
}
|
|
2465
|
-
function
|
|
2466
|
-
let e =
|
|
2467
|
-
!e || !
|
|
2468
|
-
}
|
|
2469
|
-
function gt(e) {
|
|
2470
|
-
B.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!Y.value?.onPointerDown(e, t) });
|
|
2469
|
+
function gt() {
|
|
2470
|
+
let e = We.value;
|
|
2471
|
+
!e || !J.value || (J.value.removeDrawing(e.id), W.value = J.value.getDrawings());
|
|
2471
2472
|
}
|
|
2472
2473
|
function _t(e) {
|
|
2474
|
+
B.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!J.value?.onPointerDown(e, t) });
|
|
2475
|
+
}
|
|
2476
|
+
function vt(e) {
|
|
2473
2477
|
let t = R.value;
|
|
2474
2478
|
if (t) {
|
|
2475
|
-
let n =
|
|
2479
|
+
let n = Ue(t);
|
|
2476
2480
|
ze.value = {
|
|
2477
2481
|
x: e.clientX - n.left,
|
|
2478
2482
|
y: e.clientY - n.top
|
|
2479
2483
|
};
|
|
2480
2484
|
}
|
|
2481
|
-
B.value?.handlePointerEvent(e, { onPointerMove: (e, t) =>
|
|
2482
|
-
}
|
|
2483
|
-
function vt(e) {
|
|
2484
|
-
B.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!Y.value?.onPointerUp(e, t) });
|
|
2485
|
+
B.value?.handlePointerEvent(e, { onPointerMove: (e, t) => J.value?.onPointerMove(e, t) ? (W.value = J.value.getDrawings(), !0) : !1 });
|
|
2485
2486
|
}
|
|
2486
2487
|
function yt(e) {
|
|
2487
|
-
B.value?.handlePointerEvent(e);
|
|
2488
|
+
B.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!J.value?.onPointerUp(e, t) });
|
|
2488
2489
|
}
|
|
2489
2490
|
function bt(e) {
|
|
2490
2491
|
B.value?.handlePointerEvent(e);
|
|
@@ -2498,17 +2499,20 @@ var Mr = m({
|
|
|
2498
2499
|
function Ct(e) {
|
|
2499
2500
|
B.value?.handlePointerEvent(e);
|
|
2500
2501
|
}
|
|
2501
|
-
function wt() {
|
|
2502
|
+
function wt(e) {
|
|
2503
|
+
B.value?.handlePointerEvent(e);
|
|
2504
|
+
}
|
|
2505
|
+
function Tt() {
|
|
2502
2506
|
B.value?.handleScrollEvent();
|
|
2503
2507
|
}
|
|
2504
|
-
let
|
|
2508
|
+
let Et = w([]), Dt = r(() => {
|
|
2505
2509
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
2506
|
-
for (let n of
|
|
2510
|
+
for (let n of X.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
2507
2511
|
return e;
|
|
2508
|
-
}),
|
|
2509
|
-
function
|
|
2512
|
+
}), Ot = r(() => [...Et.value, ...Dt.value]), Y = w({}), X = w([]);
|
|
2513
|
+
function kt() {
|
|
2510
2514
|
let e = Ce.value.main ?? 3;
|
|
2511
|
-
return
|
|
2515
|
+
return X.value.length === 0 ? [{
|
|
2512
2516
|
id: "main",
|
|
2513
2517
|
ratio: e,
|
|
2514
2518
|
visible: !0,
|
|
@@ -2518,112 +2522,112 @@ var Mr = m({
|
|
|
2518
2522
|
ratio: e,
|
|
2519
2523
|
visible: !0,
|
|
2520
2524
|
role: "price"
|
|
2521
|
-
}, ...
|
|
2525
|
+
}, ...X.value.map((e) => ({
|
|
2522
2526
|
id: e.id,
|
|
2523
2527
|
ratio: Ce.value[e.id] ?? 1,
|
|
2524
2528
|
visible: !0,
|
|
2525
2529
|
role: "indicator"
|
|
2526
2530
|
}))];
|
|
2527
2531
|
}
|
|
2528
|
-
function
|
|
2532
|
+
function At(e) {
|
|
2529
2533
|
if (e === "VOLUME") return {};
|
|
2530
|
-
let t =
|
|
2534
|
+
let t = ge(e);
|
|
2531
2535
|
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
2532
2536
|
}
|
|
2533
|
-
function
|
|
2537
|
+
function jt(e) {
|
|
2534
2538
|
if (e === "VOLUME") return !0;
|
|
2535
|
-
let t =
|
|
2539
|
+
let t = ge(e);
|
|
2536
2540
|
return !!t && t.category !== "main";
|
|
2537
2541
|
}
|
|
2538
2542
|
function Mt(e = "VOLUME", t) {
|
|
2539
|
-
if (
|
|
2540
|
-
let n = t ??
|
|
2543
|
+
if (X.value.length >= Si) return !1;
|
|
2544
|
+
let n = t ?? At(e);
|
|
2541
2545
|
return !!B.value?.addIndicator(e, "sub", n);
|
|
2542
2546
|
}
|
|
2543
2547
|
function Nt(e) {
|
|
2544
2548
|
B.value?.removeIndicator(e);
|
|
2545
2549
|
}
|
|
2546
|
-
function Pt() {
|
|
2547
|
-
for (let e of Z.value) B.value?.removeIndicator(e.id);
|
|
2548
|
-
}
|
|
2549
2550
|
function Ft() {
|
|
2551
|
+
for (let e of X.value) B.value?.removeIndicator(e.id);
|
|
2552
|
+
}
|
|
2553
|
+
function It() {
|
|
2550
2554
|
let e = d.semanticConfig, t = B.value;
|
|
2551
2555
|
if (!e || !t) return;
|
|
2552
2556
|
let n = e.indicators?.main;
|
|
2553
2557
|
if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
|
|
2554
2558
|
}
|
|
2555
|
-
function
|
|
2556
|
-
let n =
|
|
2559
|
+
function Lt(e, t) {
|
|
2560
|
+
let n = At(t);
|
|
2557
2561
|
B.value?.replaceSubPaneIndicator(e, t, n);
|
|
2558
2562
|
}
|
|
2559
|
-
function
|
|
2563
|
+
function Rt(e, t) {
|
|
2560
2564
|
let n = B.value;
|
|
2561
2565
|
if (!n) return;
|
|
2562
|
-
let r =
|
|
2566
|
+
let r = ge(e);
|
|
2563
2567
|
if (r && (r.category === "main" || r.allowMainPane)) {
|
|
2564
|
-
let r =
|
|
2565
|
-
t && !r ? n.addIndicator(e, "main",
|
|
2568
|
+
let r = Et.value.find((t) => t === e);
|
|
2569
|
+
t && !r ? n.addIndicator(e, "main", Y.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
|
|
2566
2570
|
return;
|
|
2567
2571
|
}
|
|
2568
|
-
if (
|
|
2569
|
-
if (
|
|
2570
|
-
if (!n.addIndicator(e, "sub",
|
|
2571
|
-
let t =
|
|
2572
|
-
|
|
2572
|
+
if (jt(e)) if (t) {
|
|
2573
|
+
if (X.value.find((t) => t.indicatorId === e) || X.value.length >= Si) return;
|
|
2574
|
+
if (!n.addIndicator(e, "sub", Y.value[e]) && X.value.length > 0) {
|
|
2575
|
+
let t = X.value[X.value.length - 1];
|
|
2576
|
+
Lt(t.id, e);
|
|
2573
2577
|
}
|
|
2574
|
-
} else
|
|
2578
|
+
} else X.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2575
2579
|
n.removeIndicator(e.id);
|
|
2576
2580
|
});
|
|
2577
2581
|
}
|
|
2578
|
-
function
|
|
2582
|
+
function zt(e, t) {
|
|
2579
2583
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
2580
2584
|
B.value?.updateIndicatorParams(e, t);
|
|
2581
2585
|
return;
|
|
2582
2586
|
}
|
|
2583
|
-
|
|
2587
|
+
jt(e) && X.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2584
2588
|
B.value?.updateIndicatorParams(e.id, t);
|
|
2585
2589
|
});
|
|
2586
2590
|
}
|
|
2587
|
-
function
|
|
2588
|
-
if (!e.length ||
|
|
2589
|
-
let t = e.filter((e) =>
|
|
2591
|
+
function Bt(e) {
|
|
2592
|
+
if (!e.length || X.value.length <= 1) return;
|
|
2593
|
+
let t = e.filter((e) => jt(e));
|
|
2590
2594
|
if (!t.length) return;
|
|
2591
|
-
let n = new Map(
|
|
2595
|
+
let n = new Map(X.value.map((e) => [e.indicatorId, e])), r = [];
|
|
2592
2596
|
for (let e of t) {
|
|
2593
2597
|
let t = n.get(e);
|
|
2594
2598
|
t && (r.push(t), n.delete(e));
|
|
2595
2599
|
}
|
|
2596
2600
|
if (r.length === 0) return;
|
|
2597
|
-
for (let e of
|
|
2598
|
-
let i =
|
|
2601
|
+
for (let e of X.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
|
|
2602
|
+
let i = X.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
2599
2603
|
if (i.join("|") === a.join("|")) return;
|
|
2600
|
-
|
|
2604
|
+
X.value = r;
|
|
2601
2605
|
let o = B.value;
|
|
2602
|
-
o && o.updatePaneLayout(
|
|
2606
|
+
o && o.updatePaneLayout(kt());
|
|
2603
2607
|
}
|
|
2604
|
-
let
|
|
2605
|
-
function
|
|
2608
|
+
let Vt = r(() => d.rightAxisWidth + d.priceLabelWidth), Ht = r(() => (ve.value, Se.value, be.value, xe.value, ye.value, B.value?.getContentWidth() ?? 0));
|
|
2609
|
+
function Ut(e, t) {
|
|
2606
2610
|
B.value?.zoomToLevel(e, t);
|
|
2607
2611
|
}
|
|
2608
2612
|
c({
|
|
2609
|
-
scheduleRender:
|
|
2613
|
+
scheduleRender: Ne,
|
|
2610
2614
|
addSubPane: Mt,
|
|
2611
2615
|
removeSubPane: Nt,
|
|
2612
|
-
switchSubIndicator:
|
|
2613
|
-
clearAllSubPanes:
|
|
2614
|
-
zoomToLevel:
|
|
2615
|
-
zoomIn: (e) =>
|
|
2616
|
-
zoomOut: (e) =>
|
|
2617
|
-
getZoomLevel: () =>
|
|
2616
|
+
switchSubIndicator: Lt,
|
|
2617
|
+
clearAllSubPanes: Ft,
|
|
2618
|
+
zoomToLevel: Ut,
|
|
2619
|
+
zoomIn: (e) => Ut(H.value + 1, e),
|
|
2620
|
+
zoomOut: (e) => Ut(H.value - 1, e),
|
|
2621
|
+
getZoomLevel: () => H.value,
|
|
2618
2622
|
getZoomLevelCount: () => B.value?.getZoomLevelCount() ?? 10,
|
|
2619
2623
|
getController: () => B.value
|
|
2620
2624
|
});
|
|
2621
|
-
function
|
|
2625
|
+
function Wt() {
|
|
2622
2626
|
return (e) => {
|
|
2623
2627
|
e.preventDefault(), B.value?.handleWheelEvent(e);
|
|
2624
2628
|
};
|
|
2625
2629
|
}
|
|
2626
|
-
function
|
|
2630
|
+
function Gt(e, t, n, r) {
|
|
2627
2631
|
return le({
|
|
2628
2632
|
container: e,
|
|
2629
2633
|
data: [],
|
|
@@ -2641,11 +2645,11 @@ var Mr = m({
|
|
|
2641
2645
|
mcp: d.mcp
|
|
2642
2646
|
});
|
|
2643
2647
|
}
|
|
2644
|
-
function
|
|
2648
|
+
function Kt(e) {
|
|
2645
2649
|
let t = e.paneLayout.subscribe(() => {
|
|
2646
|
-
|
|
2650
|
+
He();
|
|
2647
2651
|
let t = R.value && parseInt(getComputedStyle(R.value).borderTopWidth) || 0;
|
|
2648
|
-
|
|
2652
|
+
Ge.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
2649
2653
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
2650
2654
|
return {
|
|
2651
2655
|
id: n.id,
|
|
@@ -2656,19 +2660,19 @@ var Mr = m({
|
|
|
2656
2660
|
Ce.value = { ...e.paneRatios.peek() };
|
|
2657
2661
|
}), r = e.viewport.subscribe(() => {
|
|
2658
2662
|
let t = e.viewport.peek();
|
|
2659
|
-
|
|
2663
|
+
ye.value !== t.dpr && (ye.value = t.dpr), Se.value !== t.plotWidth && (Se.value = t.plotWidth), (H.value !== t.zoomLevel || be.value !== t.kWidth || xe.value !== t.kGap) && (H.value = t.zoomLevel, be.value = t.kWidth, xe.value = t.kGap);
|
|
2660
2664
|
}), i = e.data.subscribe(() => {
|
|
2661
2665
|
let t = e.data.peek();
|
|
2662
|
-
|
|
2666
|
+
V.value = t.length, ve.value++, O.value = t.length === 0;
|
|
2663
2667
|
}), a = e.dataLoading.subscribe(() => {
|
|
2664
2668
|
E.value = e.dataLoading.peek();
|
|
2665
2669
|
}), o = e.theme.subscribe(() => {
|
|
2666
2670
|
let t = e.theme.peek();
|
|
2667
|
-
|
|
2671
|
+
De.value = t, f("themeChange", t);
|
|
2668
2672
|
}), s = e.indicators.subscribe(() => {
|
|
2669
2673
|
let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
|
|
2670
|
-
|
|
2671
|
-
let r = { ...
|
|
2674
|
+
Et.value = n;
|
|
2675
|
+
let r = { ...Y.value };
|
|
2672
2676
|
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
|
|
2673
2677
|
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
2674
2678
|
MA: {
|
|
@@ -2687,93 +2691,93 @@ var Mr = m({
|
|
|
2687
2691
|
enabled: n.includes("ENE"),
|
|
2688
2692
|
params: r.ENE || {}
|
|
2689
2693
|
}
|
|
2690
|
-
} }),
|
|
2694
|
+
} }), Y.value = r;
|
|
2691
2695
|
}), c = e.subPanes.subscribe(() => {
|
|
2692
|
-
let t = e.subPanes.peek(), n = new Set(t.map((e) => e.paneId)), r =
|
|
2696
|
+
let t = e.subPanes.peek(), n = new Set(t.map((e) => e.paneId)), r = X.value.filter((e) => n.has(e.id)), i = new Set(r.map((e) => e.id));
|
|
2693
2697
|
for (let e of t) i.has(e.paneId) || r.push({
|
|
2694
2698
|
id: e.paneId,
|
|
2695
2699
|
indicatorId: e.indicatorId,
|
|
2696
2700
|
params: e.params
|
|
2697
2701
|
});
|
|
2698
|
-
|
|
2699
|
-
let a = { ...
|
|
2702
|
+
X.value = r;
|
|
2703
|
+
let a = { ...Y.value };
|
|
2700
2704
|
for (let e of t) e.params && Object.keys(e.params).length > 0 && (a[e.indicatorId] = { ...e.params });
|
|
2701
|
-
|
|
2705
|
+
Y.value = a;
|
|
2702
2706
|
}), l = e.comparisonColors.subscribe(() => {
|
|
2703
|
-
|
|
2707
|
+
we.value = new Map(e.comparisonColors.peek());
|
|
2704
2708
|
}), u = e.comparisonLoading.subscribe(() => {
|
|
2705
|
-
|
|
2709
|
+
Te.value = e.comparisonLoading.peek();
|
|
2706
2710
|
});
|
|
2707
2711
|
x(() => {
|
|
2708
|
-
r(), i(), a(), n(), t(), o(), s(), c(), l(), u(), K?.removeEventListener("change",
|
|
2712
|
+
r(), i(), a(), n(), t(), o(), s(), c(), l(), u(), K?.removeEventListener("change", Ae);
|
|
2709
2713
|
});
|
|
2710
2714
|
}
|
|
2711
2715
|
function qt(e) {
|
|
2712
2716
|
let t = ue.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
2713
|
-
|
|
2717
|
+
G.value = t, je(e, t.theme), e.updateSettingsFacade(t);
|
|
2714
2718
|
}
|
|
2715
|
-
function
|
|
2716
|
-
|
|
2719
|
+
function Z(e) {
|
|
2720
|
+
J.value = new se(e), J.value.setCallbacks({
|
|
2717
2721
|
onDrawingCreated: (e) => {
|
|
2718
|
-
|
|
2722
|
+
W.value = [...W.value, e], U.value = e.id;
|
|
2719
2723
|
},
|
|
2720
2724
|
onToolChange: () => {},
|
|
2721
2725
|
onDrawingSelected: (e) => {
|
|
2722
|
-
|
|
2726
|
+
U.value = e?.id ?? null;
|
|
2723
2727
|
}
|
|
2724
2728
|
});
|
|
2725
2729
|
}
|
|
2726
|
-
function
|
|
2727
|
-
e.setTooltipAnchorPositioning(
|
|
2728
|
-
|
|
2729
|
-
}),
|
|
2730
|
+
function Yt(e) {
|
|
2731
|
+
e.setTooltipAnchorPositioning(Be.value), e.interactionState.subscribe(() => {
|
|
2732
|
+
q.value = e.interactionState.peek();
|
|
2733
|
+
}), q.value = e.interactionState.peek(), ye.value = e.viewport.peek().dpr;
|
|
2730
2734
|
}
|
|
2731
|
-
function
|
|
2732
|
-
e.setDataFetcher(d.dataFetcher),
|
|
2735
|
+
function Xt(e) {
|
|
2736
|
+
e.setDataFetcher(d.dataFetcher), pe.value = new he(e), pe.value.on("config:error", (e) => {
|
|
2733
2737
|
console.error("Semantic config error:", e);
|
|
2734
|
-
}),
|
|
2735
|
-
|
|
2738
|
+
}), pe.value.on("config:ready", () => {
|
|
2739
|
+
It(), h(() => B.value?.scrollToRight());
|
|
2736
2740
|
});
|
|
2737
2741
|
}
|
|
2738
|
-
return y(() => {
|
|
2739
|
-
|
|
2740
|
-
let e = R.value, t =
|
|
2742
|
+
return y(async () => {
|
|
2743
|
+
Be.value = !1;
|
|
2744
|
+
let e = R.value, t = z.value;
|
|
2741
2745
|
if (!e || !t) return;
|
|
2742
|
-
let n =
|
|
2746
|
+
let n = Wt();
|
|
2743
2747
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
2744
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a =
|
|
2745
|
-
B.value = a,
|
|
2748
|
+
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await Gt(e, r, t.querySelector(".right-axis-host"), i);
|
|
2749
|
+
!R.value || !z.value || (B.value = a, Kt(a), It(), qt(a), Z(a), Yt(a), Xt(a));
|
|
2746
2750
|
}), x(() => {
|
|
2747
2751
|
let e = B.value;
|
|
2748
|
-
e && (B.value = null, e.dispose()),
|
|
2752
|
+
e && (B.value = null, e.dispose()), J.value = null;
|
|
2749
2753
|
}), M(() => d.yPaddingPx, (e) => {
|
|
2750
2754
|
B.value?.updateOptionsFacade({ yPaddingPx: e });
|
|
2751
2755
|
}), M(() => d.semanticConfig, async (e, t) => {
|
|
2752
2756
|
if (e && e !== t) {
|
|
2753
|
-
let t = await
|
|
2757
|
+
let t = await pe.value?.applyConfig(e);
|
|
2754
2758
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
2755
2759
|
}
|
|
2756
2760
|
}, { deep: !0 }), (r, c) => (S(), o("div", {
|
|
2757
2761
|
ref_key: "chartWrapperRef",
|
|
2758
|
-
ref:
|
|
2762
|
+
ref: ie,
|
|
2759
2763
|
class: "chart-wrapper",
|
|
2760
|
-
"data-theme":
|
|
2764
|
+
"data-theme": De.value,
|
|
2761
2765
|
style: _(ke.value)
|
|
2762
2766
|
}, [
|
|
2763
|
-
l(
|
|
2767
|
+
l(_i, {
|
|
2764
2768
|
symbol: b.value,
|
|
2765
2769
|
"k-line-level": p.value,
|
|
2766
2770
|
"k-line-adjust": m.value,
|
|
2767
2771
|
"symbol-loading": E.value,
|
|
2768
2772
|
"symbol-error": O.value,
|
|
2769
2773
|
"overlay-symbols": k.value,
|
|
2770
|
-
"comparison-colors":
|
|
2771
|
-
"comparison-loading":
|
|
2774
|
+
"comparison-colors": we.value,
|
|
2775
|
+
"comparison-loading": Te.value,
|
|
2772
2776
|
onAddOverlaySymbol: F,
|
|
2773
2777
|
onRemoveOverlaySymbol: I,
|
|
2774
2778
|
onKLineLevelChange: j,
|
|
2775
2779
|
onKLineAdjustChange: N,
|
|
2776
|
-
onToggleIndicator:
|
|
2780
|
+
onToggleIndicator: mt,
|
|
2777
2781
|
onSymbolChange: P
|
|
2778
2782
|
}, null, 8, [
|
|
2779
2783
|
"symbol",
|
|
@@ -2786,28 +2790,28 @@ var Mr = m({
|
|
|
2786
2790
|
"comparison-loading"
|
|
2787
2791
|
]),
|
|
2788
2792
|
s("div", { class: g(["chart-stage", {
|
|
2789
|
-
"is-dragging":
|
|
2790
|
-
"is-resizing-pane":
|
|
2791
|
-
"is-hovering-pane-separator":
|
|
2792
|
-
"is-hovering-right-axis":
|
|
2793
|
-
"is-hovering-kline":
|
|
2794
|
-
}]) }, [l(
|
|
2793
|
+
"is-dragging": Xe.value,
|
|
2794
|
+
"is-resizing-pane": Ze.value,
|
|
2795
|
+
"is-hovering-pane-separator": Qe.value,
|
|
2796
|
+
"is-hovering-right-axis": et.value,
|
|
2797
|
+
"is-hovering-kline": tt.value !== null
|
|
2798
|
+
}]) }, [l(kr, {
|
|
2795
2799
|
ref_key: "toolbarRef",
|
|
2796
2800
|
ref: ue,
|
|
2797
2801
|
"is-fullscreen": n.isFullscreen,
|
|
2798
|
-
onSelectTool:
|
|
2802
|
+
onSelectTool: pt,
|
|
2799
2803
|
onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
|
|
2800
|
-
onZoomIn: c[1] ||= (e) =>
|
|
2801
|
-
onZoomOut: c[2] ||= (e) =>
|
|
2804
|
+
onZoomIn: c[1] ||= (e) => Ut(H.value + 1),
|
|
2805
|
+
onZoomOut: c[2] ||= (e) => Ut(H.value - 1),
|
|
2802
2806
|
onSettingsChange: Fe
|
|
2803
2807
|
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
2804
2808
|
class: "chart-main",
|
|
2805
2809
|
ref_key: "chartMainRef",
|
|
2806
|
-
ref:
|
|
2810
|
+
ref: z
|
|
2807
2811
|
}, [
|
|
2808
|
-
s("div",
|
|
2812
|
+
s("div", yi, [(S(!0), o(e, null, T(Ge.value, (e) => (S(), o("div", {
|
|
2809
2813
|
key: e.id,
|
|
2810
|
-
class: g(["pane-separator-line", { "is-active":
|
|
2814
|
+
class: g(["pane-separator-line", { "is-active": $e.value === e.id }]),
|
|
2811
2815
|
style: _({ top: `${e.top}px` })
|
|
2812
2816
|
}, null, 6))), 128))]),
|
|
2813
2817
|
s("div", {
|
|
@@ -2817,48 +2821,48 @@ var Mr = m({
|
|
|
2817
2821
|
}, null, 512),
|
|
2818
2822
|
s("div", {
|
|
2819
2823
|
class: "chart-container",
|
|
2820
|
-
style: _({ cursor:
|
|
2824
|
+
style: _({ cursor: nt.value }),
|
|
2821
2825
|
ref_key: "containerRef",
|
|
2822
2826
|
ref: R,
|
|
2823
|
-
onScrollPassive:
|
|
2824
|
-
onPointerdown:
|
|
2825
|
-
onPointermove:
|
|
2826
|
-
onPointerup:
|
|
2827
|
-
onPointerleave:
|
|
2827
|
+
onScrollPassive: Tt,
|
|
2828
|
+
onPointerdown: _t,
|
|
2829
|
+
onPointermove: vt,
|
|
2830
|
+
onPointerup: yt,
|
|
2831
|
+
onPointerleave: bt
|
|
2828
2832
|
}, [s("div", {
|
|
2829
2833
|
class: "scroll-content",
|
|
2830
|
-
style: _({ width:
|
|
2831
|
-
}, [s("div",
|
|
2834
|
+
style: _({ width: Ht.value + "px" })
|
|
2835
|
+
}, [s("div", bi, [s("canvas", xi, null, 512), We.value ? (S(), i(Me, {
|
|
2832
2836
|
key: 0,
|
|
2833
|
-
drawing:
|
|
2834
|
-
onUpdateStyle:
|
|
2835
|
-
onDelete:
|
|
2837
|
+
drawing: We.value,
|
|
2838
|
+
onUpdateStyle: ht,
|
|
2839
|
+
onDelete: gt
|
|
2836
2840
|
}, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
|
|
2837
2841
|
ce.value ? (S(), i(t, {
|
|
2838
2842
|
key: 0,
|
|
2839
2843
|
to: ce.value
|
|
2840
2844
|
}, [
|
|
2841
|
-
|
|
2845
|
+
rt.value ? (S(), o("div", {
|
|
2842
2846
|
key: 0,
|
|
2843
|
-
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor":
|
|
2844
|
-
style: _(
|
|
2847
|
+
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": Be.value }]),
|
|
2848
|
+
style: _(st.value)
|
|
2845
2849
|
}, null, 6)) : a("", !0),
|
|
2846
|
-
|
|
2850
|
+
Je.value || Ye.value ? (S(), o("div", {
|
|
2847
2851
|
key: 1,
|
|
2848
|
-
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor":
|
|
2849
|
-
style: _(
|
|
2852
|
+
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": Be.value }]),
|
|
2853
|
+
style: _(lt.value)
|
|
2850
2854
|
}, null, 6)) : a("", !0),
|
|
2851
|
-
|
|
2855
|
+
rt.value ? (S(), i(Jt, {
|
|
2852
2856
|
key: 2,
|
|
2853
|
-
k:
|
|
2854
|
-
index:
|
|
2855
|
-
data:
|
|
2856
|
-
pos:
|
|
2857
|
+
k: rt.value,
|
|
2858
|
+
index: it.value,
|
|
2859
|
+
data: ft.value,
|
|
2860
|
+
pos: ot.value,
|
|
2857
2861
|
"set-el": Le,
|
|
2858
|
-
"use-anchor":
|
|
2859
|
-
"anchor-placement":
|
|
2860
|
-
"up-color":
|
|
2861
|
-
"down-color":
|
|
2862
|
+
"use-anchor": Be.value,
|
|
2863
|
+
"anchor-placement": ut.value,
|
|
2864
|
+
"up-color": Oe.value.upColor,
|
|
2865
|
+
"down-color": Oe.value.downColor,
|
|
2862
2866
|
timezone: d.timezone,
|
|
2863
2867
|
"show-time": v.value
|
|
2864
2868
|
}, null, 8, [
|
|
@@ -2873,12 +2877,12 @@ var Mr = m({
|
|
|
2873
2877
|
"timezone",
|
|
2874
2878
|
"show-time"
|
|
2875
2879
|
])) : a("", !0),
|
|
2876
|
-
|
|
2880
|
+
Je.value || Ye.value ? (S(), i(Zt, {
|
|
2877
2881
|
key: 3,
|
|
2878
|
-
marker:
|
|
2879
|
-
pos:
|
|
2880
|
-
"use-anchor":
|
|
2881
|
-
"anchor-placement":
|
|
2882
|
+
marker: Je.value || Ye.value,
|
|
2883
|
+
pos: ct.value,
|
|
2884
|
+
"use-anchor": Be.value,
|
|
2885
|
+
"anchor-placement": dt.value,
|
|
2882
2886
|
"set-el": Re
|
|
2883
2887
|
}, null, 8, [
|
|
2884
2888
|
"marker",
|
|
@@ -2890,27 +2894,27 @@ var Mr = m({
|
|
|
2890
2894
|
s("div", {
|
|
2891
2895
|
class: "right-axis-host",
|
|
2892
2896
|
ref: "rightAxisLayerRef",
|
|
2893
|
-
style: _({ width:
|
|
2894
|
-
onPointerdown:
|
|
2895
|
-
onPointermove:
|
|
2896
|
-
onPointerup:
|
|
2897
|
-
onPointerleave:
|
|
2897
|
+
style: _({ width: Vt.value + "px" }),
|
|
2898
|
+
onPointerdown: xt,
|
|
2899
|
+
onPointermove: St,
|
|
2900
|
+
onPointerup: Ct,
|
|
2901
|
+
onPointerleave: wt
|
|
2898
2902
|
}, null, 36)
|
|
2899
2903
|
], 512)], 2),
|
|
2900
|
-
l(
|
|
2904
|
+
l(Pt, {
|
|
2901
2905
|
ref_key: "indicatorSelectorRef",
|
|
2902
2906
|
ref: de,
|
|
2903
|
-
"active-indicators":
|
|
2904
|
-
"indicator-params":
|
|
2905
|
-
onToggle:
|
|
2906
|
-
onUpdateParams:
|
|
2907
|
-
onReorderSubIndicators:
|
|
2907
|
+
"active-indicators": Ot.value,
|
|
2908
|
+
"indicator-params": Y.value,
|
|
2909
|
+
onToggle: Rt,
|
|
2910
|
+
onUpdateParams: zt,
|
|
2911
|
+
onReorderSubIndicators: Bt
|
|
2908
2912
|
}, null, 8, ["active-indicators", "indicator-params"])
|
|
2909
|
-
], 12,
|
|
2913
|
+
], 12, vi));
|
|
2910
2914
|
}
|
|
2911
|
-
}), [["__scopeId", "data-v-
|
|
2915
|
+
}), [["__scopeId", "data-v-62fe928b"]]), wi = {
|
|
2912
2916
|
name: "@363045841yyt/klinechart",
|
|
2913
|
-
version: "0.8.
|
|
2917
|
+
version: "0.8.4",
|
|
2914
2918
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
2915
2919
|
license: "MIT",
|
|
2916
2920
|
repository: {
|
|
@@ -2983,14 +2987,14 @@ var Mr = m({
|
|
|
2983
2987
|
vitest: "^4.1.8",
|
|
2984
2988
|
vue: "^3.5.35"
|
|
2985
2989
|
}
|
|
2986
|
-
}.version,
|
|
2987
|
-
function
|
|
2988
|
-
|
|
2990
|
+
}.version, Ti = null;
|
|
2991
|
+
function Ei(e) {
|
|
2992
|
+
Ti = e;
|
|
2989
2993
|
}
|
|
2990
|
-
function
|
|
2994
|
+
function Di(e) {
|
|
2991
2995
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
2992
|
-
if (
|
|
2993
|
-
return
|
|
2996
|
+
if (Ti === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
|
|
2997
|
+
return Ti(e);
|
|
2994
2998
|
}
|
|
2995
2999
|
function $(e) {
|
|
2996
3000
|
let t = D(e.peek());
|
|
@@ -2998,27 +3002,35 @@ function $(e) {
|
|
|
2998
3002
|
t.value = e.peek();
|
|
2999
3003
|
})), t;
|
|
3000
3004
|
}
|
|
3001
|
-
function
|
|
3002
|
-
let n = D(null), r = (e) => {
|
|
3003
|
-
e == null || n.value != null
|
|
3005
|
+
function Oi(e, t) {
|
|
3006
|
+
let n = D(null), r = !1, i = (e) => {
|
|
3007
|
+
if (e == null || n.value != null) return;
|
|
3008
|
+
let i = Di({
|
|
3004
3009
|
...t,
|
|
3005
3010
|
container: e
|
|
3006
|
-
}))
|
|
3011
|
+
}), a = (e) => {
|
|
3012
|
+
if (r) {
|
|
3013
|
+
e.dispose();
|
|
3014
|
+
return;
|
|
3015
|
+
}
|
|
3016
|
+
n.value = e;
|
|
3017
|
+
};
|
|
3018
|
+
typeof i.then == "function" ? i.then(a) : a(i);
|
|
3007
3019
|
};
|
|
3008
|
-
|
|
3009
|
-
let
|
|
3010
|
-
|
|
3020
|
+
i(e.value);
|
|
3021
|
+
let a = M(e, (e) => {
|
|
3022
|
+
i(e);
|
|
3011
3023
|
}, {
|
|
3012
3024
|
immediate: !0,
|
|
3013
3025
|
flush: "post"
|
|
3014
|
-
}),
|
|
3015
|
-
|
|
3026
|
+
}), o = () => {
|
|
3027
|
+
r = !0, a();
|
|
3016
3028
|
let e = n.value;
|
|
3017
3029
|
e != null && (e.dispose(), n.value = null);
|
|
3018
3030
|
};
|
|
3019
|
-
return b(
|
|
3031
|
+
return b(o), v(o), { chart: n };
|
|
3020
3032
|
}
|
|
3021
|
-
function
|
|
3033
|
+
function ki(e) {
|
|
3022
3034
|
let t = D(e.indicators.peek());
|
|
3023
3035
|
return b(e.indicators.subscribe(() => {
|
|
3024
3036
|
t.value = e.indicators.peek();
|
|
@@ -3029,25 +3041,25 @@ function Di(e) {
|
|
|
3029
3041
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
3030
3042
|
};
|
|
3031
3043
|
}
|
|
3032
|
-
function
|
|
3044
|
+
function Ai(e) {
|
|
3033
3045
|
let t = D(e.interactionState.peek());
|
|
3034
3046
|
return b(e.interactionState.subscribe(() => {
|
|
3035
3047
|
t.value = e.interactionState.peek();
|
|
3036
3048
|
})), t;
|
|
3037
3049
|
}
|
|
3038
|
-
function
|
|
3050
|
+
function ji(e) {
|
|
3039
3051
|
let t = D(e.paneRatios.peek());
|
|
3040
3052
|
return b(e.paneRatios.subscribe(() => {
|
|
3041
3053
|
t.value = e.paneRatios.peek();
|
|
3042
3054
|
})), t;
|
|
3043
3055
|
}
|
|
3044
|
-
function
|
|
3056
|
+
function Mi(e) {
|
|
3045
3057
|
let t = D(e.viewport.peek());
|
|
3046
3058
|
return b(e.viewport.subscribe(() => {
|
|
3047
3059
|
t.value = e.viewport.peek();
|
|
3048
3060
|
})), t;
|
|
3049
3061
|
}
|
|
3050
|
-
function
|
|
3062
|
+
function Ni(e) {
|
|
3051
3063
|
let t = R({ catalog: e.catalog });
|
|
3052
3064
|
b(() => t.dispose());
|
|
3053
3065
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
@@ -3076,7 +3088,7 @@ function ji(e) {
|
|
|
3076
3088
|
isActive: c
|
|
3077
3089
|
};
|
|
3078
3090
|
}
|
|
3079
|
-
var
|
|
3091
|
+
var Pi = u({
|
|
3080
3092
|
name: "KLineChart",
|
|
3081
3093
|
props: {
|
|
3082
3094
|
data: {
|
|
@@ -3105,31 +3117,36 @@ var Mi = u({
|
|
|
3105
3117
|
zoomLevelChange: (e, t) => !0
|
|
3106
3118
|
},
|
|
3107
3119
|
setup(e, { emit: t, expose: n }) {
|
|
3108
|
-
let r = D(null), i = d(), a = D(null)
|
|
3120
|
+
let r = D(null), i = d(), a = D(null), o = !0, s = (e) => {
|
|
3121
|
+
if (!o) {
|
|
3122
|
+
e.dispose();
|
|
3123
|
+
return;
|
|
3124
|
+
}
|
|
3125
|
+
a.value = e, t("ready", e);
|
|
3126
|
+
let n = () => {
|
|
3127
|
+
let n = e.viewport.peek();
|
|
3128
|
+
t("zoomLevelChange", n.zoomLevel, n.kWidth);
|
|
3129
|
+
};
|
|
3130
|
+
n(), b(e.viewport.subscribe(n));
|
|
3131
|
+
};
|
|
3109
3132
|
y(() => {
|
|
3110
|
-
let
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
container:
|
|
3133
|
+
let t = r.value;
|
|
3134
|
+
t != null && (i.run(() => {
|
|
3135
|
+
let n = Di({
|
|
3136
|
+
container: t,
|
|
3114
3137
|
data: e.data,
|
|
3115
3138
|
initialZoomLevel: e.initialZoomLevel,
|
|
3116
3139
|
zoomLevels: e.zoomLevels,
|
|
3117
3140
|
theme: e.theme
|
|
3118
|
-
})
|
|
3119
|
-
|
|
3120
|
-
let e = a.value, n = () => {
|
|
3121
|
-
let n = e.viewport.peek();
|
|
3122
|
-
t("zoomLevelChange", n.zoomLevel, n.kWidth);
|
|
3123
|
-
};
|
|
3124
|
-
n(), b(e.viewport.subscribe(n));
|
|
3125
|
-
}
|
|
3141
|
+
});
|
|
3142
|
+
typeof n.then == "function" ? n.then(s) : s(n);
|
|
3126
3143
|
}), M(() => e.data, (e) => {
|
|
3127
3144
|
a.value?.setData(e);
|
|
3128
3145
|
}), M(() => e.theme, (e) => {
|
|
3129
3146
|
a.value?.setTheme(e);
|
|
3130
3147
|
}));
|
|
3131
3148
|
}), x(() => {
|
|
3132
|
-
a.value?.dispose(), a.value = null, i.stop();
|
|
3149
|
+
o = !1, a.value?.dispose(), a.value = null, i.stop();
|
|
3133
3150
|
}), n({
|
|
3134
3151
|
getController: () => a.value,
|
|
3135
3152
|
handlePointerEvent: (e, t) => a.value?.handlePointerEvent(e, t) ?? !1,
|
|
@@ -3143,11 +3160,11 @@ var Mi = u({
|
|
|
3143
3160
|
setTheme: (e) => a.value?.setTheme(e),
|
|
3144
3161
|
setData: (e) => a.value?.setData(e)
|
|
3145
3162
|
});
|
|
3146
|
-
let
|
|
3163
|
+
let c = (e) => {
|
|
3147
3164
|
r.value = e ?? null;
|
|
3148
3165
|
};
|
|
3149
3166
|
return () => f("div", {
|
|
3150
|
-
ref:
|
|
3167
|
+
ref: c,
|
|
3151
3168
|
class: ["klinechart-quant-root", e.containerClass].filter(Boolean).join(" "),
|
|
3152
3169
|
style: {
|
|
3153
3170
|
width: "100%",
|
|
@@ -3155,9 +3172,9 @@ var Mi = u({
|
|
|
3155
3172
|
}
|
|
3156
3173
|
});
|
|
3157
3174
|
}
|
|
3158
|
-
}),
|
|
3159
|
-
e.component("KLineChart",
|
|
3175
|
+
}), Fi = { install(e) {
|
|
3176
|
+
e.component("KLineChart", Pi);
|
|
3160
3177
|
} };
|
|
3161
|
-
|
|
3178
|
+
Ei(te);
|
|
3162
3179
|
//#endregion
|
|
3163
|
-
export {
|
|
3180
|
+
export { ee as CORE_VERSION, Me as DrawingStyleToolbar, Ze as IndicatorParams, Pt as IndicatorSelector, Pi as KLineChart, Ci as KLineChartVue, Jt as KLineTooltip, Fi as KMapPlugin, kr as LeftToolbar, Zt as MarkerTooltip, wi as VERSION, Ei as __setControllerFactory, $ as coreSignalToVueRef, Di as createChart, Oi as useChart, Ni as useIndicatorSelector, ki as useIndicators, Ai as useInteractionState, ji as usePaneRatios, Mi as useViewport };
|