@363045841yyt/klinechart 0.8.4 → 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/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.js +1722 -1060
- 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/KLineChart.vue +325 -396
- 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/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 ve = { class: "color-preset-tools" }, ye = {
|
|
|
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 ve = { class: "color-preset-tools" }, ye = {
|
|
|
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
|
-
}, null, 40,
|
|
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 ve = { class: "color-preset-tools" }, ye = {
|
|
|
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 ve = { class: "color-preset-tools" }, ye = {
|
|
|
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 ve = { class: "color-preset-tools" }, ye = {
|
|
|
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 ve = { class: "color-preset-tools" }, ye = {
|
|
|
260
309
|
], -1)]])
|
|
261
310
|
], 32));
|
|
262
311
|
}
|
|
263
|
-
}), [["__scopeId", "data-v-e9b6a8a9"]]),
|
|
264
|
-
function Pe(e) {
|
|
265
|
-
C(Ne, e);
|
|
266
|
-
}
|
|
267
|
-
function Fe() {
|
|
268
|
-
let e = p(Ne, 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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class: "params-title" }, ze = { class: "header-right" }, Be = {
|
|
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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { 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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { 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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { 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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { 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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { 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 Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { 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,25 +501,25 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
462
501
|
}))
|
|
463
502
|
}));
|
|
464
503
|
}
|
|
465
|
-
let h =
|
|
466
|
-
|
|
467
|
-
|
|
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()));
|
|
468
507
|
});
|
|
469
|
-
let j =
|
|
470
|
-
function
|
|
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) {
|
|
471
510
|
return f.activeIndicators?.includes(e) ?? !1;
|
|
472
511
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
512
|
+
function ee(e) {
|
|
513
|
+
z(e) || U(e) && p("toggle", e, !0);
|
|
475
514
|
}
|
|
476
|
-
function
|
|
515
|
+
function te(e) {
|
|
477
516
|
p("toggle", e, !1);
|
|
478
517
|
}
|
|
479
|
-
function
|
|
518
|
+
function B(e) {
|
|
480
519
|
M.value = e, j.value = !0;
|
|
481
520
|
}
|
|
482
|
-
function
|
|
483
|
-
let t =
|
|
521
|
+
function V(e) {
|
|
522
|
+
let t = U(e);
|
|
484
523
|
if (!t?.params) return {};
|
|
485
524
|
let n = {};
|
|
486
525
|
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
@@ -488,38 +527,38 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
488
527
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
489
528
|
return i;
|
|
490
529
|
}
|
|
491
|
-
function
|
|
530
|
+
function ne(e) {
|
|
492
531
|
M.value && p("updateParams", M.value, e), j.value = !1;
|
|
493
532
|
}
|
|
494
|
-
function
|
|
533
|
+
function H(e) {
|
|
495
534
|
e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
|
|
496
535
|
}
|
|
497
|
-
return
|
|
498
|
-
document.addEventListener("keydown",
|
|
499
|
-
}),
|
|
500
|
-
document.removeEventListener("keydown",
|
|
536
|
+
return b(() => {
|
|
537
|
+
document.addEventListener("keydown", H);
|
|
538
|
+
}), S(() => {
|
|
539
|
+
document.removeEventListener("keydown", H);
|
|
501
540
|
}), u({
|
|
502
541
|
openMenu: () => h.openMenu(),
|
|
503
542
|
closeMenu: () => h.closeMenu(),
|
|
504
543
|
toggleMenu: () => h.toggleMenu()
|
|
505
|
-
}), (r, c) => (
|
|
506
|
-
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", {
|
|
507
546
|
key: 0,
|
|
508
547
|
class: "selector-overlay",
|
|
509
|
-
onClick: c[5] ||= (e) =>
|
|
548
|
+
onClick: c[5] ||= (e) => A(h).closeMenu()
|
|
510
549
|
}, [l(n, { name: "modal" }, {
|
|
511
|
-
default:
|
|
550
|
+
default: P(() => [A(g) ? (C(), o("div", {
|
|
512
551
|
key: 0,
|
|
513
552
|
class: "selector-modal",
|
|
514
|
-
onClick: c[4] ||=
|
|
553
|
+
onClick: c[4] ||= L(() => {}, ["stop"])
|
|
515
554
|
}, [
|
|
516
|
-
s("div",
|
|
517
|
-
class:
|
|
518
|
-
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,
|
|
519
558
|
title: "简洁模式"
|
|
520
|
-
}, [
|
|
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", {
|
|
521
560
|
class: "modal-close",
|
|
522
|
-
onClick: c[1] ||= (e) =>
|
|
561
|
+
onClick: c[1] ||= (e) => A(h).closeMenu(),
|
|
523
562
|
title: "关闭"
|
|
524
563
|
}, [...c[10] ||= [s("svg", {
|
|
525
564
|
viewBox: "0 0 24 24",
|
|
@@ -527,40 +566,40 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
527
566
|
height: "14",
|
|
528
567
|
fill: "currentColor"
|
|
529
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)]])])]),
|
|
530
|
-
s("div",
|
|
569
|
+
s("div", ot, [s("div", st, [c[11] ||= s("svg", {
|
|
531
570
|
class: "search-icon",
|
|
532
571
|
viewBox: "0 0 24 24",
|
|
533
572
|
width: "16",
|
|
534
573
|
height: "16",
|
|
535
574
|
fill: "currentColor"
|
|
536
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", {
|
|
537
|
-
value:
|
|
538
|
-
onInput: c[2] ||= (e) =>
|
|
576
|
+
value: A(v),
|
|
577
|
+
onInput: c[2] ||= (e) => A(h).setSearchQuery(e.target.value),
|
|
539
578
|
type: "text",
|
|
540
579
|
class: "search-input",
|
|
541
580
|
placeholder: "搜索指标名称..."
|
|
542
|
-
}, null, 40,
|
|
543
|
-
s("div",
|
|
544
|
-
|
|
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", {
|
|
545
584
|
key: t.id,
|
|
546
|
-
class:
|
|
547
|
-
active:
|
|
548
|
-
compact:
|
|
585
|
+
class: _(["indicator-card", {
|
|
586
|
+
active: z(t.id),
|
|
587
|
+
compact: N.value
|
|
549
588
|
}]),
|
|
550
|
-
onClick: (e) =>
|
|
551
|
-
}, [
|
|
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", {
|
|
552
591
|
key: 0,
|
|
553
592
|
class: "card-settings-btn",
|
|
554
|
-
onClick:
|
|
593
|
+
onClick: L((e) => B(t.id), ["stop"]),
|
|
555
594
|
title: "编辑参数"
|
|
556
595
|
}, [...c[13] ||= [s("svg", {
|
|
557
596
|
viewBox: "0 0 24 24",
|
|
558
597
|
width: "14",
|
|
559
598
|
height: "14",
|
|
560
599
|
fill: "currentColor"
|
|
561
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
562
|
-
|
|
563
|
-
!
|
|
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] ||= [
|
|
564
603
|
s("svg", {
|
|
565
604
|
viewBox: "0 0 24 24",
|
|
566
605
|
width: "48",
|
|
@@ -570,43 +609,43 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
570
609
|
s("p", null, "未找到匹配的指标", -1),
|
|
571
610
|
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
572
611
|
]])) : a("", !0),
|
|
573
|
-
|
|
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", {
|
|
574
613
|
key: t.id,
|
|
575
|
-
class:
|
|
576
|
-
active:
|
|
577
|
-
compact:
|
|
614
|
+
class: _(["indicator-card", {
|
|
615
|
+
active: z(t.id),
|
|
616
|
+
compact: N.value
|
|
578
617
|
}]),
|
|
579
|
-
onClick: (e) =>
|
|
580
|
-
}, [
|
|
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", {
|
|
581
620
|
key: 0,
|
|
582
621
|
class: "card-settings-btn",
|
|
583
|
-
onClick:
|
|
622
|
+
onClick: L((e) => B(t.id), ["stop"]),
|
|
584
623
|
title: "编辑参数"
|
|
585
624
|
}, [...c[16] ||= [s("svg", {
|
|
586
625
|
viewBox: "0 0 24 24",
|
|
587
626
|
width: "14",
|
|
588
627
|
height: "14",
|
|
589
628
|
fill: "currentColor"
|
|
590
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8,
|
|
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)
|
|
591
630
|
]),
|
|
592
|
-
s("div",
|
|
631
|
+
s("div", Nt, [s("div", Pt, [s("span", Ft, "已激活 " + k(R.value) + " 个指标", 1)]), s("button", {
|
|
593
632
|
class: "btn btn-confirm",
|
|
594
|
-
onClick: c[3] ||= (e) =>
|
|
633
|
+
onClick: c[3] ||= (e) => A(h).closeMenu()
|
|
595
634
|
}, "确认")])
|
|
596
635
|
])) : a("", !0)]),
|
|
597
636
|
_: 1
|
|
598
637
|
})])) : a("", !0)]),
|
|
599
638
|
_: 1
|
|
600
|
-
})], 8, ["to"])),
|
|
639
|
+
})], 8, ["to"])), I.value ? (C(), i(Qe, {
|
|
601
640
|
key: 0,
|
|
602
641
|
visible: j.value,
|
|
603
|
-
"indicator-id":
|
|
604
|
-
"indicator-name":
|
|
605
|
-
"indicator-description":
|
|
606
|
-
params:
|
|
607
|
-
values:
|
|
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),
|
|
608
647
|
onClose: c[6] ||= (e) => j.value = !1,
|
|
609
|
-
onConfirm:
|
|
648
|
+
onConfirm: ne
|
|
610
649
|
}, null, 8, [
|
|
611
650
|
"visible",
|
|
612
651
|
"indicator-id",
|
|
@@ -616,25 +655,25 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
616
655
|
"values"
|
|
617
656
|
])) : a("", !0)]));
|
|
618
657
|
}
|
|
619
|
-
}), [["__scopeId", "data-v-fe4a5a7b"]]),
|
|
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 = {
|
|
620
659
|
key: 0,
|
|
621
660
|
class: "row"
|
|
622
|
-
},
|
|
661
|
+
}, Gt = {
|
|
623
662
|
key: 1,
|
|
624
663
|
class: "row"
|
|
625
|
-
},
|
|
664
|
+
}, Kt = {
|
|
626
665
|
key: 2,
|
|
627
666
|
class: "row"
|
|
628
|
-
},
|
|
667
|
+
}, qt = {
|
|
629
668
|
key: 3,
|
|
630
669
|
class: "row"
|
|
631
|
-
},
|
|
670
|
+
}, Jt = {
|
|
632
671
|
key: 4,
|
|
633
672
|
class: "row"
|
|
634
|
-
},
|
|
673
|
+
}, Yt = {
|
|
635
674
|
key: 5,
|
|
636
675
|
class: "row"
|
|
637
|
-
}, Z = "#6b7280",
|
|
676
|
+
}, Z = "#6b7280", Xt = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
638
677
|
__name: "KLineTooltip",
|
|
639
678
|
props: {
|
|
640
679
|
k: {},
|
|
@@ -653,7 +692,7 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
653
692
|
}
|
|
654
693
|
},
|
|
655
694
|
setup(e) {
|
|
656
|
-
let t = e, n = r(() => t.k ?
|
|
695
|
+
let t = e, n = r(() => t.k ? V(t.k.timestamp, {
|
|
657
696
|
timeZone: t.timezone,
|
|
658
697
|
showTime: t.showTime
|
|
659
698
|
}) : ""), i = r(() => t.useAnchor === !0), c = r(() => t.anchorPlacement === "left-bottom" ? "anchor-left-bottom" : "anchor-right-bottom");
|
|
@@ -687,31 +726,31 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
687
726
|
let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
|
|
688
727
|
return n > 0 ? t.upColor : n < 0 ? t.downColor : Z;
|
|
689
728
|
});
|
|
690
|
-
return (t, r) => e.k ? (
|
|
729
|
+
return (t, r) => e.k ? (C(), o("div", {
|
|
691
730
|
key: 0,
|
|
692
731
|
ref: l,
|
|
693
|
-
class:
|
|
694
|
-
style:
|
|
732
|
+
class: _(["kline-tooltip", [{ "use-anchor": i.value }, c.value]]),
|
|
733
|
+
style: v(i.value ? void 0 : {
|
|
695
734
|
left: `${e.pos.x}px`,
|
|
696
735
|
top: `${e.pos.y}px`
|
|
697
736
|
})
|
|
698
|
-
}, [s("div",
|
|
699
|
-
s("div",
|
|
700
|
-
s("div",
|
|
701
|
-
s("div",
|
|
702
|
-
s("div",
|
|
703
|
-
typeof e.k.volume == "number" ? (
|
|
704
|
-
typeof e.k.turnover == "number" ? (
|
|
705
|
-
typeof e.k.amplitude == "number" ? (
|
|
706
|
-
typeof e.k.changePercent == "number" ? (
|
|
707
|
-
typeof e.k.changeAmount == "number" ? (
|
|
708
|
-
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)
|
|
709
748
|
])], 6)) : a("", !0);
|
|
710
749
|
}
|
|
711
|
-
}), [["__scopeId", "data-v-80fa3a7d"]]),
|
|
750
|
+
}), [["__scopeId", "data-v-80fa3a7d"]]), Zt = { class: "marker-tooltip__title" }, Qt = {
|
|
712
751
|
key: 0,
|
|
713
752
|
class: "marker-tooltip__content"
|
|
714
|
-
},
|
|
753
|
+
}, $t = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
715
754
|
__name: "MarkerTooltip",
|
|
716
755
|
props: {
|
|
717
756
|
marker: {},
|
|
@@ -752,26 +791,568 @@ var Ie = { class: "params-header" }, Le = { class: "header-left" }, Re = { class
|
|
|
752
791
|
function h(e) {
|
|
753
792
|
return typeof e == "number" ? e.toFixed(2) : String(e);
|
|
754
793
|
}
|
|
755
|
-
return (n, r) => t.marker ? (
|
|
794
|
+
return (n, r) => t.marker ? (C(), o("div", {
|
|
756
795
|
key: 0,
|
|
757
796
|
ref: u,
|
|
758
|
-
class:
|
|
759
|
-
style:
|
|
797
|
+
class: _(["marker-tooltip", [{ "use-anchor": c.value }, l.value]]),
|
|
798
|
+
style: v(c.value ? void 0 : {
|
|
760
799
|
left: `${t.pos.x + 12}px`,
|
|
761
800
|
top: `${t.pos.y + 12}px`
|
|
762
801
|
})
|
|
763
|
-
}, [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", {
|
|
764
803
|
key: t,
|
|
765
804
|
class: "row"
|
|
766
|
-
}, [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);
|
|
1024
|
+
}
|
|
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
|
+
};
|
|
767
1314
|
}
|
|
768
|
-
|
|
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 = {
|
|
769
1350
|
viewBox: "0 0 24 24",
|
|
770
1351
|
width: "1.2em",
|
|
771
1352
|
height: "1.2em"
|
|
772
1353
|
};
|
|
773
|
-
function
|
|
774
|
-
return
|
|
1354
|
+
function mn(e, t) {
|
|
1355
|
+
return C(), o("svg", pn, [...t[0] ||= [s("path", {
|
|
775
1356
|
fill: "none",
|
|
776
1357
|
stroke: "currentColor",
|
|
777
1358
|
"stroke-linecap": "round",
|
|
@@ -780,16 +1361,16 @@ function $t(e, t) {
|
|
|
780
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"
|
|
781
1362
|
}, null, -1)]]);
|
|
782
1363
|
}
|
|
783
|
-
var
|
|
1364
|
+
var hn = h({
|
|
784
1365
|
name: "tabler-pointer",
|
|
785
|
-
render:
|
|
786
|
-
}),
|
|
1366
|
+
render: mn
|
|
1367
|
+
}), gn = {
|
|
787
1368
|
viewBox: "0 0 24 24",
|
|
788
1369
|
width: "1.2em",
|
|
789
1370
|
height: "1.2em"
|
|
790
1371
|
};
|
|
791
|
-
function
|
|
792
|
-
return
|
|
1372
|
+
function _n(e, t) {
|
|
1373
|
+
return C(), o("svg", gn, [...t[0] ||= [s("path", {
|
|
793
1374
|
fill: "none",
|
|
794
1375
|
stroke: "currentColor",
|
|
795
1376
|
"stroke-linecap": "round",
|
|
@@ -798,16 +1379,16 @@ function nn(e, t) {
|
|
|
798
1379
|
d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
|
|
799
1380
|
}, null, -1)]]);
|
|
800
1381
|
}
|
|
801
|
-
var
|
|
1382
|
+
var vn = h({
|
|
802
1383
|
name: "tabler-chart-line",
|
|
803
|
-
render:
|
|
804
|
-
}),
|
|
1384
|
+
render: _n
|
|
1385
|
+
}), yn = {
|
|
805
1386
|
viewBox: "0 0 24 24",
|
|
806
1387
|
width: "1.2em",
|
|
807
1388
|
height: "1.2em"
|
|
808
1389
|
};
|
|
809
|
-
function
|
|
810
|
-
return
|
|
1390
|
+
function bn(e, t) {
|
|
1391
|
+
return C(), o("svg", yn, [...t[0] ||= [s("path", {
|
|
811
1392
|
fill: "none",
|
|
812
1393
|
stroke: "currentColor",
|
|
813
1394
|
"stroke-linecap": "round",
|
|
@@ -816,16 +1397,16 @@ function on(e, t) {
|
|
|
816
1397
|
d: "M17 7L7 17M8 7h9v9"
|
|
817
1398
|
}, null, -1)]]);
|
|
818
1399
|
}
|
|
819
|
-
var
|
|
1400
|
+
var xn = h({
|
|
820
1401
|
name: "tabler-arrow-up-right",
|
|
821
|
-
render:
|
|
822
|
-
}),
|
|
1402
|
+
render: bn
|
|
1403
|
+
}), Sn = {
|
|
823
1404
|
viewBox: "0 0 24 24",
|
|
824
1405
|
width: "1.2em",
|
|
825
1406
|
height: "1.2em"
|
|
826
1407
|
};
|
|
827
|
-
function
|
|
828
|
-
return
|
|
1408
|
+
function Cn(e, t) {
|
|
1409
|
+
return C(), o("svg", Sn, [...t[0] ||= [s("path", {
|
|
829
1410
|
fill: "none",
|
|
830
1411
|
stroke: "currentColor",
|
|
831
1412
|
"stroke-linecap": "round",
|
|
@@ -834,16 +1415,16 @@ function ln(e, t) {
|
|
|
834
1415
|
d: "M5 12h14m-6 6l6-6m-6-6l6 6"
|
|
835
1416
|
}, null, -1)]]);
|
|
836
1417
|
}
|
|
837
|
-
var
|
|
1418
|
+
var wn = h({
|
|
838
1419
|
name: "tabler-arrow-right",
|
|
839
|
-
render:
|
|
840
|
-
}),
|
|
1420
|
+
render: Cn
|
|
1421
|
+
}), Tn = {
|
|
841
1422
|
viewBox: "0 0 24 24",
|
|
842
1423
|
width: "1.2em",
|
|
843
1424
|
height: "1.2em"
|
|
844
1425
|
};
|
|
845
|
-
function
|
|
846
|
-
return
|
|
1426
|
+
function En(e, t) {
|
|
1427
|
+
return C(), o("svg", Tn, [...t[0] ||= [s("path", {
|
|
847
1428
|
fill: "none",
|
|
848
1429
|
stroke: "currentColor",
|
|
849
1430
|
"stroke-linecap": "round",
|
|
@@ -852,16 +1433,16 @@ function fn(e, t) {
|
|
|
852
1433
|
d: "M5 12h14"
|
|
853
1434
|
}, null, -1)]]);
|
|
854
1435
|
}
|
|
855
|
-
var
|
|
1436
|
+
var Dn = h({
|
|
856
1437
|
name: "tabler-minus",
|
|
857
|
-
render:
|
|
858
|
-
}),
|
|
1438
|
+
render: En
|
|
1439
|
+
}), On = {
|
|
859
1440
|
viewBox: "0 0 24 24",
|
|
860
1441
|
width: "1.2em",
|
|
861
1442
|
height: "1.2em"
|
|
862
1443
|
};
|
|
863
|
-
function
|
|
864
|
-
return
|
|
1444
|
+
function kn(e, t) {
|
|
1445
|
+
return C(), o("svg", On, [...t[0] ||= [s("path", {
|
|
865
1446
|
fill: "none",
|
|
866
1447
|
stroke: "currentColor",
|
|
867
1448
|
"stroke-linecap": "round",
|
|
@@ -870,16 +1451,16 @@ function hn(e, t) {
|
|
|
870
1451
|
d: "M3 12v.01M7 12h10m4 0v.01"
|
|
871
1452
|
}, null, -1)]]);
|
|
872
1453
|
}
|
|
873
|
-
var
|
|
1454
|
+
var An = h({
|
|
874
1455
|
name: "tabler-separator",
|
|
875
|
-
render:
|
|
876
|
-
}),
|
|
1456
|
+
render: kn
|
|
1457
|
+
}), jn = {
|
|
877
1458
|
viewBox: "0 0 24 24",
|
|
878
1459
|
width: "1.2em",
|
|
879
1460
|
height: "1.2em"
|
|
880
1461
|
};
|
|
881
|
-
function
|
|
882
|
-
return
|
|
1462
|
+
function Mn(e, t) {
|
|
1463
|
+
return C(), o("svg", jn, [...t[0] ||= [s("path", {
|
|
883
1464
|
fill: "none",
|
|
884
1465
|
stroke: "currentColor",
|
|
885
1466
|
"stroke-linecap": "round",
|
|
@@ -888,16 +1469,16 @@ function vn(e, t) {
|
|
|
888
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"
|
|
889
1470
|
}, null, -1)]]);
|
|
890
1471
|
}
|
|
891
|
-
var
|
|
1472
|
+
var Nn = h({
|
|
892
1473
|
name: "tabler-crosshair",
|
|
893
|
-
render:
|
|
894
|
-
}),
|
|
1474
|
+
render: Mn
|
|
1475
|
+
}), Pn = {
|
|
895
1476
|
viewBox: "0 0 24 24",
|
|
896
1477
|
width: "1.2em",
|
|
897
1478
|
height: "1.2em"
|
|
898
1479
|
};
|
|
899
|
-
function
|
|
900
|
-
return
|
|
1480
|
+
function Fn(e, t) {
|
|
1481
|
+
return C(), o("svg", Pn, [...t[0] ||= [s("g", {
|
|
901
1482
|
fill: "none",
|
|
902
1483
|
stroke: "currentColor",
|
|
903
1484
|
"stroke-linecap": "round",
|
|
@@ -905,16 +1486,16 @@ function xn(e, t) {
|
|
|
905
1486
|
"stroke-width": "2"
|
|
906
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)]]);
|
|
907
1488
|
}
|
|
908
|
-
var
|
|
1489
|
+
var In = h({
|
|
909
1490
|
name: "tabler-info-circle",
|
|
910
|
-
render:
|
|
911
|
-
}),
|
|
1491
|
+
render: Fn
|
|
1492
|
+
}), Ln = {
|
|
912
1493
|
viewBox: "0 0 24 24",
|
|
913
1494
|
width: "1.2em",
|
|
914
1495
|
height: "1.2em"
|
|
915
1496
|
};
|
|
916
|
-
function
|
|
917
|
-
return
|
|
1497
|
+
function Rn(e, t) {
|
|
1498
|
+
return C(), o("svg", Ln, [...t[0] ||= [s("path", {
|
|
918
1499
|
fill: "none",
|
|
919
1500
|
stroke: "currentColor",
|
|
920
1501
|
"stroke-linecap": "round",
|
|
@@ -923,16 +1504,16 @@ function wn(e, t) {
|
|
|
923
1504
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
|
|
924
1505
|
}, null, -1)]]);
|
|
925
1506
|
}
|
|
926
|
-
var
|
|
1507
|
+
var zn = h({
|
|
927
1508
|
name: "tabler-zoom-in",
|
|
928
|
-
render:
|
|
929
|
-
}),
|
|
1509
|
+
render: Rn
|
|
1510
|
+
}), Bn = {
|
|
930
1511
|
viewBox: "0 0 24 24",
|
|
931
1512
|
width: "1.2em",
|
|
932
1513
|
height: "1.2em"
|
|
933
1514
|
};
|
|
934
|
-
function
|
|
935
|
-
return
|
|
1515
|
+
function Vn(e, t) {
|
|
1516
|
+
return C(), o("svg", Bn, [...t[0] ||= [s("path", {
|
|
936
1517
|
fill: "none",
|
|
937
1518
|
stroke: "currentColor",
|
|
938
1519
|
"stroke-linecap": "round",
|
|
@@ -941,16 +1522,16 @@ function Dn(e, t) {
|
|
|
941
1522
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
|
|
942
1523
|
}, null, -1)]]);
|
|
943
1524
|
}
|
|
944
|
-
var
|
|
1525
|
+
var Hn = h({
|
|
945
1526
|
name: "tabler-zoom-out",
|
|
946
|
-
render:
|
|
947
|
-
}),
|
|
1527
|
+
render: Vn
|
|
1528
|
+
}), Un = {
|
|
948
1529
|
viewBox: "0 0 24 24",
|
|
949
1530
|
width: "1.2em",
|
|
950
1531
|
height: "1.2em"
|
|
951
1532
|
};
|
|
952
|
-
function
|
|
953
|
-
return
|
|
1533
|
+
function Wn(e, t) {
|
|
1534
|
+
return C(), o("svg", Un, [...t[0] ||= [s("path", {
|
|
954
1535
|
fill: "none",
|
|
955
1536
|
stroke: "currentColor",
|
|
956
1537
|
"stroke-linecap": "round",
|
|
@@ -959,16 +1540,16 @@ function An(e, t) {
|
|
|
959
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"
|
|
960
1541
|
}, null, -1)]]);
|
|
961
1542
|
}
|
|
962
|
-
var
|
|
1543
|
+
var Gn = h({
|
|
963
1544
|
name: "tabler-maximize",
|
|
964
|
-
render:
|
|
965
|
-
}),
|
|
1545
|
+
render: Wn
|
|
1546
|
+
}), Kn = {
|
|
966
1547
|
viewBox: "0 0 24 24",
|
|
967
1548
|
width: "1.2em",
|
|
968
1549
|
height: "1.2em"
|
|
969
1550
|
};
|
|
970
|
-
function
|
|
971
|
-
return
|
|
1551
|
+
function qn(e, t) {
|
|
1552
|
+
return C(), o("svg", Kn, [...t[0] ||= [s("path", {
|
|
972
1553
|
fill: "none",
|
|
973
1554
|
stroke: "currentColor",
|
|
974
1555
|
"stroke-linecap": "round",
|
|
@@ -977,16 +1558,16 @@ function Nn(e, t) {
|
|
|
977
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"
|
|
978
1559
|
}, null, -1)]]);
|
|
979
1560
|
}
|
|
980
|
-
var
|
|
1561
|
+
var Jn = h({
|
|
981
1562
|
name: "tabler-minimize",
|
|
982
|
-
render:
|
|
983
|
-
}),
|
|
1563
|
+
render: qn
|
|
1564
|
+
}), Yn = {
|
|
984
1565
|
viewBox: "0 0 24 24",
|
|
985
1566
|
width: "1.2em",
|
|
986
1567
|
height: "1.2em"
|
|
987
1568
|
};
|
|
988
|
-
function
|
|
989
|
-
return
|
|
1569
|
+
function Xn(e, t) {
|
|
1570
|
+
return C(), o("svg", Yn, [...t[0] ||= [s("g", {
|
|
990
1571
|
fill: "none",
|
|
991
1572
|
stroke: "currentColor",
|
|
992
1573
|
"stroke-linecap": "round",
|
|
@@ -994,16 +1575,16 @@ function In(e, t) {
|
|
|
994
1575
|
"stroke-width": "2"
|
|
995
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)]]);
|
|
996
1577
|
}
|
|
997
|
-
var
|
|
1578
|
+
var Zn = h({
|
|
998
1579
|
name: "tabler-settings",
|
|
999
|
-
render:
|
|
1000
|
-
}),
|
|
1580
|
+
render: Xn
|
|
1581
|
+
}), Qn = {
|
|
1001
1582
|
viewBox: "0 0 24 24",
|
|
1002
1583
|
width: "1.2em",
|
|
1003
1584
|
height: "1.2em"
|
|
1004
1585
|
};
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
1586
|
+
function $n(e, t) {
|
|
1587
|
+
return C(), o("svg", Qn, [...t[0] ||= [s("path", {
|
|
1007
1588
|
fill: "none",
|
|
1008
1589
|
stroke: "currentColor",
|
|
1009
1590
|
"stroke-linecap": "round",
|
|
@@ -1012,16 +1593,16 @@ function zn(e, t) {
|
|
|
1012
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"
|
|
1013
1594
|
}, null, -1)]]);
|
|
1014
1595
|
}
|
|
1015
|
-
var
|
|
1596
|
+
var er = h({
|
|
1016
1597
|
name: "tabler-shape",
|
|
1017
|
-
render:
|
|
1018
|
-
}),
|
|
1598
|
+
render: $n
|
|
1599
|
+
}), tr = {
|
|
1019
1600
|
viewBox: "0 0 24 24",
|
|
1020
1601
|
width: "1.2em",
|
|
1021
1602
|
height: "1.2em"
|
|
1022
1603
|
};
|
|
1023
|
-
function
|
|
1024
|
-
return
|
|
1604
|
+
function nr(e, t) {
|
|
1605
|
+
return C(), o("svg", tr, [...t[0] ||= [s("path", {
|
|
1025
1606
|
fill: "none",
|
|
1026
1607
|
stroke: "currentColor",
|
|
1027
1608
|
"stroke-linecap": "round",
|
|
@@ -1030,16 +1611,16 @@ function Hn(e, t) {
|
|
|
1030
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"
|
|
1031
1612
|
}, null, -1)]]);
|
|
1032
1613
|
}
|
|
1033
|
-
var
|
|
1614
|
+
var rr = h({
|
|
1034
1615
|
name: "tabler-chart-dots-3",
|
|
1035
|
-
render:
|
|
1036
|
-
}),
|
|
1616
|
+
render: nr
|
|
1617
|
+
}), ir = {
|
|
1037
1618
|
viewBox: "0 0 24 24",
|
|
1038
1619
|
width: "1.2em",
|
|
1039
1620
|
height: "1.2em"
|
|
1040
1621
|
};
|
|
1041
|
-
function
|
|
1042
|
-
return
|
|
1622
|
+
function ar(e, t) {
|
|
1623
|
+
return C(), o("svg", ir, [...t[0] ||= [s("path", {
|
|
1043
1624
|
fill: "none",
|
|
1044
1625
|
stroke: "currentColor",
|
|
1045
1626
|
"stroke-linecap": "round",
|
|
@@ -1048,16 +1629,16 @@ function Gn(e, t) {
|
|
|
1048
1629
|
d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
|
|
1049
1630
|
}, null, -1)]]);
|
|
1050
1631
|
}
|
|
1051
|
-
var
|
|
1632
|
+
var or = h({
|
|
1052
1633
|
name: "tabler-caret-up-down",
|
|
1053
|
-
render:
|
|
1054
|
-
}),
|
|
1634
|
+
render: ar
|
|
1635
|
+
}), sr = {
|
|
1055
1636
|
viewBox: "0 0 24 24",
|
|
1056
1637
|
width: "1.2em",
|
|
1057
1638
|
height: "1.2em"
|
|
1058
1639
|
};
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
1640
|
+
function cr(e, t) {
|
|
1641
|
+
return C(), o("svg", sr, [...t[0] ||= [s("path", {
|
|
1061
1642
|
fill: "none",
|
|
1062
1643
|
stroke: "currentColor",
|
|
1063
1644
|
"stroke-linecap": "round",
|
|
@@ -1066,34 +1647,52 @@ function Jn(e, t) {
|
|
|
1066
1647
|
d: "M8 4H5v16h3m8-16h3v16h-3"
|
|
1067
1648
|
}, null, -1)]]);
|
|
1068
1649
|
}
|
|
1069
|
-
var
|
|
1650
|
+
var lr = h({
|
|
1070
1651
|
name: "tabler-brackets",
|
|
1071
|
-
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
|
|
1072
1671
|
});
|
|
1073
1672
|
//#endregion
|
|
1074
1673
|
//#region src/debug/canvasProfiler.ts
|
|
1075
|
-
function
|
|
1674
|
+
function pr() {
|
|
1076
1675
|
return Object.create(null);
|
|
1077
1676
|
}
|
|
1078
|
-
function
|
|
1677
|
+
function mr() {
|
|
1079
1678
|
return {
|
|
1080
|
-
ctxMethods:
|
|
1081
|
-
ctxProps:
|
|
1082
|
-
canvasProps:
|
|
1679
|
+
ctxMethods: pr(),
|
|
1680
|
+
ctxProps: pr(),
|
|
1681
|
+
canvasProps: pr(),
|
|
1083
1682
|
ctxMethodSources: Object.create(null)
|
|
1084
1683
|
};
|
|
1085
1684
|
}
|
|
1086
|
-
function
|
|
1685
|
+
function hr(e, t, n) {
|
|
1087
1686
|
let r = e[t] ??= {
|
|
1088
1687
|
count: 0,
|
|
1089
1688
|
totalTime: 0
|
|
1090
1689
|
};
|
|
1091
1690
|
r.count += 1, r.totalTime += n;
|
|
1092
1691
|
}
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1692
|
+
function gr(e, t, n, r) {
|
|
1693
|
+
hr(e.ctxMethodSources[t] ??= pr(), n, r);
|
|
1095
1694
|
}
|
|
1096
|
-
function
|
|
1695
|
+
function _r(e) {
|
|
1097
1696
|
return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
|
|
1098
1697
|
name: e,
|
|
1099
1698
|
count: t.count,
|
|
@@ -1101,12 +1700,12 @@ function er(e) {
|
|
|
1101
1700
|
averageTime: (t.totalTime / t.count).toFixed(4)
|
|
1102
1701
|
})).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
|
|
1103
1702
|
}
|
|
1104
|
-
var
|
|
1105
|
-
function
|
|
1106
|
-
|
|
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();
|
|
1107
1706
|
}
|
|
1108
|
-
function
|
|
1109
|
-
if (!
|
|
1707
|
+
function Sr() {
|
|
1708
|
+
if (!vr) return "disabled";
|
|
1110
1709
|
let e = (/* @__PURE__ */ Error()).stack;
|
|
1111
1710
|
if (!e) return "unknown";
|
|
1112
1711
|
let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
@@ -1121,114 +1720,114 @@ function ar() {
|
|
|
1121
1720
|
}
|
|
1122
1721
|
function Q(e, t, n, r) {
|
|
1123
1722
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1124
|
-
if (
|
|
1723
|
+
if (yr.has(i)) return;
|
|
1125
1724
|
let a = Reflect.get(e, t);
|
|
1126
|
-
typeof a == "function" && (
|
|
1127
|
-
if (!
|
|
1128
|
-
let i = r?.captureSource ?
|
|
1129
|
-
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;
|
|
1130
1729
|
}));
|
|
1131
1730
|
}
|
|
1132
|
-
function
|
|
1731
|
+
function Cr(e, t, n) {
|
|
1133
1732
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
1134
1733
|
if (!r?.set || !r.configurable) return;
|
|
1135
1734
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1136
|
-
|
|
1735
|
+
br.has(i) || (br.set(i, r), Object.defineProperty(e, t, {
|
|
1137
1736
|
configurable: !0,
|
|
1138
1737
|
enumerable: r.enumerable ?? !1,
|
|
1139
1738
|
get: r.get,
|
|
1140
1739
|
set(e) {
|
|
1141
|
-
if (!
|
|
1740
|
+
if (!vr) {
|
|
1142
1741
|
r.set.call(this, e);
|
|
1143
1742
|
return;
|
|
1144
1743
|
}
|
|
1145
1744
|
let i = performance.now();
|
|
1146
|
-
r.set.call(this, e),
|
|
1745
|
+
r.set.call(this, e), hr(n, t, performance.now() - i);
|
|
1147
1746
|
}
|
|
1148
1747
|
}));
|
|
1149
1748
|
}
|
|
1150
|
-
function
|
|
1749
|
+
function wr() {
|
|
1151
1750
|
if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1152
1751
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1153
1752
|
if (!e || !t) return;
|
|
1154
|
-
let n =
|
|
1155
|
-
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n),
|
|
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 = () => {
|
|
1156
1755
|
let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
|
|
1157
1756
|
if (e) {
|
|
1158
|
-
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));
|
|
1159
1758
|
for (let t of ["fillText", "measureText"]) {
|
|
1160
1759
|
let n = e.ctxMethodSources[t];
|
|
1161
|
-
n && (console.log(`${t} sources`), console.table(
|
|
1760
|
+
n && (console.log(`${t} sources`), console.table(_r(n).slice(0, 20)));
|
|
1162
1761
|
}
|
|
1163
1762
|
console.groupEnd();
|
|
1164
1763
|
}
|
|
1165
1764
|
}, window.resetCanvasReport = () => {
|
|
1166
|
-
window.__KMAP_CANVAS_PROFILER_METRICS__ =
|
|
1765
|
+
window.__KMAP_CANVAS_PROFILER_METRICS__ = mr();
|
|
1167
1766
|
}, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
|
|
1168
1767
|
}
|
|
1169
|
-
function
|
|
1768
|
+
function Tr() {
|
|
1170
1769
|
if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1171
1770
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1172
|
-
|
|
1771
|
+
yr.forEach((n, r) => {
|
|
1173
1772
|
let i = r.match(/^(.+):(.+)$/);
|
|
1174
1773
|
if (!i) return;
|
|
1175
1774
|
let [, a, o] = i, s = null;
|
|
1176
1775
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
|
|
1177
|
-
}),
|
|
1776
|
+
}), yr.clear(), br.forEach((n, r) => {
|
|
1178
1777
|
let i = r.match(/^(.+):(.+)$/);
|
|
1179
1778
|
if (!i) return;
|
|
1180
1779
|
let [, a, o] = i, s = null;
|
|
1181
1780
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
|
|
1182
|
-
}),
|
|
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.");
|
|
1183
1782
|
}
|
|
1184
1783
|
//#endregion
|
|
1185
1784
|
//#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1186
|
-
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({
|
|
1187
1786
|
__name: "ChartSettingsDialog",
|
|
1188
1787
|
props: { show: { type: Boolean } },
|
|
1189
1788
|
emits: ["close", "confirm"],
|
|
1190
1789
|
setup(u, { emit: d }) {
|
|
1191
|
-
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);
|
|
1192
1791
|
function y() {
|
|
1193
1792
|
try {
|
|
1194
|
-
let e = localStorage.getItem(
|
|
1793
|
+
let e = localStorage.getItem(he);
|
|
1195
1794
|
if (e) {
|
|
1196
1795
|
let t = JSON.parse(e), n = {};
|
|
1197
|
-
return
|
|
1796
|
+
return W.forEach((e) => {
|
|
1198
1797
|
n[e.key] = t[e.key] ?? e.default;
|
|
1199
|
-
}), n.colorPresetSettings =
|
|
1798
|
+
}), n.colorPresetSettings = H(t.colorPresetSettings), n;
|
|
1200
1799
|
}
|
|
1201
1800
|
} catch {}
|
|
1202
1801
|
let e = {};
|
|
1203
|
-
return
|
|
1802
|
+
return W.forEach((t) => {
|
|
1204
1803
|
e[t.key] = t.default;
|
|
1205
1804
|
}), e.colorPresetSettings = {}, e;
|
|
1206
1805
|
}
|
|
1207
|
-
let b =
|
|
1208
|
-
|
|
1806
|
+
let b = T(y());
|
|
1807
|
+
N(() => f.show, (e) => {
|
|
1209
1808
|
e && (b.value = y());
|
|
1210
1809
|
});
|
|
1211
1810
|
function x() {
|
|
1212
1811
|
p("close");
|
|
1213
1812
|
}
|
|
1214
|
-
function
|
|
1813
|
+
function S() {
|
|
1215
1814
|
let e = {};
|
|
1216
|
-
|
|
1815
|
+
W.forEach((t) => {
|
|
1217
1816
|
e[t.key] = t.default;
|
|
1218
1817
|
}), e.colorPresetSettings = {}, b.value = e;
|
|
1219
1818
|
}
|
|
1220
|
-
function
|
|
1819
|
+
function w() {
|
|
1221
1820
|
p("confirm", { ...b.value });
|
|
1222
1821
|
}
|
|
1223
|
-
return (r, d) => (
|
|
1224
|
-
default:
|
|
1822
|
+
return (r, d) => (C(), i(t, { to: A(m) }, [l(n, { name: "overlay" }, {
|
|
1823
|
+
default: P(() => [u.show ? (C(), o("div", {
|
|
1225
1824
|
key: 0,
|
|
1226
1825
|
class: "settings-overlay",
|
|
1227
1826
|
onClick: x
|
|
1228
1827
|
}, [l(n, { name: "modal" }, {
|
|
1229
|
-
default:
|
|
1828
|
+
default: P(() => [s("div", {
|
|
1230
1829
|
class: "settings-modal",
|
|
1231
|
-
onClick: d[1] ||=
|
|
1830
|
+
onClick: d[1] ||= L(() => {}, ["stop"])
|
|
1232
1831
|
}, [
|
|
1233
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", {
|
|
1234
1833
|
class: "settings-close",
|
|
@@ -1239,16 +1838,16 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1239
1838
|
stroke: "currentColor",
|
|
1240
1839
|
"stroke-width": "2"
|
|
1241
1840
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
1242
|
-
s("div",
|
|
1243
|
-
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", {
|
|
1244
1843
|
key: e.key,
|
|
1245
1844
|
class: "settings-item"
|
|
1246
|
-
}, [s("label",
|
|
1845
|
+
}, [s("label", Dr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1247
1846
|
key: 0,
|
|
1248
1847
|
type: "checkbox",
|
|
1249
1848
|
class: "settings-checkbox",
|
|
1250
1849
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1251
|
-
}, null, 8,
|
|
1850
|
+
}, null, 8, Or)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1252
1851
|
key: 1,
|
|
1253
1852
|
"model-value": String(b.value[e.key]),
|
|
1254
1853
|
options: e.options,
|
|
@@ -1261,15 +1860,15 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1261
1860
|
"onUpdate:modelValue"
|
|
1262
1861
|
])) : a("", !0)])]))), 128))], 64)) : a("", !0),
|
|
1263
1862
|
d[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
|
|
1264
|
-
(
|
|
1863
|
+
(C(!0), o(e, null, E(_.value, (e) => (C(), o("div", {
|
|
1265
1864
|
key: e.key,
|
|
1266
1865
|
class: "settings-item"
|
|
1267
|
-
}, [s("label",
|
|
1866
|
+
}, [s("label", kr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1268
1867
|
key: 0,
|
|
1269
1868
|
type: "checkbox",
|
|
1270
1869
|
class: "settings-checkbox",
|
|
1271
1870
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1272
|
-
}, null, 8,
|
|
1871
|
+
}, null, 8, Ar)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1273
1872
|
key: 1,
|
|
1274
1873
|
"model-value": String(b.value[e.key]),
|
|
1275
1874
|
options: e.options,
|
|
@@ -1293,15 +1892,15 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1293
1892
|
height: "16",
|
|
1294
1893
|
class: "nav-arrow"
|
|
1295
1894
|
}, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
|
|
1296
|
-
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", {
|
|
1297
1896
|
key: e.key,
|
|
1298
1897
|
class: "settings-item experimental"
|
|
1299
|
-
}, [s("label",
|
|
1898
|
+
}, [s("label", jr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1300
1899
|
key: 0,
|
|
1301
1900
|
type: "checkbox",
|
|
1302
1901
|
class: "settings-checkbox",
|
|
1303
1902
|
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1304
|
-
}, null, 8,
|
|
1903
|
+
}, null, 8, Mr)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1305
1904
|
key: 1,
|
|
1306
1905
|
"model-value": String(b.value[e.key]),
|
|
1307
1906
|
options: e.options,
|
|
@@ -1316,7 +1915,7 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1316
1915
|
]),
|
|
1317
1916
|
s("div", { class: "settings-footer" }, [s("button", {
|
|
1318
1917
|
class: "settings-btn reset",
|
|
1319
|
-
onClick:
|
|
1918
|
+
onClick: S
|
|
1320
1919
|
}, [...d[12] ||= [s("svg", {
|
|
1321
1920
|
viewBox: "0 0 24 24",
|
|
1322
1921
|
fill: "none",
|
|
@@ -1327,7 +1926,7 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1327
1926
|
onClick: x
|
|
1328
1927
|
}, "取消"), s("button", {
|
|
1329
1928
|
class: "settings-btn confirm",
|
|
1330
|
-
onClick:
|
|
1929
|
+
onClick: w
|
|
1331
1930
|
}, [...d[13] ||= [s("svg", {
|
|
1332
1931
|
viewBox: "0 0 24 24",
|
|
1333
1932
|
fill: "none",
|
|
@@ -1339,15 +1938,15 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1339
1938
|
})])) : a("", !0)]),
|
|
1340
1939
|
_: 1
|
|
1341
1940
|
}), l(n, { name: "overlay" }, {
|
|
1342
|
-
default:
|
|
1941
|
+
default: P(() => [v.value ? (C(), o("div", {
|
|
1343
1942
|
key: 0,
|
|
1344
1943
|
class: "settings-overlay nested-overlay",
|
|
1345
1944
|
onClick: d[5] ||= (e) => v.value = !1
|
|
1346
1945
|
}, [l(n, { name: "modal" }, {
|
|
1347
|
-
default:
|
|
1946
|
+
default: P(() => [s("div", {
|
|
1348
1947
|
class: "settings-modal",
|
|
1349
|
-
onClick: d[4] ||=
|
|
1350
|
-
}, [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", {
|
|
1351
1950
|
class: "settings-close",
|
|
1352
1951
|
onClick: d[2] ||= (e) => v.value = !1
|
|
1353
1952
|
}, [...d[14] ||= [s("svg", {
|
|
@@ -1355,7 +1954,7 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1355
1954
|
fill: "none",
|
|
1356
1955
|
stroke: "currentColor",
|
|
1357
1956
|
"stroke-width": "2"
|
|
1358
|
-
}, [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, {
|
|
1359
1958
|
"color-preset-settings": b.value.colorPresetSettings,
|
|
1360
1959
|
"onUpdate:colorPresetSettings": d[3] ||= (e) => b.value = {
|
|
1361
1960
|
...b.value,
|
|
@@ -1367,18 +1966,18 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1367
1966
|
_: 1
|
|
1368
1967
|
})], 8, ["to"]));
|
|
1369
1968
|
}
|
|
1370
|
-
}), [["__scopeId", "data-v-e04604ac"]]),
|
|
1969
|
+
}), [["__scopeId", "data-v-e04604ac"]]), Lr = {
|
|
1371
1970
|
class: "left-toolbar",
|
|
1372
1971
|
"aria-label": "图表工具栏"
|
|
1373
|
-
},
|
|
1972
|
+
}, Rr = { class: "left-toolbar__group" }, zr = [
|
|
1374
1973
|
"title",
|
|
1375
1974
|
"aria-label",
|
|
1376
1975
|
"onClick"
|
|
1377
|
-
],
|
|
1976
|
+
], Br = ["onClick"], Vr = [
|
|
1378
1977
|
"title",
|
|
1379
1978
|
"aria-label",
|
|
1380
1979
|
"onClick"
|
|
1381
|
-
],
|
|
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({
|
|
1382
1981
|
__name: "LeftToolbar",
|
|
1383
1982
|
props: { isFullscreen: { type: Boolean } },
|
|
1384
1983
|
emits: [
|
|
@@ -1393,103 +1992,108 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1393
1992
|
{
|
|
1394
1993
|
id: "cursor",
|
|
1395
1994
|
title: "光标",
|
|
1396
|
-
icon:
|
|
1995
|
+
icon: hn
|
|
1397
1996
|
},
|
|
1398
1997
|
{
|
|
1399
1998
|
id: "lines",
|
|
1400
1999
|
title: "线条",
|
|
1401
|
-
icon:
|
|
2000
|
+
icon: vn,
|
|
1402
2001
|
children: [
|
|
1403
2002
|
{
|
|
1404
2003
|
id: "trend-line",
|
|
1405
2004
|
title: "线段",
|
|
1406
|
-
icon:
|
|
2005
|
+
icon: vn
|
|
1407
2006
|
},
|
|
1408
2007
|
{
|
|
1409
2008
|
id: "ray",
|
|
1410
2009
|
title: "射线",
|
|
1411
|
-
icon:
|
|
2010
|
+
icon: xn
|
|
1412
2011
|
},
|
|
1413
2012
|
{
|
|
1414
2013
|
id: "h-line",
|
|
1415
2014
|
title: "水平线",
|
|
1416
|
-
icon:
|
|
2015
|
+
icon: Dn
|
|
1417
2016
|
},
|
|
1418
2017
|
{
|
|
1419
2018
|
id: "h-ray",
|
|
1420
2019
|
title: "水平射线",
|
|
1421
|
-
icon:
|
|
2020
|
+
icon: wn
|
|
1422
2021
|
},
|
|
1423
2022
|
{
|
|
1424
2023
|
id: "v-line",
|
|
1425
2024
|
title: "垂直线",
|
|
1426
|
-
icon:
|
|
2025
|
+
icon: An
|
|
1427
2026
|
},
|
|
1428
2027
|
{
|
|
1429
2028
|
id: "crosshair-line",
|
|
1430
2029
|
title: "十字线",
|
|
1431
|
-
icon:
|
|
2030
|
+
icon: Nn
|
|
1432
2031
|
},
|
|
1433
2032
|
{
|
|
1434
2033
|
id: "info-line",
|
|
1435
2034
|
title: "信息线",
|
|
1436
|
-
icon:
|
|
2035
|
+
icon: In
|
|
1437
2036
|
}
|
|
1438
2037
|
]
|
|
1439
2038
|
},
|
|
1440
2039
|
{
|
|
1441
2040
|
id: "channels",
|
|
1442
2041
|
title: "通道",
|
|
1443
|
-
icon:
|
|
2042
|
+
icon: er,
|
|
1444
2043
|
children: [
|
|
1445
2044
|
{
|
|
1446
2045
|
id: "parallel-channel",
|
|
1447
2046
|
title: "平行通道",
|
|
1448
|
-
icon:
|
|
2047
|
+
icon: er
|
|
1449
2048
|
},
|
|
1450
2049
|
{
|
|
1451
2050
|
id: "regression-channel",
|
|
1452
2051
|
title: "回归趋势",
|
|
1453
|
-
icon:
|
|
2052
|
+
icon: rr
|
|
1454
2053
|
},
|
|
1455
2054
|
{
|
|
1456
2055
|
id: "flat-line",
|
|
1457
2056
|
title: "平滑顶底",
|
|
1458
|
-
icon:
|
|
2057
|
+
icon: or
|
|
1459
2058
|
},
|
|
1460
2059
|
{
|
|
1461
2060
|
id: "disjoint-channel",
|
|
1462
2061
|
title: "不相交通道",
|
|
1463
|
-
icon:
|
|
2062
|
+
icon: lr
|
|
1464
2063
|
}
|
|
1465
2064
|
]
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
id: "range-select",
|
|
2068
|
+
title: "导出区间数据",
|
|
2069
|
+
icon: fr
|
|
1466
2070
|
}
|
|
1467
|
-
], d = c, f =
|
|
2071
|
+
], d = c, f = T("cursor"), p = T(null), m = T(!1);
|
|
1468
2072
|
function h() {
|
|
1469
2073
|
try {
|
|
1470
|
-
let e = localStorage.getItem(
|
|
2074
|
+
let e = localStorage.getItem(he);
|
|
1471
2075
|
if (e) {
|
|
1472
2076
|
let t = JSON.parse(e), n = { ...t };
|
|
1473
|
-
return
|
|
2077
|
+
return W.forEach((e) => {
|
|
1474
2078
|
n[e.key] = t[e.key] ?? e.default;
|
|
1475
2079
|
}), n;
|
|
1476
2080
|
}
|
|
1477
2081
|
} catch {}
|
|
1478
2082
|
let e = {};
|
|
1479
|
-
return
|
|
2083
|
+
return W.forEach((t) => {
|
|
1480
2084
|
e[t.key] = t.default;
|
|
1481
2085
|
}), e;
|
|
1482
2086
|
}
|
|
1483
|
-
function
|
|
2087
|
+
function g(e) {
|
|
1484
2088
|
try {
|
|
1485
|
-
localStorage.setItem(
|
|
2089
|
+
localStorage.setItem(he, JSON.stringify(e));
|
|
1486
2090
|
} catch {}
|
|
1487
2091
|
}
|
|
1488
|
-
let v =
|
|
1489
|
-
function
|
|
2092
|
+
let v = T(h());
|
|
2093
|
+
function y(e) {
|
|
1490
2094
|
return f.value === e.id ? !0 : e.children ? e.children.some((e) => e.id === f.value) : !1;
|
|
1491
2095
|
}
|
|
1492
|
-
function
|
|
2096
|
+
function x(e) {
|
|
1493
2097
|
if (e.children?.length) {
|
|
1494
2098
|
if (!e.children.some((e) => e.id === f.value)) {
|
|
1495
2099
|
let t = e.children[0];
|
|
@@ -1500,13 +2104,13 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1500
2104
|
}
|
|
1501
2105
|
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
1502
2106
|
}
|
|
1503
|
-
function
|
|
2107
|
+
function w(e) {
|
|
1504
2108
|
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
1505
2109
|
}
|
|
1506
2110
|
function O(e) {
|
|
1507
2111
|
p.value = p.value === e ? null : e;
|
|
1508
2112
|
}
|
|
1509
|
-
function
|
|
2113
|
+
function k() {
|
|
1510
2114
|
m.value = !0;
|
|
1511
2115
|
}
|
|
1512
2116
|
function j() {
|
|
@@ -1514,67 +2118,67 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1514
2118
|
}
|
|
1515
2119
|
r({ getSettings: j });
|
|
1516
2120
|
function M(e) {
|
|
1517
|
-
v.value = { ...e },
|
|
2121
|
+
v.value = { ...e }, g(v.value), xr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
1518
2122
|
}
|
|
1519
|
-
function
|
|
2123
|
+
function N(e) {
|
|
1520
2124
|
e.target.closest(".tool-item") || (p.value = null);
|
|
1521
2125
|
}
|
|
1522
|
-
return
|
|
1523
|
-
document.addEventListener("click",
|
|
1524
|
-
}),
|
|
1525
|
-
document.removeEventListener("click",
|
|
1526
|
-
}), (r, c) => (
|
|
1527
|
-
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", {
|
|
1528
2132
|
key: t.id,
|
|
1529
2133
|
class: "tool-item"
|
|
1530
2134
|
}, [s("button", {
|
|
1531
2135
|
type: "button",
|
|
1532
|
-
class:
|
|
2136
|
+
class: _(["left-toolbar__button", { active: y(t) }]),
|
|
1533
2137
|
title: t.title,
|
|
1534
2138
|
"aria-label": t.title,
|
|
1535
|
-
onClick: (e) =>
|
|
1536
|
-
onPointerdown: c[0] ||=
|
|
1537
|
-
onPointermove: c[1] ||=
|
|
1538
|
-
onPointerup: c[2] ||=
|
|
1539
|
-
}, [(
|
|
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), {
|
|
1540
2144
|
class: "tool-icon",
|
|
1541
2145
|
"aria-hidden": "true"
|
|
1542
|
-
})), t.children && t.children.length ? (
|
|
2146
|
+
})), t.children && t.children.length ? (C(), o("span", {
|
|
1543
2147
|
key: 0,
|
|
1544
|
-
class:
|
|
1545
|
-
onClick:
|
|
2148
|
+
class: _(["corner-indicator", { open: p.value === t.id }]),
|
|
2149
|
+
onClick: L((e) => O(t.id), ["stop"]),
|
|
1546
2150
|
"aria-label": "展开子菜单"
|
|
1547
|
-
}, null, 10,
|
|
1548
|
-
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", {
|
|
1549
2153
|
key: 0,
|
|
1550
2154
|
class: "tool-dropdown",
|
|
1551
|
-
onPointerdown: c[3] ||=
|
|
1552
|
-
onPointermove: c[4] ||=
|
|
1553
|
-
onPointerup: c[5] ||=
|
|
1554
|
-
}, [(
|
|
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", {
|
|
1555
2159
|
key: e.id,
|
|
1556
2160
|
type: "button",
|
|
1557
|
-
class:
|
|
2161
|
+
class: _(["left-toolbar__button", { active: f.value === e.id }]),
|
|
1558
2162
|
title: e.title,
|
|
1559
2163
|
"aria-label": e.title,
|
|
1560
|
-
onClick: (t) =>
|
|
1561
|
-
}, [(
|
|
2164
|
+
onClick: (t) => w(e)
|
|
2165
|
+
}, [(C(), i(D(e.icon), {
|
|
1562
2166
|
class: "tool-icon",
|
|
1563
2167
|
"aria-hidden": "true"
|
|
1564
|
-
}))], 10,
|
|
2168
|
+
}))], 10, Vr))), 128))], 32)) : a("", !0)]),
|
|
1565
2169
|
_: 2
|
|
1566
2170
|
}, 1024)])), 64))]),
|
|
1567
2171
|
c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1568
|
-
s("div",
|
|
2172
|
+
s("div", Hr, [s("button", {
|
|
1569
2173
|
type: "button",
|
|
1570
2174
|
class: "left-toolbar__button",
|
|
1571
2175
|
title: "放大",
|
|
1572
2176
|
"aria-label": "放大",
|
|
1573
2177
|
onClick: c[6] ||= (e) => r.$emit("zoomIn"),
|
|
1574
|
-
onPointerdown: c[7] ||=
|
|
1575
|
-
onPointermove: c[8] ||=
|
|
1576
|
-
onPointerup: c[9] ||=
|
|
1577
|
-
}, [l(
|
|
2178
|
+
onPointerdown: c[7] ||= L(() => {}, ["stop"]),
|
|
2179
|
+
onPointermove: c[8] ||= L(() => {}, ["stop"]),
|
|
2180
|
+
onPointerup: c[9] ||= L(() => {}, ["stop"])
|
|
2181
|
+
}, [l(A(zn), {
|
|
1578
2182
|
class: "tool-icon",
|
|
1579
2183
|
"aria-hidden": "true"
|
|
1580
2184
|
})], 32), s("button", {
|
|
@@ -1583,53 +2187,53 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1583
2187
|
title: "缩小",
|
|
1584
2188
|
"aria-label": "缩小",
|
|
1585
2189
|
onClick: c[10] ||= (e) => r.$emit("zoomOut"),
|
|
1586
|
-
onPointerdown: c[11] ||=
|
|
1587
|
-
onPointermove: c[12] ||=
|
|
1588
|
-
onPointerup: c[13] ||=
|
|
1589
|
-
}, [l(
|
|
2190
|
+
onPointerdown: c[11] ||= L(() => {}, ["stop"]),
|
|
2191
|
+
onPointermove: c[12] ||= L(() => {}, ["stop"]),
|
|
2192
|
+
onPointerup: c[13] ||= L(() => {}, ["stop"])
|
|
2193
|
+
}, [l(A(Hn), {
|
|
1590
2194
|
class: "tool-icon",
|
|
1591
2195
|
"aria-hidden": "true"
|
|
1592
2196
|
})], 32)]),
|
|
1593
2197
|
c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1594
|
-
s("div",
|
|
2198
|
+
s("div", Ur, [s("button", {
|
|
1595
2199
|
type: "button",
|
|
1596
2200
|
class: "left-toolbar__button",
|
|
1597
2201
|
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1598
2202
|
"aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
1599
2203
|
onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
|
|
1600
|
-
onPointerdown: c[15] ||=
|
|
1601
|
-
onPointermove: c[16] ||=
|
|
1602
|
-
onPointerup: c[17] ||=
|
|
1603
|
-
}, [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), {
|
|
1604
2208
|
key: 0,
|
|
1605
2209
|
class: "tool-icon",
|
|
1606
2210
|
"aria-hidden": "true"
|
|
1607
|
-
})) : (
|
|
2211
|
+
})) : (C(), i(A(Gn), {
|
|
1608
2212
|
key: 1,
|
|
1609
2213
|
class: "tool-icon",
|
|
1610
2214
|
"aria-hidden": "true"
|
|
1611
|
-
}))], 40,
|
|
2215
|
+
}))], 40, Wr)]),
|
|
1612
2216
|
c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1613
|
-
s("div",
|
|
2217
|
+
s("div", Gr, [s("button", {
|
|
1614
2218
|
type: "button",
|
|
1615
2219
|
class: "left-toolbar__button",
|
|
1616
2220
|
title: "设置",
|
|
1617
2221
|
"aria-label": "设置",
|
|
1618
|
-
onClick:
|
|
1619
|
-
onPointerdown: c[18] ||=
|
|
1620
|
-
onPointermove: c[19] ||=
|
|
1621
|
-
onPointerup: c[20] ||=
|
|
1622
|
-
}, [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), {
|
|
1623
2227
|
class: "tool-icon",
|
|
1624
2228
|
"aria-hidden": "true"
|
|
1625
2229
|
})], 32)])
|
|
1626
|
-
]), l(
|
|
2230
|
+
]), l(Ir, {
|
|
1627
2231
|
show: m.value,
|
|
1628
2232
|
onClose: c[21] ||= (e) => m.value = !1,
|
|
1629
2233
|
onConfirm: M
|
|
1630
2234
|
}, null, 8, ["show"])], 64));
|
|
1631
2235
|
}
|
|
1632
|
-
}), [["__scopeId", "data-v-
|
|
2236
|
+
}), [["__scopeId", "data-v-e4748a67"]]), qr = /* @__PURE__ */ u({
|
|
1633
2237
|
__name: "KLineLevelDropdown",
|
|
1634
2238
|
props: { modelValue: {} },
|
|
1635
2239
|
emits: ["update:modelValue"],
|
|
@@ -1676,7 +2280,7 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1676
2280
|
value: "yearly"
|
|
1677
2281
|
}
|
|
1678
2282
|
], r = t;
|
|
1679
|
-
return (t, a) => (
|
|
2283
|
+
return (t, a) => (C(), i(Y, {
|
|
1680
2284
|
"model-value": e.modelValue,
|
|
1681
2285
|
options: n,
|
|
1682
2286
|
label: "级别",
|
|
@@ -1685,7 +2289,7 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1685
2289
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1686
2290
|
}, null, 8, ["model-value"]));
|
|
1687
2291
|
}
|
|
1688
|
-
}),
|
|
2292
|
+
}), Jr = /* @__PURE__ */ u({
|
|
1689
2293
|
__name: "KLineAdjustmentDropdown",
|
|
1690
2294
|
props: { modelValue: {} },
|
|
1691
2295
|
emits: ["update:modelValue"],
|
|
@@ -1708,7 +2312,7 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1708
2312
|
value: "none"
|
|
1709
2313
|
}
|
|
1710
2314
|
], r = t;
|
|
1711
|
-
return (t, a) => (
|
|
2315
|
+
return (t, a) => (C(), i(Y, {
|
|
1712
2316
|
"model-value": e.modelValue,
|
|
1713
2317
|
options: n,
|
|
1714
2318
|
label: "复权",
|
|
@@ -1717,13 +2321,13 @@ var lr = { class: "settings-body" }, ur = { class: "settings-label" }, dr = ["on
|
|
|
1717
2321
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1718
2322
|
}, null, 8, ["model-value"]));
|
|
1719
2323
|
}
|
|
1720
|
-
}),
|
|
2324
|
+
}), Yr = {
|
|
1721
2325
|
viewBox: "0 0 24 24",
|
|
1722
2326
|
width: "1.2em",
|
|
1723
2327
|
height: "1.2em"
|
|
1724
2328
|
};
|
|
1725
|
-
function
|
|
1726
|
-
return
|
|
2329
|
+
function Xr(e, t) {
|
|
2330
|
+
return C(), o("svg", Yr, [...t[0] ||= [s("path", {
|
|
1727
2331
|
fill: "none",
|
|
1728
2332
|
stroke: "currentColor",
|
|
1729
2333
|
"stroke-linecap": "round",
|
|
@@ -1732,26 +2336,21 @@ function Nr(e, t) {
|
|
|
1732
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"
|
|
1733
2337
|
}, null, -1)]]);
|
|
1734
2338
|
}
|
|
1735
|
-
var
|
|
2339
|
+
var Zr = h({
|
|
1736
2340
|
name: "tabler-alert-triangle",
|
|
1737
|
-
render:
|
|
1738
|
-
}),
|
|
2341
|
+
render: Xr
|
|
2342
|
+
}), Qr = ["title", "aria-expanded"], $r = { class: "symbol-chip__code" }, ei = {
|
|
1739
2343
|
key: 0,
|
|
1740
2344
|
class: "symbol-chip__spinner",
|
|
1741
2345
|
"aria-hidden": "true"
|
|
1742
|
-
},
|
|
1743
|
-
key: 0,
|
|
1744
|
-
class: "symbol-popover",
|
|
1745
|
-
role: "dialog",
|
|
1746
|
-
"aria-label": "切换合约"
|
|
1747
|
-
}, zr = { class: "symbol-search" }, Br = {
|
|
2346
|
+
}, ti = { class: "symbol-search" }, ni = {
|
|
1748
2347
|
class: "symbol-list",
|
|
1749
2348
|
role: "listbox",
|
|
1750
2349
|
"aria-label": "商品列表"
|
|
1751
|
-
},
|
|
2350
|
+
}, ri = {
|
|
1752
2351
|
key: 0,
|
|
1753
2352
|
class: "symbol-list__empty"
|
|
1754
|
-
},
|
|
2353
|
+
}, ii = {
|
|
1755
2354
|
width: "32",
|
|
1756
2355
|
height: "32",
|
|
1757
2356
|
viewBox: "0 0 32 32",
|
|
@@ -1760,7 +2359,7 @@ var Pr = m({
|
|
|
1760
2359
|
"margin-bottom": "8px",
|
|
1761
2360
|
opacity: "0.35"
|
|
1762
2361
|
}
|
|
1763
|
-
},
|
|
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({
|
|
1764
2363
|
__name: "SymbolSelector",
|
|
1765
2364
|
props: {
|
|
1766
2365
|
symbol: {},
|
|
@@ -1769,47 +2368,59 @@ var Pr = m({
|
|
|
1769
2368
|
error: { type: Boolean }
|
|
1770
2369
|
},
|
|
1771
2370
|
emits: ["change"],
|
|
1772
|
-
setup(
|
|
1773
|
-
let
|
|
1774
|
-
let e =
|
|
1775
|
-
return e ? `${e.code} - ${e.description}` :
|
|
1776
|
-
}),
|
|
1777
|
-
let e =
|
|
1778
|
-
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;
|
|
1779
2378
|
});
|
|
1780
|
-
function
|
|
1781
|
-
|
|
2379
|
+
function z() {
|
|
2380
|
+
p.value = !p.value, p.value && g(() => h.value?.focus());
|
|
1782
2381
|
}
|
|
1783
|
-
|
|
1784
|
-
|
|
2382
|
+
N(p, (e) => {
|
|
2383
|
+
e ? O() : j();
|
|
2384
|
+
});
|
|
2385
|
+
function ee() {
|
|
2386
|
+
m.value = "", h.value?.focus();
|
|
1785
2387
|
}
|
|
1786
|
-
function
|
|
1787
|
-
function
|
|
1788
|
-
|
|
2388
|
+
function te() {}
|
|
2389
|
+
function B(e) {
|
|
2390
|
+
f("change", e), p.value = !1, m.value = "";
|
|
1789
2391
|
}
|
|
1790
|
-
function
|
|
1791
|
-
|
|
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);
|
|
1792
2395
|
}
|
|
1793
|
-
return
|
|
1794
|
-
|
|
1795
|
-
}), (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", {
|
|
1796
2399
|
ref_key: "chipWrapRef",
|
|
1797
|
-
ref:
|
|
2400
|
+
ref: x,
|
|
1798
2401
|
class: "symbol-chip-wrap"
|
|
1799
2402
|
}, [s("button", {
|
|
1800
2403
|
type: "button",
|
|
1801
|
-
class:
|
|
1802
|
-
title:
|
|
1803
|
-
"aria-expanded":
|
|
2404
|
+
class: _(["symbol-chip", { "is-open": p.value }]),
|
|
2405
|
+
title: L.value,
|
|
2406
|
+
"aria-expanded": p.value,
|
|
1804
2407
|
"aria-haspopup": "dialog",
|
|
1805
|
-
onClick:
|
|
1806
|
-
}, [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), {
|
|
1807
2410
|
key: 1,
|
|
1808
2411
|
class: "symbol-chip__warn",
|
|
1809
2412
|
"aria-hidden": "true"
|
|
1810
|
-
})) : a("", !0)], 10,
|
|
1811
|
-
default:
|
|
1812
|
-
|
|
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", {
|
|
1813
2424
|
class: "symbol-search__icon",
|
|
1814
2425
|
"aria-hidden": "true"
|
|
1815
2426
|
}, [s("svg", {
|
|
@@ -1832,25 +2443,25 @@ var Pr = m({
|
|
|
1832
2443
|
"stroke-width": "1.6",
|
|
1833
2444
|
"stroke-linecap": "round"
|
|
1834
2445
|
})])], -1),
|
|
1835
|
-
|
|
2446
|
+
F(s("input", {
|
|
1836
2447
|
ref_key: "searchInputRef",
|
|
1837
|
-
ref:
|
|
1838
|
-
"onUpdate:modelValue":
|
|
2448
|
+
ref: h,
|
|
2449
|
+
"onUpdate:modelValue": u[0] ||= (e) => m.value = e,
|
|
1839
2450
|
class: "symbol-search__input",
|
|
1840
2451
|
type: "text",
|
|
1841
2452
|
placeholder: "搜索代码或名称…",
|
|
1842
2453
|
autocomplete: "off",
|
|
1843
2454
|
spellcheck: "false",
|
|
1844
2455
|
"aria-label": "搜索商品",
|
|
1845
|
-
onInput:
|
|
1846
|
-
}, null, 544), [[
|
|
1847
|
-
|
|
2456
|
+
onInput: te
|
|
2457
|
+
}, null, 544), [[M, m.value]]),
|
|
2458
|
+
m.value ? (C(), o("button", {
|
|
1848
2459
|
key: 0,
|
|
1849
2460
|
type: "button",
|
|
1850
2461
|
class: "symbol-search__clear",
|
|
1851
2462
|
"aria-label": "清空搜索",
|
|
1852
|
-
onClick:
|
|
1853
|
-
}, [...
|
|
2463
|
+
onClick: ee
|
|
2464
|
+
}, [...u[1] ||= [s("svg", {
|
|
1854
2465
|
class: "delete-icon",
|
|
1855
2466
|
viewBox: "0 0 24 24",
|
|
1856
2467
|
fill: "none",
|
|
@@ -1864,7 +2475,7 @@ var Pr = m({
|
|
|
1864
2475
|
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
1865
2476
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
1866
2477
|
], -1)]])) : a("", !0)
|
|
1867
|
-
]), s("div",
|
|
2478
|
+
]), s("div", ni, [R.value.length === 0 ? (C(), o("div", ri, [(C(), o("svg", ii, [...u[3] ||= [s("circle", {
|
|
1868
2479
|
cx: "13",
|
|
1869
2480
|
cy: "13",
|
|
1870
2481
|
r: "10",
|
|
@@ -1878,39 +2489,34 @@ var Pr = m({
|
|
|
1878
2489
|
stroke: "currentColor",
|
|
1879
2490
|
"stroke-width": "2",
|
|
1880
2491
|
"stroke-linecap": "round"
|
|
1881
|
-
}, 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", {
|
|
1882
2493
|
key: e.code,
|
|
1883
2494
|
type: "button",
|
|
1884
|
-
class:
|
|
2495
|
+
class: _(["symbol-list__item", { "is-active": e.code === c.symbol }]),
|
|
1885
2496
|
role: "option",
|
|
1886
|
-
"aria-selected": e.code ===
|
|
1887
|
-
onClick: (t) =>
|
|
1888
|
-
}, [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)]),
|
|
1889
2500
|
_: 1
|
|
1890
|
-
})], 512));
|
|
2501
|
+
})], 8, ["to"]))], 512));
|
|
1891
2502
|
}
|
|
1892
|
-
}), [["__scopeId", "data-v-
|
|
2503
|
+
}), [["__scopeId", "data-v-637dd0f1"]]), di = ["aria-expanded"], fi = {
|
|
1893
2504
|
key: 0,
|
|
1894
2505
|
class: "compare-chip__spinner"
|
|
1895
|
-
},
|
|
2506
|
+
}, pi = {
|
|
1896
2507
|
key: 1,
|
|
1897
2508
|
class: "compare-chip__badge"
|
|
1898
|
-
},
|
|
1899
|
-
key: 0,
|
|
1900
|
-
class: "compare-popover",
|
|
1901
|
-
role: "dialog",
|
|
1902
|
-
"aria-label": "比较商品"
|
|
1903
|
-
}, $r = { class: "compare-search" }, ei = {
|
|
2509
|
+
}, mi = { class: "compare-search" }, hi = {
|
|
1904
2510
|
key: 0,
|
|
1905
2511
|
class: "compare-selected"
|
|
1906
|
-
},
|
|
2512
|
+
}, gi = { class: "compare-selected__list" }, _i = { class: "compare-selected__code" }, vi = { class: "compare-selected__desc" }, yi = ["aria-label", "onClick"], bi = {
|
|
1907
2513
|
class: "compare-list",
|
|
1908
2514
|
role: "listbox",
|
|
1909
2515
|
"aria-label": "商品列表"
|
|
1910
|
-
},
|
|
2516
|
+
}, xi = {
|
|
1911
2517
|
key: 0,
|
|
1912
2518
|
class: "compare-list__empty"
|
|
1913
|
-
},
|
|
2519
|
+
}, Si = {
|
|
1914
2520
|
width: "32",
|
|
1915
2521
|
height: "32",
|
|
1916
2522
|
viewBox: "0 0 32 32",
|
|
@@ -1919,11 +2525,11 @@ var Pr = m({
|
|
|
1919
2525
|
"margin-bottom": "8px",
|
|
1920
2526
|
opacity: "0.35"
|
|
1921
2527
|
}
|
|
1922
|
-
},
|
|
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 = {
|
|
1923
2529
|
key: 0,
|
|
1924
2530
|
class: "compare-list__check",
|
|
1925
2531
|
"aria-hidden": "true"
|
|
1926
|
-
},
|
|
2532
|
+
}, Ai = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
1927
2533
|
__name: "CompareSymbolSelector",
|
|
1928
2534
|
props: {
|
|
1929
2535
|
symbols: {},
|
|
@@ -1932,55 +2538,67 @@ var Pr = m({
|
|
|
1932
2538
|
comparisonLoading: { type: Boolean }
|
|
1933
2539
|
},
|
|
1934
2540
|
emits: ["add", "remove"],
|
|
1935
|
-
setup(
|
|
1936
|
-
let
|
|
1937
|
-
let e =
|
|
1938
|
-
return
|
|
1939
|
-
}),
|
|
1940
|
-
let e =
|
|
1941
|
-
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;
|
|
1942
2548
|
});
|
|
1943
|
-
function
|
|
1944
|
-
return
|
|
2549
|
+
function z(e) {
|
|
2550
|
+
return I.value.has(e);
|
|
1945
2551
|
}
|
|
1946
|
-
function
|
|
1947
|
-
|
|
2552
|
+
function ee(e) {
|
|
2553
|
+
z(e.code) ? f("remove", e.code) : f("add", e);
|
|
1948
2554
|
}
|
|
1949
|
-
function
|
|
1950
|
-
|
|
2555
|
+
function te(e) {
|
|
2556
|
+
f("remove", e);
|
|
1951
2557
|
}
|
|
1952
|
-
function
|
|
1953
|
-
|
|
2558
|
+
function B() {
|
|
2559
|
+
p.value = !p.value, p.value && g(() => h.value?.focus());
|
|
1954
2560
|
}
|
|
1955
|
-
|
|
1956
|
-
|
|
2561
|
+
N(p, (e) => {
|
|
2562
|
+
e ? O() : j();
|
|
2563
|
+
});
|
|
2564
|
+
function V() {
|
|
2565
|
+
m.value = "", h.value?.focus();
|
|
1957
2566
|
}
|
|
1958
|
-
function
|
|
1959
|
-
|
|
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 = "");
|
|
1960
2570
|
}
|
|
1961
|
-
return
|
|
2571
|
+
return b(() => document.addEventListener("mousedown", ne)), y(() => document.removeEventListener("mousedown", ne)), (r, u) => (C(), o("div", {
|
|
1962
2572
|
ref_key: "rootRef",
|
|
1963
|
-
ref:
|
|
2573
|
+
ref: x,
|
|
1964
2574
|
class: "compare-chip-wrap"
|
|
1965
2575
|
}, [s("button", {
|
|
1966
2576
|
type: "button",
|
|
1967
|
-
class:
|
|
2577
|
+
class: _(["compare-chip", { "is-open": p.value }]),
|
|
1968
2578
|
title: "比较商品",
|
|
1969
|
-
"aria-expanded":
|
|
2579
|
+
"aria-expanded": p.value,
|
|
1970
2580
|
"aria-haspopup": "dialog",
|
|
1971
|
-
onClick:
|
|
2581
|
+
onClick: B
|
|
1972
2582
|
}, [
|
|
1973
|
-
|
|
2583
|
+
u[1] ||= s("span", {
|
|
1974
2584
|
class: "compare-chip__icon",
|
|
1975
2585
|
"aria-hidden": "true"
|
|
1976
2586
|
}, "+", -1),
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
], 10,
|
|
1981
|
-
default:
|
|
1982
|
-
|
|
1983
|
-
|
|
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", {
|
|
1984
2602
|
class: "compare-search__icon",
|
|
1985
2603
|
"aria-hidden": "true"
|
|
1986
2604
|
}, [s("svg", {
|
|
@@ -2003,24 +2621,24 @@ var Pr = m({
|
|
|
2003
2621
|
"stroke-width": "1.6",
|
|
2004
2622
|
"stroke-linecap": "round"
|
|
2005
2623
|
})])], -1),
|
|
2006
|
-
|
|
2624
|
+
F(s("input", {
|
|
2007
2625
|
ref_key: "searchInputRef",
|
|
2008
|
-
ref:
|
|
2009
|
-
"onUpdate:modelValue":
|
|
2626
|
+
ref: h,
|
|
2627
|
+
"onUpdate:modelValue": u[0] ||= (e) => m.value = e,
|
|
2010
2628
|
class: "compare-search__input",
|
|
2011
2629
|
type: "text",
|
|
2012
2630
|
placeholder: "搜索代码或名称…",
|
|
2013
2631
|
autocomplete: "off",
|
|
2014
2632
|
spellcheck: "false",
|
|
2015
2633
|
"aria-label": "搜索比较商品"
|
|
2016
|
-
}, null, 512), [[
|
|
2017
|
-
|
|
2634
|
+
}, null, 512), [[M, m.value]]),
|
|
2635
|
+
m.value ? (C(), o("button", {
|
|
2018
2636
|
key: 0,
|
|
2019
2637
|
type: "button",
|
|
2020
2638
|
class: "compare-search__clear",
|
|
2021
2639
|
"aria-label": "清空搜索",
|
|
2022
|
-
onClick:
|
|
2023
|
-
}, [...
|
|
2640
|
+
onClick: V
|
|
2641
|
+
}, [...u[3] ||= [s("svg", {
|
|
2024
2642
|
class: "delete-icon",
|
|
2025
2643
|
viewBox: "0 0 24 24",
|
|
2026
2644
|
fill: "none",
|
|
@@ -2035,22 +2653,22 @@ var Pr = m({
|
|
|
2035
2653
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
2036
2654
|
], -1)]])) : a("", !0)
|
|
2037
2655
|
]),
|
|
2038
|
-
|
|
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", {
|
|
2039
2657
|
key: e.code,
|
|
2040
2658
|
class: "compare-selected__item"
|
|
2041
2659
|
}, [
|
|
2042
2660
|
s("span", {
|
|
2043
2661
|
class: "compare-selected__color",
|
|
2044
|
-
style:
|
|
2662
|
+
style: v({ background: c.comparisonColors?.get(e.code) ?? "#888" })
|
|
2045
2663
|
}, null, 4),
|
|
2046
|
-
s("span",
|
|
2047
|
-
s("span",
|
|
2664
|
+
s("span", _i, k(e.code), 1),
|
|
2665
|
+
s("span", vi, k(e.description), 1),
|
|
2048
2666
|
s("button", {
|
|
2049
2667
|
type: "button",
|
|
2050
2668
|
class: "compare-selected__remove",
|
|
2051
2669
|
"aria-label": "移除 " + e.code,
|
|
2052
|
-
onClick: (t) =>
|
|
2053
|
-
}, [...
|
|
2670
|
+
onClick: (t) => te(e.code)
|
|
2671
|
+
}, [...u[5] ||= [s("svg", {
|
|
2054
2672
|
viewBox: "0 0 24 24",
|
|
2055
2673
|
width: "12",
|
|
2056
2674
|
height: "12",
|
|
@@ -2059,9 +2677,9 @@ var Pr = m({
|
|
|
2059
2677
|
"stroke-width": "2",
|
|
2060
2678
|
"stroke-linecap": "round",
|
|
2061
2679
|
"stroke-linejoin": "round"
|
|
2062
|
-
}, [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)
|
|
2063
2681
|
]))), 128))])])) : a("", !0),
|
|
2064
|
-
s("div",
|
|
2682
|
+
s("div", bi, [R.value.length === 0 ? (C(), o("div", xi, [(C(), o("svg", Si, [...u[7] ||= [s("circle", {
|
|
2065
2683
|
cx: "13",
|
|
2066
2684
|
cy: "13",
|
|
2067
2685
|
r: "10",
|
|
@@ -2075,14 +2693,14 @@ var Pr = m({
|
|
|
2075
2693
|
stroke: "currentColor",
|
|
2076
2694
|
"stroke-width": "2",
|
|
2077
2695
|
"stroke-linecap": "round"
|
|
2078
|
-
}, 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", {
|
|
2079
2697
|
key: e.code,
|
|
2080
2698
|
type: "button",
|
|
2081
|
-
class:
|
|
2699
|
+
class: _(["compare-list__item", { "is-selected": z(e.code) }]),
|
|
2082
2700
|
role: "option",
|
|
2083
|
-
"aria-selected":
|
|
2084
|
-
onClick: (t) =>
|
|
2085
|
-
}, [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", {
|
|
2086
2704
|
viewBox: "0 0 24 24",
|
|
2087
2705
|
width: "16",
|
|
2088
2706
|
height: "16",
|
|
@@ -2091,12 +2709,12 @@ var Pr = m({
|
|
|
2091
2709
|
"stroke-width": "2.5",
|
|
2092
2710
|
"stroke-linecap": "round",
|
|
2093
2711
|
"stroke-linejoin": "round"
|
|
2094
|
-
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10,
|
|
2095
|
-
])) : a("", !0)]),
|
|
2712
|
+
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, Ci))), 128))])
|
|
2713
|
+
], 4)) : a("", !0)]),
|
|
2096
2714
|
_: 1
|
|
2097
|
-
})], 512));
|
|
2715
|
+
})], 8, ["to"]))], 512));
|
|
2098
2716
|
}
|
|
2099
|
-
}), [["__scopeId", "data-v-
|
|
2717
|
+
}), [["__scopeId", "data-v-b6189a87"]]), ji = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
2100
2718
|
__name: "TopToolbar",
|
|
2101
2719
|
props: {
|
|
2102
2720
|
symbol: {},
|
|
@@ -2118,7 +2736,26 @@ var Pr = m({
|
|
|
2118
2736
|
"symbolChange"
|
|
2119
2737
|
],
|
|
2120
2738
|
setup(e, { emit: t }) {
|
|
2121
|
-
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, _ = [
|
|
2122
2759
|
{
|
|
2123
2760
|
code: "XAUUSD",
|
|
2124
2761
|
description: "现货黄金",
|
|
@@ -2203,67 +2840,168 @@ var Pr = m({
|
|
|
2203
2840
|
exchange: "MOCK",
|
|
2204
2841
|
source: "mock-10000"
|
|
2205
2842
|
}
|
|
2206
|
-
],
|
|
2207
|
-
function
|
|
2208
|
-
|
|
2209
|
-
}
|
|
2210
|
-
return (t,
|
|
2211
|
-
|
|
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, {
|
|
2212
2857
|
key: 0,
|
|
2213
|
-
symbol:
|
|
2214
|
-
symbols:
|
|
2858
|
+
symbol: v.value,
|
|
2859
|
+
symbols: y.value,
|
|
2215
2860
|
loading: e.symbolLoading,
|
|
2216
2861
|
error: e.symbolError,
|
|
2217
|
-
onChange:
|
|
2862
|
+
onChange: b
|
|
2218
2863
|
}, null, 8, [
|
|
2219
2864
|
"symbol",
|
|
2220
2865
|
"symbols",
|
|
2221
2866
|
"loading",
|
|
2222
2867
|
"error"
|
|
2223
2868
|
])) : a("", !0),
|
|
2224
|
-
l(
|
|
2225
|
-
symbols:
|
|
2869
|
+
l(Ai, {
|
|
2870
|
+
symbols: y.value,
|
|
2226
2871
|
selected: e.overlaySymbols,
|
|
2227
2872
|
"comparison-colors": e.comparisonColors,
|
|
2228
2873
|
"comparison-loading": e.comparisonLoading,
|
|
2229
|
-
onAdd:
|
|
2230
|
-
onRemove:
|
|
2874
|
+
onAdd: r[0] ||= (e) => g("addOverlaySymbol", e),
|
|
2875
|
+
onRemove: r[1] ||= (e) => g("removeOverlaySymbol", e)
|
|
2231
2876
|
}, null, 8, [
|
|
2232
2877
|
"symbols",
|
|
2233
2878
|
"selected",
|
|
2234
2879
|
"comparison-colors",
|
|
2235
2880
|
"comparison-loading"
|
|
2236
2881
|
]),
|
|
2237
|
-
l(
|
|
2882
|
+
l(qr, {
|
|
2238
2883
|
"model-value": e.kLineLevel,
|
|
2239
|
-
"onUpdate:modelValue":
|
|
2884
|
+
"onUpdate:modelValue": r[2] ||= (e) => g("kLineLevelChange", e)
|
|
2240
2885
|
}, null, 8, ["model-value"]),
|
|
2241
|
-
l(
|
|
2886
|
+
l(Jr, {
|
|
2242
2887
|
"model-value": e.kLineAdjust,
|
|
2243
|
-
"onUpdate:modelValue":
|
|
2888
|
+
"onUpdate:modelValue": r[3] ||= (e) => g("kLineAdjustChange", e)
|
|
2244
2889
|
}, null, 8, ["model-value"]),
|
|
2245
2890
|
s("button", {
|
|
2246
2891
|
type: "button",
|
|
2247
2892
|
class: "indicator-button",
|
|
2248
2893
|
title: "指标",
|
|
2249
2894
|
"aria-label": "指标",
|
|
2250
|
-
onClick:
|
|
2251
|
-
}, [...
|
|
2895
|
+
onClick: r[4] ||= (e) => g("toggleIndicator")
|
|
2896
|
+
}, [...r[5] ||= [s("span", {
|
|
2252
2897
|
class: "indicator-button__icon",
|
|
2253
2898
|
"aria-hidden": "true"
|
|
2254
2899
|
}, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
|
|
2255
|
-
]));
|
|
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"]));
|
|
2256
2994
|
}
|
|
2257
|
-
}), [["__scopeId", "data-v-
|
|
2995
|
+
}), [["__scopeId", "data-v-f4bab748"]]), Ui = ["data-theme"], Wi = {
|
|
2258
2996
|
class: "pane-separator-layer",
|
|
2259
2997
|
"aria-hidden": "true"
|
|
2260
|
-
},
|
|
2998
|
+
}, Gi = {
|
|
2261
2999
|
class: "canvas-layer",
|
|
2262
3000
|
ref: "canvasLayerRef"
|
|
2263
|
-
},
|
|
3001
|
+
}, Ki = {
|
|
2264
3002
|
class: "x-axis-canvas",
|
|
2265
3003
|
ref: "xAxisCanvasRef"
|
|
2266
|
-
},
|
|
3004
|
+
}, qi = ["placeholder"], Ji = ["placeholder"], Yi = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
2267
3005
|
__name: "KLineChart",
|
|
2268
3006
|
props: {
|
|
2269
3007
|
semanticConfig: {},
|
|
@@ -2291,23 +3029,23 @@ var Pr = m({
|
|
|
2291
3029
|
"kLineAdjustChange"
|
|
2292
3030
|
],
|
|
2293
3031
|
setup(n, { expose: c, emit: u }) {
|
|
2294
|
-
let d = n, f = u, p =
|
|
2295
|
-
function
|
|
2296
|
-
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();
|
|
2297
3035
|
}
|
|
2298
|
-
function
|
|
2299
|
-
|
|
3036
|
+
function R(e) {
|
|
3037
|
+
h.value = e, f("kLineAdjustChange", e), V();
|
|
2300
3038
|
}
|
|
2301
|
-
function
|
|
2302
|
-
|
|
3039
|
+
function z(e) {
|
|
3040
|
+
k.value = !1, x.value = e.code, w.value = e, V();
|
|
2303
3041
|
}
|
|
2304
|
-
function
|
|
2305
|
-
|
|
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))));
|
|
2306
3044
|
}
|
|
2307
|
-
function
|
|
2308
|
-
|
|
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);
|
|
2309
3047
|
}
|
|
2310
|
-
function
|
|
3048
|
+
function B(e) {
|
|
2311
3049
|
return {
|
|
2312
3050
|
symbol: e.code,
|
|
2313
3051
|
exchange: e.exchange,
|
|
@@ -2315,91 +3053,71 @@ var Pr = m({
|
|
|
2315
3053
|
source: e.source,
|
|
2316
3054
|
startDate: d.semanticConfig?.data?.startDate ?? "",
|
|
2317
3055
|
endDate: d.semanticConfig?.data?.endDate ?? "",
|
|
2318
|
-
adjust:
|
|
3056
|
+
adjust: h.value
|
|
2319
3057
|
};
|
|
2320
3058
|
}
|
|
2321
|
-
function
|
|
2322
|
-
|
|
3059
|
+
function V() {
|
|
3060
|
+
w.value && U.value?.setSymbols([B(w.value), ...P.value.map(B)]);
|
|
2323
3061
|
}
|
|
2324
|
-
function
|
|
2325
|
-
if (
|
|
3062
|
+
function ne() {
|
|
3063
|
+
if (de.value.axisType === "percent") return;
|
|
2326
3064
|
let e = {
|
|
2327
|
-
...
|
|
3065
|
+
...de.value,
|
|
2328
3066
|
axisType: "percent"
|
|
2329
3067
|
};
|
|
2330
|
-
|
|
3068
|
+
de.value = e, U.value?.updateSettingsFacade(e);
|
|
2331
3069
|
try {
|
|
2332
|
-
localStorage.setItem(
|
|
3070
|
+
localStorage.setItem(he, JSON.stringify(e));
|
|
2333
3071
|
} catch {}
|
|
2334
3072
|
}
|
|
2335
|
-
let
|
|
2336
|
-
|
|
2337
|
-
let
|
|
2338
|
-
|
|
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, {
|
|
2339
3085
|
minKWidth: d.minKWidth,
|
|
2340
3086
|
maxKWidth: d.maxKWidth,
|
|
2341
3087
|
zoomLevelCount: d.zoomLevels,
|
|
2342
|
-
dpr:
|
|
2343
|
-
}),
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
return {
|
|
2347
|
-
upColor: t.candleUpBody,
|
|
2348
|
-
downColor: t.candleDownBody
|
|
2349
|
-
};
|
|
2350
|
-
}), ke = r(() => {
|
|
2351
|
-
let e = De.value === "dark" ? ne : re, t = G.value.colorPresetSettings?.[De.value];
|
|
2352
|
-
return t && Object.keys(t).length > 0 ? oe({
|
|
2353
|
-
...e,
|
|
2354
|
-
colors: {
|
|
2355
|
-
...e.colors,
|
|
2356
|
-
...t
|
|
2357
|
-
}
|
|
2358
|
-
}) : oe(e);
|
|
2359
|
-
}), K = null;
|
|
2360
|
-
function Ae(e) {
|
|
2361
|
-
B.value?.setTheme(e.matches ? "dark" : "light");
|
|
2362
|
-
}
|
|
2363
|
-
function je(e, t) {
|
|
2364
|
-
if (!(!e || !t)) if (t === "auto") {
|
|
2365
|
-
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2366
|
-
e.setTheme(t.matches ? "dark" : "light"), K !== t && (K?.removeEventListener("change", Ae), K = t, t.addEventListener("change", Ae));
|
|
2367
|
-
} else K?.removeEventListener("change", Ae), K = null, e.setTheme(t);
|
|
2368
|
-
}
|
|
2369
|
-
function Ne() {}
|
|
2370
|
-
function Fe(e) {
|
|
2371
|
-
G.value = e, je(B.value, e.theme), B.value?.updateSettingsFacade(e);
|
|
2372
|
-
}
|
|
2373
|
-
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) {
|
|
2374
3092
|
let r = e.getBoundingClientRect();
|
|
2375
3093
|
return {
|
|
2376
3094
|
width: Math.max(t, Math.round(r.width)),
|
|
2377
3095
|
height: Math.max(n, Math.round(r.height))
|
|
2378
3096
|
};
|
|
2379
3097
|
}
|
|
2380
|
-
function
|
|
2381
|
-
e &&
|
|
3098
|
+
function Tt(e) {
|
|
3099
|
+
e && g(() => {
|
|
2382
3100
|
if (!e.isConnected) return;
|
|
2383
|
-
let t =
|
|
2384
|
-
|
|
3101
|
+
let t = wt(e, 180, 80);
|
|
3102
|
+
U.value?.setTooltipSize(t);
|
|
2385
3103
|
});
|
|
2386
3104
|
}
|
|
2387
|
-
function
|
|
2388
|
-
e &&
|
|
2389
|
-
e.isConnected && (
|
|
3105
|
+
function Et(e) {
|
|
3106
|
+
e && g(() => {
|
|
3107
|
+
e.isConnected && (Nt.value = wt(e, 120, 60));
|
|
2390
3108
|
});
|
|
2391
3109
|
}
|
|
2392
|
-
let
|
|
3110
|
+
let Dt = T({
|
|
2393
3111
|
x: 0,
|
|
2394
3112
|
y: 0
|
|
2395
|
-
}),
|
|
2396
|
-
function
|
|
2397
|
-
|
|
3113
|
+
}), Ot = T(!1), kt = null;
|
|
3114
|
+
function At() {
|
|
3115
|
+
kt = null;
|
|
2398
3116
|
}
|
|
2399
|
-
function
|
|
2400
|
-
return
|
|
3117
|
+
function jt(e) {
|
|
3118
|
+
return kt ||= e.getBoundingClientRect(), kt;
|
|
2401
3119
|
}
|
|
2402
|
-
let
|
|
3120
|
+
let X = O({
|
|
2403
3121
|
crosshairPos: null,
|
|
2404
3122
|
crosshairIndex: null,
|
|
2405
3123
|
crosshairPrice: null,
|
|
@@ -2417,14 +3135,11 @@ var Pr = m({
|
|
|
2417
3135
|
isHoveringPaneBoundary: !1,
|
|
2418
3136
|
hoveredPaneBoundaryId: null,
|
|
2419
3137
|
isHoveringRightAxis: !1
|
|
2420
|
-
}),
|
|
2421
|
-
let e = U.value;
|
|
2422
|
-
return e ? W.value.find((t) => t.id === e) ?? null : null;
|
|
2423
|
-
}), Ge = w([]), Ke = w({
|
|
3138
|
+
}), Mt = T([]), Nt = T({
|
|
2424
3139
|
width: 220,
|
|
2425
3140
|
height: 120
|
|
2426
|
-
}),
|
|
2427
|
-
let e =
|
|
3141
|
+
}), Pt = r(() => {
|
|
3142
|
+
let e = H.value, t = re.value;
|
|
2428
3143
|
return !e || !t ? {
|
|
2429
3144
|
x: 0,
|
|
2430
3145
|
y: 0
|
|
@@ -2432,203 +3147,102 @@ var Pr = m({
|
|
|
2432
3147
|
x: e.offsetLeft,
|
|
2433
3148
|
y: e.offsetTop
|
|
2434
3149
|
};
|
|
2435
|
-
}),
|
|
2436
|
-
r(() =>
|
|
2437
|
-
let
|
|
2438
|
-
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;
|
|
2439
3154
|
if (typeof e != "number") return null;
|
|
2440
|
-
|
|
2441
|
-
let t =
|
|
3155
|
+
be.value;
|
|
3156
|
+
let t = U.value?.getData();
|
|
2442
3157
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
2443
|
-
}),
|
|
2444
|
-
x:
|
|
2445
|
-
y:
|
|
2446
|
-
})),
|
|
2447
|
-
left: `${
|
|
2448
|
-
top: `${
|
|
2449
|
-
})),
|
|
2450
|
-
x:
|
|
2451
|
-
y:
|
|
2452
|
-
})),
|
|
2453
|
-
left: `${
|
|
2454
|
-
top: `${
|
|
2455
|
-
})),
|
|
2456
|
-
let e =
|
|
2457
|
-
return
|
|
2458
|
-
}),
|
|
2459
|
-
function
|
|
2460
|
-
|
|
2461
|
-
}
|
|
2462
|
-
function
|
|
2463
|
-
|
|
2464
|
-
}
|
|
2465
|
-
function
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
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;
|
|
2478
3192
|
if (t) {
|
|
2479
|
-
let n =
|
|
2480
|
-
|
|
3193
|
+
let n = jt(t);
|
|
3194
|
+
Dt.value = {
|
|
2481
3195
|
x: e.clientX - n.left,
|
|
2482
3196
|
y: e.clientY - n.top
|
|
2483
3197
|
};
|
|
2484
3198
|
}
|
|
2485
|
-
|
|
2486
|
-
}
|
|
2487
|
-
function yt(e) {
|
|
2488
|
-
B.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!J.value?.onPointerUp(e, t) });
|
|
2489
|
-
}
|
|
2490
|
-
function bt(e) {
|
|
2491
|
-
B.value?.handlePointerEvent(e);
|
|
2492
|
-
}
|
|
2493
|
-
function xt(e) {
|
|
2494
|
-
B.value?.handlePointerEvent(e);
|
|
2495
|
-
}
|
|
2496
|
-
function St(e) {
|
|
2497
|
-
B.value?.handlePointerEvent(e);
|
|
2498
|
-
}
|
|
2499
|
-
function Ct(e) {
|
|
2500
|
-
B.value?.handlePointerEvent(e);
|
|
2501
|
-
}
|
|
2502
|
-
function wt(e) {
|
|
2503
|
-
B.value?.handlePointerEvent(e);
|
|
2504
|
-
}
|
|
2505
|
-
function Tt() {
|
|
2506
|
-
B.value?.handleScrollEvent();
|
|
2507
|
-
}
|
|
2508
|
-
let Et = w([]), Dt = r(() => {
|
|
2509
|
-
let e = [], t = /* @__PURE__ */ new Set();
|
|
2510
|
-
for (let n of X.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
2511
|
-
return e;
|
|
2512
|
-
}), Ot = r(() => [...Et.value, ...Dt.value]), Y = w({}), X = w([]);
|
|
2513
|
-
function kt() {
|
|
2514
|
-
let e = Ce.value.main ?? 3;
|
|
2515
|
-
return X.value.length === 0 ? [{
|
|
2516
|
-
id: "main",
|
|
2517
|
-
ratio: e,
|
|
2518
|
-
visible: !0,
|
|
2519
|
-
role: "price"
|
|
2520
|
-
}] : [{
|
|
2521
|
-
id: "main",
|
|
2522
|
-
ratio: e,
|
|
2523
|
-
visible: !0,
|
|
2524
|
-
role: "price"
|
|
2525
|
-
}, ...X.value.map((e) => ({
|
|
2526
|
-
id: e.id,
|
|
2527
|
-
ratio: Ce.value[e.id] ?? 1,
|
|
2528
|
-
visible: !0,
|
|
2529
|
-
role: "indicator"
|
|
2530
|
-
}))];
|
|
3199
|
+
U.value?.handlePointerEvent(e, { onPointerMove: (e, t) => pt(e, t) ? !0 : qe.value?.onPointerMove(e, t) ? (Xe.value = qe.value.getDrawings(), !0) : !1 });
|
|
2531
3200
|
}
|
|
2532
|
-
function
|
|
2533
|
-
|
|
2534
|
-
let t = ge(e);
|
|
2535
|
-
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
3201
|
+
function dn(e) {
|
|
3202
|
+
U.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!(mt(e, t) || qe.value?.onPointerUp(e, t)) });
|
|
2536
3203
|
}
|
|
2537
|
-
function
|
|
2538
|
-
|
|
2539
|
-
let t = ge(e);
|
|
2540
|
-
return !!t && t.category !== "main";
|
|
3204
|
+
function pn(e) {
|
|
3205
|
+
U.value?.handlePointerEvent(e);
|
|
2541
3206
|
}
|
|
2542
|
-
function
|
|
2543
|
-
|
|
2544
|
-
let n = t ?? At(e);
|
|
2545
|
-
return !!B.value?.addIndicator(e, "sub", n);
|
|
3207
|
+
function mn(e) {
|
|
3208
|
+
U.value?.handlePointerEvent(e);
|
|
2546
3209
|
}
|
|
2547
|
-
function
|
|
2548
|
-
|
|
3210
|
+
function hn(e) {
|
|
3211
|
+
U.value?.handlePointerEvent(e);
|
|
2549
3212
|
}
|
|
2550
|
-
function
|
|
2551
|
-
|
|
3213
|
+
function gn(e) {
|
|
3214
|
+
U.value?.handlePointerEvent(e);
|
|
2552
3215
|
}
|
|
2553
|
-
function
|
|
2554
|
-
|
|
2555
|
-
if (!e || !t) return;
|
|
2556
|
-
let n = e.indicators?.main;
|
|
2557
|
-
if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
|
|
2558
|
-
}
|
|
2559
|
-
function Lt(e, t) {
|
|
2560
|
-
let n = At(t);
|
|
2561
|
-
B.value?.replaceSubPaneIndicator(e, t, n);
|
|
2562
|
-
}
|
|
2563
|
-
function Rt(e, t) {
|
|
2564
|
-
let n = B.value;
|
|
2565
|
-
if (!n) return;
|
|
2566
|
-
let r = ge(e);
|
|
2567
|
-
if (r && (r.category === "main" || r.allowMainPane)) {
|
|
2568
|
-
let r = Et.value.find((t) => t === e);
|
|
2569
|
-
t && !r ? n.addIndicator(e, "main", Y.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
|
|
2570
|
-
return;
|
|
2571
|
-
}
|
|
2572
|
-
if (jt(e)) if (t) {
|
|
2573
|
-
if (X.value.find((t) => t.indicatorId === e) || X.value.length >= Si) return;
|
|
2574
|
-
if (!n.addIndicator(e, "sub", Y.value[e]) && X.value.length > 0) {
|
|
2575
|
-
let t = X.value[X.value.length - 1];
|
|
2576
|
-
Lt(t.id, e);
|
|
2577
|
-
}
|
|
2578
|
-
} else X.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2579
|
-
n.removeIndicator(e.id);
|
|
2580
|
-
});
|
|
3216
|
+
function _n(e) {
|
|
3217
|
+
U.value?.handlePointerEvent(e);
|
|
2581
3218
|
}
|
|
2582
|
-
function
|
|
2583
|
-
|
|
2584
|
-
B.value?.updateIndicatorParams(e, t);
|
|
2585
|
-
return;
|
|
2586
|
-
}
|
|
2587
|
-
jt(e) && X.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2588
|
-
B.value?.updateIndicatorParams(e.id, t);
|
|
2589
|
-
});
|
|
3219
|
+
function vn() {
|
|
3220
|
+
bt(), U.value?.handleScrollEvent();
|
|
2590
3221
|
}
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
if (!t.length) return;
|
|
2595
|
-
let n = new Map(X.value.map((e) => [e.indicatorId, e])), r = [];
|
|
2596
|
-
for (let e of t) {
|
|
2597
|
-
let t = n.get(e);
|
|
2598
|
-
t && (r.push(t), n.delete(e));
|
|
2599
|
-
}
|
|
2600
|
-
if (r.length === 0) return;
|
|
2601
|
-
for (let e of X.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
|
|
2602
|
-
let i = X.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
2603
|
-
if (i.join("|") === a.join("|")) return;
|
|
2604
|
-
X.value = r;
|
|
2605
|
-
let o = B.value;
|
|
2606
|
-
o && o.updatePaneLayout(kt());
|
|
2607
|
-
}
|
|
2608
|
-
let Vt = r(() => d.rightAxisWidth + d.priceLabelWidth), Ht = r(() => (ve.value, Se.value, be.value, xe.value, ye.value, B.value?.getContentWidth() ?? 0));
|
|
2609
|
-
function Ut(e, t) {
|
|
2610
|
-
B.value?.zoomToLevel(e, t);
|
|
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);
|
|
2611
3225
|
}
|
|
2612
3226
|
c({
|
|
2613
|
-
scheduleRender:
|
|
2614
|
-
addSubPane:
|
|
2615
|
-
removeSubPane:
|
|
2616
|
-
switchSubIndicator:
|
|
2617
|
-
clearAllSubPanes:
|
|
2618
|
-
zoomToLevel:
|
|
2619
|
-
zoomIn: (e) =>
|
|
2620
|
-
zoomOut: (e) =>
|
|
2621
|
-
getZoomLevel: () =>
|
|
2622
|
-
getZoomLevelCount: () =>
|
|
2623
|
-
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
|
|
2624
3238
|
});
|
|
2625
|
-
function
|
|
3239
|
+
function Sn() {
|
|
2626
3240
|
return (e) => {
|
|
2627
|
-
e.preventDefault(),
|
|
3241
|
+
e.preventDefault(), U.value?.handleWheelEvent(e);
|
|
2628
3242
|
};
|
|
2629
3243
|
}
|
|
2630
|
-
function
|
|
2631
|
-
return
|
|
3244
|
+
function Cn(e, t, n, r) {
|
|
3245
|
+
return se({
|
|
2632
3246
|
container: e,
|
|
2633
3247
|
data: [],
|
|
2634
3248
|
canvasLayer: t,
|
|
@@ -2645,11 +3259,11 @@ var Pr = m({
|
|
|
2645
3259
|
mcp: d.mcp
|
|
2646
3260
|
});
|
|
2647
3261
|
}
|
|
2648
|
-
function
|
|
3262
|
+
function wn(e) {
|
|
2649
3263
|
let t = e.paneLayout.subscribe(() => {
|
|
2650
|
-
|
|
2651
|
-
let t =
|
|
2652
|
-
|
|
3264
|
+
At();
|
|
3265
|
+
let t = H.value && parseInt(getComputedStyle(H.value).borderTopWidth) || 0;
|
|
3266
|
+
Mt.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
2653
3267
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
2654
3268
|
return {
|
|
2655
3269
|
id: n.id,
|
|
@@ -2657,128 +3271,87 @@ var Pr = m({
|
|
|
2657
3271
|
};
|
|
2658
3272
|
});
|
|
2659
3273
|
}), n = e.paneRatios.subscribe(() => {
|
|
2660
|
-
|
|
3274
|
+
Ee.value = { ...e.paneRatios.peek() };
|
|
2661
3275
|
}), r = e.viewport.subscribe(() => {
|
|
2662
3276
|
let t = e.viewport.peek();
|
|
2663
|
-
|
|
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
|
+
});
|
|
2664
3282
|
}), i = e.data.subscribe(() => {
|
|
2665
3283
|
let t = e.data.peek();
|
|
2666
|
-
|
|
3284
|
+
ye.value = t.length, be.value++, k.value = t.length === 0;
|
|
2667
3285
|
}), a = e.dataLoading.subscribe(() => {
|
|
2668
|
-
|
|
3286
|
+
D.value = e.dataLoading.peek();
|
|
2669
3287
|
}), o = e.theme.subscribe(() => {
|
|
2670
3288
|
let t = e.theme.peek();
|
|
2671
|
-
|
|
2672
|
-
}), s = e.
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
|
|
2677
|
-
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
2678
|
-
MA: {
|
|
2679
|
-
enabled: n.includes("MA"),
|
|
2680
|
-
params: r.MA || {}
|
|
2681
|
-
},
|
|
2682
|
-
BOLL: {
|
|
2683
|
-
enabled: n.includes("BOLL"),
|
|
2684
|
-
params: r.BOLL || {}
|
|
2685
|
-
},
|
|
2686
|
-
EXPMA: {
|
|
2687
|
-
enabled: n.includes("EXPMA"),
|
|
2688
|
-
params: r.EXPMA || {}
|
|
2689
|
-
},
|
|
2690
|
-
ENE: {
|
|
2691
|
-
enabled: n.includes("ENE"),
|
|
2692
|
-
params: r.ENE || {}
|
|
2693
|
-
}
|
|
2694
|
-
} }), Y.value = r;
|
|
2695
|
-
}), c = e.subPanes.subscribe(() => {
|
|
2696
|
-
let t = e.subPanes.peek(), n = new Set(t.map((e) => e.paneId)), r = X.value.filter((e) => n.has(e.id)), i = new Set(r.map((e) => e.id));
|
|
2697
|
-
for (let e of t) i.has(e.paneId) || r.push({
|
|
2698
|
-
id: e.paneId,
|
|
2699
|
-
indicatorId: e.indicatorId,
|
|
2700
|
-
params: e.params
|
|
2701
|
-
});
|
|
2702
|
-
X.value = r;
|
|
2703
|
-
let a = { ...Y.value };
|
|
2704
|
-
for (let e of t) e.params && Object.keys(e.params).length > 0 && (a[e.indicatorId] = { ...e.params });
|
|
2705
|
-
Y.value = a;
|
|
2706
|
-
}), l = e.comparisonColors.subscribe(() => {
|
|
2707
|
-
we.value = new Map(e.comparisonColors.peek());
|
|
2708
|
-
}), u = e.comparisonLoading.subscribe(() => {
|
|
2709
|
-
Te.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();
|
|
2710
3294
|
});
|
|
2711
|
-
|
|
2712
|
-
r(), i(), a(), n(), t(), o(), s(), c(), l()
|
|
3295
|
+
S(() => {
|
|
3296
|
+
r(), i(), a(), n(), t(), o(), s(), c(), l();
|
|
2713
3297
|
});
|
|
2714
3298
|
}
|
|
2715
|
-
function
|
|
2716
|
-
let t =
|
|
2717
|
-
|
|
2718
|
-
}
|
|
2719
|
-
function Z(e) {
|
|
2720
|
-
J.value = new se(e), J.value.setCallbacks({
|
|
2721
|
-
onDrawingCreated: (e) => {
|
|
2722
|
-
W.value = [...W.value, e], U.value = e.id;
|
|
2723
|
-
},
|
|
2724
|
-
onToolChange: () => {},
|
|
2725
|
-
onDrawingSelected: (e) => {
|
|
2726
|
-
U.value = e?.id ?? null;
|
|
2727
|
-
}
|
|
2728
|
-
});
|
|
3299
|
+
function Tn(e) {
|
|
3300
|
+
let t = oe.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
3301
|
+
de.value = t, _e(t.theme), e.updateSettingsFacade(t);
|
|
2729
3302
|
}
|
|
2730
|
-
function
|
|
2731
|
-
e.setTooltipAnchorPositioning(
|
|
2732
|
-
|
|
2733
|
-
}),
|
|
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;
|
|
2734
3307
|
}
|
|
2735
|
-
function
|
|
2736
|
-
e.setDataFetcher(d.dataFetcher),
|
|
3308
|
+
function Dn(e) {
|
|
3309
|
+
e.setDataFetcher(d.dataFetcher), ve.value = new pe(e), ve.value.on("config:error", (e) => {
|
|
2737
3310
|
console.error("Semantic config error:", e);
|
|
2738
|
-
}),
|
|
2739
|
-
|
|
3311
|
+
}), ve.value.on("config:ready", () => {
|
|
3312
|
+
Ve(d.semanticConfig), g(() => U.value?.scrollToRight());
|
|
2740
3313
|
});
|
|
2741
3314
|
}
|
|
2742
|
-
return
|
|
2743
|
-
|
|
2744
|
-
let e =
|
|
3315
|
+
return b(async () => {
|
|
3316
|
+
Ot.value = !1;
|
|
3317
|
+
let e = H.value, t = re.value;
|
|
2745
3318
|
if (!e || !t) return;
|
|
2746
|
-
let n =
|
|
3319
|
+
let n = Sn();
|
|
2747
3320
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
2748
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await
|
|
2749
|
-
!
|
|
2750
|
-
}),
|
|
2751
|
-
let e =
|
|
2752
|
-
e && (
|
|
2753
|
-
}),
|
|
2754
|
-
|
|
2755
|
-
}),
|
|
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) => {
|
|
2756
3329
|
if (e && e !== t) {
|
|
2757
|
-
let t = await
|
|
3330
|
+
let t = await ve.value?.applyConfig(e);
|
|
2758
3331
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
2759
3332
|
}
|
|
2760
|
-
}, { deep: !0 }), (r, c) => (
|
|
3333
|
+
}, { deep: !0 }), (r, c) => (C(), o("div", {
|
|
2761
3334
|
ref_key: "chartWrapperRef",
|
|
2762
3335
|
ref: ie,
|
|
2763
3336
|
class: "chart-wrapper",
|
|
2764
|
-
"data-theme":
|
|
2765
|
-
style:
|
|
3337
|
+
"data-theme": A(le),
|
|
3338
|
+
style: v(A(W))
|
|
2766
3339
|
}, [
|
|
2767
|
-
l(
|
|
2768
|
-
symbol:
|
|
3340
|
+
l(ji, {
|
|
3341
|
+
symbol: x.value,
|
|
2769
3342
|
"k-line-level": p.value,
|
|
2770
|
-
"k-line-adjust":
|
|
2771
|
-
"symbol-loading":
|
|
2772
|
-
"symbol-error":
|
|
2773
|
-
"overlay-symbols":
|
|
2774
|
-
"comparison-colors":
|
|
2775
|
-
"comparison-loading":
|
|
2776
|
-
onAddOverlaySymbol:
|
|
2777
|
-
onRemoveOverlaySymbol:
|
|
2778
|
-
onKLineLevelChange:
|
|
2779
|
-
onKLineAdjustChange:
|
|
2780
|
-
onToggleIndicator:
|
|
2781
|
-
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
|
|
2782
3355
|
}, null, 8, [
|
|
2783
3356
|
"symbol",
|
|
2784
3357
|
"k-line-level",
|
|
@@ -2789,82 +3362,156 @@ var Pr = m({
|
|
|
2789
3362
|
"comparison-colors",
|
|
2790
3363
|
"comparison-loading"
|
|
2791
3364
|
]),
|
|
2792
|
-
s("div", { class:
|
|
2793
|
-
"is-dragging":
|
|
2794
|
-
"is-resizing-pane":
|
|
2795
|
-
"is-hovering-pane-separator":
|
|
2796
|
-
"is-hovering-right-axis":
|
|
2797
|
-
"is-hovering-kline":
|
|
2798
|
-
}]) }, [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, {
|
|
2799
3372
|
ref_key: "toolbarRef",
|
|
2800
|
-
ref:
|
|
3373
|
+
ref: oe,
|
|
2801
3374
|
"is-fullscreen": n.isFullscreen,
|
|
2802
|
-
onSelectTool:
|
|
3375
|
+
onSelectTool: cn,
|
|
2803
3376
|
onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
|
|
2804
|
-
onZoomIn: c[1] ||= (e) =>
|
|
2805
|
-
onZoomOut: c[2] ||= (e) =>
|
|
2806
|
-
onSettingsChange:
|
|
2807
|
-
}, 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", {
|
|
2808
3381
|
class: "chart-main",
|
|
2809
3382
|
ref_key: "chartMainRef",
|
|
2810
|
-
ref:
|
|
3383
|
+
ref: re
|
|
2811
3384
|
}, [
|
|
2812
|
-
s("div",
|
|
3385
|
+
s("div", Wi, [(C(!0), o(e, null, E(Mt.value, (e) => (C(), o("div", {
|
|
2813
3386
|
key: e.id,
|
|
2814
|
-
class:
|
|
2815
|
-
style:
|
|
3387
|
+
class: _(["pane-separator-line", { "is-active": Vt.value === e.id }]),
|
|
3388
|
+
style: v({ top: `${e.top}px` })
|
|
2816
3389
|
}, null, 6))), 128))]),
|
|
2817
3390
|
s("div", {
|
|
2818
3391
|
ref_key: "tooltipLayerRef",
|
|
2819
|
-
ref:
|
|
3392
|
+
ref: ae,
|
|
2820
3393
|
class: "tooltip-layer"
|
|
2821
3394
|
}, null, 512),
|
|
2822
3395
|
s("div", {
|
|
2823
3396
|
class: "chart-container",
|
|
2824
|
-
style:
|
|
3397
|
+
style: v({ cursor: Wt.value }),
|
|
2825
3398
|
ref_key: "containerRef",
|
|
2826
|
-
ref:
|
|
2827
|
-
onScrollPassive:
|
|
2828
|
-
onPointerdown:
|
|
2829
|
-
onPointermove:
|
|
2830
|
-
onPointerup:
|
|
2831
|
-
onPointerleave:
|
|
3399
|
+
ref: H,
|
|
3400
|
+
onScrollPassive: vn,
|
|
3401
|
+
onPointerdown: ln,
|
|
3402
|
+
onPointermove: un,
|
|
3403
|
+
onPointerup: dn,
|
|
3404
|
+
onPointerleave: pn
|
|
2832
3405
|
}, [s("div", {
|
|
2833
3406
|
class: "scroll-content",
|
|
2834
|
-
style:
|
|
2835
|
-
}, [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", {
|
|
3471
|
+
key: 0,
|
|
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", {
|
|
2836
3476
|
key: 0,
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
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, {
|
|
2842
3489
|
key: 0,
|
|
2843
|
-
to:
|
|
3490
|
+
to: ae.value
|
|
2844
3491
|
}, [
|
|
2845
|
-
|
|
3492
|
+
Gt.value ? (C(), o("div", {
|
|
2846
3493
|
key: 0,
|
|
2847
|
-
class:
|
|
2848
|
-
style:
|
|
3494
|
+
class: _(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": Ot.value }]),
|
|
3495
|
+
style: v(Yt.value)
|
|
2849
3496
|
}, null, 6)) : a("", !0),
|
|
2850
|
-
|
|
3497
|
+
Ft.value || Lt.value ? (C(), o("div", {
|
|
2851
3498
|
key: 1,
|
|
2852
|
-
class:
|
|
2853
|
-
style:
|
|
3499
|
+
class: _(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": Ot.value }]),
|
|
3500
|
+
style: v(Zt.value)
|
|
2854
3501
|
}, null, 6)) : a("", !0),
|
|
2855
|
-
|
|
3502
|
+
Gt.value ? (C(), i(Xt, {
|
|
2856
3503
|
key: 2,
|
|
2857
|
-
k:
|
|
2858
|
-
index:
|
|
2859
|
-
data:
|
|
2860
|
-
pos:
|
|
2861
|
-
"set-el":
|
|
2862
|
-
"use-anchor":
|
|
2863
|
-
"anchor-placement":
|
|
2864
|
-
"up-color":
|
|
2865
|
-
"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,
|
|
2866
3513
|
timezone: d.timezone,
|
|
2867
|
-
"show-time":
|
|
3514
|
+
"show-time": y.value
|
|
2868
3515
|
}, null, 8, [
|
|
2869
3516
|
"k",
|
|
2870
3517
|
"index",
|
|
@@ -2877,13 +3524,13 @@ var Pr = m({
|
|
|
2877
3524
|
"timezone",
|
|
2878
3525
|
"show-time"
|
|
2879
3526
|
])) : a("", !0),
|
|
2880
|
-
|
|
3527
|
+
Ft.value || Lt.value ? (C(), i($t, {
|
|
2881
3528
|
key: 3,
|
|
2882
|
-
marker:
|
|
2883
|
-
pos:
|
|
2884
|
-
"use-anchor":
|
|
2885
|
-
"anchor-placement":
|
|
2886
|
-
"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
|
|
2887
3534
|
}, null, 8, [
|
|
2888
3535
|
"marker",
|
|
2889
3536
|
"pos",
|
|
@@ -2894,27 +3541,42 @@ var Pr = m({
|
|
|
2894
3541
|
s("div", {
|
|
2895
3542
|
class: "right-axis-host",
|
|
2896
3543
|
ref: "rightAxisLayerRef",
|
|
2897
|
-
style:
|
|
2898
|
-
onPointerdown:
|
|
2899
|
-
onPointermove:
|
|
2900
|
-
onPointerup:
|
|
2901
|
-
onPointerleave:
|
|
3544
|
+
style: v({ width: yn.value + "px" }),
|
|
3545
|
+
onPointerdown: mn,
|
|
3546
|
+
onPointermove: hn,
|
|
3547
|
+
onPointerup: gn,
|
|
3548
|
+
onPointerleave: _n
|
|
2902
3549
|
}, null, 36)
|
|
2903
3550
|
], 512)], 2),
|
|
2904
|
-
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, {
|
|
2905
3561
|
ref_key: "indicatorSelectorRef",
|
|
2906
|
-
ref:
|
|
2907
|
-
"active-indicators":
|
|
2908
|
-
"indicator-params":
|
|
2909
|
-
onToggle:
|
|
2910
|
-
onUpdateParams:
|
|
2911
|
-
onReorderSubIndicators:
|
|
2912
|
-
}, null, 8, [
|
|
2913
|
-
|
|
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));
|
|
2914
3576
|
}
|
|
2915
|
-
}), [["__scopeId", "data-v-
|
|
3577
|
+
}), [["__scopeId", "data-v-74f0a50b"]]), Xi = {
|
|
2916
3578
|
name: "@363045841yyt/klinechart",
|
|
2917
|
-
version: "0.8.
|
|
3579
|
+
version: "0.8.5",
|
|
2918
3580
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
2919
3581
|
license: "MIT",
|
|
2920
3582
|
repository: {
|
|
@@ -2987,25 +3649,25 @@ var Pr = m({
|
|
|
2987
3649
|
vitest: "^4.1.8",
|
|
2988
3650
|
vue: "^3.5.35"
|
|
2989
3651
|
}
|
|
2990
|
-
}.version,
|
|
2991
|
-
function
|
|
2992
|
-
|
|
3652
|
+
}.version, Zi = null;
|
|
3653
|
+
function Qi(e) {
|
|
3654
|
+
Zi = e;
|
|
2993
3655
|
}
|
|
2994
|
-
function
|
|
3656
|
+
function $i(e) {
|
|
2995
3657
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
2996
|
-
if (
|
|
2997
|
-
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);
|
|
2998
3660
|
}
|
|
2999
3661
|
function $(e) {
|
|
3000
|
-
let t =
|
|
3001
|
-
return
|
|
3662
|
+
let t = O(e.peek());
|
|
3663
|
+
return x(e.subscribe(() => {
|
|
3002
3664
|
t.value = e.peek();
|
|
3003
3665
|
})), t;
|
|
3004
3666
|
}
|
|
3005
|
-
function
|
|
3006
|
-
let n =
|
|
3667
|
+
function ea(e, t) {
|
|
3668
|
+
let n = O(null), r = !1, i = (e) => {
|
|
3007
3669
|
if (e == null || n.value != null) return;
|
|
3008
|
-
let i =
|
|
3670
|
+
let i = $i({
|
|
3009
3671
|
...t,
|
|
3010
3672
|
container: e
|
|
3011
3673
|
}), a = (e) => {
|
|
@@ -3018,7 +3680,7 @@ function Oi(e, t) {
|
|
|
3018
3680
|
typeof i.then == "function" ? i.then(a) : a(i);
|
|
3019
3681
|
};
|
|
3020
3682
|
i(e.value);
|
|
3021
|
-
let a =
|
|
3683
|
+
let a = N(e, (e) => {
|
|
3022
3684
|
i(e);
|
|
3023
3685
|
}, {
|
|
3024
3686
|
immediate: !0,
|
|
@@ -3028,11 +3690,11 @@ function Oi(e, t) {
|
|
|
3028
3690
|
let e = n.value;
|
|
3029
3691
|
e != null && (e.dispose(), n.value = null);
|
|
3030
3692
|
};
|
|
3031
|
-
return
|
|
3693
|
+
return x(o), y(o), { chart: n };
|
|
3032
3694
|
}
|
|
3033
|
-
function
|
|
3034
|
-
let t =
|
|
3035
|
-
return
|
|
3695
|
+
function ta(e) {
|
|
3696
|
+
let t = O(e.indicators.peek());
|
|
3697
|
+
return x(e.indicators.subscribe(() => {
|
|
3036
3698
|
t.value = e.indicators.peek();
|
|
3037
3699
|
})), {
|
|
3038
3700
|
indicators: t,
|
|
@@ -3041,27 +3703,27 @@ function ki(e) {
|
|
|
3041
3703
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
3042
3704
|
};
|
|
3043
3705
|
}
|
|
3044
|
-
function
|
|
3045
|
-
let t =
|
|
3046
|
-
return
|
|
3706
|
+
function na(e) {
|
|
3707
|
+
let t = O(e.interactionState.peek());
|
|
3708
|
+
return x(e.interactionState.subscribe(() => {
|
|
3047
3709
|
t.value = e.interactionState.peek();
|
|
3048
3710
|
})), t;
|
|
3049
3711
|
}
|
|
3050
|
-
function
|
|
3051
|
-
let t =
|
|
3052
|
-
return
|
|
3712
|
+
function ra(e) {
|
|
3713
|
+
let t = O(e.paneRatios.peek());
|
|
3714
|
+
return x(e.paneRatios.subscribe(() => {
|
|
3053
3715
|
t.value = e.paneRatios.peek();
|
|
3054
3716
|
})), t;
|
|
3055
3717
|
}
|
|
3056
|
-
function
|
|
3057
|
-
let t =
|
|
3058
|
-
return
|
|
3718
|
+
function ia(e) {
|
|
3719
|
+
let t = O(e.viewport.peek());
|
|
3720
|
+
return x(e.viewport.subscribe(() => {
|
|
3059
3721
|
t.value = e.viewport.peek();
|
|
3060
3722
|
})), t;
|
|
3061
3723
|
}
|
|
3062
|
-
function
|
|
3063
|
-
let t =
|
|
3064
|
-
|
|
3724
|
+
function aa(e) {
|
|
3725
|
+
let t = te({ catalog: e.catalog });
|
|
3726
|
+
x(() => t.dispose());
|
|
3065
3727
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
3066
3728
|
function o(t) {
|
|
3067
3729
|
let n = e.catalog.find((e) => e.id === t);
|
|
@@ -3088,7 +3750,7 @@ function Ni(e) {
|
|
|
3088
3750
|
isActive: c
|
|
3089
3751
|
};
|
|
3090
3752
|
}
|
|
3091
|
-
var
|
|
3753
|
+
var oa = u({
|
|
3092
3754
|
name: "KLineChart",
|
|
3093
3755
|
props: {
|
|
3094
3756
|
data: {
|
|
@@ -3117,7 +3779,7 @@ var Pi = u({
|
|
|
3117
3779
|
zoomLevelChange: (e, t) => !0
|
|
3118
3780
|
},
|
|
3119
3781
|
setup(e, { emit: t, expose: n }) {
|
|
3120
|
-
let r =
|
|
3782
|
+
let r = O(null), i = d(), a = O(null), o = !0, s = (e) => {
|
|
3121
3783
|
if (!o) {
|
|
3122
3784
|
e.dispose();
|
|
3123
3785
|
return;
|
|
@@ -3127,12 +3789,12 @@ var Pi = u({
|
|
|
3127
3789
|
let n = e.viewport.peek();
|
|
3128
3790
|
t("zoomLevelChange", n.zoomLevel, n.kWidth);
|
|
3129
3791
|
};
|
|
3130
|
-
n(),
|
|
3792
|
+
n(), x(e.viewport.subscribe(n));
|
|
3131
3793
|
};
|
|
3132
|
-
|
|
3794
|
+
b(() => {
|
|
3133
3795
|
let t = r.value;
|
|
3134
3796
|
t != null && (i.run(() => {
|
|
3135
|
-
let n =
|
|
3797
|
+
let n = $i({
|
|
3136
3798
|
container: t,
|
|
3137
3799
|
data: e.data,
|
|
3138
3800
|
initialZoomLevel: e.initialZoomLevel,
|
|
@@ -3140,12 +3802,12 @@ var Pi = u({
|
|
|
3140
3802
|
theme: e.theme
|
|
3141
3803
|
});
|
|
3142
3804
|
typeof n.then == "function" ? n.then(s) : s(n);
|
|
3143
|
-
}),
|
|
3805
|
+
}), N(() => e.data, (e) => {
|
|
3144
3806
|
a.value?.setData(e);
|
|
3145
|
-
}),
|
|
3807
|
+
}), N(() => e.theme, (e) => {
|
|
3146
3808
|
a.value?.setTheme(e);
|
|
3147
3809
|
}));
|
|
3148
|
-
}),
|
|
3810
|
+
}), S(() => {
|
|
3149
3811
|
o = !1, a.value?.dispose(), a.value = null, i.stop();
|
|
3150
3812
|
}), n({
|
|
3151
3813
|
getController: () => a.value,
|
|
@@ -3172,9 +3834,9 @@ var Pi = u({
|
|
|
3172
3834
|
}
|
|
3173
3835
|
});
|
|
3174
3836
|
}
|
|
3175
|
-
}),
|
|
3176
|
-
e.component("KLineChart",
|
|
3837
|
+
}), sa = { install(e) {
|
|
3838
|
+
e.component("KLineChart", oa);
|
|
3177
3839
|
} };
|
|
3178
|
-
|
|
3840
|
+
Qi(ee);
|
|
3179
3841
|
//#endregion
|
|
3180
|
-
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 };
|