@363045841yyt/klinechart 0.7.12 → 0.8.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,15 @@
1
- import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, vModelSelect as j, watch as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
2
- import { COLOR_PRESET_ITEMS as I, VERSION as L, createChartController as R, createIndicatorSelectorController as z, darkTheme as B, lightTheme as ee, normalizeColorPresetSettings as V, resolveThemeColors as te, themeToCssVars as H } from "@363045841yyt/klinechart-core";
3
- import { DrawingInteractionController as ne, SUB_PANE_INDICATORS as re, SUB_PANE_INDICATOR_CONFIGS as ie, allIndicators as U, createChartController as ae, createIndicatorSelectorController as oe, findIndicator as se, getPhysicalKLineConfig as ce, isSubIndicatorId as W, kGapFromKWidth as le, zoomLevelToKWidth as ue } from "@363045841yyt/klinechart-core/controllers";
4
- import { SemanticChartController as de, __setDataFetcher as fe } from "@363045841yyt/klinechart-core/semantic";
5
- import { DEFAULT_SETTINGS as G, SETTINGS_STORAGE_KEY as K } from "@363045841yyt/klinechart-core/config";
1
+ import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, vModelText as j, watch as M, withCtx as N, withDirectives as P, withKeys as F, withModifiers as I } from "vue";
2
+ import { COLOR_PRESET_ITEMS as ee, VERSION as L, createChartController as R, createIndicatorSelectorController as z, darkTheme as te, lightTheme as ne, normalizeColorPresetSettings as B, resolveThemeColors as re, themeToCssVars as ie } from "@363045841yyt/klinechart-core";
3
+ import { DrawingInteractionController as ae, allIndicators as oe, createChartController as se, createIndicatorSelectorController as ce, findIndicator as le, getPhysicalKLineConfig as ue, kGapFromKWidth as de, zoomLevelToKWidth as fe } from "@363045841yyt/klinechart-core/controllers";
4
+ import { SemanticChartController as pe } from "@363045841yyt/klinechart-core/semantic";
5
+ import { getRegisteredIndicatorDefinition as me } from "@363045841yyt/klinechart-core/indicators";
6
+ import { DEFAULT_SETTINGS as V, SETTINGS_STORAGE_KEY as H } from "@363045841yyt/klinechart-core/config";
6
7
  //#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
7
- var pe = { class: "color-preset-tools" }, me = {
8
+ var he = { class: "color-preset-tools" }, ge = {
8
9
  class: "theme-tabs",
9
10
  role: "tablist",
10
11
  "aria-label": "颜色主题"
11
- }, he = ["onClick"], ge = { class: "color-group-label" }, _e = { class: "color-grid" }, ve = ["value", "onInput"], ye = /* @__PURE__ */ u({
12
+ }, _e = ["onClick"], ve = { class: "color-group-label" }, ye = { class: "color-grid" }, U = ["value", "onInput"], be = /*@__PURE__*/ u({
12
13
  __name: "ColorPresetPanel",
13
14
  props: { colorPresetSettings: {} },
14
15
  emits: ["update:colorPresetSettings"],
@@ -27,16 +28,16 @@ var pe = { class: "color-preset-tools" }, me = {
27
28
  }, u = r(() => Object.keys(l).map((e) => ({
28
29
  group: e,
29
30
  label: l[e],
30
- items: I.filter((t) => t.group === e)
31
+ items: ee.filter((t) => t.group === e)
31
32
  })).filter((e) => e.items.length > 0)), d = w("light");
32
33
  function f(e, t) {
33
- return (e === "dark" ? B : ee).colors[t];
34
+ return (e === "dark" ? te : ne).colors[t];
34
35
  }
35
36
  function p(e) {
36
- return V(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
37
+ return B(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
37
38
  }
38
39
  function m(e, t) {
39
- let n = V(i.colorPresetSettings);
40
+ let n = B(i.colorPresetSettings);
40
41
  a("update:colorPresetSettings", {
41
42
  ...n,
42
43
  [d.value]: {
@@ -46,19 +47,19 @@ var pe = { class: "color-preset-tools" }, me = {
46
47
  });
47
48
  }
48
49
  function h() {
49
- let e = { ...V(i.colorPresetSettings) };
50
+ let e = { ...B(i.colorPresetSettings) };
50
51
  delete e[d.value], a("update:colorPresetSettings", e);
51
52
  }
52
- return (t, n) => (S(), o("div", null, [s("div", pe, [s("div", me, [(S(), o(e, null, T(c, (e) => s("button", {
53
+ return (t, n) => (S(), o("div", null, [s("div", he, [s("div", ge, [(S(), o(e, null, T(c, (e) => s("button", {
53
54
  key: e.value,
54
55
  type: "button",
55
56
  class: g(["theme-tab", { active: d.value === e.value }]),
56
57
  onClick: (t) => d.value = e.value
57
- }, O(e.label), 11, he)), 64))]), s("button", {
58
+ }, O(e.label), 11, _e)), 64))]), s("button", {
58
59
  type: "button",
59
60
  class: "color-reset-btn",
60
61
  onClick: h
61
- }, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", ge, O(t.label), 1), s("div", _e, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
62
+ }, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", ve, O(t.label), 1), s("div", ye, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
62
63
  key: e.key,
63
64
  class: "color-item"
64
65
  }, [s("span", null, O(e.label), 1), s("input", {
@@ -66,76 +67,184 @@ var pe = { class: "color-preset-tools" }, me = {
66
67
  class: "color-input",
67
68
  value: p(e.key),
68
69
  onInput: (t) => m(e.key, t.target.value)
69
- }, null, 40, ve)]))), 128))])], 64))), 128))]));
70
+ }, null, 40, U)]))), 128))])], 64))), 128))]));
70
71
  }
