@363045841yyt/klinechart 0.8.3 → 0.8.5
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/BatchStockDialog.vue.d.ts +13 -0
- package/dist/components/BatchStockDialog.vue.d.ts.map +1 -0
- package/dist/components/CompareSymbolSelector.vue.d.ts.map +1 -1
- package/dist/components/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/ExportProgressDialog.vue.d.ts +15 -0
- package/dist/components/ExportProgressDialog.vue.d.ts.map +1 -0
- package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
- package/dist/components/KLineChart.vue.d.ts +5 -9
- package/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/components/LeftToolbar.vue.d.ts.map +1 -1
- package/dist/components/SymbolSelector.vue.d.ts.map +1 -1
- package/dist/components/TopToolbar.vue.d.ts.map +1 -1
- package/dist/composables/chart/useChartTheme.d.ts +329 -0
- package/dist/composables/chart/useChartTheme.d.ts.map +1 -0
- package/dist/composables/chart/useDrawingManager.d.ts +86 -0
- package/dist/composables/chart/useDrawingManager.d.ts.map +1 -0
- package/dist/composables/chart/useIndicatorManager.d.ts +38 -0
- package/dist/composables/chart/useIndicatorManager.d.ts.map +1 -0
- package/dist/composables/chart/useRangeSelection.d.ts +65 -0
- package/dist/composables/chart/useRangeSelection.d.ts.map +1 -0
- package/dist/composables/useTeleportedPopup.d.ts +8 -0
- package/dist/composables/useTeleportedPopup.d.ts.map +1 -0
- package/dist/index.cjs +9 -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 +1769 -1090
- package/dist/tools/calcRangeOverlayPixel.d.ts +15 -0
- package/dist/tools/calcRangeOverlayPixel.d.ts.map +1 -0
- package/dist/tools/getKLineIndexByTimestamp.d.ts +4 -0
- package/dist/tools/getKLineIndexByTimestamp.d.ts.map +1 -0
- package/dist/web-component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/BatchStockDialog.vue +293 -0
- package/src/components/CompareSymbolSelector.vue +35 -8
- package/src/components/Dropdown.vue +42 -19
- package/src/components/ExportProgressDialog.vue +226 -0
- package/src/components/IndicatorSelector.vue +13 -5
- package/src/components/KLineChart.vue +329 -399
- package/src/components/LeftToolbar.vue +2 -1
- package/src/components/SymbolSelector.vue +35 -8
- package/src/components/TopToolbar.vue +55 -2
- package/src/composables/chart/useChartTheme.ts +86 -0
- package/src/composables/chart/useDrawingManager.ts +67 -0
- package/src/composables/chart/useIndicatorManager.ts +307 -0
- package/src/composables/chart/useRangeSelection.ts +417 -0
- package/src/composables/useTeleportedPopup.ts +33 -0
- package/src/index.ts +41 -14
- package/src/tools/calcRangeOverlayPixel.ts +28 -0
- package/src/tools/getKLineIndexByTimestamp.ts +40 -0
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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,
|
|
2
|
-
import { COLOR_PRESET_ITEMS as
|
|
3
|
-
import { DrawingInteractionController as
|
|
4
|
-
import { SemanticChartController as
|
|
5
|
-
import { getRegisteredIndicatorDefinition as
|
|
6
|
-
import { DEFAULT_SETTINGS as
|
|
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, isRef as m, markRaw as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E, resolveDynamicComponent as D, shallowRef as O, toDisplayString as k, unref as A, vModelCheckbox as j, vModelText as M, watch as N, withCtx as P, withDirectives as F, withKeys as I, withModifiers as L } from "vue";
|
|
2
|
+
import { COLOR_PRESET_ITEMS as R, VERSION as z, createChartController as ee, createIndicatorSelectorController as te, darkTheme as B, formatTimestamp as V, lightTheme as ne, normalizeColorPresetSettings as H, resolveThemeColors as re, themeToCssVars as ie } from "@363045841yyt/klinechart-core";
|
|
3
|
+
import { DrawingInteractionController as ae, allIndicators as oe, createChartController as se, createIndicatorSelectorController as ce, findIndicator as U, isBuiltinIndicatorsLoaded as le, kGapFromKWidth as ue, loadBuiltinIndicators as de, zoomLevelToKWidth as fe } from "@363045841yyt/klinechart-core/controllers";
|
|
4
|
+
import { SemanticChartController as pe } from "@363045841yyt/klinechart-core/semantic";
|
|
5
|
+
import { getRegisteredIndicatorDefinition as me } from "@363045841yyt/klinechart-core/indicators";
|
|
6
|
+
import { DEFAULT_SETTINGS as W, SETTINGS_STORAGE_KEY as he } from "@363045841yyt/klinechart-core/config";
|
|
7
7
|
//#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var ge = { class: "color-preset-tools" }, _e = {
|
|
9
9
|
class: "theme-tabs",
|
|
10
10
|
role: "tablist",
|
|
11
11
|
"aria-label": "颜色主题"
|
|
12
|
-
},
|
|
12
|
+
}, ve = ["onClick"], ye = { class: "color-group-label" }, be = { class: "color-grid" }, xe = ["value", "onInput"], Se = /*@__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:
|
|
32
|
-
})).filter((e) => e.items.length > 0)), d =
|
|
31
|
+
items: R.filter((t) => t.group === e)
|
|
32
|
+
})).filter((e) => e.items.length > 0)), d = T("light");
|
|
33
33
|
function f(e, t) {
|
|
34
|
-
return (e === "dark" ?
|
|
34
|
+
return (e === "dark" ? B : ne).colors[t];
|
|
35
35
|
}
|
|
36
36
|
function p(e) {
|
|
37
|
-
return
|
|
37
|
+
return H(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
|
|
38
38
|
}
|
|
39
39
|
function m(e, t) {
|
|
40
|
-
let n =
|
|
40
|
+
let n = H(i.colorPresetSettings);
|
|
41
41
|
a("update:colorPresetSettings", {
|
|
42
42
|
...n,
|
|
43
43
|
[d.value]: {
|
|
@@ -47,40 +47,83 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function h() {
|
|
50
|
-
let e = { ...
|
|
50
|
+
let e = { ...H(i.colorPresetSettings) };
|
|
51
51
|
delete e[d.value], a("update:colorPresetSettings", e);
|
|
52
52
|
}
|
|
53
|
-
return (t, n) => (
|
|
53
|
+
return (t, n) => (C(), o("div", null, [s("div", ge, [s("div", _e, [(C(), o(e, null, E(c, (e) => s("button", {
|
|
54
54
|
key: e.value,
|
|
55
55
|
type: "button",
|
|
56
|
-
class:
|
|
56
|
+
class: _(["theme-tab", { active: d.value === e.value }]),
|
|
57
57
|
onClick: (t) => d.value = e.value
|
|
58
|
-
},
|
|
58
|
+
}, k(e.label), 11, ve)), 64))]), s("button", {
|
|
59
59
|
type: "button",
|
|
60
60
|
class: "color-reset-btn",
|
|
61
61
|
onClick: h
|
|
62
|
-
}, " 重置颜色 ")]), (
|
|
62
|
+
}, " 重置颜色 ")]), (C(!0), o(e, null, E(u.value, (t) => (C(), o(e, { key: t.group }, [s("div", ye, k(t.label), 1), s("div", be, [(C(!0), o(e, null, E(t.items, (e) => (C(), o("label", {
|
|
63
63
|
key: e.key,
|
|
64
64
|
class: "color-item"
|
|
65
|
-
}, [s("span", null,
|
|
65
|
+
}, [s("span", null, k(e.label), 1), s("input", {
|
|
66
66
|
type: "color",
|
|
67
67
|
class: "color-input",
|
|
68
68
|
value: p(e.key),
|
|
69
69
|
onInput: (t) => m(e.key, t.target.value)
|
|
70
70
|
}, null, 40, xe)]))), 128))])], 64))), 128))]));
|
|
71
71
|
}
|
|
72
|
-
}),
|
|
72
|
+
}), G = (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
|
+
}, K = /*#__PURE__*/ G(Se, [["__scopeId", "data-v-a52947a4"]]);
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/composables/useTeleportedPopup.ts
|
|
79
|
+
function q(e, t, n = 4) {
|
|
80
|
+
let r = T({});
|
|
81
|
+
function i() {
|
|
82
|
+
let t = e.value;
|
|
83
|
+
if (!t) return;
|
|
84
|
+
let i = t.getBoundingClientRect();
|
|
85
|
+
r.value = {
|
|
86
|
+
position: "fixed",
|
|
87
|
+
top: `${i.bottom + n}px`,
|
|
88
|
+
left: `${i.left}px`
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function a() {
|
|
92
|
+
i(), document.addEventListener("scroll", i, {
|
|
93
|
+
capture: !0,
|
|
94
|
+
passive: !0
|
|
95
|
+
}), window.addEventListener("resize", i, { passive: !0 });
|
|
96
|
+
}
|
|
97
|
+
function o() {
|
|
98
|
+
document.removeEventListener("scroll", i, { capture: !0 }), window.removeEventListener("resize", i);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
popupStyle: r,
|
|
102
|
+
updatePosition: i,
|
|
103
|
+
startPositionSync: a,
|
|
104
|
+
stopPositionSync: o
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/composables/useFullscreenTeleportTarget.ts
|
|
109
|
+
var Ce = Symbol("fullscreen-teleport-target");
|
|
110
|
+
function we(e) {
|
|
111
|
+
w(Ce, e);
|
|
112
|
+
}
|
|
113
|
+
function J() {
|
|
114
|
+
let e = p(Ce, null);
|
|
115
|
+
return r(() => e?.value ?? "body");
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/components/Dropdown.vue?vue&type=script&setup=true&lang.ts
|
|
119
|
+
var Te = [
|
|
77
120
|
"title",
|
|
78
121
|
"aria-expanded",
|
|
79
122
|
"onKeydown"
|
|
80
|
-
],
|
|
123
|
+
], Ee = {
|
|
81
124
|
key: 0,
|
|
82
125
|
class: "dropdown__label"
|
|
83
|
-
},
|
|
126
|
+
}, De = { class: "dropdown__value" }, Oe = ["aria-selected", "onClick"], ke = 0, Ae = null, je = 0, Y = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
84
127
|
__name: "Dropdown",
|
|
85
128
|
props: {
|
|
86
129
|
modelValue: {},
|
|
@@ -91,77 +134,83 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
91
134
|
title: { default: "" }
|
|
92
135
|
},
|
|
93
136
|
emits: ["update:modelValue"],
|
|
94
|
-
setup(
|
|
95
|
-
let
|
|
96
|
-
if (!
|
|
97
|
-
let e =
|
|
98
|
-
return {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
137
|
+
setup(n, { emit: c }) {
|
|
138
|
+
let l = n, u = c, d = T(null), f = T(null), p = T(null), m = T(!1), h = T(0), g = ++je, b = J(), { popupStyle: x, startPositionSync: S, stopPositionSync: w } = q(f, p, 4), D = r(() => l.minWidth ? { minWidth: l.minWidth } : {}), O = r(() => {
|
|
139
|
+
if (!m.value) return;
|
|
140
|
+
let e = h.value || (l.minWidth ? parseInt(l.minWidth) : 0);
|
|
141
|
+
return {
|
|
142
|
+
width: e ? `${e}px` : void 0,
|
|
143
|
+
zIndex: 1010,
|
|
144
|
+
...x.value
|
|
145
|
+
};
|
|
146
|
+
}), j = r(() => {
|
|
147
|
+
let e = l.modelValue?.trim();
|
|
148
|
+
return e && l.options.some((t) => t.value === e) ? e : l.options[0]?.value ?? "";
|
|
149
|
+
}), M = r(() => l.options.find((e) => e.value === j.value) ?? l.options[0]);
|
|
150
|
+
function N() {
|
|
151
|
+
ke !== g && Ae && Ae(), !m.value && (ke = g, Ae = P, h.value = f.value?.offsetWidth ?? 0, m.value = !0, S(), document.addEventListener("pointerdown", z));
|
|
105
152
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
153
|
+
function P() {
|
|
154
|
+
m.value && (m.value = !1, ke === g && (ke = 0, Ae = null), w(), document.removeEventListener("pointerdown", z));
|
|
108
155
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
156
|
+
function F() {
|
|
157
|
+
m.value ? P() : N();
|
|
111
158
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
159
|
+
function R(e) {
|
|
160
|
+
u("update:modelValue", e), P();
|
|
114
161
|
}
|
|
115
|
-
function
|
|
116
|
-
let t =
|
|
117
|
-
t && !t.contains(e.target) &&
|
|
162
|
+
function z(e) {
|
|
163
|
+
let t = d.value, n = p.value;
|
|
164
|
+
t && !t.contains(e.target) && !n?.contains(e.target) && P();
|
|
118
165
|
}
|
|
119
|
-
return
|
|
166
|
+
return y(P), (r, c) => (C(), o("div", {
|
|
120
167
|
ref_key: "rootRef",
|
|
121
|
-
ref:
|
|
122
|
-
class:
|
|
168
|
+
ref: d,
|
|
169
|
+
class: _(["dropdown", [`dropdown--${n.size}`, { "is-open": m.value }]])
|
|
123
170
|
}, [s("button", {
|
|
124
171
|
ref_key: "triggerRef",
|
|
125
|
-
ref:
|
|
172
|
+
ref: f,
|
|
126
173
|
type: "button",
|
|
127
174
|
class: "dropdown__trigger",
|
|
128
|
-
title:
|
|
129
|
-
style:
|
|
175
|
+
title: n.title,
|
|
176
|
+
style: v(D.value),
|
|
130
177
|
"aria-haspopup": "listbox",
|
|
131
|
-
"aria-expanded":
|
|
132
|
-
onClick:
|
|
178
|
+
"aria-expanded": m.value,
|
|
179
|
+
onClick: F,
|
|
133
180
|
onKeydown: [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
181
|
+
I(L(P, ["stop"]), ["escape"]),
|
|
182
|
+
I(L(N, ["prevent"]), ["down"]),
|
|
183
|
+
I(L(F, ["prevent"]), ["enter"]),
|
|
184
|
+
I(L(F, ["prevent"]), ["space"])
|
|
138
185
|
]
|
|
139
186
|
}, [
|
|
140
|
-
|
|
141
|
-
s("span",
|
|
142
|
-
|
|
187
|
+
n.label ? (C(), o("span", Ee, k(n.label), 1)) : a("", !0),
|
|
188
|
+
s("span", De, k(M.value.label), 1),
|
|
189
|
+
c[0] ||= s("span", {
|
|
143
190
|
class: "dropdown__chevron",
|
|
144
191
|
"aria-hidden": "true"
|
|
145
192
|
}, null, -1)
|
|
146
|
-
], 44,
|
|
193
|
+
], 44, Te), (C(), i(t, { to: A(b) }, [m.value ? (C(), o("div", {
|
|
147
194
|
key: 0,
|
|
195
|
+
ref_key: "menuRef",
|
|
196
|
+
ref: p,
|
|
148
197
|
class: "dropdown__menu",
|
|
149
|
-
style:
|
|
198
|
+
style: v(O.value),
|
|
150
199
|
role: "listbox",
|
|
151
200
|
tabindex: "-1"
|
|
152
|
-
}, [(
|
|
201
|
+
}, [(C(!0), o(e, null, E(n.options, (e) => (C(), o("button", {
|
|
153
202
|
key: e.value,
|
|
154
203
|
type: "button",
|
|
155
|
-
class:
|
|
204
|
+
class: _(["dropdown__option", { "is-selected": e.value === j.value }]),
|
|
156
205
|
role: "option",
|
|
157
|
-
"aria-selected": e.value ===
|
|
158
|
-
onClick: (t) =>
|
|
159
|
-
},
|
|
206
|
+
"aria-selected": e.value === j.value,
|
|
207
|
+
onClick: (t) => R(e.value)
|
|
208
|
+
}, k(e.label), 11, Oe))), 128))], 4)) : a("", !0)], 8, ["to"]))], 2));
|
|
160
209
|
}
|
|
161
|
-
}), [["__scopeId", "data-v-
|
|
210
|
+
}), [["__scopeId", "data-v-bab778b8"]]), Me = {
|
|
162
211
|
class: "toolbar-item color-item",
|
|
163
212
|
title: "颜色"
|
|
164
|
-
},
|
|
213
|
+
}, Ne = ["value"], Pe = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
165
214
|
__name: "DrawingStyleToolbar",
|
|
166
215
|
props: { drawing: {} },
|
|
167
216
|
emits: ["updateStyle", "delete"],
|
|
@@ -200,7 +249,7 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
200
249
|
function a(e) {
|
|
201
250
|
e.key === "Delete" && (e.preventDefault(), i("delete"));
|
|
202
251
|
}
|
|
203
|
-
|
|
252
|
+
b(() => document.addEventListener("keydown", a)), S(() => document.removeEventListener("keydown", a));
|
|
204
253
|
function c(e) {
|
|
205
254
|
i("updateStyle", { stroke: e });
|
|
206
255
|
}
|
|
@@ -210,29 +259,29 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
210
259
|
function d(e) {
|
|
211
260
|
i("updateStyle", { strokeStyle: e });
|
|
212
261
|
}
|
|
213
|
-
return (t, i) => (
|
|
262
|
+
return (t, i) => (C(), o("div", {
|
|
214
263
|
class: "drawing-style-toolbar",
|
|
215
|
-
onPointerdown: i[4] ||=
|
|
216
|
-
onPointermove: i[5] ||=
|
|
217
|
-
onPointerup: i[6] ||=
|
|
264
|
+
onPointerdown: i[4] ||= L(() => {}, ["stop"]),
|
|
265
|
+
onPointermove: i[5] ||= L(() => {}, ["stop"]),
|
|
266
|
+
onPointerup: i[6] ||= L(() => {}, ["stop"])
|
|
218
267
|
}, [
|
|
219
|
-
s("div",
|
|
268
|
+
s("div", Me, [s("span", {
|
|
220
269
|
class: "color-swatch",
|
|
221
|
-
style:
|
|
270
|
+
style: v({ background: e.drawing.style.stroke ?? "#2962ff" })
|
|
222
271
|
}, null, 4), s("input", {
|
|
223
272
|
type: "color",
|
|
224
273
|
class: "color-input",
|
|
225
274
|
value: e.drawing.style.stroke ?? "#2962ff",
|
|
226
275
|
onInput: i[0] ||= (e) => c(e.target.value)
|
|
227
|
-
}, null, 40,
|
|
228
|
-
l(
|
|
276
|
+
}, null, 40, Ne)]),
|
|
277
|
+
l(Y, {
|
|
229
278
|
"model-value": String(e.drawing.style.strokeWidth ?? 1),
|
|
230
279
|
options: n,
|
|
231
280
|
size: "sm",
|
|
232
281
|
title: "线宽",
|
|
233
282
|
"onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
|
|
234
283
|
}, null, 8, ["model-value"]),
|
|
235
|
-
l(
|
|
284
|
+
l(Y, {
|
|
236
285
|
"model-value": e.drawing.style.strokeStyle ?? "solid",
|
|
237
286
|
options: r,
|
|
238
287
|
size: "sm",
|
|
@@ -260,32 +309,22 @@ var _e = { class: "color-preset-tools" }, ve = {
|
|
|
260
309
|
], -1)]])
|
|
261
310
|
], 32));
|
|
262
311
|
}
|
|
263
|
-
}), [["__scopeId", "data-v-e9b6a8a9"]]),
|
|
264
|
-
function Me(e) {
|
|
265
|
-
C(je, e);
|
|
266
|
-
}
|
|
267
|
-
function Ne() {
|
|
268
|
-
let e = p(je, null);
|
|
269
|
-
return r(() => e?.value ?? "body");
|
|
270
|
-
}
|
|
271
|
-
//#endregion
|
|
272
|
-
//#region src/components/IndicatorParams.vue?vue&type=script&setup=true&lang.ts
|
|
273
|
-
var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class: "params-title" }, Le = { class: "header-right" }, Re = {
|
|
312
|
+
}), [["__scopeId", "data-v-e9b6a8a9"]]), Fe = { class: "params-header" }, Ie = { class: "header-left" }, Le = { class: "params-title" }, Re = { class: "header-right" }, ze = {
|
|
274
313
|
key: 0,
|
|
275
314
|
class: "indicator-description"
|
|
276
|
-
},
|
|
315
|
+
}, Be = { class: "params-body" }, Ve = { class: "param-header" }, He = { class: "param-label" }, Ue = { class: "param-label-text" }, We = {
|
|
277
316
|
key: 0,
|
|
278
317
|
class: "param-range"
|
|
279
|
-
},
|
|
318
|
+
}, Ge = { class: "input-wrapper" }, Ke = ["disabled", "onClick"], qe = [
|
|
280
319
|
"value",
|
|
281
320
|
"min",
|
|
282
321
|
"max",
|
|
283
322
|
"step",
|
|
284
323
|
"onInput"
|
|
285
|
-
],
|
|
324
|
+
], Je = ["disabled", "onClick"], Ye = {
|
|
286
325
|
key: 0,
|
|
287
326
|
class: "param-description"
|
|
288
|
-
},
|
|
327
|
+
}, Xe = { class: "params-footer" }, Ze = { class: "footer-right" }, Qe = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
289
328
|
__name: "IndicatorParams",
|
|
290
329
|
props: {
|
|
291
330
|
visible: { type: Boolean },
|
|
@@ -297,16 +336,16 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
297
336
|
},
|
|
298
337
|
emits: ["close", "confirm"],
|
|
299
338
|
setup(r, { emit: u }) {
|
|
300
|
-
let d = r, f = u, p =
|
|
301
|
-
|
|
339
|
+
let d = r, f = u, p = T({ ...d.values }), m = T(!0), h = J();
|
|
340
|
+
N(() => d.values, (e) => {
|
|
302
341
|
p.value = { ...e };
|
|
303
342
|
}, {
|
|
304
343
|
deep: !0,
|
|
305
344
|
immediate: !0
|
|
306
|
-
}),
|
|
345
|
+
}), N(() => d.visible, (e) => {
|
|
307
346
|
e && (p.value = { ...d.values });
|
|
308
347
|
});
|
|
309
|
-
function
|
|
348
|
+
function g(e, t) {
|
|
310
349
|
let n = t.target, r = parseFloat(n.value);
|
|
311
350
|
isNaN(r) || (p.value[e] = r);
|
|
312
351
|
}
|
|
@@ -323,18 +362,18 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
323
362
|
function b() {
|
|
324
363
|
f("confirm", { ...p.value });
|
|
325
364
|
}
|
|
326
|
-
return (u, d) => (
|
|
327
|
-
default:
|
|
365
|
+
return (u, d) => (C(), i(t, { to: A(h) }, [l(n, { name: "overlay" }, {
|
|
366
|
+
default: P(() => [r.visible ? (C(), o("div", {
|
|
328
367
|
key: 0,
|
|
329
368
|
class: "params-overlay",
|
|
330
369
|
onClick: d[4] ||= (e) => u.$emit("close")
|
|
331
370
|
}, [l(n, { name: "modal" }, {
|
|
332
|
-
default:
|
|
371
|
+
default: P(() => [s("div", {
|
|
333
372
|
class: "indicator-params",
|
|
334
|
-
onClick: d[3] ||=
|
|
373
|
+
onClick: d[3] ||= L(() => {}, ["stop"])
|
|
335
374
|
}, [
|
|
336
|
-
s("div",
|
|
337
|
-
class:
|
|
375
|
+
s("div", Fe, [s("div", Ie, [s("span", Le, k(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Re, [s("button", {
|
|
376
|
+
class: _(["toggle-desc-btn", { active: m.value }]),
|
|
338
377
|
onClick: d[0] ||= (e) => m.value = !m.value,
|
|
339
378
|
title: "显示/隐藏说明"
|
|
340
379
|
}, [...d[6] ||= [s("svg", { viewBox: "0 0 1024 1024" }, [s("path", {
|
|
@@ -350,19 +389,19 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
350
389
|
"stroke-width": "2"
|
|
351
390
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
352
391
|
l(n, { name: "slide" }, {
|
|
353
|
-
default:
|
|
392
|
+
default: P(() => [m.value && r.indicatorDescription ? (C(), o("div", ze, [s("p", null, k(r.indicatorDescription), 1)])) : a("", !0)]),
|
|
354
393
|
_: 1
|
|
355
394
|
}),
|
|
356
|
-
s("div",
|
|
395
|
+
s("div", Be, [(C(!0), o(e, null, E(r.params, (e) => (C(), o("div", {
|
|
357
396
|
key: e.key,
|
|
358
|
-
class:
|
|
359
|
-
}, [s("div",
|
|
397
|
+
class: _(["param-item", { "has-desc": m.value && e.description }])
|
|
398
|
+
}, [s("div", Ve, [s("label", He, [s("span", Ue, k(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (C(), o("span", We, k(e.min ?? "-∞") + " ~ " + k(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Ge, [
|
|
360
399
|
s("button", {
|
|
361
400
|
class: "stepper-btn",
|
|
362
401
|
disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
|
|
363
402
|
onClick: (t) => v(e, -1)
|
|
364
|
-
}, " − ", 8,
|
|
365
|
-
e.type === "number" ? (
|
|
403
|
+
}, " − ", 8, Ke),
|
|
404
|
+
e.type === "number" ? (C(), o("input", {
|
|
366
405
|
key: 0,
|
|
367
406
|
type: "number",
|
|
368
407
|
class: "param-input",
|
|
@@ -370,18 +409,18 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
370
409
|
min: e.min,
|
|
371
410
|
max: e.max,
|
|
372
411
|
step: e.step || 1,
|
|
373
|
-
onInput: (t) =>
|
|
374
|
-
}, null, 40,
|
|
412
|
+
onInput: (t) => g(e.key, t)
|
|
413
|
+
}, null, 40, qe)) : a("", !0),
|
|
375
414
|
s("button", {
|
|
376
415
|
class: "stepper-btn",
|
|
377
416
|
disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
|
|
378
417
|
onClick: (t) => v(e, 1)
|
|
379
|
-
}, " + ", 8,
|
|
418
|
+
}, " + ", 8, Je)
|
|
380
419
|
])]), l(n, { name: "slide" }, {
|
|
381
|
-
default:
|
|
420
|
+
default: P(() => [m.value && e.description ? (C(), o("div", Ye, k(e.description), 1)) : a("", !0)]),
|
|
382
421
|
_: 2
|
|
383
422
|
}, 1024)], 2))), 128))]),
|
|
384
|
-
s("div",
|
|
423
|
+
s("div", Xe, [s("button", {
|
|
385
424
|
class: "params-btn reset",
|
|
386
425
|
onClick: y
|
|
387
426
|
}, [...d[8] ||= [s("svg", {
|
|
@@ -389,7 +428,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
389
428
|
fill: "none",
|
|
390
429
|
stroke: "currentColor",
|
|
391
430
|
"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",
|
|
431
|
+
}, [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", Ze, [s("button", {
|
|
393
432
|
class: "params-btn cancel",
|
|
394
433
|
onClick: d[2] ||= (e) => u.$emit("close")
|
|
395
434
|
}, "取消"), s("button", {
|
|
@@ -407,31 +446,31 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
407
446
|
_: 1
|
|
408
447
|
})], 8, ["to"]));
|
|
409
448
|
}
|
|
410
|
-
}), [["__scopeId", "data-v-30f2f611"]]),
|
|
449
|
+
}), [["__scopeId", "data-v-30f2f611"]]), $e = { class: "indicator-selector" }, et = { class: "modal-header" }, tt = { class: "header-title" }, nt = { class: "title-sub" }, rt = { class: "header-actions" }, it = {
|
|
411
450
|
key: 0,
|
|
412
451
|
viewBox: "0 0 24 24",
|
|
413
452
|
width: "16",
|
|
414
453
|
height: "16",
|
|
415
454
|
fill: "currentColor"
|
|
416
|
-
},
|
|
455
|
+
}, at = {
|
|
417
456
|
key: 1,
|
|
418
457
|
viewBox: "0 0 24 24",
|
|
419
458
|
width: "16",
|
|
420
459
|
height: "16",
|
|
421
460
|
fill: "currentColor"
|
|
422
|
-
},
|
|
461
|
+
}, ot = { class: "modal-search-area" }, st = { class: "search-box" }, ct = ["value"], lt = { class: "modal-body" }, ut = {
|
|
423
462
|
key: 0,
|
|
424
463
|
class: "indicator-section"
|
|
425
|
-
},
|
|
464
|
+
}, dt = { class: "section-header" }, ft = { class: "section-count" }, pt = ["onClick"], mt = { class: "card-label" }, ht = { class: "card-tooltip" }, gt = { class: "card-header" }, _t = { class: "card-label" }, vt = { class: "card-header-actions" }, yt = ["onClick"], bt = { class: "card-name" }, xt = {
|
|
426
465
|
key: 1,
|
|
427
466
|
class: "section-divider"
|
|
428
|
-
},
|
|
467
|
+
}, St = {
|
|
429
468
|
key: 2,
|
|
430
469
|
class: "no-results"
|
|
431
|
-
},
|
|
470
|
+
}, Ct = {
|
|
432
471
|
key: 3,
|
|
433
472
|
class: "indicator-section"
|
|
434
|
-
},
|
|
473
|
+
}, wt = { class: "section-header" }, Tt = { class: "section-count" }, Et = ["onClick"], Dt = { class: "card-label" }, Ot = { class: "card-tooltip" }, kt = { class: "card-header" }, At = { class: "card-label" }, jt = { class: "card-header-actions" }, X = ["onClick"], Mt = { class: "card-name" }, Nt = { class: "modal-footer" }, Pt = { class: "footer-info" }, Ft = { class: "info-text" }, It = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
435
474
|
__name: "IndicatorSelector",
|
|
436
475
|
props: {
|
|
437
476
|
activeIndicators: {},
|
|
@@ -462,21 +501,25 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
462
501
|
}))
|
|
463
502
|
}));
|
|
464
503
|
}
|
|
465
|
-
let h =
|
|
466
|
-
|
|
504
|
+
let h = ce(), g = $(h.menuOpen), v = $(h.searchQuery), y = $(h.filteredMain), x = $(h.filteredSub), w = r(() => y.value.length > 0 || x.value.length > 0), D = $(h.catalog), O = r(() => D.value.length);
|
|
505
|
+
b(async () => {
|
|
506
|
+
le() || await de(), h.catalog.set(m(oe()));
|
|
507
|
+
});
|
|
508
|
+
let j = T(!1), M = T(null), N = T(!1), F = J(), I = r(() => M.value ? U(M.value) : null), R = r(() => f.activeIndicators?.length ?? 0);
|
|
509
|
+
function z(e) {
|
|
467
510
|
return f.activeIndicators?.includes(e) ?? !1;
|
|
468
511
|
}
|
|
469
|
-
function
|
|
470
|
-
|
|
512
|
+
function ee(e) {
|
|
513
|
+
z(e) || U(e) && p("toggle", e, !0);
|
|
471
514
|
}
|
|
472
|
-
function
|
|
515
|
+
function te(e) {
|
|
473
516
|
p("toggle", e, !1);
|
|
474
517
|
}
|
|
475
|
-
function
|
|
476
|
-
|
|
518
|
+
function B(e) {
|
|
519
|
+
M.value = e, j.value = !0;
|
|
477
520
|
}
|
|
478
|
-
function
|
|
479
|
-
let t =
|
|
521
|
+
function V(e) {
|
|
522
|
+
let t = U(e);
|
|
480
523
|
if (!t?.params) return {};
|
|
481
524
|
let n = {};
|
|
482
525
|
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
@@ -484,38 +527,38 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
484
527
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
485
528
|
return i;
|
|
486
529
|
}
|
|
487
|
-
function
|
|
488
|
-
|
|
530
|
+
function ne(e) {
|
|
531
|
+
M.value && p("updateParams", M.value, e), j.value = !1;
|
|
489
532
|
}
|
|
490
|
-
function
|
|
533
|
+
function H(e) {
|
|
491
534
|
e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
|
|
492
535
|
}
|
|
493
|
-
return
|
|
494
|
-
document.addEventListener("keydown",
|
|
495
|
-
}),
|
|
496
|
-
document.removeEventListener("keydown",
|
|
536
|
+
return b(() => {
|
|
537
|
+
document.addEventListener("keydown", H);
|
|
538
|
+
}), S(() => {
|
|
539
|
+
document.removeEventListener("keydown", H);
|
|
497
540
|
}), u({
|
|
498
541
|
openMenu: () => h.openMenu(),
|
|
499
542
|
closeMenu: () => h.closeMenu(),
|
|
500
543
|
toggleMenu: () => h.toggleMenu()
|
|
501
|
-
}), (r, c) => (
|
|
502
|
-
default:
|
|
544
|
+
}), (r, c) => (C(), o("div", $e, [(C(), i(t, { to: A(F) }, [l(n, { name: "overlay" }, {
|
|
545
|
+
default: P(() => [A(g) ? (C(), o("div", {
|
|
503
546
|
key: 0,
|
|
504
547
|
class: "selector-overlay",
|
|
505
|
-
onClick: c[5] ||= (e) =>
|
|
548
|
+
onClick: c[5] ||= (e) => A(h).closeMenu()
|
|
506
549
|
}, [l(n, { name: "modal" }, {
|
|
507
|
-
default:
|
|
550
|
+
default: P(() => [A(g) ? (C(), o("div", {
|
|
508
551
|
key: 0,
|
|
509
552
|
class: "selector-modal",
|
|
510
|
-
onClick: c[4] ||=
|
|
553
|
+
onClick: c[4] ||= L(() => {}, ["stop"])
|
|
511
554
|
}, [
|
|
512
|
-
s("div",
|
|
513
|
-
class:
|
|
514
|
-
onClick: c[0] ||= (e) =>
|
|
555
|
+
s("div", et, [s("div", tt, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", nt, k(O.value) + " 个可用指标", 1)]), s("div", rt, [s("button", {
|
|
556
|
+
class: _(["view-toggle-btn", { active: N.value }]),
|
|
557
|
+
onClick: c[0] ||= (e) => N.value = !N.value,
|
|
515
558
|
title: "简洁模式"
|
|
516
|
-
}, [
|
|
559
|
+
}, [N.value ? (C(), o("svg", at, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (C(), o("svg", it, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
|
|
517
560
|
class: "modal-close",
|
|
518
|
-
onClick: c[1] ||= (e) =>
|
|
561
|
+
onClick: c[1] ||= (e) => A(h).closeMenu(),
|
|
519
562
|
title: "关闭"
|
|
520
563
|
}, [...c[10] ||= [s("svg", {
|
|
521
564
|
viewBox: "0 0 24 24",
|
|
@@ -523,40 +566,40 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
523
566
|
height: "14",
|
|
524
567
|
fill: "currentColor"
|
|
525
568
|
}, [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",
|
|
569
|
+
s("div", ot, [s("div", st, [c[11] ||= s("svg", {
|
|
527
570
|
class: "search-icon",
|
|
528
571
|
viewBox: "0 0 24 24",
|
|
529
572
|
width: "16",
|
|
530
573
|
height: "16",
|
|
531
574
|
fill: "currentColor"
|
|
532
575
|
}, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1), s("input", {
|
|
533
|
-
value:
|
|
534
|
-
onInput: c[2] ||= (e) =>
|
|
576
|
+
value: A(v),
|
|
577
|
+
onInput: c[2] ||= (e) => A(h).setSearchQuery(e.target.value),
|
|
535
578
|
type: "text",
|
|
536
579
|
class: "search-input",
|
|
537
580
|
placeholder: "搜索指标名称..."
|
|
538
|
-
}, null, 40,
|
|
539
|
-
s("div",
|
|
540
|
-
|
|
581
|
+
}, null, 40, ct)])]),
|
|
582
|
+
s("div", lt, [
|
|
583
|
+
A(y).length > 0 ? (C(), o("div", ut, [s("div", dt, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ft, k(A(y).length), 1)]), s("div", { class: _(["indicator-grid", { compact: N.value }]) }, [(C(!0), o(e, null, E(A(y), (t) => (C(), o("button", {
|
|
541
584
|
key: t.id,
|
|
542
|
-
class:
|
|
543
|
-
active:
|
|
544
|
-
compact:
|
|
585
|
+
class: _(["indicator-card", {
|
|
586
|
+
active: z(t.id),
|
|
587
|
+
compact: N.value
|
|
545
588
|
}]),
|
|
546
|
-
onClick: (e) =>
|
|
547
|
-
}, [
|
|
589
|
+
onClick: (e) => z(t.id) ? te(t.id) : ee(t.id)
|
|
590
|
+
}, [N.value ? (C(), o(e, { key: 0 }, [s("span", mt, k(t.label), 1), s("span", ht, k(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", gt, [s("span", _t, k(t.label), 1), s("div", vt, [t.params?.length ? (C(), o("button", {
|
|
548
591
|
key: 0,
|
|
549
592
|
class: "card-settings-btn",
|
|
550
|
-
onClick:
|
|
593
|
+
onClick: L((e) => B(t.id), ["stop"]),
|
|
551
594
|
title: "编辑参数"
|
|
552
595
|
}, [...c[13] ||= [s("svg", {
|
|
553
596
|
viewBox: "0 0 24 24",
|
|
554
597
|
width: "14",
|
|
555
598
|
height: "14",
|
|
556
599
|
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
|
-
|
|
559
|
-
!
|
|
600
|
+
}, [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, yt)) : a("", !0)])]), s("div", bt, k(t.name), 1)], 64))], 10, pt))), 128))], 2)])) : a("", !0),
|
|
601
|
+
A(y).length > 0 && A(x).length > 0 ? (C(), o("div", xt)) : a("", !0),
|
|
602
|
+
!w.value && A(v).trim() ? (C(), o("div", St, [...c[14] ||= [
|
|
560
603
|
s("svg", {
|
|
561
604
|
viewBox: "0 0 24 24",
|
|
562
605
|
width: "48",
|
|
@@ -566,43 +609,43 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
566
609
|
s("p", null, "未找到匹配的指标", -1),
|
|
567
610
|
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
568
611
|
]])) : a("", !0),
|
|
569
|
-
|
|
612
|
+
A(x).length > 0 ? (C(), o("div", Ct, [s("div", wt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Tt, k(A(x).length), 1)]), s("div", { class: _(["indicator-grid", { compact: N.value }]) }, [(C(!0), o(e, null, E(A(x), (t) => (C(), o("button", {
|
|
570
613
|
key: t.id,
|
|
571
|
-
class:
|
|
572
|
-
active:
|
|
573
|
-
compact:
|
|
614
|
+
class: _(["indicator-card", {
|
|
615
|
+
active: z(t.id),
|
|
616
|
+
compact: N.value
|
|
574
617
|
}]),
|
|
575
|
-
onClick: (e) =>
|
|
576
|
-
}, [
|
|
618
|
+
onClick: (e) => z(t.id) ? te(t.id) : ee(t.id)
|
|
619
|
+
}, [N.value ? (C(), o(e, { key: 0 }, [s("span", Dt, k(t.label), 1), s("span", Ot, k(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", kt, [s("span", At, k(t.label), 1), s("div", jt, [t.params?.length ? (C(), o("button", {
|
|
577
620
|
key: 0,
|
|
578
621
|
class: "card-settings-btn",
|
|
579
|
-
onClick:
|
|
622
|
+
onClick: L((e) => B(t.id), ["stop"]),
|
|
580
623
|
title: "编辑参数"
|
|
581
624
|
}, [...c[16] ||= [s("svg", {
|
|
582
625
|
viewBox: "0 0 24 24",
|
|
583
626
|
width: "14",
|
|
584
627
|
height: "14",
|
|
585
628
|
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, X)) : a("", !0)])]), s("div",
|
|
629
|
+
}, [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, X)) : a("", !0)])]), s("div", Mt, k(t.name), 1)], 64))], 10, Et))), 128))], 2)])) : a("", !0)
|
|
587
630
|
]),
|
|
588
|
-
s("div",
|
|
631
|
+
s("div", Nt, [s("div", Pt, [s("span", Ft, "已激活 " + k(R.value) + " 个指标", 1)]), s("button", {
|
|
589
632
|
class: "btn btn-confirm",
|
|
590
|
-
onClick: c[3] ||= (e) =>
|
|
633
|
+
onClick: c[3] ||= (e) => A(h).closeMenu()
|
|
591
634
|
}, "确认")])
|
|
592
635
|
])) : a("", !0)]),
|
|
593
636
|
_: 1
|
|
594
637
|
})])) : a("", !0)]),
|
|
595
638
|
_: 1
|
|
596
|
-
})], 8, ["to"])),
|
|
639
|
+
})], 8, ["to"])), I.value ? (C(), i(Qe, {
|
|
597
640
|
key: 0,
|
|
598
|
-
visible:
|
|
599
|
-
"indicator-id":
|
|
600
|
-
"indicator-name":
|
|
601
|
-
"indicator-description":
|
|
602
|
-
params:
|
|
603
|
-
values:
|
|
604
|
-
onClose: c[6] ||= (e) =>
|
|
605
|
-
onConfirm:
|
|
641
|
+
visible: j.value,
|
|
642
|
+
"indicator-id": I.value.id,
|
|
643
|
+
"indicator-name": I.value.name,
|
|
644
|
+
"indicator-description": I.value.description,
|
|
645
|
+
params: I.value.params || [],
|
|
646
|
+
values: V(I.value.id),
|
|
647
|
+
onClose: c[6] ||= (e) => j.value = !1,
|
|
648
|
+
onConfirm: ne
|
|
606
649
|
}, null, 8, [
|
|
607
650
|
"visible",
|
|
608
651
|
"indicator-id",
|
|
@@ -612,25 +655,25 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
612
655
|
"values"
|
|
613
656
|
])) : a("", !0)]));
|
|
614
657
|
}
|
|
615
|
-
}), [["__scopeId", "data-v-
|
|
658
|
+
}), [["__scopeId", "data-v-fe4a5a7b"]]), Lt = { class: "kline-tooltip__title" }, Rt = { key: 0 }, zt = { class: "kline-tooltip__grid" }, Bt = { class: "row" }, Vt = { class: "row" }, Ht = { class: "row" }, Ut = { class: "row" }, Wt = {
|
|
616
659
|
key: 0,
|
|
617
660
|
class: "row"
|
|
618
|
-
},
|
|
661
|
+
}, Gt = {
|
|
619
662
|
key: 1,
|
|
620
663
|
class: "row"
|
|
621
|
-
},
|
|
664
|
+
}, Kt = {
|
|
622
665
|
key: 2,
|
|
623
666
|
class: "row"
|
|
624
|
-
},
|
|
667
|
+
}, qt = {
|
|
625
668
|
key: 3,
|
|
626
669
|
class: "row"
|
|
627
|
-
},
|
|
670
|
+
}, Jt = {
|
|
628
671
|
key: 4,
|
|
629
672
|
class: "row"
|
|
630
|
-
},
|
|
673
|
+
}, Yt = {
|
|
631
674
|
key: 5,
|
|
632
675
|
class: "row"
|
|
633
|
-
},
|
|
676
|
+
}, Z = "#6b7280", Xt = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
634
677
|
__name: "KLineTooltip",
|
|
635
678
|
props: {
|
|
636
679
|
k: {},
|
|
@@ -649,7 +692,7 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
649
692
|
}
|
|
650
693
|
},
|
|
651
694
|
setup(e) {
|
|
652
|
-
let t = e, n = r(() => t.k ?
|
|
695
|
+
let t = e, n = r(() => t.k ? V(t.k.timestamp, {
|
|
653
696
|
timeZone: t.timezone,
|
|
654
697
|
showTime: t.showTime
|
|
655
698
|
}) : ""), i = r(() => t.useAnchor === !0), c = r(() => t.anchorPlacement === "left-bottom" ? "anchor-left-bottom" : "anchor-right-bottom");
|
|
@@ -669,45 +712,45 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
669
712
|
}
|
|
670
713
|
let p = r(() => {
|
|
671
714
|
let e = t.k;
|
|
672
|
-
if (!e) return
|
|
715
|
+
if (!e) return Z;
|
|
673
716
|
let n = f(e, t.data, t.index);
|
|
674
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
717
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
675
718
|
}), m = r(() => {
|
|
676
719
|
let e = t.k;
|
|
677
|
-
if (!e) return
|
|
720
|
+
if (!e) return Z;
|
|
678
721
|
let n = e.close - e.open;
|
|
679
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
722
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
680
723
|
}), h = r(() => {
|
|
681
724
|
let e = t.k;
|
|
682
|
-
if (!e) return
|
|
725
|
+
if (!e) return Z;
|
|
683
726
|
let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
|
|
684
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
727
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
685
728
|
});
|
|
686
|
-
return (t, r) => e.k ? (
|
|
729
|
+
return (t, r) => e.k ? (C(), o("div", {
|
|
687
730
|
key: 0,
|
|
688
731
|
ref: l,
|
|
689
|
-
class:
|
|
690
|
-
style:
|
|
732
|
+
class: _(["kline-tooltip", [{ "use-anchor": i.value }, c.value]]),
|
|
733
|
+
style: v(i.value ? void 0 : {
|
|
691
734
|
left: `${e.pos.x}px`,
|
|
692
735
|
top: `${e.pos.y}px`
|
|
693
736
|
})
|
|
694
|
-
}, [s("div",
|
|
695
|
-
s("div",
|
|
696
|
-
s("div",
|
|
697
|
-
s("div",
|
|
698
|
-
s("div",
|
|
699
|
-
typeof e.k.volume == "number" ? (
|
|
700
|
-
typeof e.k.turnover == "number" ? (
|
|
701
|
-
typeof e.k.amplitude == "number" ? (
|
|
702
|
-
typeof e.k.changePercent == "number" ? (
|
|
703
|
-
typeof e.k.changeAmount == "number" ? (
|
|
704
|
-
typeof e.k.turnoverRate == "number" ? (
|
|
737
|
+
}, [s("div", Lt, [e.k.stockCode ? (C(), o("span", Rt, k(e.k.stockCode), 1)) : a("", !0), s("span", null, k(n.value), 1)]), s("div", zt, [
|
|
738
|
+
s("div", Bt, [r[0] ||= s("span", null, "开", -1), s("span", { style: v({ color: p.value }) }, k(e.k.open.toFixed(2)), 5)]),
|
|
739
|
+
s("div", Vt, [r[1] ||= s("span", null, "高", -1), s("span", null, k(e.k.high.toFixed(2)), 1)]),
|
|
740
|
+
s("div", Ht, [r[2] ||= s("span", null, "低", -1), s("span", null, k(e.k.low.toFixed(2)), 1)]),
|
|
741
|
+
s("div", Ut, [r[3] ||= s("span", null, "收", -1), s("span", { style: v({ color: m.value }) }, k(e.k.close.toFixed(2)), 5)]),
|
|
742
|
+
typeof e.k.volume == "number" ? (C(), o("div", Wt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, k(u(e.k.volume)), 1)])) : a("", !0),
|
|
743
|
+
typeof e.k.turnover == "number" ? (C(), o("div", Gt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, k(u(e.k.turnover)), 1)])) : a("", !0),
|
|
744
|
+
typeof e.k.amplitude == "number" ? (C(), o("div", Kt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, k(e.k.amplitude) + "%", 1)])) : a("", !0),
|
|
745
|
+
typeof e.k.changePercent == "number" ? (C(), o("div", qt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: v({ color: h.value }) }, k(d(e.k.changePercent, "%")), 5)])) : a("", !0),
|
|
746
|
+
typeof e.k.changeAmount == "number" ? (C(), o("div", Jt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: v({ color: h.value }) }, k(d(e.k.changeAmount, "")), 5)])) : a("", !0),
|
|
747
|
+
typeof e.k.turnoverRate == "number" ? (C(), o("div", Yt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, k(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
|
|
705
748
|
])], 6)) : a("", !0);
|
|
706
749
|
}
|
|
707
|
-
}), [["__scopeId", "data-v-80fa3a7d"]]),
|
|
750
|
+
}), [["__scopeId", "data-v-80fa3a7d"]]), Zt = { class: "marker-tooltip__title" }, Qt = {
|
|
708
751
|
key: 0,
|
|
709
752
|
class: "marker-tooltip__content"
|
|
710
|
-
},
|
|
753
|
+
}, $t = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
711
754
|
__name: "MarkerTooltip",
|
|
712
755
|
props: {
|
|
713
756
|
marker: {},
|
|
@@ -748,26 +791,568 @@ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class
|
|
|
748
791
|
function h(e) {
|
|
749
792
|
return typeof e == "number" ? e.toFixed(2) : String(e);
|
|
750
793
|
}
|
|
751
|
-
return (n, r) => t.marker ? (
|
|
794
|
+
return (n, r) => t.marker ? (C(), o("div", {
|
|
752
795
|
key: 0,
|
|
753
796
|
ref: u,
|
|
754
|
-
class:
|
|
755
|
-
style:
|
|
797
|
+
class: _(["marker-tooltip", [{ "use-anchor": c.value }, l.value]]),
|
|
798
|
+
style: v(c.value ? void 0 : {
|
|
756
799
|
left: `${t.pos.x + 12}px`,
|
|
757
800
|
top: `${t.pos.y + 12}px`
|
|
758
801
|
})
|
|
759
|
-
}, [s("div",
|
|
802
|
+
}, [s("div", Zt, k(f.value), 1), m.value ? (C(), o("div", Qt, [(C(!0), o(e, null, E(p.value, (e, t) => (C(), o("div", {
|
|
760
803
|
key: t,
|
|
761
804
|
class: "row"
|
|
762
|
-
}, [s("span", null,
|
|
805
|
+
}, [s("span", null, k(t), 1), s("span", null, k(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
|
|
806
|
+
}
|
|
807
|
+
}), [["__scopeId", "data-v-f2a21012"]]);
|
|
808
|
+
//#endregion
|
|
809
|
+
//#region src/composables/chart/useChartTheme.ts
|
|
810
|
+
function en(e) {
|
|
811
|
+
let t = T("light"), n = T({}), i = r(() => {
|
|
812
|
+
let e = n.value.isAsiaMarket ?? !1, r = re(t.value, e);
|
|
813
|
+
return {
|
|
814
|
+
upColor: r.candleUpBody,
|
|
815
|
+
downColor: r.candleDownBody
|
|
816
|
+
};
|
|
817
|
+
}), a = r(() => {
|
|
818
|
+
let e = t.value === "dark" ? B : ne, r = n.value.colorPresetSettings?.[t.value];
|
|
819
|
+
return r && Object.keys(r).length > 0 ? ie({
|
|
820
|
+
...e,
|
|
821
|
+
colors: {
|
|
822
|
+
...e.colors,
|
|
823
|
+
...r
|
|
824
|
+
}
|
|
825
|
+
}) : ie(e);
|
|
826
|
+
}), o = null;
|
|
827
|
+
function s(t) {
|
|
828
|
+
e.value?.setTheme(t.matches ? "dark" : "light");
|
|
829
|
+
}
|
|
830
|
+
function c(t) {
|
|
831
|
+
let n = e.value;
|
|
832
|
+
if (!(!n || !t)) if (t === "auto") {
|
|
833
|
+
let e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
834
|
+
n.setTheme(e.matches ? "dark" : "light"), o !== e && (o?.removeEventListener("change", s), o = e, e.addEventListener("change", s));
|
|
835
|
+
} else o?.removeEventListener("change", s), o = null, n.setTheme(t);
|
|
836
|
+
}
|
|
837
|
+
function l(t) {
|
|
838
|
+
n.value = t, c(t.theme), e.value?.updateSettingsFacade(t);
|
|
839
|
+
}
|
|
840
|
+
return S(() => {
|
|
841
|
+
o?.removeEventListener("change", s), o = null;
|
|
842
|
+
}), {
|
|
843
|
+
chartTheme: t,
|
|
844
|
+
chartSettings: n,
|
|
845
|
+
tooltipColors: i,
|
|
846
|
+
themeCssVars: a,
|
|
847
|
+
handleSettingsChange: l,
|
|
848
|
+
applyThemeFromSettings: c
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
//#endregion
|
|
852
|
+
//#region src/composables/chart/useIndicatorManager.ts
|
|
853
|
+
function tn(e, t) {
|
|
854
|
+
let n = T([]), i = T([]), a = r(() => {
|
|
855
|
+
let e = [], t = /* @__PURE__ */ new Set();
|
|
856
|
+
for (let n of i.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
857
|
+
return e;
|
|
858
|
+
}), o = r(() => [...n.value, ...a.value]), s = T({});
|
|
859
|
+
function c() {
|
|
860
|
+
let e = t.value.main ?? 3;
|
|
861
|
+
return i.value.length === 0 ? [{
|
|
862
|
+
id: "main",
|
|
863
|
+
ratio: e,
|
|
864
|
+
visible: !0,
|
|
865
|
+
role: "price"
|
|
866
|
+
}] : [{
|
|
867
|
+
id: "main",
|
|
868
|
+
ratio: e,
|
|
869
|
+
visible: !0,
|
|
870
|
+
role: "price"
|
|
871
|
+
}, ...i.value.map((e) => ({
|
|
872
|
+
id: e.id,
|
|
873
|
+
ratio: t.value[e.id] ?? 1,
|
|
874
|
+
visible: !0,
|
|
875
|
+
role: "indicator"
|
|
876
|
+
}))];
|
|
877
|
+
}
|
|
878
|
+
function l(e) {
|
|
879
|
+
if (e === "VOLUME") return {};
|
|
880
|
+
let t = me(e);
|
|
881
|
+
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
882
|
+
}
|
|
883
|
+
function u(e) {
|
|
884
|
+
if (e === "VOLUME") return !0;
|
|
885
|
+
let t = me(e);
|
|
886
|
+
return !!t && t.category !== "main";
|
|
887
|
+
}
|
|
888
|
+
function d(t = "VOLUME", n) {
|
|
889
|
+
if (i.value.length >= 4) return !1;
|
|
890
|
+
let r = n ?? l(t);
|
|
891
|
+
return !!e.value?.addIndicator(t, "sub", r);
|
|
892
|
+
}
|
|
893
|
+
function f(t) {
|
|
894
|
+
e.value?.removeIndicator(t);
|
|
895
|
+
}
|
|
896
|
+
function p() {
|
|
897
|
+
for (let t of i.value) e.value?.removeIndicator(t.id);
|
|
898
|
+
}
|
|
899
|
+
function m(t) {
|
|
900
|
+
let n = t, r = e.value;
|
|
901
|
+
if (!n || !r) return;
|
|
902
|
+
let i = n.indicators?.main;
|
|
903
|
+
if (i) for (let e of i) e.enabled && r.addIndicator(e.type, "main", e.params);
|
|
904
|
+
}
|
|
905
|
+
function h(t, n) {
|
|
906
|
+
let r = l(n);
|
|
907
|
+
e.value?.replaceSubPaneIndicator(t, n, r);
|
|
908
|
+
}
|
|
909
|
+
function g(t, r) {
|
|
910
|
+
let a = e.value;
|
|
911
|
+
if (!a) return;
|
|
912
|
+
let o = me(t);
|
|
913
|
+
if (o && (o.category === "main" || o.allowMainPane)) {
|
|
914
|
+
let e = n.value.find((e) => e === t);
|
|
915
|
+
r && !e ? a.addIndicator(t, "main", s.value[t]) : !r && e && a.removeIndicator(t.toUpperCase());
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
if (u(t)) if (r) {
|
|
919
|
+
if (i.value.find((e) => e.indicatorId === t) || i.value.length >= 4) return;
|
|
920
|
+
if (!a.addIndicator(t, "sub", s.value[t]) && i.value.length > 0) {
|
|
921
|
+
let e = i.value[i.value.length - 1];
|
|
922
|
+
h(e.id, t);
|
|
923
|
+
}
|
|
924
|
+
} else i.value.filter((e) => e.indicatorId === t).forEach((e) => {
|
|
925
|
+
a.removeIndicator(e.id);
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
function _(t, n) {
|
|
929
|
+
if (t === "MA" || t === "BOLL" || t === "EXPMA" || t === "ENE") {
|
|
930
|
+
e.value?.updateIndicatorParams(t, n);
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
u(t) && i.value.filter((e) => e.indicatorId === t).forEach((t) => {
|
|
934
|
+
e.value?.updateIndicatorParams(t.id, n);
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
function v(t) {
|
|
938
|
+
if (!t.length || i.value.length <= 1) return;
|
|
939
|
+
let n = t.filter((e) => u(e));
|
|
940
|
+
if (!n.length) return;
|
|
941
|
+
let r = new Map(i.value.map((e) => [e.indicatorId, e])), a = [];
|
|
942
|
+
for (let e of n) {
|
|
943
|
+
let t = r.get(e);
|
|
944
|
+
t && (a.push(t), r.delete(e));
|
|
945
|
+
}
|
|
946
|
+
if (a.length === 0) return;
|
|
947
|
+
for (let e of i.value) r.has(e.indicatorId) && (a.push(e), r.delete(e.indicatorId));
|
|
948
|
+
let o = i.value.map((e) => e.id), s = a.map((e) => e.id);
|
|
949
|
+
if (o.join("|") === s.join("|")) return;
|
|
950
|
+
i.value = a;
|
|
951
|
+
let l = e.value;
|
|
952
|
+
l && l.updatePaneLayout(c());
|
|
953
|
+
}
|
|
954
|
+
function y(e) {
|
|
955
|
+
let t = e.indicators.subscribe(() => {
|
|
956
|
+
let t = e.indicators.peek(), r = t.filter((e) => e.role === "main").map((e) => e.definitionId);
|
|
957
|
+
n.value = r;
|
|
958
|
+
let i = { ...s.value };
|
|
959
|
+
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (i[e.definitionId] = { ...e.params });
|
|
960
|
+
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
961
|
+
MA: {
|
|
962
|
+
enabled: r.includes("MA"),
|
|
963
|
+
params: i.MA || {}
|
|
964
|
+
},
|
|
965
|
+
BOLL: {
|
|
966
|
+
enabled: r.includes("BOLL"),
|
|
967
|
+
params: i.BOLL || {}
|
|
968
|
+
},
|
|
969
|
+
EXPMA: {
|
|
970
|
+
enabled: r.includes("EXPMA"),
|
|
971
|
+
params: i.EXPMA || {}
|
|
972
|
+
},
|
|
973
|
+
ENE: {
|
|
974
|
+
enabled: r.includes("ENE"),
|
|
975
|
+
params: i.ENE || {}
|
|
976
|
+
}
|
|
977
|
+
} }), s.value = i;
|
|
978
|
+
}), r = e.subPanes.subscribe(() => {
|
|
979
|
+
let t = e.subPanes.peek(), n = new Set(t.map((e) => e.paneId)), r = i.value.filter((e) => n.has(e.id)), a = new Set(r.map((e) => e.id));
|
|
980
|
+
for (let e of t) a.has(e.paneId) || r.push({
|
|
981
|
+
id: e.paneId,
|
|
982
|
+
indicatorId: e.indicatorId,
|
|
983
|
+
params: e.params
|
|
984
|
+
});
|
|
985
|
+
i.value = r;
|
|
986
|
+
let o = { ...s.value };
|
|
987
|
+
for (let e of t) e.params && Object.keys(e.params).length > 0 && (o[e.indicatorId] = { ...e.params });
|
|
988
|
+
s.value = o;
|
|
989
|
+
});
|
|
990
|
+
return () => {
|
|
991
|
+
t(), r();
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
return {
|
|
995
|
+
mainActiveIndicators: n,
|
|
996
|
+
subActiveIndicators: a,
|
|
997
|
+
activeIndicators: o,
|
|
998
|
+
indicatorParams: s,
|
|
999
|
+
subPanes: i,
|
|
1000
|
+
maxSubPanes: 4,
|
|
1001
|
+
buildPaneLayoutIntent: c,
|
|
1002
|
+
getDefaultParams: l,
|
|
1003
|
+
isSubPaneIndicator: u,
|
|
1004
|
+
addSubPane: d,
|
|
1005
|
+
removeSubPane: f,
|
|
1006
|
+
clearAllSubPanes: p,
|
|
1007
|
+
initIndicatorsFromConfig: m,
|
|
1008
|
+
switchSubIndicator: h,
|
|
1009
|
+
handleIndicatorToggle: g,
|
|
1010
|
+
handleUpdateParams: _,
|
|
1011
|
+
handleReorderSubIndicators: v,
|
|
1012
|
+
setupIndicatorSubscriptions: y
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region src/composables/chart/useDrawingManager.ts
|
|
1017
|
+
function nn(e) {
|
|
1018
|
+
let t = O(null), n = T(null), i = T([]), a = r(() => {
|
|
1019
|
+
let e = n.value;
|
|
1020
|
+
return e ? i.value.find((t) => t.id === e) ?? null : null;
|
|
1021
|
+
});
|
|
1022
|
+
function o(e) {
|
|
1023
|
+
t.value?.setTool(e);
|
|
763
1024
|
}
|
|
764
|
-
|
|
1025
|
+
function s(e) {
|
|
1026
|
+
let n = a.value;
|
|
1027
|
+
!n || !t.value || (t.value.updateDrawingStyle(n.id, e), i.value = t.value.getDrawings());
|
|
1028
|
+
}
|
|
1029
|
+
function c() {
|
|
1030
|
+
let e = a.value;
|
|
1031
|
+
!e || !t.value || (t.value.removeDrawing(e.id), i.value = t.value.getDrawings());
|
|
1032
|
+
}
|
|
1033
|
+
function l(e) {
|
|
1034
|
+
t.value = new ae(e), t.value.setCallbacks({
|
|
1035
|
+
onDrawingCreated: (e) => {
|
|
1036
|
+
i.value = [...i.value, e], n.value = e.id;
|
|
1037
|
+
},
|
|
1038
|
+
onToolChange: () => {},
|
|
1039
|
+
onDrawingSelected: (e) => {
|
|
1040
|
+
n.value = e?.id ?? null;
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
return {
|
|
1045
|
+
drawingController: t,
|
|
1046
|
+
selectedDrawingId: n,
|
|
1047
|
+
selectedDrawing: a,
|
|
1048
|
+
drawings: i,
|
|
1049
|
+
handleSelectTool: o,
|
|
1050
|
+
onUpdateDrawingStyle: s,
|
|
1051
|
+
onDeleteDrawing: c,
|
|
1052
|
+
setupDrawing: l
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
//#endregion
|
|
1056
|
+
//#region src/tools/calcRangeOverlayPixel.ts
|
|
1057
|
+
function rn(e, t, n, r) {
|
|
1058
|
+
let { kWidth: i, kGap: a } = t.getKWidthKGap(), o = t.getCurrentDpr(), s = Math.max(1, Math.round(i * o) + +(Math.round(i * o) % 2 == 0)), c = Math.round(a * o), l = s + c, u = c, d = n.scrollLeft - r.scrollLeft, f = d + (u + e.start * l) / o;
|
|
1059
|
+
return {
|
|
1060
|
+
left: f,
|
|
1061
|
+
width: d + (u + e.end * l + s) / o - f,
|
|
1062
|
+
height: r.plotHeight
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
//#endregion
|
|
1066
|
+
//#region src/tools/getKLineIndexByTimestamp.ts
|
|
1067
|
+
function an(e, t) {
|
|
1068
|
+
let n = 0, r = e.length - 1;
|
|
1069
|
+
for (; n <= r;) {
|
|
1070
|
+
let i = n + r >>> 1, a = e[i].timestamp;
|
|
1071
|
+
if (a === t) return {
|
|
1072
|
+
low: i,
|
|
1073
|
+
high: i
|
|
1074
|
+
};
|
|
1075
|
+
a < t ? n = i + 1 : r = i - 1;
|
|
1076
|
+
}
|
|
1077
|
+
return {
|
|
1078
|
+
low: n,
|
|
1079
|
+
high: r
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
function on(e, t, n) {
|
|
1083
|
+
if (e.length === 0) return null;
|
|
1084
|
+
let { low: r, high: i } = an(e, t);
|
|
1085
|
+
return r === i ? r : n === "left" ? i >= 0 ? i : r < e.length ? r : null : r < e.length ? r : i;
|
|
1086
|
+
}
|
|
1087
|
+
//#endregion
|
|
1088
|
+
//#region src/composables/chart/useRangeSelection.ts
|
|
1089
|
+
function sn(e) {
|
|
1090
|
+
return e ? e.date ? e.date : new Date(e.timestamp).toISOString().slice(0, 10) : "?";
|
|
1091
|
+
}
|
|
1092
|
+
function cn(e) {
|
|
1093
|
+
let t = new Date(e);
|
|
1094
|
+
return `${t.getFullYear()}${String(t.getMonth() + 1).padStart(2, "0")}${String(t.getDate()).padStart(2, "0")}`;
|
|
1095
|
+
}
|
|
1096
|
+
function ln(e) {
|
|
1097
|
+
let t = e.trim().split(/[-/]/);
|
|
1098
|
+
return t.length === 3 ? `${t[0].padStart(4, "0")}-${t[1].padStart(2, "0")}-${t[2].padStart(2, "0")}` : null;
|
|
1099
|
+
}
|
|
1100
|
+
function un(e) {
|
|
1101
|
+
if (e == null) return "";
|
|
1102
|
+
let t = String(e);
|
|
1103
|
+
return /[",\r\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
1104
|
+
}
|
|
1105
|
+
function dn(e) {
|
|
1106
|
+
let t = ln(e);
|
|
1107
|
+
if (!t) return null;
|
|
1108
|
+
let n = new Date(t);
|
|
1109
|
+
return isNaN(n.getTime()) ? null : n.getTime();
|
|
1110
|
+
}
|
|
1111
|
+
function fn(e) {
|
|
1112
|
+
let { controller: t, activeToolId: n, containerRef: i, dataVersion: a, viewportVersion: o, dataFetcher: s, batchStockCodes: c } = e, l = T(0), u = T(""), d = T(""), f = T(null), p = T(null), m = T({
|
|
1113
|
+
startTimestamp: null,
|
|
1114
|
+
endTimestamp: null,
|
|
1115
|
+
isDragging: !1
|
|
1116
|
+
}), h = r(() => n.value === "range-select"), g = r(() => m.value.startTimestamp !== null && m.value.endTimestamp !== null), _ = r(() => {
|
|
1117
|
+
a.value;
|
|
1118
|
+
let e = t.value?.getData() ?? [], { startTimestamp: n, endTimestamp: r } = m.value;
|
|
1119
|
+
if (n === null || r === null || e.length === 0) return null;
|
|
1120
|
+
let i = on(e, n, "left"), o = on(e, r, "right");
|
|
1121
|
+
return i === null || o === null ? null : {
|
|
1122
|
+
start: Math.min(i, o),
|
|
1123
|
+
end: Math.max(i, o)
|
|
1124
|
+
};
|
|
1125
|
+
}), v = r(() => {
|
|
1126
|
+
let e = _.value, n = t.value?.getData() ?? [];
|
|
1127
|
+
return !e || n.length === 0 ? "" : sn(n[e.start]);
|
|
1128
|
+
}), y = r(() => {
|
|
1129
|
+
let e = _.value, n = t.value?.getData() ?? [];
|
|
1130
|
+
return !e || n.length === 0 ? "" : sn(n[e.end]);
|
|
1131
|
+
}), b = r(() => {
|
|
1132
|
+
let e = _.value;
|
|
1133
|
+
if (!e) return null;
|
|
1134
|
+
l.value, o.value;
|
|
1135
|
+
let n = t.value, r = n?.getViewport(), a = i.value;
|
|
1136
|
+
if (!n || !r || !a) return null;
|
|
1137
|
+
let s = rn(e, n, a, r);
|
|
1138
|
+
return {
|
|
1139
|
+
left: `${s.left}px`,
|
|
1140
|
+
width: `${s.width}px`,
|
|
1141
|
+
height: `${s.height}px`
|
|
1142
|
+
};
|
|
1143
|
+
});
|
|
1144
|
+
function x() {
|
|
1145
|
+
m.value = {
|
|
1146
|
+
startTimestamp: null,
|
|
1147
|
+
endTimestamp: null,
|
|
1148
|
+
isDragging: !1
|
|
1149
|
+
}, u.value = "", d.value = "";
|
|
1150
|
+
}
|
|
1151
|
+
N(u, (e) => {
|
|
1152
|
+
let n = t.value?.getData() ?? [], r = dn(e);
|
|
1153
|
+
r === null || n.length === 0 || (m.value = {
|
|
1154
|
+
...m.value,
|
|
1155
|
+
startTimestamp: r,
|
|
1156
|
+
isDragging: !1
|
|
1157
|
+
}, r < n[0].timestamp && t.value?.ensureDataRange(r));
|
|
1158
|
+
}), N(d, (e) => {
|
|
1159
|
+
let n = t.value?.getData() ?? [], r = dn(e);
|
|
1160
|
+
r === null || n.length === 0 || (m.value = {
|
|
1161
|
+
...m.value,
|
|
1162
|
+
endTimestamp: r,
|
|
1163
|
+
isDragging: !1
|
|
1164
|
+
}, r < n[0].timestamp && t.value?.ensureDataRange(r));
|
|
1165
|
+
});
|
|
1166
|
+
function S(e, n) {
|
|
1167
|
+
let r = t.value?.getData() ?? [];
|
|
1168
|
+
if (r.length === 0) return null;
|
|
1169
|
+
let i = n.getBoundingClientRect(), a = t.value?.getLogicalIndexAtX(e.clientX - i.left);
|
|
1170
|
+
return a == null ? null : Math.max(0, Math.min(a, r.length - 1));
|
|
1171
|
+
}
|
|
1172
|
+
function C(e, n) {
|
|
1173
|
+
if (!h.value || m.value.startTimestamp !== null && m.value.endTimestamp !== null && !m.value.isDragging) return !1;
|
|
1174
|
+
let r = S(e, n);
|
|
1175
|
+
if (r === null) return !0;
|
|
1176
|
+
let i = (t.value?.getData() ?? [])[r]?.timestamp;
|
|
1177
|
+
return i === void 0 ? !0 : (m.value = {
|
|
1178
|
+
startTimestamp: i,
|
|
1179
|
+
endTimestamp: i,
|
|
1180
|
+
isDragging: !0
|
|
1181
|
+
}, u.value = "", d.value = "", n.setPointerCapture?.(e.pointerId), e.preventDefault(), !0);
|
|
1182
|
+
}
|
|
1183
|
+
function w(e, n) {
|
|
1184
|
+
if (!h.value || !m.value.isDragging) return !1;
|
|
1185
|
+
let r = S(e, n);
|
|
1186
|
+
if (r !== null) {
|
|
1187
|
+
let e = (t.value?.getData() ?? [])[r]?.timestamp;
|
|
1188
|
+
e !== void 0 && (m.value = {
|
|
1189
|
+
...m.value,
|
|
1190
|
+
endTimestamp: e
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
return e.preventDefault(), !0;
|
|
1194
|
+
}
|
|
1195
|
+
function E(e, n) {
|
|
1196
|
+
if (!h.value || !m.value.isDragging) return !1;
|
|
1197
|
+
let r = S(e, n);
|
|
1198
|
+
if (r !== null) {
|
|
1199
|
+
let e = (t.value?.getData() ?? [])[r]?.timestamp;
|
|
1200
|
+
e === void 0 ? m.value = {
|
|
1201
|
+
...m.value,
|
|
1202
|
+
isDragging: !1
|
|
1203
|
+
} : m.value = {
|
|
1204
|
+
...m.value,
|
|
1205
|
+
endTimestamp: e,
|
|
1206
|
+
isDragging: !1
|
|
1207
|
+
};
|
|
1208
|
+
} else m.value = {
|
|
1209
|
+
...m.value,
|
|
1210
|
+
isDragging: !1
|
|
1211
|
+
};
|
|
1212
|
+
return n.releasePointerCapture?.(e.pointerId), e.preventDefault(), !0;
|
|
1213
|
+
}
|
|
1214
|
+
function D(e, t) {
|
|
1215
|
+
h.value && (f.value = e, t.currentTarget.setPointerCapture?.(t.pointerId), t.preventDefault());
|
|
1216
|
+
}
|
|
1217
|
+
function O(e) {
|
|
1218
|
+
if (!f.value || m.value.startTimestamp === null || m.value.endTimestamp === null) return;
|
|
1219
|
+
let n = i.value?.getBoundingClientRect();
|
|
1220
|
+
if (!n) return;
|
|
1221
|
+
let r = t.value?.getData() ?? [];
|
|
1222
|
+
if (!r.length) return;
|
|
1223
|
+
let a = t.value?.getLogicalIndexAtX(e.clientX - n.left);
|
|
1224
|
+
if (a == null) return;
|
|
1225
|
+
let o = r[Math.max(0, Math.min(a, r.length - 1))]?.timestamp;
|
|
1226
|
+
o !== void 0 && (f.value === "left" ? o > m.value.endTimestamp ? (m.value = {
|
|
1227
|
+
startTimestamp: m.value.endTimestamp,
|
|
1228
|
+
endTimestamp: o,
|
|
1229
|
+
isDragging: !1
|
|
1230
|
+
}, f.value = "right") : m.value = {
|
|
1231
|
+
...m.value,
|
|
1232
|
+
startTimestamp: o
|
|
1233
|
+
} : o < m.value.startTimestamp ? (m.value = {
|
|
1234
|
+
startTimestamp: o,
|
|
1235
|
+
endTimestamp: m.value.startTimestamp,
|
|
1236
|
+
isDragging: !1
|
|
1237
|
+
}, f.value = "left") : m.value = {
|
|
1238
|
+
...m.value,
|
|
1239
|
+
endTimestamp: o
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
function k(e) {
|
|
1243
|
+
f.value &&= (e.currentTarget.releasePointerCapture?.(e.pointerId), null);
|
|
1244
|
+
}
|
|
1245
|
+
let A = [
|
|
1246
|
+
"timestamp",
|
|
1247
|
+
"open",
|
|
1248
|
+
"high",
|
|
1249
|
+
"low",
|
|
1250
|
+
"close",
|
|
1251
|
+
"volume",
|
|
1252
|
+
"turnover",
|
|
1253
|
+
"turnoverRate",
|
|
1254
|
+
"amplitude",
|
|
1255
|
+
"changePercent",
|
|
1256
|
+
"changeAmount"
|
|
1257
|
+
];
|
|
1258
|
+
function j(e, t, n, r) {
|
|
1259
|
+
let i = [`stockCode,time,${A.join(",")}`, ...e.map((e) => {
|
|
1260
|
+
let n = un(V(e.timestamp, { showTime: !0 }));
|
|
1261
|
+
return `${un(e.stockCode ?? t)},${n},${A.map((t) => un(e[t])).join(",")}`;
|
|
1262
|
+
})], a = new Blob([`\uFEFF${i.join("\n")}`], { type: "text/csv;charset=utf-8" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
1263
|
+
s.href = o, s.download = `${t}-${cn(n)}-${cn(r)}.csv`, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
|
|
1264
|
+
}
|
|
1265
|
+
async function M() {
|
|
1266
|
+
let e = _.value, n = t.value?.getData() ?? [];
|
|
1267
|
+
if (!e || n.length === 0) return;
|
|
1268
|
+
let r = n[e.start].timestamp, i = n[e.end].timestamp, a = t.value?.symbols.peek()?.[0]?.symbol ?? "unknown", o = c.value, l = 1 + o.length, u = o.length > 0 ? `batch${l}` : a, d = [];
|
|
1269
|
+
p.value = {
|
|
1270
|
+
current: 0,
|
|
1271
|
+
total: l,
|
|
1272
|
+
label: "正在准备主品种数据..."
|
|
1273
|
+
};
|
|
1274
|
+
for (let t of n.slice(e.start, e.end + 1)) d.push(t);
|
|
1275
|
+
p.value = {
|
|
1276
|
+
current: 1,
|
|
1277
|
+
total: l,
|
|
1278
|
+
label: "主品种数据已就绪"
|
|
1279
|
+
};
|
|
1280
|
+
let f = s.value;
|
|
1281
|
+
if (f && o.length > 0) {
|
|
1282
|
+
let e = t.value?.symbols.peek()?.[0], n = V(r), a = V(i), s = e?.period ?? "daily", c = e?.adjust ?? "none", u = e?.exchange, m = e?.source ?? "gotdx";
|
|
1283
|
+
for (let e = 0; e < o.length; e++) {
|
|
1284
|
+
let t = o[e];
|
|
1285
|
+
p.value = {
|
|
1286
|
+
current: 1 + e,
|
|
1287
|
+
total: l,
|
|
1288
|
+
label: `正在获取 ${t}...`
|
|
1289
|
+
};
|
|
1290
|
+
try {
|
|
1291
|
+
let e = await f(m, {
|
|
1292
|
+
symbol: t,
|
|
1293
|
+
startDate: n,
|
|
1294
|
+
endDate: a,
|
|
1295
|
+
period: s,
|
|
1296
|
+
adjust: c,
|
|
1297
|
+
exchange: u
|
|
1298
|
+
});
|
|
1299
|
+
for (let t of e) d.push(t);
|
|
1300
|
+
} catch {
|
|
1301
|
+
continue;
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
p.value = {
|
|
1306
|
+
current: l,
|
|
1307
|
+
total: l,
|
|
1308
|
+
label: "正在生成文件..."
|
|
1309
|
+
}, j(d, u, r, i), p.value = {
|
|
1310
|
+
current: l,
|
|
1311
|
+
total: l,
|
|
1312
|
+
label: "导出完成"
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
function P() {
|
|
1316
|
+
let e = i.value;
|
|
1317
|
+
e && (l.value = e.scrollLeft);
|
|
1318
|
+
}
|
|
1319
|
+
function F() {
|
|
1320
|
+
let e = i.value;
|
|
1321
|
+
e && (l.value = e.scrollLeft);
|
|
1322
|
+
}
|
|
1323
|
+
return {
|
|
1324
|
+
rangeSelection: m,
|
|
1325
|
+
customStartDate: u,
|
|
1326
|
+
customEndDate: d,
|
|
1327
|
+
containerScrollLeft: l,
|
|
1328
|
+
isRangeSelectActive: h,
|
|
1329
|
+
rangeSelectionReady: g,
|
|
1330
|
+
rangeSelectionBounds: _,
|
|
1331
|
+
rangeSelectionStartLabel: v,
|
|
1332
|
+
rangeSelectionEndLabel: y,
|
|
1333
|
+
rangeSelectionOverlayStyle: b,
|
|
1334
|
+
clearRangeSelection: x,
|
|
1335
|
+
handleRangePointerDown: C,
|
|
1336
|
+
handleRangePointerMove: w,
|
|
1337
|
+
handleRangePointerUp: E,
|
|
1338
|
+
exportRangeToCsv: M,
|
|
1339
|
+
exportingProgress: p,
|
|
1340
|
+
onEdgePointerDown: D,
|
|
1341
|
+
onEdgePointerMove: O,
|
|
1342
|
+
onEdgePointerUp: k,
|
|
1343
|
+
onScroll: P,
|
|
1344
|
+
syncScrollLeft: F
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
//#endregion
|
|
1348
|
+
//#region ~icons/tabler/pointer
|
|
1349
|
+
var pn = {
|
|
765
1350
|
viewBox: "0 0 24 24",
|
|
766
1351
|
width: "1.2em",
|
|
767
1352
|
height: "1.2em"
|
|
768
1353
|
};
|
|
769
|
-
function
|
|
770
|
-
return
|
|
1354
|
+
function mn(e, t) {
|
|
1355
|
+
return C(), o("svg", pn, [...t[0] ||= [s("path", {
|
|
771
1356
|
fill: "none",
|
|
772
1357
|
stroke: "currentColor",
|
|
773
1358
|
"stroke-linecap": "round",
|
|
@@ -776,16 +1361,16 @@ function Zt(e, t) {
|
|
|
776
1361
|
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
1362
|
}, null, -1)]]);
|
|
778
1363
|
}
|
|
779
|
-
var
|
|
1364
|
+
var hn = h({
|
|
780
1365
|
name: "tabler-pointer",
|
|
781
|
-
render:
|
|
782
|
-
}),
|
|
1366
|
+
render: mn
|
|
1367
|
+
}), gn = {
|
|
783
1368
|
viewBox: "0 0 24 24",
|
|
784
1369
|
width: "1.2em",
|
|
785
1370
|
height: "1.2em"
|
|
786
1371
|
};
|
|
787
|
-
function
|
|
788
|
-
return
|
|
1372
|
+
function _n(e, t) {
|
|
1373
|
+
return C(), o("svg", gn, [...t[0] ||= [s("path", {
|
|
789
1374
|
fill: "none",
|
|
790
1375
|
stroke: "currentColor",
|
|
791
1376
|
"stroke-linecap": "round",
|
|
@@ -794,16 +1379,16 @@ function en(e, t) {
|
|
|
794
1379
|
d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
|
|
795
1380
|
}, null, -1)]]);
|
|
796
1381
|
}
|
|
797
|
-
var
|
|
1382
|
+
var vn = h({
|
|
798
1383
|
name: "tabler-chart-line",
|
|
799
|
-
render:
|
|
800
|
-
}),
|
|
1384
|
+
render: _n
|
|
1385
|
+
}), yn = {
|
|
801
1386
|
viewBox: "0 0 24 24",
|
|
802
1387
|
width: "1.2em",
|
|
803
1388
|
height: "1.2em"
|
|
804
1389
|
};
|
|
805
|
-
function
|
|
806
|
-
return
|
|
1390
|
+
function bn(e, t) {
|
|
1391
|
+
return C(), o("svg", yn, [...t[0] ||= [s("path", {
|
|
807
1392
|
fill: "none",
|
|
808
1393
|
stroke: "currentColor",
|
|
809
1394
|
"stroke-linecap": "round",
|
|
@@ -812,16 +1397,16 @@ function rn(e, t) {
|
|
|
812
1397
|
d: "M17 7L7 17M8 7h9v9"
|
|
813
1398
|
}, null, -1)]]);
|
|
814
1399
|
}
|
|
815
|
-
var
|
|
1400
|
+
var xn = h({
|
|
816
1401
|
name: "tabler-arrow-up-right",
|
|
817
|
-
render:
|
|
818
|
-
}),
|
|
1402
|
+
render: bn
|
|
1403
|
+
}), Sn = {
|
|
819
1404
|
viewBox: "0 0 24 24",
|
|
820
1405
|
width: "1.2em",
|
|
821
1406
|
height: "1.2em"
|
|
822
1407
|
};
|
|
823
|
-
function
|
|
824
|
-
return
|
|
1408
|
+
function Cn(e, t) {
|
|
1409
|
+
return C(), o("svg", Sn, [...t[0] ||= [s("path", {
|
|
825
1410
|
fill: "none",
|
|
826
1411
|
stroke: "currentColor",
|
|
827
1412
|
"stroke-linecap": "round",
|
|
@@ -830,16 +1415,16 @@ function sn(e, t) {
|
|
|
830
1415
|
d: "M5 12h14m-6 6l6-6m-6-6l6 6"
|
|
831
1416
|
}, null, -1)]]);
|
|
832
1417
|
}
|
|
833
|
-
var
|
|
1418
|
+
var wn = h({
|
|
834
1419
|
name: "tabler-arrow-right",
|
|
835
|
-
render:
|
|
836
|
-
}),
|
|
1420
|
+
render: Cn
|
|
1421
|
+
}), Tn = {
|
|
837
1422
|
viewBox: "0 0 24 24",
|
|
838
1423
|
width: "1.2em",
|
|
839
1424
|
height: "1.2em"
|
|
840
1425
|
};
|
|
841
|
-
function
|
|
842
|
-
return
|
|
1426
|
+
function En(e, t) {
|
|
1427
|
+
return C(), o("svg", Tn, [...t[0] ||= [s("path", {
|
|
843
1428
|
fill: "none",
|
|
844
1429
|
stroke: "currentColor",
|
|
845
1430
|
"stroke-linecap": "round",
|
|
@@ -848,16 +1433,16 @@ function un(e, t) {
|
|
|
848
1433
|
d: "M5 12h14"
|
|
849
1434
|
}, null, -1)]]);
|
|
850
1435
|
}
|
|
851
|
-
var
|
|
1436
|
+
var Dn = h({
|
|
852
1437
|
name: "tabler-minus",
|
|
853
|
-
render:
|
|
854
|
-
}),
|
|
1438
|
+
render: En
|
|
1439
|
+
}), On = {
|
|
855
1440
|
viewBox: "0 0 24 24",
|
|
856
1441
|
width: "1.2em",
|
|
857
1442
|
height: "1.2em"
|
|
858
1443
|
};
|
|
859
|
-
function
|
|
860
|
-
return
|
|
1444
|
+
function kn(e, t) {
|
|
1445
|
+
return C(), o("svg", On, [...t[0] ||= [s("path", {
|
|
861
1446
|
fill: "none",
|
|
862
1447
|
stroke: "currentColor",
|
|
863
1448
|
"stroke-linecap": "round",
|
|
@@ -866,16 +1451,16 @@ function pn(e, t) {
|
|
|
866
1451
|
d: "M3 12v.01M7 12h10m4 0v.01"
|
|
867
1452
|
}, null, -1)]]);
|
|
868
1453
|
}
|
|
869
|
-
var
|
|
1454
|
+
var An = h({
|
|
870
1455
|
name: "tabler-separator",
|
|
871
|
-
render:
|
|
872
|
-
}),
|
|
1456
|
+
render: kn
|
|
1457
|
+
}), jn = {
|
|
873
1458
|
viewBox: "0 0 24 24",
|
|
874
1459
|
width: "1.2em",
|
|
875
1460
|
height: "1.2em"
|
|
876
1461
|
};
|
|
877
|
-
function
|
|
878
|
-
return
|
|
1462
|
+
function Mn(e, t) {
|
|
1463
|
+
return C(), o("svg", jn, [...t[0] ||= [s("path", {
|
|
879
1464
|
fill: "none",
|
|
880
1465
|
stroke: "currentColor",
|
|
881
1466
|
"stroke-linecap": "round",
|
|
@@ -884,16 +1469,16 @@ function gn(e, t) {
|
|
|
884
1469
|
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
1470
|
}, null, -1)]]);
|
|
886
1471
|
}
|
|
887
|
-
var
|
|
1472
|
+
var Nn = h({
|
|
888
1473
|
name: "tabler-crosshair",
|
|
889
|
-
render:
|
|
890
|
-
}),
|
|
1474
|
+
render: Mn
|
|
1475
|
+
}), Pn = {
|
|
891
1476
|
viewBox: "0 0 24 24",
|
|
892
1477
|
width: "1.2em",
|
|
893
1478
|
height: "1.2em"
|
|
894
1479
|
};
|
|
895
|
-
function
|
|
896
|
-
return
|
|
1480
|
+
function Fn(e, t) {
|
|
1481
|
+
return C(), o("svg", Pn, [...t[0] ||= [s("g", {
|
|
897
1482
|
fill: "none",
|
|
898
1483
|
stroke: "currentColor",
|
|
899
1484
|
"stroke-linecap": "round",
|
|
@@ -901,16 +1486,16 @@ function yn(e, t) {
|
|
|
901
1486
|
"stroke-width": "2"
|
|
902
1487
|
}, [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
1488
|
}
|
|
904
|
-
var
|
|
1489
|
+
var In = h({
|
|
905
1490
|
name: "tabler-info-circle",
|
|
906
|
-
render:
|
|
907
|
-
}),
|
|
1491
|
+
render: Fn
|
|
1492
|
+
}), Ln = {
|
|
908
1493
|
viewBox: "0 0 24 24",
|
|
909
1494
|
width: "1.2em",
|
|
910
1495
|
height: "1.2em"
|
|
911
1496
|
};
|
|
912
|
-
function
|
|
913
|
-
return
|
|
1497
|
+
function Rn(e, t) {
|
|
1498
|
+
return C(), o("svg", Ln, [...t[0] ||= [s("path", {
|
|
914
1499
|
fill: "none",
|
|
915
1500
|
stroke: "currentColor",
|
|
916
1501
|
"stroke-linecap": "round",
|
|
@@ -919,16 +1504,16 @@ function Sn(e, t) {
|
|
|
919
1504
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
|
|
920
1505
|
}, null, -1)]]);
|
|
921
1506
|
}
|
|
922
|
-
var
|
|
1507
|
+
var zn = h({
|
|
923
1508
|
name: "tabler-zoom-in",
|
|
924
|
-
render:
|
|
925
|
-
}),
|
|
1509
|
+
render: Rn
|
|
1510
|
+
}), Bn = {
|
|
926
1511
|
viewBox: "0 0 24 24",
|
|
927
1512
|
width: "1.2em",
|
|
928
1513
|
height: "1.2em"
|
|
929
1514
|
};
|
|
930
|
-
function
|
|
931
|
-
return
|
|
1515
|
+
function Vn(e, t) {
|
|
1516
|
+
return C(), o("svg", Bn, [...t[0] ||= [s("path", {
|
|
932
1517
|
fill: "none",
|
|
933
1518
|
stroke: "currentColor",
|
|
934
1519
|
"stroke-linecap": "round",
|
|
@@ -937,16 +1522,16 @@ function Tn(e, t) {
|
|
|
937
1522
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
|
|
938
1523
|
}, null, -1)]]);
|
|
939
1524
|
}
|
|
940
|
-
var
|
|
1525
|
+
var Hn = h({
|
|
941
1526
|
name: "tabler-zoom-out",
|
|
942
|
-
render:
|
|
943
|
-
}),
|
|
1527
|
+
render: Vn
|
|
1528
|
+
}), Un = {
|
|
944
1529
|
viewBox: "0 0 24 24",
|
|
945
1530
|
width: "1.2em",
|
|
946
1531
|
height: "1.2em"
|
|
947
1532
|
};
|
|
948
|
-
function
|
|
949
|
-
return
|
|
1533
|
+
function Wn(e, t) {
|
|
1534
|
+
return C(), o("svg", Un, [...t[0] ||= [s("path", {
|
|
950
1535
|
fill: "none",
|
|
951
1536
|
stroke: "currentColor",
|
|
952
1537
|
"stroke-linecap": "round",
|
|
@@ -955,16 +1540,16 @@ function On(e, t) {
|
|
|
955
1540
|
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
1541
|
}, null, -1)]]);
|
|
957
1542
|
}
|
|
958
|
-
var
|
|
1543
|
+
var Gn = h({
|
|
959
1544
|
name: "tabler-maximize",
|
|
960
|
-
render:
|
|
961
|
-
}),
|
|
1545
|
+
render: Wn
|
|
1546
|
+
}), Kn = {
|
|
962
1547
|
viewBox: "0 0 24 24",
|
|
963
1548
|
width: "1.2em",
|
|
964
1549
|
height: "1.2em"
|
|
965
1550
|
};
|
|
966
|
-
function
|
|
967
|
-
return
|
|
1551
|
+
function qn(e, t) {
|
|
1552
|
+
return C(), o("svg", Kn, [...t[0] ||= [s("path", {
|
|
968
1553
|
fill: "none",
|
|
969
1554
|
stroke: "currentColor",
|
|
970
1555
|
"stroke-linecap": "round",
|
|
@@ -973,16 +1558,16 @@ function jn(e, t) {
|
|
|
973
1558
|
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
1559
|
}, null, -1)]]);
|
|
975
1560
|
}
|
|
976
|
-
var
|
|
1561
|
+
var Jn = h({
|
|
977
1562
|
name: "tabler-minimize",
|
|
978
|
-
render:
|
|
979
|
-
}),
|
|
1563
|
+
render: qn
|
|
1564
|
+
}), Yn = {
|
|
980
1565
|
viewBox: "0 0 24 24",
|
|
981
1566
|
width: "1.2em",
|
|
982
1567
|
height: "1.2em"
|
|
983
1568
|
};
|
|
984
|
-
function
|
|
985
|
-
return
|
|
1569
|
+
function Xn(e, t) {
|
|
1570
|
+
return C(), o("svg", Yn, [...t[0] ||= [s("g", {
|
|
986
1571
|
fill: "none",
|
|
987
1572
|
stroke: "currentColor",
|
|
988
1573
|
"stroke-linecap": "round",
|
|
@@ -990,16 +1575,16 @@ function Pn(e, t) {
|
|
|
990
1575
|
"stroke-width": "2"
|
|
991
1576
|
}, [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
1577
|
}
|
|
993
|
-
var
|
|
1578
|
+
var Zn = h({
|
|
994
1579
|
name: "tabler-settings",
|
|
995
|
-
render:
|
|
996
|
-
}),
|
|
1580
|
+
render: Xn
|
|
1581
|
+
}), Qn = {
|
|
997
1582
|
viewBox: "0 0 24 24",
|
|
998
1583
|
width: "1.2em",
|
|
999
1584
|
height: "1.2em"
|
|
1000
1585
|
};
|
|
1001
|
-
function
|
|
1002
|
-
return
|
|
1586
|
+
function $n(e, t) {
|
|
1587
|
+
return C(), o("svg", Qn, [...t[0] ||= [s("path", {
|
|
1003
1588
|
fill: "none",
|
|
1004
1589
|
stroke: "currentColor",
|
|
1005
1590
|
"stroke-linecap": "round",
|
|
@@ -1008,16 +1593,16 @@ function Ln(e, t) {
|
|
|
1008
1593
|
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
1594
|
}, null, -1)]]);
|
|
1010
1595
|
}
|
|
1011
|
-
var
|
|
1596
|
+
var er = h({
|
|
1012
1597
|
name: "tabler-shape",
|
|
1013
|
-
render:
|
|
1014
|
-
}),
|
|
1598
|
+
render: $n
|
|
1599
|
+
}), tr = {
|
|
1015
1600
|
viewBox: "0 0 24 24",
|
|
1016
1601
|
width: "1.2em",
|
|
1017
1602
|
height: "1.2em"
|
|
1018
1603
|
};
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
1604
|
+
function nr(e, t) {
|
|
1605
|
+
return C(), o("svg", tr, [...t[0] ||= [s("path", {
|
|
1021
1606
|
fill: "none",
|
|
1022
1607
|
stroke: "currentColor",
|
|
1023
1608
|
"stroke-linecap": "round",
|
|
@@ -1026,16 +1611,16 @@ function Bn(e, t) {
|
|
|
1026
1611
|
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
1612
|
}, null, -1)]]);
|
|
1028
1613
|
}
|
|
1029
|
-
var
|
|
1614
|
+
var rr = h({
|
|
1030
1615
|
name: "tabler-chart-dots-3",
|
|
1031
|
-
render:
|
|
1032
|
-
}),
|
|
1616
|
+
render: nr
|
|
1617
|
+
}), ir = {
|
|
1033
1618
|
viewBox: "0 0 24 24",
|
|
1034
1619
|
width: "1.2em",
|
|
1035
1620
|
height: "1.2em"
|
|
1036
1621
|
};
|
|
1037
|
-
function
|
|
1038
|
-
return
|
|
1622
|
+
function ar(e, t) {
|
|
1623
|
+
return C(), o("svg", ir, [...t[0] ||= [s("path", {
|
|
1039
1624
|
fill: "none",
|
|
1040
1625
|
stroke: "currentColor",
|
|
1041
1626
|
"stroke-linecap": "round",
|
|
@@ -1044,16 +1629,16 @@ function Un(e, t) {
|
|
|
1044
1629
|
d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
|
|
1045
1630
|
}, null, -1)]]);
|
|
1046
1631
|
}
|
|
1047
|
-
var
|
|
1632
|
+
var or = h({
|
|
1048
1633
|
name: "tabler-caret-up-down",
|
|
1049
|
-
render:
|
|
1050
|
-
}),
|
|
1634
|
+
render: ar
|
|
1635
|
+
}), sr = {
|
|
1051
1636
|
viewBox: "0 0 24 24",
|
|
1052
1637
|
width: "1.2em",
|
|
1053
1638
|
height: "1.2em"
|
|
1054
1639
|
};
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
1640
|
+
function cr(e, t) {
|
|
1641
|
+
return C(), o("svg", sr, [...t[0] ||= [s("path", {
|
|
1057
1642
|
fill: "none",
|
|
1058
1643
|
stroke: "currentColor",
|
|
1059
1644
|
"stroke-linecap": "round",
|
|
@@ -1062,34 +1647,52 @@ function Kn(e, t) {
|
|
|
1062
1647
|
d: "M8 4H5v16h3m8-16h3v16h-3"
|
|
1063
1648
|
}, null, -1)]]);
|
|
1064
1649
|
}
|
|
1065
|
-
var
|
|
1650
|
+
var lr = h({
|
|
1066
1651
|
name: "tabler-brackets",
|
|
1067
|
-
render:
|
|
1652
|
+
render: cr
|
|
1653
|
+
}), ur = {
|
|
1654
|
+
viewBox: "0 0 24 24",
|
|
1655
|
+
width: "1.2em",
|
|
1656
|
+
height: "1.2em"
|
|
1657
|
+
};
|
|
1658
|
+
function dr(e, t) {
|
|
1659
|
+
return C(), o("svg", ur, [...t[0] ||= [s("path", {
|
|
1660
|
+
fill: "none",
|
|
1661
|
+
stroke: "currentColor",
|
|
1662
|
+
"stroke-linecap": "round",
|
|
1663
|
+
"stroke-linejoin": "round",
|
|
1664
|
+
"stroke-width": "2",
|
|
1665
|
+
d: "m7 8l-4 4l4 4m10-8l4 4l-4 4M3 12h18"
|
|
1666
|
+
}, null, -1)]]);
|
|
1667
|
+
}
|
|
1668
|
+
var fr = h({
|
|
1669
|
+
name: "tabler-arrows-horizontal",
|
|
1670
|
+
render: dr
|
|
1068
1671
|
});
|
|
1069
1672
|
//#endregion
|
|
1070
1673
|
//#region src/debug/canvasProfiler.ts
|
|
1071
|
-
function
|
|
1674
|
+
function pr() {
|
|
1072
1675
|
return Object.create(null);
|
|
1073
1676
|
}
|
|
1074
|
-
function
|
|
1677
|
+
function mr() {
|
|
1075
1678
|
return {
|
|
1076
|
-
ctxMethods:
|
|
1077
|
-
ctxProps:
|
|
1078
|
-
canvasProps:
|
|
1679
|
+
ctxMethods: pr(),
|
|
1680
|
+
ctxProps: pr(),
|
|
1681
|
+
canvasProps: pr(),
|
|
1079
1682
|
ctxMethodSources: Object.create(null)
|
|
1080
1683
|
};
|
|
1081
1684
|
}
|
|
1082
|
-
function
|
|
1685
|
+
function hr(e, t, n) {
|
|
1083
1686
|
let r = e[t] ??= {
|
|
1084
1687
|
count: 0,
|
|
1085
1688
|
totalTime: 0
|
|
1086
1689
|
};
|
|
1087
1690
|
r.count += 1, r.totalTime += n;
|
|
1088
1691
|
}
|
|
1089
|
-
function
|
|
1090
|
-
|
|
1692
|
+
function gr(e, t, n, r) {
|
|
1693
|
+
hr(e.ctxMethodSources[t] ??= pr(), n, r);
|
|
1091
1694
|
}
|
|
1092
|
-
function
|
|
1695
|
+
function _r(e) {
|
|
1093
1696
|
return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
|
|
1094
1697
|
name: e,
|
|
1095
1698
|
count: t.count,
|
|
@@ -1097,12 +1700,12 @@ function Qn(e) {
|
|
|
1097
1700
|
averageTime: (t.totalTime / t.count).toFixed(4)
|
|
1098
1701
|
})).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
|
|
1099
1702
|
}
|
|
1100
|
-
var
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1703
|
+
var vr = !1, yr = /* @__PURE__ */ new Map(), br = /* @__PURE__ */ new Map();
|
|
1704
|
+
function xr(e) {
|
|
1705
|
+
vr = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && wr() : Tr();
|
|
1103
1706
|
}
|
|
1104
|
-
function
|
|
1105
|
-
if (
|
|
1707
|
+
function Sr() {
|
|
1708
|
+
if (!vr) return "disabled";
|
|
1106
1709
|
let e = (/* @__PURE__ */ Error()).stack;
|
|
1107
1710
|
if (!e) return "unknown";
|
|
1108
1711
|
let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
@@ -1117,114 +1720,114 @@ function rr() {
|
|
|
1117
1720
|
}
|
|
1118
1721
|
function Q(e, t, n, r) {
|
|
1119
1722
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1120
|
-
if (
|
|
1723
|
+
if (yr.has(i)) return;
|
|
1121
1724
|
let a = Reflect.get(e, t);
|
|
1122
|
-
typeof a == "function" && (
|
|
1123
|
-
if (
|
|
1124
|
-
let i = r?.captureSource ?
|
|
1125
|
-
return
|
|
1725
|
+
typeof a == "function" && (yr.set(i, a), Reflect.set(e, t, function(...e) {
|
|
1726
|
+
if (!vr) return a.apply(this, e);
|
|
1727
|
+
let i = r?.captureSource ? Sr() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
|
|
1728
|
+
return hr(n.ctxMethods, t, c), i && gr(n, t, i, c), s;
|
|
1126
1729
|
}));
|
|
1127
1730
|
}
|
|
1128
|
-
function
|
|
1731
|
+
function Cr(e, t, n) {
|
|
1129
1732
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
1130
1733
|
if (!r?.set || !r.configurable) return;
|
|
1131
1734
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1132
|
-
|
|
1735
|
+
br.has(i) || (br.set(i, r), Object.defineProperty(e, t, {
|
|
1133
1736
|
configurable: !0,
|
|
1134
1737
|
enumerable: r.enumerable ?? !1,
|
|
1135
1738
|
get: r.get,
|
|
1136
1739
|
set(e) {
|
|
1137
|
-
if (
|
|
1740
|
+
if (!vr) {
|
|
1138
1741
|
r.set.call(this, e);
|
|
1139
1742
|
return;
|
|
1140
1743
|
}
|
|
1141
1744
|
let i = performance.now();
|
|
1142
|
-
r.set.call(this, e),
|
|
1745
|
+
r.set.call(this, e), hr(n, t, performance.now() - i);
|
|
1143
1746
|
}
|
|
1144
1747
|
}));
|
|
1145
1748
|
}
|
|
1146
|
-
function
|
|
1749
|
+
function wr() {
|
|
1147
1750
|
if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1148
1751
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1149
1752
|
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),
|
|
1753
|
+
let n = mr();
|
|
1754
|
+
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), Cr(e, "font", n.ctxProps), Cr(e, "filter", n.ctxProps), Cr(e, "shadowBlur", n.ctxProps), Cr(e, "lineWidth", n.ctxProps), Cr(t, "width", n.canvasProps), Cr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
|
|
1152
1755
|
let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
|
|
1153
1756
|
if (e) {
|
|
1154
|
-
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(
|
|
1757
|
+
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(_r(e.ctxMethods)), console.log("ctx props"), console.table(_r(e.ctxProps)), console.log("canvas props"), console.table(_r(e.canvasProps));
|
|
1155
1758
|
for (let t of ["fillText", "measureText"]) {
|
|
1156
1759
|
let n = e.ctxMethodSources[t];
|
|
1157
|
-
n && (console.log(`${t} sources`), console.table(
|
|
1760
|
+
n && (console.log(`${t} sources`), console.table(_r(n).slice(0, 20)));
|
|
1158
1761
|
}
|
|
1159
1762
|
console.groupEnd();
|
|
1160
1763
|
}
|
|
1161
1764
|
}, window.resetCanvasReport = () => {
|
|
1162
|
-
window.__KMAP_CANVAS_PROFILER_METRICS__ =
|
|
1765
|
+
window.__KMAP_CANVAS_PROFILER_METRICS__ = mr();
|
|
1163
1766
|
}, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
|
|
1164
1767
|
}
|
|
1165
|
-
function
|
|
1768
|
+
function Tr() {
|
|
1166
1769
|
if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1167
1770
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1168
|
-
|
|
1771
|
+
yr.forEach((n, r) => {
|
|
1169
1772
|
let i = r.match(/^(.+):(.+)$/);
|
|
1170
1773
|
if (!i) return;
|
|
1171
1774
|
let [, a, o] = i, s = null;
|
|
1172
1775
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
|
|
1173
|
-
}),
|
|
1776
|
+
}), yr.clear(), br.forEach((n, r) => {
|
|
1174
1777
|
let i = r.match(/^(.+):(.+)$/);
|
|
1175
1778
|
if (!i) return;
|
|
1176
1779
|
let [, a, o] = i, s = null;
|
|
1177
1780
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
|
|
1178
|
-
}),
|
|
1781
|
+
}), br.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
1782
|
}
|
|
1180
1783
|
//#endregion
|
|
1181
1784
|
//#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1182
|
-
var
|
|
1785
|
+
var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["onUpdate:modelValue"], kr = { class: "settings-label" }, Ar = ["onUpdate:modelValue"], jr = { class: "settings-label" }, Mr = ["onUpdate:modelValue"], Nr = { class: "settings-header" }, Pr = { class: "header-right" }, Fr = { class: "settings-body" }, Ir = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
1183
1786
|
__name: "ChartSettingsDialog",
|
|
1184
1787
|
props: { show: { type: Boolean } },
|
|
1185
1788
|
emits: ["close", "confirm"],
|
|
1186
1789
|
setup(u, { emit: d }) {
|
|
1187
|
-
let f = u, p = d, m =
|
|
1790
|
+
let f = u, p = d, m = J(), h = r(() => W.filter((e) => e.group === "main")), g = r(() => W.filter((e) => e.group === "experimental")), _ = r(() => W.filter((e) => e.group === "style")), v = T(!1);
|
|
1188
1791
|
function y() {
|
|
1189
1792
|
try {
|
|
1190
|
-
let e = localStorage.getItem(
|
|
1793
|
+
let e = localStorage.getItem(he);
|
|
1191
1794
|
if (e) {
|
|
1192
1795
|
let t = JSON.parse(e), n = {};
|
|
1193
|
-
return
|
|
1796
|
+
return W.forEach((e) => {
|
|
1194
1797
|
n[e.key] = t[e.key] ?? e.default;
|
|
1195
|
-
}), n.colorPresetSettings =
|
|
1798
|
+
}), n.colorPresetSettings = H(t.colorPresetSettings), n;
|
|
1196
1799
|
}
|
|
1197
1800
|
} catch {}
|
|
1198
1801
|
let e = {};
|
|
1199
|
-
return
|
|
1802
|
+
return W.forEach((t) => {
|
|
1200
1803
|
e[t.key] = t.default;
|
|
1201
1804
|
}), e.colorPresetSettings = {}, e;
|
|
1202
1805
|
}
|
|
1203
|
-
let b =
|
|
1204
|
-
|
|
1806
|
+
let b = T(y());
|
|
1807
|
+
N(() => f.show, (e) => {
|
|
1205
1808
|
e && (b.value = y());
|
|
1206
1809
|
});
|
|
1207
1810
|
function x() {
|
|
1208
1811
|
p("close");
|
|
1209
1812
|
}
|
|
1210
|
-
function
|
|
1813
|
+
function S() {
|
|
1211
1814
|
let e = {};
|
|
1212
|
-
|
|
1815
|
+
W.forEach((t) => {
|
|
1213
1816
|
e[t.key] = t.default;
|
|
1214
1817
|
}), e.colorPresetSettings = {}, b.value = e;
|
|
1215
1818
|
}
|
|
1216
|
-
function
|
|
1819
|
+
function w() {
|
|
1217
1820
|
p("confirm", { ...b.value });
|
|
1218
1821
|
}
|
|
1219
|
-
return (r, d) => (
|
|
1220
|
-
default:
|
|
1822
|
+
return (r, d) => (C(), i(t, { to: A(m) }, [l(n, { name: "overlay" }, {
|
|
1823
|
+
default: P(() => [u.show ? (C(), o("div", {
|
|
1221
1824
|
key: 0,
|
|
1222
1825
|
class: "settings-overlay",
|
|
1223
1826
|
onClick: x
|
|
1224
1827
|
}, [l(n, { name: "modal" }, {
|
|
1225
|
-
default:
|
|
1828
|
+
default: P(() => [s("div", {
|
|
1226
1829
|
class: "settings-modal",
|
|
1227
|
-
onClick: d[1] ||=
|
|
1830
|
+
onClick: d[1] ||= L(() => {}, ["stop"])
|
|
1228
1831
|
}, [
|
|
1229
1832
|
s("div", { class: "settings-header" }, [d[7] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1), s("div", { class: "header-right" }, [s("button", {
|
|
1230
1833
|
class: "settings-close",
|
|
@@ -1235,16 +1838,16 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1235
1838
|
stroke: "currentColor",
|
|
1236
1839
|
"stroke-width": "2"
|
|
1237
1840
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
1238
|
-
s("div",
|
|
1239
|
-
h.value.length > 0 ? (
|
|
1841
|
+
s("div", Er, [
|
|
1842
|
+
h.value.length > 0 ? (C(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (C(!0), o(e, null, E(h.value, (e) => (C(), o("div", {
|
|
1240
1843
|
key: e.key,
|
|
1241
1844
|
class: "settings-item"
|
|
1242
|
-
}, [s("label",
|
|
1845
|
+
}, [s("label", Dr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1243
1846
|
key: 0,
|
|
1244
1847
|
type: "checkbox",
|
|
1245
1848
|
class: "settings-checkbox",
|
|
1246
1849
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1247
|
-
}, null, 8,
|
|
1850
|
+
}, null, 8, Or)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1248
1851
|
key: 1,
|
|
1249
1852
|
"model-value": String(b.value[e.key]),
|
|
1250
1853
|
options: e.options,
|
|
@@ -1257,15 +1860,15 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1257
1860
|
"onUpdate:modelValue"
|
|
1258
1861
|
])) : a("", !0)])]))), 128))], 64)) : a("", !0),
|
|
1259
1862
|
d[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
|
|
1260
|
-
(
|
|
1863
|
+
(C(!0), o(e, null, E(_.value, (e) => (C(), o("div", {
|
|
1261
1864
|
key: e.key,
|
|
1262
1865
|
class: "settings-item"
|
|
1263
|
-
}, [s("label",
|
|
1866
|
+
}, [s("label", kr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1264
1867
|
key: 0,
|
|
1265
1868
|
type: "checkbox",
|
|
1266
1869
|
class: "settings-checkbox",
|
|
1267
1870
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1268
|
-
}, null, 8,
|
|
1871
|
+
}, null, 8, Ar)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1269
1872
|
key: 1,
|
|
1270
1873
|
"model-value": String(b.value[e.key]),
|
|
1271
1874
|
options: e.options,
|
|
@@ -1289,15 +1892,15 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1289
1892
|
height: "16",
|
|
1290
1893
|
class: "nav-arrow"
|
|
1291
1894
|
}, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
|
|
1292
|
-
g.value.length > 0 ? (
|
|
1895
|
+
g.value.length > 0 ? (C(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (C(!0), o(e, null, E(g.value, (e) => (C(), o("div", {
|
|
1293
1896
|
key: e.key,
|
|
1294
1897
|
class: "settings-item experimental"
|
|
1295
|
-
}, [s("label",
|
|
1898
|
+
}, [s("label", jr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1296
1899
|
key: 0,
|
|
1297
1900
|
type: "checkbox",
|
|
1298
1901
|
class: "settings-checkbox",
|
|
1299
1902
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1300
|
-
}, null, 8,
|
|
1903
|
+
}, null, 8, Mr)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1301
1904
|
key: 1,
|
|
1302
1905
|
"model-value": String(b.value[e.key]),
|
|
1303
1906
|
options: e.options,
|
|
@@ -1312,7 +1915,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1312
1915
|
]),
|
|
1313
1916
|
s("div", { class: "settings-footer" }, [s("button", {
|
|
1314
1917
|
class: "settings-btn reset",
|
|
1315
|
-
onClick:
|
|
1918
|
+
onClick: S
|
|
1316
1919
|
}, [...d[12] ||= [s("svg", {
|
|
1317
1920
|
viewBox: "0 0 24 24",
|
|
1318
1921
|
fill: "none",
|
|
@@ -1323,7 +1926,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1323
1926
|
onClick: x
|
|
1324
1927
|
}, "取消"), s("button", {
|
|
1325
1928
|
class: "settings-btn confirm",
|
|
1326
|
-
onClick:
|
|
1929
|
+
onClick: w
|
|
1327
1930
|
}, [...d[13] ||= [s("svg", {
|
|
1328
1931
|
viewBox: "0 0 24 24",
|
|
1329
1932
|
fill: "none",
|
|
@@ -1335,15 +1938,15 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1335
1938
|
})])) : a("", !0)]),
|
|
1336
1939
|
_: 1
|
|
1337
1940
|
}), l(n, { name: "overlay" }, {
|
|
1338
|
-
default:
|
|
1941
|
+
default: P(() => [v.value ? (C(), o("div", {
|
|
1339
1942
|
key: 0,
|
|
1340
1943
|
class: "settings-overlay nested-overlay",
|
|
1341
1944
|
onClick: d[5] ||= (e) => v.value = !1
|
|
1342
1945
|
}, [l(n, { name: "modal" }, {
|
|
1343
|
-
default:
|
|
1946
|
+
default: P(() => [s("div", {
|
|
1344
1947
|
class: "settings-modal",
|
|
1345
|
-
onClick: d[4] ||=
|
|
1346
|
-
}, [s("div",
|
|
1948
|
+
onClick: d[4] ||= L(() => {}, ["stop"])
|
|
1949
|
+
}, [s("div", Nr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", Pr, [s("button", {
|
|
1347
1950
|
class: "settings-close",
|
|
1348
1951
|
onClick: d[2] ||= (e) => v.value = !1
|
|
1349
1952
|
}, [...d[14] ||= [s("svg", {
|
|
@@ -1351,7 +1954,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1351
1954
|
fill: "none",
|
|
1352
1955
|
stroke: "currentColor",
|
|
1353
1956
|
"stroke-width": "2"
|
|
1354
|
-
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div",
|
|
1957
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", Fr, [l(K, {
|
|
1355
1958
|
"color-preset-settings": b.value.colorPresetSettings,
|
|
1356
1959
|
"onUpdate:colorPresetSettings": d[3] ||= (e) => b.value = {
|
|
1357
1960
|
...b.value,
|
|
@@ -1363,18 +1966,18 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1363
1966
|
_: 1
|
|
1364
1967
|
})], 8, ["to"]));
|
|
1365
1968
|
}
|
|
1366
|
-
}), [["__scopeId", "data-v-e04604ac"]]),
|
|
1969
|
+
}), [["__scopeId", "data-v-e04604ac"]]), Lr = {
|
|
1367
1970
|
class: "left-toolbar",
|
|
1368
1971
|
"aria-label": "图表工具栏"
|
|
1369
|
-
},
|
|
1972
|
+
}, Rr = { class: "left-toolbar__group" }, zr = [
|
|
1370
1973
|
"title",
|
|
1371
1974
|
"aria-label",
|
|
1372
1975
|
"onClick"
|
|
1373
|
-
],
|
|
1976
|
+
], Br = ["onClick"], Vr = [
|
|
1374
1977
|
"title",
|
|
1375
1978
|
"aria-label",
|
|
1376
1979
|
"onClick"
|
|
1377
|
-
],
|
|
1980
|
+
], Hr = { class: "left-toolbar__group" }, Ur = { class: "left-toolbar__group" }, Wr = ["title", "aria-label"], Gr = { class: "left-toolbar__group" }, Kr = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
1378
1981
|
__name: "LeftToolbar",
|
|
1379
1982
|
props: { isFullscreen: { type: Boolean } },
|
|
1380
1983
|
emits: [
|
|
@@ -1389,103 +1992,108 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1389
1992
|
{
|
|
1390
1993
|
id: "cursor",
|
|
1391
1994
|
title: "光标",
|
|
1392
|
-
icon:
|
|
1995
|
+
icon: hn
|
|
1393
1996
|
},
|
|
1394
1997
|
{
|
|
1395
1998
|
id: "lines",
|
|
1396
1999
|
title: "线条",
|
|
1397
|
-
icon:
|
|
2000
|
+
icon: vn,
|
|
1398
2001
|
children: [
|
|
1399
2002
|
{
|
|
1400
2003
|
id: "trend-line",
|
|
1401
2004
|
title: "线段",
|
|
1402
|
-
icon:
|
|
2005
|
+
icon: vn
|
|
1403
2006
|
},
|
|
1404
2007
|
{
|
|
1405
2008
|
id: "ray",
|
|
1406
2009
|
title: "射线",
|
|
1407
|
-
icon:
|
|
2010
|
+
icon: xn
|
|
1408
2011
|
},
|
|
1409
2012
|
{
|
|
1410
2013
|
id: "h-line",
|
|
1411
2014
|
title: "水平线",
|
|
1412
|
-
icon:
|
|
2015
|
+
icon: Dn
|
|
1413
2016
|
},
|
|
1414
2017
|
{
|
|
1415
2018
|
id: "h-ray",
|
|
1416
2019
|
title: "水平射线",
|
|
1417
|
-
icon:
|
|
2020
|
+
icon: wn
|
|
1418
2021
|
},
|
|
1419
2022
|
{
|
|
1420
2023
|
id: "v-line",
|
|
1421
2024
|
title: "垂直线",
|
|
1422
|
-
icon:
|
|
2025
|
+
icon: An
|
|
1423
2026
|
},
|
|
1424
2027
|
{
|
|
1425
2028
|
id: "crosshair-line",
|
|
1426
2029
|
title: "十字线",
|
|
1427
|
-
icon:
|
|
2030
|
+
icon: Nn
|
|
1428
2031
|
},
|
|
1429
2032
|
{
|
|
1430
2033
|
id: "info-line",
|
|
1431
2034
|
title: "信息线",
|
|
1432
|
-
icon:
|
|
2035
|
+
icon: In
|
|
1433
2036
|
}
|
|
1434
2037
|
]
|
|
1435
2038
|
},
|
|
1436
2039
|
{
|
|
1437
2040
|
id: "channels",
|
|
1438
2041
|
title: "通道",
|
|
1439
|
-
icon:
|
|
2042
|
+
icon: er,
|
|
1440
2043
|
children: [
|
|
1441
2044
|
{
|
|
1442
2045
|
id: "parallel-channel",
|
|
1443
2046
|
title: "平行通道",
|
|
1444
|
-
icon:
|
|
2047
|
+
icon: er
|
|
1445
2048
|
},
|
|
1446
2049
|
{
|
|
1447
2050
|
id: "regression-channel",
|
|
1448
2051
|
title: "回归趋势",
|
|
1449
|
-
icon:
|
|
2052
|
+
icon: rr
|
|
1450
2053
|
},
|
|
1451
2054
|
{
|
|
1452
2055
|
id: "flat-line",
|
|
1453
2056
|
title: "平滑顶底",
|
|
1454
|
-
icon:
|
|
2057
|
+
icon: or
|
|
1455
2058
|
},
|
|
1456
2059
|
{
|
|
1457
2060
|
id: "disjoint-channel",
|
|
1458
2061
|
title: "不相交通道",
|
|
1459
|
-
icon:
|
|
2062
|
+
icon: lr
|
|
1460
2063
|
}
|
|
1461
2064
|
]
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
id: "range-select",
|
|
2068
|
+
title: "导出区间数据",
|
|
2069
|
+
icon: fr
|
|
1462
2070
|
}
|
|
1463
|
-
], d = c, f =
|
|
2071
|
+
], d = c, f = T("cursor"), p = T(null), m = T(!1);
|
|
1464
2072
|
function h() {
|
|
1465
2073
|
try {
|
|
1466
|
-
let e = localStorage.getItem(
|
|
2074
|
+
let e = localStorage.getItem(he);
|
|
1467
2075
|
if (e) {
|
|
1468
2076
|
let t = JSON.parse(e), n = { ...t };
|
|
1469
|
-
return
|
|
2077
|
+
return W.forEach((e) => {
|
|
1470
2078
|
n[e.key] = t[e.key] ?? e.default;
|
|
1471
2079
|
}), n;
|
|
1472
2080
|
}
|
|
1473
2081
|
} catch {}
|
|
1474
2082
|
let e = {};
|
|
1475
|
-
return
|
|
2083
|
+
return W.forEach((t) => {
|
|
1476
2084
|
e[t.key] = t.default;
|
|
1477
2085
|
}), e;
|
|
1478
2086
|
}
|
|
1479
|
-
function
|
|
2087
|
+
function g(e) {
|
|
1480
2088
|
try {
|
|
1481
|
-
localStorage.setItem(
|
|
2089
|
+
localStorage.setItem(he, JSON.stringify(e));
|
|
1482
2090
|
} catch {}
|
|
1483
2091
|
}
|
|
1484
|
-
let v =
|
|
1485
|
-
function
|
|
2092
|
+
let v = T(h());
|
|
2093
|
+
function y(e) {
|
|
1486
2094
|
return f.value === e.id ? !0 : e.children ? e.children.some((e) => e.id === f.value) : !1;
|
|
1487
2095
|
}
|
|
1488
|
-
function
|
|
2096
|
+
function x(e) {
|
|
1489
2097
|
if (e.children?.length) {
|
|
1490
2098
|
if (!e.children.some((e) => e.id === f.value)) {
|
|
1491
2099
|
let t = e.children[0];
|
|
@@ -1496,13 +2104,13 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1496
2104
|
}
|
|
1497
2105
|
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
1498
2106
|
}
|
|
1499
|
-
function
|
|
2107
|
+
function w(e) {
|
|
1500
2108
|
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
1501
2109
|
}
|
|
1502
2110
|
function O(e) {
|
|
1503
2111
|
p.value = p.value === e ? null : e;
|
|
1504
2112
|
}
|
|
1505
|
-
function
|
|
2113
|
+
function k() {
|
|
1506
2114
|
m.value = !0;
|
|
1507
2115
|
}
|
|
1508
2116
|
function j() {
|
|
@@ -1510,67 +2118,67 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1510
2118
|
}
|
|
1511
2119
|
r({ getSettings: j });
|
|
1512
2120
|
function M(e) {
|
|
1513
|
-
v.value = { ...e },
|
|
2121
|
+
v.value = { ...e }, g(v.value), xr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
1514
2122
|
}
|
|
1515
|
-
function
|
|
2123
|
+
function N(e) {
|
|
1516
2124
|
e.target.closest(".tool-item") || (p.value = null);
|
|
1517
2125
|
}
|
|
1518
|
-
return
|
|
1519
|
-
document.addEventListener("click",
|
|
1520
|
-
}),
|
|
1521
|
-
document.removeEventListener("click",
|
|
1522
|
-
}), (r, c) => (
|
|
1523
|
-
s("div",
|
|
2126
|
+
return b(() => {
|
|
2127
|
+
document.addEventListener("click", N, !0), d("settingsChange", { ...v.value }), xr(!!v.value.enableCanvasProfiler);
|
|
2128
|
+
}), S(() => {
|
|
2129
|
+
document.removeEventListener("click", N, !0);
|
|
2130
|
+
}), (r, c) => (C(), o(e, null, [s("nav", Lr, [
|
|
2131
|
+
s("div", Rr, [(C(), o(e, null, E(u, (t) => s("div", {
|
|
1524
2132
|
key: t.id,
|
|
1525
2133
|
class: "tool-item"
|
|
1526
2134
|
}, [s("button", {
|
|
1527
2135
|
type: "button",
|
|
1528
|
-
class:
|
|
2136
|
+
class: _(["left-toolbar__button", { active: y(t) }]),
|
|
1529
2137
|
title: t.title,
|
|
1530
2138
|
"aria-label": t.title,
|
|
1531
|
-
onClick: (e) =>
|
|
1532
|
-
onPointerdown: c[0] ||=
|
|
1533
|
-
onPointermove: c[1] ||=
|
|
1534
|
-
onPointerup: c[2] ||=
|
|
1535
|
-
}, [(
|
|
2139
|
+
onClick: (e) => x(t),
|
|
2140
|
+
onPointerdown: c[0] ||= L(() => {}, ["stop"]),
|
|
2141
|
+
onPointermove: c[1] ||= L(() => {}, ["stop"]),
|
|
2142
|
+
onPointerup: c[2] ||= L(() => {}, ["stop"])
|
|
2143
|
+
}, [(C(), i(D(t.icon), {
|
|
1536
2144
|
class: "tool-icon",
|
|
1537
2145
|
"aria-hidden": "true"
|
|
1538
|
-
})), t.children && t.children.length ? (
|
|
2146
|
+
})), t.children && t.children.length ? (C(), o("span", {
|
|
1539
2147
|
key: 0,
|
|
1540
|
-
class:
|
|
1541
|
-
onClick:
|
|
2148
|
+
class: _(["corner-indicator", { open: p.value === t.id }]),
|
|
2149
|
+
onClick: L((e) => O(t.id), ["stop"]),
|
|
1542
2150
|
"aria-label": "展开子菜单"
|
|
1543
|
-
}, null, 10,
|
|
1544
|
-
default:
|
|
2151
|
+
}, null, 10, Br)) : a("", !0)], 42, zr), l(n, { name: "dropdown" }, {
|
|
2152
|
+
default: P(() => [p.value === t.id && t.children && t.children.length ? (C(), o("div", {
|
|
1545
2153
|
key: 0,
|
|
1546
2154
|
class: "tool-dropdown",
|
|
1547
|
-
onPointerdown: c[3] ||=
|
|
1548
|
-
onPointermove: c[4] ||=
|
|
1549
|
-
onPointerup: c[5] ||=
|
|
1550
|
-
}, [(
|
|
2155
|
+
onPointerdown: c[3] ||= L(() => {}, ["stop"]),
|
|
2156
|
+
onPointermove: c[4] ||= L(() => {}, ["stop"]),
|
|
2157
|
+
onPointerup: c[5] ||= L(() => {}, ["stop"])
|
|
2158
|
+
}, [(C(!0), o(e, null, E(t.children, (e) => (C(), o("button", {
|
|
1551
2159
|
key: e.id,
|
|
1552
2160
|
type: "button",
|
|
1553
|
-
class:
|
|
2161
|
+
class: _(["left-toolbar__button", { active: f.value === e.id }]),
|
|
1554
2162
|
title: e.title,
|
|
1555
2163
|
"aria-label": e.title,
|
|
1556
|
-
onClick: (t) =>
|
|
1557
|
-
}, [(
|
|
2164
|
+
onClick: (t) => w(e)
|
|
2165
|
+
}, [(C(), i(D(e.icon), {
|
|
1558
2166
|
class: "tool-icon",
|
|
1559
2167
|
"aria-hidden": "true"
|
|
1560
|
-
}))], 10,
|
|
2168
|
+
}))], 10, Vr))), 128))], 32)) : a("", !0)]),
|
|
1561
2169
|
_: 2
|
|
1562
2170
|
}, 1024)])), 64))]),
|
|
1563
2171
|
c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1564
|
-
s("div",
|
|
2172
|
+
s("div", Hr, [s("button", {
|
|
1565
2173
|
type: "button",
|
|
1566
2174
|
class: "left-toolbar__button",
|
|
1567
2175
|
title: "放大",
|
|
1568
2176
|
"aria-label": "放大",
|
|
1569
2177
|
onClick: c[6] ||= (e) => r.$emit("zoomIn"),
|
|
1570
|
-
onPointerdown: c[7] ||=
|
|
1571
|
-
onPointermove: c[8] ||=
|
|
1572
|
-
onPointerup: c[9] ||=
|
|
1573
|
-
}, [l(
|
|
2178
|
+
onPointerdown: c[7] ||= L(() => {}, ["stop"]),
|
|
2179
|
+
onPointermove: c[8] ||= L(() => {}, ["stop"]),
|
|
2180
|
+
onPointerup: c[9] ||= L(() => {}, ["stop"])
|
|
2181
|
+
}, [l(A(zn), {
|
|
1574
2182
|
class: "tool-icon",
|
|
1575
2183
|
"aria-hidden": "true"
|
|
1576
2184
|
})], 32), s("button", {
|
|
@@ -1579,53 +2187,53 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1579
2187
|
title: "缩小",
|
|
1580
2188
|
"aria-label": "缩小",
|
|
1581
2189
|
onClick: c[10] ||= (e) => r.$emit("zoomOut"),
|
|
1582
|
-
onPointerdown: c[11] ||=
|
|
1583
|
-
onPointermove: c[12] ||=
|
|
1584
|
-
onPointerup: c[13] ||=
|
|
1585
|
-
}, [l(
|
|
2190
|
+
onPointerdown: c[11] ||= L(() => {}, ["stop"]),
|
|
2191
|
+
onPointermove: c[12] ||= L(() => {}, ["stop"]),
|
|
2192
|
+
onPointerup: c[13] ||= L(() => {}, ["stop"])
|
|
2193
|
+
}, [l(A(Hn), {
|
|
1586
2194
|
class: "tool-icon",
|
|
1587
2195
|
"aria-hidden": "true"
|
|
1588
2196
|
})], 32)]),
|
|
1589
2197
|
c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1590
|
-
s("div",
|
|
2198
|
+
s("div", Ur, [s("button", {
|
|
1591
2199
|
type: "button",
|
|
1592
2200
|
class: "left-toolbar__button",
|
|
1593
2201
|
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1594
2202
|
"aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1595
2203
|
onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
|
|
1596
|
-
onPointerdown: c[15] ||=
|
|
1597
|
-
onPointermove: c[16] ||=
|
|
1598
|
-
onPointerup: c[17] ||=
|
|
1599
|
-
}, [t.isFullscreen ? (
|
|
2204
|
+
onPointerdown: c[15] ||= L(() => {}, ["stop"]),
|
|
2205
|
+
onPointermove: c[16] ||= L(() => {}, ["stop"]),
|
|
2206
|
+
onPointerup: c[17] ||= L(() => {}, ["stop"])
|
|
2207
|
+
}, [t.isFullscreen ? (C(), i(A(Jn), {
|
|
1600
2208
|
key: 0,
|
|
1601
2209
|
class: "tool-icon",
|
|
1602
2210
|
"aria-hidden": "true"
|
|
1603
|
-
})) : (
|
|
2211
|
+
})) : (C(), i(A(Gn), {
|
|
1604
2212
|
key: 1,
|
|
1605
2213
|
class: "tool-icon",
|
|
1606
2214
|
"aria-hidden": "true"
|
|
1607
|
-
}))], 40,
|
|
2215
|
+
}))], 40, Wr)]),
|
|
1608
2216
|
c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1609
|
-
s("div",
|
|
2217
|
+
s("div", Gr, [s("button", {
|
|
1610
2218
|
type: "button",
|
|
1611
2219
|
class: "left-toolbar__button",
|
|
1612
2220
|
title: "设置",
|
|
1613
2221
|
"aria-label": "设置",
|
|
1614
|
-
onClick:
|
|
1615
|
-
onPointerdown: c[18] ||=
|
|
1616
|
-
onPointermove: c[19] ||=
|
|
1617
|
-
onPointerup: c[20] ||=
|
|
1618
|
-
}, [l(
|
|
2222
|
+
onClick: k,
|
|
2223
|
+
onPointerdown: c[18] ||= L(() => {}, ["stop"]),
|
|
2224
|
+
onPointermove: c[19] ||= L(() => {}, ["stop"]),
|
|
2225
|
+
onPointerup: c[20] ||= L(() => {}, ["stop"])
|
|
2226
|
+
}, [l(A(Zn), {
|
|
1619
2227
|
class: "tool-icon",
|
|
1620
2228
|
"aria-hidden": "true"
|
|
1621
2229
|
})], 32)])
|
|
1622
|
-
]), l(
|
|
2230
|
+
]), l(Ir, {
|
|
1623
2231
|
show: m.value,
|
|
1624
2232
|
onClose: c[21] ||= (e) => m.value = !1,
|
|
1625
2233
|
onConfirm: M
|
|
1626
2234
|
}, null, 8, ["show"])], 64));
|
|
1627
2235
|
}
|
|
1628
|
-
}), [["__scopeId", "data-v-
|
|
2236
|
+
}), [["__scopeId", "data-v-e4748a67"]]), qr = /* @__PURE__ */ u({
|
|
1629
2237
|
__name: "KLineLevelDropdown",
|
|
1630
2238
|
props: { modelValue: {} },
|
|
1631
2239
|
emits: ["update:modelValue"],
|
|
@@ -1672,7 +2280,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1672
2280
|
value: "yearly"
|
|
1673
2281
|
}
|
|
1674
2282
|
], r = t;
|
|
1675
|
-
return (t, a) => (
|
|
2283
|
+
return (t, a) => (C(), i(Y, {
|
|
1676
2284
|
"model-value": e.modelValue,
|
|
1677
2285
|
options: n,
|
|
1678
2286
|
label: "级别",
|
|
@@ -1681,7 +2289,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1681
2289
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1682
2290
|
}, null, 8, ["model-value"]));
|
|
1683
2291
|
}
|
|
1684
|
-
}),
|
|
2292
|
+
}), Jr = /* @__PURE__ */ u({
|
|
1685
2293
|
__name: "KLineAdjustmentDropdown",
|
|
1686
2294
|
props: { modelValue: {} },
|
|
1687
2295
|
emits: ["update:modelValue"],
|
|
@@ -1704,7 +2312,7 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1704
2312
|
value: "none"
|
|
1705
2313
|
}
|
|
1706
2314
|
], r = t;
|
|
1707
|
-
return (t, a) => (
|
|
2315
|
+
return (t, a) => (C(), i(Y, {
|
|
1708
2316
|
"model-value": e.modelValue,
|
|
1709
2317
|
options: n,
|
|
1710
2318
|
label: "复权",
|
|
@@ -1713,13 +2321,13 @@ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["on
|
|
|
1713
2321
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1714
2322
|
}, null, 8, ["model-value"]));
|
|
1715
2323
|
}
|
|
1716
|
-
}),
|
|
2324
|
+
}), Yr = {
|
|
1717
2325
|
viewBox: "0 0 24 24",
|
|
1718
2326
|
width: "1.2em",
|
|
1719
2327
|
height: "1.2em"
|
|
1720
2328
|
};
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
2329
|
+
function Xr(e, t) {
|
|
2330
|
+
return C(), o("svg", Yr, [...t[0] ||= [s("path", {
|
|
1723
2331
|
fill: "none",
|
|
1724
2332
|
stroke: "currentColor",
|
|
1725
2333
|
"stroke-linecap": "round",
|
|
@@ -1728,26 +2336,21 @@ function jr(e, t) {
|
|
|
1728
2336
|
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
2337
|
}, null, -1)]]);
|
|
1730
2338
|
}
|
|
1731
|
-
var
|
|
2339
|
+
var Zr = h({
|
|
1732
2340
|
name: "tabler-alert-triangle",
|
|
1733
|
-
render:
|
|
1734
|
-
}),
|
|
2341
|
+
render: Xr
|
|
2342
|
+
}), Qr = ["title", "aria-expanded"], $r = { class: "symbol-chip__code" }, ei = {
|
|
1735
2343
|
key: 0,
|
|
1736
2344
|
class: "symbol-chip__spinner",
|
|
1737
2345
|
"aria-hidden": "true"
|
|
1738
|
-
},
|
|
1739
|
-
key: 0,
|
|
1740
|
-
class: "symbol-popover",
|
|
1741
|
-
role: "dialog",
|
|
1742
|
-
"aria-label": "切换合约"
|
|
1743
|
-
}, Lr = { class: "symbol-search" }, Rr = {
|
|
2346
|
+
}, ti = { class: "symbol-search" }, ni = {
|
|
1744
2347
|
class: "symbol-list",
|
|
1745
2348
|
role: "listbox",
|
|
1746
2349
|
"aria-label": "商品列表"
|
|
1747
|
-
},
|
|
2350
|
+
}, ri = {
|
|
1748
2351
|
key: 0,
|
|
1749
2352
|
class: "symbol-list__empty"
|
|
1750
|
-
},
|
|
2353
|
+
}, ii = {
|
|
1751
2354
|
width: "32",
|
|
1752
2355
|
height: "32",
|
|
1753
2356
|
viewBox: "0 0 32 32",
|
|
@@ -1756,7 +2359,7 @@ var Mr = m({
|
|
|
1756
2359
|
"margin-bottom": "8px",
|
|
1757
2360
|
opacity: "0.35"
|
|
1758
2361
|
}
|
|
1759
|
-
},
|
|
2362
|
+
}, ai = ["aria-selected", "onClick"], oi = { class: "symbol-list__left" }, si = { class: "symbol-list__code" }, ci = { class: "symbol-list__desc" }, li = { class: "symbol-list__exchange" }, ui = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
1760
2363
|
__name: "SymbolSelector",
|
|
1761
2364
|
props: {
|
|
1762
2365
|
symbol: {},
|
|
@@ -1765,47 +2368,59 @@ var Mr = m({
|
|
|
1765
2368
|
error: { type: Boolean }
|
|
1766
2369
|
},
|
|
1767
2370
|
emits: ["change"],
|
|
1768
|
-
setup(
|
|
1769
|
-
let
|
|
1770
|
-
let e =
|
|
1771
|
-
return e ? `${e.code} - ${e.description}` :
|
|
1772
|
-
}),
|
|
1773
|
-
let e =
|
|
1774
|
-
return e ?
|
|
2371
|
+
setup(c, { emit: u }) {
|
|
2372
|
+
let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = J(), { popupStyle: D, startPositionSync: O, stopPositionSync: j } = q(x, S, 8), I = r(() => d.symbols.find((e) => e.code === d.symbol)), L = r(() => {
|
|
2373
|
+
let e = I.value;
|
|
2374
|
+
return e ? `${e.code} - ${e.description}` : d.symbol;
|
|
2375
|
+
}), R = r(() => {
|
|
2376
|
+
let e = m.value.trim().toLowerCase();
|
|
2377
|
+
return e ? d.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : d.symbols;
|
|
1775
2378
|
});
|
|
1776
|
-
function
|
|
1777
|
-
|
|
2379
|
+
function z() {
|
|
2380
|
+
p.value = !p.value, p.value && g(() => h.value?.focus());
|
|
1778
2381
|
}
|
|
1779
|
-
|
|
1780
|
-
|
|
2382
|
+
N(p, (e) => {
|
|
2383
|
+
e ? O() : j();
|
|
2384
|
+
});
|
|
2385
|
+
function ee() {
|
|
2386
|
+
m.value = "", h.value?.focus();
|
|
1781
2387
|
}
|
|
1782
|
-
function
|
|
1783
|
-
function
|
|
1784
|
-
|
|
2388
|
+
function te() {}
|
|
2389
|
+
function B(e) {
|
|
2390
|
+
f("change", e), p.value = !1, m.value = "";
|
|
1785
2391
|
}
|
|
1786
|
-
function
|
|
1787
|
-
|
|
2392
|
+
function V(e) {
|
|
2393
|
+
let t = x.value, n = S.value;
|
|
2394
|
+
t && !t.contains(e.target) && !n?.contains(e.target) && (p.value = !1);
|
|
1788
2395
|
}
|
|
1789
|
-
return
|
|
1790
|
-
|
|
1791
|
-
}), (r,
|
|
2396
|
+
return b(() => document.addEventListener("mousedown", V)), y(() => document.removeEventListener("mousedown", V)), N(() => d.symbol, () => {
|
|
2397
|
+
p.value = !1, m.value = "";
|
|
2398
|
+
}), (r, u) => (C(), o("div", {
|
|
1792
2399
|
ref_key: "chipWrapRef",
|
|
1793
|
-
ref:
|
|
2400
|
+
ref: x,
|
|
1794
2401
|
class: "symbol-chip-wrap"
|
|
1795
2402
|
}, [s("button", {
|
|
1796
2403
|
type: "button",
|
|
1797
|
-
class:
|
|
1798
|
-
title:
|
|
1799
|
-
"aria-expanded":
|
|
2404
|
+
class: _(["symbol-chip", { "is-open": p.value }]),
|
|
2405
|
+
title: L.value,
|
|
2406
|
+
"aria-expanded": p.value,
|
|
1800
2407
|
"aria-haspopup": "dialog",
|
|
1801
|
-
onClick:
|
|
1802
|
-
}, [s("span",
|
|
2408
|
+
onClick: z
|
|
2409
|
+
}, [s("span", $r, k(L.value), 1), c.loading ? (C(), o("span", ei)) : c.error ? (C(), i(A(Zr), {
|
|
1803
2410
|
key: 1,
|
|
1804
2411
|
class: "symbol-chip__warn",
|
|
1805
2412
|
"aria-hidden": "true"
|
|
1806
|
-
})) : a("", !0)], 10,
|
|
1807
|
-
default:
|
|
1808
|
-
|
|
2413
|
+
})) : a("", !0)], 10, Qr), (C(), i(t, { to: A(w) }, [l(n, { name: "symbol-popover" }, {
|
|
2414
|
+
default: P(() => [p.value ? (C(), o("div", {
|
|
2415
|
+
key: 0,
|
|
2416
|
+
ref_key: "popupRef",
|
|
2417
|
+
ref: S,
|
|
2418
|
+
class: "symbol-popover",
|
|
2419
|
+
style: v(A(D)),
|
|
2420
|
+
role: "dialog",
|
|
2421
|
+
"aria-label": "切换合约"
|
|
2422
|
+
}, [s("div", ti, [
|
|
2423
|
+
u[2] ||= s("span", {
|
|
1809
2424
|
class: "symbol-search__icon",
|
|
1810
2425
|
"aria-hidden": "true"
|
|
1811
2426
|
}, [s("svg", {
|
|
@@ -1828,25 +2443,25 @@ var Mr = m({
|
|
|
1828
2443
|
"stroke-width": "1.6",
|
|
1829
2444
|
"stroke-linecap": "round"
|
|
1830
2445
|
})])], -1),
|
|
1831
|
-
|
|
2446
|
+
F(s("input", {
|
|
1832
2447
|
ref_key: "searchInputRef",
|
|
1833
|
-
ref:
|
|
1834
|
-
"onUpdate:modelValue":
|
|
2448
|
+
ref: h,
|
|
2449
|
+
"onUpdate:modelValue": u[0] ||= (e) => m.value = e,
|
|
1835
2450
|
class: "symbol-search__input",
|
|
1836
2451
|
type: "text",
|
|
1837
2452
|
placeholder: "搜索代码或名称…",
|
|
1838
2453
|
autocomplete: "off",
|
|
1839
2454
|
spellcheck: "false",
|
|
1840
2455
|
"aria-label": "搜索商品",
|
|
1841
|
-
onInput:
|
|
1842
|
-
}, null, 544), [[
|
|
1843
|
-
|
|
2456
|
+
onInput: te
|
|
2457
|
+
}, null, 544), [[M, m.value]]),
|
|
2458
|
+
m.value ? (C(), o("button", {
|
|
1844
2459
|
key: 0,
|
|
1845
2460
|
type: "button",
|
|
1846
2461
|
class: "symbol-search__clear",
|
|
1847
2462
|
"aria-label": "清空搜索",
|
|
1848
|
-
onClick:
|
|
1849
|
-
}, [...
|
|
2463
|
+
onClick: ee
|
|
2464
|
+
}, [...u[1] ||= [s("svg", {
|
|
1850
2465
|
class: "delete-icon",
|
|
1851
2466
|
viewBox: "0 0 24 24",
|
|
1852
2467
|
fill: "none",
|
|
@@ -1860,7 +2475,7 @@ var Mr = m({
|
|
|
1860
2475
|
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
1861
2476
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
1862
2477
|
], -1)]])) : a("", !0)
|
|
1863
|
-
]), s("div",
|
|
2478
|
+
]), s("div", ni, [R.value.length === 0 ? (C(), o("div", ri, [(C(), o("svg", ii, [...u[3] ||= [s("circle", {
|
|
1864
2479
|
cx: "13",
|
|
1865
2480
|
cy: "13",
|
|
1866
2481
|
r: "10",
|
|
@@ -1874,39 +2489,34 @@ var Mr = m({
|
|
|
1874
2489
|
stroke: "currentColor",
|
|
1875
2490
|
"stroke-width": "2",
|
|
1876
2491
|
"stroke-linecap": "round"
|
|
1877
|
-
}, null, -1)]])),
|
|
2492
|
+
}, null, -1)]])), u[4] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (C(!0), o(e, null, E(R.value, (e) => (C(), o("button", {
|
|
1878
2493
|
key: e.code,
|
|
1879
2494
|
type: "button",
|
|
1880
|
-
class:
|
|
2495
|
+
class: _(["symbol-list__item", { "is-active": e.code === c.symbol }]),
|
|
1881
2496
|
role: "option",
|
|
1882
|
-
"aria-selected": e.code ===
|
|
1883
|
-
onClick: (t) =>
|
|
1884
|
-
}, [s("span",
|
|
2497
|
+
"aria-selected": e.code === c.symbol,
|
|
2498
|
+
onClick: (t) => B(e)
|
|
2499
|
+
}, [s("span", oi, [s("span", si, k(e.code), 1), s("span", ci, k(e.description), 1)]), s("span", li, k(e.exchange), 1)], 10, ai))), 128))])], 4)) : a("", !0)]),
|
|
1885
2500
|
_: 1
|
|
1886
|
-
})], 512));
|
|
2501
|
+
})], 8, ["to"]))], 512));
|
|
1887
2502
|
}
|
|
1888
|
-
}), [["__scopeId", "data-v-
|
|
2503
|
+
}), [["__scopeId", "data-v-637dd0f1"]]), di = ["aria-expanded"], fi = {
|
|
1889
2504
|
key: 0,
|
|
1890
2505
|
class: "compare-chip__spinner"
|
|
1891
|
-
},
|
|
2506
|
+
}, pi = {
|
|
1892
2507
|
key: 1,
|
|
1893
2508
|
class: "compare-chip__badge"
|
|
1894
|
-
},
|
|
1895
|
-
key: 0,
|
|
1896
|
-
class: "compare-popover",
|
|
1897
|
-
role: "dialog",
|
|
1898
|
-
"aria-label": "比较商品"
|
|
1899
|
-
}, Zr = { class: "compare-search" }, Qr = {
|
|
2509
|
+
}, mi = { class: "compare-search" }, hi = {
|
|
1900
2510
|
key: 0,
|
|
1901
2511
|
class: "compare-selected"
|
|
1902
|
-
},
|
|
2512
|
+
}, gi = { class: "compare-selected__list" }, _i = { class: "compare-selected__code" }, vi = { class: "compare-selected__desc" }, yi = ["aria-label", "onClick"], bi = {
|
|
1903
2513
|
class: "compare-list",
|
|
1904
2514
|
role: "listbox",
|
|
1905
2515
|
"aria-label": "商品列表"
|
|
1906
|
-
},
|
|
2516
|
+
}, xi = {
|
|
1907
2517
|
key: 0,
|
|
1908
2518
|
class: "compare-list__empty"
|
|
1909
|
-
},
|
|
2519
|
+
}, Si = {
|
|
1910
2520
|
width: "32",
|
|
1911
2521
|
height: "32",
|
|
1912
2522
|
viewBox: "0 0 32 32",
|
|
@@ -1915,11 +2525,11 @@ var Mr = m({
|
|
|
1915
2525
|
"margin-bottom": "8px",
|
|
1916
2526
|
opacity: "0.35"
|
|
1917
2527
|
}
|
|
1918
|
-
},
|
|
2528
|
+
}, Ci = ["aria-selected", "onClick"], wi = { class: "compare-list__left" }, Ti = { class: "compare-list__code" }, Ei = { class: "compare-list__desc" }, Di = { class: "compare-list__right" }, Oi = { class: "compare-list__exchange" }, ki = {
|
|
1919
2529
|
key: 0,
|
|
1920
2530
|
class: "compare-list__check",
|
|
1921
2531
|
"aria-hidden": "true"
|
|
1922
|
-
},
|
|
2532
|
+
}, Ai = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
1923
2533
|
__name: "CompareSymbolSelector",
|
|
1924
2534
|
props: {
|
|
1925
2535
|
symbols: {},
|
|
@@ -1928,55 +2538,67 @@ var Mr = m({
|
|
|
1928
2538
|
comparisonLoading: { type: Boolean }
|
|
1929
2539
|
},
|
|
1930
2540
|
emits: ["add", "remove"],
|
|
1931
|
-
setup(
|
|
1932
|
-
let
|
|
1933
|
-
let e =
|
|
1934
|
-
return
|
|
1935
|
-
}),
|
|
1936
|
-
let e =
|
|
1937
|
-
return e ?
|
|
2541
|
+
setup(c, { emit: u }) {
|
|
2542
|
+
let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = J(), { popupStyle: D, startPositionSync: O, stopPositionSync: j } = q(x, S, 8), I = r(() => new Set(d.selected ?? [])), L = r(() => {
|
|
2543
|
+
let e = I.value;
|
|
2544
|
+
return d.symbols.filter((t) => e.has(t.code));
|
|
2545
|
+
}), R = r(() => {
|
|
2546
|
+
let e = m.value.trim().toLowerCase();
|
|
2547
|
+
return e ? d.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : d.symbols;
|
|
1938
2548
|
});
|
|
1939
|
-
function
|
|
1940
|
-
return
|
|
2549
|
+
function z(e) {
|
|
2550
|
+
return I.value.has(e);
|
|
1941
2551
|
}
|
|
1942
|
-
function
|
|
1943
|
-
|
|
2552
|
+
function ee(e) {
|
|
2553
|
+
z(e.code) ? f("remove", e.code) : f("add", e);
|
|
1944
2554
|
}
|
|
1945
|
-
function
|
|
1946
|
-
|
|
2555
|
+
function te(e) {
|
|
2556
|
+
f("remove", e);
|
|
1947
2557
|
}
|
|
1948
|
-
function
|
|
1949
|
-
|
|
2558
|
+
function B() {
|
|
2559
|
+
p.value = !p.value, p.value && g(() => h.value?.focus());
|
|
1950
2560
|
}
|
|
1951
|
-
|
|
1952
|
-
|
|
2561
|
+
N(p, (e) => {
|
|
2562
|
+
e ? O() : j();
|
|
2563
|
+
});
|
|
2564
|
+
function V() {
|
|
2565
|
+
m.value = "", h.value?.focus();
|
|
1953
2566
|
}
|
|
1954
|
-
function
|
|
1955
|
-
|
|
2567
|
+
function ne(e) {
|
|
2568
|
+
let t = x.value, n = S.value;
|
|
2569
|
+
t && !t.contains(e.target) && !n?.contains(e.target) && (p.value = !1, m.value = "");
|
|
1956
2570
|
}
|
|
1957
|
-
return
|
|
2571
|
+
return b(() => document.addEventListener("mousedown", ne)), y(() => document.removeEventListener("mousedown", ne)), (r, u) => (C(), o("div", {
|
|
1958
2572
|
ref_key: "rootRef",
|
|
1959
|
-
ref:
|
|
2573
|
+
ref: x,
|
|
1960
2574
|
class: "compare-chip-wrap"
|
|
1961
2575
|
}, [s("button", {
|
|
1962
2576
|
type: "button",
|
|
1963
|
-
class:
|
|
2577
|
+
class: _(["compare-chip", { "is-open": p.value }]),
|
|
1964
2578
|
title: "比较商品",
|
|
1965
|
-
"aria-expanded":
|
|
2579
|
+
"aria-expanded": p.value,
|
|
1966
2580
|
"aria-haspopup": "dialog",
|
|
1967
|
-
onClick:
|
|
2581
|
+
onClick: B
|
|
1968
2582
|
}, [
|
|
1969
|
-
|
|
2583
|
+
u[1] ||= s("span", {
|
|
1970
2584
|
class: "compare-chip__icon",
|
|
1971
2585
|
"aria-hidden": "true"
|
|
1972
2586
|
}, "+", -1),
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
], 10,
|
|
1977
|
-
default:
|
|
1978
|
-
|
|
1979
|
-
|
|
2587
|
+
u[2] ||= s("span", { class: "compare-chip__text" }, "比较商品", -1),
|
|
2588
|
+
c.comparisonLoading ? (C(), o("span", fi)) : a("", !0),
|
|
2589
|
+
c.selected.length > 0 ? (C(), o("span", pi, k(c.selected.length), 1)) : a("", !0)
|
|
2590
|
+
], 10, di), (C(), i(t, { to: A(w) }, [l(n, { name: "symbol-popover" }, {
|
|
2591
|
+
default: P(() => [p.value ? (C(), o("div", {
|
|
2592
|
+
key: 0,
|
|
2593
|
+
ref_key: "popupRef",
|
|
2594
|
+
ref: S,
|
|
2595
|
+
class: "compare-popover",
|
|
2596
|
+
style: v(A(D)),
|
|
2597
|
+
role: "dialog",
|
|
2598
|
+
"aria-label": "比较商品"
|
|
2599
|
+
}, [
|
|
2600
|
+
s("div", mi, [
|
|
2601
|
+
u[4] ||= s("span", {
|
|
1980
2602
|
class: "compare-search__icon",
|
|
1981
2603
|
"aria-hidden": "true"
|
|
1982
2604
|
}, [s("svg", {
|
|
@@ -1999,24 +2621,24 @@ var Mr = m({
|
|
|
1999
2621
|
"stroke-width": "1.6",
|
|
2000
2622
|
"stroke-linecap": "round"
|
|
2001
2623
|
})])], -1),
|
|
2002
|
-
|
|
2624
|
+
F(s("input", {
|
|
2003
2625
|
ref_key: "searchInputRef",
|
|
2004
|
-
ref:
|
|
2005
|
-
"onUpdate:modelValue":
|
|
2626
|
+
ref: h,
|
|
2627
|
+
"onUpdate:modelValue": u[0] ||= (e) => m.value = e,
|
|
2006
2628
|
class: "compare-search__input",
|
|
2007
2629
|
type: "text",
|
|
2008
2630
|
placeholder: "搜索代码或名称…",
|
|
2009
2631
|
autocomplete: "off",
|
|
2010
2632
|
spellcheck: "false",
|
|
2011
2633
|
"aria-label": "搜索比较商品"
|
|
2012
|
-
}, null, 512), [[
|
|
2013
|
-
|
|
2634
|
+
}, null, 512), [[M, m.value]]),
|
|
2635
|
+
m.value ? (C(), o("button", {
|
|
2014
2636
|
key: 0,
|
|
2015
2637
|
type: "button",
|
|
2016
2638
|
class: "compare-search__clear",
|
|
2017
2639
|
"aria-label": "清空搜索",
|
|
2018
|
-
onClick:
|
|
2019
|
-
}, [...
|
|
2640
|
+
onClick: V
|
|
2641
|
+
}, [...u[3] ||= [s("svg", {
|
|
2020
2642
|
class: "delete-icon",
|
|
2021
2643
|
viewBox: "0 0 24 24",
|
|
2022
2644
|
fill: "none",
|
|
@@ -2031,22 +2653,22 @@ var Mr = m({
|
|
|
2031
2653
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
2032
2654
|
], -1)]])) : a("", !0)
|
|
2033
2655
|
]),
|
|
2034
|
-
|
|
2656
|
+
c.selected.length > 0 ? (C(), o("div", hi, [u[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", gi, [(C(!0), o(e, null, E(L.value, (e) => (C(), o("div", {
|
|
2035
2657
|
key: e.code,
|
|
2036
2658
|
class: "compare-selected__item"
|
|
2037
2659
|
}, [
|
|
2038
2660
|
s("span", {
|
|
2039
2661
|
class: "compare-selected__color",
|
|
2040
|
-
style:
|
|
2662
|
+
style: v({ background: c.comparisonColors?.get(e.code) ?? "#888" })
|
|
2041
2663
|
}, null, 4),
|
|
2042
|
-
s("span",
|
|
2043
|
-
s("span",
|
|
2664
|
+
s("span", _i, k(e.code), 1),
|
|
2665
|
+
s("span", vi, k(e.description), 1),
|
|
2044
2666
|
s("button", {
|
|
2045
2667
|
type: "button",
|
|
2046
2668
|
class: "compare-selected__remove",
|
|
2047
2669
|
"aria-label": "移除 " + e.code,
|
|
2048
|
-
onClick: (t) =>
|
|
2049
|
-
}, [...
|
|
2670
|
+
onClick: (t) => te(e.code)
|
|
2671
|
+
}, [...u[5] ||= [s("svg", {
|
|
2050
2672
|
viewBox: "0 0 24 24",
|
|
2051
2673
|
width: "12",
|
|
2052
2674
|
height: "12",
|
|
@@ -2055,9 +2677,9 @@ var Mr = m({
|
|
|
2055
2677
|
"stroke-width": "2",
|
|
2056
2678
|
"stroke-linecap": "round",
|
|
2057
2679
|
"stroke-linejoin": "round"
|
|
2058
|
-
}, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8,
|
|
2680
|
+
}, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, yi)
|
|
2059
2681
|
]))), 128))])])) : a("", !0),
|
|
2060
|
-
s("div",
|
|
2682
|
+
s("div", bi, [R.value.length === 0 ? (C(), o("div", xi, [(C(), o("svg", Si, [...u[7] ||= [s("circle", {
|
|
2061
2683
|
cx: "13",
|
|
2062
2684
|
cy: "13",
|
|
2063
2685
|
r: "10",
|
|
@@ -2071,14 +2693,14 @@ var Mr = m({
|
|
|
2071
2693
|
stroke: "currentColor",
|
|
2072
2694
|
"stroke-width": "2",
|
|
2073
2695
|
"stroke-linecap": "round"
|
|
2074
|
-
}, null, -1)]])),
|
|
2696
|
+
}, null, -1)]])), u[8] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (C(!0), o(e, null, E(R.value, (e) => (C(), o("button", {
|
|
2075
2697
|
key: e.code,
|
|
2076
2698
|
type: "button",
|
|
2077
|
-
class:
|
|
2699
|
+
class: _(["compare-list__item", { "is-selected": z(e.code) }]),
|
|
2078
2700
|
role: "option",
|
|
2079
|
-
"aria-selected":
|
|
2080
|
-
onClick: (t) =>
|
|
2081
|
-
}, [s("span",
|
|
2701
|
+
"aria-selected": z(e.code),
|
|
2702
|
+
onClick: (t) => ee(e)
|
|
2703
|
+
}, [s("span", wi, [s("span", Ti, k(e.code), 1), s("span", Ei, k(e.description), 1)]), s("span", Di, [s("span", Oi, k(e.exchange), 1), z(e.code) ? (C(), o("span", ki, [...u[9] ||= [s("svg", {
|
|
2082
2704
|
viewBox: "0 0 24 24",
|
|
2083
2705
|
width: "16",
|
|
2084
2706
|
height: "16",
|
|
@@ -2087,12 +2709,12 @@ var Mr = m({
|
|
|
2087
2709
|
"stroke-width": "2.5",
|
|
2088
2710
|
"stroke-linecap": "round",
|
|
2089
2711
|
"stroke-linejoin": "round"
|
|
2090
|
-
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10,
|
|
2091
|
-
])) : a("", !0)]),
|
|
2712
|
+
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, Ci))), 128))])
|
|
2713
|
+
], 4)) : a("", !0)]),
|
|
2092
2714
|
_: 1
|
|
2093
|
-
})], 512));
|
|
2715
|
+
})], 8, ["to"]))], 512));
|
|
2094
2716
|
}
|
|
2095
|
-
}), [["__scopeId", "data-v-
|
|
2717
|
+
}), [["__scopeId", "data-v-b6189a87"]]), ji = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
2096
2718
|
__name: "TopToolbar",
|
|
2097
2719
|
props: {
|
|
2098
2720
|
symbol: {},
|
|
@@ -2114,7 +2736,26 @@ var Mr = m({
|
|
|
2114
2736
|
"symbolChange"
|
|
2115
2737
|
],
|
|
2116
2738
|
setup(e, { emit: t }) {
|
|
2117
|
-
let n =
|
|
2739
|
+
let n = T(null), c = !1, u = 0, d = 0;
|
|
2740
|
+
function f(e) {
|
|
2741
|
+
let t = n.value;
|
|
2742
|
+
t && (c = !0, u = e.pageX - t.getBoundingClientRect().left, d = t.scrollLeft, t.style.cursor = "grabbing", t.style.userSelect = "none");
|
|
2743
|
+
}
|
|
2744
|
+
function p(e) {
|
|
2745
|
+
if (!c) return;
|
|
2746
|
+
let t = n.value;
|
|
2747
|
+
if (!t) return;
|
|
2748
|
+
e.preventDefault();
|
|
2749
|
+
let r = e.pageX - t.getBoundingClientRect().left - u;
|
|
2750
|
+
t.scrollLeft = d - r;
|
|
2751
|
+
}
|
|
2752
|
+
function m() {
|
|
2753
|
+
if (!c) return;
|
|
2754
|
+
c = !1;
|
|
2755
|
+
let e = n.value;
|
|
2756
|
+
e && (e.style.cursor = "", e.style.userSelect = "");
|
|
2757
|
+
}
|
|
2758
|
+
let h = e, g = t, _ = [
|
|
2118
2759
|
{
|
|
2119
2760
|
code: "XAUUSD",
|
|
2120
2761
|
description: "现货黄金",
|
|
@@ -2199,67 +2840,168 @@ var Mr = m({
|
|
|
2199
2840
|
exchange: "MOCK",
|
|
2200
2841
|
source: "mock-10000"
|
|
2201
2842
|
}
|
|
2202
|
-
],
|
|
2203
|
-
function
|
|
2204
|
-
|
|
2205
|
-
}
|
|
2206
|
-
return (t,
|
|
2207
|
-
|
|
2843
|
+
], v = r(() => h.symbol?.trim() ?? ""), y = r(() => h.symbols && h.symbols.length ? h.symbols : _);
|
|
2844
|
+
function b(e) {
|
|
2845
|
+
g("symbolChange", e);
|
|
2846
|
+
}
|
|
2847
|
+
return (t, r) => (C(), o("div", {
|
|
2848
|
+
ref_key: "toolbarRef",
|
|
2849
|
+
ref: n,
|
|
2850
|
+
class: "top-toolbar",
|
|
2851
|
+
onMousedown: f,
|
|
2852
|
+
onMousemove: p,
|
|
2853
|
+
onMouseup: m,
|
|
2854
|
+
onMouseleave: m
|
|
2855
|
+
}, [
|
|
2856
|
+
v.value ? (C(), i(ui, {
|
|
2208
2857
|
key: 0,
|
|
2209
|
-
symbol:
|
|
2210
|
-
symbols:
|
|
2858
|
+
symbol: v.value,
|
|
2859
|
+
symbols: y.value,
|
|
2211
2860
|
loading: e.symbolLoading,
|
|
2212
2861
|
error: e.symbolError,
|
|
2213
|
-
onChange:
|
|
2862
|
+
onChange: b
|
|
2214
2863
|
}, null, 8, [
|
|
2215
2864
|
"symbol",
|
|
2216
2865
|
"symbols",
|
|
2217
2866
|
"loading",
|
|
2218
2867
|
"error"
|
|
2219
2868
|
])) : a("", !0),
|
|
2220
|
-
l(
|
|
2221
|
-
symbols:
|
|
2869
|
+
l(Ai, {
|
|
2870
|
+
symbols: y.value,
|
|
2222
2871
|
selected: e.overlaySymbols,
|
|
2223
2872
|
"comparison-colors": e.comparisonColors,
|
|
2224
2873
|
"comparison-loading": e.comparisonLoading,
|
|
2225
|
-
onAdd:
|
|
2226
|
-
onRemove:
|
|
2874
|
+
onAdd: r[0] ||= (e) => g("addOverlaySymbol", e),
|
|
2875
|
+
onRemove: r[1] ||= (e) => g("removeOverlaySymbol", e)
|
|
2227
2876
|
}, null, 8, [
|
|
2228
2877
|
"symbols",
|
|
2229
2878
|
"selected",
|
|
2230
2879
|
"comparison-colors",
|
|
2231
2880
|
"comparison-loading"
|
|
2232
2881
|
]),
|
|
2233
|
-
l(
|
|
2882
|
+
l(qr, {
|
|
2234
2883
|
"model-value": e.kLineLevel,
|
|
2235
|
-
"onUpdate:modelValue":
|
|
2884
|
+
"onUpdate:modelValue": r[2] ||= (e) => g("kLineLevelChange", e)
|
|
2236
2885
|
}, null, 8, ["model-value"]),
|
|
2237
|
-
l(
|
|
2886
|
+
l(Jr, {
|
|
2238
2887
|
"model-value": e.kLineAdjust,
|
|
2239
|
-
"onUpdate:modelValue":
|
|
2888
|
+
"onUpdate:modelValue": r[3] ||= (e) => g("kLineAdjustChange", e)
|
|
2240
2889
|
}, null, 8, ["model-value"]),
|
|
2241
2890
|
s("button", {
|
|
2242
2891
|
type: "button",
|
|
2243
2892
|
class: "indicator-button",
|
|
2244
2893
|
title: "指标",
|
|
2245
2894
|
"aria-label": "指标",
|
|
2246
|
-
onClick:
|
|
2247
|
-
}, [...
|
|
2895
|
+
onClick: r[4] ||= (e) => g("toggleIndicator")
|
|
2896
|
+
}, [...r[5] ||= [s("span", {
|
|
2248
2897
|
class: "indicator-button__icon",
|
|
2249
2898
|
"aria-hidden": "true"
|
|
2250
2899
|
}, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
|
|
2251
|
-
]));
|
|
2900
|
+
], 544));
|
|
2901
|
+
}
|
|
2902
|
+
}), [["__scopeId", "data-v-8ecedbff"]]), Mi = { class: "batch-header" }, Ni = { class: "batch-body" }, Pi = { class: "batch-footer" }, Fi = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
2903
|
+
__name: "BatchStockDialog",
|
|
2904
|
+
props: { show: { type: Boolean } },
|
|
2905
|
+
emits: ["close", "apply"],
|
|
2906
|
+
setup(e, { emit: c }) {
|
|
2907
|
+
let u = c, d = J(), f = T([]), p = r({
|
|
2908
|
+
get: () => f.value.join("\n"),
|
|
2909
|
+
set: (e) => {
|
|
2910
|
+
f.value = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
2911
|
+
}
|
|
2912
|
+
});
|
|
2913
|
+
function m() {
|
|
2914
|
+
f.value.length !== 0 && (u("apply", f.value), u("close"));
|
|
2915
|
+
}
|
|
2916
|
+
return (r, c) => (C(), i(t, { to: A(d) }, [l(n, { name: "overlay" }, {
|
|
2917
|
+
default: P(() => [e.show ? (C(), o("div", {
|
|
2918
|
+
key: 0,
|
|
2919
|
+
class: "batch-overlay",
|
|
2920
|
+
onClick: c[4] ||= (e) => u("close")
|
|
2921
|
+
}, [l(n, { name: "modal" }, {
|
|
2922
|
+
default: P(() => [s("div", {
|
|
2923
|
+
class: "batch-modal",
|
|
2924
|
+
onClick: c[3] ||= L(() => {}, ["stop"])
|
|
2925
|
+
}, [
|
|
2926
|
+
s("div", Mi, [c[6] ||= s("span", { class: "batch-title" }, "批量设置股票代码", -1), s("button", {
|
|
2927
|
+
class: "batch-close-btn",
|
|
2928
|
+
onClick: c[0] ||= (e) => u("close")
|
|
2929
|
+
}, [...c[5] ||= [s("svg", {
|
|
2930
|
+
viewBox: "0 0 24 24",
|
|
2931
|
+
fill: "none",
|
|
2932
|
+
stroke: "currentColor",
|
|
2933
|
+
"stroke-width": "2"
|
|
2934
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])]),
|
|
2935
|
+
s("div", Ni, [F(s("textarea", {
|
|
2936
|
+
"onUpdate:modelValue": c[1] ||= (e) => p.value = e,
|
|
2937
|
+
class: "batch-textarea",
|
|
2938
|
+
placeholder: "每行一个股票代码\n例如:\n000001\n600036\n002415",
|
|
2939
|
+
rows: "8",
|
|
2940
|
+
spellcheck: "false"
|
|
2941
|
+
}, null, 512), [[M, p.value]])]),
|
|
2942
|
+
s("div", Pi, [s("button", {
|
|
2943
|
+
class: "batch-btn batch-btn--cancel",
|
|
2944
|
+
onClick: c[2] ||= (e) => u("close")
|
|
2945
|
+
}, "取消"), s("button", {
|
|
2946
|
+
class: "batch-btn batch-btn--confirm",
|
|
2947
|
+
onClick: m
|
|
2948
|
+
}, "应用")])
|
|
2949
|
+
])]),
|
|
2950
|
+
_: 1
|
|
2951
|
+
})])) : a("", !0)]),
|
|
2952
|
+
_: 1
|
|
2953
|
+
})], 8, ["to"]));
|
|
2954
|
+
}
|
|
2955
|
+
}), [["__scopeId", "data-v-b1448f44"]]), Ii = {
|
|
2956
|
+
key: 0,
|
|
2957
|
+
class: "export-overlay"
|
|
2958
|
+
}, Li = { class: "export-header" }, Ri = { class: "export-body" }, zi = { class: "export-label" }, Bi = { class: "export-bar-track" }, Vi = { class: "export-counter" }, Hi = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
2959
|
+
__name: "ExportProgressDialog",
|
|
2960
|
+
props: { progress: {} },
|
|
2961
|
+
emits: ["close"],
|
|
2962
|
+
setup(e, { emit: c }) {
|
|
2963
|
+
let u = e, d = c, f = J(), p = r(() => !u.progress || u.progress.total <= 0 ? 0 : Math.min(100, Math.round(u.progress.current / u.progress.total * 100)));
|
|
2964
|
+
return (r, c) => (C(), i(t, { to: A(f) }, [l(n, { name: "overlay" }, {
|
|
2965
|
+
default: P(() => [e.progress ? (C(), o("div", Ii, [l(n, { name: "modal" }, {
|
|
2966
|
+
default: P(() => [s("div", {
|
|
2967
|
+
class: "export-modal",
|
|
2968
|
+
onClick: c[2] ||= L(() => {}, ["stop"])
|
|
2969
|
+
}, [s("div", Li, [c[4] ||= s("span", { class: "export-title" }, "导出数据", -1), s("button", {
|
|
2970
|
+
class: "export-close-btn",
|
|
2971
|
+
onClick: c[0] ||= (e) => d("close")
|
|
2972
|
+
}, [...c[3] ||= [s("svg", {
|
|
2973
|
+
viewBox: "0 0 24 24",
|
|
2974
|
+
fill: "none",
|
|
2975
|
+
stroke: "currentColor",
|
|
2976
|
+
"stroke-width": "2"
|
|
2977
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])]), s("div", Ri, [
|
|
2978
|
+
s("div", zi, k(e.progress.label), 1),
|
|
2979
|
+
s("div", Bi, [s("div", {
|
|
2980
|
+
class: "export-bar-fill",
|
|
2981
|
+
style: v({ width: p.value + "%" })
|
|
2982
|
+
}, null, 4)]),
|
|
2983
|
+
s("div", Vi, k(e.progress.current) + " / " + k(e.progress.total), 1),
|
|
2984
|
+
e.progress.current === e.progress.total ? (C(), o("button", {
|
|
2985
|
+
key: 0,
|
|
2986
|
+
class: "export-done-btn",
|
|
2987
|
+
onClick: c[1] ||= (e) => d("close")
|
|
2988
|
+
}, "完成")) : a("", !0)
|
|
2989
|
+
])])]),
|
|
2990
|
+
_: 1
|
|
2991
|
+
})])) : a("", !0)]),
|
|
2992
|
+
_: 1
|
|
2993
|
+
})], 8, ["to"]));
|
|
2252
2994
|
}
|
|
2253
|
-
}), [["__scopeId", "data-v-
|
|
2995
|
+
}), [["__scopeId", "data-v-f4bab748"]]), Ui = ["data-theme"], Wi = {
|
|
2254
2996
|
class: "pane-separator-layer",
|
|
2255
2997
|
"aria-hidden": "true"
|
|
2256
|
-
},
|
|
2998
|
+
}, Gi = {
|
|
2257
2999
|
class: "canvas-layer",
|
|
2258
3000
|
ref: "canvasLayerRef"
|
|
2259
|
-
},
|
|
3001
|
+
}, Ki = {
|
|
2260
3002
|
class: "x-axis-canvas",
|
|
2261
3003
|
ref: "xAxisCanvasRef"
|
|
2262
|
-
},
|
|
3004
|
+
}, qi = ["placeholder"], Ji = ["placeholder"], Yi = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
2263
3005
|
__name: "KLineChart",
|
|
2264
3006
|
props: {
|
|
2265
3007
|
semanticConfig: {},
|
|
@@ -2287,23 +3029,23 @@ var Mr = m({
|
|
|
2287
3029
|
"kLineAdjustChange"
|
|
2288
3030
|
],
|
|
2289
3031
|
setup(n, { expose: c, emit: u }) {
|
|
2290
|
-
let d = n, f = u, p =
|
|
2291
|
-
function
|
|
2292
|
-
p.value = e, f("kLineLevelChange", e),
|
|
3032
|
+
let d = n, f = u, p = T(d.semanticConfig?.data?.period ?? "daily"), h = T(d.semanticConfig?.data?.adjust ?? "none"), y = r(() => p.value.includes("min")), x = T("选择商品"), w = T(null), D = T(!1), k = T(!1), j = T([]), P = T([]);
|
|
3033
|
+
function I(e) {
|
|
3034
|
+
p.value = e, f("kLineLevelChange", e), V();
|
|
2293
3035
|
}
|
|
2294
|
-
function
|
|
2295
|
-
|
|
3036
|
+
function R(e) {
|
|
3037
|
+
h.value = e, f("kLineAdjustChange", e), V();
|
|
2296
3038
|
}
|
|
2297
|
-
function
|
|
2298
|
-
|
|
3039
|
+
function z(e) {
|
|
3040
|
+
k.value = !1, x.value = e.code, w.value = e, V();
|
|
2299
3041
|
}
|
|
2300
|
-
function
|
|
2301
|
-
|
|
3042
|
+
function ee(e) {
|
|
3043
|
+
w.value?.code !== e.code && (j.value.includes(e.code) || (P.value = [...P.value, e], j.value = P.value.map((e) => e.code), ne(), U.value?.addComparisonSymbol(B(e))));
|
|
2302
3044
|
}
|
|
2303
|
-
function
|
|
2304
|
-
|
|
3045
|
+
function te(e) {
|
|
3046
|
+
P.value = P.value.filter((t) => t.code !== e), j.value = P.value.map((e) => e.code), U.value?.removeComparisonSymbol(e);
|
|
2305
3047
|
}
|
|
2306
|
-
function
|
|
3048
|
+
function B(e) {
|
|
2307
3049
|
return {
|
|
2308
3050
|
symbol: e.code,
|
|
2309
3051
|
exchange: e.exchange,
|
|
@@ -2311,91 +3053,71 @@ var Mr = m({
|
|
|
2311
3053
|
source: e.source,
|
|
2312
3054
|
startDate: d.semanticConfig?.data?.startDate ?? "",
|
|
2313
3055
|
endDate: d.semanticConfig?.data?.endDate ?? "",
|
|
2314
|
-
adjust:
|
|
3056
|
+
adjust: h.value
|
|
2315
3057
|
};
|
|
2316
3058
|
}
|
|
2317
|
-
function
|
|
2318
|
-
|
|
3059
|
+
function V() {
|
|
3060
|
+
w.value && U.value?.setSymbols([B(w.value), ...P.value.map(B)]);
|
|
2319
3061
|
}
|
|
2320
|
-
function
|
|
2321
|
-
if (
|
|
3062
|
+
function ne() {
|
|
3063
|
+
if (de.value.axisType === "percent") return;
|
|
2322
3064
|
let e = {
|
|
2323
|
-
...
|
|
3065
|
+
...de.value,
|
|
2324
3066
|
axisType: "percent"
|
|
2325
3067
|
};
|
|
2326
|
-
|
|
3068
|
+
de.value = e, U.value?.updateSettingsFacade(e);
|
|
2327
3069
|
try {
|
|
2328
|
-
localStorage.setItem(
|
|
3070
|
+
localStorage.setItem(he, JSON.stringify(e));
|
|
2329
3071
|
} catch {}
|
|
2330
3072
|
}
|
|
2331
|
-
let
|
|
2332
|
-
|
|
2333
|
-
let
|
|
2334
|
-
|
|
3073
|
+
let H = T(null), re = T(null), ie = T(null), ae = T(null), oe = T(null), ce = T(null);
|
|
3074
|
+
we(ie);
|
|
3075
|
+
let U = O(null), { chartTheme: le, chartSettings: de, tooltipColors: me, themeCssVars: W, handleSettingsChange: ge, applyThemeFromSettings: _e } = en(U), ve = O(null), ye = T(0), be = T(0), xe = T(!1), Se = T([]), G = T(0), K = T(1), q = T(d.initialZoomLevel ?? 1), Ce = T(0), J = T(1), Te = T(0), Ee = T({}), De = T(/* @__PURE__ */ new Map()), Oe = T(!1), ke = T("cursor"), { mainActiveIndicators: Ae, subActiveIndicators: je, activeIndicators: Y, indicatorParams: Me, subPanes: Ne, buildPaneLayoutIntent: Fe, getDefaultParams: Ie, isSubPaneIndicator: Le, addSubPane: Re, removeSubPane: ze, clearAllSubPanes: Be, initIndicatorsFromConfig: Ve, switchSubIndicator: He, handleIndicatorToggle: Ue, handleUpdateParams: We, handleReorderSubIndicators: Ge, setupIndicatorSubscriptions: Ke } = tn(U, Ee), { drawingController: qe, selectedDrawingId: Je, selectedDrawing: Ye, drawings: Xe, handleSelectTool: Ze, onUpdateDrawingStyle: Qe, onDeleteDrawing: $e, setupDrawing: et } = nn(U), { rangeSelection: tt, customStartDate: nt, customEndDate: rt, containerScrollLeft: it, isRangeSelectActive: at, rangeSelectionReady: ot, rangeSelectionBounds: st, rangeSelectionStartLabel: ct, rangeSelectionEndLabel: lt, rangeSelectionOverlayStyle: ut, clearRangeSelection: dt, handleRangePointerDown: ft, handleRangePointerMove: pt, handleRangePointerUp: mt, exportRangeToCsv: ht, exportingProgress: gt, onEdgePointerDown: _t, onEdgePointerMove: vt, onEdgePointerUp: yt, onScroll: bt, syncScrollLeft: xt } = fn({
|
|
3076
|
+
controller: U,
|
|
3077
|
+
activeToolId: ke,
|
|
3078
|
+
containerRef: H,
|
|
3079
|
+
dataVersion: be,
|
|
3080
|
+
viewportVersion: G,
|
|
3081
|
+
dataFetcher: r(() => d.dataFetcher),
|
|
3082
|
+
batchStockCodes: Se
|
|
3083
|
+
}), St = q.value;
|
|
3084
|
+
Ce.value = fe(St, {
|
|
2335
3085
|
minKWidth: d.minKWidth,
|
|
2336
3086
|
maxKWidth: d.maxKWidth,
|
|
2337
3087
|
zoomLevelCount: d.zoomLevels,
|
|
2338
|
-
dpr:
|
|
2339
|
-
}),
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
return {
|
|
2343
|
-
upColor: t.candleUpBody,
|
|
2344
|
-
downColor: t.candleDownBody
|
|
2345
|
-
};
|
|
2346
|
-
}), ke = r(() => {
|
|
2347
|
-
let e = U.value === "dark" ? ne : ie, t = W.value.colorPresetSettings?.[U.value];
|
|
2348
|
-
return t && Object.keys(t).length > 0 ? oe({
|
|
2349
|
-
...e,
|
|
2350
|
-
colors: {
|
|
2351
|
-
...e.colors,
|
|
2352
|
-
...t
|
|
2353
|
-
}
|
|
2354
|
-
}) : oe(e);
|
|
2355
|
-
}), K = null;
|
|
2356
|
-
function je(e) {
|
|
2357
|
-
B.value?.setTheme(e.matches ? "dark" : "light");
|
|
2358
|
-
}
|
|
2359
|
-
function Ne(e, t) {
|
|
2360
|
-
if (!(!e || !t)) if (t === "auto") {
|
|
2361
|
-
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2362
|
-
e.setTheme(t.matches ? "dark" : "light"), K !== t && (K?.removeEventListener("change", je), K = t, t.addEventListener("change", je));
|
|
2363
|
-
} else K?.removeEventListener("change", je), K = null, e.setTheme(t);
|
|
2364
|
-
}
|
|
2365
|
-
function Pe() {}
|
|
2366
|
-
function Fe(e) {
|
|
2367
|
-
W.value = e, Ne(B.value, e.theme), B.value?.updateSettingsFacade(e);
|
|
2368
|
-
}
|
|
2369
|
-
function Ie(e, t, n) {
|
|
3088
|
+
dpr: K.value
|
|
3089
|
+
}), J.value = ue(Ce.value, K.value);
|
|
3090
|
+
function Ct() {}
|
|
3091
|
+
function wt(e, t, n) {
|
|
2370
3092
|
let r = e.getBoundingClientRect();
|
|
2371
3093
|
return {
|
|
2372
3094
|
width: Math.max(t, Math.round(r.width)),
|
|
2373
3095
|
height: Math.max(n, Math.round(r.height))
|
|
2374
3096
|
};
|
|
2375
3097
|
}
|
|
2376
|
-
function
|
|
2377
|
-
e &&
|
|
3098
|
+
function Tt(e) {
|
|
3099
|
+
e && g(() => {
|
|
2378
3100
|
if (!e.isConnected) return;
|
|
2379
|
-
let t =
|
|
2380
|
-
|
|
3101
|
+
let t = wt(e, 180, 80);
|
|
3102
|
+
U.value?.setTooltipSize(t);
|
|
2381
3103
|
});
|
|
2382
3104
|
}
|
|
2383
|
-
function
|
|
2384
|
-
e &&
|
|
2385
|
-
e.isConnected && (
|
|
3105
|
+
function Et(e) {
|
|
3106
|
+
e && g(() => {
|
|
3107
|
+
e.isConnected && (Nt.value = wt(e, 120, 60));
|
|
2386
3108
|
});
|
|
2387
3109
|
}
|
|
2388
|
-
let
|
|
3110
|
+
let Dt = T({
|
|
2389
3111
|
x: 0,
|
|
2390
3112
|
y: 0
|
|
2391
|
-
}),
|
|
2392
|
-
function
|
|
2393
|
-
|
|
3113
|
+
}), Ot = T(!1), kt = null;
|
|
3114
|
+
function At() {
|
|
3115
|
+
kt = null;
|
|
2394
3116
|
}
|
|
2395
|
-
function
|
|
2396
|
-
return
|
|
3117
|
+
function jt(e) {
|
|
3118
|
+
return kt ||= e.getBoundingClientRect(), kt;
|
|
2397
3119
|
}
|
|
2398
|
-
let
|
|
3120
|
+
let X = O({
|
|
2399
3121
|
crosshairPos: null,
|
|
2400
3122
|
crosshairIndex: null,
|
|
2401
3123
|
crosshairPrice: null,
|
|
@@ -2413,14 +3135,11 @@ var Mr = m({
|
|
|
2413
3135
|
isHoveringPaneBoundary: !1,
|
|
2414
3136
|
hoveredPaneBoundaryId: null,
|
|
2415
3137
|
isHoveringRightAxis: !1
|
|
2416
|
-
}),
|
|
2417
|
-
let e = we.value;
|
|
2418
|
-
return e ? Te.value.find((t) => t.id === e) ?? null : null;
|
|
2419
|
-
}), We = w([]), Ge = w({
|
|
3138
|
+
}), Mt = T([]), Nt = T({
|
|
2420
3139
|
width: 220,
|
|
2421
3140
|
height: 120
|
|
2422
|
-
}),
|
|
2423
|
-
let e =
|
|
3141
|
+
}), Pt = r(() => {
|
|
3142
|
+
let e = H.value, t = re.value;
|
|
2424
3143
|
return !e || !t ? {
|
|
2425
3144
|
x: 0,
|
|
2426
3145
|
y: 0
|
|
@@ -2428,203 +3147,102 @@ var Mr = m({
|
|
|
2428
3147
|
x: e.offsetLeft,
|
|
2429
3148
|
y: e.offsetTop
|
|
2430
3149
|
};
|
|
2431
|
-
}),
|
|
2432
|
-
r(() =>
|
|
2433
|
-
let
|
|
2434
|
-
let e =
|
|
3150
|
+
}), Ft = r(() => X.value.hoveredMarkerData), Lt = r(() => X.value.hoveredCustomMarker), Rt = r(() => X.value.isDragging), zt = r(() => X.value.isResizingPaneBoundary), Bt = r(() => X.value.isHoveringPaneBoundary), Vt = r(() => X.value.hoveredPaneBoundaryId), Ht = r(() => X.value.isHoveringRightAxis), Ut = r(() => X.value.hoveredIndex);
|
|
3151
|
+
r(() => X.value.crosshairIndex);
|
|
3152
|
+
let Wt = r(() => Rt.value ? "grabbing" : zt.value || Bt.value ? "ns-resize" : Ut.value === null ? "crosshair" : "pointer"), Gt = r(() => {
|
|
3153
|
+
let e = X.value.hoveredIndex;
|
|
2435
3154
|
if (typeof e != "number") return null;
|
|
2436
|
-
|
|
2437
|
-
let t =
|
|
3155
|
+
be.value;
|
|
3156
|
+
let t = U.value?.getData();
|
|
2438
3157
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
2439
|
-
}),
|
|
2440
|
-
x:
|
|
2441
|
-
y:
|
|
2442
|
-
})),
|
|
2443
|
-
left: `${
|
|
2444
|
-
top: `${
|
|
2445
|
-
})),
|
|
2446
|
-
x:
|
|
2447
|
-
y:
|
|
2448
|
-
})),
|
|
2449
|
-
left: `${
|
|
2450
|
-
top: `${
|
|
2451
|
-
})),
|
|
2452
|
-
let e =
|
|
2453
|
-
return
|
|
2454
|
-
}),
|
|
2455
|
-
function
|
|
2456
|
-
|
|
2457
|
-
}
|
|
2458
|
-
function
|
|
2459
|
-
|
|
2460
|
-
}
|
|
2461
|
-
function
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
let t = R.value;
|
|
3158
|
+
}), Kt = r(() => X.value.hoveredIndex), qt = r(() => X.value.tooltipPos), Jt = r(() => ({
|
|
3159
|
+
x: qt.value.x + Pt.value.x,
|
|
3160
|
+
y: qt.value.y + Pt.value.y
|
|
3161
|
+
})), Yt = r(() => ({
|
|
3162
|
+
left: `${Jt.value.x}px`,
|
|
3163
|
+
top: `${Jt.value.y}px`
|
|
3164
|
+
})), Z = r(() => ({
|
|
3165
|
+
x: Dt.value.x + Pt.value.x,
|
|
3166
|
+
y: Dt.value.y + Pt.value.y
|
|
3167
|
+
})), Zt = r(() => ({
|
|
3168
|
+
left: `${Z.value.x}px`,
|
|
3169
|
+
top: `${Z.value.y}px`
|
|
3170
|
+
})), Qt = r(() => X.value.tooltipAnchorPlacement), rn = r(() => {
|
|
3171
|
+
let e = U.value?.viewport.peek(), t = H.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
3172
|
+
return Dt.value.x + 12 + Nt.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
3173
|
+
}), an = r(() => (be.value, U.value?.getData() ?? []));
|
|
3174
|
+
function on() {
|
|
3175
|
+
ce.value?.toggleMenu();
|
|
3176
|
+
}
|
|
3177
|
+
function sn(e) {
|
|
3178
|
+
Se.value = e;
|
|
3179
|
+
}
|
|
3180
|
+
function cn(e) {
|
|
3181
|
+
if (ke.value = e, e === "range-select") {
|
|
3182
|
+
qe.value?.setTool("cursor"), Je.value = null;
|
|
3183
|
+
return;
|
|
3184
|
+
}
|
|
3185
|
+
dt(), Ze(e);
|
|
3186
|
+
}
|
|
3187
|
+
function ln(e) {
|
|
3188
|
+
U.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!(ft(e, t) || qe.value?.onPointerDown(e, t)) });
|
|
3189
|
+
}
|
|
3190
|
+
function un(e) {
|
|
3191
|
+
let t = H.value;
|
|
2474
3192
|
if (t) {
|
|
2475
|
-
let n =
|
|
2476
|
-
|
|
3193
|
+
let n = jt(t);
|
|
3194
|
+
Dt.value = {
|
|
2477
3195
|
x: e.clientX - n.left,
|
|
2478
3196
|
y: e.clientY - n.top
|
|
2479
3197
|
};
|
|
2480
3198
|
}
|
|
2481
|
-
|
|
2482
|
-
}
|
|
2483
|
-
function vt(e) {
|
|
2484
|
-
B.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!Y.value?.onPointerUp(e, t) });
|
|
2485
|
-
}
|
|
2486
|
-
function yt(e) {
|
|
2487
|
-
B.value?.handlePointerEvent(e);
|
|
2488
|
-
}
|
|
2489
|
-
function bt(e) {
|
|
2490
|
-
B.value?.handlePointerEvent(e);
|
|
2491
|
-
}
|
|
2492
|
-
function xt(e) {
|
|
2493
|
-
B.value?.handlePointerEvent(e);
|
|
2494
|
-
}
|
|
2495
|
-
function St(e) {
|
|
2496
|
-
B.value?.handlePointerEvent(e);
|
|
2497
|
-
}
|
|
2498
|
-
function Ct(e) {
|
|
2499
|
-
B.value?.handlePointerEvent(e);
|
|
2500
|
-
}
|
|
2501
|
-
function wt() {
|
|
2502
|
-
B.value?.handleScrollEvent();
|
|
2503
|
-
}
|
|
2504
|
-
let Tt = w([]), Et = r(() => {
|
|
2505
|
-
let e = [], t = /* @__PURE__ */ new Set();
|
|
2506
|
-
for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
2507
|
-
return e;
|
|
2508
|
-
}), Dt = r(() => [...Tt.value, ...Et.value]), X = w({}), Z = w([]);
|
|
2509
|
-
function Ot() {
|
|
2510
|
-
let e = Ce.value.main ?? 3;
|
|
2511
|
-
return Z.value.length === 0 ? [{
|
|
2512
|
-
id: "main",
|
|
2513
|
-
ratio: e,
|
|
2514
|
-
visible: !0,
|
|
2515
|
-
role: "price"
|
|
2516
|
-
}] : [{
|
|
2517
|
-
id: "main",
|
|
2518
|
-
ratio: e,
|
|
2519
|
-
visible: !0,
|
|
2520
|
-
role: "price"
|
|
2521
|
-
}, ...Z.value.map((e) => ({
|
|
2522
|
-
id: e.id,
|
|
2523
|
-
ratio: Ce.value[e.id] ?? 1,
|
|
2524
|
-
visible: !0,
|
|
2525
|
-
role: "indicator"
|
|
2526
|
-
}))];
|
|
2527
|
-
}
|
|
2528
|
-
function kt(e) {
|
|
2529
|
-
if (e === "VOLUME") return {};
|
|
2530
|
-
let t = he(e);
|
|
2531
|
-
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
2532
|
-
}
|
|
2533
|
-
function At(e) {
|
|
2534
|
-
if (e === "VOLUME") return !0;
|
|
2535
|
-
let t = he(e);
|
|
2536
|
-
return !!t && t.category !== "main";
|
|
2537
|
-
}
|
|
2538
|
-
function Mt(e = "VOLUME", t) {
|
|
2539
|
-
if (Z.value.length >= bi) return !1;
|
|
2540
|
-
let n = t ?? kt(e);
|
|
2541
|
-
return !!B.value?.addIndicator(e, "sub", n);
|
|
2542
|
-
}
|
|
2543
|
-
function Nt(e) {
|
|
2544
|
-
B.value?.removeIndicator(e);
|
|
2545
|
-
}
|
|
2546
|
-
function Pt() {
|
|
2547
|
-
for (let e of Z.value) B.value?.removeIndicator(e.id);
|
|
2548
|
-
}
|
|
2549
|
-
function Ft() {
|
|
2550
|
-
let e = d.semanticConfig, t = B.value;
|
|
2551
|
-
if (!e || !t) return;
|
|
2552
|
-
let n = e.indicators?.main;
|
|
2553
|
-
if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
|
|
2554
|
-
}
|
|
2555
|
-
function It(e, t) {
|
|
2556
|
-
let n = kt(t);
|
|
2557
|
-
B.value?.replaceSubPaneIndicator(e, t, n);
|
|
2558
|
-
}
|
|
2559
|
-
function Lt(e, t) {
|
|
2560
|
-
let n = B.value;
|
|
2561
|
-
if (!n) return;
|
|
2562
|
-
let r = he(e);
|
|
2563
|
-
if (r && (r.category === "main" || r.allowMainPane)) {
|
|
2564
|
-
let r = Tt.value.find((t) => t === e);
|
|
2565
|
-
t && !r ? n.addIndicator(e, "main", X.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
|
|
2566
|
-
return;
|
|
2567
|
-
}
|
|
2568
|
-
if (At(e)) if (t) {
|
|
2569
|
-
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= bi) return;
|
|
2570
|
-
if (!n.addIndicator(e, "sub", X.value[e]) && Z.value.length > 0) {
|
|
2571
|
-
let t = Z.value[Z.value.length - 1];
|
|
2572
|
-
It(t.id, e);
|
|
2573
|
-
}
|
|
2574
|
-
} else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2575
|
-
n.removeIndicator(e.id);
|
|
2576
|
-
});
|
|
3199
|
+
U.value?.handlePointerEvent(e, { onPointerMove: (e, t) => pt(e, t) ? !0 : qe.value?.onPointerMove(e, t) ? (Xe.value = qe.value.getDrawings(), !0) : !1 });
|
|
2577
3200
|
}
|
|
2578
|
-
function
|
|
2579
|
-
|
|
2580
|
-
B.value?.updateIndicatorParams(e, t);
|
|
2581
|
-
return;
|
|
2582
|
-
}
|
|
2583
|
-
At(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2584
|
-
B.value?.updateIndicatorParams(e.id, t);
|
|
2585
|
-
});
|
|
3201
|
+
function dn(e) {
|
|
3202
|
+
U.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!(mt(e, t) || qe.value?.onPointerUp(e, t)) });
|
|
2586
3203
|
}
|
|
2587
|
-
function
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
3204
|
+
function pn(e) {
|
|
3205
|
+
U.value?.handlePointerEvent(e);
|
|
3206
|
+
}
|
|
3207
|
+
function mn(e) {
|
|
3208
|
+
U.value?.handlePointerEvent(e);
|
|
3209
|
+
}
|
|
3210
|
+
function hn(e) {
|
|
3211
|
+
U.value?.handlePointerEvent(e);
|
|
3212
|
+
}
|
|
3213
|
+
function gn(e) {
|
|
3214
|
+
U.value?.handlePointerEvent(e);
|
|
3215
|
+
}
|
|
3216
|
+
function _n(e) {
|
|
3217
|
+
U.value?.handlePointerEvent(e);
|
|
3218
|
+
}
|
|
3219
|
+
function vn() {
|
|
3220
|
+
bt(), U.value?.handleScrollEvent();
|
|
3221
|
+
}
|
|
3222
|
+
let yn = r(() => d.rightAxisWidth + d.priceLabelWidth), bn = r(() => (be.value, Te.value, Ce.value, J.value, K.value, U.value?.getContentWidth() ?? 0));
|
|
3223
|
+
function xn(e, t) {
|
|
3224
|
+
U.value?.zoomToLevel(e, t);
|
|
2607
3225
|
}
|
|
2608
3226
|
c({
|
|
2609
|
-
scheduleRender:
|
|
2610
|
-
addSubPane:
|
|
2611
|
-
removeSubPane:
|
|
2612
|
-
switchSubIndicator:
|
|
2613
|
-
clearAllSubPanes:
|
|
2614
|
-
zoomToLevel:
|
|
2615
|
-
zoomIn: (e) =>
|
|
2616
|
-
zoomOut: (e) =>
|
|
2617
|
-
getZoomLevel: () =>
|
|
2618
|
-
getZoomLevelCount: () =>
|
|
2619
|
-
getController: () =>
|
|
3227
|
+
scheduleRender: Ct,
|
|
3228
|
+
addSubPane: Re,
|
|
3229
|
+
removeSubPane: ze,
|
|
3230
|
+
switchSubIndicator: He,
|
|
3231
|
+
clearAllSubPanes: Be,
|
|
3232
|
+
zoomToLevel: xn,
|
|
3233
|
+
zoomIn: (e) => xn(q.value + 1, e),
|
|
3234
|
+
zoomOut: (e) => xn(q.value - 1, e),
|
|
3235
|
+
getZoomLevel: () => q.value,
|
|
3236
|
+
getZoomLevelCount: () => U.value?.getZoomLevelCount() ?? 10,
|
|
3237
|
+
getController: () => U.value
|
|
2620
3238
|
});
|
|
2621
|
-
function
|
|
3239
|
+
function Sn() {
|
|
2622
3240
|
return (e) => {
|
|
2623
|
-
e.preventDefault(),
|
|
3241
|
+
e.preventDefault(), U.value?.handleWheelEvent(e);
|
|
2624
3242
|
};
|
|
2625
3243
|
}
|
|
2626
|
-
function
|
|
2627
|
-
return
|
|
3244
|
+
function Cn(e, t, n, r) {
|
|
3245
|
+
return se({
|
|
2628
3246
|
container: e,
|
|
2629
3247
|
data: [],
|
|
2630
3248
|
canvasLayer: t,
|
|
@@ -2641,11 +3259,11 @@ var Mr = m({
|
|
|
2641
3259
|
mcp: d.mcp
|
|
2642
3260
|
});
|
|
2643
3261
|
}
|
|
2644
|
-
function
|
|
3262
|
+
function wn(e) {
|
|
2645
3263
|
let t = e.paneLayout.subscribe(() => {
|
|
2646
|
-
|
|
2647
|
-
let t =
|
|
2648
|
-
|
|
3264
|
+
At();
|
|
3265
|
+
let t = H.value && parseInt(getComputedStyle(H.value).borderTopWidth) || 0;
|
|
3266
|
+
Mt.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
2649
3267
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
2650
3268
|
return {
|
|
2651
3269
|
id: n.id,
|
|
@@ -2653,128 +3271,87 @@ var Mr = m({
|
|
|
2653
3271
|
};
|
|
2654
3272
|
});
|
|
2655
3273
|
}), n = e.paneRatios.subscribe(() => {
|
|
2656
|
-
|
|
3274
|
+
Ee.value = { ...e.paneRatios.peek() };
|
|
2657
3275
|
}), r = e.viewport.subscribe(() => {
|
|
2658
3276
|
let t = e.viewport.peek();
|
|
2659
|
-
|
|
3277
|
+
G.value++, K.value !== t.dpr && (K.value = t.dpr), Te.value !== t.plotWidth && (Te.value = t.plotWidth), (q.value !== t.zoomLevel || Ce.value !== t.kWidth || J.value !== t.kGap) && (q.value = t.zoomLevel, Ce.value = t.kWidth, J.value = t.kGap), g(() => {
|
|
3278
|
+
requestAnimationFrame(() => {
|
|
3279
|
+
xt();
|
|
3280
|
+
});
|
|
3281
|
+
});
|
|
2660
3282
|
}), i = e.data.subscribe(() => {
|
|
2661
3283
|
let t = e.data.peek();
|
|
2662
|
-
|
|
3284
|
+
ye.value = t.length, be.value++, k.value = t.length === 0;
|
|
2663
3285
|
}), a = e.dataLoading.subscribe(() => {
|
|
2664
|
-
|
|
3286
|
+
D.value = e.dataLoading.peek();
|
|
2665
3287
|
}), o = e.theme.subscribe(() => {
|
|
2666
3288
|
let t = e.theme.peek();
|
|
2667
|
-
|
|
2668
|
-
}), s = e.
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
|
|
2673
|
-
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
2674
|
-
MA: {
|
|
2675
|
-
enabled: n.includes("MA"),
|
|
2676
|
-
params: r.MA || {}
|
|
2677
|
-
},
|
|
2678
|
-
BOLL: {
|
|
2679
|
-
enabled: n.includes("BOLL"),
|
|
2680
|
-
params: r.BOLL || {}
|
|
2681
|
-
},
|
|
2682
|
-
EXPMA: {
|
|
2683
|
-
enabled: n.includes("EXPMA"),
|
|
2684
|
-
params: r.EXPMA || {}
|
|
2685
|
-
},
|
|
2686
|
-
ENE: {
|
|
2687
|
-
enabled: n.includes("ENE"),
|
|
2688
|
-
params: r.ENE || {}
|
|
2689
|
-
}
|
|
2690
|
-
} }), X.value = r;
|
|
2691
|
-
}), c = e.subPanes.subscribe(() => {
|
|
2692
|
-
let t = e.subPanes.peek(), n = new Set(t.map((e) => e.paneId)), r = Z.value.filter((e) => n.has(e.id)), i = new Set(r.map((e) => e.id));
|
|
2693
|
-
for (let e of t) i.has(e.paneId) || r.push({
|
|
2694
|
-
id: e.paneId,
|
|
2695
|
-
indicatorId: e.indicatorId,
|
|
2696
|
-
params: e.params
|
|
2697
|
-
});
|
|
2698
|
-
Z.value = r;
|
|
2699
|
-
let a = { ...X.value };
|
|
2700
|
-
for (let e of t) e.params && Object.keys(e.params).length > 0 && (a[e.indicatorId] = { ...e.params });
|
|
2701
|
-
X.value = a;
|
|
2702
|
-
}), l = e.comparisonColors.subscribe(() => {
|
|
2703
|
-
Ee.value = new Map(e.comparisonColors.peek());
|
|
2704
|
-
}), u = e.comparisonLoading.subscribe(() => {
|
|
2705
|
-
De.value = e.comparisonLoading.peek();
|
|
3289
|
+
le.value = t, f("themeChange", t);
|
|
3290
|
+
}), s = Ke(e), c = e.comparisonColors.subscribe(() => {
|
|
3291
|
+
De.value = new Map(e.comparisonColors.peek());
|
|
3292
|
+
}), l = e.comparisonLoading.subscribe(() => {
|
|
3293
|
+
Oe.value = e.comparisonLoading.peek();
|
|
2706
3294
|
});
|
|
2707
|
-
|
|
2708
|
-
r(), i(), a(), n(), t(), o(), s(), c(), l()
|
|
3295
|
+
S(() => {
|
|
3296
|
+
r(), i(), a(), n(), t(), o(), s(), c(), l();
|
|
2709
3297
|
});
|
|
2710
3298
|
}
|
|
2711
|
-
function
|
|
2712
|
-
let t =
|
|
2713
|
-
|
|
2714
|
-
}
|
|
2715
|
-
function Jt(e) {
|
|
2716
|
-
Y.value = new se(e), Y.value.setCallbacks({
|
|
2717
|
-
onDrawingCreated: (e) => {
|
|
2718
|
-
Te.value = [...Te.value, e], we.value = e.id;
|
|
2719
|
-
},
|
|
2720
|
-
onToolChange: () => {},
|
|
2721
|
-
onDrawingSelected: (e) => {
|
|
2722
|
-
we.value = e?.id ?? null;
|
|
2723
|
-
}
|
|
2724
|
-
});
|
|
3299
|
+
function Tn(e) {
|
|
3300
|
+
let t = oe.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
3301
|
+
de.value = t, _e(t.theme), e.updateSettingsFacade(t);
|
|
2725
3302
|
}
|
|
2726
|
-
function
|
|
2727
|
-
e.setTooltipAnchorPositioning(
|
|
2728
|
-
|
|
2729
|
-
}),
|
|
3303
|
+
function En(e) {
|
|
3304
|
+
e.setTooltipAnchorPositioning(Ot.value), e.interactionState.subscribe(() => {
|
|
3305
|
+
X.value = e.interactionState.peek();
|
|
3306
|
+
}), X.value = e.interactionState.peek(), K.value = e.viewport.peek().dpr;
|
|
2730
3307
|
}
|
|
2731
|
-
function
|
|
2732
|
-
e.setDataFetcher(d.dataFetcher),
|
|
3308
|
+
function Dn(e) {
|
|
3309
|
+
e.setDataFetcher(d.dataFetcher), ve.value = new pe(e), ve.value.on("config:error", (e) => {
|
|
2733
3310
|
console.error("Semantic config error:", e);
|
|
2734
|
-
}),
|
|
2735
|
-
|
|
3311
|
+
}), ve.value.on("config:ready", () => {
|
|
3312
|
+
Ve(d.semanticConfig), g(() => U.value?.scrollToRight());
|
|
2736
3313
|
});
|
|
2737
3314
|
}
|
|
2738
|
-
return
|
|
2739
|
-
|
|
2740
|
-
let e =
|
|
3315
|
+
return b(async () => {
|
|
3316
|
+
Ot.value = !1;
|
|
3317
|
+
let e = H.value, t = re.value;
|
|
2741
3318
|
if (!e || !t) return;
|
|
2742
|
-
let n =
|
|
3319
|
+
let n = Sn();
|
|
2743
3320
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
2744
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a =
|
|
2745
|
-
|
|
2746
|
-
}),
|
|
2747
|
-
let e =
|
|
2748
|
-
e && (
|
|
2749
|
-
}),
|
|
2750
|
-
|
|
2751
|
-
}),
|
|
3321
|
+
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await Cn(e, r, t.querySelector(".right-axis-host"), i);
|
|
3322
|
+
!H.value || !re.value || (U.value = a, wn(a), Ve(d.semanticConfig), Tn(a), et(a), En(a), Dn(a));
|
|
3323
|
+
}), S(() => {
|
|
3324
|
+
let e = U.value;
|
|
3325
|
+
e && (U.value = null, e.dispose()), qe.value = null;
|
|
3326
|
+
}), N(() => d.yPaddingPx, (e) => {
|
|
3327
|
+
U.value?.updateOptionsFacade({ yPaddingPx: e });
|
|
3328
|
+
}), N(() => d.semanticConfig, async (e, t) => {
|
|
2752
3329
|
if (e && e !== t) {
|
|
2753
|
-
let t = await
|
|
3330
|
+
let t = await ve.value?.applyConfig(e);
|
|
2754
3331
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
2755
3332
|
}
|
|
2756
|
-
}, { deep: !0 }), (r, c) => (
|
|
3333
|
+
}, { deep: !0 }), (r, c) => (C(), o("div", {
|
|
2757
3334
|
ref_key: "chartWrapperRef",
|
|
2758
|
-
ref:
|
|
3335
|
+
ref: ie,
|
|
2759
3336
|
class: "chart-wrapper",
|
|
2760
|
-
"data-theme":
|
|
2761
|
-
style:
|
|
3337
|
+
"data-theme": A(le),
|
|
3338
|
+
style: v(A(W))
|
|
2762
3339
|
}, [
|
|
2763
|
-
l(
|
|
2764
|
-
symbol:
|
|
3340
|
+
l(ji, {
|
|
3341
|
+
symbol: x.value,
|
|
2765
3342
|
"k-line-level": p.value,
|
|
2766
|
-
"k-line-adjust":
|
|
2767
|
-
"symbol-loading":
|
|
2768
|
-
"symbol-error":
|
|
2769
|
-
"overlay-symbols":
|
|
2770
|
-
"comparison-colors":
|
|
2771
|
-
"comparison-loading":
|
|
2772
|
-
onAddOverlaySymbol:
|
|
2773
|
-
onRemoveOverlaySymbol:
|
|
2774
|
-
onKLineLevelChange:
|
|
2775
|
-
onKLineAdjustChange:
|
|
2776
|
-
onToggleIndicator:
|
|
2777
|
-
onSymbolChange:
|
|
3343
|
+
"k-line-adjust": h.value,
|
|
3344
|
+
"symbol-loading": D.value,
|
|
3345
|
+
"symbol-error": k.value,
|
|
3346
|
+
"overlay-symbols": j.value,
|
|
3347
|
+
"comparison-colors": De.value,
|
|
3348
|
+
"comparison-loading": Oe.value,
|
|
3349
|
+
onAddOverlaySymbol: ee,
|
|
3350
|
+
onRemoveOverlaySymbol: te,
|
|
3351
|
+
onKLineLevelChange: I,
|
|
3352
|
+
onKLineAdjustChange: R,
|
|
3353
|
+
onToggleIndicator: on,
|
|
3354
|
+
onSymbolChange: z
|
|
2778
3355
|
}, null, 8, [
|
|
2779
3356
|
"symbol",
|
|
2780
3357
|
"k-line-level",
|
|
@@ -2785,82 +3362,156 @@ var Mr = m({
|
|
|
2785
3362
|
"comparison-colors",
|
|
2786
3363
|
"comparison-loading"
|
|
2787
3364
|
]),
|
|
2788
|
-
s("div", { class:
|
|
2789
|
-
"is-dragging":
|
|
2790
|
-
"is-resizing-pane":
|
|
2791
|
-
"is-hovering-pane-separator":
|
|
2792
|
-
"is-hovering-right-axis":
|
|
2793
|
-
"is-hovering-kline":
|
|
2794
|
-
}]) }, [l(
|
|
3365
|
+
s("div", { class: _(["chart-stage", {
|
|
3366
|
+
"is-dragging": Rt.value,
|
|
3367
|
+
"is-resizing-pane": zt.value,
|
|
3368
|
+
"is-hovering-pane-separator": Bt.value,
|
|
3369
|
+
"is-hovering-right-axis": Ht.value,
|
|
3370
|
+
"is-hovering-kline": Ut.value !== null
|
|
3371
|
+
}]) }, [l(Kr, {
|
|
2795
3372
|
ref_key: "toolbarRef",
|
|
2796
|
-
ref:
|
|
3373
|
+
ref: oe,
|
|
2797
3374
|
"is-fullscreen": n.isFullscreen,
|
|
2798
|
-
onSelectTool:
|
|
3375
|
+
onSelectTool: cn,
|
|
2799
3376
|
onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
|
|
2800
|
-
onZoomIn: c[1] ||= (e) =>
|
|
2801
|
-
onZoomOut: c[2] ||= (e) =>
|
|
2802
|
-
onSettingsChange:
|
|
2803
|
-
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
3377
|
+
onZoomIn: c[1] ||= (e) => xn(q.value + 1),
|
|
3378
|
+
onZoomOut: c[2] ||= (e) => xn(q.value - 1),
|
|
3379
|
+
onSettingsChange: A(ge)
|
|
3380
|
+
}, null, 8, ["is-fullscreen", "onSettingsChange"]), s("div", {
|
|
2804
3381
|
class: "chart-main",
|
|
2805
3382
|
ref_key: "chartMainRef",
|
|
2806
3383
|
ref: re
|
|
2807
3384
|
}, [
|
|
2808
|
-
s("div",
|
|
3385
|
+
s("div", Wi, [(C(!0), o(e, null, E(Mt.value, (e) => (C(), o("div", {
|
|
2809
3386
|
key: e.id,
|
|
2810
|
-
class:
|
|
2811
|
-
style:
|
|
3387
|
+
class: _(["pane-separator-line", { "is-active": Vt.value === e.id }]),
|
|
3388
|
+
style: v({ top: `${e.top}px` })
|
|
2812
3389
|
}, null, 6))), 128))]),
|
|
2813
3390
|
s("div", {
|
|
2814
3391
|
ref_key: "tooltipLayerRef",
|
|
2815
|
-
ref:
|
|
3392
|
+
ref: ae,
|
|
2816
3393
|
class: "tooltip-layer"
|
|
2817
3394
|
}, null, 512),
|
|
2818
3395
|
s("div", {
|
|
2819
3396
|
class: "chart-container",
|
|
2820
|
-
style:
|
|
3397
|
+
style: v({ cursor: Wt.value }),
|
|
2821
3398
|
ref_key: "containerRef",
|
|
2822
|
-
ref:
|
|
2823
|
-
onScrollPassive:
|
|
2824
|
-
onPointerdown:
|
|
2825
|
-
onPointermove:
|
|
2826
|
-
onPointerup:
|
|
2827
|
-
onPointerleave:
|
|
3399
|
+
ref: H,
|
|
3400
|
+
onScrollPassive: vn,
|
|
3401
|
+
onPointerdown: ln,
|
|
3402
|
+
onPointermove: un,
|
|
3403
|
+
onPointerup: dn,
|
|
3404
|
+
onPointerleave: pn
|
|
2828
3405
|
}, [s("div", {
|
|
2829
3406
|
class: "scroll-content",
|
|
2830
|
-
style:
|
|
2831
|
-
}, [s("div",
|
|
3407
|
+
style: v({ width: bn.value + "px" })
|
|
3408
|
+
}, [s("div", Gi, [
|
|
3409
|
+
s("canvas", Ki, null, 512),
|
|
3410
|
+
A(Ye) ? (C(), i(Pe, {
|
|
3411
|
+
key: 0,
|
|
3412
|
+
drawing: A(Ye),
|
|
3413
|
+
onUpdateStyle: A(Qe),
|
|
3414
|
+
onDelete: A($e)
|
|
3415
|
+
}, null, 8, [
|
|
3416
|
+
"drawing",
|
|
3417
|
+
"onUpdateStyle",
|
|
3418
|
+
"onDelete"
|
|
3419
|
+
])) : a("", !0),
|
|
3420
|
+
A(ot) ? (C(), o("div", {
|
|
3421
|
+
key: 1,
|
|
3422
|
+
class: "range-selection-export",
|
|
3423
|
+
onPointerdown: c[8] ||= L(() => {}, ["stop"]),
|
|
3424
|
+
onPointermove: c[9] ||= L(() => {}, ["stop"]),
|
|
3425
|
+
onPointerup: c[10] ||= L(() => {}, ["stop"])
|
|
3426
|
+
}, [
|
|
3427
|
+
F(s("input", {
|
|
3428
|
+
class: "range-selection-export__label",
|
|
3429
|
+
"onUpdate:modelValue": c[3] ||= (e) => m(nt) ? nt.value = e : null,
|
|
3430
|
+
placeholder: A(ct)
|
|
3431
|
+
}, null, 8, qi), [[M, A(nt)]]),
|
|
3432
|
+
c[20] ||= s("span", { class: "range-selection-export__sep" }, "~", -1),
|
|
3433
|
+
F(s("input", {
|
|
3434
|
+
class: "range-selection-export__label",
|
|
3435
|
+
"onUpdate:modelValue": c[4] ||= (e) => m(rt) ? rt.value = e : null,
|
|
3436
|
+
placeholder: A(lt)
|
|
3437
|
+
}, null, 8, Ji), [[M, A(rt)]]),
|
|
3438
|
+
s("button", {
|
|
3439
|
+
type: "button",
|
|
3440
|
+
class: "toolbar-btn",
|
|
3441
|
+
title: "批量设置",
|
|
3442
|
+
onClick: c[5] ||= L((e) => xe.value = !0, ["stop"])
|
|
3443
|
+
}, " 批量设置 "),
|
|
3444
|
+
s("button", {
|
|
3445
|
+
type: "button",
|
|
3446
|
+
class: "toolbar-btn",
|
|
3447
|
+
title: "导出",
|
|
3448
|
+
onClick: c[6] ||= L((...e) => A(ht) && A(ht)(...e), ["stop"])
|
|
3449
|
+
}, " 导出 "),
|
|
3450
|
+
s("button", {
|
|
3451
|
+
type: "button",
|
|
3452
|
+
class: "toolbar-btn delete-btn",
|
|
3453
|
+
title: "删除选区",
|
|
3454
|
+
onClick: c[7] ||= L((...e) => A(dt) && A(dt)(...e), ["stop"])
|
|
3455
|
+
}, [...c[19] ||= [s("svg", {
|
|
3456
|
+
class: "delete-icon",
|
|
3457
|
+
viewBox: "0 0 24 24",
|
|
3458
|
+
fill: "none",
|
|
3459
|
+
stroke: "currentColor",
|
|
3460
|
+
"stroke-width": "2",
|
|
3461
|
+
"stroke-linecap": "round",
|
|
3462
|
+
"stroke-linejoin": "round",
|
|
3463
|
+
"aria-hidden": "true"
|
|
3464
|
+
}, [
|
|
3465
|
+
s("path", { d: "M3 6h18" }),
|
|
3466
|
+
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
3467
|
+
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
3468
|
+
], -1)]])
|
|
3469
|
+
], 32)) : a("", !0)
|
|
3470
|
+
], 512), A(ut) ? (C(), o("div", {
|
|
2832
3471
|
key: 0,
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
},
|
|
2837
|
-
ce.value ? (S(), i(t, {
|
|
3472
|
+
class: _(["range-selection-overlay", { "is-dragging": A(tt).isDragging }]),
|
|
3473
|
+
style: v(A(ut)),
|
|
3474
|
+
"aria-label": "已选择的 K 线区间"
|
|
3475
|
+
}, [A(ot) ? (C(), o("div", {
|
|
2838
3476
|
key: 0,
|
|
2839
|
-
|
|
3477
|
+
class: "range-selection-handle range-selection-handle--left",
|
|
3478
|
+
onPointerdown: c[11] ||= L((e) => A(_t)("left", e), ["stop"]),
|
|
3479
|
+
onPointermove: c[12] ||= L((e) => A(vt)(e), ["stop"]),
|
|
3480
|
+
onPointerup: c[13] ||= L((e) => A(yt)(e), ["stop"])
|
|
3481
|
+
}, null, 32)) : a("", !0), A(ot) ? (C(), o("div", {
|
|
3482
|
+
key: 1,
|
|
3483
|
+
class: "range-selection-handle range-selection-handle--right",
|
|
3484
|
+
onPointerdown: c[14] ||= L((e) => A(_t)("right", e), ["stop"]),
|
|
3485
|
+
onPointermove: c[15] ||= L((e) => A(vt)(e), ["stop"]),
|
|
3486
|
+
onPointerup: c[16] ||= L((e) => A(yt)(e), ["stop"])
|
|
3487
|
+
}, null, 32)) : a("", !0)], 6)) : a("", !0)], 4)], 36),
|
|
3488
|
+
ae.value ? (C(), i(t, {
|
|
3489
|
+
key: 0,
|
|
3490
|
+
to: ae.value
|
|
2840
3491
|
}, [
|
|
2841
|
-
|
|
3492
|
+
Gt.value ? (C(), o("div", {
|
|
2842
3493
|
key: 0,
|
|
2843
|
-
class:
|
|
2844
|
-
style:
|
|
3494
|
+
class: _(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": Ot.value }]),
|
|
3495
|
+
style: v(Yt.value)
|
|
2845
3496
|
}, null, 6)) : a("", !0),
|
|
2846
|
-
|
|
3497
|
+
Ft.value || Lt.value ? (C(), o("div", {
|
|
2847
3498
|
key: 1,
|
|
2848
|
-
class:
|
|
2849
|
-
style:
|
|
3499
|
+
class: _(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": Ot.value }]),
|
|
3500
|
+
style: v(Zt.value)
|
|
2850
3501
|
}, null, 6)) : a("", !0),
|
|
2851
|
-
|
|
3502
|
+
Gt.value ? (C(), i(Xt, {
|
|
2852
3503
|
key: 2,
|
|
2853
|
-
k:
|
|
2854
|
-
index:
|
|
2855
|
-
data:
|
|
2856
|
-
pos:
|
|
2857
|
-
"set-el":
|
|
2858
|
-
"use-anchor":
|
|
2859
|
-
"anchor-placement":
|
|
2860
|
-
"up-color":
|
|
2861
|
-
"down-color":
|
|
3504
|
+
k: Gt.value,
|
|
3505
|
+
index: Kt.value,
|
|
3506
|
+
data: an.value,
|
|
3507
|
+
pos: Jt.value,
|
|
3508
|
+
"set-el": Tt,
|
|
3509
|
+
"use-anchor": Ot.value,
|
|
3510
|
+
"anchor-placement": Qt.value,
|
|
3511
|
+
"up-color": A(me).upColor,
|
|
3512
|
+
"down-color": A(me).downColor,
|
|
2862
3513
|
timezone: d.timezone,
|
|
2863
|
-
"show-time":
|
|
3514
|
+
"show-time": y.value
|
|
2864
3515
|
}, null, 8, [
|
|
2865
3516
|
"k",
|
|
2866
3517
|
"index",
|
|
@@ -2873,13 +3524,13 @@ var Mr = m({
|
|
|
2873
3524
|
"timezone",
|
|
2874
3525
|
"show-time"
|
|
2875
3526
|
])) : a("", !0),
|
|
2876
|
-
|
|
3527
|
+
Ft.value || Lt.value ? (C(), i($t, {
|
|
2877
3528
|
key: 3,
|
|
2878
|
-
marker:
|
|
2879
|
-
pos:
|
|
2880
|
-
"use-anchor":
|
|
2881
|
-
"anchor-placement":
|
|
2882
|
-
"set-el":
|
|
3529
|
+
marker: Ft.value || Lt.value,
|
|
3530
|
+
pos: Z.value,
|
|
3531
|
+
"use-anchor": Ot.value,
|
|
3532
|
+
"anchor-placement": rn.value,
|
|
3533
|
+
"set-el": Et
|
|
2883
3534
|
}, null, 8, [
|
|
2884
3535
|
"marker",
|
|
2885
3536
|
"pos",
|
|
@@ -2890,27 +3541,42 @@ var Mr = m({
|
|
|
2890
3541
|
s("div", {
|
|
2891
3542
|
class: "right-axis-host",
|
|
2892
3543
|
ref: "rightAxisLayerRef",
|
|
2893
|
-
style:
|
|
2894
|
-
onPointerdown:
|
|
2895
|
-
onPointermove:
|
|
2896
|
-
onPointerup:
|
|
2897
|
-
onPointerleave:
|
|
3544
|
+
style: v({ width: yn.value + "px" }),
|
|
3545
|
+
onPointerdown: mn,
|
|
3546
|
+
onPointermove: hn,
|
|
3547
|
+
onPointerup: gn,
|
|
3548
|
+
onPointerleave: _n
|
|
2898
3549
|
}, null, 36)
|
|
2899
3550
|
], 512)], 2),
|
|
2900
|
-
l(
|
|
3551
|
+
l(Hi, {
|
|
3552
|
+
progress: A(gt),
|
|
3553
|
+
onClose: c[17] ||= (e) => gt.value = null
|
|
3554
|
+
}, null, 8, ["progress"]),
|
|
3555
|
+
l(Fi, {
|
|
3556
|
+
show: xe.value,
|
|
3557
|
+
onClose: c[18] ||= (e) => xe.value = !1,
|
|
3558
|
+
onApply: sn
|
|
3559
|
+
}, null, 8, ["show"]),
|
|
3560
|
+
l(It, {
|
|
2901
3561
|
ref_key: "indicatorSelectorRef",
|
|
2902
|
-
ref:
|
|
2903
|
-
"active-indicators":
|
|
2904
|
-
"indicator-params":
|
|
2905
|
-
onToggle:
|
|
2906
|
-
onUpdateParams:
|
|
2907
|
-
onReorderSubIndicators:
|
|
2908
|
-
}, null, 8, [
|
|
2909
|
-
|
|
3562
|
+
ref: ce,
|
|
3563
|
+
"active-indicators": A(Y),
|
|
3564
|
+
"indicator-params": A(Me),
|
|
3565
|
+
onToggle: A(Ue),
|
|
3566
|
+
onUpdateParams: A(We),
|
|
3567
|
+
onReorderSubIndicators: A(Ge)
|
|
3568
|
+
}, null, 8, [
|
|
3569
|
+
"active-indicators",
|
|
3570
|
+
"indicator-params",
|
|
3571
|
+
"onToggle",
|
|
3572
|
+
"onUpdateParams",
|
|
3573
|
+
"onReorderSubIndicators"
|
|
3574
|
+
])
|
|
3575
|
+
], 12, Ui));
|
|
2910
3576
|
}
|
|
2911
|
-
}), [["__scopeId", "data-v-
|
|
3577
|
+
}), [["__scopeId", "data-v-74f0a50b"]]), Xi = {
|
|
2912
3578
|
name: "@363045841yyt/klinechart",
|
|
2913
|
-
version: "0.8.
|
|
3579
|
+
version: "0.8.5",
|
|
2914
3580
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
2915
3581
|
license: "MIT",
|
|
2916
3582
|
repository: {
|
|
@@ -2983,44 +3649,52 @@ var Mr = m({
|
|
|
2983
3649
|
vitest: "^4.1.8",
|
|
2984
3650
|
vue: "^3.5.35"
|
|
2985
3651
|
}
|
|
2986
|
-
}.version,
|
|
2987
|
-
function
|
|
2988
|
-
|
|
3652
|
+
}.version, Zi = null;
|
|
3653
|
+
function Qi(e) {
|
|
3654
|
+
Zi = e;
|
|
2989
3655
|
}
|
|
2990
|
-
function
|
|
3656
|
+
function $i(e) {
|
|
2991
3657
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
2992
|
-
if (
|
|
2993
|
-
return
|
|
3658
|
+
if (Zi === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
|
|
3659
|
+
return Zi(e);
|
|
2994
3660
|
}
|
|
2995
3661
|
function $(e) {
|
|
2996
|
-
let t =
|
|
2997
|
-
return
|
|
3662
|
+
let t = O(e.peek());
|
|
3663
|
+
return x(e.subscribe(() => {
|
|
2998
3664
|
t.value = e.peek();
|
|
2999
3665
|
})), t;
|
|
3000
3666
|
}
|
|
3001
|
-
function
|
|
3002
|
-
let n =
|
|
3003
|
-
e == null || n.value != null
|
|
3667
|
+
function ea(e, t) {
|
|
3668
|
+
let n = O(null), r = !1, i = (e) => {
|
|
3669
|
+
if (e == null || n.value != null) return;
|
|
3670
|
+
let i = $i({
|
|
3004
3671
|
...t,
|
|
3005
3672
|
container: e
|
|
3006
|
-
}))
|
|
3673
|
+
}), a = (e) => {
|
|
3674
|
+
if (r) {
|
|
3675
|
+
e.dispose();
|
|
3676
|
+
return;
|
|
3677
|
+
}
|
|
3678
|
+
n.value = e;
|
|
3679
|
+
};
|
|
3680
|
+
typeof i.then == "function" ? i.then(a) : a(i);
|
|
3007
3681
|
};
|
|
3008
|
-
|
|
3009
|
-
let
|
|
3010
|
-
|
|
3682
|
+
i(e.value);
|
|
3683
|
+
let a = N(e, (e) => {
|
|
3684
|
+
i(e);
|
|
3011
3685
|
}, {
|
|
3012
3686
|
immediate: !0,
|
|
3013
3687
|
flush: "post"
|
|
3014
|
-
}),
|
|
3015
|
-
|
|
3688
|
+
}), o = () => {
|
|
3689
|
+
r = !0, a();
|
|
3016
3690
|
let e = n.value;
|
|
3017
3691
|
e != null && (e.dispose(), n.value = null);
|
|
3018
3692
|
};
|
|
3019
|
-
return
|
|
3693
|
+
return x(o), y(o), { chart: n };
|
|
3020
3694
|
}
|
|
3021
|
-
function
|
|
3022
|
-
let t =
|
|
3023
|
-
return
|
|
3695
|
+
function ta(e) {
|
|
3696
|
+
let t = O(e.indicators.peek());
|
|
3697
|
+
return x(e.indicators.subscribe(() => {
|
|
3024
3698
|
t.value = e.indicators.peek();
|
|
3025
3699
|
})), {
|
|
3026
3700
|
indicators: t,
|
|
@@ -3029,27 +3703,27 @@ function Di(e) {
|
|
|
3029
3703
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
3030
3704
|
};
|
|
3031
3705
|
}
|
|
3032
|
-
function
|
|
3033
|
-
let t =
|
|
3034
|
-
return
|
|
3706
|
+
function na(e) {
|
|
3707
|
+
let t = O(e.interactionState.peek());
|
|
3708
|
+
return x(e.interactionState.subscribe(() => {
|
|
3035
3709
|
t.value = e.interactionState.peek();
|
|
3036
3710
|
})), t;
|
|
3037
3711
|
}
|
|
3038
|
-
function
|
|
3039
|
-
let t =
|
|
3040
|
-
return
|
|
3712
|
+
function ra(e) {
|
|
3713
|
+
let t = O(e.paneRatios.peek());
|
|
3714
|
+
return x(e.paneRatios.subscribe(() => {
|
|
3041
3715
|
t.value = e.paneRatios.peek();
|
|
3042
3716
|
})), t;
|
|
3043
3717
|
}
|
|
3044
|
-
function
|
|
3045
|
-
let t =
|
|
3046
|
-
return
|
|
3718
|
+
function ia(e) {
|
|
3719
|
+
let t = O(e.viewport.peek());
|
|
3720
|
+
return x(e.viewport.subscribe(() => {
|
|
3047
3721
|
t.value = e.viewport.peek();
|
|
3048
3722
|
})), t;
|
|
3049
3723
|
}
|
|
3050
|
-
function
|
|
3051
|
-
let t =
|
|
3052
|
-
|
|
3724
|
+
function aa(e) {
|
|
3725
|
+
let t = te({ catalog: e.catalog });
|
|
3726
|
+
x(() => t.dispose());
|
|
3053
3727
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
3054
3728
|
function o(t) {
|
|
3055
3729
|
let n = e.catalog.find((e) => e.id === t);
|
|
@@ -3076,7 +3750,7 @@ function ji(e) {
|
|
|
3076
3750
|
isActive: c
|
|
3077
3751
|
};
|
|
3078
3752
|
}
|
|
3079
|
-
var
|
|
3753
|
+
var oa = u({
|
|
3080
3754
|
name: "KLineChart",
|
|
3081
3755
|
props: {
|
|
3082
3756
|
data: {
|
|
@@ -3105,31 +3779,36 @@ var Mi = u({
|
|
|
3105
3779
|
zoomLevelChange: (e, t) => !0
|
|
3106
3780
|
},
|
|
3107
3781
|
setup(e, { emit: t, expose: n }) {
|
|
3108
|
-
let r =
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3782
|
+
let r = O(null), i = d(), a = O(null), o = !0, s = (e) => {
|
|
3783
|
+
if (!o) {
|
|
3784
|
+
e.dispose();
|
|
3785
|
+
return;
|
|
3786
|
+
}
|
|
3787
|
+
a.value = e, t("ready", e);
|
|
3788
|
+
let n = () => {
|
|
3789
|
+
let n = e.viewport.peek();
|
|
3790
|
+
t("zoomLevelChange", n.zoomLevel, n.kWidth);
|
|
3791
|
+
};
|
|
3792
|
+
n(), x(e.viewport.subscribe(n));
|
|
3793
|
+
};
|
|
3794
|
+
b(() => {
|
|
3795
|
+
let t = r.value;
|
|
3796
|
+
t != null && (i.run(() => {
|
|
3797
|
+
let n = $i({
|
|
3798
|
+
container: t,
|
|
3114
3799
|
data: e.data,
|
|
3115
3800
|
initialZoomLevel: e.initialZoomLevel,
|
|
3116
3801
|
zoomLevels: e.zoomLevels,
|
|
3117
3802
|
theme: e.theme
|
|
3118
|
-
})
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
let n = e.viewport.peek();
|
|
3122
|
-
t("zoomLevelChange", n.zoomLevel, n.kWidth);
|
|
3123
|
-
};
|
|
3124
|
-
n(), b(e.viewport.subscribe(n));
|
|
3125
|
-
}
|
|
3126
|
-
}), M(() => e.data, (e) => {
|
|
3803
|
+
});
|
|
3804
|
+
typeof n.then == "function" ? n.then(s) : s(n);
|
|
3805
|
+
}), N(() => e.data, (e) => {
|
|
3127
3806
|
a.value?.setData(e);
|
|
3128
|
-
}),
|
|
3807
|
+
}), N(() => e.theme, (e) => {
|
|
3129
3808
|
a.value?.setTheme(e);
|
|
3130
3809
|
}));
|
|
3131
|
-
}),
|
|
3132
|
-
a.value?.dispose(), a.value = null, i.stop();
|
|
3810
|
+
}), S(() => {
|
|
3811
|
+
o = !1, a.value?.dispose(), a.value = null, i.stop();
|
|
3133
3812
|
}), n({
|
|
3134
3813
|
getController: () => a.value,
|
|
3135
3814
|
handlePointerEvent: (e, t) => a.value?.handlePointerEvent(e, t) ?? !1,
|
|
@@ -3143,11 +3822,11 @@ var Mi = u({
|
|
|
3143
3822
|
setTheme: (e) => a.value?.setTheme(e),
|
|
3144
3823
|
setData: (e) => a.value?.setData(e)
|
|
3145
3824
|
});
|
|
3146
|
-
let
|
|
3825
|
+
let c = (e) => {
|
|
3147
3826
|
r.value = e ?? null;
|
|
3148
3827
|
};
|
|
3149
3828
|
return () => f("div", {
|
|
3150
|
-
ref:
|
|
3829
|
+
ref: c,
|
|
3151
3830
|
class: ["klinechart-quant-root", e.containerClass].filter(Boolean).join(" "),
|
|
3152
3831
|
style: {
|
|
3153
3832
|
width: "100%",
|
|
@@ -3155,9 +3834,9 @@ var Mi = u({
|
|
|
3155
3834
|
}
|
|
3156
3835
|
});
|
|
3157
3836
|
}
|
|
3158
|
-
}),
|
|
3159
|
-
e.component("KLineChart",
|
|
3837
|
+
}), sa = { install(e) {
|
|
3838
|
+
e.component("KLineChart", oa);
|
|
3160
3839
|
} };
|
|
3161
|
-
|
|
3840
|
+
Qi(ee);
|
|
3162
3841
|
//#endregion
|
|
3163
|
-
export {
|
|
3842
|
+
export { z as CORE_VERSION, Pe as DrawingStyleToolbar, Qe as IndicatorParams, It as IndicatorSelector, oa as KLineChart, Yi as KLineChartVue, Xt as KLineTooltip, sa as KMapPlugin, Kr as LeftToolbar, $t as MarkerTooltip, Xi as VERSION, Qi as __setControllerFactory, $ as coreSignalToVueRef, $i as createChart, ea as useChart, aa as useIndicatorSelector, ta as useIndicators, na as useInteractionState, ra as usePaneRatios, ia as useViewport };
|