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