71
- }), q = (e, t) => {
72
+ }), W = (e, t) => {
72
73
  let n = e.__vccOpts || e;
73
74
  for (let [e, r] of t) n[e] = r;
74
75
  return n;
75
- }, be = /* @__PURE__ */ q(ye, [["__scopeId", "data-v-a52947a4"]]), xe = {
76
+ }, xe = /*#__PURE__*/ W(be, [["__scopeId", "data-v-a52947a4"]]), Se = [
77
+ "title",
78
+ "aria-expanded",
79
+ "onKeydown"
80
+ ], Ce = {
81
+ key: 0,
82
+ class: "dropdown__label"
83
+ }, we = { class: "dropdown__value" }, Te = ["aria-selected", "onClick"], G = 0, K = null, Ee = 0, q = /*#__PURE__*/ W(/* @__PURE__ */ u({
84
+ __name: "Dropdown",
85
+ props: {
86
+ modelValue: {},
87
+ options: {},
88
+ size: { default: "md" },
89
+ minWidth: {},
90
+ label: {},
91
+ title: { default: "" }
92
+ },
93
+ emits: ["update:modelValue"],
94
+ setup(t, { emit: n }) {
95
+ let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++Ee, m = r(() => i.minWidth ? { minWidth: i.minWidth } : {}), h = r(() => {
96
+ if (!d.value) return;
97
+ let e = f.value || (i.minWidth ? parseInt(i.minWidth) : 0);
98
+ return { width: e ? `${e}px` : void 0 };
99
+ }), y = r(() => {
100
+ let e = i.modelValue?.trim();
101
+ return e && i.options.some((t) => t.value === e) ? e : i.options[0]?.value ?? "";
102
+ }), b = r(() => i.options.find((e) => e.value === y.value) ?? i.options[0]);
103
+ function x() {
104
+ G !== p && K && K(), !d.value && (G = p, K = C, f.value = u.value?.offsetWidth ?? 0, d.value = !0, document.addEventListener("pointerdown", k));
105
+ }
106
+ function C() {
107
+ d.value && (d.value = !1, G === p && (G = 0, K = null), document.removeEventListener("pointerdown", k));
108
+ }
109
+ function E() {
110
+ d.value ? C() : x();
111
+ }
112
+ function D(e) {
113
+ c("update:modelValue", e), C();
114
+ }
115
+ function k(e) {
116
+ let t = l.value;
117
+ t && !t.contains(e.target) && C();
118
+ }
119
+ return v(C), (n, r) => (S(), o("div", {
120
+ ref_key: "rootRef",
121
+ ref: l,
122
+ class: g(["dropdown", [`dropdown--${t.size}`, { "is-open": d.value }]])
123
+ }, [s("button", {
124
+ ref_key: "triggerRef",
125
+ ref: u,
126
+ type: "button",
127
+ class: "dropdown__trigger",
128
+ title: t.title,
129
+ style: _(m.value),
130
+ "aria-haspopup": "listbox",
131
+ "aria-expanded": d.value,
132
+ onClick: E,
133
+ onKeydown: [
134
+ F(I(C, ["stop"]), ["escape"]),
135
+ F(I(x, ["prevent"]), ["down"]),
136
+ F(I(E, ["prevent"]), ["enter"]),
137
+ F(I(E, ["prevent"]), ["space"])
138
+ ]
139
+ }, [
140
+ t.label ? (S(), o("span", Ce, O(t.label), 1)) : a("", !0),
141
+ s("span", we, O(b.value.label), 1),
142
+ r[0] ||= s("span", {
143
+ class: "dropdown__chevron",
144
+ "aria-hidden": "true"
145
+ }, null, -1)
146
+ ], 44, Se), d.value ? (S(), o("div", {
147
+ key: 0,
148
+ class: "dropdown__menu",
149
+ style: _(h.value),
150
+ role: "listbox",
151
+ tabindex: "-1"
152
+ }, [(S(!0), o(e, null, T(t.options, (e) => (S(), o("button", {
153
+ key: e.value,
154
+ type: "button",
155
+ class: g(["dropdown__option", { "is-selected": e.value === y.value }]),
156
+ role: "option",
157
+ "aria-selected": e.value === y.value,
158
+ onClick: (t) => D(e.value)
159
+ }, O(e.label), 11, Te))), 128))], 4)) : a("", !0)], 2));
160
+ }
161
+ }), [["__scopeId", "data-v-126e11f2"]]), De = {
76
162
  class: "toolbar-item color-item",
77
163
  title: "颜色"
78
- }, Se = ["value"], Ce = ["value"], J = ["value"], we = /* @__PURE__ */ q(/* @__PURE__ */ u({
164
+ }, J = ["value"], Oe = /*#__PURE__*/ W(/* @__PURE__ */ u({
79
165
  __name: "DrawingStyleToolbar",
80
166
  props: { drawing: {} },
81
167
  emits: ["updateStyle", "delete"],
82
168
  setup(e, { emit: t }) {
83
- let n = t;
84
- function r(e) {
85
- e.key === "Delete" && (e.preventDefault(), n("delete"));
86
- }
87
- y(() => document.addEventListener("keydown", r)), x(() => document.removeEventListener("keydown", r));
88
- function i(e) {
89
- n("updateStyle", { stroke: e });
90
- }
169
+ let n = [
170
+ {
171
+ label: "1px",
172
+ value: "1"
173
+ },
174
+ {
175
+ label: "2px",
176
+ value: "2"
177
+ },
178
+ {
179
+ label: "3px",
180
+ value: "3"
181
+ },
182
+ {
183
+ label: "4px",
184
+ value: "4"
185
+ }
186
+ ], r = [
187
+ {
188
+ label: "实线",
189
+ value: "solid"
190
+ },
191
+ {
192
+ label: "虚线",
193
+ value: "dashed"
194
+ },
195
+ {
196
+ label: "点线",
197
+ value: "dotted"
198
+ }
199
+ ], i = t;
91
200
  function a(e) {
92
- n("updateStyle", { strokeWidth: e });
201
+ e.key === "Delete" && (e.preventDefault(), i("delete"));
93
202
  }
203
+ y(() => document.addEventListener("keydown", a)), x(() => document.removeEventListener("keydown", a));
94
204
  function c(e) {
95
- n("updateStyle", { strokeStyle: e });
205
+ i("updateStyle", { stroke: e });
206
+ }
207
+ function u(e) {
208
+ i("updateStyle", { strokeWidth: e });
209
+ }
210
+ function d(e) {
211
+ i("updateStyle", { strokeStyle: e });
96
212
  }
97
- return (t, n) => (S(), o("div", {
213
+ return (t, i) => (S(), o("div", {
98
214
  class: "drawing-style-toolbar",
99
- onPointerdown: n[4] ||= F(() => {}, ["stop"]),
100
- onPointermove: n[5] ||= F(() => {}, ["stop"]),
101
- onPointerup: n[6] ||= F(() => {}, ["stop"])
215
+ onPointerdown: i[4] ||= I(() => {}, ["stop"]),
216
+ onPointermove: i[5] ||= I(() => {}, ["stop"]),
217
+ onPointerup: i[6] ||= I(() => {}, ["stop"])
102
218
  }, [
103
- s("div", xe, [s("span", {
219
+ s("div", De, [s("span", {
104
220
  class: "color-swatch",
105
221
  style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
106
222
  }, null, 4), s("input", {
107
223
  type: "color",
108
224
  class: "color-input",
109
225
  value: e.drawing.style.stroke ?? "#2962ff",
110
- onInput: n[0] ||= (e) => i(e.target.value)
111
- }, null, 40, Se)]),
112
- s("select", {
113
- class: "toolbar-select",
114
- value: e.drawing.style.strokeWidth ?? 1,
115
- onChange: n[1] ||= (e) => a(Number(e.target.value)),
116
- title: "线宽"
117
- }, [...n[7] ||= [
118
- s("option", { value: 1 }, "1px", -1),
119
- s("option", { value: 2 }, "2px", -1),
120
- s("option", { value: 3 }, "3px", -1),
121
- s("option", { value: 4 }, "4px", -1)
122
- ]], 40, Ce),
123
- s("select", {
124
- class: "toolbar-select",
125
- value: e.drawing.style.strokeStyle ?? "solid",
126
- onChange: n[2] ||= (e) => c(e.target.value),
127
- title: "线型"
128
- }, [...n[8] ||= [
129
- s("option", { value: "solid" }, "实线", -1),
130
- s("option", { value: "dashed" }, "虚线", -1),
131
- s("option", { value: "dotted" }, "点线", -1)
132
- ]], 40, J),
226
+ onInput: i[0] ||= (e) => c(e.target.value)
227
+ }, null, 40, J)]),
228
+ l(q, {
229
+ "model-value": String(e.drawing.style.strokeWidth ?? 1),
230
+ options: n,
231
+ size: "sm",
232
+ title: "线宽",
233
+ "onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
234
+ }, null, 8, ["model-value"]),
235
+ l(q, {
236
+ "model-value": e.drawing.style.strokeStyle ?? "solid",
237
+ options: r,
238
+ size: "sm",
239
+ title: "线型",
240
+ "onUpdate:modelValue": i[2] ||= (e) => d(e)
241
+ }, null, 8, ["model-value"]),
133
242
  s("button", {
134
243
  type: "button",
135
244
  class: "toolbar-btn delete-btn",
136
245
  title: "删除",
137
- onClick: n[3] ||= (e) => t.$emit("delete")
138
- }, [...n[9] ||= [s("svg", {
246
+ onClick: i[3] ||= (e) => t.$emit("delete")
247
+ }, [...i[7] ||= [s("svg", {
139
248
  class: "delete-icon",
140
249
  viewBox: "0 0 24 24",
141
250
  fill: "none",
@@ -151,32 +260,32 @@ var pe = { class: "color-preset-tools" }, me = {
151
260
  ], -1)]])
152
261
  ], 32));
153
262
  }
154
- }), [["__scopeId", "data-v-02a1f4d6"]]), Y = Symbol("fullscreen-teleport-target");
155
- function Te(e) {
263
+ }), [["__scopeId", "data-v-e9b6a8a9"]]), Y = Symbol("fullscreen-teleport-target");
264
+ function ke(e) {
156
265
  C(Y, e);
157
266
  }
158
- function Ee() {
267
+ function Ae() {
159
268
  let e = p(Y, null);
160
269
  return r(() => e?.value ?? "body");
161
270
  }
162
271
  //#endregion
163
272
  //#region src/components/IndicatorParams.vue?vue&type=script&setup=true&lang.ts
164
- var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class: "params-title" }, Ae = { class: "header-right" }, je = {
273
+ var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class: "params-title" }, Pe = { class: "header-right" }, Fe = {
165
274
  key: 0,
166
275
  class: "indicator-description"
167
- }, Me = { class: "params-body" }, Ne = { class: "param-header" }, Pe = { class: "param-label" }, Fe = { class: "param-label-text" }, Ie = {
276
+ }, Ie = { class: "params-body" }, Le = { class: "param-header" }, Re = { class: "param-label" }, ze = { class: "param-label-text" }, Be = {
168
277
  key: 0,
169
278
  class: "param-range"
170
- }, Le = { class: "input-wrapper" }, Re = ["disabled", "onClick"], ze = [
279
+ }, Ve = { class: "input-wrapper" }, He = ["disabled", "onClick"], Ue = [
171
280
  "value",
172
281
  "min",
173
282
  "max",
174
283
  "step",
175
284
  "onInput"
176
- ], Be = ["disabled", "onClick"], Ve = {
285
+ ], We = ["disabled", "onClick"], Ge = {
177
286
  key: 0,
178
287
  class: "param-description"
179
- }, He = { class: "params-footer" }, Ue = { class: "footer-right" }, We = /* @__PURE__ */ q(/* @__PURE__ */ u({
288
+ }, Ke = { class: "params-footer" }, qe = { class: "footer-right" }, Je = /*#__PURE__*/ W(/* @__PURE__ */ u({
180
289
  __name: "IndicatorParams",
181
290
  props: {
182
291
  visible: { type: Boolean },
@@ -188,7 +297,7 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
188
297
  },
189
298
  emits: ["close", "confirm"],
190
299
  setup(r, { emit: u }) {
191
- let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Ee();
300
+ let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Ae();
192
301
  M(() => d.values, (e) => {
193
302
  p.value = { ...e };
194
303
  }, {
@@ -222,9 +331,9 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
222
331
  }, [l(n, { name: "modal" }, {
223
332
  default: N(() => [s("div", {
224
333
  class: "indicator-params",
225
- onClick: d[3] ||= F(() => {}, ["stop"])
334
+ onClick: d[3] ||= I(() => {}, ["stop"])
226
335
  }, [
227
- s("div", De, [s("div", Oe, [s("span", ke, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Ae, [s("button", {
336
+ s("div", je, [s("div", Me, [s("span", Ne, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Pe, [s("button", {
228
337
  class: g(["toggle-desc-btn", { active: m.value }]),
229
338
  onClick: d[0] ||= (e) => m.value = !m.value,
230
339
  title: "显示/隐藏说明"
@@ -241,18 +350,18 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
241
350
  "stroke-width": "2"
242
351
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
243
352
  l(n, { name: "slide" }, {
244
- default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", je, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
353
+ default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", Fe, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
245
354
  _: 1
246
355
  }),
247
- s("div", Me, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
356
+ s("div", Ie, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
248
357
  key: e.key,
249
358
  class: g(["param-item", { "has-desc": m.value && e.description }])
250
- }, [s("div", Ne, [s("label", Pe, [s("span", Fe, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", Ie, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Le, [
359
+ }, [s("div", Le, [s("label", Re, [s("span", ze, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", Be, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Ve, [
251
360
  s("button", {
252
361
  class: "stepper-btn",
253
362
  disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
254
363
  onClick: (t) => v(e, -1)
255
- }, " − ", 8, Re),
364
+ }, " − ", 8, He),
256
365
  e.type === "number" ? (S(), o("input", {
257
366
  key: 0,
258
367
  type: "number",
@@ -262,17 +371,17 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
262
371
  max: e.max,
263
372
  step: e.step || 1,
264
373
  onInput: (t) => _(e.key, t)
265
- }, null, 40, ze)) : a("", !0),
374
+ }, null, 40, Ue)) : a("", !0),
266
375
  s("button", {
267
376
  class: "stepper-btn",
268
377
  disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
269
378
  onClick: (t) => v(e, 1)
270
- }, " + ", 8, Be)
379
+ }, " + ", 8, We)
271
380
  ])]), l(n, { name: "slide" }, {
272
- default: N(() => [m.value && e.description ? (S(), o("div", Ve, O(e.description), 1)) : a("", !0)]),
381
+ default: N(() => [m.value && e.description ? (S(), o("div", Ge, O(e.description), 1)) : a("", !0)]),
273
382
  _: 2
274
383
  }, 1024)], 2))), 128))]),
275
- s("div", He, [s("button", {
384
+ s("div", Ke, [s("button", {
276
385
  class: "params-btn reset",
277
386
  onClick: y
278
387
  }, [...d[8] ||= [s("svg", {
@@ -280,7 +389,7 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
280
389
  fill: "none",
281
390
  stroke: "currentColor",
282
391
  "stroke-width": "2"
283
- }, [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", Ue, [s("button", {
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", qe, [s("button", {
284
393
  class: "params-btn cancel",
285
394
  onClick: d[2] ||= (e) => u.$emit("close")
286
395
  }, "取消"), s("button", {
@@ -298,49 +407,31 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
298
407
  _: 1
299
408
  })], 8, ["to"]));
300
409
  }
301
- }), [["__scopeId", "data-v-30f2f611"]]), Ge = { class: "indicator-selector" }, Ke = { class: "indicator-scroll-container" }, qe = { class: "indicator-list" }, Je = {
302
- key: 0,
303
- class: "indicator-divider",
304
- "aria-hidden": "true"
305
- }, Ye = [
306
- "draggable",
307
- "onDragstart",
308
- "onDragover",
309
- "onDrop"
310
- ], Xe = ["onMouseenter"], Ze = { class: "btn-content" }, Qe = {
311
- key: 0,
312
- class: "param-hint"
313
- }, $e = {
314
- key: 0,
315
- class: "hover-overlay"
316
- }, et = ["onClick"], tt = {
317
- key: 1,
318
- class: "divider"
319
- }, nt = ["onClick"], rt = { class: "indicator-item" }, it = { class: "modal-header" }, at = { class: "header-title" }, ot = { class: "title-sub" }, st = { class: "header-actions" }, ct = {
410
+ }), [["__scopeId", "data-v-30f2f611"]]), Ye = { class: "indicator-selector" }, Xe = { class: "modal-header" }, Ze = { class: "header-title" }, Qe = { class: "title-sub" }, $e = { class: "header-actions" }, et = {
320
411
  key: 0,
321
412
  viewBox: "0 0 24 24",
322
413
  width: "16",
323
414
  height: "16",
324
415
  fill: "currentColor"
325
- }, lt = {
416
+ }, tt = {
326
417
  key: 1,
327
418
  viewBox: "0 0 24 24",
328
419
  width: "16",
329
420
  height: "16",
330
421
  fill: "currentColor"
331
- }, X = { class: "modal-body" }, Z = { class: "search-box" }, ut = ["value"], dt = {
422
+ }, nt = { class: "modal-search-area" }, rt = { class: "search-box" }, it = ["value"], at = { class: "modal-body" }, ot = {
332
423
  key: 0,
333
424
  class: "indicator-section"
334
- }, ft = { class: "section-header" }, pt = { class: "section-count" }, mt = ["onClick"], ht = { class: "card-label" }, gt = { class: "card-tooltip" }, _t = { class: "card-header" }, vt = { class: "card-label" }, yt = { class: "card-header-actions" }, bt = ["onClick"], xt = { class: "card-name" }, St = {
425
+ }, st = { class: "section-header" }, ct = { class: "section-count" }, lt = ["onClick"], ut = { class: "card-label" }, dt = { class: "card-tooltip" }, ft = { class: "card-header" }, pt = { class: "card-label" }, mt = { class: "card-header-actions" }, X = ["onClick"], Z = { class: "card-name" }, ht = {
335
426
  key: 1,
336
427
  class: "section-divider"
337
- }, Ct = {
428
+ }, gt = {
338
429
  key: 2,
339
430
  class: "no-results"
340
- }, wt = {
431
+ }, _t = {
341
432
  key: 3,
342
433
  class: "indicator-section"
343
- }, Tt = { class: "section-header" }, Et = { class: "section-count" }, Dt = ["onClick"], Ot = { class: "card-label" }, kt = { class: "card-tooltip" }, At = { class: "card-header" }, jt = { class: "card-label" }, Mt = { class: "card-header-actions" }, Nt = ["onClick"], Pt = { class: "card-name" }, Ft = { class: "modal-footer" }, It = { class: "footer-info" }, Lt = { class: "info-text" }, Rt = /* @__PURE__ */ q(/* @__PURE__ */ u({
434
+ }, vt = { class: "section-header" }, yt = { class: "section-count" }, bt = ["onClick"], xt = { class: "card-label" }, St = { class: "card-tooltip" }, Ct = { class: "card-header" }, wt = { class: "card-label" }, Tt = { class: "card-header-actions" }, Et = ["onClick"], Dt = { class: "card-name" }, Ot = { class: "modal-footer" }, kt = { class: "footer-info" }, At = { class: "info-text" }, jt = /*#__PURE__*/ W(/* @__PURE__ */ u({
344
435
  __name: "IndicatorSelector",
345
436
  props: {
346
437
  activeIndicators: {},
@@ -351,8 +442,8 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
351
442
  "updateParams",
352
443
  "reorderSubIndicators"
353
444
  ],
354
- setup(u, { emit: d }) {
355
- let f = u, p = d;
445
+ setup(c, { expose: u, emit: d }) {
446
+ let f = c, p = d;
356
447
  function m(e) {
357
448
  return e.map((e) => ({
358
449
  id: e.id,
@@ -371,23 +462,21 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
371
462
  }))
372
463
  }));
373
464
  }
374
- let h = oe({ catalog: m(U) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(null), j = w(!1), M = w(null), P = w(null), I = w(null), L = w(null), R = w(!1), z = Ee(), B = r(() => f.activeIndicators?.length ? f.activeIndicators.map((e) => se(e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), ee = r(() => B.value.some((e) => e.pane === "main") ? B.value.find((e) => e.pane === "sub")?.id ?? null : null), V = r(() => M.value ? se(M.value) : null), te = r(() => f.activeIndicators?.length ?? 0);
375
- function H(e) {
465
+ let h = ce({ catalog: m(oe) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(!1), j = w(null), M = w(!1), P = Ae(), F = r(() => j.value ? le(j.value) : null), ee = r(() => f.activeIndicators?.length ?? 0);
466
+ function L(e) {
376
467
  return f.activeIndicators?.includes(e) ?? !1;
377
468
  }
378
- function ne(e) {
379
- if (H(e)) return;
380
- let t = se(e);
381
- t && (t.pane === "main" && U.filter((t) => t.id !== e && H(t.id) && t.pane === "main").forEach((e) => p("toggle", e.id, !1)), p("toggle", e, !0));
469
+ function R(e) {
470
+ L(e) || le(e) && p("toggle", e, !0);
382
471
  }
383
- function re(e) {
472
+ function z(e) {
384
473
  p("toggle", e, !1);
385
474
  }
386
- function ie(e) {
387
- M.value = e, j.value = !0;
475
+ function te(e) {
476
+ j.value = e, A.value = !0;
388
477
  }
389
- function ae(e) {
390
- let t = se(e);
478
+ function ne(e) {
479
+ let t = le(e);
391
480
  if (!t?.params) return {};
392
481
  let n = {};
393
482
  for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
@@ -395,247 +484,153 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
395
484
  for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
396
485
  return i;
397
486
  }
398
- function ce(e) {
399
- let t = ae(e.id);
400
- return e.params ? e.params.map((e) => t[e.key] ?? "").join(",") : "";
401
- }
402
- function le(e) {
403
- M.value && p("updateParams", M.value, e), j.value = !1;
404
- }
405
- function ue(e, t) {
406
- if (!W(t)) {
407
- e.preventDefault();
408
- return;
409
- }
410
- L.value = t, I.value = null, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
487
+ function B(e) {
488
+ j.value && p("updateParams", j.value, e), A.value = !1;
411
489
  }
412
- function de(e, t) {
413
- !L.value || !W(t) || L.value === t || (I.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
414
- }
415
- function fe(e, t) {
416
- let n = L.value || e.dataTransfer?.getData("text/plain") || "";
417
- if (!n || n === t) {
418
- G();
419
- return;
420
- }
421
- if (!W(n) || !W(t)) {
422
- G();
423
- return;
424
- }
425
- let r = B.value.findIndex((e) => e.id === n), i = B.value.findIndex((e) => e.id === t);
426
- if (r < 0 || i < 0) {
427
- G();
428
- return;
429
- }
430
- let a = [...B.value.map((e) => e.id)], [o] = a.splice(r, 1);
431
- if (!o) {
432
- G();
433
- return;
434
- }
435
- a.splice(i, 0, o), p("reorderSubIndicators", a.filter((e) => W(e))), G();
436
- }
437
- function G() {
438
- I.value = null, L.value = null;
439
- }
440
- function K(e) {
490
+ function re(e) {
441
491
  e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
442
492
  }
443
493
  return y(() => {
444
- document.addEventListener("keydown", K);
494
+ document.addEventListener("keydown", re);
445
495
  }), x(() => {
446
- document.removeEventListener("keydown", K);
447
- }), (r, u) => (S(), o("div", Ge, [
448
- s("div", Ke, [s("div", qe, [(S(!0), o(e, null, T(B.value, (t) => (S(), o(e, { key: t.id }, [t.id === ee.value ? (S(), o("div", Je)) : a("", !0), s("div", {
449
- class: g(["indicator-item", {
450
- draggable: k(W)(t.id),
451
- "drag-over": I.value === t.id,
452
- "is-dragging": L.value === t.id
453
- }]),
454
- draggable: k(W)(t.id),
455
- onDragstart: (e) => ue(e, t.id),
456
- onDragover: F((e) => de(e, t.id), ["prevent"]),
457
- onDrop: F((e) => fe(e, t.id), ["prevent"]),
458
- onDragend: G
459
- }, [s("div", {
460
- class: "indicator-btn-wrapper",
461
- onMouseenter: (e) => P.value = t.id,
462
- onMouseleave: u[0] ||= (e) => P.value = null
463
- }, [s("button", { class: g(["indicator-btn", {
464
- active: !0,
465
- hovering: P.value === t.id
466
- }]) }, [s("span", Ze, [c(O(t.label) + " ", 1), t.params?.length ? (S(), o("span", Qe, " (" + O(ce(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
467
- default: N(() => [P.value === t.id ? (S(), o("div", $e, [
468
- t.params?.length ? (S(), o("button", {
469
- key: 0,
470
- class: "action-btn settings-btn",
471
- onClick: F((e) => ie(t.id), ["stop"]),
472
- title: "编辑参数"
473
- }, [...u[9] ||= [s("svg", {
496
+ document.removeEventListener("keydown", re);
497
+ }), u({
498
+ openMenu: () => h.openMenu(),
499
+ closeMenu: () => h.closeMenu(),
500
+ toggleMenu: () => h.toggleMenu()
501
+ }), (r, c) => (S(), o("div", Ye, [(S(), i(t, { to: k(P) }, [l(n, { name: "overlay" }, {
502
+ default: N(() => [k(_) ? (S(), o("div", {
503
+ key: 0,
504
+ class: "selector-overlay",
505
+ onClick: c[5] ||= (e) => k(h).closeMenu()
506
+ }, [l(n, { name: "modal" }, {
507
+ default: N(() => [k(_) ? (S(), o("div", {
508
+ key: 0,
509
+ class: "selector-modal",
510
+ onClick: c[4] ||= I(() => {}, ["stop"])
511
+ }, [
512
+ s("div", Xe, [s("div", Ze, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", Qe, O(k(D)) + " 个可用指标", 1)]), s("div", $e, [s("button", {
513
+ class: g(["view-toggle-btn", { active: M.value }]),
514
+ onClick: c[0] ||= (e) => M.value = !M.value,
515
+ title: "简洁模式"
516
+ }, [M.value ? (S(), o("svg", tt, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", et, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
517
+ class: "modal-close",
518
+ onClick: c[1] ||= (e) => k(h).closeMenu(),
519
+ title: "关闭"
520
+ }, [...c[10] ||= [s("svg", {
474
521
  viewBox: "0 0 24 24",
475
522
  width: "14",
476
523
  height: "14",
477
524
  fill: "currentColor"
478
- }, [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, et)) : a("", !0),
479
- t.params?.length ? (S(), o("span", tt)) : a("", !0),
480
- s("button", {
481
- class: "action-btn remove-btn",
482
- onClick: F((e) => re(t.id), ["stop"]),
483
- title: "移除指标"
484
- }, [...u[10] ||= [s("svg", {
525
+ }, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]),
526
+ s("div", nt, [s("div", rt, [c[11] ||= s("svg", {
527
+ class: "search-icon",
485
528
  viewBox: "0 0 24 24",
486
- width: "14",
487
- height: "14",
529
+ width: "16",
530
+ height: "16",
488
531
  fill: "currentColor"
489
- }, [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)]], 8, nt)
490
- ])) : a("", !0)]),
491
- _: 2
492
- }, 1024)], 2)], 40, Xe)], 42, Ye)], 64))), 128)), s("div", rt, [s("button", {
493
- ref_key: "addBtnRef",
494
- ref: A,
495
- class: "add-btn",
496
- onClick: u[1] ||= F((e) => k(h).toggleMenu(), ["stop"]),
497
- title: "添加指标"
498
- }, [...u[11] ||= [s("svg", {
499
- viewBox: "0 0 24 24",
500
- width: "16",
501
- height: "16",
502
- fill: "currentColor"
503
- }, [s("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })], -1)]], 512)])])]),
504
- (S(), i(t, { to: k(z) }, [l(n, { name: "overlay" }, {
505
- default: N(() => [k(_) ? (S(), o("div", {
506
- key: 0,
507
- class: "selector-overlay",
508
- onClick: u[7] ||= (e) => k(h).closeMenu()
509
- }, [l(n, { name: "modal" }, {
510
- default: N(() => [k(_) ? (S(), o("div", {
511
- key: 0,
512
- class: "selector-modal",
513
- onClick: u[6] ||= F(() => {}, ["stop"])
514
- }, [
515
- s("div", it, [s("div", at, [u[12] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", ot, O(k(D)) + " 个可用指标", 1)]), s("div", st, [s("button", {
516
- class: g(["view-toggle-btn", { active: R.value }]),
517
- onClick: u[2] ||= (e) => R.value = !R.value,
518
- title: "简洁模式"
519
- }, [R.value ? (S(), o("svg", lt, [...u[14] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", ct, [...u[13] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
520
- class: "modal-close",
521
- onClick: u[3] ||= (e) => k(h).closeMenu(),
522
- title: "关闭"
523
- }, [...u[15] ||= [s("svg", {
532
+ }, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1), s("input", {
533
+ value: k(v),
534
+ onInput: c[2] ||= (e) => k(h).setSearchQuery(e.target.value),
535
+ type: "text",
536
+ class: "search-input",
537
+ placeholder: "搜索指标名称..."
538
+ }, null, 40, it)])]),
539
+ s("div", at, [
540
+ k(b).length > 0 ? (S(), o("div", ot, [s("div", st, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ct, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
541
+ key: t.id,
542
+ class: g(["indicator-card", {
543
+ active: L(t.id),
544
+ compact: M.value
545
+ }]),
546
+ onClick: (e) => L(t.id) ? z(t.id) : R(t.id)
547
+ }, [M.value ? (S(), o(e, { key: 0 }, [s("span", ut, O(t.label), 1), s("span", dt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", ft, [s("span", pt, O(t.label), 1), s("div", mt, [t.params?.length ? (S(), o("button", {
548
+ key: 0,
549
+ class: "card-settings-btn",
550
+ onClick: I((e) => te(t.id), ["stop"]),
551
+ title: "编辑参数"
552
+ }, [...c[13] ||= [s("svg", {
524
553
  viewBox: "0 0 24 24",
525
554
  width: "14",
526
555
  height: "14",
527
556
  fill: "currentColor"
528
- }, [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)]])])]),
529
- s("div", X, [
530
- s("div", Z, [u[16] ||= s("svg", {
531
- class: "search-icon",
532
- viewBox: "0 0 24 24",
533
- width: "16",
534
- height: "16",
535
- 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), s("input", {
537
- value: k(v),
538
- onInput: u[4] ||= (e) => k(h).setSearchQuery(e.target.value),
539
- type: "text",
540
- class: "search-input",
541
- placeholder: "搜索指标名称..."
542
- }, null, 40, ut)]),
543
- k(b).length > 0 ? (S(), o("div", dt, [s("div", ft, [u[17] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", pt, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: R.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
544
- key: t.id,
545
- class: g(["indicator-card", {
546
- active: H(t.id),
547
- compact: R.value
548
- }]),
549
- onClick: (e) => H(t.id) ? re(t.id) : ne(t.id)
550
- }, [R.value ? (S(), o(e, { key: 0 }, [s("span", ht, O(t.label), 1), s("span", gt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", _t, [s("span", vt, O(t.label), 1), s("div", yt, [t.params?.length ? (S(), o("button", {
551
- key: 0,
552
- class: "card-settings-btn",
553
- onClick: F((e) => ie(t.id), ["stop"]),
554
- title: "编辑参数"
555
- }, [...u[18] ||= [s("svg", {
556
- viewBox: "0 0 24 24",
557
- width: "14",
558
- height: "14",
559
- fill: "currentColor"
560
- }, [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, bt)) : a("", !0)])]), s("div", xt, O(t.name), 1)], 64))], 10, mt))), 128))], 2)])) : a("", !0),
561
- k(b).length > 0 && k(C).length > 0 ? (S(), o("div", St)) : a("", !0),
562
- !E.value && k(v).trim() ? (S(), o("div", Ct, [...u[19] ||= [
563
- s("svg", {
564
- viewBox: "0 0 24 24",
565
- width: "48",
566
- height: "48",
567
- fill: "currentColor"
568
- }, [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),
569
- s("p", null, "未找到匹配的指标", -1),
570
- s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
571
- ]])) : a("", !0),
572
- k(C).length > 0 ? (S(), o("div", wt, [s("div", Tt, [u[20] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Et, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: R.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
573
- key: t.id,
574
- class: g(["indicator-card", {
575
- active: H(t.id),
576
- compact: R.value
577
- }]),
578
- onClick: (e) => H(t.id) ? re(t.id) : ne(t.id)
579
- }, [R.value ? (S(), o(e, { key: 0 }, [s("span", Ot, O(t.label), 1), s("span", kt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", At, [s("span", jt, O(t.label), 1), s("div", Mt, [t.params?.length ? (S(), o("button", {
580
- key: 0,
581
- class: "card-settings-btn",
582
- onClick: F((e) => ie(t.id), ["stop"]),
583
- title: "编辑参数"
584
- }, [...u[21] ||= [s("svg", {
557
+ }, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, X)) : a("", !0)])]), s("div", Z, O(t.name), 1)], 64))], 10, lt))), 128))], 2)])) : a("", !0),
558
+ k(b).length > 0 && k(C).length > 0 ? (S(), o("div", ht)) : a("", !0),
559
+ !E.value && k(v).trim() ? (S(), o("div", gt, [...c[14] ||= [
560
+ s("svg", {
585
561
  viewBox: "0 0 24 24",
586
- width: "14",
587
- height: "14",
562
+ width: "48",
563
+ height: "48",
588
564
  fill: "currentColor"
589
- }, [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, O(t.name), 1)], 64))], 10, Dt))), 128))], 2)])) : a("", !0)
590
- ]),
591
- s("div", Ft, [s("div", It, [s("span", Lt, "已激活 " + O(te.value) + " 个指标", 1)]), s("button", {
592
- class: "btn btn-confirm",
593
- onClick: u[5] ||= (e) => k(h).closeMenu()
594
- }, "确认")])
595
- ])) : a("", !0)]),
596
- _: 1
597
- })])) : a("", !0)]),
565
+ }, [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),
566
+ s("p", null, "未找到匹配的指标", -1),
567
+ s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
568
+ ]])) : a("", !0),
569
+ k(C).length > 0 ? (S(), o("div", _t, [s("div", vt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", yt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
570
+ key: t.id,
571
+ class: g(["indicator-card", {
572
+ active: L(t.id),
573
+ compact: M.value
574
+ }]),
575
+ onClick: (e) => L(t.id) ? z(t.id) : R(t.id)
576
+ }, [M.value ? (S(), o(e, { key: 0 }, [s("span", xt, O(t.label), 1), s("span", St, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", Ct, [s("span", wt, O(t.label), 1), s("div", Tt, [t.params?.length ? (S(), o("button", {
577
+ key: 0,
578
+ class: "card-settings-btn",
579
+ onClick: I((e) => te(t.id), ["stop"]),
580
+ title: "编辑参数"
581
+ }, [...c[16] ||= [s("svg", {
582
+ viewBox: "0 0 24 24",
583
+ width: "14",
584
+ height: "14",
585
+ fill: "currentColor"
586
+ }, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Et)) : a("", !0)])]), s("div", Dt, O(t.name), 1)], 64))], 10, bt))), 128))], 2)])) : a("", !0)
587
+ ]),
588
+ s("div", Ot, [s("div", kt, [s("span", At, "已激活 " + O(ee.value) + " 个指标", 1)]), s("button", {
589
+ class: "btn btn-confirm",
590
+ onClick: c[3] ||= (e) => k(h).closeMenu()
591
+ }, "确认")])
592
+ ])) : a("", !0)]),
598
593
  _: 1
599
- })], 8, ["to"])),
600
- V.value ? (S(), i(We, {
601
- key: 0,
602
- visible: j.value,
603
- "indicator-id": V.value.id,
604
- "indicator-name": V.value.name,
605
- "indicator-description": V.value.description,
606
- params: V.value.params || [],
607
- values: ae(V.value.id),
608
- onClose: u[8] ||= (e) => j.value = !1,
609
- onConfirm: le
610
- }, null, 8, [
611
- "visible",
612
- "indicator-id",
613
- "indicator-name",
614
- "indicator-description",
615
- "params",
616
- "values"
617
- ])) : a("", !0)
618
- ]));
594
+ })])) : a("", !0)]),
595
+ _: 1
596
+ })], 8, ["to"])), F.value ? (S(), i(Je, {
597
+ key: 0,
598
+ visible: A.value,
599
+ "indicator-id": F.value.id,
600
+ "indicator-name": F.value.name,
601
+ "indicator-description": F.value.description,
602
+ params: F.value.params || [],
603
+ values: ne(F.value.id),
604
+ onClose: c[6] ||= (e) => A.value = !1,
605
+ onConfirm: B
606
+ }, null, 8, [
607
+ "visible",
608
+ "indicator-id",
609
+ "indicator-name",
610
+ "indicator-description",
611
+ "params",
612
+ "values"
613
+ ])) : a("", !0)]));
619
614
  }
620
- }), [["__scopeId", "data-v-01a99263"]]), zt = { class: "kline-tooltip__title" }, Bt = { key: 0 }, Vt = { class: "kline-tooltip__grid" }, Ht = { class: "row" }, Ut = { class: "row" }, Wt = { class: "row" }, Gt = { class: "row" }, Kt = {
615
+ }), [["__scopeId", "data-v-bbd88e50"]]), Mt = { class: "kline-tooltip__title" }, Nt = { key: 0 }, Pt = { class: "kline-tooltip__grid" }, Ft = { class: "row" }, It = { class: "row" }, Lt = { class: "row" }, Rt = { class: "row" }, zt = {
621
616
  key: 0,
622
617
  class: "row"
623
- }, qt = {
618
+ }, Bt = {
624
619
  key: 1,
625
620
  class: "row"
626
- }, Jt = {
621
+ }, Vt = {
627
622
  key: 2,
628
623
  class: "row"
629
- }, Yt = {
624
+ }, Ht = {
630
625
  key: 3,
631
626
  class: "row"
632
- }, Xt = {
627
+ }, Ut = {
633
628
  key: 4,
634
629
  class: "row"
635
- }, Zt = {
630
+ }, Wt = {
636
631
  key: 5,
637
632
  class: "row"
638
- }, Qt = "#6b7280", $t = /* @__PURE__ */ q(/* @__PURE__ */ u({
633
+ }, Gt = "#6b7280", Kt = /*#__PURE__*/ W(/* @__PURE__ */ u({
639
634
  __name: "KLineTooltip",
640
635
  props: {
641
636
  k: {},
@@ -670,19 +665,19 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
670
665
  }
671
666
  let p = r(() => {
672
667
  let e = t.k;
673
- if (!e) return Qt;
668
+ if (!e) return Gt;
674
669
  let n = f(e, t.data, t.index);
675
- return n > 0 ? t.upColor : n < 0 ? t.downColor : Qt;
670
+ return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
676
671
  }), m = r(() => {
677
672
  let e = t.k;
678
- if (!e) return Qt;
673
+ if (!e) return Gt;
679
674
  let n = e.close - e.open;
680
- return n > 0 ? t.upColor : n < 0 ? t.downColor : Qt;
675
+ return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
681
676
  }), h = r(() => {
682
677
  let e = t.k;
683
- if (!e) return Qt;
678
+ if (!e) return Gt;
684
679
  let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
685
- return n > 0 ? t.upColor : n < 0 ? t.downColor : Qt;
680
+ return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
686
681
  });
687
682
  return (t, r) => e.k ? (S(), o("div", {
688
683
  key: 0,
@@ -692,23 +687,23 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
692
687
  left: `${e.pos.x}px`,
693
688
  top: `${e.pos.y}px`
694
689
  })
695
- }, [s("div", zt, [e.k.stockCode ? (S(), o("span", Bt, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(l(e.k.timestamp)), 1)]), s("div", Vt, [
696
- s("div", Ht, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
697
- s("div", Ut, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
698
- s("div", Wt, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
699
- s("div", Gt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
700
- typeof e.k.volume == "number" ? (S(), o("div", Kt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
701
- typeof e.k.turnover == "number" ? (S(), o("div", qt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
702
- typeof e.k.amplitude == "number" ? (S(), o("div", Jt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
703
- typeof e.k.changePercent == "number" ? (S(), o("div", Yt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
704
- typeof e.k.changeAmount == "number" ? (S(), o("div", Xt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
705
- typeof e.k.turnoverRate == "number" ? (S(), o("div", Zt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
690
+ }, [s("div", Mt, [e.k.stockCode ? (S(), o("span", Nt, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(l(e.k.timestamp)), 1)]), s("div", Pt, [
691
+ s("div", Ft, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
692
+ s("div", It, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
693
+ s("div", Lt, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
694
+ s("div", Rt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
695
+ typeof e.k.volume == "number" ? (S(), o("div", zt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
696
+ typeof e.k.turnover == "number" ? (S(), o("div", Bt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
697
+ typeof e.k.amplitude == "number" ? (S(), o("div", Vt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
698
+ typeof e.k.changePercent == "number" ? (S(), o("div", Ht, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
699
+ typeof e.k.changeAmount == "number" ? (S(), o("div", Ut, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
700
+ typeof e.k.turnoverRate == "number" ? (S(), o("div", Wt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
706
701
  ])], 6)) : a("", !0);
707
702
  }
708
- }), [["__scopeId", "data-v-a068b75e"]]), en = { class: "marker-tooltip__title" }, tn = {
703
+ }), [["__scopeId", "data-v-a068b75e"]]), qt = { class: "marker-tooltip__title" }, Jt = {
709
704
  key: 0,
710
705
  class: "marker-tooltip__content"
711
- }, nn = /* @__PURE__ */ q(/* @__PURE__ */ u({
706
+ }, Yt = /*#__PURE__*/ W(/* @__PURE__ */ u({
712
707
  __name: "MarkerTooltip",
713
708
  props: {
714
709
  marker: {},
@@ -757,18 +752,18 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
757
752
  left: `${t.pos.x + 12}px`,
758
753
  top: `${t.pos.y + 12}px`
759
754
  })
760
- }, [s("div", en, O(f.value), 1), m.value ? (S(), o("div", tn, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
755
+ }, [s("div", qt, O(f.value), 1), m.value ? (S(), o("div", Jt, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
761
756
  key: t,
762
757
  class: "row"
763
758
  }, [s("span", null, O(t), 1), s("span", null, O(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
764
759
  }
765
- }), [["__scopeId", "data-v-f2a21012"]]), rn = {
760
+ }), [["__scopeId", "data-v-f2a21012"]]), Xt = {
766
761
  viewBox: "0 0 24 24",
767
762
  width: "1.2em",
768
763
  height: "1.2em"
769
764
  };
770
- function an(e, t) {
771
- return S(), o("svg", rn, [...t[0] ||= [s("path", {
765
+ function Zt(e, t) {
766
+ return S(), o("svg", Xt, [...t[0] ||= [s("path", {
772
767
  fill: "none",
773
768
  stroke: "currentColor",
774
769
  "stroke-linecap": "round",
@@ -777,16 +772,16 @@ function an(e, t) {
777
772
  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"
778
773
  }, null, -1)]]);
779
774
  }
780
- var on = m({
775
+ var Qt = m({
781
776
  name: "tabler-pointer",
782
- render: an
783
- }), sn = {
777
+ render: Zt
778
+ }), $t = {
784
779
  viewBox: "0 0 24 24",
785
780
  width: "1.2em",
786
781
  height: "1.2em"
787
782
  };
788
- function cn(e, t) {
789
- return S(), o("svg", sn, [...t[0] ||= [s("path", {
783
+ function en(e, t) {
784
+ return S(), o("svg", $t, [...t[0] ||= [s("path", {
790
785
  fill: "none",
791
786
  stroke: "currentColor",
792
787
  "stroke-linecap": "round",
@@ -795,16 +790,16 @@ function cn(e, t) {
795
790
  d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
796
791
  }, null, -1)]]);
797
792
  }
798
- var ln = m({
793
+ var tn = m({
799
794
  name: "tabler-chart-line",
800
- render: cn
801
- }), un = {
795
+ render: en
796
+ }), nn = {
802
797
  viewBox: "0 0 24 24",
803
798
  width: "1.2em",
804
799
  height: "1.2em"
805
800
  };
806
- function dn(e, t) {
807
- return S(), o("svg", un, [...t[0] ||= [s("path", {
801
+ function rn(e, t) {
802
+ return S(), o("svg", nn, [...t[0] ||= [s("path", {
808
803
  fill: "none",
809
804
  stroke: "currentColor",
810
805
  "stroke-linecap": "round",
@@ -813,16 +808,16 @@ function dn(e, t) {
813
808
  d: "M17 7L7 17M8 7h9v9"
814
809
  }, null, -1)]]);
815
810
  }
816
- var fn = m({
811
+ var an = m({
817
812
  name: "tabler-arrow-up-right",
818
- render: dn
819
- }), pn = {
813
+ render: rn
814
+ }), on = {
820
815
  viewBox: "0 0 24 24",
821
816
  width: "1.2em",
822
817
  height: "1.2em"
823
818
  };
824
- function mn(e, t) {
825
- return S(), o("svg", pn, [...t[0] ||= [s("path", {
819
+ function sn(e, t) {
820
+ return S(), o("svg", on, [...t[0] ||= [s("path", {
826
821
  fill: "none",
827
822
  stroke: "currentColor",
828
823
  "stroke-linecap": "round",
@@ -831,16 +826,16 @@ function mn(e, t) {
831
826
  d: "M5 12h14m-6 6l6-6m-6-6l6 6"
832
827
  }, null, -1)]]);
833
828
  }
834
- var hn = m({
829
+ var cn = m({
835
830
  name: "tabler-arrow-right",
836
- render: mn
837
- }), gn = {
831
+ render: sn
832
+ }), ln = {
838
833
  viewBox: "0 0 24 24",
839
834
  width: "1.2em",
840
835
  height: "1.2em"
841
836
  };
842
- function _n(e, t) {
843
- return S(), o("svg", gn, [...t[0] ||= [s("path", {
837
+ function un(e, t) {
838
+ return S(), o("svg", ln, [...t[0] ||= [s("path", {
844
839
  fill: "none",
845
840
  stroke: "currentColor",
846
841
  "stroke-linecap": "round",
@@ -849,16 +844,16 @@ function _n(e, t) {
849
844
  d: "M5 12h14"
850
845
  }, null, -1)]]);
851
846
  }
852
- var vn = m({
847
+ var dn = m({
853
848
  name: "tabler-minus",
854
- render: _n
855
- }), yn = {
849
+ render: un
850
+ }), fn = {
856
851
  viewBox: "0 0 24 24",
857
852
  width: "1.2em",
858
853
  height: "1.2em"
859
854
  };
860
- function bn(e, t) {
861
- return S(), o("svg", yn, [...t[0] ||= [s("path", {
855
+ function pn(e, t) {
856
+ return S(), o("svg", fn, [...t[0] ||= [s("path", {
862
857
  fill: "none",
863
858
  stroke: "currentColor",
864
859
  "stroke-linecap": "round",
@@ -867,16 +862,16 @@ function bn(e, t) {
867
862
  d: "M3 12v.01M7 12h10m4 0v.01"
868
863
  }, null, -1)]]);
869
864
  }
870
- var xn = m({
865
+ var mn = m({
871
866
  name: "tabler-separator",
872
- render: bn
873
- }), Sn = {
867
+ render: pn
868
+ }), hn = {
874
869
  viewBox: "0 0 24 24",
875
870
  width: "1.2em",
876
871
  height: "1.2em"
877
872
  };
878
- function Cn(e, t) {
879
- return S(), o("svg", Sn, [...t[0] ||= [s("path", {
873
+ function gn(e, t) {
874
+ return S(), o("svg", hn, [...t[0] ||= [s("path", {
880
875
  fill: "none",
881
876
  stroke: "currentColor",
882
877
  "stroke-linecap": "round",
@@ -885,16 +880,16 @@ function Cn(e, t) {
885
880
  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"
886
881
  }, null, -1)]]);
887
882
  }
888
- var wn = m({
883
+ var _n = m({
889
884
  name: "tabler-crosshair",
890
- render: Cn
891
- }), Tn = {
885
+ render: gn
886
+ }), vn = {
892
887
  viewBox: "0 0 24 24",
893
888
  width: "1.2em",
894
889
  height: "1.2em"
895
890
  };
896
- function En(e, t) {
897
- return S(), o("svg", Tn, [...t[0] ||= [s("g", {
891
+ function yn(e, t) {
892
+ return S(), o("svg", vn, [...t[0] ||= [s("g", {
898
893
  fill: "none",
899
894
  stroke: "currentColor",
900
895
  "stroke-linecap": "round",
@@ -902,16 +897,16 @@ function En(e, t) {
902
897
  "stroke-width": "2"
903
898
  }, [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)]]);
904
899
  }
905
- var Dn = m({
900
+ var bn = m({
906
901
  name: "tabler-info-circle",
907
- render: En
908
- }), On = {
902
+ render: yn
903
+ }), xn = {
909
904
  viewBox: "0 0 24 24",
910
905
  width: "1.2em",
911
906
  height: "1.2em"
912
907
  };
913
- function kn(e, t) {
914
- return S(), o("svg", On, [...t[0] ||= [s("path", {
908
+ function Sn(e, t) {
909
+ return S(), o("svg", xn, [...t[0] ||= [s("path", {
915
910
  fill: "none",
916
911
  stroke: "currentColor",
917
912
  "stroke-linecap": "round",
@@ -920,16 +915,16 @@ function kn(e, t) {
920
915
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
921
916
  }, null, -1)]]);
922
917
  }
923
- var An = m({
918
+ var Cn = m({
924
919
  name: "tabler-zoom-in",
925
- render: kn
926
- }), jn = {
920
+ render: Sn
921
+ }), wn = {
927
922
  viewBox: "0 0 24 24",
928
923
  width: "1.2em",
929
924
  height: "1.2em"
930
925
  };
931
- function Mn(e, t) {
932
- return S(), o("svg", jn, [...t[0] ||= [s("path", {
926
+ function Tn(e, t) {
927
+ return S(), o("svg", wn, [...t[0] ||= [s("path", {
933
928
  fill: "none",
934
929
  stroke: "currentColor",
935
930
  "stroke-linecap": "round",
@@ -938,16 +933,16 @@ function Mn(e, t) {
938
933
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
939
934
  }, null, -1)]]);
940
935
  }
941
- var Nn = m({
936
+ var En = m({
942
937
  name: "tabler-zoom-out",
943
- render: Mn
944
- }), Pn = {
938
+ render: Tn
939
+ }), Dn = {
945
940
  viewBox: "0 0 24 24",
946
941
  width: "1.2em",
947
942
  height: "1.2em"
948
943
  };
949
- function Fn(e, t) {
950
- return S(), o("svg", Pn, [...t[0] ||= [s("path", {
944
+ function On(e, t) {
945
+ return S(), o("svg", Dn, [...t[0] ||= [s("path", {
951
946
  fill: "none",
952
947
  stroke: "currentColor",
953
948
  "stroke-linecap": "round",
@@ -956,16 +951,16 @@ function Fn(e, t) {
956
951
  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"
957
952
  }, null, -1)]]);
958
953
  }
959
- var In = m({
954
+ var kn = m({
960
955
  name: "tabler-maximize",
961
- render: Fn
962
- }), Ln = {
956
+ render: On
957
+ }), An = {
963
958
  viewBox: "0 0 24 24",
964
959
  width: "1.2em",
965
960
  height: "1.2em"
966
961
  };
967
- function Rn(e, t) {
968
- return S(), o("svg", Ln, [...t[0] ||= [s("path", {
962
+ function jn(e, t) {
963
+ return S(), o("svg", An, [...t[0] ||= [s("path", {
969
964
  fill: "none",
970
965
  stroke: "currentColor",
971
966
  "stroke-linecap": "round",
@@ -974,16 +969,16 @@ function Rn(e, t) {
974
969
  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"
975
970
  }, null, -1)]]);
976
971
  }
977
- var zn = m({
972
+ var Mn = m({
978
973
  name: "tabler-minimize",
979
- render: Rn
980
- }), Bn = {
974
+ render: jn
975
+ }), Nn = {
981
976
  viewBox: "0 0 24 24",
982
977
  width: "1.2em",
983
978
  height: "1.2em"
984
979
  };
985
- function Vn(e, t) {
986
- return S(), o("svg", Bn, [...t[0] ||= [s("g", {
980
+ function Pn(e, t) {
981
+ return S(), o("svg", Nn, [...t[0] ||= [s("g", {
987
982
  fill: "none",
988
983
  stroke: "currentColor",
989
984
  "stroke-linecap": "round",
@@ -991,16 +986,16 @@ function Vn(e, t) {
991
986
  "stroke-width": "2"
992
987
  }, [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)]]);
993
988
  }
994
- var Hn = m({
989
+ var Fn = m({
995
990
  name: "tabler-settings",
996
- render: Vn
997
- }), Un = {
991
+ render: Pn
992
+ }), In = {
998
993
  viewBox: "0 0 24 24",
999
994
  width: "1.2em",
1000
995
  height: "1.2em"
1001
996
  };
1002
- function Wn(e, t) {
1003
- return S(), o("svg", Un, [...t[0] ||= [s("path", {
997
+ function Ln(e, t) {
998
+ return S(), o("svg", In, [...t[0] ||= [s("path", {
1004
999
  fill: "none",
1005
1000
  stroke: "currentColor",
1006
1001
  "stroke-linecap": "round",
@@ -1009,16 +1004,16 @@ function Wn(e, t) {
1009
1004
  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"
1010
1005
  }, null, -1)]]);
1011
1006
  }
1012
- var Gn = m({
1007
+ var Rn = m({
1013
1008
  name: "tabler-shape",
1014
- render: Wn
1015
- }), Kn = {
1009
+ render: Ln
1010
+ }), zn = {
1016
1011
  viewBox: "0 0 24 24",
1017
1012
  width: "1.2em",
1018
1013
  height: "1.2em"
1019
1014
  };
1020
- function qn(e, t) {
1021
- return S(), o("svg", Kn, [...t[0] ||= [s("path", {
1015
+ function Bn(e, t) {
1016
+ return S(), o("svg", zn, [...t[0] ||= [s("path", {
1022
1017
  fill: "none",
1023
1018
  stroke: "currentColor",
1024
1019
  "stroke-linecap": "round",
@@ -1027,16 +1022,16 @@ function qn(e, t) {
1027
1022
  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"
1028
1023
  }, null, -1)]]);
1029
1024
  }
1030
- var Jn = m({
1025
+ var Vn = m({
1031
1026
  name: "tabler-chart-dots-3",
1032
- render: qn
1033
- }), Yn = {
1027
+ render: Bn
1028
+ }), Hn = {
1034
1029
  viewBox: "0 0 24 24",
1035
1030
  width: "1.2em",
1036
1031
  height: "1.2em"
1037
1032
  };
1038
- function Xn(e, t) {
1039
- return S(), o("svg", Yn, [...t[0] ||= [s("path", {
1033
+ function Un(e, t) {
1034
+ return S(), o("svg", Hn, [...t[0] ||= [s("path", {
1040
1035
  fill: "none",
1041
1036
  stroke: "currentColor",
1042
1037
  "stroke-linecap": "round",
@@ -1045,16 +1040,16 @@ function Xn(e, t) {
1045
1040
  d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
1046
1041
  }, null, -1)]]);
1047
1042
  }
1048
- var Zn = m({
1043
+ var Wn = m({
1049
1044
  name: "tabler-caret-up-down",
1050
- render: Xn
1051
- }), Qn = {
1045
+ render: Un
1046
+ }), Gn = {
1052
1047
  viewBox: "0 0 24 24",
1053
1048
  width: "1.2em",
1054
1049
  height: "1.2em"
1055
1050
  };
1056
- function $n(e, t) {
1057
- return S(), o("svg", Qn, [...t[0] ||= [s("path", {
1051
+ function Kn(e, t) {
1052
+ return S(), o("svg", Gn, [...t[0] ||= [s("path", {
1058
1053
  fill: "none",
1059
1054
  stroke: "currentColor",
1060
1055
  "stroke-linecap": "round",
@@ -1063,34 +1058,34 @@ function $n(e, t) {
1063
1058
  d: "M8 4H5v16h3m8-16h3v16h-3"
1064
1059
  }, null, -1)]]);
1065
1060
  }
1066
- var er = m({
1061
+ var qn = m({
1067
1062
  name: "tabler-brackets",
1068
- render: $n
1063
+ render: Kn
1069
1064
  });
1070
1065
  //#endregion
1071
1066
  //#region src/debug/canvasProfiler.ts
1072
- function tr() {
1067
+ function Jn() {
1073
1068
  return Object.create(null);
1074
1069
  }
1075
- function nr() {
1070
+ function Yn() {
1076
1071
  return {
1077
- ctxMethods: tr(),
1078
- ctxProps: tr(),
1079
- canvasProps: tr(),
1072
+ ctxMethods: Jn(),
1073
+ ctxProps: Jn(),
1074
+ canvasProps: Jn(),
1080
1075
  ctxMethodSources: Object.create(null)
1081
1076
  };
1082
1077
  }
1083
- function rr(e, t, n) {
1078
+ function Xn(e, t, n) {
1084
1079
  let r = e[t] ??= {
1085
1080
  count: 0,
1086
1081
  totalTime: 0
1087
1082
  };
1088
1083
  r.count += 1, r.totalTime += n;
1089
1084
  }
1090
- function ir(e, t, n, r) {
1091
- rr(e.ctxMethodSources[t] ??= tr(), n, r);
1085
+ function Zn(e, t, n, r) {
1086
+ Xn(e.ctxMethodSources[t] ??= Jn(), n, r);
1092
1087
  }
1093
- function ar(e) {
1088
+ function Qn(e) {
1094
1089
  return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
1095
1090
  name: e,
1096
1091
  count: t.count,
@@ -1098,12 +1093,12 @@ function ar(e) {
1098
1093
  averageTime: (t.totalTime / t.count).toFixed(4)
1099
1094
  })).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
1100
1095
  }
1101
- var or = !1, sr = /* @__PURE__ */ new Map(), cr = /* @__PURE__ */ new Map();
1102
- function lr(e) {
1103
- or = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && fr() : pr();
1096
+ var $n = !1, er = /* @__PURE__ */ new Map(), tr = /* @__PURE__ */ new Map();
1097
+ function nr(e) {
1098
+ $n = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && ar() : or();
1104
1099
  }
1105
- function ur() {
1106
- if (!or) return "disabled";
1100
+ function rr() {
1101
+ if (!$n) return "disabled";
1107
1102
  let e = (/* @__PURE__ */ Error()).stack;
1108
1103
  if (!e) return "unknown";
1109
1104
  let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
@@ -1118,86 +1113,86 @@ function ur() {
1118
1113
  }
1119
1114
  function Q(e, t, n, r) {
1120
1115
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1121
- if (sr.has(i)) return;
1116
+ if (er.has(i)) return;
1122
1117
  let a = Reflect.get(e, t);
1123
- typeof a == "function" && (sr.set(i, a), Reflect.set(e, t, function(...e) {
1124
- if (!or) return a.apply(this, e);
1125
- let i = r?.captureSource ? ur() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1126
- return rr(n.ctxMethods, t, c), i && ir(n, t, i, c), s;
1118
+ typeof a == "function" && (er.set(i, a), Reflect.set(e, t, function(...e) {
1119
+ if (!$n) return a.apply(this, e);
1120
+ let i = r?.captureSource ? rr() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1121
+ return Xn(n.ctxMethods, t, c), i && Zn(n, t, i, c), s;
1127
1122
  }));
1128
1123
  }
1129
- function dr(e, t, n) {
1124
+ function ir(e, t, n) {
1130
1125
  let r = Object.getOwnPropertyDescriptor(e, t);
1131
1126
  if (!r?.set || !r.configurable) return;
1132
1127
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1133
- cr.has(i) || (cr.set(i, r), Object.defineProperty(e, t, {
1128
+ tr.has(i) || (tr.set(i, r), Object.defineProperty(e, t, {
1134
1129
  configurable: !0,
1135
1130
  enumerable: r.enumerable ?? !1,
1136
1131
  get: r.get,
1137
1132
  set(e) {
1138
- if (!or) {
1133
+ if (!$n) {
1139
1134
  r.set.call(this, e);
1140
1135
  return;
1141
1136
  }
1142
1137
  let i = performance.now();
1143
- r.set.call(this, e), rr(n, t, performance.now() - i);
1138
+ r.set.call(this, e), Xn(n, t, performance.now() - i);
1144
1139
  }
1145
1140
  }));
1146
1141
  }
1147
- function fr() {
1142
+ function ar() {
1148
1143
  if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1149
1144
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1150
1145
  if (!e || !t) return;
1151
- let n = nr();
1152
- 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), dr(e, "font", n.ctxProps), dr(e, "filter", n.ctxProps), dr(e, "shadowBlur", n.ctxProps), dr(e, "lineWidth", n.ctxProps), dr(t, "width", n.canvasProps), dr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1146
+ let n = Yn();
1147
+ 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), ir(e, "font", n.ctxProps), ir(e, "filter", n.ctxProps), ir(e, "shadowBlur", n.ctxProps), ir(e, "lineWidth", n.ctxProps), ir(t, "width", n.canvasProps), ir(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1153
1148
  let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
1154
1149
  if (e) {
1155
- console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(ar(e.ctxMethods)), console.log("ctx props"), console.table(ar(e.ctxProps)), console.log("canvas props"), console.table(ar(e.canvasProps));
1150
+ console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Qn(e.ctxMethods)), console.log("ctx props"), console.table(Qn(e.ctxProps)), console.log("canvas props"), console.table(Qn(e.canvasProps));
1156
1151
  for (let t of ["fillText", "measureText"]) {
1157
1152
  let n = e.ctxMethodSources[t];
1158
- n && (console.log(`${t} sources`), console.table(ar(n).slice(0, 20)));
1153
+ n && (console.log(`${t} sources`), console.table(Qn(n).slice(0, 20)));
1159
1154
  }
1160
1155
  console.groupEnd();
1161
1156
  }
1162
1157
  }, window.resetCanvasReport = () => {
1163
- window.__KMAP_CANVAS_PROFILER_METRICS__ = nr();
1158
+ window.__KMAP_CANVAS_PROFILER_METRICS__ = Yn();
1164
1159
  }, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
1165
1160
  }
1166
- function pr() {
1161
+ function or() {
1167
1162
  if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1168
1163
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1169
- sr.forEach((n, r) => {
1164
+ er.forEach((n, r) => {
1170
1165
  let i = r.match(/^(.+):(.+)$/);
1171
1166
  if (!i) return;
1172
1167
  let [, a, o] = i, s = null;
1173
1168
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
1174
- }), sr.clear(), cr.forEach((n, r) => {
1169
+ }), er.clear(), tr.forEach((n, r) => {
1175
1170
  let i = r.match(/^(.+):(.+)$/);
1176
1171
  if (!i) return;
1177
1172
  let [, a, o] = i, s = null;
1178
1173
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
1179
- }), cr.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.");
1174
+ }), tr.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.");
1180
1175
  }
1181
1176
  //#endregion
1182
1177
  //#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
1183
- var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["onUpdate:modelValue"], _r = ["onUpdate:modelValue"], vr = ["value"], yr = { class: "settings-label" }, br = ["onUpdate:modelValue"], xr = ["onUpdate:modelValue"], Sr = ["value"], Cr = { class: "settings-header" }, wr = { class: "header-right" }, Tr = { class: "settings-body" }, Er = /* @__PURE__ */ q(/* @__PURE__ */ u({
1178
+ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["onUpdate:modelValue"], ur = { class: "settings-label" }, dr = ["onUpdate:modelValue"], fr = { class: "settings-header" }, pr = { class: "header-right" }, mr = { class: "settings-body" }, hr = /*#__PURE__*/ W(/* @__PURE__ */ u({
1184
1179
  __name: "ChartSettingsDialog",
1185
1180
  props: { show: { type: Boolean } },
1186
1181
  emits: ["close", "confirm"],
1187
1182
  setup(u, { emit: d }) {
1188
- let f = u, p = d, m = Ee(), h = r(() => G.filter((e) => e.group === "main")), g = r(() => G.filter((e) => e.group === "experimental")), _ = w(!1);
1183
+ let f = u, p = d, m = Ae(), h = r(() => V.filter((e) => e.group === "main")), g = r(() => V.filter((e) => e.group === "experimental")), _ = w(!1);
1189
1184
  function v() {
1190
1185
  try {
1191
- let e = localStorage.getItem(K);
1186
+ let e = localStorage.getItem(H);
1192
1187
  if (e) {
1193
1188
  let t = JSON.parse(e), n = {};
1194
- return G.forEach((e) => {
1189
+ return V.forEach((e) => {
1195
1190
  n[e.key] = t[e.key] ?? e.default;
1196
- }), n.colorPresetSettings = V(t.colorPresetSettings), n;
1191
+ }), n.colorPresetSettings = B(t.colorPresetSettings), n;
1197
1192
  }
1198
1193
  } catch {}
1199
1194
  let e = {};
1200
- return G.forEach((t) => {
1195
+ return V.forEach((t) => {
1201
1196
  e[t.key] = t.default;
1202
1197
  }), e.colorPresetSettings = {}, e;
1203
1198
  }
@@ -1210,7 +1205,7 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1210
1205
  }
1211
1206
  function x() {
1212
1207
  let e = {};
1213
- G.forEach((t) => {
1208
+ V.forEach((t) => {
1214
1209
  e[t.key] = t.default;
1215
1210
  }), e.colorPresetSettings = {}, y.value = e;
1216
1211
  }
@@ -1225,7 +1220,7 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1225
1220
  }, [l(n, { name: "modal" }, {
1226
1221
  default: N(() => [s("div", {
1227
1222
  class: "settings-modal",
1228
- onClick: d[1] ||= F(() => {}, ["stop"])
1223
+ onClick: d[1] ||= I(() => {}, ["stop"])
1229
1224
  }, [
1230
1225
  s("div", { class: "settings-header" }, [d[7] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1), s("div", { class: "header-right" }, [s("button", {
1231
1226
  class: "settings-close",
@@ -1236,23 +1231,27 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1236
1231
  stroke: "currentColor",
1237
1232
  "stroke-width": "2"
1238
1233
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
1239
- s("div", mr, [
1240
- h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (t) => (S(), o("div", {
1241
- key: t.key,
1234
+ s("div", sr, [
1235
+ h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (e) => (S(), o("div", {
1236
+ key: e.key,
1242
1237
  class: "settings-item"
1243
- }, [s("label", hr, [s("span", null, O(t.label), 1), t.type === "boolean" ? P((S(), o("input", {
1238
+ }, [s("label", cr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1244
1239
  key: 0,
1245
1240
  type: "checkbox",
1246
1241
  class: "settings-checkbox",
1247
- "onUpdate:modelValue": (e) => y.value[t.key] = e
1248
- }, null, 8, gr)), [[A, y.value[t.key]]]) : t.type === "select" && t.options ? P((S(), o("select", {
1242
+ "onUpdate:modelValue": (t) => y.value[e.key] = t
1243
+ }, null, 8, lr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(q, {
1249
1244
  key: 1,
1250
- class: "settings-select",
1251
- "onUpdate:modelValue": (e) => y.value[t.key] = e
1252
- }, [(S(!0), o(e, null, T(t.options, (e) => (S(), o("option", {
1253
- key: e.value,
1254
- value: e.value
1255
- }, O(e.label), 9, vr))), 128))], 8, _r)), [[j, y.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0),
1245
+ "model-value": String(y.value[e.key]),
1246
+ options: e.options,
1247
+ size: "sm",
1248
+ "min-width": "100px",
1249
+ "onUpdate:modelValue": (t) => y.value[e.key] = t
1250
+ }, null, 8, [
1251
+ "model-value",
1252
+ "options",
1253
+ "onUpdate:modelValue"
1254
+ ])) : a("", !0)])]))), 128))], 64)) : a("", !0),
1256
1255
  d[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
1257
1256
  s("div", {
1258
1257
  class: "settings-item nav-item",
@@ -1266,22 +1265,26 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1266
1265
  height: "16",
1267
1266
  class: "nav-arrow"
1268
1267
  }, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
1269
- 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, (t) => (S(), o("div", {
1270
- key: t.key,
1268
+ 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", {
1269
+ key: e.key,
1271
1270
  class: "settings-item experimental"
1272
- }, [s("label", yr, [s("span", null, O(t.label), 1), t.type === "boolean" ? P((S(), o("input", {
1271
+ }, [s("label", ur, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1273
1272
  key: 0,
1274
1273
  type: "checkbox",
1275
1274
  class: "settings-checkbox",
1276
- "onUpdate:modelValue": (e) => y.value[t.key] = e
1277
- }, null, 8, br)), [[A, y.value[t.key]]]) : t.type === "select" && t.options ? P((S(), o("select", {
1275
+ "onUpdate:modelValue": (t) => y.value[e.key] = t
1276
+ }, null, 8, dr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(q, {
1278
1277
  key: 1,
1279
- class: "settings-select",
1280
- "onUpdate:modelValue": (e) => y.value[t.key] = e
1281
- }, [(S(!0), o(e, null, T(t.options, (e) => (S(), o("option", {
1282
- key: e.value,
1283
- value: e.value
1284
- }, O(e.label), 9, Sr))), 128))], 8, xr)), [[j, y.value[t.key]]]) : a("", !0)])]))), 128))], 64)) : a("", !0)
1278
+ "model-value": String(y.value[e.key]),
1279
+ options: e.options,
1280
+ size: "sm",
1281
+ "min-width": "100px",
1282
+ "onUpdate:modelValue": (t) => y.value[e.key] = t
1283
+ }, null, 8, [
1284
+ "model-value",
1285
+ "options",
1286
+ "onUpdate:modelValue"
1287
+ ])) : a("", !0)])]))), 128))], 64)) : a("", !0)
1285
1288
  ]),
1286
1289
  s("div", { class: "settings-footer" }, [s("button", {
1287
1290
  class: "settings-btn reset",
@@ -1315,8 +1318,8 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1315
1318
  }, [l(n, { name: "modal" }, {
1316
1319
  default: N(() => [s("div", {
1317
1320
  class: "settings-modal",
1318
- onClick: d[4] ||= F(() => {}, ["stop"])
1319
- }, [s("div", Cr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", wr, [s("button", {
1321
+ onClick: d[4] ||= I(() => {}, ["stop"])
1322
+ }, [s("div", fr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", pr, [s("button", {
1320
1323
  class: "settings-close",
1321
1324
  onClick: d[2] ||= (e) => _.value = !1
1322
1325
  }, [...d[14] ||= [s("svg", {
@@ -1324,7 +1327,7 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1324
1327
  fill: "none",
1325
1328
  stroke: "currentColor",
1326
1329
  "stroke-width": "2"
1327
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", Tr, [l(be, {
1330
+ }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", mr, [l(xe, {
1328
1331
  "color-preset-settings": y.value.colorPresetSettings,
1329
1332
  "onUpdate:colorPresetSettings": d[3] ||= (e) => y.value = {
1330
1333
  ...y.value,
@@ -1336,18 +1339,18 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1336
1339
  _: 1
1337
1340
  })], 8, ["to"]));
1338
1341
  }
1339
- }), [["__scopeId", "data-v-49dd396c"]]), Dr = {
1342
+ }), [["__scopeId", "data-v-7a3fb961"]]), gr = {
1340
1343
  class: "left-toolbar",
1341
1344
  "aria-label": "图表工具栏"
1342
- }, Or = { class: "left-toolbar__group" }, kr = [
1345
+ }, _r = { class: "left-toolbar__group" }, vr = [
1343
1346
  "title",
1344
1347
  "aria-label",
1345
1348
  "onClick"
1346
- ], Ar = ["onClick"], jr = [
1349
+ ], yr = ["onClick"], br = [
1347
1350
  "title",
1348
1351
  "aria-label",
1349
1352
  "onClick"
1350
- ], Mr = { class: "left-toolbar__group" }, Nr = { class: "left-toolbar__group" }, Pr = ["title", "aria-label"], Fr = { class: "left-toolbar__group" }, Ir = /* @__PURE__ */ q(/* @__PURE__ */ u({
1353
+ ], xr = { class: "left-toolbar__group" }, Sr = { class: "left-toolbar__group" }, Cr = ["title", "aria-label"], wr = { class: "left-toolbar__group" }, Tr = /*#__PURE__*/ W(/* @__PURE__ */ u({
1351
1354
  __name: "LeftToolbar",
1352
1355
  props: { isFullscreen: { type: Boolean } },
1353
1356
  emits: [
@@ -1362,96 +1365,96 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1362
1365
  {
1363
1366
  id: "cursor",
1364
1367
  title: "光标",
1365
- icon: on
1368
+ icon: Qt
1366
1369
  },
1367
1370
  {
1368
1371
  id: "lines",
1369
1372
  title: "线条",
1370
- icon: ln,
1373
+ icon: tn,
1371
1374
  children: [
1372
1375
  {
1373
1376
  id: "trend-line",
1374
1377
  title: "线段",
1375
- icon: ln
1378
+ icon: tn
1376
1379
  },
1377
1380
  {
1378
1381
  id: "ray",
1379
1382
  title: "射线",
1380
- icon: fn
1383
+ icon: an
1381
1384
  },
1382
1385
  {
1383
1386
  id: "h-line",
1384
1387
  title: "水平线",
1385
- icon: vn
1388
+ icon: dn
1386
1389
  },
1387
1390
  {
1388
1391
  id: "h-ray",
1389
1392
  title: "水平射线",
1390
- icon: hn
1393
+ icon: cn
1391
1394
  },
1392
1395
  {
1393
1396
  id: "v-line",
1394
1397
  title: "垂直线",
1395
- icon: xn
1398
+ icon: mn
1396
1399
  },
1397
1400
  {
1398
1401
  id: "crosshair-line",
1399
1402
  title: "十字线",
1400
- icon: wn
1403
+ icon: _n
1401
1404
  },
1402
1405
  {
1403
1406
  id: "info-line",
1404
1407
  title: "信息线",
1405
- icon: Dn
1408
+ icon: bn
1406
1409
  }
1407
1410
  ]
1408
1411
  },
1409
1412
  {
1410
1413
  id: "channels",
1411
1414
  title: "通道",
1412
- icon: Gn,
1415
+ icon: Rn,
1413
1416
  children: [
1414
1417
  {
1415
1418
  id: "parallel-channel",
1416
1419
  title: "平行通道",
1417
- icon: Gn
1420
+ icon: Rn
1418
1421
  },
1419
1422
  {
1420
1423
  id: "regression-channel",
1421
1424
  title: "回归趋势",
1422
- icon: Jn
1425
+ icon: Vn
1423
1426
  },
1424
1427
  {
1425
1428
  id: "flat-line",
1426
1429
  title: "平滑顶底",
1427
- icon: Zn
1430
+ icon: Wn
1428
1431
  },
1429
1432
  {
1430
1433
  id: "disjoint-channel",
1431
1434
  title: "不相交通道",
1432
- icon: er
1435
+ icon: qn
1433
1436
  }
1434
1437
  ]
1435
1438
  }
1436
1439
  ], d = c, f = w("cursor"), p = w(null), m = w(!1);
1437
1440
  function h() {
1438
1441
  try {
1439
- let e = localStorage.getItem(K);
1442
+ let e = localStorage.getItem(H);
1440
1443
  if (e) {
1441
1444
  let t = JSON.parse(e), n = { ...t };
1442
- return G.forEach((e) => {
1445
+ return V.forEach((e) => {
1443
1446
  n[e.key] = t[e.key] ?? e.default;
1444
1447
  }), n;
1445
1448
  }
1446
1449
  } catch {}
1447
1450
  let e = {};
1448
- return G.forEach((t) => {
1451
+ return V.forEach((t) => {
1449
1452
  e[t.key] = t.default;
1450
1453
  }), e;
1451
1454
  }
1452
1455
  function _(e) {
1453
1456
  try {
1454
- localStorage.setItem(K, JSON.stringify(e));
1457
+ localStorage.setItem(H, JSON.stringify(e));
1455
1458
  } catch {}
1456
1459
  }
1457
1460
  let v = w(h());
@@ -1483,17 +1486,17 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1483
1486
  }
1484
1487
  r({ getSettings: j });
1485
1488
  function M(e) {
1486
- v.value = { ...e }, _(v.value), lr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
1489
+ v.value = { ...e }, _(v.value), nr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
1487
1490
  }
1488
1491
  function P(e) {
1489
1492
  e.target.closest(".tool-item") || (p.value = null);
1490
1493
  }
1491
1494
  return y(() => {
1492
- document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), lr(!!v.value.enableCanvasProfiler);
1495
+ document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), nr(!!v.value.enableCanvasProfiler);
1493
1496
  }), x(() => {
1494
1497
  document.removeEventListener("click", P, !0);
1495
- }), (r, c) => (S(), o(e, null, [s("nav", Dr, [
1496
- s("div", Or, [(S(), o(e, null, T(u, (t) => s("div", {
1498
+ }), (r, c) => (S(), o(e, null, [s("nav", gr, [
1499
+ s("div", _r, [(S(), o(e, null, T(u, (t) => s("div", {
1497
1500
  key: t.id,
1498
1501
  class: "tool-item"
1499
1502
  }, [s("button", {
@@ -1502,24 +1505,24 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1502
1505
  title: t.title,
1503
1506
  "aria-label": t.title,
1504
1507
  onClick: (e) => C(t),
1505
- onPointerdown: c[0] ||= F(() => {}, ["stop"]),
1506
- onPointermove: c[1] ||= F(() => {}, ["stop"]),
1507
- onPointerup: c[2] ||= F(() => {}, ["stop"])
1508
+ onPointerdown: c[0] ||= I(() => {}, ["stop"]),
1509
+ onPointermove: c[1] ||= I(() => {}, ["stop"]),
1510
+ onPointerup: c[2] ||= I(() => {}, ["stop"])
1508
1511
  }, [(S(), i(E(t.icon), {
1509
1512
  class: "tool-icon",
1510
1513
  "aria-hidden": "true"
1511
1514
  })), t.children && t.children.length ? (S(), o("span", {
1512
1515
  key: 0,
1513
1516
  class: g(["corner-indicator", { open: p.value === t.id }]),
1514
- onClick: F((e) => O(t.id), ["stop"]),
1517
+ onClick: I((e) => O(t.id), ["stop"]),
1515
1518
  "aria-label": "展开子菜单"
1516
- }, null, 10, Ar)) : a("", !0)], 42, kr), l(n, { name: "dropdown" }, {
1519
+ }, null, 10, yr)) : a("", !0)], 42, vr), l(n, { name: "dropdown" }, {
1517
1520
  default: N(() => [p.value === t.id && t.children && t.children.length ? (S(), o("div", {
1518
1521
  key: 0,
1519
1522
  class: "tool-dropdown",
1520
- onPointerdown: c[3] ||= F(() => {}, ["stop"]),
1521
- onPointermove: c[4] ||= F(() => {}, ["stop"]),
1522
- onPointerup: c[5] ||= F(() => {}, ["stop"])
1523
+ onPointerdown: c[3] ||= I(() => {}, ["stop"]),
1524
+ onPointermove: c[4] ||= I(() => {}, ["stop"]),
1525
+ onPointerup: c[5] ||= I(() => {}, ["stop"])
1523
1526
  }, [(S(!0), o(e, null, T(t.children, (e) => (S(), o("button", {
1524
1527
  key: e.id,
1525
1528
  type: "button",
@@ -1530,20 +1533,20 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1530
1533
  }, [(S(), i(E(e.icon), {
1531
1534
  class: "tool-icon",
1532
1535
  "aria-hidden": "true"
1533
- }))], 10, jr))), 128))], 32)) : a("", !0)]),
1536
+ }))], 10, br))), 128))], 32)) : a("", !0)]),
1534
1537
  _: 2
1535
1538
  }, 1024)])), 64))]),
1536
1539
  c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1537
- s("div", Mr, [s("button", {
1540
+ s("div", xr, [s("button", {
1538
1541
  type: "button",
1539
1542
  class: "left-toolbar__button",
1540
1543
  title: "放大",
1541
1544
  "aria-label": "放大",
1542
1545
  onClick: c[6] ||= (e) => r.$emit("zoomIn"),
1543
- onPointerdown: c[7] ||= F(() => {}, ["stop"]),
1544
- onPointermove: c[8] ||= F(() => {}, ["stop"]),
1545
- onPointerup: c[9] ||= F(() => {}, ["stop"])
1546
- }, [l(k(An), {
1546
+ onPointerdown: c[7] ||= I(() => {}, ["stop"]),
1547
+ onPointermove: c[8] ||= I(() => {}, ["stop"]),
1548
+ onPointerup: c[9] ||= I(() => {}, ["stop"])
1549
+ }, [l(k(Cn), {
1547
1550
  class: "tool-icon",
1548
1551
  "aria-hidden": "true"
1549
1552
  })], 32), s("button", {
@@ -1552,62 +1555,452 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1552
1555
  title: "缩小",
1553
1556
  "aria-label": "缩小",
1554
1557
  onClick: c[10] ||= (e) => r.$emit("zoomOut"),
1555
- onPointerdown: c[11] ||= F(() => {}, ["stop"]),
1556
- onPointermove: c[12] ||= F(() => {}, ["stop"]),
1557
- onPointerup: c[13] ||= F(() => {}, ["stop"])
1558
- }, [l(k(Nn), {
1558
+ onPointerdown: c[11] ||= I(() => {}, ["stop"]),
1559
+ onPointermove: c[12] ||= I(() => {}, ["stop"]),
1560
+ onPointerup: c[13] ||= I(() => {}, ["stop"])
1561
+ }, [l(k(En), {
1559
1562
  class: "tool-icon",
1560
1563
  "aria-hidden": "true"
1561
1564
  })], 32)]),
1562
1565
  c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1563
- s("div", Nr, [s("button", {
1566
+ s("div", Sr, [s("button", {
1564
1567
  type: "button",
1565
1568
  class: "left-toolbar__button",
1566
1569
  title: t.isFullscreen ? "退出全屏" : "全屏显示",
1567
1570
  "aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
1568
1571
  onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
1569
- onPointerdown: c[15] ||= F(() => {}, ["stop"]),
1570
- onPointermove: c[16] ||= F(() => {}, ["stop"]),
1571
- onPointerup: c[17] ||= F(() => {}, ["stop"])
1572
- }, [t.isFullscreen ? (S(), i(k(zn), {
1572
+ onPointerdown: c[15] ||= I(() => {}, ["stop"]),
1573
+ onPointermove: c[16] ||= I(() => {}, ["stop"]),
1574
+ onPointerup: c[17] ||= I(() => {}, ["stop"])
1575
+ }, [t.isFullscreen ? (S(), i(k(Mn), {
1573
1576
  key: 0,
1574
1577
  class: "tool-icon",
1575
1578
  "aria-hidden": "true"
1576
- })) : (S(), i(k(In), {
1579
+ })) : (S(), i(k(kn), {
1577
1580
  key: 1,
1578
1581
  class: "tool-icon",
1579
1582
  "aria-hidden": "true"
1580
- }))], 40, Pr)]),
1583
+ }))], 40, Cr)]),
1581
1584
  c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1582
- s("div", Fr, [s("button", {
1585
+ s("div", wr, [s("button", {
1583
1586
  type: "button",
1584
1587
  class: "left-toolbar__button",
1585
1588
  title: "设置",
1586
1589
  "aria-label": "设置",
1587
1590
  onClick: A,
1588
- onPointerdown: c[18] ||= F(() => {}, ["stop"]),
1589
- onPointermove: c[19] ||= F(() => {}, ["stop"]),
1590
- onPointerup: c[20] ||= F(() => {}, ["stop"])
1591
- }, [l(k(Hn), {
1591
+ onPointerdown: c[18] ||= I(() => {}, ["stop"]),
1592
+ onPointermove: c[19] ||= I(() => {}, ["stop"]),
1593
+ onPointerup: c[20] ||= I(() => {}, ["stop"])
1594
+ }, [l(k(Fn), {
1592
1595
  class: "tool-icon",
1593
1596
  "aria-hidden": "true"
1594
1597
  })], 32)])
1595
- ]), l(Er, {
1598
+ ]), l(hr, {
1596
1599
  show: m.value,
1597
1600
  onClose: c[21] ||= (e) => m.value = !1,
1598
1601
  onConfirm: M
1599
1602
  }, null, 8, ["show"])], 64));
1600
1603
  }
1601
- }), [["__scopeId", "data-v-d0932502"]]), Lr = ["data-theme"], Rr = {
1604
+ }), [["__scopeId", "data-v-66411b58"]]), Er = /* @__PURE__ */ u({
1605
+ __name: "KLineLevelDropdown",
1606
+ props: { modelValue: {} },
1607
+ emits: ["update:modelValue"],
1608
+ setup(e, { emit: t }) {
1609
+ let n = [
1610
+ {
1611
+ label: "1min",
1612
+ value: "1min"
1613
+ },
1614
+ {
1615
+ label: "5min",
1616
+ value: "5min"
1617
+ },
1618
+ {
1619
+ label: "15min",
1620
+ value: "15min"
1621
+ },
1622
+ {
1623
+ label: "30min",
1624
+ value: "30min"
1625
+ },
1626
+ {
1627
+ label: "1小时",
1628
+ value: "60min"
1629
+ },
1630
+ {
1631
+ label: "1周",
1632
+ value: "weekly"
1633
+ },
1634
+ {
1635
+ label: "1月",
1636
+ value: "monthly"
1637
+ },
1638
+ {
1639
+ label: "3月",
1640
+ value: "quarterly"
1641
+ },
1642
+ {
1643
+ label: "12月",
1644
+ value: "yearly"
1645
+ }
1646
+ ], r = t;
1647
+ return (t, a) => (S(), i(q, {
1648
+ "model-value": e.modelValue,
1649
+ options: n,
1650
+ label: "级别",
1651
+ title: "K线级别",
1652
+ size: "md",
1653
+ "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
1654
+ }, null, 8, ["model-value"]));
1655
+ }
1656
+ }), Dr = {
1657
+ viewBox: "0 0 24 24",
1658
+ width: "1.2em",
1659
+ height: "1.2em"
1660
+ };
1661
+ function Or(e, t) {
1662
+ return S(), o("svg", Dr, [...t[0] ||= [s("path", {
1663
+ fill: "none",
1664
+ stroke: "currentColor",
1665
+ "stroke-linecap": "round",
1666
+ "stroke-linejoin": "round",
1667
+ "stroke-width": "2",
1668
+ 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"
1669
+ }, null, -1)]]);
1670
+ }
1671
+ var kr = m({
1672
+ name: "tabler-alert-triangle",
1673
+ render: Or
1674
+ }), Ar = ["title", "aria-expanded"], jr = { class: "symbol-chip__code" }, Mr = {
1675
+ key: 0,
1676
+ class: "symbol-chip__spinner",
1677
+ "aria-hidden": "true"
1678
+ }, Nr = {
1679
+ key: 0,
1680
+ class: "symbol-popover",
1681
+ role: "dialog",
1682
+ "aria-label": "切换合约"
1683
+ }, Pr = { class: "symbol-search" }, Fr = {
1684
+ class: "symbol-list",
1685
+ role: "listbox",
1686
+ "aria-label": "商品列表"
1687
+ }, Ir = {
1688
+ key: 0,
1689
+ class: "symbol-list__empty"
1690
+ }, Lr = {
1691
+ width: "32",
1692
+ height: "32",
1693
+ viewBox: "0 0 32 32",
1694
+ fill: "none",
1695
+ style: {
1696
+ "margin-bottom": "8px",
1697
+ opacity: "0.35"
1698
+ }
1699
+ }, Rr = ["aria-selected", "onClick"], zr = { class: "symbol-list__left" }, Br = { class: "symbol-list__code" }, Vr = { class: "symbol-list__desc" }, Hr = { class: "symbol-list__exchange" }, Ur = /*#__PURE__*/ W(/* @__PURE__ */ u({
1700
+ __name: "SymbolSelector",
1701
+ props: {
1702
+ symbol: {},
1703
+ symbols: {},
1704
+ loading: { type: Boolean },
1705
+ error: { type: Boolean }
1706
+ },
1707
+ emits: ["change"],
1708
+ setup(t, { emit: c }) {
1709
+ let u = t, d = c, f = w(!1), p = w(""), m = w(null), _ = w(null), b = r(() => {
1710
+ let e = p.value.trim().toLowerCase();
1711
+ return e ? u.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : u.symbols;
1712
+ });
1713
+ function x() {
1714
+ f.value = !f.value, f.value && h(() => m.value?.focus());
1715
+ }
1716
+ function C() {
1717
+ p.value = "", m.value?.focus();
1718
+ }
1719
+ function E() {}
1720
+ function D(e) {
1721
+ d("change", e), f.value = !1, p.value = "";
1722
+ }
1723
+ function A(e) {
1724
+ _.value && !_.value.contains(e.target) && (f.value = !1);
1725
+ }
1726
+ return y(() => document.addEventListener("mousedown", A)), v(() => document.removeEventListener("mousedown", A)), M(() => u.symbol, () => {
1727
+ f.value = !1, p.value = "";
1728
+ }), (r, c) => (S(), o("div", {
1729
+ ref_key: "chipWrapRef",
1730
+ ref: _,
1731
+ class: "symbol-chip-wrap"
1732
+ }, [s("button", {
1733
+ type: "button",
1734
+ class: g(["symbol-chip", { "is-open": f.value }]),
1735
+ title: t.symbol,
1736
+ "aria-expanded": f.value,
1737
+ "aria-haspopup": "dialog",
1738
+ onClick: x
1739
+ }, [s("span", jr, O(t.symbol), 1), t.loading ? (S(), o("span", Mr)) : t.error ? (S(), i(k(kr), {
1740
+ key: 1,
1741
+ class: "symbol-chip__warn",
1742
+ "aria-hidden": "true"
1743
+ })) : a("", !0)], 10, Ar), l(n, { name: "symbol-popover" }, {
1744
+ default: N(() => [f.value ? (S(), o("div", Nr, [s("div", Pr, [
1745
+ c[2] ||= s("span", {
1746
+ class: "symbol-search__icon",
1747
+ "aria-hidden": "true"
1748
+ }, [s("svg", {
1749
+ width: "14",
1750
+ height: "14",
1751
+ viewBox: "0 0 16 16",
1752
+ fill: "none"
1753
+ }, [s("circle", {
1754
+ cx: "6.5",
1755
+ cy: "6.5",
1756
+ r: "5",
1757
+ stroke: "currentColor",
1758
+ "stroke-width": "1.6"
1759
+ }), s("line", {
1760
+ x1: "10.5",
1761
+ y1: "10.5",
1762
+ x2: "14.5",
1763
+ y2: "14.5",
1764
+ stroke: "currentColor",
1765
+ "stroke-width": "1.6",
1766
+ "stroke-linecap": "round"
1767
+ })])], -1),
1768
+ P(s("input", {
1769
+ ref_key: "searchInputRef",
1770
+ ref: m,
1771
+ "onUpdate:modelValue": c[0] ||= (e) => p.value = e,
1772
+ class: "symbol-search__input",
1773
+ type: "text",
1774
+ placeholder: "搜索代码或名称…",
1775
+ autocomplete: "off",
1776
+ spellcheck: "false",
1777
+ "aria-label": "搜索商品",
1778
+ onInput: E
1779
+ }, null, 544), [[j, p.value]]),
1780
+ p.value ? (S(), o("button", {
1781
+ key: 0,
1782
+ type: "button",
1783
+ class: "symbol-search__clear",
1784
+ "aria-label": "清空搜索",
1785
+ onClick: C
1786
+ }, [...c[1] ||= [s("svg", {
1787
+ class: "delete-icon",
1788
+ viewBox: "0 0 24 24",
1789
+ fill: "none",
1790
+ stroke: "currentColor",
1791
+ "stroke-width": "2",
1792
+ "stroke-linecap": "round",
1793
+ "stroke-linejoin": "round",
1794
+ "aria-hidden": "true"
1795
+ }, [
1796
+ s("path", { d: "M3 6h18" }),
1797
+ s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
1798
+ s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
1799
+ ], -1)]])) : a("", !0)
1800
+ ]), s("div", Fr, [b.value.length === 0 ? (S(), o("div", Ir, [(S(), o("svg", Lr, [...c[3] ||= [s("circle", {
1801
+ cx: "13",
1802
+ cy: "13",
1803
+ r: "10",
1804
+ stroke: "currentColor",
1805
+ "stroke-width": "2"
1806
+ }, null, -1), s("line", {
1807
+ x1: "21",
1808
+ y1: "21",
1809
+ x2: "29",
1810
+ y2: "29",
1811
+ stroke: "currentColor",
1812
+ "stroke-width": "2",
1813
+ "stroke-linecap": "round"
1814
+ }, null, -1)]])), c[4] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (S(!0), o(e, null, T(b.value, (e) => (S(), o("button", {
1815
+ key: e.code,
1816
+ type: "button",
1817
+ class: g(["symbol-list__item", { "is-active": e.code === t.symbol }]),
1818
+ role: "option",
1819
+ "aria-selected": e.code === t.symbol,
1820
+ onClick: (t) => D(e)
1821
+ }, [s("span", zr, [s("span", Br, O(e.code), 1), s("span", Vr, O(e.description), 1)]), s("span", Hr, O(e.exchange), 1)], 10, Rr))), 128))])])) : a("", !0)]),
1822
+ _: 1
1823
+ })], 512));
1824
+ }
1825
+ }), [["__scopeId", "data-v-e22f59e1"]]), Wr = { class: "top-toolbar" }, Gr = /*#__PURE__*/ W(/* @__PURE__ */ u({
1826
+ __name: "TopToolbar",
1827
+ props: {
1828
+ symbol: {},
1829
+ kLineLevel: {},
1830
+ symbols: {},
1831
+ symbolLoading: { type: Boolean },
1832
+ symbolError: { type: Boolean }
1833
+ },
1834
+ emits: [
1835
+ "addOverlaySymbol",
1836
+ "kLineLevelChange",
1837
+ "toggleIndicator",
1838
+ "symbolChange"
1839
+ ],
1840
+ setup(e, { emit: t }) {
1841
+ let n = e, c = t, u = [
1842
+ {
1843
+ code: "AAPL",
1844
+ description: "Apple Inc.",
1845
+ exchange: "NASDAQ",
1846
+ source: "baostock"
1847
+ },
1848
+ {
1849
+ code: "TSLA",
1850
+ description: "Tesla, Inc.",
1851
+ exchange: "NASDAQ",
1852
+ source: "baostock"
1853
+ },
1854
+ {
1855
+ code: "GOOGL",
1856
+ description: "Alphabet Inc.",
1857
+ exchange: "NASDAQ",
1858
+ source: "baostock"
1859
+ },
1860
+ {
1861
+ code: "MSFT",
1862
+ description: "Microsoft Corporation",
1863
+ exchange: "NASDAQ",
1864
+ source: "baostock"
1865
+ },
1866
+ {
1867
+ code: "AMZN",
1868
+ description: "Amazon.com, Inc.",
1869
+ exchange: "NASDAQ",
1870
+ source: "baostock"
1871
+ },
1872
+ {
1873
+ code: "NVDA",
1874
+ description: "NVIDIA Corporation",
1875
+ exchange: "NASDAQ",
1876
+ source: "baostock"
1877
+ },
1878
+ {
1879
+ code: "META",
1880
+ description: "Meta Platforms, Inc.",
1881
+ exchange: "NASDAQ",
1882
+ source: "baostock"
1883
+ },
1884
+ {
1885
+ code: "BRK.B",
1886
+ description: "Berkshire Hathaway Inc.",
1887
+ exchange: "NYSE",
1888
+ source: "baostock"
1889
+ },
1890
+ {
1891
+ code: "JPM",
1892
+ description: "JPMorgan Chase & Co.",
1893
+ exchange: "NYSE",
1894
+ source: "baostock"
1895
+ },
1896
+ {
1897
+ code: "V",
1898
+ description: "Visa Inc.",
1899
+ exchange: "NYSE",
1900
+ source: "baostock"
1901
+ },
1902
+ {
1903
+ code: "BTCUSDT",
1904
+ description: "Bitcoin / Tether",
1905
+ exchange: "BINANCE",
1906
+ source: "baostock"
1907
+ },
1908
+ {
1909
+ code: "ETHUSDT",
1910
+ description: "Ethereum / Tether",
1911
+ exchange: "BINANCE",
1912
+ source: "baostock"
1913
+ },
1914
+ {
1915
+ code: "sh.601360",
1916
+ description: "三六零",
1917
+ exchange: "SSE",
1918
+ source: "baostock"
1919
+ },
1920
+ {
1921
+ code: "sh.600519",
1922
+ description: "贵州茅台",
1923
+ exchange: "SSE",
1924
+ source: "baostock"
1925
+ },
1926
+ {
1927
+ code: "000858",
1928
+ description: "五 粮 液",
1929
+ exchange: "SZSE",
1930
+ source: "baostock"
1931
+ },
1932
+ {
1933
+ code: "000001",
1934
+ description: "平安银行",
1935
+ exchange: "SZSE",
1936
+ source: "baostock"
1937
+ },
1938
+ {
1939
+ code: "MOCK-100",
1940
+ description: "Mock 100 条",
1941
+ exchange: "MOCK",
1942
+ source: "mock-100"
1943
+ },
1944
+ {
1945
+ code: "MOCK-10000",
1946
+ description: "Mock 10000 条",
1947
+ exchange: "MOCK",
1948
+ source: "mock-10000"
1949
+ }
1950
+ ], d = r(() => n.symbol?.trim() ?? ""), f = r(() => n.symbols && n.symbols.length ? n.symbols : u);
1951
+ function p(e) {
1952
+ c("symbolChange", e);
1953
+ }
1954
+ return (t, n) => (S(), o("div", Wr, [
1955
+ d.value ? (S(), i(Ur, {
1956
+ key: 0,
1957
+ symbol: d.value,
1958
+ symbols: f.value,
1959
+ loading: e.symbolLoading,
1960
+ error: e.symbolError,
1961
+ onChange: p
1962
+ }, null, 8, [
1963
+ "symbol",
1964
+ "symbols",
1965
+ "loading",
1966
+ "error"
1967
+ ])) : a("", !0),
1968
+ s("button", {
1969
+ type: "button",
1970
+ class: "overlay-symbol-button",
1971
+ title: "添加比较商品",
1972
+ "aria-label": "添加比较商品",
1973
+ onClick: n[0] ||= (e) => c("addOverlaySymbol")
1974
+ }, [...n[3] ||= [s("span", {
1975
+ class: "overlay-symbol-button__icon",
1976
+ "aria-hidden": "true"
1977
+ }, "+", -1), s("span", { class: "overlay-symbol-button__text" }, "添加比较商品", -1)]]),
1978
+ l(Er, {
1979
+ "model-value": e.kLineLevel,
1980
+ "onUpdate:modelValue": n[1] ||= (e) => c("kLineLevelChange", e)
1981
+ }, null, 8, ["model-value"]),
1982
+ s("button", {
1983
+ type: "button",
1984
+ class: "indicator-button",
1985
+ title: "指标",
1986
+ "aria-label": "指标",
1987
+ onClick: n[2] ||= (e) => c("toggleIndicator")
1988
+ }, [...n[4] ||= [s("span", {
1989
+ class: "indicator-button__icon",
1990
+ "aria-hidden": "true"
1991
+ }, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
1992
+ ]));
1993
+ }
1994
+ }), [["__scopeId", "data-v-52799f85"]]), Kr = ["data-theme"], qr = {
1602
1995
  class: "pane-separator-layer",
1603
1996
  "aria-hidden": "true"
1604
- }, zr = {
1997
+ }, Jr = {
1605
1998
  class: "canvas-layer",
1606
1999
  ref: "canvasLayerRef"
1607
- }, Br = {
2000
+ }, Yr = {
1608
2001
  class: "x-axis-canvas",
1609
2002
  ref: "xAxisCanvasRef"
1610
- }, Vr = 4, Hr = /* @__PURE__ */ q(/* @__PURE__ */ u({
2003
+ }, Xr = 4, Zr = /*#__PURE__*/ W(/* @__PURE__ */ u({
1611
2004
  __name: "KLineChart",
1612
2005
  props: {
1613
2006
  semanticConfig: {},
@@ -1628,93 +2021,92 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1628
2021
  emits: [
1629
2022
  "zoomLevelChange",
1630
2023
  "toggleFullscreen",
1631
- "themeChange"
2024
+ "themeChange",
2025
+ "addOverlaySymbol",
2026
+ "kLineLevelChange"
1632
2027
  ],
1633
2028
  setup(n, { expose: c, emit: u }) {
1634
- let d = n, f = u, p = w(null), m = w(null), v = w(null), b = w(null), C = w(null);
1635
- Te(v);
1636
- let E = D(null), O = D(null), k = w(0), A = w(0), j = w(1), N = w(d.initialZoomLevel ?? 1), P = w(0), F = w(1), I = w(0), L = w({}), R = w(null), z = w([]), V = N.value;
1637
- P.value = ue(V, {
2029
+ let d = n, f = u, p = w(d.semanticConfig.data.period), m = w("选择商品"), v = w(!1), b = w(!1);
2030
+ function C(e) {
2031
+ p.value = e, f("kLineLevelChange", e);
2032
+ }
2033
+ function E(e) {
2034
+ v.value = !0, b.value = !1, m.value = e.code, F.value?.setSymbols([{
2035
+ symbol: e.code,
2036
+ exchange: e.exchange,
2037
+ period: p.value,
2038
+ source: e.source,
2039
+ startDate: d.semanticConfig.data.startDate,
2040
+ endDate: d.semanticConfig.data.endDate,
2041
+ adjust: d.semanticConfig.data.adjust
2042
+ }]);
2043
+ }
2044
+ let O = w(null), k = w(null), A = w(null), j = w(null), N = w(null), P = w(null);
2045
+ ke(A);
2046
+ let F = D(null), I = D(null), ee = w(0), L = w(0), R = w(1), z = w(d.initialZoomLevel ?? 1), B = w(0), oe = w(1), ce = w(0), le = w({}), V = w(null), H = w([]), he = z.value;
2047
+ B.value = fe(he, {
1638
2048
  minKWidth: d.minKWidth,
1639
2049
  maxKWidth: d.maxKWidth,
1640
2050
  zoomLevelCount: d.zoomLevels,
1641
- dpr: j.value
1642
- }), F.value = le(P.value, j.value);
1643
- let U = w("light"), oe = w({}), se = r(() => {
1644
- let e = oe.value.isAsiaMarket ?? !1, t = te(U.value, e);
2051
+ dpr: R.value
2052
+ }), oe.value = de(B.value, R.value);
2053
+ let ge = w("light"), _e = w({}), ve = r(() => {
2054
+ let e = _e.value.isAsiaMarket ?? !1, t = re(ge.value, e);
1645
2055
  return {
1646
2056
  upColor: t.candleUpBody,
1647
2057
  downColor: t.candleDownBody
1648
2058
  };
1649
- }), W = r(() => {
1650
- let e = U.value === "dark" ? B : ee, t = oe.value.colorPresetSettings?.[U.value];
1651
- return t && Object.keys(t).length > 0 ? H({
2059
+ }), ye = r(() => {
2060
+ let e = ge.value === "dark" ? te : ne, t = _e.value.colorPresetSettings?.[ge.value];
2061
+ return t && Object.keys(t).length > 0 ? ie({
1652
2062
  ...e,
1653
2063
  colors: {
1654
2064
  ...e.colors,
1655
2065
  ...t
1656
2066
  }
1657
- }) : H(e);
1658
- }), G = null;
1659
- function K(e) {
1660
- E.value?.setTheme(e.matches ? "dark" : "light");
2067
+ }) : ie(e);
2068
+ }), U = null;
2069
+ function be(e) {
2070
+ F.value?.setTheme(e.matches ? "dark" : "light");
1661
2071
  }
1662
- function pe(e, t) {
2072
+ function W(e, t) {
1663
2073
  if (!(!e || !t)) if (t === "auto") {
1664
2074
  let t = window.matchMedia("(prefers-color-scheme: dark)");
1665
- e.setTheme(t.matches ? "dark" : "light"), G !== t && (G?.removeEventListener("change", K), G = t, t.addEventListener("change", K));
1666
- } else G?.removeEventListener("change", K), G = null, e.setTheme(t);
1667
- }
1668
- function me() {}
1669
- function he(e) {
1670
- if (oe.value = e, pe(E.value, e.theme), E.value?.updateSettingsFacade(e), e.performanceTest10kKlines) {
1671
- let e = ge();
1672
- console.time("updateData-10k"), E.value?.updateData(e), console.timeEnd("updateData-10k"), k.value = e.length, A.value++;
1673
- } else O.value && E.value?.getData()?.length === 1e4 && O.value.applyConfig(d.semanticConfig);
1674
- }
1675
- function ge() {
1676
- let e = [], t = (/* @__PURE__ */ new Date("2020-01-01")).getTime(), n = 3e3;
1677
- for (let r = 0; r < 1e4; r++) {
1678
- let i = t + r * 864e5, a = (Math.random() - .5) * 2 * .02 + 1e-4, o = n, s = o * (1 + a), c = Math.max(o, s) * (1 + Math.random() * .01), l = Math.min(o, s) * (1 - Math.random() * .01), u = Math.floor(1e6 + Math.random() * 5e6);
1679
- e.push({
1680
- timestamp: i,
1681
- open: parseFloat(o.toFixed(2)),
1682
- high: parseFloat(c.toFixed(2)),
1683
- low: parseFloat(l.toFixed(2)),
1684
- close: parseFloat(s.toFixed(2)),
1685
- volume: u
1686
- }), n = s;
1687
- }
1688
- return e;
2075
+ e.setTheme(t.matches ? "dark" : "light"), U !== t && (U?.removeEventListener("change", be), U = t, t.addEventListener("change", be));
2076
+ } else U?.removeEventListener("change", be), U = null, e.setTheme(t);
1689
2077
  }
1690
- function _e(e, t, n) {
2078
+ function xe() {}
2079
+ function Se(e) {
2080
+ _e.value = e, W(F.value, e.theme), F.value?.updateSettingsFacade(e), F.value?.setDataFetcher(d.dataFetcher), I.value && d.semanticConfig && I.value.applyConfig(d.semanticConfig);
2081
+ }
2082
+ function Ce(e, t, n) {
1691
2083
  let r = e.getBoundingClientRect();
1692
2084
  return {
1693
2085
  width: Math.max(t, Math.round(r.width)),
1694
2086
  height: Math.max(n, Math.round(r.height))
1695
2087
  };
1696
2088
  }
1697
- function ve(e) {
2089
+ function we(e) {
1698
2090
  e && h(() => {
1699
2091
  if (!e.isConnected) return;
1700
- let t = _e(e, 180, 80);
1701
- E.value?.setTooltipSize(t);
2092
+ let t = Ce(e, 180, 80);
2093
+ F.value?.setTooltipSize(t);
1702
2094
  });
1703
2095
  }
1704
- function ye(e) {
2096
+ function Te(e) {
1705
2097
  e && h(() => {
1706
- e.isConnected && (Oe.value = _e(e, 120, 60));
2098
+ e.isConnected && (Me.value = Ce(e, 120, 60));
1707
2099
  });
1708
2100
  }
1709
- let q = w({
2101
+ let G = w({
1710
2102
  x: 0,
1711
2103
  y: 0
1712
- }), be = w(!1), xe = null;
1713
- function Se() {
1714
- xe = null;
2104
+ }), K = w(!1), Ee = null;
2105
+ function q() {
2106
+ Ee = null;
1715
2107
  }
1716
- function Ce(e) {
1717
- return xe ||= e.getBoundingClientRect(), xe;
2108
+ function De(e) {
2109
+ return Ee ||= e.getBoundingClientRect(), Ee;
1718
2110
  }
1719
2111
  let J = D({
1720
2112
  crosshairPos: null,
@@ -1734,14 +2126,14 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1734
2126
  isHoveringPaneBoundary: !1,
1735
2127
  hoveredPaneBoundaryId: null,
1736
2128
  isHoveringRightAxis: !1
1737
- }), Y = D(null), Ee = r(() => {
1738
- let e = R.value;
1739
- return e ? z.value.find((t) => t.id === e) ?? null : null;
1740
- }), De = w([]), Oe = w({
2129
+ }), Y = D(null), Ae = r(() => {
2130
+ let e = V.value;
2131
+ return e ? H.value.find((t) => t.id === e) ?? null : null;
2132
+ }), je = w([]), Me = w({
1741
2133
  width: 220,
1742
2134
  height: 120
1743
- }), ke = r(() => {
1744
- let e = p.value, t = m.value;
2135
+ }), Ne = r(() => {
2136
+ let e = O.value, t = k.value;
1745
2137
  return !e || !t ? {
1746
2138
  x: 0,
1747
2139
  y: 0
@@ -1749,83 +2141,86 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1749
2141
  x: e.offsetLeft,
1750
2142
  y: e.offsetTop
1751
2143
  };
1752
- }), Ae = r(() => J.value.hoveredMarkerData), je = r(() => J.value.hoveredCustomMarker), Me = r(() => J.value.isDragging), Ne = r(() => J.value.isResizingPaneBoundary), Pe = r(() => J.value.isHoveringPaneBoundary), Fe = r(() => J.value.hoveredPaneBoundaryId), Ie = r(() => J.value.isHoveringRightAxis), Le = r(() => J.value.hoveredIndex);
2144
+ }), Pe = r(() => J.value.hoveredMarkerData), Fe = r(() => J.value.hoveredCustomMarker), Ie = r(() => J.value.isDragging), Le = r(() => J.value.isResizingPaneBoundary), Re = r(() => J.value.isHoveringPaneBoundary), ze = r(() => J.value.hoveredPaneBoundaryId), Be = r(() => J.value.isHoveringRightAxis), Ve = r(() => J.value.hoveredIndex);
1753
2145
  r(() => J.value.crosshairIndex);
1754
- let Re = r(() => Me.value ? "grabbing" : Ne.value || Pe.value ? "ns-resize" : Le.value === null ? "crosshair" : "pointer"), ze = r(() => {
2146
+ let He = r(() => Ie.value ? "grabbing" : Le.value || Re.value ? "ns-resize" : Ve.value === null ? "crosshair" : "pointer"), Ue = r(() => {
1755
2147
  let e = J.value.hoveredIndex;
1756
2148
  if (typeof e != "number") return null;
1757
- A.value;
1758
- let t = E.value?.getData();
2149
+ L.value;
2150
+ let t = F.value?.getData();
1759
2151
  return t && e >= 0 && e < t.length ? t[e] : null;
1760
- }), Be = r(() => J.value.hoveredIndex), Ve = r(() => J.value.tooltipPos), He = r(() => ({
1761
- x: Ve.value.x + ke.value.x,
1762
- y: Ve.value.y + ke.value.y
1763
- })), Ue = r(() => ({
1764
- left: `${He.value.x}px`,
1765
- top: `${He.value.y}px`
1766
- })), We = r(() => ({
1767
- x: q.value.x + ke.value.x,
1768
- y: q.value.y + ke.value.y
1769
- })), Ge = r(() => ({
1770
- left: `${We.value.x}px`,
1771
- top: `${We.value.y}px`
1772
- })), Ke = r(() => J.value.tooltipAnchorPlacement), qe = r(() => {
1773
- let e = E.value?.viewport.peek(), t = p.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
1774
- return q.value.x + 12 + Oe.value.width + 12 > n ? "left-bottom" : "right-bottom";
1775
- }), Je = r(() => (A.value, E.value?.getData() ?? []));
1776
- function Ye(e) {
2152
+ }), We = r(() => J.value.hoveredIndex), Ge = r(() => J.value.tooltipPos), Ke = r(() => ({
2153
+ x: Ge.value.x + Ne.value.x,
2154
+ y: Ge.value.y + Ne.value.y
2155
+ })), qe = r(() => ({
2156
+ left: `${Ke.value.x}px`,
2157
+ top: `${Ke.value.y}px`
2158
+ })), Je = r(() => ({
2159
+ x: G.value.x + Ne.value.x,
2160
+ y: G.value.y + Ne.value.y
2161
+ })), Ye = r(() => ({
2162
+ left: `${Je.value.x}px`,
2163
+ top: `${Je.value.y}px`
2164
+ })), Xe = r(() => J.value.tooltipAnchorPlacement), Ze = r(() => {
2165
+ let e = F.value?.viewport.peek(), t = O.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
2166
+ return G.value.x + 12 + Me.value.width + 12 > n ? "left-bottom" : "right-bottom";
2167
+ }), Qe = r(() => (L.value, F.value?.getData() ?? []));
2168
+ function $e(e) {
1777
2169
  Y.value?.setTool(e);
1778
2170
  }
1779
- function Xe(e) {
1780
- let t = Ee.value;
1781
- !t || !Y.value || Y.value.updateDrawingStyle(t.id, e);
2171
+ function et() {
2172
+ P.value?.toggleMenu();
1782
2173
  }
1783
- function Ze() {
1784
- let e = Ee.value;
1785
- !e || !Y.value || (Y.value.removeDrawing(e.id), R.value = null, z.value = Y.value.getDrawings());
2174
+ function tt(e) {
2175
+ let t = Ae.value;
2176
+ !t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), H.value = Y.value.getDrawings());
1786
2177
  }
1787
- function Qe(e) {
1788
- E.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
2178
+ function nt() {
2179
+ let e = Ae.value;
2180
+ !e || !Y.value || (Y.value.removeDrawing(e.id), V.value = null, H.value = Y.value.getDrawings());
1789
2181
  }
1790
- function $e(e) {
1791
- let t = p.value;
2182
+ function rt(e) {
2183
+ F.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (H.value = Y.value.getDrawings(), !0) : !1 });
2184
+ }
2185
+ function it(e) {
2186
+ let t = O.value;
1792
2187
  if (t) {
1793
- let n = Ce(t);
1794
- q.value = {
2188
+ let n = De(t);
2189
+ G.value = {
1795
2190
  x: e.clientX - n.left,
1796
2191
  y: e.clientY - n.top
1797
2192
  };
1798
2193
  }
1799
- E.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
2194
+ F.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (H.value = Y.value.getDrawings(), !0) : !1 });
1800
2195
  }
1801
- function et(e) {
1802
- E.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
2196
+ function at(e) {
2197
+ F.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (H.value = Y.value.getDrawings(), !0) : !1 });
1803
2198
  }
1804
- function tt(e) {
1805
- E.value?.handlePointerEvent(e);
2199
+ function ot(e) {
2200
+ F.value?.handlePointerEvent(e);
1806
2201
  }
1807
- function nt(e) {
1808
- E.value?.handlePointerEvent(e);
2202
+ function st(e) {
2203
+ F.value?.handlePointerEvent(e);
1809
2204
  }
1810
- function rt(e) {
1811
- E.value?.handlePointerEvent(e);
2205
+ function ct(e) {
2206
+ F.value?.handlePointerEvent(e);
1812
2207
  }
1813
- function it(e) {
1814
- E.value?.handlePointerEvent(e);
2208
+ function lt(e) {
2209
+ F.value?.handlePointerEvent(e);
1815
2210
  }
1816
- function at(e) {
1817
- E.value?.handlePointerEvent(e);
2211
+ function ut(e) {
2212
+ F.value?.handlePointerEvent(e);
1818
2213
  }
1819
- function ot() {
1820
- E.value?.handleScrollEvent();
2214
+ function dt() {
2215
+ F.value?.handleScrollEvent();
1821
2216
  }
1822
- let st = w([]), ct = r(() => {
2217
+ let ft = w([]), pt = r(() => {
1823
2218
  let e = [], t = /* @__PURE__ */ new Set();
1824
2219
  for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
1825
2220
  return e;
1826
- }), lt = r(() => [...st.value, ...ct.value]), X = w({}), Z = w([]);
1827
- function ut() {
1828
- let e = L.value.main ?? 3;
2221
+ }), mt = r(() => [...ft.value, ...pt.value]), X = w({}), Z = w([]);
2222
+ function ht() {
2223
+ let e = le.value.main ?? 3;
1829
2224
  return Z.value.length === 0 ? [{
1830
2225
  id: "main",
1831
2226
  ratio: e,
@@ -1838,49 +2233,56 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1838
2233
  role: "price"
1839
2234
  }, ...Z.value.map((e) => ({
1840
2235
  id: e.id,
1841
- ratio: L.value[e.id] ?? 1,
2236
+ ratio: le.value[e.id] ?? 1,
1842
2237
  visible: !0,
1843
2238
  role: "indicator"
1844
2239
  }))];
1845
2240
  }
1846
- function dt(e) {
1847
- return { ...ie[e].defaultParams };
2241
+ function gt(e) {
2242
+ if (e === "VOLUME") return {};
2243
+ let t = me(e);
2244
+ return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
1848
2245
  }
1849
- let ft = /* @__PURE__ */ new Map();
1850
- function pt(e = "VOLUME", t) {
1851
- if (Z.value.length >= Vr) return !1;
1852
- let n = t ?? dt(e);
1853
- return !!E.value?.addIndicator(e, "sub", n);
2246
+ function _t(e) {
2247
+ if (e === "VOLUME") return !0;
2248
+ let t = me(e);
2249
+ return !!t && t.category !== "main";
1854
2250
  }
1855
- function mt(e) {
1856
- E.value?.removeIndicator(e);
2251
+ let vt = /* @__PURE__ */ new Map();
2252
+ function yt(e = "VOLUME", t) {
2253
+ if (Z.value.length >= Xr) return !1;
2254
+ let n = t ?? gt(e);
2255
+ return !!F.value?.addIndicator(e, "sub", n);
1857
2256
  }
1858
- function ht() {
1859
- for (let e of Z.value) E.value?.removeIndicator(e.id);
1860
- ft.clear();
2257
+ function bt(e) {
2258
+ F.value?.removeIndicator(e);
2259
+ }
2260
+ function xt() {
2261
+ for (let e of Z.value) F.value?.removeIndicator(e.id);
2262
+ vt.clear();
1861
2263
  }
1862
- function gt() {
1863
- let e = d.semanticConfig, t = E.value;
2264
+ function St() {
2265
+ let e = d.semanticConfig, t = F.value;
1864
2266
  if (!t) return;
1865
2267
  let n = e.indicators?.main;
1866
2268
  if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
1867
2269
  }
1868
- function _t() {
1869
- let e = E.value?.subPanes.peek() ?? [];
2270
+ function Ct() {
2271
+ let e = F.value?.subPanes.peek() ?? [];
1870
2272
  for (let t of e) {
1871
2273
  let { paneId: e, indicatorId: n, params: r } = t, i = e.match(/^(.+)_(\d+)$/);
1872
2274
  if (i) {
1873
2275
  let [, e, t] = i, n = parseInt(t, 10);
1874
- n >= (ft.get(e) ?? 0) && ft.set(e, n + 1);
2276
+ n >= (vt.get(e) ?? 0) && vt.set(e, n + 1);
1875
2277
  }
1876
2278
  }
1877
2279
  }
1878
- function vt(e, t) {
1879
- let n = dt(t);
1880
- E.value?.replaceSubPaneIndicator(e, t, n);
2280
+ function wt(e, t) {
2281
+ let n = gt(t);
2282
+ F.value?.replaceSubPaneIndicator(e, t, n);
1881
2283
  }
1882
- function yt(e, t) {
1883
- let n = E.value;
2284
+ function Tt(e, t) {
2285
+ let n = F.value;
1884
2286
  if (n) {
1885
2287
  if ([
1886
2288
  "MA",
@@ -1902,33 +2304,33 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1902
2304
  "STRUCTURE",
1903
2305
  "ZONES"
1904
2306
  ].includes(e)) {
1905
- let r = st.value.find((t) => t === e);
2307
+ let r = ft.value.find((t) => t === e);
1906
2308
  t && !r ? n.addIndicator(e, "main", X.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
1907
2309
  return;
1908
2310
  }
1909
- if (re.includes(e)) if (t) {
1910
- if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= Vr) return;
2311
+ if (_t(e)) if (t) {
2312
+ if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= Xr) return;
1911
2313
  if (!n.addIndicator(e, "sub", X.value[e]) && Z.value.length > 0) {
1912
2314
  let t = Z.value[Z.value.length - 1];
1913
- vt(t.id, e);
2315
+ wt(t.id, e);
1914
2316
  }
1915
2317
  } else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
1916
2318
  n.removeIndicator(e.id);
1917
2319
  });
1918
2320
  }
1919
2321
  }
1920
- function bt(e, t) {
2322
+ function Et(e, t) {
1921
2323
  if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
1922
- E.value?.updateIndicatorParams(e, t);
2324
+ F.value?.updateIndicatorParams(e, t);
1923
2325
  return;
1924
2326
  }
1925
- re.includes(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
1926
- E.value?.updateIndicatorParams(e.id, t);
2327
+ _t(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
2328
+ F.value?.updateIndicatorParams(e.id, t);
1927
2329
  });
1928
2330
  }
1929
- function xt(e) {
2331
+ function Dt(e) {
1930
2332
  if (!e.length || Z.value.length <= 1) return;
1931
- let t = e.filter((e) => re.includes(e));
2333
+ let t = e.filter((e) => _t(e));
1932
2334
  if (!t.length) return;
1933
2335
  let n = new Map(Z.value.map((e) => [e.indicatorId, e])), r = [];
1934
2336
  for (let e of t) {
@@ -1940,41 +2342,41 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1940
2342
  let i = Z.value.map((e) => e.id), a = r.map((e) => e.id);
1941
2343
  if (i.join("|") === a.join("|")) return;
1942
2344
  Z.value = r;
1943
- let o = E.value;
1944
- o && o.updatePaneLayout(ut());
2345
+ let o = F.value;
2346
+ o && o.updatePaneLayout(ht());
1945
2347
  }
1946
- let St = r(() => d.rightAxisWidth + d.priceLabelWidth), Ct = r(() => (A.value, I.value, P.value, F.value, j.value, E.value?.getContentWidth() ?? 0));
1947
- function wt() {
1948
- let e = p.value, t = E.value;
2348
+ let Ot = r(() => d.rightAxisWidth + d.priceLabelWidth), kt = r(() => (L.value, ce.value, B.value, oe.value, R.value, F.value?.getContentWidth() ?? 0));
2349
+ function At() {
2350
+ let e = O.value, t = F.value;
1949
2351
  if (!e || !t) return;
1950
2352
  let n = t.getData()?.length ?? 0;
1951
2353
  if (n === 0) return;
1952
- let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } = ce(P.value, F.value, r), o = (a + n * i) / r, s = Math.max(0, e.scrollWidth - e.clientWidth), c = Math.min(s, Math.max(0, o - e.clientWidth));
2354
+ let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } = ue(B.value, oe.value, r), o = (a + n * i) / r, s = Math.max(0, e.scrollWidth - e.clientWidth), c = Math.min(s, Math.max(0, o - e.clientWidth));
1953
2355
  e.scrollLeft = Math.round(c * r) / r;
1954
2356
  }
1955
- function Tt(e, t) {
1956
- E.value?.zoomToLevel(e, t);
2357
+ function Mt(e, t) {
2358
+ F.value?.zoomToLevel(e, t);
1957
2359
  }
1958
2360
  c({
1959
- scheduleRender: me,
1960
- scrollToRight: wt,
1961
- addSubPane: pt,
1962
- removeSubPane: mt,
1963
- switchSubIndicator: vt,
1964
- clearAllSubPanes: ht,
1965
- zoomToLevel: Tt,
1966
- zoomIn: (e) => Tt(N.value + 1, e),
1967
- zoomOut: (e) => Tt(N.value - 1, e),
1968
- getZoomLevel: () => N.value,
1969
- getZoomLevelCount: () => E.value?.getZoomLevelCount() ?? 10
2361
+ scheduleRender: xe,
2362
+ scrollToRight: At,
2363
+ addSubPane: yt,
2364
+ removeSubPane: bt,
2365
+ switchSubIndicator: wt,
2366
+ clearAllSubPanes: xt,
2367
+ zoomToLevel: Mt,
2368
+ zoomIn: (e) => Mt(z.value + 1, e),
2369
+ zoomOut: (e) => Mt(z.value - 1, e),
2370
+ getZoomLevel: () => z.value,
2371
+ getZoomLevelCount: () => F.value?.getZoomLevelCount() ?? 10
1970
2372
  });
1971
- function Et() {
2373
+ function Nt() {
1972
2374
  return (e) => {
1973
- e.preventDefault(), E.value?.handleWheelEvent(e);
2375
+ e.preventDefault(), F.value?.handleWheelEvent(e);
1974
2376
  };
1975
2377
  }
1976
- function Dt(e, t, n, r) {
1977
- return ae({
2378
+ function Pt(e, t, n, r) {
2379
+ return se({
1978
2380
  container: e,
1979
2381
  data: [],
1980
2382
  canvasLayer: t,
@@ -1990,11 +2392,11 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
1990
2392
  maxKWidth: d.maxKWidth
1991
2393
  });
1992
2394
  }
1993
- function Ot(e) {
2395
+ function Ft(e) {
1994
2396
  let t = e.paneLayout.subscribe(() => {
1995
- Se();
1996
- let t = p.value && parseInt(getComputedStyle(p.value).borderTopWidth) || 0;
1997
- De.value = e.paneLayout.peek().slice(0, -1).map((n) => {
2397
+ q();
2398
+ let t = O.value && parseInt(getComputedStyle(O.value).borderTopWidth) || 0;
2399
+ je.value = e.paneLayout.peek().slice(0, -1).map((n) => {
1998
2400
  let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
1999
2401
  return {
2000
2402
  id: n.id,
@@ -2002,25 +2404,26 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
2002
2404
  };
2003
2405
  });
2004
2406
  }), n = e.paneRatios.subscribe(() => {
2005
- L.value = { ...e.paneRatios.peek() };
2407
+ le.value = { ...e.paneRatios.peek() };
2006
2408
  }), r = e.viewport.subscribe(() => {
2007
2409
  let t = e.viewport.peek();
2008
- j.value !== t.dpr && (j.value = t.dpr), I.value !== t.plotWidth && (I.value = t.plotWidth), (N.value !== t.zoomLevel || P.value !== t.kWidth || F.value !== t.kGap) && (N.value = t.zoomLevel, P.value = t.kWidth, F.value = t.kGap);
2410
+ R.value !== t.dpr && (R.value = t.dpr), ce.value !== t.plotWidth && (ce.value = t.plotWidth), (z.value !== t.zoomLevel || B.value !== t.kWidth || oe.value !== t.kGap) && (z.value = t.zoomLevel, B.value = t.kWidth, oe.value = t.kGap);
2009
2411
  let n = t.desiredScrollLeft;
2010
- n !== void 0 && n !== p.value?.scrollLeft && (Se(), h(() => {
2011
- let e = p.value;
2412
+ n !== void 0 && n !== O.value?.scrollLeft && (q(), h(() => {
2413
+ let e = O.value;
2012
2414
  if (!e) return;
2013
2415
  let r = Math.max(0, e.scrollWidth - e.clientWidth), i = Math.min(Math.max(0, n), r), a = t.dpr;
2014
2416
  e.scrollLeft = Math.round(i * a) / a;
2015
2417
  }));
2016
2418
  }), i = e.data.subscribe(() => {
2017
- k.value = e.data.peek().length, A.value++;
2419
+ let t = e.data.peek();
2420
+ ee.value = t.length, L.value++, v.value = !1, b.value = t.length === 0;
2018
2421
  }), a = e.theme.subscribe(() => {
2019
2422
  let t = e.theme.peek();
2020
- U.value = t, f("themeChange", t);
2423
+ ge.value = t, f("themeChange", t);
2021
2424
  }), o = e.indicators.subscribe(() => {
2022
2425
  let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
2023
- st.value = n;
2426
+ ft.value = n;
2024
2427
  let r = { ...X.value };
2025
2428
  for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
2026
2429
  e.updateRendererConfig("mainIndicatorLegend", { indicators: {
@@ -2054,186 +2457,198 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
2054
2457
  X.value = a;
2055
2458
  });
2056
2459
  x(() => {
2057
- r(), i(), n(), t(), a(), o(), s(), G?.removeEventListener("change", K);
2460
+ r(), i(), n(), t(), a(), o(), s(), U?.removeEventListener("change", be);
2058
2461
  });
2059
2462
  }
2060
- function kt(e) {
2061
- let t = C.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
2062
- if (oe.value = t, pe(e, t.theme), e.updateSettingsFacade(t), t.performanceTest10kKlines) {
2063
- let t = ge();
2064
- console.time("updateData-10k"), e.updateData(t), console.timeEnd("updateData-10k");
2065
- }
2463
+ function It(e) {
2464
+ let t = N.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
2465
+ _e.value = t, W(e, t.theme), e.updateSettingsFacade(t);
2066
2466
  }
2067
- function At(e) {
2068
- Y.value = new ne(e), Y.value.setCallbacks({
2467
+ function Lt(e) {
2468
+ Y.value = new ae(e), Y.value.setCallbacks({
2069
2469
  onDrawingCreated: (e) => {
2070
- z.value = [...z.value, e], R.value = e.id;
2470
+ H.value = [...H.value, e], V.value = e.id;
2071
2471
  },
2072
2472
  onToolChange: () => {},
2073
2473
  onDrawingSelected: (e) => {
2074
- R.value = e?.id ?? null;
2474
+ V.value = e?.id ?? null;
2075
2475
  }
2076
2476
  });
2077
2477
  }
2078
- function jt(e) {
2079
- e.setTooltipAnchorPositioning(be.value), e.interactionState.subscribe(() => {
2478
+ function Rt(e) {
2479
+ e.setTooltipAnchorPositioning(K.value), e.interactionState.subscribe(() => {
2080
2480
  J.value = e.interactionState.peek();
2081
- }), J.value = e.interactionState.peek(), j.value = e.viewport.peek().dpr;
2481
+ }), J.value = e.interactionState.peek(), R.value = e.viewport.peek().dpr;
2082
2482
  }
2083
- function Mt(e) {
2084
- if (fe(d.dataFetcher), O.value = new de(e), O.value.on("config:error", (e) => {
2483
+ function zt(e) {
2484
+ e.setDataFetcher(d.dataFetcher), I.value = new pe(e), I.value.on("config:error", (e) => {
2085
2485
  console.error("Semantic config error:", e);
2086
- }), O.value.on("config:ready", () => {
2087
- gt(), _t(), h(() => wt());
2088
- }), oe.value.performanceTest10kKlines) {
2089
- let e = O.value.applyIndicatorsOnly(d.semanticConfig);
2090
- e && !e.success && console.error("Semantic config apply failed:", e.errors);
2091
- } else O.value.applyConfig(d.semanticConfig).then((e) => {
2092
- e && !e.success && console.error("Semantic config apply failed:", e.errors);
2486
+ }), I.value.on("config:ready", () => {
2487
+ St(), Ct(), h(() => At());
2093
2488
  });
2094
2489
  }
2095
2490
  return y(() => {
2096
- be.value = !1;
2097
- let e = p.value, t = m.value;
2491
+ K.value = !1;
2492
+ let e = O.value, t = k.value;
2098
2493
  if (!e || !t) return;
2099
- let n = Et();
2494
+ let n = Nt();
2100
2495
  e.addEventListener("wheel", n, { passive: !1 });
2101
- let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Dt(e, r, t.querySelector(".right-axis-host"), i);
2102
- E.value = a, Ot(a), gt(), kt(a), At(a), jt(a), Mt(a);
2496
+ let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Pt(e, r, t.querySelector(".right-axis-host"), i);
2497
+ F.value = a, Ft(a), St(), It(a), Lt(a), Rt(a), zt(a);
2103
2498
  }), x(() => {
2104
- let e = E.value;
2105
- e && (E.value = null, e.dispose()), Y.value = null;
2499
+ let e = F.value;
2500
+ e && (F.value = null, e.dispose()), Y.value = null;
2106
2501
  }), M(() => d.yPaddingPx, (e) => {
2107
- E.value?.updateOptionsFacade({ yPaddingPx: e });
2502
+ F.value?.updateOptionsFacade({ yPaddingPx: e });
2108
2503
  }), M(() => d.semanticConfig, async (e, t) => {
2109
2504
  if (e && e !== t) {
2110
- let t = await O.value?.applyConfig(e);
2505
+ let t = await I.value?.applyConfig(e);
2111
2506
  t && !t.success && console.error("Semantic config apply failed:", t.errors);
2112
2507
  }
2113
2508
  }, { deep: !0 }), (r, c) => (S(), o("div", {
2114
2509
  ref_key: "chartWrapperRef",
2115
- ref: v,
2510
+ ref: A,
2116
2511
  class: "chart-wrapper",
2117
- "data-theme": U.value,
2118
- style: _(W.value)
2119
- }, [s("div", { class: g(["chart-stage", {
2120
- "is-dragging": Me.value,
2121
- "is-resizing-pane": Ne.value,
2122
- "is-hovering-pane-separator": Pe.value,
2123
- "is-hovering-right-axis": Ie.value,
2124
- "is-hovering-kline": Le.value !== null
2125
- }]) }, [l(Ir, {
2126
- ref_key: "toolbarRef",
2127
- ref: C,
2128
- "is-fullscreen": n.isFullscreen,
2129
- onSelectTool: Ye,
2130
- onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
2131
- onZoomIn: c[1] ||= (e) => Tt(N.value + 1),
2132
- onZoomOut: c[2] ||= (e) => Tt(N.value - 1),
2133
- onSettingsChange: he
2134
- }, null, 8, ["is-fullscreen"]), s("div", {
2135
- class: "chart-main",
2136
- ref_key: "chartMainRef",
2137
- ref: m
2512
+ "data-theme": ge.value,
2513
+ style: _(ye.value)
2138
2514
  }, [
2139
- s("div", Rr, [(S(!0), o(e, null, T(De.value, (e) => (S(), o("div", {
2140
- key: e.id,
2141
- class: g(["pane-separator-line", { "is-active": Fe.value === e.id }]),
2142
- style: _({ top: `${e.top}px` })
2143
- }, null, 6))), 128))]),
2144
- s("div", {
2145
- ref_key: "tooltipLayerRef",
2146
- ref: b,
2147
- class: "tooltip-layer"
2148
- }, null, 512),
2149
- s("div", {
2150
- class: "chart-container",
2151
- style: _({ cursor: Re.value }),
2152
- ref_key: "containerRef",
2153
- ref: p,
2154
- onScrollPassive: ot,
2155
- onPointerdown: Qe,
2156
- onPointermove: $e,
2157
- onPointerup: et,
2158
- onPointerleave: tt
2159
- }, [s("div", {
2160
- class: "scroll-content",
2161
- style: _({ width: Ct.value + "px" })
2162
- }, [s("div", zr, [s("canvas", Br, null, 512), Ee.value ? (S(), i(we, {
2163
- key: 0,
2164
- drawing: Ee.value,
2165
- onUpdateStyle: Xe,
2166
- onDelete: Ze
2167
- }, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
2168
- b.value ? (S(), i(t, {
2169
- key: 0,
2170
- to: b.value
2515
+ l(Gr, {
2516
+ symbol: m.value,
2517
+ "k-line-level": p.value,
2518
+ "symbol-loading": v.value,
2519
+ "symbol-error": b.value,
2520
+ onAddOverlaySymbol: c[0] ||= (e) => r.$emit("addOverlaySymbol"),
2521
+ onKLineLevelChange: C,
2522
+ onToggleIndicator: et,
2523
+ onSymbolChange: E
2524
+ }, null, 8, [
2525
+ "symbol",
2526
+ "k-line-level",
2527
+ "symbol-loading",
2528
+ "symbol-error"
2529
+ ]),
2530
+ s("div", { class: g(["chart-stage", {
2531
+ "is-dragging": Ie.value,
2532
+ "is-resizing-pane": Le.value,
2533
+ "is-hovering-pane-separator": Re.value,
2534
+ "is-hovering-right-axis": Be.value,
2535
+ "is-hovering-kline": Ve.value !== null
2536
+ }]) }, [l(Tr, {
2537
+ ref_key: "toolbarRef",
2538
+ ref: N,
2539
+ "is-fullscreen": n.isFullscreen,
2540
+ onSelectTool: $e,
2541
+ onToggleFullscreen: c[1] ||= (e) => r.$emit("toggleFullscreen"),
2542
+ onZoomIn: c[2] ||= (e) => Mt(z.value + 1),
2543
+ onZoomOut: c[3] ||= (e) => Mt(z.value - 1),
2544
+ onSettingsChange: Se
2545
+ }, null, 8, ["is-fullscreen"]), s("div", {
2546
+ class: "chart-main",
2547
+ ref_key: "chartMainRef",
2548
+ ref: k
2171
2549
  }, [
2172
- ze.value ? (S(), o("div", {
2550
+ s("div", qr, [(S(!0), o(e, null, T(je.value, (e) => (S(), o("div", {
2551
+ key: e.id,
2552
+ class: g(["pane-separator-line", { "is-active": ze.value === e.id }]),
2553
+ style: _({ top: `${e.top}px` })
2554
+ }, null, 6))), 128))]),
2555
+ s("div", {
2556
+ ref_key: "tooltipLayerRef",
2557
+ ref: j,
2558
+ class: "tooltip-layer"
2559
+ }, null, 512),
2560
+ s("div", {
2561
+ class: "chart-container",
2562
+ style: _({ cursor: He.value }),
2563
+ ref_key: "containerRef",
2564
+ ref: O,
2565
+ onScrollPassive: dt,
2566
+ onPointerdown: rt,
2567
+ onPointermove: it,
2568
+ onPointerup: at,
2569
+ onPointerleave: ot
2570
+ }, [s("div", {
2571
+ class: "scroll-content",
2572
+ style: _({ width: kt.value + "px" })
2573
+ }, [s("div", Jr, [s("canvas", Yr, null, 512), Ae.value ? (S(), i(Oe, {
2173
2574
  key: 0,
2174
- class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": be.value }]),
2175
- style: _(Ue.value)
2176
- }, null, 6)) : a("", !0),
2177
- Ae.value || je.value ? (S(), o("div", {
2178
- key: 1,
2179
- class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": be.value }]),
2180
- style: _(Ge.value)
2181
- }, null, 6)) : a("", !0),
2182
- ze.value ? (S(), i($t, {
2183
- key: 2,
2184
- k: ze.value,
2185
- index: Be.value,
2186
- data: Je.value,
2187
- pos: He.value,
2188
- "set-el": ve,
2189
- "use-anchor": be.value,
2190
- "anchor-placement": Ke.value,
2191
- "up-color": se.value.upColor,
2192
- "down-color": se.value.downColor
2193
- }, null, 8, [
2194
- "k",
2195
- "index",
2196
- "data",
2197
- "pos",
2198
- "use-anchor",
2199
- "anchor-placement",
2200
- "up-color",
2201
- "down-color"
2202
- ])) : a("", !0),
2203
- Ae.value || je.value ? (S(), i(nn, {
2204
- key: 3,
2205
- marker: Ae.value || je.value,
2206
- pos: We.value,
2207
- "use-anchor": be.value,
2208
- "anchor-placement": qe.value,
2209
- "set-el": ye
2210
- }, null, 8, [
2211
- "marker",
2212
- "pos",
2213
- "use-anchor",
2214
- "anchor-placement"
2215
- ])) : a("", !0)
2216
- ], 8, ["to"])) : a("", !0),
2217
- s("div", {
2218
- class: "right-axis-host",
2219
- ref: "rightAxisLayerRef",
2220
- style: _({ width: St.value + "px" }),
2221
- onPointerdown: nt,
2222
- onPointermove: rt,
2223
- onPointerup: it,
2224
- onPointerleave: at
2225
- }, null, 36)
2226
- ], 512)], 2), l(Rt, {
2227
- "active-indicators": lt.value,
2228
- "indicator-params": X.value,
2229
- onToggle: yt,
2230
- onUpdateParams: bt,
2231
- onReorderSubIndicators: xt
2232
- }, null, 8, ["active-indicators", "indicator-params"])], 12, Lr));
2575
+ drawing: Ae.value,
2576
+ onUpdateStyle: tt,
2577
+ onDelete: nt
2578
+ }, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
2579
+ j.value ? (S(), i(t, {
2580
+ key: 0,
2581
+ to: j.value
2582
+ }, [
2583
+ Ue.value ? (S(), o("div", {
2584
+ key: 0,
2585
+ class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": K.value }]),
2586
+ style: _(qe.value)
2587
+ }, null, 6)) : a("", !0),
2588
+ Pe.value || Fe.value ? (S(), o("div", {
2589
+ key: 1,
2590
+ class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": K.value }]),
2591
+ style: _(Ye.value)
2592
+ }, null, 6)) : a("", !0),
2593
+ Ue.value ? (S(), i(Kt, {
2594
+ key: 2,
2595
+ k: Ue.value,
2596
+ index: We.value,
2597
+ data: Qe.value,
2598
+ pos: Ke.value,
2599
+ "set-el": we,
2600
+ "use-anchor": K.value,
2601
+ "anchor-placement": Xe.value,
2602
+ "up-color": ve.value.upColor,
2603
+ "down-color": ve.value.downColor
2604
+ }, null, 8, [
2605
+ "k",
2606
+ "index",
2607
+ "data",
2608
+ "pos",
2609
+ "use-anchor",
2610
+ "anchor-placement",
2611
+ "up-color",
2612
+ "down-color"
2613
+ ])) : a("", !0),
2614
+ Pe.value || Fe.value ? (S(), i(Yt, {
2615
+ key: 3,
2616
+ marker: Pe.value || Fe.value,
2617
+ pos: Je.value,
2618
+ "use-anchor": K.value,
2619
+ "anchor-placement": Ze.value,
2620
+ "set-el": Te
2621
+ }, null, 8, [
2622
+ "marker",
2623
+ "pos",
2624
+ "use-anchor",
2625
+ "anchor-placement"
2626
+ ])) : a("", !0)
2627
+ ], 8, ["to"])) : a("", !0),
2628
+ s("div", {
2629
+ class: "right-axis-host",
2630
+ ref: "rightAxisLayerRef",
2631
+ style: _({ width: Ot.value + "px" }),
2632
+ onPointerdown: st,
2633
+ onPointermove: ct,
2634
+ onPointerup: lt,
2635
+ onPointerleave: ut
2636
+ }, null, 36)
2637
+ ], 512)], 2),
2638
+ l(jt, {
2639
+ ref_key: "indicatorSelectorRef",
2640
+ ref: P,
2641
+ "active-indicators": mt.value,
2642
+ "indicator-params": X.value,
2643
+ onToggle: Tt,
2644
+ onUpdateParams: Et,
2645
+ onReorderSubIndicators: Dt
2646
+ }, null, 8, ["active-indicators", "indicator-params"])
2647
+ ], 12, Kr));
2233
2648
  }
2234
- }), [["__scopeId", "data-v-82877422"]]), Ur = {
2649
+ }), [["__scopeId", "data-v-a5739fae"]]), Qr = {
2235
2650
  name: "@363045841yyt/klinechart",
2236
- version: "0.7.12",
2651
+ version: "0.8.1-alpha.1",
2237
2652
  description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
2238
2653
  license: "MIT",
2239
2654
  repository: {
@@ -2290,29 +2705,29 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
2290
2705
  devDependencies: {
2291
2706
  "@arethetypeswrong/cli": "^0.18.3",
2292
2707
  "@size-limit/preset-small-lib": "^12.1.0",
2293
- "@vitejs/plugin-vue": "^6.0.0",
2294
- "@vue/test-utils": "^2.4.10",
2708
+ "@vitejs/plugin-vue": "^6.0.7",
2709
+ "@vue/test-utils": "^2.4.11",
2295
2710
  "cross-env": "^7.0.3",
2296
2711
  jsdom: "^29.1.1",
2297
- publint: "^0.3.0",
2712
+ publint: "^0.3.21",
2298
2713
  "size-limit": "^12.1.0",
2299
2714
  typescript: "~6.0.3",
2300
2715
  "unplugin-icons": "^23.0.1",
2301
- vite: "^8.0.14",
2302
- "vite-plugin-babel": "^1.3.2",
2716
+ vite: "^8.0.16",
2717
+ "vite-plugin-babel": "^1.7.3",
2303
2718
  "vite-plugin-css-injected-by-js": "^5.0.1",
2304
- "vite-plugin-dts": "^5.0.1",
2305
- vitest: "^4.1.5",
2306
- vue: "^3.5.0"
2719
+ "vite-plugin-dts": "^5.0.2",
2720
+ vitest: "^4.1.8",
2721
+ vue: "^3.5.35"
2307
2722
  }
2308
- }.version, Wr = null;
2309
- function Gr(e) {
2310
- Wr = e;
2723
+ }.version, $r = null;
2724
+ function ei(e) {
2725
+ $r = e;
2311
2726
  }
2312
- function Kr(e) {
2727
+ function ti(e) {
2313
2728
  if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
2314
- if (Wr === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
2315
- return Wr(e);
2729
+ if ($r === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
2730
+ return $r(e);
2316
2731
  }
2317
2732
  function $(e) {
2318
2733
  let t = D(e.peek());
@@ -2320,9 +2735,9 @@ function $(e) {
2320
2735
  t.value = e.peek();
2321
2736
  })), t;
2322
2737
  }
2323
- function qr(e, t) {
2738
+ function ni(e, t) {
2324
2739
  let n = D(null), r = (e) => {
2325
- e == null || n.value != null || (n.value = Kr({
2740
+ e == null || n.value != null || (n.value = ti({
2326
2741
  ...t,
2327
2742
  container: e
2328
2743
  }));
@@ -2340,7 +2755,7 @@ function qr(e, t) {
2340
2755
  };
2341
2756
  return b(a), v(a), { chart: n };
2342
2757
  }
2343
- function Jr(e) {
2758
+ function ri(e) {
2344
2759
  let t = D(e.indicators.peek());
2345
2760
  return b(e.indicators.subscribe(() => {
2346
2761
  t.value = e.indicators.peek();
@@ -2351,25 +2766,25 @@ function Jr(e) {
2351
2766
  updateParams: e.updateIndicatorParams.bind(e)
2352
2767
  };
2353
2768
  }
2354
- function Yr(e) {
2769
+ function ii(e) {
2355
2770
  let t = D(e.interactionState.peek());
2356
2771
  return b(e.interactionState.subscribe(() => {
2357
2772
  t.value = e.interactionState.peek();
2358
2773
  })), t;
2359
2774
  }
2360
- function Xr(e) {
2775
+ function ai(e) {
2361
2776
  let t = D(e.paneRatios.peek());
2362
2777
  return b(e.paneRatios.subscribe(() => {
2363
2778
  t.value = e.paneRatios.peek();
2364
2779
  })), t;
2365
2780
  }
2366
- function Zr(e) {
2781
+ function oi(e) {
2367
2782
  let t = D(e.viewport.peek());
2368
2783
  return b(e.viewport.subscribe(() => {
2369
2784
  t.value = e.viewport.peek();
2370
2785
  })), t;
2371
2786
  }
2372
- function Qr(e) {
2787
+ function si(e) {
2373
2788
  let t = z({ catalog: e.catalog });
2374
2789
  b(() => t.dispose());
2375
2790
  let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
@@ -2398,7 +2813,7 @@ function Qr(e) {
2398
2813
  isActive: c
2399
2814
  };
2400
2815
  }
2401
- var $r = u({
2816
+ var ci = u({
2402
2817
  name: "KLineChart",
2403
2818
  props: {
2404
2819
  data: {
@@ -2431,7 +2846,7 @@ var $r = u({
2431
2846
  y(() => {
2432
2847
  let n = r.value;
2433
2848
  n != null && (i.run(() => {
2434
- if (a.value = Kr({
2849
+ if (a.value = ti({
2435
2850
  container: n,
2436
2851
  data: e.data,
2437
2852
  initialZoomLevel: e.initialZoomLevel,
@@ -2477,9 +2892,9 @@ var $r = u({
2477
2892
  }
2478
2893
  });
2479
2894
  }
2480
- }), ei = { install(e) {
2481
- e.component("KLineChart", $r);
2895
+ }), li = { install(e) {
2896
+ e.component("KLineChart", ci);
2482
2897
  } };
2483
- Gr(R);
2898
+ ei(R);
2484
2899
  //#endregion
2485
- export { L as CORE_VERSION, we as DrawingStyleToolbar, We as IndicatorParams, Rt as IndicatorSelector, $r as KLineChart, Hr as KLineChartVue, $t as KLineTooltip, ei as KMapPlugin, Ir as LeftToolbar, nn as MarkerTooltip, Ur as VERSION, Gr as __setControllerFactory, $ as coreSignalToVueRef, Kr as createChart, qr as useChart, Qr as useIndicatorSelector, Jr as useIndicators, Yr as useInteractionState, Xr as usePaneRatios, Zr as useViewport };
2900
+ export { L as CORE_VERSION, Oe as DrawingStyleToolbar, Je as IndicatorParams, jt as IndicatorSelector, ci as KLineChart, Zr as KLineChartVue, Kt as KLineTooltip, li as KMapPlugin, Tr as LeftToolbar, Yt as MarkerTooltip, Qr as VERSION, ei as __setControllerFactory, $ as coreSignalToVueRef, ti as createChart, ni as useChart, si as useIndicatorSelector, ri as useIndicators, ii as useInteractionState, ai as usePaneRatios, oi as useViewport };