waveform-analysis 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -33
- package/dist/index.cjs +1 -1
- package/dist/index.js +451 -491
- package/dist/types/components/core/layout.d.ts +2 -4
- package/dist/types/components/core/trackLayoutBuilder.d.ts +2 -1
- package/dist/types/components/core/types.d.ts +0 -3
- package/dist/types/demo/types.d.ts +9 -0
- package/dist/types/demo/useDemoXAxisLabelControls.d.ts +32 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/chart.d.ts +15 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/utils/formatters.d.ts +12 -10
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/App.vue +7 -1
- package/src/components/core/layout.test.ts +7 -8
- package/src/components/core/layout.ts +10 -20
- package/src/components/core/trackLayoutBuilder.ts +24 -26
- package/src/components/core/types.ts +0 -3
- package/src/components/core/useWaveformLayout.ts +6 -27
- package/src/components/interaction/WaveformTooltip.test.ts +16 -0
- package/src/components/rendering/WaveformTrackAxes.vue +10 -29
- package/src/components/waveformChartCases/compactAndSharedHover.test.ts +7 -7
- package/src/components/waveformChartCases/dataAndHoverPerformance.test.ts +2 -2
- package/src/components/waveformChartCases/dataLifecycle.test.ts +4 -4
- package/src/components/waveformChartCases/frameGridAndFormatting.test.ts +97 -23
- package/src/components/waveformChartCases/interactionAndAnnotationCreation.test.ts +1 -1
- package/src/components/waveformChartCases/layoutAndDomains.test.ts +15 -15
- package/src/components/waveformChartCases/multiAxisAndPagination.test.ts +8 -8
- package/src/components/waveformChartCases/presentationAndAxes.test.ts +6 -4
- package/src/components/waveformChartCases/viewportConstraintsAndReset.test.ts +8 -8
- package/src/components/waveformChartCases/wheelZoomOut.test.ts +3 -3
- package/src/demo/DemoGridFrameControls.vue +70 -0
- package/src/demo/types.ts +9 -0
- package/src/demo/useDemoXAxisLabelControls.ts +77 -0
- package/src/demo/xAxisLabelControls.test.ts +86 -0
- package/src/index.ts +3 -0
- package/src/styles.css +8 -0
- package/src/types/chart.ts +21 -0
- package/src/types/index.ts +3 -0
- package/src/utils/formatters.test.ts +72 -31
- package/src/utils/formatters.ts +55 -45
- package/src/utils/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, getCurrentInstance as l, markRaw as u, nextTick as d, normalizeClass as f, normalizeStyle as p, onBeforeUnmount as m, onMounted as h, openBlock as g, reactive as _, ref as v, renderList as y, shallowReactive as b, shallowRef as x, toDisplayString as S, toRefs as C, unref as w, vModelText as T, watch as E, watchEffect as D, withDirectives as O, withModifiers as k } from "vue";
|
|
2
|
-
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as ee, symbolDiamond as te, symbolSquare as ne, symbolTriangle as re, zoom as ie, zoomIdentity as U, zoomTransform as
|
|
3
|
-
import { Pagination as
|
|
4
|
-
import { ColorPicker as
|
|
2
|
+
import { axisBottom as A, axisLeft as j, axisRight as M, bisector as N, curveStep as P, curveStepAfter as F, curveStepBefore as I, extent as L, line as R, pointer as z, scaleLinear as B, select as V, symbol as H, symbolCircle as ee, symbolDiamond as te, symbolSquare as ne, symbolTriangle as re, zoom as ie, zoomIdentity as U, zoomTransform as ae } from "d3";
|
|
3
|
+
import { Pagination as oe } from "ant-design-vue";
|
|
4
|
+
import { ColorPicker as W } from "vue3-colorpicker";
|
|
5
5
|
import "vue3-colorpicker/style.css";
|
|
6
6
|
//#region src/utils/waveformId.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var se = 0;
|
|
8
|
+
function ce(e = "waveform") {
|
|
9
9
|
let t = l();
|
|
10
|
-
return `${e}-${t ? `v${t.uid}` : `f${++
|
|
10
|
+
return `${e}-${t ? `v${t.uid}` : `f${++se}`}`;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/annotation/annotationLayout.ts
|
|
14
|
-
function
|
|
14
|
+
function le(e, t) {
|
|
15
15
|
return e >= Math.min(t[0], t[1]) && e <= Math.max(t[0], t[1]);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function ue(e, t, n) {
|
|
18
18
|
let r = Math.max(0, Math.min(e.x, Math.max(0, t - e.width))), i = Math.max(0, Math.min(e.y, Math.max(0, n - e.height)));
|
|
19
19
|
return {
|
|
20
20
|
...e,
|
|
@@ -24,11 +24,11 @@ function le(e, t, n) {
|
|
|
24
24
|
lineEndY: Math.max(i, Math.min(e.lineEndY, i + e.height))
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
let s =
|
|
27
|
+
function de(e, t, n, r, i, a, o) {
|
|
28
|
+
let s = pe(e, t, n, r, i);
|
|
29
29
|
return s.x >= 0 && s.y >= 0 && s.x + n <= a && s.y + r <= o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function fe(e, t, n, r, i, a) {
|
|
32
32
|
for (let o of [
|
|
33
33
|
"top",
|
|
34
34
|
"bottom",
|
|
@@ -38,10 +38,10 @@ function de(e, t, n, r, i, a) {
|
|
|
38
38
|
"top-left",
|
|
39
39
|
"bottom-right",
|
|
40
40
|
"bottom-left"
|
|
41
|
-
]) if (
|
|
41
|
+
]) if (de(e, t, n, r, o, i, a)) return o;
|
|
42
42
|
return "top";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function G(e, t, n) {
|
|
45
45
|
let r = e.x + e.width / 2, i = e.y + e.height / 2, a = t - r, o = n - i;
|
|
46
46
|
if (Math.abs(a) * e.height > Math.abs(o) * e.width) {
|
|
47
47
|
let t = a >= 0 ? e.x + e.width : e.x, n = a === 0 ? 0 : (t - r) / a;
|
|
@@ -56,7 +56,7 @@ function K(e, t, n) {
|
|
|
56
56
|
y: s
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function pe(e, t, n, r, i) {
|
|
60
60
|
let a = e - n / 2, o = t - r / 2, s = e + 32, c = e - n - 32, l = t - r - 32, u = t + 32;
|
|
61
61
|
switch (i) {
|
|
62
62
|
case "top": return {
|
|
@@ -93,36 +93,36 @@ function fe(e, t, n, r, i) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function me(e, t, n) {
|
|
97
97
|
return {
|
|
98
|
-
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(
|
|
98
|
+
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(Y), 0)) + 16))),
|
|
99
99
|
height: Math.min(n, Math.max(26, (e.length - 1) * 16 + 14 + 16))
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
let { width: c, height: l } =
|
|
102
|
+
function he(e, t, n, r, i, a, o = 0, s = 0) {
|
|
103
|
+
let { width: c, height: l } = me(n, r, i), u = pe(e, t, c, l, a), d = ue({
|
|
104
104
|
x: u.x + o,
|
|
105
105
|
y: u.y + s,
|
|
106
106
|
width: c,
|
|
107
107
|
height: l,
|
|
108
108
|
lineEndX: e,
|
|
109
109
|
lineEndY: t
|
|
110
|
-
}, r, i), f =
|
|
110
|
+
}, r, i), f = G(d, e, t);
|
|
111
111
|
return {
|
|
112
112
|
...d,
|
|
113
113
|
lineEndX: f.x,
|
|
114
114
|
lineEndY: f.y
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ge(e, t, n, r) {
|
|
118
118
|
let i = [];
|
|
119
119
|
return e.forEach((e) => {
|
|
120
|
-
if (!
|
|
120
|
+
if (!Ce(e)) return;
|
|
121
121
|
let a = t.find((t) => t.series.id === e.seriesId);
|
|
122
122
|
if (!a) return;
|
|
123
123
|
let o = a.xScale.domain(), s = a.yScale.domain();
|
|
124
|
-
if (!
|
|
125
|
-
let c =
|
|
124
|
+
if (!le(e.x, o) || !le(e.y, s)) return;
|
|
125
|
+
let c = we(e.text), l = a.left ?? 0, u = a.width ?? n, d = a.xScale(e.x), f = l + d, p = a.yScale(e.y) + a.top, m = Math.min(a.height, Math.max(0, r - a.top)), h = p - a.top, g = Number.isFinite(e.labelOffsetX) && e.labelOffsetX !== 0 || Number.isFinite(e.labelOffsetY) && e.labelOffsetY !== 0, { width: _, height: v } = me(c, u, m), y = g ? "top" : fe(d, h, _, v, u, m), b = he(d, h, c, u, m, y, Number.isFinite(e.labelOffsetX) ? e.labelOffsetX : 0, Number.isFinite(e.labelOffsetY) ? e.labelOffsetY : 0), x = {
|
|
126
126
|
...b,
|
|
127
127
|
x: b.x + l,
|
|
128
128
|
y: b.y + a.top,
|
|
@@ -137,28 +137,28 @@ function he(e, t, n, r) {
|
|
|
137
137
|
placement: y,
|
|
138
138
|
lines: c,
|
|
139
139
|
box: { ...x },
|
|
140
|
-
style:
|
|
140
|
+
style: Se(e.style)
|
|
141
141
|
});
|
|
142
142
|
}), i;
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/components/annotation/markup.ts
|
|
146
|
-
var
|
|
146
|
+
var _e = {
|
|
147
147
|
borderColor: "#1677ff",
|
|
148
148
|
textColor: "#333333",
|
|
149
149
|
backgroundColor: "rgba(255, 255, 255, 0.92)"
|
|
150
|
-
},
|
|
151
|
-
function
|
|
150
|
+
}, K = "12px Arial, sans-serif", ve = N((e) => e.x);
|
|
151
|
+
function ye(e, t) {
|
|
152
152
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
153
|
-
let n =
|
|
153
|
+
let n = ve.center(e, t), r = e[Math.min(n, e.length - 1)], i = e[Math.max(0, n - 1)];
|
|
154
154
|
return Math.abs(t - i.x) < Math.abs(r.x - t) ? i : r;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function be(e, t, n = "linear") {
|
|
157
157
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
158
158
|
let r = e[0], i = e[e.length - 1];
|
|
159
159
|
if (t < r.x || t > i.x) return null;
|
|
160
160
|
if (e.length === 1) return t === r.x ? { ...r } : null;
|
|
161
|
-
let a =
|
|
161
|
+
let a = ve.left(e, t), o = e[Math.min(a, e.length - 1)];
|
|
162
162
|
if (o.x === t || a === 0) return {
|
|
163
163
|
x: t,
|
|
164
164
|
y: o.y
|
|
@@ -188,18 +188,18 @@ function ye(e, t, n = "linear") {
|
|
|
188
188
|
y: s.y + (o.y - s.y) * l
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function q(e, t, n, r) {
|
|
192
192
|
return e.flatMap((e) => {
|
|
193
|
-
let i =
|
|
193
|
+
let i = be(e.series.points, t, e.series.lineType);
|
|
194
194
|
if (!i) return [];
|
|
195
|
-
let a =
|
|
195
|
+
let a = ye(e.series.points, t);
|
|
196
196
|
if (!a) return [];
|
|
197
197
|
let o = e.xScale(i.x), s = e.top + e.yScale(i.y), c = e.xScale(a.x), l = e.top + e.yScale(a.y);
|
|
198
198
|
return [{
|
|
199
199
|
trackIndex: e.index,
|
|
200
200
|
seriesId: e.series.id,
|
|
201
201
|
name: e.series.name?.trim() || e.series.id,
|
|
202
|
-
color: e.series.color ||
|
|
202
|
+
color: e.series.color || _e.borderColor,
|
|
203
203
|
unit: e.series.unit,
|
|
204
204
|
point: a,
|
|
205
205
|
screenX: c,
|
|
@@ -208,24 +208,24 @@ function J(e, t, n, r) {
|
|
|
208
208
|
}];
|
|
209
209
|
}).sort((e, t) => e.distance - t.distance || e.trackIndex - t.trackIndex);
|
|
210
210
|
}
|
|
211
|
-
var
|
|
212
|
-
function
|
|
211
|
+
var J;
|
|
212
|
+
function xe(e) {
|
|
213
213
|
return Array.from(e).reduce((e, t) => e + (t.codePointAt(0) > 255 ? 12 : 6.7), 0);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
215
|
+
function Y(e) {
|
|
216
|
+
return J === void 0 && (J = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (J = document.createElement("canvas").getContext("2d"), J && (J.font = K))), J?.measureText(e).width ?? xe(e);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Se(e) {
|
|
219
219
|
return {
|
|
220
|
-
borderColor: e?.borderColor ||
|
|
221
|
-
textColor: e?.textColor ||
|
|
222
|
-
backgroundColor: e?.backgroundColor ||
|
|
220
|
+
borderColor: e?.borderColor || _e.borderColor,
|
|
221
|
+
textColor: e?.textColor || _e.textColor,
|
|
222
|
+
backgroundColor: e?.backgroundColor || _e.backgroundColor
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Ce(e) {
|
|
226
226
|
return !!(e.id && e.seriesId) && Number.isFinite(e.x) && Number.isFinite(e.y) && typeof e.text == "string" && e.text.trim().length > 0;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function we(e, t = 10) {
|
|
229
229
|
let n = [];
|
|
230
230
|
return e.split(/\r?\n/).forEach((e) => {
|
|
231
231
|
let r = Array.from(e);
|
|
@@ -238,30 +238,30 @@ function Ce(e, t = 10) {
|
|
|
238
238
|
}
|
|
239
239
|
//#endregion
|
|
240
240
|
//#region src/components/annotation/WaveformAnnotationLayer.vue?vue&type=script&setup=true&lang.ts
|
|
241
|
-
var
|
|
241
|
+
var Te = [
|
|
242
242
|
"data-annotation-id",
|
|
243
243
|
"data-placement",
|
|
244
244
|
"onPointerdown",
|
|
245
245
|
"onContextmenu"
|
|
246
|
-
],
|
|
246
|
+
], Ee = ["id"], De = ["fill"], Oe = [
|
|
247
247
|
"x1",
|
|
248
248
|
"y1",
|
|
249
249
|
"x2",
|
|
250
250
|
"y2",
|
|
251
251
|
"stroke",
|
|
252
252
|
"marker-end"
|
|
253
|
-
],
|
|
253
|
+
], ke = [
|
|
254
254
|
"x",
|
|
255
255
|
"y",
|
|
256
256
|
"width",
|
|
257
257
|
"height",
|
|
258
258
|
"fill",
|
|
259
259
|
"stroke"
|
|
260
|
-
],
|
|
260
|
+
], Ae = [
|
|
261
261
|
"x",
|
|
262
262
|
"y",
|
|
263
263
|
"fill"
|
|
264
|
-
],
|
|
264
|
+
], je = ["x", "dy"], Me = /*@__PURE__*/ c({
|
|
265
265
|
__name: "WaveformAnnotationLayer",
|
|
266
266
|
props: {
|
|
267
267
|
annotations: {},
|
|
@@ -401,7 +401,7 @@ var we = [
|
|
|
401
401
|
}, [a("path", {
|
|
402
402
|
d: "M0,0 L8,4 L0,8 Z",
|
|
403
403
|
fill: t.style.borderColor
|
|
404
|
-
}, null, 8,
|
|
404
|
+
}, null, 8, De)], 8, Ee)]),
|
|
405
405
|
a("line", {
|
|
406
406
|
class: "waveform-annotation__arrow",
|
|
407
407
|
x1: b(t).lineEndX,
|
|
@@ -410,7 +410,7 @@ var we = [
|
|
|
410
410
|
y2: t.anchorY,
|
|
411
411
|
stroke: t.style.borderColor,
|
|
412
412
|
"marker-end": `url(#${M(t.annotation.id)})`
|
|
413
|
-
}, null, 8,
|
|
413
|
+
}, null, 8, Oe),
|
|
414
414
|
a("rect", {
|
|
415
415
|
class: "waveform-annotation__box",
|
|
416
416
|
x: b(t).x,
|
|
@@ -419,27 +419,27 @@ var we = [
|
|
|
419
419
|
height: b(t).height,
|
|
420
420
|
fill: t.style.backgroundColor,
|
|
421
421
|
stroke: t.style.borderColor
|
|
422
|
-
}, null, 8,
|
|
422
|
+
}, null, 8, ke),
|
|
423
423
|
a("text", {
|
|
424
424
|
class: "waveform-annotation__text",
|
|
425
425
|
x: b(t).x + b(t).width / 2,
|
|
426
426
|
y: b(t).y + b(t).height / 2 - (t.lines.length - 1) * w(16) / 2,
|
|
427
427
|
fill: t.style.textColor,
|
|
428
|
-
style: p({ font: w(
|
|
428
|
+
style: p({ font: w(K) }),
|
|
429
429
|
"text-anchor": "middle",
|
|
430
430
|
"dominant-baseline": "central"
|
|
431
431
|
}, [(g(!0), i(e, null, y(t.lines, (e, n) => (g(), i("tspan", {
|
|
432
432
|
key: `${t.annotation.id}-${n}`,
|
|
433
433
|
x: b(t).x + b(t).width / 2,
|
|
434
434
|
dy: n === 0 ? 0 : w(16)
|
|
435
|
-
}, S(e), 9,
|
|
436
|
-
], 40,
|
|
435
|
+
}, S(e), 9, je))), 128))], 12, Ae)
|
|
436
|
+
], 40, Te))), 128))], 2)) : r("", !0);
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), X = (e, t) => {
|
|
439
439
|
let n = e.__vccOpts || e;
|
|
440
440
|
for (let [e, r] of t) n[e] = r;
|
|
441
441
|
return n;
|
|
442
|
-
},
|
|
442
|
+
}, Ne = /*#__PURE__*/ X(Me, [["__scopeId", "data-v-7254383e"]]), Pe = /*#__PURE__*/ X(/* @__PURE__ */ c({
|
|
443
443
|
__name: "WaveformAnnotationContextMenu",
|
|
444
444
|
props: {
|
|
445
445
|
visible: { type: Boolean },
|
|
@@ -481,33 +481,33 @@ var we = [
|
|
|
481
481
|
}, "取消")
|
|
482
482
|
], 36)) : r("", !0);
|
|
483
483
|
}
|
|
484
|
-
}), [["__scopeId", "data-v-c70c98a1"]]),
|
|
485
|
-
function
|
|
484
|
+
}), [["__scopeId", "data-v-c70c98a1"]]), Fe = 1;
|
|
485
|
+
function Z(e) {
|
|
486
486
|
throw TypeError(`Invalid waveform annotation file: ${e}`);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Ie(e) {
|
|
489
489
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Le(e, t, n) {
|
|
492
492
|
let r = e[t];
|
|
493
|
-
return (typeof r != "string" || r.trim().length === 0) &&
|
|
493
|
+
return (typeof r != "string" || r.trim().length === 0) && Z(`${n}.${t} must be a non-empty string`), r;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Q(e, t, n) {
|
|
496
496
|
let r = e[t];
|
|
497
|
-
if (r !== void 0) return typeof r != "string" &&
|
|
497
|
+
if (r !== void 0) return typeof r != "string" && Z(`${n}.${t} must be a string`), r;
|
|
498
498
|
}
|
|
499
499
|
function Re(e, t, n) {
|
|
500
500
|
let r = e[t];
|
|
501
|
-
return (typeof r != "number" || !Number.isFinite(r)) &&
|
|
501
|
+
return (typeof r != "number" || !Number.isFinite(r)) && Z(`${n}.${t} must be a finite number`), r;
|
|
502
502
|
}
|
|
503
503
|
function ze(e, t, n) {
|
|
504
504
|
let r = e[t];
|
|
505
|
-
if (r !== void 0) return (typeof r != "number" || !Number.isFinite(r)) &&
|
|
505
|
+
if (r !== void 0) return (typeof r != "number" || !Number.isFinite(r)) && Z(`${n}.${t} must be a finite number`), r;
|
|
506
506
|
}
|
|
507
507
|
function Be(e, t) {
|
|
508
508
|
if (e === void 0) return;
|
|
509
|
-
|
|
510
|
-
let n =
|
|
509
|
+
Ie(e) || Z(`${t} must be an object`);
|
|
510
|
+
let n = Q(e, "borderColor", t), r = Q(e, "textColor", t), i = Q(e, "backgroundColor", t);
|
|
511
511
|
return {
|
|
512
512
|
...n !== void 0 && { borderColor: n },
|
|
513
513
|
...r !== void 0 && { textColor: r },
|
|
@@ -516,13 +516,13 @@ function Be(e, t) {
|
|
|
516
516
|
}
|
|
517
517
|
function Ve(e, t) {
|
|
518
518
|
let n = `annotations[${t}]`;
|
|
519
|
-
|
|
520
|
-
let r =
|
|
521
|
-
r.length > 40 &&
|
|
522
|
-
let i = ze(e, "labelOffsetX", n), a = ze(e, "labelOffsetY", n), o =
|
|
519
|
+
Ie(e) || Z(`${n} must be an object`);
|
|
520
|
+
let r = Le(e, "text", n);
|
|
521
|
+
r.length > 40 && Z(`${n}.text must not exceed 40 characters`);
|
|
522
|
+
let i = ze(e, "labelOffsetX", n), a = ze(e, "labelOffsetY", n), o = Q(e, "createdAt", n), s = Be(e.style, `${n}.style`);
|
|
523
523
|
return {
|
|
524
|
-
id:
|
|
525
|
-
seriesId:
|
|
524
|
+
id: Le(e, "id", n),
|
|
525
|
+
seriesId: Le(e, "seriesId", n),
|
|
526
526
|
x: Re(e, "x", n),
|
|
527
527
|
y: Re(e, "y", n),
|
|
528
528
|
text: r,
|
|
@@ -535,24 +535,24 @@ function Ve(e, t) {
|
|
|
535
535
|
function He(e) {
|
|
536
536
|
let t = e.map(Ve), n = /* @__PURE__ */ new Set();
|
|
537
537
|
return t.forEach((e, t) => {
|
|
538
|
-
n.has(e.id) &&
|
|
538
|
+
n.has(e.id) && Z(`annotations[${t}].id must be unique`), n.add(e.id);
|
|
539
539
|
}), t;
|
|
540
540
|
}
|
|
541
541
|
function Ue(e) {
|
|
542
542
|
return JSON.stringify({
|
|
543
|
-
version:
|
|
543
|
+
version: Fe,
|
|
544
544
|
annotations: He(e)
|
|
545
545
|
}, null, 2);
|
|
546
546
|
}
|
|
547
547
|
function We(e) {
|
|
548
|
-
typeof e != "string" &&
|
|
548
|
+
typeof e != "string" && Z("input must be a JSON string");
|
|
549
549
|
let t;
|
|
550
550
|
try {
|
|
551
551
|
t = JSON.parse(e);
|
|
552
552
|
} catch {
|
|
553
|
-
|
|
553
|
+
Z("input is not valid JSON");
|
|
554
554
|
}
|
|
555
|
-
return
|
|
555
|
+
return Ie(t) || Z("root must be an object"), t.version !== Fe && Z(`version must be ${Fe}`), Array.isArray(t.annotations) || Z("annotations must be an array"), He(t.annotations);
|
|
556
556
|
}
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/components/annotation/useWaveformAnnotationInteraction.ts
|
|
@@ -625,30 +625,31 @@ function Ke(e, t = 5, n) {
|
|
|
625
625
|
}
|
|
626
626
|
//#endregion
|
|
627
627
|
//#region src/utils/formatters.ts
|
|
628
|
-
var qe =
|
|
628
|
+
var qe = .001, Je = 1e3, Ye = new Intl.NumberFormat("zh-CN", { maximumFractionDigits: 4 }), Xe = new Intl.NumberFormat("zh-CN", { maximumFractionDigits: 4 });
|
|
629
629
|
function Ze(e, t) {
|
|
630
630
|
let n = e.toFixed(Math.max(0, t));
|
|
631
631
|
return /^-0(?:\.0+)?$/.test(n) ? n.slice(1) : n;
|
|
632
632
|
}
|
|
633
633
|
function Qe(e) {
|
|
634
|
-
return Number.isFinite(e) && (e >=
|
|
634
|
+
return Number.isFinite(e) && (e >= Je || e > 0 && e < qe);
|
|
635
635
|
}
|
|
636
636
|
function $e(e, t) {
|
|
637
637
|
if (typeof e != "number" || typeof t != "number") return null;
|
|
638
|
-
let n = Math.
|
|
638
|
+
let n = Math.abs(Math.max(e, t));
|
|
639
639
|
return Qe(n) ? Math.floor(Math.log10(n)) : null;
|
|
640
640
|
}
|
|
641
641
|
function et(e) {
|
|
642
642
|
return `E${e >= 0 ? "+" : "-"}${Math.abs(e).toString().padStart(2, "0")}`;
|
|
643
643
|
}
|
|
644
|
-
function tt(e
|
|
645
|
-
if (
|
|
646
|
-
let
|
|
647
|
-
return
|
|
644
|
+
function tt(e) {
|
|
645
|
+
if (Object.is(e, -0)) return "0";
|
|
646
|
+
let t = e === 0 ? 0 : Number(e.toPrecision(5)), n = Ye.format(t);
|
|
647
|
+
return n === "-0" ? "0" : n;
|
|
648
648
|
}
|
|
649
|
-
function nt(e, t) {
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
function nt(e, t = {}) {
|
|
650
|
+
if (!Number.isFinite(e)) return String(e);
|
|
651
|
+
let n = $e(t.axisMin, t.axisMax), r = tt(n === null ? e : e / 10 ** n), i = t.topTickValue ?? t.axisMax;
|
|
652
|
+
return n !== null && e === i ? `${et(n)} ${r}` : r;
|
|
652
653
|
}
|
|
653
654
|
function rt(e) {
|
|
654
655
|
return Number.isFinite(e) ? Object.is(e, -0) ? "0" : Xe.format(e) : String(e);
|
|
@@ -662,29 +663,24 @@ function it(e) {
|
|
|
662
663
|
function at(e, t) {
|
|
663
664
|
return t === "ms" ? e * 1e3 : e;
|
|
664
665
|
}
|
|
665
|
-
function ot(e, t, n) {
|
|
666
|
-
let
|
|
667
|
-
return
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
666
|
+
function ot(e, t, n, r, i) {
|
|
667
|
+
let a = at(e, n);
|
|
668
|
+
return i ? i(a, {
|
|
669
|
+
kind: r,
|
|
670
|
+
rawValue: e,
|
|
671
|
+
timeUnit: n,
|
|
672
|
+
domain: [t[0], t[1]],
|
|
673
|
+
displayDomain: [at(t[0], n), at(t[1], n)]
|
|
674
|
+
}) : it(a);
|
|
671
675
|
}
|
|
672
676
|
function st(e, t, n) {
|
|
673
|
-
|
|
674
|
-
return tt(r, {
|
|
675
|
-
axisMin: i?.[0],
|
|
676
|
-
axisMax: i?.[1]
|
|
677
|
-
});
|
|
677
|
+
return ot(e, t, n, "end");
|
|
678
678
|
}
|
|
679
|
-
function ct(e, t) {
|
|
680
|
-
|
|
681
|
-
return nt(n, r);
|
|
679
|
+
function ct(e, t, n) {
|
|
680
|
+
return ot(e, n ?? [e, e], t, "tick");
|
|
682
681
|
}
|
|
683
682
|
function lt(e, t) {
|
|
684
|
-
return at(e, t)
|
|
685
|
-
minimumFractionDigits: 4,
|
|
686
|
-
maximumFractionDigits: 4
|
|
687
|
-
});
|
|
683
|
+
return rt(at(e, t));
|
|
688
684
|
}
|
|
689
685
|
function ut(e, t) {
|
|
690
686
|
return Number.isFinite(e) ? Ze(at(e, t), 3) : String(e);
|
|
@@ -1095,14 +1091,12 @@ function $t(e) {
|
|
|
1095
1091
|
a,
|
|
1096
1092
|
...c,
|
|
1097
1093
|
...s ? [o] : []
|
|
1098
|
-
])), {
|
|
1099
|
-
return p[n.side] +=
|
|
1094
|
+
])), { tickTextWidth: u } = un(n.domain, !n.fixed, l), d = u + 7 + 6 + 24 + 4, f = n.side === "left" ? -p.left : t.width + p.right, m = u + 7 + 6 + 24 / 2, h = f + (n.side === "left" ? -m : m);
|
|
1095
|
+
return p[n.side] += d, {
|
|
1100
1096
|
index: n.index,
|
|
1101
1097
|
side: n.side,
|
|
1102
|
-
x:
|
|
1103
|
-
labelX:
|
|
1104
|
-
exponentX: _,
|
|
1105
|
-
exponentLabel: u,
|
|
1098
|
+
x: f,
|
|
1099
|
+
labelX: h,
|
|
1106
1100
|
scale: r,
|
|
1107
1101
|
majorTicks: i,
|
|
1108
1102
|
minorTicks: Ke(i),
|
|
@@ -1110,12 +1104,12 @@ function $t(e) {
|
|
|
1110
1104
|
seriesList: n.seriesList
|
|
1111
1105
|
};
|
|
1112
1106
|
}), h = m[0]?.scale ?? B(o.yDomain, [t.plotHeight, 0]).nice(), g = u.ticks(Math.max(2, Math.floor(t.width / 100))), _ = m[0]?.majorTicks ?? [], v = m[0]?.tickValues ?? [], y = u.domain(), b = {
|
|
1113
|
-
start: ot(y[0], y, e.timeUnit),
|
|
1114
|
-
end: ot(y[1], y, e.timeUnit)
|
|
1115
|
-
}, x =
|
|
1107
|
+
start: ot(y[0], y, e.timeUnit, "start", e.xAxisLabelFormatter),
|
|
1108
|
+
end: ot(y[1], y, e.timeUnit, "end", e.xAxisLabelFormatter)
|
|
1109
|
+
}, x = b.start.length * 7 + 10, S = b.end.length * 7 + 10, C = g.filter((e) => {
|
|
1116
1110
|
let n = u(e);
|
|
1117
|
-
return n >
|
|
1118
|
-
}),
|
|
1111
|
+
return n > x && n < t.width - S;
|
|
1112
|
+
}), w = o.visibleSeries.map((n) => {
|
|
1119
1113
|
let r = m.find((e) => e.seriesList.some((e) => e.id === n.id)), a = r?.scale ?? h, o = Wt(n.points, y, t.width, e.rendering, {
|
|
1120
1114
|
lineVisible: !i && n.lineType !== "none",
|
|
1121
1115
|
pointVisible: n.pointType !== "none",
|
|
@@ -1154,11 +1148,10 @@ function $t(e) {
|
|
|
1154
1148
|
yMajorTicks: _,
|
|
1155
1149
|
yMinorTicks: m[0]?.minorTicks ?? [],
|
|
1156
1150
|
yAxisTickValues: v,
|
|
1157
|
-
xAxisTickValues:
|
|
1151
|
+
xAxisTickValues: C,
|
|
1158
1152
|
endpointLabels: b,
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
seriesPaths: T,
|
|
1153
|
+
path: w[0]?.path ?? null,
|
|
1154
|
+
seriesPaths: w,
|
|
1162
1155
|
gridLines: e.grid.trackLines[o.id] ?? {
|
|
1163
1156
|
horizontal: !0,
|
|
1164
1157
|
vertical: !0
|
|
@@ -1221,36 +1214,33 @@ function ln(e, t, n, r) {
|
|
|
1221
1214
|
} : e;
|
|
1222
1215
|
});
|
|
1223
1216
|
}
|
|
1224
|
-
function un(e, t = !0) {
|
|
1225
|
-
let
|
|
1226
|
-
t &&
|
|
1227
|
-
let [
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
return
|
|
1217
|
+
function un(e, t = !0, n) {
|
|
1218
|
+
let r = B(e, [1, 0]);
|
|
1219
|
+
t && r.nice();
|
|
1220
|
+
let [i, a] = r.domain(), o = n ?? Array.from(/* @__PURE__ */ new Set([
|
|
1221
|
+
i,
|
|
1222
|
+
...r.ticks(10),
|
|
1223
|
+
a
|
|
1224
|
+
])), s = Math.max(...o);
|
|
1225
|
+
return { tickTextWidth: Math.max(1, ...o.map((e) => nt(e, {
|
|
1226
|
+
axisMin: i,
|
|
1227
|
+
axisMax: a,
|
|
1228
|
+
topTickValue: s
|
|
1229
|
+
}).length)) * en };
|
|
1230
|
+
}
|
|
1231
|
+
function dn(e) {
|
|
1232
|
+
return un(e.domain, !e.fixed).tickTextWidth + tn + rn + an + nn;
|
|
1240
1233
|
}
|
|
1241
1234
|
function fn(e) {
|
|
1242
|
-
return un(e.domain, !e.fixed).tickTextWidth +
|
|
1235
|
+
return un(e.domain, !e.fixed).tickTextWidth + tn + nn;
|
|
1243
1236
|
}
|
|
1244
|
-
function pn(e) {
|
|
1245
|
-
return
|
|
1246
|
-
}
|
|
1247
|
-
function mn(e, t, n, r) {
|
|
1248
|
-
return ln(e, t, n, r).reduce((n, r) => (n[r.side] += t === "multi-axis" || e.visibleSeries.length === 1 ? fn(r) : pn(r), n), {
|
|
1237
|
+
function pn(e, t, n, r) {
|
|
1238
|
+
return ln(e, t, n, r).reduce((n, r) => (n[r.side] += t === "multi-axis" || e.visibleSeries.length === 1 ? dn(r) : fn(r), n), {
|
|
1249
1239
|
left: 0,
|
|
1250
1240
|
right: 0
|
|
1251
1241
|
});
|
|
1252
1242
|
}
|
|
1253
|
-
function
|
|
1243
|
+
function mn(e, t, n) {
|
|
1254
1244
|
let r = (e) => {
|
|
1255
1245
|
let r = t < e.left ? e.left - t : t > e.left + e.width ? t - e.left - e.width : 0;
|
|
1256
1246
|
return n < e.top ? e.top - n : n > e.top + e.height ? n - (e.top + e.height) : r;
|
|
@@ -1269,11 +1259,11 @@ function hn(e, t, n) {
|
|
|
1269
1259
|
}
|
|
1270
1260
|
//#endregion
|
|
1271
1261
|
//#region src/components/annotation/useWaveformChartAnnotations.ts
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1274
|
-
return
|
|
1262
|
+
var hn = 0;
|
|
1263
|
+
function gn() {
|
|
1264
|
+
return hn += 1, typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `annotation-${Date.now()}-${hn}`;
|
|
1275
1265
|
}
|
|
1276
|
-
function
|
|
1266
|
+
function _n(e) {
|
|
1277
1267
|
let { props: t, emit: n, container: r, chartSeries: i, hiddenSeriesIdSet: a, internalHiddenSeriesIds: o, annotationInteraction: s, editorSeriesOptions: c, trackLayouts: l, annotationLayoutsForTrack: u, resolveSeriesYScale: d, chartWidth: f, chartHeight: p, innerWidth: m, resolvedChartLeftMargin: h, titleAreaHeight: g, chartTopMargin: _, activeInteractionMode: v, isPresentationMode: y } = e;
|
|
1278
1268
|
function b(e) {
|
|
1279
1269
|
if (!i.value.some((t) => t.id === e)) return;
|
|
@@ -1306,7 +1296,7 @@ function vn(e) {
|
|
|
1306
1296
|
};
|
|
1307
1297
|
}
|
|
1308
1298
|
function C(e, t, n) {
|
|
1309
|
-
s.openCreate(e,
|
|
1299
|
+
s.openCreate(e, gn, t), c.value = n;
|
|
1310
1300
|
let r = s.editorDraft.value, i = l.value.find((t) => t.index === e.trackIndex)?.seriesList.find((t) => t.id === e.seriesId);
|
|
1311
1301
|
r?.mode === "add" && (r.annotation.style = {
|
|
1312
1302
|
borderColor: i?.color || "#1677ff",
|
|
@@ -1316,7 +1306,7 @@ function vn(e) {
|
|
|
1316
1306
|
}
|
|
1317
1307
|
function w(e) {
|
|
1318
1308
|
if (y.value) return;
|
|
1319
|
-
let t = s.editorDraft.value, n = c.value.find((t) => t.seriesId === e), r = l.value.find((t) => t.seriesList.some((t) => t.id === e)), i = r?.seriesList.find((t) => t.id === e), a = i && t ?
|
|
1309
|
+
let t = s.editorDraft.value, n = c.value.find((t) => t.seriesId === e), r = l.value.find((t) => t.seriesList.some((t) => t.id === e)), i = r?.seriesList.find((t) => t.id === e), a = i && t ? be(i.points, t.annotation.x, i.lineType) : null;
|
|
1320
1310
|
!t || !n || !r || !a || (t.annotation = {
|
|
1321
1311
|
...t.annotation,
|
|
1322
1312
|
seriesId: e,
|
|
@@ -1335,7 +1325,7 @@ function vn(e) {
|
|
|
1335
1325
|
let e = l.value[n];
|
|
1336
1326
|
return e?.hasVisibleSeries ? e : void 0;
|
|
1337
1327
|
}
|
|
1338
|
-
return
|
|
1328
|
+
return mn(l.value.filter((e) => e.hasVisibleSeries), e, t);
|
|
1339
1329
|
}
|
|
1340
1330
|
function D(e, t) {
|
|
1341
1331
|
let n = e.currentTarget;
|
|
@@ -1344,7 +1334,7 @@ function vn(e) {
|
|
|
1344
1334
|
if (!o) return null;
|
|
1345
1335
|
let s = Math.max(0, Math.min(m.value, r)), c = Math.max(0, Math.min(o.width, s - o.left)), d = o.xScale.invert(c);
|
|
1346
1336
|
return {
|
|
1347
|
-
candidates:
|
|
1337
|
+
candidates: q(u(o), d, c, a),
|
|
1348
1338
|
editorAnchor: x(e, t)
|
|
1349
1339
|
};
|
|
1350
1340
|
}
|
|
@@ -1394,7 +1384,7 @@ function vn(e) {
|
|
|
1394
1384
|
let e = s.contextMenu.value, n = t.annotations.find((t) => t.id === e?.annotationId);
|
|
1395
1385
|
if (!n) return;
|
|
1396
1386
|
let r = l.value.find((e) => e.seriesList.some((e) => e.id === n.seriesId));
|
|
1397
|
-
c.value = r ?
|
|
1387
|
+
c.value = r ? q(u(r), n.x, r.xScale(n.x), r.top + d(r, n.seriesId)(n.y)) : [], s.openEdit(n, e?.editorAnchor ?? S(n));
|
|
1398
1388
|
}
|
|
1399
1389
|
function F() {
|
|
1400
1390
|
if (y.value) return;
|
|
@@ -1423,8 +1413,8 @@ function vn(e) {
|
|
|
1423
1413
|
}
|
|
1424
1414
|
//#endregion
|
|
1425
1415
|
//#region src/components/interaction/useWaveformHover.ts
|
|
1426
|
-
var
|
|
1427
|
-
function
|
|
1416
|
+
var vn = N((e) => e.x);
|
|
1417
|
+
function yn(e) {
|
|
1428
1418
|
let { emit: t, hoverState: n, suppressHoverUntilMove: r, hoverThrottle: i, selection: a, trackLayouts: o, innerWidth: s, resolvedChartLeftMargin: c, titleAreaHeight: l, chartTopMargin: u, sharedOverlayElement: d, isPresentationMode: f, updateViewportDrag: p, resolveTrackAtPointer: m } = e, h = () => i.cancel(), g = (e) => i.schedule(e), _ = (e) => n.points.length === e.length && e.every((e, t) => {
|
|
1429
1419
|
let r = n.points[t];
|
|
1430
1420
|
return r?.id === e.id && r.trackIndex === e.trackIndex && r.point === e.point;
|
|
@@ -1445,7 +1435,7 @@ function bn(e) {
|
|
|
1445
1435
|
r.value = !0, y();
|
|
1446
1436
|
}, C = (e = !1) => {
|
|
1447
1437
|
r.value = !e, y();
|
|
1448
|
-
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[
|
|
1438
|
+
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[vn.center(e.points, t)];
|
|
1449
1439
|
return {
|
|
1450
1440
|
cancelPendingHover: h,
|
|
1451
1441
|
clearHover: y,
|
|
@@ -1500,7 +1490,7 @@ function bn(e) {
|
|
|
1500
1490
|
}
|
|
1501
1491
|
//#endregion
|
|
1502
1492
|
//#region src/components/interaction/useWaveformViewport.ts
|
|
1503
|
-
function
|
|
1493
|
+
function bn(e) {
|
|
1504
1494
|
let { props: n, emit: r, selection: i, spacePressed: a, trackLayouts: o, chartTracks: s, initialXDomain: c, innerWidth: l, innerHeight: u, sharedOverlayElement: f, sharedTransform: p, independentTransforms: m, sharedYDomains: h, independentYDomains: g, isZoomMode: _, isPresentationMode: v, editorSeriesOptions: y, resolveInitialTrackDomain: b, canZoomTrack: x, canZoomSharedTracks: S, configureZoom: C, cancelPendingZoom: w, clearHover: T, resolveTrackAtPointer: E } = e, D = t(() => {
|
|
1505
1495
|
let e = i.value;
|
|
1506
1496
|
if (!e) return null;
|
|
@@ -1652,7 +1642,7 @@ function xn(e) {
|
|
|
1652
1642
|
}
|
|
1653
1643
|
//#endregion
|
|
1654
1644
|
//#region src/components/utils/useAnimationFrameThrottle.ts
|
|
1655
|
-
function
|
|
1645
|
+
function xn() {
|
|
1656
1646
|
let e = null, t = null;
|
|
1657
1647
|
function n(n) {
|
|
1658
1648
|
t = n, e === null && (e = requestAnimationFrame(() => {
|
|
@@ -1681,8 +1671,8 @@ function Sn() {
|
|
|
1681
1671
|
}
|
|
1682
1672
|
//#endregion
|
|
1683
1673
|
//#region src/components/interaction/useWaveformZoom.ts
|
|
1684
|
-
function
|
|
1685
|
-
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v =
|
|
1674
|
+
function Sn(e) {
|
|
1675
|
+
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v = xn(), y = !1, b = null, x = null, S = null, C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Set(), D, O = () => v.schedule(j), k = (e) => {
|
|
1686
1676
|
y || m.value || (g(), b = e.transform, x = "wheel", O(), P());
|
|
1687
1677
|
}, A = (e, t) => {
|
|
1688
1678
|
y || m.value || (g(), C.set(t, e.transform), w.set(t, "wheel"), O(), P());
|
|
@@ -1778,7 +1768,7 @@ function Cn(e) {
|
|
|
1778
1768
|
}, H = (e, t) => {
|
|
1779
1769
|
if (e.type !== "wheel") return !1;
|
|
1780
1770
|
let n = e.deltaY;
|
|
1781
|
-
return n < 0 ? t : n > 0 &&
|
|
1771
|
+
return n < 0 ? t : n > 0 && ae(e.currentTarget).k > mt.MIN_SCALE;
|
|
1782
1772
|
};
|
|
1783
1773
|
return {
|
|
1784
1774
|
cancelPendingZoom: F,
|
|
@@ -1815,13 +1805,13 @@ function Cn(e) {
|
|
|
1815
1805
|
}
|
|
1816
1806
|
//#endregion
|
|
1817
1807
|
//#region src/components/core/useWaveformChartLifecycle.ts
|
|
1818
|
-
function
|
|
1808
|
+
function Cn(e) {
|
|
1819
1809
|
return e instanceof Element && !!e.closest("button, input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
1820
1810
|
}
|
|
1821
|
-
function
|
|
1811
|
+
function wn(e) {
|
|
1822
1812
|
let { props: t, emit: n, container: r, titleMeasureElement: i, resizeObserver: a, observedWidth: o, observedHeight: s, measuredTitleWidth: c, measuredTitleHeight: l, resolvedTitleText: u, titleAreaReserved: f, titleMeasureStyle: p, spacePressed: g, pointerInsideChart: _, currentPage: v, pageCount: y, pagedTracks: b, gridOptions: x, chartSeries: S, chartTracks: C, innerWidth: w, innerHeight: T, activeInteractionMode: D, hiddenSeriesIdSet: O, internalHiddenSeriesIds: k, independentTransforms: A, independentYDomains: j, annotationInteraction: M, editorSeriesOptions: N, isPresentationMode: P, clearHover: F, cancelAnnotation: I, configureZoom: L, resetViewport: R, cancelViewportDrag: z, cancelPendingHover: B, clearZoomBindings: V } = e;
|
|
1823
1813
|
function H(e) {
|
|
1824
|
-
P.value || e.code !== "Space" || !t.pannable || !_.value ||
|
|
1814
|
+
P.value || e.code !== "Space" || !t.pannable || !_.value || Cn(e.target) || (g.value = !0, e.preventDefault());
|
|
1825
1815
|
}
|
|
1826
1816
|
function ee(e) {
|
|
1827
1817
|
e.code === "Space" && (g.value = !1);
|
|
@@ -1912,7 +1902,7 @@ function Tn(e) {
|
|
|
1912
1902
|
}
|
|
1913
1903
|
//#endregion
|
|
1914
1904
|
//#region src/components/core/useWaveformData.ts
|
|
1915
|
-
function
|
|
1905
|
+
function Tn(e, t = !1) {
|
|
1916
1906
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = !1;
|
|
1917
1907
|
for (let s of e) if (s.x < n && (n = s.x), s.x > r && (r = s.x), s.y < i && (i = s.y), s.y > a && (a = s.y), t) {
|
|
1918
1908
|
let e = At(s);
|
|
@@ -1924,24 +1914,24 @@ function En(e, t = !1) {
|
|
|
1924
1914
|
hasErrorPoints: o
|
|
1925
1915
|
};
|
|
1926
1916
|
}
|
|
1927
|
-
function
|
|
1917
|
+
function En(e) {
|
|
1928
1918
|
return Mt(e).map((e) => {
|
|
1929
|
-
let t =
|
|
1919
|
+
let t = Tn(e.points, e.errorBar.visible);
|
|
1930
1920
|
return {
|
|
1931
1921
|
...e,
|
|
1932
1922
|
...t
|
|
1933
1923
|
};
|
|
1934
1924
|
});
|
|
1935
1925
|
}
|
|
1936
|
-
function
|
|
1937
|
-
let n = x(
|
|
1926
|
+
function Dn(e, t) {
|
|
1927
|
+
let n = x(En(e()));
|
|
1938
1928
|
return E(e, (e) => {
|
|
1939
|
-
n.value =
|
|
1929
|
+
n.value = En(e), t();
|
|
1940
1930
|
}), n;
|
|
1941
1931
|
}
|
|
1942
1932
|
//#endregion
|
|
1943
1933
|
//#region src/components/core/useWaveformLayout.ts
|
|
1944
|
-
function
|
|
1934
|
+
function On(e) {
|
|
1945
1935
|
let { props: n, preparedSeries: r, currentPage: i, hiddenSeriesIdSet: a, chartWidth: o, innerHeight: s, isCleanView: c, sharedTransform: l, independentTransforms: u, sharedYDomains: d, independentYDomains: f, annotationInteraction: p } = e, m = t(() => r.value.map((e, t) => ({
|
|
1946
1936
|
...e,
|
|
1947
1937
|
color: e.color ?? (t === 0 ? n.lineColor : _t[t % _t.length])
|
|
@@ -1963,25 +1953,14 @@ function kn(e) {
|
|
|
1963
1953
|
};
|
|
1964
1954
|
});
|
|
1965
1955
|
}), g = t(() => Kt(n.grid)), _ = t(() => Pt(n.rendering)), v = t(() => Jt(h.value.length, g.value)), y = t(() => Yt(h.value, i.value, g.value)), b = t(() => {
|
|
1966
|
-
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => ln(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) =>
|
|
1967
|
-
let t = B(e.domain, [1, 0]);
|
|
1968
|
-
e.fixed || t.nice();
|
|
1969
|
-
let [n, r] = t.domain();
|
|
1970
|
-
return {
|
|
1971
|
-
exponentLabel: nt(n, r),
|
|
1972
|
-
tickLabels: t.ticks(10).map((e) => tt(e, {
|
|
1973
|
-
axisMin: n,
|
|
1974
|
-
axisMax: r
|
|
1975
|
-
}))
|
|
1976
|
-
};
|
|
1977
|
-
}), t = Math.max(1, ...e.flatMap(({ tickLabels: e }) => e).map((e) => e.length)) * 7, r = Math.max(0, ...e.map(({ exponentLabel: e }) => (e?.length ?? 0) * 7)), i = r ? r + 8 : 0, a = t + 7 + i + 4, o = -(7 + t + i + 6 + 24 / 2);
|
|
1956
|
+
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => ln(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => un(e.domain, !e.fixed).tickTextWidth), t = Math.max(7, ...e), r = t + 7 + 4, i = -(7 + t + 6 + 24 / 2);
|
|
1978
1957
|
return {
|
|
1979
|
-
tickClearance:
|
|
1980
|
-
fullClearance: t + 7 +
|
|
1981
|
-
labelCenterX:
|
|
1958
|
+
tickClearance: r,
|
|
1959
|
+
fullClearance: t + 7 + 6 + 24 + 4,
|
|
1960
|
+
labelCenterX: i
|
|
1982
1961
|
};
|
|
1983
1962
|
}), x = t(() => h.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), S = t(() => h.value.some((e) => e.visibleSeries.length > 0)), C = t(() => Math.max(pt.left, x.value ? b.value.fullClearance : S.value ? b.value.tickClearance : 0)), w = t(() => h.value.reduce((e, t) => {
|
|
1984
|
-
let r =
|
|
1963
|
+
let r = pn(t, n.overlayMode, n.yDomain, n.yDomains);
|
|
1985
1964
|
return {
|
|
1986
1965
|
left: Math.max(e.left, r.left),
|
|
1987
1966
|
right: Math.max(e.right, r.right)
|
|
@@ -2025,6 +2004,7 @@ function kn(e) {
|
|
|
2025
2004
|
return n ? [[e.id, n]] : [];
|
|
2026
2005
|
})) : d.value,
|
|
2027
2006
|
timeUnit: n.timeUnit,
|
|
2007
|
+
xAxisLabelFormatter: n.axes?.x?.labelFormatter,
|
|
2028
2008
|
rendering: _.value,
|
|
2029
2009
|
hideSecondaryLabels: c.value || O.value.hideSecondaryLabels,
|
|
2030
2010
|
yAxisLabelX: b.value.labelCenterX,
|
|
@@ -2056,7 +2036,7 @@ function kn(e) {
|
|
|
2056
2036
|
annotationLayoutsForTrack: V,
|
|
2057
2037
|
resolveSeriesYScale: H,
|
|
2058
2038
|
annotationTrackLayouts: ee,
|
|
2059
|
-
renderedAnnotations: t(() => n.annotationsVisible ?
|
|
2039
|
+
renderedAnnotations: t(() => n.annotationsVisible ? ge(n.annotations, ee.value, D.value, s.value) : []),
|
|
2060
2040
|
xAxisTitleY: t(() => s.value + 30 + 10),
|
|
2061
2041
|
editorSeries: t(() => {
|
|
2062
2042
|
let e = p.editorDraft.value?.annotation.seriesId, t = m.value.find((t) => t.id === e);
|
|
@@ -2072,13 +2052,13 @@ function kn(e) {
|
|
|
2072
2052
|
}
|
|
2073
2053
|
};
|
|
2074
2054
|
}
|
|
2075
|
-
var
|
|
2076
|
-
function
|
|
2055
|
+
var kn = 1e-6;
|
|
2056
|
+
function An(e) {
|
|
2077
2057
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2078
2058
|
}
|
|
2079
|
-
function
|
|
2080
|
-
let i =
|
|
2081
|
-
if (!(d >
|
|
2059
|
+
function jn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2060
|
+
let i = An(e), a = An(t), o = An(n), s = Number.isFinite(r) ? r : 0, c = s * Math.PI / 180, l = Math.abs(Math.cos(c)), u = Math.abs(Math.sin(c)), d = (s % 360 + 360) % 360;
|
|
2061
|
+
if (!(d > kn && Math.abs(d - 360) > kn)) {
|
|
2082
2062
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2083
2063
|
return {
|
|
2084
2064
|
textWidth: t,
|
|
@@ -2103,7 +2083,7 @@ function Mn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2103
2083
|
}
|
|
2104
2084
|
//#endregion
|
|
2105
2085
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2106
|
-
function
|
|
2086
|
+
function Mn(e) {
|
|
2107
2087
|
let { props: n, observedWidth: r, observedHeight: i, measuredTitleWidth: a, measuredTitleHeight: o, internalHiddenSeriesIds: s, paginationBandHeight: c } = e, l = t(() => Number.isFinite(n.width) ? Math.max(0, n.width ?? 0) : void 0), u = t(() => Number.isFinite(n.height) ? Math.max(180, n.height ?? 0) : void 0), d = t(() => r.value > 0 ? r.value : l.value ?? 0), f = t(() => i.value > 0 ? i.value : u.value ?? 180), p = t(() => ({
|
|
2108
2088
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2109
2089
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -2148,7 +2128,7 @@ function Nn(e) {
|
|
|
2148
2128
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
2149
2129
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
2150
2130
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
2151
|
-
})), N = t(() =>
|
|
2131
|
+
})), N = t(() => jn({
|
|
2152
2132
|
naturalWidth: a.value || A.value,
|
|
2153
2133
|
naturalHeight: o.value || E.value * 1.2,
|
|
2154
2134
|
availableWidth: j.value,
|
|
@@ -2199,10 +2179,10 @@ function Nn(e) {
|
|
|
2199
2179
|
}
|
|
2200
2180
|
//#endregion
|
|
2201
2181
|
//#region src/components/core/useWaveformChartController.ts
|
|
2202
|
-
function
|
|
2182
|
+
function Nn(e, t) {
|
|
2203
2183
|
e.value = t instanceof Element ? t : void 0;
|
|
2204
2184
|
}
|
|
2205
|
-
function
|
|
2185
|
+
function Pn(e, t) {
|
|
2206
2186
|
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(U), p = x([]), m = v({}), h = v({}), g = b({
|
|
2207
2187
|
points: [],
|
|
2208
2188
|
trackIndex: null,
|
|
@@ -2210,11 +2190,11 @@ function Fn(e, t) {
|
|
|
2210
2190
|
x: 0,
|
|
2211
2191
|
y: 0
|
|
2212
2192
|
}
|
|
2213
|
-
}), y = v(!1), S = v(1), w = x(), T =
|
|
2193
|
+
}), y = v(!1), S = v(1), w = x(), T = ce("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j = xn();
|
|
2214
2194
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2215
2195
|
m.value = {}, h.value = {};
|
|
2216
2196
|
}, { deep: !0 });
|
|
2217
|
-
let M = v(null), N = v(!1), P = v(!1), F = () => void 0, I =
|
|
2197
|
+
let M = v(null), N = v(!1), P = v(!1), F = () => void 0, I = Dn(() => e.data, () => F()), L = Mn({
|
|
2218
2198
|
props: e,
|
|
2219
2199
|
observedWidth: o,
|
|
2220
2200
|
observedHeight: s,
|
|
@@ -2222,101 +2202,101 @@ function Fn(e, t) {
|
|
|
2222
2202
|
measuredTitleHeight: l,
|
|
2223
2203
|
internalHiddenSeriesIds: O,
|
|
2224
2204
|
paginationBandHeight: d
|
|
2225
|
-
}), { chartWidth: R, chartHeight: z, isCleanView: B, isPresentationMode: V, hiddenSeriesIdSet: H, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight:
|
|
2205
|
+
}), { chartWidth: R, chartHeight: z, isCleanView: B, isPresentationMode: V, hiddenSeriesIdSet: H, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: ae } = L, oe = On({
|
|
2226
2206
|
props: e,
|
|
2227
2207
|
preparedSeries: I,
|
|
2228
2208
|
currentPage: S,
|
|
2229
2209
|
hiddenSeriesIdSet: H,
|
|
2230
2210
|
chartWidth: R,
|
|
2231
|
-
innerHeight:
|
|
2211
|
+
innerHeight: ae,
|
|
2232
2212
|
isCleanView: B,
|
|
2233
2213
|
sharedTransform: f,
|
|
2234
2214
|
independentTransforms: p,
|
|
2235
2215
|
sharedYDomains: m,
|
|
2236
2216
|
independentYDomains: h,
|
|
2237
2217
|
annotationInteraction: u(k)
|
|
2238
|
-
}), { chartSeries:
|
|
2218
|
+
}), { chartSeries: W, chartTracks: se, gridOptions: le, pageCount: ue, pagedTracks: de, resolvedChartLeftMargin: fe, innerWidth: G, hasChartArea: pe, activeInteractionMode: me, isZoomMode: he, initialXDomain: ge, sharedZoomDomain: _e, resolveInitialTrackDomain: K, trackLayouts: ve, annotationLayoutsForTrack: ye, resolveSeriesYScale: be } = oe;
|
|
2239
2219
|
D(() => {
|
|
2240
|
-
d.value =
|
|
2220
|
+
d.value = le.value.showPagination && ue.value > 1 && R.value <= 520 ? 40 : 0;
|
|
2241
2221
|
});
|
|
2242
|
-
let
|
|
2222
|
+
let q = Sn({
|
|
2243
2223
|
props: e,
|
|
2244
2224
|
emit: t,
|
|
2245
2225
|
svgElement: r,
|
|
2246
2226
|
sharedOverlayElement: a,
|
|
2247
2227
|
sharedTransform: f,
|
|
2248
2228
|
independentTransforms: p,
|
|
2249
|
-
trackLayouts:
|
|
2250
|
-
initialXDomain:
|
|
2251
|
-
sharedZoomDomain:
|
|
2252
|
-
innerWidth:
|
|
2253
|
-
innerHeight:
|
|
2254
|
-
hasChartArea:
|
|
2255
|
-
isZoomMode:
|
|
2229
|
+
trackLayouts: ve,
|
|
2230
|
+
initialXDomain: ge,
|
|
2231
|
+
sharedZoomDomain: _e,
|
|
2232
|
+
innerWidth: G,
|
|
2233
|
+
innerHeight: ae,
|
|
2234
|
+
hasChartArea: pe,
|
|
2235
|
+
isZoomMode: he,
|
|
2256
2236
|
isPresentationMode: V,
|
|
2257
|
-
resolveInitialTrackDomain:
|
|
2258
|
-
cancelPendingHover: () =>
|
|
2259
|
-
}),
|
|
2237
|
+
resolveInitialTrackDomain: K,
|
|
2238
|
+
cancelPendingHover: () => Y.cancelPendingHover()
|
|
2239
|
+
}), J = _n({
|
|
2260
2240
|
props: e,
|
|
2261
2241
|
emit: t,
|
|
2262
2242
|
container: n,
|
|
2263
|
-
chartSeries:
|
|
2243
|
+
chartSeries: W,
|
|
2264
2244
|
hiddenSeriesIdSet: H,
|
|
2265
2245
|
internalHiddenSeriesIds: O,
|
|
2266
2246
|
annotationInteraction: k,
|
|
2267
2247
|
editorSeriesOptions: A,
|
|
2268
|
-
trackLayouts:
|
|
2269
|
-
annotationLayoutsForTrack:
|
|
2270
|
-
resolveSeriesYScale:
|
|
2248
|
+
trackLayouts: ve,
|
|
2249
|
+
annotationLayoutsForTrack: ye,
|
|
2250
|
+
resolveSeriesYScale: be,
|
|
2271
2251
|
chartWidth: R,
|
|
2272
2252
|
chartHeight: z,
|
|
2273
|
-
innerWidth:
|
|
2274
|
-
resolvedChartLeftMargin:
|
|
2253
|
+
innerWidth: G,
|
|
2254
|
+
resolvedChartLeftMargin: fe,
|
|
2275
2255
|
titleAreaHeight: re,
|
|
2276
2256
|
chartTopMargin: ie,
|
|
2277
|
-
activeInteractionMode:
|
|
2257
|
+
activeInteractionMode: me,
|
|
2278
2258
|
isPresentationMode: V
|
|
2279
|
-
}),
|
|
2259
|
+
}), xe = bn({
|
|
2280
2260
|
props: e,
|
|
2281
2261
|
emit: t,
|
|
2282
2262
|
selection: M,
|
|
2283
2263
|
spacePressed: N,
|
|
2284
|
-
trackLayouts:
|
|
2285
|
-
chartTracks:
|
|
2286
|
-
initialXDomain:
|
|
2287
|
-
innerWidth:
|
|
2288
|
-
innerHeight:
|
|
2264
|
+
trackLayouts: ve,
|
|
2265
|
+
chartTracks: se,
|
|
2266
|
+
initialXDomain: ge,
|
|
2267
|
+
innerWidth: G,
|
|
2268
|
+
innerHeight: ae,
|
|
2289
2269
|
sharedOverlayElement: a,
|
|
2290
2270
|
sharedTransform: f,
|
|
2291
2271
|
independentTransforms: p,
|
|
2292
2272
|
sharedYDomains: m,
|
|
2293
2273
|
independentYDomains: h,
|
|
2294
|
-
isZoomMode:
|
|
2274
|
+
isZoomMode: he,
|
|
2295
2275
|
isPresentationMode: V,
|
|
2296
2276
|
editorSeriesOptions: A,
|
|
2297
|
-
resolveInitialTrackDomain:
|
|
2298
|
-
canZoomTrack:
|
|
2299
|
-
canZoomSharedTracks:
|
|
2300
|
-
configureZoom:
|
|
2301
|
-
cancelPendingZoom:
|
|
2302
|
-
clearHover: () =>
|
|
2303
|
-
resolveTrackAtPointer:
|
|
2304
|
-
}),
|
|
2277
|
+
resolveInitialTrackDomain: K,
|
|
2278
|
+
canZoomTrack: q.canZoomTrack,
|
|
2279
|
+
canZoomSharedTracks: q.canZoomSharedTracks,
|
|
2280
|
+
configureZoom: q.configureZoom,
|
|
2281
|
+
cancelPendingZoom: q.cancelPendingZoom,
|
|
2282
|
+
clearHover: () => Y.clearHover(),
|
|
2283
|
+
resolveTrackAtPointer: J.resolveTrackAtPointer
|
|
2284
|
+
}), Y = yn({
|
|
2305
2285
|
emit: t,
|
|
2306
2286
|
hoverState: g,
|
|
2307
2287
|
suppressHoverUntilMove: y,
|
|
2308
2288
|
hoverThrottle: j,
|
|
2309
2289
|
selection: M,
|
|
2310
|
-
trackLayouts:
|
|
2311
|
-
innerWidth:
|
|
2312
|
-
resolvedChartLeftMargin:
|
|
2290
|
+
trackLayouts: ve,
|
|
2291
|
+
innerWidth: G,
|
|
2292
|
+
resolvedChartLeftMargin: fe,
|
|
2313
2293
|
titleAreaHeight: re,
|
|
2314
2294
|
chartTopMargin: ie,
|
|
2315
2295
|
sharedOverlayElement: a,
|
|
2316
2296
|
isPresentationMode: V,
|
|
2317
|
-
updateViewportDrag:
|
|
2318
|
-
resolveTrackAtPointer:
|
|
2319
|
-
}),
|
|
2297
|
+
updateViewportDrag: xe.updateViewportDrag,
|
|
2298
|
+
resolveTrackAtPointer: J.resolveTrackAtPointer
|
|
2299
|
+
}), Se = wn({
|
|
2320
2300
|
props: e,
|
|
2321
2301
|
emit: t,
|
|
2322
2302
|
container: n,
|
|
@@ -2332,14 +2312,14 @@ function Fn(e, t) {
|
|
|
2332
2312
|
spacePressed: N,
|
|
2333
2313
|
pointerInsideChart: P,
|
|
2334
2314
|
currentPage: S,
|
|
2335
|
-
pageCount:
|
|
2336
|
-
pagedTracks:
|
|
2337
|
-
gridOptions:
|
|
2338
|
-
chartSeries:
|
|
2339
|
-
chartTracks:
|
|
2340
|
-
innerWidth:
|
|
2341
|
-
innerHeight:
|
|
2342
|
-
activeInteractionMode:
|
|
2315
|
+
pageCount: ue,
|
|
2316
|
+
pagedTracks: de,
|
|
2317
|
+
gridOptions: le,
|
|
2318
|
+
chartSeries: W,
|
|
2319
|
+
chartTracks: se,
|
|
2320
|
+
innerWidth: G,
|
|
2321
|
+
innerHeight: ae,
|
|
2322
|
+
activeInteractionMode: me,
|
|
2343
2323
|
hiddenSeriesIdSet: H,
|
|
2344
2324
|
internalHiddenSeriesIds: O,
|
|
2345
2325
|
independentTransforms: p,
|
|
@@ -2347,21 +2327,21 @@ function Fn(e, t) {
|
|
|
2347
2327
|
annotationInteraction: k,
|
|
2348
2328
|
editorSeriesOptions: A,
|
|
2349
2329
|
isPresentationMode: V,
|
|
2350
|
-
clearHover:
|
|
2351
|
-
cancelAnnotation:
|
|
2352
|
-
configureZoom:
|
|
2353
|
-
resetViewport:
|
|
2354
|
-
cancelViewportDrag:
|
|
2355
|
-
cancelPendingHover:
|
|
2356
|
-
clearZoomBindings:
|
|
2330
|
+
clearHover: Y.clearHover,
|
|
2331
|
+
cancelAnnotation: J.cancelAnnotation,
|
|
2332
|
+
configureZoom: q.configureZoom,
|
|
2333
|
+
resetViewport: xe.resetViewport,
|
|
2334
|
+
cancelViewportDrag: xe.cancelViewportDrag,
|
|
2335
|
+
cancelPendingHover: Y.cancelPendingHover,
|
|
2336
|
+
clearZoomBindings: q.clearZoomBindings
|
|
2357
2337
|
});
|
|
2358
|
-
return F =
|
|
2338
|
+
return F = Se.handleDataReferenceChange, _({
|
|
2359
2339
|
...C(e),
|
|
2360
2340
|
...L,
|
|
2361
|
-
...
|
|
2341
|
+
...oe,
|
|
2342
|
+
...J,
|
|
2343
|
+
...xe,
|
|
2362
2344
|
...Y,
|
|
2363
|
-
...be,
|
|
2364
|
-
...X,
|
|
2365
2345
|
margin: pt,
|
|
2366
2346
|
getPageSize: qt,
|
|
2367
2347
|
currentPage: S,
|
|
@@ -2373,32 +2353,32 @@ function Fn(e, t) {
|
|
|
2373
2353
|
contextMenu: k.contextMenu,
|
|
2374
2354
|
editorSeriesOptions: A,
|
|
2375
2355
|
clipPathId: T,
|
|
2376
|
-
goToPage:
|
|
2377
|
-
setContainer: (e) =>
|
|
2378
|
-
setSvgElement: (e) =>
|
|
2379
|
-
setTitleMeasureElement: (e) =>
|
|
2380
|
-
setSharedOverlayElement: (e) =>
|
|
2356
|
+
goToPage: Se.goToPage,
|
|
2357
|
+
setContainer: (e) => Nn(n, e),
|
|
2358
|
+
setSvgElement: (e) => Nn(r, e),
|
|
2359
|
+
setTitleMeasureElement: (e) => Nn(i, e),
|
|
2360
|
+
setSharedOverlayElement: (e) => Nn(a, e)
|
|
2381
2361
|
});
|
|
2382
2362
|
}
|
|
2383
2363
|
//#endregion
|
|
2384
2364
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
2385
|
-
var
|
|
2365
|
+
var Fn = ["aria-labelledby"], In = { class: "waveform-annotation-editor__panel" }, Ln = { class: "waveform-annotation-editor__header" }, Rn = ["id"], zn = {
|
|
2386
2366
|
class: "waveform-annotation-editor__coordinates",
|
|
2387
2367
|
"aria-label": "标注坐标"
|
|
2388
|
-
},
|
|
2368
|
+
}, Bn = {
|
|
2389
2369
|
key: 0,
|
|
2390
2370
|
class: "waveform-annotation-editor__series",
|
|
2391
2371
|
"aria-label": "标注所属波形"
|
|
2392
|
-
},
|
|
2372
|
+
}, Vn = { class: "waveform-annotation-editor__series-label" }, Hn = ["value"], Un = ["value"], Wn = { key: 1 }, Gn = { class: "waveform-annotation-editor__field" }, Kn = { class: "waveform-annotation-editor__label-row" }, qn = ["maxlength"], Jn = { class: "waveform-annotation-editor__colors" }, Yn = {
|
|
2393
2373
|
class: "waveform-annotation-editor__color-field",
|
|
2394
2374
|
title: "调整标注边框色和透明度"
|
|
2395
|
-
},
|
|
2375
|
+
}, Xn = {
|
|
2396
2376
|
class: "waveform-annotation-editor__color-field",
|
|
2397
2377
|
title: "调整标注文字色和透明度"
|
|
2398
|
-
},
|
|
2378
|
+
}, Zn = {
|
|
2399
2379
|
class: "waveform-annotation-editor__color-field",
|
|
2400
2380
|
title: "调整标注背景色和透明度"
|
|
2401
|
-
},
|
|
2381
|
+
}, Qn = { class: "waveform-annotation-editor__actions" }, $n = ["disabled"], er = /*#__PURE__*/ X(/* @__PURE__ */ c({
|
|
2402
2382
|
__name: "WaveformAnnotationEditor",
|
|
2403
2383
|
props: {
|
|
2404
2384
|
annotation: {},
|
|
@@ -2413,7 +2393,7 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2413
2393
|
"series-change"
|
|
2414
2394
|
],
|
|
2415
2395
|
setup(n, { emit: o }) {
|
|
2416
|
-
let c = n, l = o, u = v(), f =
|
|
2396
|
+
let c = n, l = o, u = v(), f = ce("waveform-annotation-editor-title"), m = v(""), h = v(""), _ = v(""), b = v(""), x = t(() => m.value.trim().length > 0), C = t(() => m.value.length), D = t(() => {
|
|
2417
2397
|
let e = c.seriesOptions?.find((e) => e.seriesId === c.annotation.seriesId);
|
|
2418
2398
|
return e ? {
|
|
2419
2399
|
id: e.seriesId,
|
|
@@ -2423,7 +2403,7 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2423
2403
|
} : c.series;
|
|
2424
2404
|
});
|
|
2425
2405
|
function A() {
|
|
2426
|
-
let e =
|
|
2406
|
+
let e = Se(c.annotation.style);
|
|
2427
2407
|
m.value = c.annotation.text, h.value = e.borderColor, _.value = e.textColor, b.value = e.backgroundColor, d(() => u.value?.focus());
|
|
2428
2408
|
}
|
|
2429
2409
|
E(() => c.annotation, A, { immediate: !0 });
|
|
@@ -2451,21 +2431,21 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2451
2431
|
"aria-modal": "true",
|
|
2452
2432
|
"aria-labelledby": w(f),
|
|
2453
2433
|
onClick: n[6] ||= k((e) => l("cancel"), ["self"])
|
|
2454
|
-
}, [a("section",
|
|
2455
|
-
a("header",
|
|
2434
|
+
}, [a("section", In, [
|
|
2435
|
+
a("header", Ln, [a("div", null, [a("h2", { id: w(f) }, S(c.mode === "add" ? "添加标注" : "编辑标注"), 9, Rn)]), a("button", {
|
|
2456
2436
|
type: "button",
|
|
2457
2437
|
class: "waveform-annotation-editor__close",
|
|
2458
2438
|
"aria-label": "关闭标注编辑器",
|
|
2459
2439
|
title: "关闭",
|
|
2460
2440
|
onClick: n[0] ||= (e) => l("cancel")
|
|
2461
2441
|
}, " × ")]),
|
|
2462
|
-
a("div",
|
|
2463
|
-
D.value ? (g(), i("label",
|
|
2442
|
+
a("div", zn, [a("span", null, [a("b", null, "X (" + S(c.timeUnit) + ")", 1), a("code", null, S(w(ut)(c.annotation.x, c.timeUnit)), 1)]), a("span", null, [n[7] ||= a("b", null, "Y", -1), a("code", null, S(w(it)(c.annotation.y)), 1)])]),
|
|
2443
|
+
D.value ? (g(), i("label", Bn, [
|
|
2464
2444
|
a("i", {
|
|
2465
2445
|
style: p({ backgroundColor: D.value.color }),
|
|
2466
2446
|
"aria-hidden": "true"
|
|
2467
2447
|
}, null, 4),
|
|
2468
|
-
a("span",
|
|
2448
|
+
a("span", Vn, [n[8] ||= a("small", null, "标注波形", -1), a("b", null, S(D.value.name), 1)]),
|
|
2469
2449
|
c.seriesOptions?.length ? (g(), i("select", {
|
|
2470
2450
|
key: 0,
|
|
2471
2451
|
value: c.annotation.seriesId,
|
|
@@ -2474,9 +2454,9 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2474
2454
|
}, [(g(!0), i(e, null, y(c.seriesOptions, (e) => (g(), i("option", {
|
|
2475
2455
|
key: e.seriesId,
|
|
2476
2456
|
value: e.seriesId
|
|
2477
|
-
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9,
|
|
2457
|
+
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9, Un))), 128))], 40, Hn)) : D.value.unit ? (g(), i("code", Wn, S(D.value.unit), 1)) : r("", !0)
|
|
2478
2458
|
])) : r("", !0),
|
|
2479
|
-
a("label",
|
|
2459
|
+
a("label", Gn, [a("span", Kn, [n[9] ||= a("b", null, "标注文本", -1), a("small", null, S(C.value) + "/" + S(w(40)), 1)]), O(a("textarea", {
|
|
2480
2460
|
ref_key: "textarea",
|
|
2481
2461
|
ref: u,
|
|
2482
2462
|
"onUpdate:modelValue": n[1] ||= (e) => m.value = e,
|
|
@@ -2485,10 +2465,10 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2485
2465
|
"aria-label": "标注文本",
|
|
2486
2466
|
placeholder: "输入这处波形的说明",
|
|
2487
2467
|
onKeydown: M
|
|
2488
|
-
}, null, 40,
|
|
2489
|
-
a("fieldset",
|
|
2468
|
+
}, null, 40, qn), [[T, m.value]])]),
|
|
2469
|
+
a("fieldset", Jn, [
|
|
2490
2470
|
n[13] ||= a("legend", null, "颜色与透明度", -1),
|
|
2491
|
-
a("label",
|
|
2471
|
+
a("label", Yn, [n[10] ||= a("span", null, "边框色", -1), s(w(W), {
|
|
2492
2472
|
"pure-color": h.value,
|
|
2493
2473
|
"onUpdate:pureColor": n[2] ||= (e) => h.value = e,
|
|
2494
2474
|
"aria-label": "标注边框色",
|
|
@@ -2498,7 +2478,7 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2498
2478
|
"disable-alpha": !1,
|
|
2499
2479
|
"blur-close": !0
|
|
2500
2480
|
}, null, 8, ["pure-color"])]),
|
|
2501
|
-
a("label",
|
|
2481
|
+
a("label", Xn, [n[11] ||= a("span", null, "文字色", -1), s(w(W), {
|
|
2502
2482
|
"pure-color": _.value,
|
|
2503
2483
|
"onUpdate:pureColor": n[3] ||= (e) => _.value = e,
|
|
2504
2484
|
"aria-label": "标注文字色",
|
|
@@ -2508,7 +2488,7 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2508
2488
|
"disable-alpha": !1,
|
|
2509
2489
|
"blur-close": !0
|
|
2510
2490
|
}, null, 8, ["pure-color"])]),
|
|
2511
|
-
a("label",
|
|
2491
|
+
a("label", Zn, [n[12] ||= a("span", null, "背景色", -1), s(w(W), {
|
|
2512
2492
|
"pure-color": b.value,
|
|
2513
2493
|
"onUpdate:pureColor": n[4] ||= (e) => b.value = e,
|
|
2514
2494
|
"aria-label": "标注背景色",
|
|
@@ -2519,7 +2499,7 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2519
2499
|
"blur-close": !0
|
|
2520
2500
|
}, null, 8, ["pure-color"])])
|
|
2521
2501
|
]),
|
|
2522
|
-
a("footer",
|
|
2502
|
+
a("footer", Qn, [a("button", {
|
|
2523
2503
|
type: "button",
|
|
2524
2504
|
onClick: n[5] ||= (e) => l("cancel")
|
|
2525
2505
|
}, "取消"), a("button", {
|
|
@@ -2527,10 +2507,10 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2527
2507
|
class: "is-primary",
|
|
2528
2508
|
disabled: !x.value,
|
|
2529
2509
|
onClick: j
|
|
2530
|
-
}, " 保存标注 ", 8,
|
|
2531
|
-
])], 8,
|
|
2510
|
+
}, " 保存标注 ", 8, $n)])
|
|
2511
|
+
])], 8, Fn));
|
|
2532
2512
|
}
|
|
2533
|
-
}), [["__scopeId", "data-v-52818b45"]]),
|
|
2513
|
+
}), [["__scopeId", "data-v-52818b45"]]), tr = { class: "waveform-tooltip__time waveform-chart__tooltip-time" }, nr = { key: 0 }, rr = { class: "waveform-tooltip__value" }, ir = { key: 0 }, ar = 12, or = 8, sr = 238, cr = /*#__PURE__*/ X(/* @__PURE__ */ c({
|
|
2534
2514
|
__name: "WaveformTooltip",
|
|
2535
2515
|
props: {
|
|
2536
2516
|
visible: { type: Boolean },
|
|
@@ -2544,9 +2524,9 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2544
2524
|
setup(n) {
|
|
2545
2525
|
let s = n, c = t(() => {
|
|
2546
2526
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
2547
|
-
let e = 44 + s.seriesPoints.length * 22, t = s.position.x +
|
|
2527
|
+
let e = 44 + s.seriesPoints.length * 22, t = s.position.x + ar, n = s.position.x - ar - sr;
|
|
2548
2528
|
return {
|
|
2549
|
-
...t +
|
|
2529
|
+
...t + sr <= s.containerWidth - or ? { left: `${t}px` } : n >= or ? { right: `${s.containerWidth - s.position.x + ar}px` } : { left: `${or}px` },
|
|
2550
2530
|
top: `${Math.max(8, Math.min(s.position.y - 18, s.containerHeight - e - 8))}px`
|
|
2551
2531
|
};
|
|
2552
2532
|
});
|
|
@@ -2558,16 +2538,16 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2558
2538
|
key: 0,
|
|
2559
2539
|
class: "waveform-tooltip waveform-chart__tooltip",
|
|
2560
2540
|
style: p(c.value)
|
|
2561
|
-
}, [a("span",
|
|
2541
|
+
}, [a("span", tr, S(n.timeUnit) + ": " + S(w(lt)(n.hoveredPoint.x, n.timeUnit)), 1), (g(!0), i(e, null, y(n.seriesPoints, (e) => (g(), i("span", {
|
|
2562
2542
|
key: `${e.trackIndex}-${e.name}`,
|
|
2563
2543
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
2564
2544
|
}, [
|
|
2565
2545
|
a("i", { style: p({ backgroundColor: e.color }) }, null, 4),
|
|
2566
|
-
e.name ? (g(), i("strong",
|
|
2567
|
-
a("span",
|
|
2546
|
+
e.name ? (g(), i("strong", nr, S(e.name) + ":", 1)) : r("", !0),
|
|
2547
|
+
a("span", rr, [o(S(w(rt)(e.point.y)) + S(e.unit ? ` ${e.unit}` : "") + " ", 1), l(e.point) ? (g(), i("small", ir, S(l(e.point)), 1)) : r("", !0)])
|
|
2568
2548
|
]))), 128))], 4)) : r("", !0);
|
|
2569
2549
|
}
|
|
2570
|
-
}), [["__scopeId", "data-v-b8b5592a"]]),
|
|
2550
|
+
}), [["__scopeId", "data-v-b8b5592a"]]), lr = /* @__PURE__ */ c({
|
|
2571
2551
|
__name: "WaveformHoverHost",
|
|
2572
2552
|
props: {
|
|
2573
2553
|
state: {},
|
|
@@ -2578,7 +2558,7 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2578
2558
|
},
|
|
2579
2559
|
setup(e) {
|
|
2580
2560
|
let r = e, i = t(() => r.state.points[0]?.point ?? null);
|
|
2581
|
-
return (t, r) => (g(), n(
|
|
2561
|
+
return (t, r) => (g(), n(cr, {
|
|
2582
2562
|
visible: e.visible && i.value !== null,
|
|
2583
2563
|
position: e.state.position,
|
|
2584
2564
|
"time-unit": e.timeUnit,
|
|
@@ -2596,16 +2576,16 @@ var In = ["aria-labelledby"], Ln = { class: "waveform-annotation-editor__panel"
|
|
|
2596
2576
|
"container-height"
|
|
2597
2577
|
]));
|
|
2598
2578
|
}
|
|
2599
|
-
}),
|
|
2579
|
+
}), ur = 13, dr = 2, fr = 14, pr = 8, mr = 24, hr = {
|
|
2600
2580
|
circle: ee,
|
|
2601
2581
|
square: ne,
|
|
2602
2582
|
triangle: re,
|
|
2603
2583
|
diamond: te
|
|
2604
2584
|
};
|
|
2605
|
-
function
|
|
2606
|
-
return e === "none" ? null : H().type(
|
|
2585
|
+
function gr(e, t = 48) {
|
|
2586
|
+
return e === "none" ? null : H().type(hr[e]).size(t)() ?? null;
|
|
2607
2587
|
}
|
|
2608
|
-
function
|
|
2588
|
+
function _r(e, t, n = 48) {
|
|
2609
2589
|
if (e === "none" || t.length === 0) return null;
|
|
2610
2590
|
if (e === "circle") {
|
|
2611
2591
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -2622,24 +2602,24 @@ function vr(e, t, n = 48) {
|
|
|
2622
2602
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
2623
2603
|
return t.map(({ x: e, y: t }) => `M${e},${t - r}L${e + i},${t}L${e},${t + r}L${e - i},${t}Z`).join("");
|
|
2624
2604
|
}
|
|
2625
|
-
function
|
|
2605
|
+
function vr(e) {
|
|
2626
2606
|
return e === "none" ? null : "M1 8H25";
|
|
2627
2607
|
}
|
|
2628
|
-
function
|
|
2608
|
+
function yr(e) {
|
|
2629
2609
|
if (e === "dashed") return "8 5";
|
|
2630
2610
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
2631
2611
|
}
|
|
2632
|
-
function
|
|
2633
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
2612
|
+
function br(e) {
|
|
2613
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, mr) : pr) / 2, n = ur - t, r = ur + t;
|
|
2634
2614
|
return [
|
|
2635
|
-
`M${n} ${
|
|
2636
|
-
`M${
|
|
2637
|
-
`M${n} ${
|
|
2615
|
+
`M${n} ${dr}H${r}`,
|
|
2616
|
+
`M${ur} ${dr}V${fr}`,
|
|
2617
|
+
`M${n} ${fr}H${r}`
|
|
2638
2618
|
].join("");
|
|
2639
2619
|
}
|
|
2640
2620
|
//#endregion
|
|
2641
2621
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
2642
|
-
var
|
|
2622
|
+
var xr = ["clip-path"], Sr = ["data-series-id", "data-series-name"], Cr = [
|
|
2643
2623
|
"data-series-id",
|
|
2644
2624
|
"data-series-name",
|
|
2645
2625
|
"data-y-axis-index",
|
|
@@ -2648,11 +2628,11 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2648
2628
|
"d",
|
|
2649
2629
|
"stroke",
|
|
2650
2630
|
"stroke-dasharray"
|
|
2651
|
-
],
|
|
2631
|
+
], wr = ["data-series-id"], Tr = [
|
|
2652
2632
|
"d",
|
|
2653
2633
|
"stroke",
|
|
2654
2634
|
"stroke-width"
|
|
2655
|
-
],
|
|
2635
|
+
], Er = ["data-series-id", "data-point-type"], Dr = ["d", "fill"], Or = /*#__PURE__*/ X(/* @__PURE__ */ c({
|
|
2656
2636
|
__name: "WaveformSeriesLayer",
|
|
2657
2637
|
props: {
|
|
2658
2638
|
track: {},
|
|
@@ -2660,7 +2640,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2660
2640
|
},
|
|
2661
2641
|
setup(n) {
|
|
2662
2642
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
2663
|
-
let t =
|
|
2643
|
+
let t = _r(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
2664
2644
|
x: a.track.xScale(t.x),
|
|
2665
2645
|
y: e.yScale(t.y)
|
|
2666
2646
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
@@ -2697,8 +2677,8 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2697
2677
|
"data-line-style": e.series.lineStyle,
|
|
2698
2678
|
d: e.path,
|
|
2699
2679
|
stroke: e.series.color,
|
|
2700
|
-
"stroke-dasharray": w(
|
|
2701
|
-
}, null, 8,
|
|
2680
|
+
"stroke-dasharray": w(yr)(e.series.lineStyle)
|
|
2681
|
+
}, null, 8, Cr)) : r("", !0),
|
|
2702
2682
|
e.series.errorBar.visible ? (g(), i("g", {
|
|
2703
2683
|
key: 1,
|
|
2704
2684
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -2709,7 +2689,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2709
2689
|
d: e.errorBarPath,
|
|
2710
2690
|
stroke: e.series.errorBar.color || e.series.color,
|
|
2711
2691
|
"stroke-width": e.series.errorBar.width
|
|
2712
|
-
}, null, 8,
|
|
2692
|
+
}, null, 8, Tr)) : r("", !0)], 8, wr)) : r("", !0),
|
|
2713
2693
|
e.series.pointType === "none" ? r("", !0) : (g(), i("g", {
|
|
2714
2694
|
key: 2,
|
|
2715
2695
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -2720,24 +2700,20 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2720
2700
|
class: "waveform-track__point waveform-chart__point",
|
|
2721
2701
|
d: e.pointPath,
|
|
2722
2702
|
fill: e.series.color
|
|
2723
|
-
}, null, 8,
|
|
2724
|
-
], 8,
|
|
2703
|
+
}, null, 8, Dr)) : r("", !0)], 8, Er))
|
|
2704
|
+
], 8, Sr))), 128))], 8, xr)) : r("", !0);
|
|
2725
2705
|
}
|
|
2726
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
2706
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), kr = ["transform"], Ar = ["transform"], jr = {
|
|
2727
2707
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
2728
2708
|
x: "0",
|
|
2729
2709
|
y: "7",
|
|
2730
2710
|
dy: "0.71em",
|
|
2731
2711
|
"text-anchor": "start"
|
|
2732
|
-
},
|
|
2712
|
+
}, Mr = ["x"], Nr = [
|
|
2733
2713
|
"data-y-axis-index",
|
|
2734
2714
|
"data-y-axis-side",
|
|
2735
2715
|
"transform"
|
|
2736
|
-
], Ir = [
|
|
2737
|
-
"data-y-axis-index",
|
|
2738
|
-
"x",
|
|
2739
|
-
"text-anchor"
|
|
2740
|
-
], Lr = { key: 3 }, Rr = ["x", "y"], zr = ["fill", "transform"], Br = ["data-y-axis-title-index"], Vr = ["x", "y"], Hr = ["fill", "transform"], Ur = /* @__PURE__ */ c({
|
|
2716
|
+
], Pr = { key: 2 }, Fr = ["x", "y"], Ir = ["fill", "transform"], Lr = ["data-y-axis-title-index"], Rr = ["x", "y"], zr = ["fill", "transform"], Br = /* @__PURE__ */ c({
|
|
2741
2717
|
__name: "WaveformTrackAxes",
|
|
2742
2718
|
props: {
|
|
2743
2719
|
track: {},
|
|
@@ -2766,14 +2742,15 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2766
2742
|
if (n.track.yAxes.forEach((e, t) => {
|
|
2767
2743
|
let r = s.value[t];
|
|
2768
2744
|
if (!r) return;
|
|
2769
|
-
let [i, a] = e.scale.domain(), o = (e.side === "left" ? j(e.scale) : M(e.scale)).tickFormat((e) =>
|
|
2745
|
+
let [i, a] = e.scale.domain(), o = Math.max(...e.tickValues), c = (e.side === "left" ? j(e.scale) : M(e.scale)).tickFormat((e) => nt(Number(e), {
|
|
2770
2746
|
axisMin: i,
|
|
2771
|
-
axisMax: a
|
|
2772
|
-
|
|
2773
|
-
|
|
2747
|
+
axisMax: a,
|
|
2748
|
+
topTickValue: o
|
|
2749
|
+
})).tickSize(-4).tickPadding(7).tickSizeOuter(0).tickValues(e.tickValues), l = V(r);
|
|
2750
|
+
l.call(c), l.selectAll("path.domain").attr("display", n.axes?.y?.lineVisible === !1 ? "none" : null);
|
|
2774
2751
|
}), !o.value) return;
|
|
2775
2752
|
let e = V(o.value);
|
|
2776
|
-
e.call(A(n.track.xScale).tickValues(n.track.xAxisTickValues).tickFormat((e) =>
|
|
2753
|
+
e.call(A(n.track.xScale).tickValues(n.track.xAxisTickValues).tickFormat((e) => ot(Number(e), n.track.xScale.domain(), n.timeUnit, "tick", n.axes?.x?.labelFormatter)).tickSize(-4).tickPadding(7).tickSizeOuter(0)), e.selectAll("path.domain").attr("display", n.axes?.x?.lineVisible === !1 ? "none" : null);
|
|
2777
2754
|
}
|
|
2778
2755
|
return h(async () => {
|
|
2779
2756
|
await d(), m();
|
|
@@ -2783,6 +2760,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2783
2760
|
() => n.track.xAxisTickValues,
|
|
2784
2761
|
() => n.track.yAxisTickValues,
|
|
2785
2762
|
() => n.timeUnit,
|
|
2763
|
+
() => n.axes?.x?.labelFormatter,
|
|
2786
2764
|
() => n.axes?.x?.lineVisible,
|
|
2787
2765
|
() => n.axes?.y?.lineVisible
|
|
2788
2766
|
], async () => {
|
|
@@ -2794,7 +2772,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2794
2772
|
ref: o,
|
|
2795
2773
|
class: f(["waveform-track__axis waveform-track__axis--x waveform-chart__axis waveform-chart__axis--x", { "waveform-track__axis--line-hidden": t.axes?.x?.lineVisible === !1 }]),
|
|
2796
2774
|
transform: `translate(0, ${t.track.height})`
|
|
2797
|
-
}, null, 10,
|
|
2775
|
+
}, null, 10, kr)) : r("", !0),
|
|
2798
2776
|
t.track.showXAxis ? (g(), i("g", {
|
|
2799
2777
|
key: 1,
|
|
2800
2778
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -2802,21 +2780,13 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2802
2780
|
"font-family": "sans-serif",
|
|
2803
2781
|
"font-size": "10",
|
|
2804
2782
|
"aria-hidden": "true"
|
|
2805
|
-
}, [a("text",
|
|
2783
|
+
}, [a("text", jr, S(t.track.endpointLabels.start), 1), a("text", {
|
|
2806
2784
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
2807
2785
|
x: t.track.width ?? t.innerWidth,
|
|
2808
2786
|
y: "7",
|
|
2809
2787
|
dy: "0.71em",
|
|
2810
2788
|
"text-anchor": "end"
|
|
2811
|
-
}, S(t.track.endpointLabels.end), 9,
|
|
2812
|
-
t.track.showXAxis && t.track.xAxisExponent ? (g(), i("text", {
|
|
2813
|
-
key: 2,
|
|
2814
|
-
class: "waveform-track__axis-exponent waveform-track__axis-exponent--x waveform-chart__axis-exponent waveform-chart__axis-exponent--x",
|
|
2815
|
-
x: t.track.width ?? t.innerWidth,
|
|
2816
|
-
y: t.track.height + 27,
|
|
2817
|
-
"text-anchor": "end",
|
|
2818
|
-
"aria-hidden": "true"
|
|
2819
|
-
}, S(t.track.xAxisExponent), 9, Pr)) : r("", !0),
|
|
2789
|
+
}, S(t.track.endpointLabels.end), 9, Mr)], 8, Ar)) : r("", !0),
|
|
2820
2790
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes, (e) => (g(), i("g", {
|
|
2821
2791
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
2822
2792
|
ref_for: !0,
|
|
@@ -2825,31 +2795,21 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2825
2795
|
"data-y-axis-index": e.index,
|
|
2826
2796
|
"data-y-axis-side": e.side,
|
|
2827
2797
|
transform: `translate(${e.x}, 0)`
|
|
2828
|
-
}, null, 10,
|
|
2829
|
-
|
|
2830
|
-
key: `y-axis-exponent-${t.track.index}-${e.index}`,
|
|
2831
|
-
class: "waveform-track__axis-exponent waveform-track__axis-exponent--y waveform-chart__axis-exponent waveform-chart__axis-exponent--y",
|
|
2832
|
-
"data-y-axis-index": e.index,
|
|
2833
|
-
x: e.exponentX,
|
|
2834
|
-
y: "0",
|
|
2835
|
-
dy: "0.32em",
|
|
2836
|
-
"text-anchor": e.side === "left" ? "end" : "start",
|
|
2837
|
-
"aria-hidden": "true"
|
|
2838
|
-
}, S(e.exponentLabel), 9, Ir))), 128)),
|
|
2839
|
-
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g", Lr, [a("rect", {
|
|
2798
|
+
}, null, 10, Nr))), 128)),
|
|
2799
|
+
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g", Pr, [a("rect", {
|
|
2840
2800
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
2841
2801
|
x: t.track.yAxisLabelX - 12,
|
|
2842
2802
|
y: t.track.height / 2 - 40,
|
|
2843
2803
|
width: "24",
|
|
2844
2804
|
height: "80",
|
|
2845
2805
|
rx: "2"
|
|
2846
|
-
}, null, 8,
|
|
2806
|
+
}, null, 8, Fr), a("text", {
|
|
2847
2807
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
2848
2808
|
fill: t.track.series.color,
|
|
2849
2809
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
2850
2810
|
"text-anchor": "middle",
|
|
2851
2811
|
"dominant-baseline": "central"
|
|
2852
|
-
}, S(c(t.track.series)), 9,
|
|
2812
|
+
}, S(c(t.track.series)), 9, Ir)])) : r("", !0),
|
|
2853
2813
|
(g(!0), i(e, null, y(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (g(), i("g", {
|
|
2854
2814
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
2855
2815
|
class: "waveform-track__multi-axis-title",
|
|
@@ -2861,40 +2821,40 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2861
2821
|
width: "24",
|
|
2862
2822
|
height: "80",
|
|
2863
2823
|
rx: "2"
|
|
2864
|
-
}, null, 8,
|
|
2824
|
+
}, null, 8, Rr), a("text", {
|
|
2865
2825
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
2866
2826
|
fill: e.seriesList[0].color,
|
|
2867
2827
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
2868
2828
|
"text-anchor": "middle",
|
|
2869
2829
|
"dominant-baseline": "central"
|
|
2870
|
-
}, S(c(e.seriesList[0])), 9,
|
|
2830
|
+
}, S(c(e.seriesList[0])), 9, zr)], 8, Lr))), 128))
|
|
2871
2831
|
], 64));
|
|
2872
2832
|
}
|
|
2873
|
-
}),
|
|
2833
|
+
}), Vr = [
|
|
2874
2834
|
"width",
|
|
2875
2835
|
"height",
|
|
2876
2836
|
"fill"
|
|
2877
|
-
],
|
|
2837
|
+
], Hr = ["clip-path"], Ur = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, Wr = [
|
|
2878
2838
|
"stroke",
|
|
2879
2839
|
"x1",
|
|
2880
2840
|
"x2",
|
|
2881
2841
|
"y2"
|
|
2882
|
-
],
|
|
2842
|
+
], Gr = [
|
|
2883
2843
|
"stroke",
|
|
2884
2844
|
"x2",
|
|
2885
2845
|
"y1",
|
|
2886
2846
|
"y2"
|
|
2887
|
-
],
|
|
2847
|
+
], Kr = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, qr = [
|
|
2888
2848
|
"stroke",
|
|
2889
2849
|
"x1",
|
|
2890
2850
|
"x2",
|
|
2891
2851
|
"y2"
|
|
2892
|
-
],
|
|
2852
|
+
], Jr = [
|
|
2893
2853
|
"stroke",
|
|
2894
2854
|
"x2",
|
|
2895
2855
|
"y1",
|
|
2896
2856
|
"y2"
|
|
2897
|
-
],
|
|
2857
|
+
], Yr = ["clip-path"], Xr = [
|
|
2898
2858
|
"data-y-axis-index",
|
|
2899
2859
|
"x2",
|
|
2900
2860
|
"y1",
|
|
@@ -2902,7 +2862,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2902
2862
|
"stroke",
|
|
2903
2863
|
"stroke-width",
|
|
2904
2864
|
"stroke-dasharray"
|
|
2905
|
-
],
|
|
2865
|
+
], Zr = ["x", "y"], Qr = /* @__PURE__ */ c({
|
|
2906
2866
|
__name: "WaveformTrackBackdrop",
|
|
2907
2867
|
props: {
|
|
2908
2868
|
track: {},
|
|
@@ -2927,12 +2887,12 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2927
2887
|
height: t.track.height,
|
|
2928
2888
|
fill: t.frameStyle.backgroundColor,
|
|
2929
2889
|
"aria-hidden": "true"
|
|
2930
|
-
}, null, 8,
|
|
2890
|
+
}, null, 8, Vr)) : r("", !0),
|
|
2931
2891
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (g(), i("g", {
|
|
2932
2892
|
key: 1,
|
|
2933
2893
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
2934
2894
|
"aria-hidden": "true"
|
|
2935
|
-
}, [a("g",
|
|
2895
|
+
}, [a("g", Ur, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMinorTicks, (e) => (g(), i("line", {
|
|
2936
2896
|
key: `x-minor-${t.track.index}-${e}`,
|
|
2937
2897
|
"data-grid-direction": "vertical",
|
|
2938
2898
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -2940,7 +2900,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2940
2900
|
x2: t.track.xScale(e),
|
|
2941
2901
|
y1: "0",
|
|
2942
2902
|
y2: t.track.height
|
|
2943
|
-
}, null, 8,
|
|
2903
|
+
}, null, 8, Wr))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMinorTicks, (e) => (g(), i("line", {
|
|
2944
2904
|
key: `y-minor-${t.track.index}-${e}`,
|
|
2945
2905
|
"data-grid-direction": "horizontal",
|
|
2946
2906
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -2948,7 +2908,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2948
2908
|
x2: t.track.width ?? t.innerWidth,
|
|
2949
2909
|
y1: t.track.yScale(e),
|
|
2950
2910
|
y2: t.track.yScale(e)
|
|
2951
|
-
}, null, 8,
|
|
2911
|
+
}, null, 8, Gr))), 128)) : r("", !0)]), a("g", Kr, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMajorTicks, (e) => (g(), i("line", {
|
|
2952
2912
|
key: `x-major-${t.track.index}-${e}`,
|
|
2953
2913
|
"data-grid-direction": "vertical",
|
|
2954
2914
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -2956,7 +2916,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2956
2916
|
x2: t.track.xScale(e),
|
|
2957
2917
|
y1: "0",
|
|
2958
2918
|
y2: t.track.height
|
|
2959
|
-
}, null, 8,
|
|
2919
|
+
}, null, 8, qr))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMajorTicks, (e) => (g(), i("line", {
|
|
2960
2920
|
key: `y-major-${t.track.index}-${e}`,
|
|
2961
2921
|
"data-grid-direction": "horizontal",
|
|
2962
2922
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -2964,7 +2924,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2964
2924
|
x2: t.track.width ?? t.innerWidth,
|
|
2965
2925
|
y1: t.track.yScale(e),
|
|
2966
2926
|
y2: t.track.yScale(e)
|
|
2967
|
-
}, null, 8,
|
|
2927
|
+
}, null, 8, Jr))), 128)) : r("", !0)])], 8, Hr)) : r("", !0),
|
|
2968
2928
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (g(), i("g", {
|
|
2969
2929
|
key: 2,
|
|
2970
2930
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -2981,7 +2941,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2981
2941
|
stroke: t.zeroLine.color,
|
|
2982
2942
|
"stroke-width": t.zeroLine.width,
|
|
2983
2943
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
2984
|
-
}, null, 8,
|
|
2944
|
+
}, null, 8, Xr))], 64))), 128))], 8, Yr)) : r("", !0),
|
|
2985
2945
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (g(), i("text", {
|
|
2986
2946
|
key: 3,
|
|
2987
2947
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -2991,10 +2951,10 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
2991
2951
|
"text-anchor": "middle",
|
|
2992
2952
|
"dominant-baseline": "central",
|
|
2993
2953
|
"aria-hidden": "true"
|
|
2994
|
-
}, S(t.frameNumber), 13,
|
|
2954
|
+
}, S(t.frameNumber), 13, Zr)) : r("", !0)
|
|
2995
2955
|
], 64));
|
|
2996
2956
|
}
|
|
2997
|
-
}),
|
|
2957
|
+
}), $r = [
|
|
2998
2958
|
"data-track-index",
|
|
2999
2959
|
"data-track-empty",
|
|
3000
2960
|
"data-track-left",
|
|
@@ -3003,19 +2963,19 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3003
2963
|
"data-track-top",
|
|
3004
2964
|
"data-track-height",
|
|
3005
2965
|
"transform"
|
|
3006
|
-
],
|
|
2966
|
+
], ei = [
|
|
3007
2967
|
"width",
|
|
3008
2968
|
"height",
|
|
3009
2969
|
"stroke",
|
|
3010
2970
|
"stroke-width",
|
|
3011
2971
|
"stroke-dasharray",
|
|
3012
2972
|
"stroke-linecap"
|
|
3013
|
-
],
|
|
2973
|
+
], ti = [
|
|
3014
2974
|
"data-interactive",
|
|
3015
2975
|
"data-independent-overlay-index",
|
|
3016
2976
|
"width",
|
|
3017
2977
|
"height"
|
|
3018
|
-
],
|
|
2978
|
+
], ni = ["x", "y"], ri = /* @__PURE__ */ c({
|
|
3019
2979
|
__name: "WaveformTrack",
|
|
3020
2980
|
props: {
|
|
3021
2981
|
track: {},
|
|
@@ -3074,7 +3034,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3074
3034
|
"data-track-height": e.track.height,
|
|
3075
3035
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
3076
3036
|
}, [
|
|
3077
|
-
s(
|
|
3037
|
+
s(Qr, {
|
|
3078
3038
|
track: e.track,
|
|
3079
3039
|
"clip-path-id": e.clipPathId,
|
|
3080
3040
|
"inner-width": e.innerWidth,
|
|
@@ -3091,7 +3051,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3091
3051
|
"frame-style",
|
|
3092
3052
|
"zero-line"
|
|
3093
3053
|
]),
|
|
3094
|
-
s(
|
|
3054
|
+
s(Br, {
|
|
3095
3055
|
track: e.track,
|
|
3096
3056
|
"inner-width": e.innerWidth,
|
|
3097
3057
|
"clean-view": e.cleanView,
|
|
@@ -3117,8 +3077,8 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3117
3077
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
3118
3078
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
3119
3079
|
"aria-hidden": "true"
|
|
3120
|
-
}, null, 8,
|
|
3121
|
-
s(
|
|
3080
|
+
}, null, 8, ei)),
|
|
3081
|
+
s(Or, {
|
|
3122
3082
|
track: e.track,
|
|
3123
3083
|
"clip-path-id": e.clipPathId
|
|
3124
3084
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -3140,7 +3100,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3140
3100
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
3141
3101
|
onClick: n[5] ||= (e) => o("click", e),
|
|
3142
3102
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
3143
|
-
}, null, 42,
|
|
3103
|
+
}, null, 42, ti)) : r("", !0),
|
|
3144
3104
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (g(), i("text", {
|
|
3145
3105
|
key: 2,
|
|
3146
3106
|
class: "waveform-track__no-visible-series",
|
|
@@ -3148,33 +3108,33 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3148
3108
|
y: e.track.height / 2,
|
|
3149
3109
|
"text-anchor": "middle",
|
|
3150
3110
|
"dominant-baseline": "central"
|
|
3151
|
-
}, " 暂无可见曲线 ", 8,
|
|
3152
|
-
], 10,
|
|
3111
|
+
}, " 暂无可见曲线 ", 8, ni)) : r("", !0)
|
|
3112
|
+
], 10, $r));
|
|
3153
3113
|
}
|
|
3154
|
-
}),
|
|
3114
|
+
}), ii = [
|
|
3155
3115
|
"width",
|
|
3156
3116
|
"height",
|
|
3157
3117
|
"data-position",
|
|
3158
3118
|
"data-orientation"
|
|
3159
|
-
],
|
|
3119
|
+
], ai = [
|
|
3160
3120
|
"disabled",
|
|
3161
3121
|
"aria-pressed",
|
|
3162
3122
|
"aria-label",
|
|
3163
3123
|
"onClick"
|
|
3164
|
-
],
|
|
3124
|
+
], oi = [
|
|
3165
3125
|
"data-line-type",
|
|
3166
3126
|
"data-line-style",
|
|
3167
3127
|
"data-point-type",
|
|
3168
3128
|
"data-error-bar-visible"
|
|
3169
|
-
],
|
|
3129
|
+
], si = [
|
|
3170
3130
|
"d",
|
|
3171
3131
|
"stroke",
|
|
3172
3132
|
"stroke-dasharray"
|
|
3173
|
-
],
|
|
3133
|
+
], ci = [
|
|
3174
3134
|
"d",
|
|
3175
3135
|
"stroke",
|
|
3176
3136
|
"stroke-width"
|
|
3177
|
-
],
|
|
3137
|
+
], li = ["d", "fill"], ui = ["title"], di = /*#__PURE__*/ X(/* @__PURE__ */ c({
|
|
3178
3138
|
__name: "WaveformLegend",
|
|
3179
3139
|
props: {
|
|
3180
3140
|
series: {},
|
|
@@ -3232,45 +3192,45 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3232
3192
|
"data-point-type": e.pointType,
|
|
3233
3193
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
3234
3194
|
}, [
|
|
3235
|
-
w(
|
|
3195
|
+
w(vr)(e.lineType) ? (g(), i("path", {
|
|
3236
3196
|
key: 0,
|
|
3237
3197
|
class: "waveform-legend__line",
|
|
3238
|
-
d: w(
|
|
3198
|
+
d: w(vr)(e.lineType) ?? void 0,
|
|
3239
3199
|
stroke: e.color,
|
|
3240
|
-
"stroke-dasharray": w(
|
|
3200
|
+
"stroke-dasharray": w(yr)(e.lineStyle),
|
|
3241
3201
|
"stroke-width": "1.5",
|
|
3242
3202
|
fill: "none"
|
|
3243
|
-
}, null, 8,
|
|
3203
|
+
}, null, 8, si)) : r("", !0),
|
|
3244
3204
|
e.errorBar.visible ? (g(), i("path", {
|
|
3245
3205
|
key: 1,
|
|
3246
3206
|
class: "waveform-legend__error-bar",
|
|
3247
|
-
d: w(
|
|
3207
|
+
d: w(br)(e.errorBar.capWidth),
|
|
3248
3208
|
stroke: e.errorBar.color || e.color,
|
|
3249
3209
|
"stroke-width": e.errorBar.width,
|
|
3250
3210
|
"stroke-linecap": "butt",
|
|
3251
3211
|
fill: "none"
|
|
3252
|
-
}, null, 8,
|
|
3212
|
+
}, null, 8, ci)) : r("", !0),
|
|
3253
3213
|
e.pointType === "none" ? r("", !0) : (g(), i("path", {
|
|
3254
3214
|
key: 2,
|
|
3255
3215
|
class: "waveform-legend__point",
|
|
3256
|
-
d: w(
|
|
3216
|
+
d: w(gr)(e.pointType, 30) ?? void 0,
|
|
3257
3217
|
fill: e.color,
|
|
3258
3218
|
transform: "translate(13 8)"
|
|
3259
|
-
}, null, 8,
|
|
3260
|
-
], 8,
|
|
3219
|
+
}, null, 8, li))
|
|
3220
|
+
], 8, oi)), a("span", {
|
|
3261
3221
|
class: "waveform-legend__label",
|
|
3262
3222
|
title: e.name
|
|
3263
|
-
}, S(e.name), 9,
|
|
3223
|
+
}, S(e.name), 9, ui)], 10, ai))), 128))], 6)], 2)], 8, ii));
|
|
3264
3224
|
}
|
|
3265
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
3225
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), fi = {
|
|
3266
3226
|
class: "waveform-chart__hover-layer",
|
|
3267
3227
|
"pointer-events": "none",
|
|
3268
3228
|
"aria-hidden": "true"
|
|
3269
|
-
},
|
|
3229
|
+
}, pi = ["clip-path", "transform"], mi = [
|
|
3270
3230
|
"x1",
|
|
3271
3231
|
"x2",
|
|
3272
3232
|
"y2"
|
|
3273
|
-
],
|
|
3233
|
+
], hi = /*#__PURE__*/ X(/* @__PURE__ */ c({
|
|
3274
3234
|
__name: "WaveformHoverLayer",
|
|
3275
3235
|
props: {
|
|
3276
3236
|
state: {},
|
|
@@ -3293,7 +3253,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3293
3253
|
}] : [];
|
|
3294
3254
|
});
|
|
3295
3255
|
});
|
|
3296
|
-
return (t, r) => (g(), i("g",
|
|
3256
|
+
return (t, r) => (g(), i("g", fi, [(g(!0), i(e, null, y(o.value, (e) => (g(), i("g", {
|
|
3297
3257
|
key: e.track.index,
|
|
3298
3258
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
3299
3259
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -3303,44 +3263,44 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3303
3263
|
x2: e.x,
|
|
3304
3264
|
y1: "0",
|
|
3305
3265
|
y2: e.track.height
|
|
3306
|
-
}, null, 8,
|
|
3266
|
+
}, null, 8, mi)], 8, pi))), 128))]));
|
|
3307
3267
|
}
|
|
3308
|
-
}), [["__scopeId", "data-v-a6f82099"]]),
|
|
3268
|
+
}), [["__scopeId", "data-v-a6f82099"]]), gi = [
|
|
3309
3269
|
"data-display-mode",
|
|
3310
3270
|
"data-interaction-mode",
|
|
3311
3271
|
"data-presentation-mode",
|
|
3312
3272
|
"data-overlay-mode",
|
|
3313
3273
|
"data-chart-left-margin",
|
|
3314
3274
|
"data-title-area-height"
|
|
3315
|
-
],
|
|
3275
|
+
], _i = [
|
|
3316
3276
|
"role",
|
|
3317
3277
|
"aria-level",
|
|
3318
3278
|
"aria-hidden"
|
|
3319
|
-
],
|
|
3279
|
+
], vi = ["data-title-scale", "data-title-wrapped"], yi = [
|
|
3320
3280
|
"width",
|
|
3321
3281
|
"height",
|
|
3322
3282
|
"aria-label"
|
|
3323
|
-
],
|
|
3283
|
+
], bi = ["id"], xi = ["width", "height"], Si = ["transform"], Ci = {
|
|
3324
3284
|
key: 0,
|
|
3325
3285
|
class: "waveform-chart__grid-slots",
|
|
3326
3286
|
"aria-hidden": "true"
|
|
3327
|
-
},
|
|
3287
|
+
}, wi = ["transform"], Ti = ["width", "height"], Ei = ["width", "height"], Di = [
|
|
3328
3288
|
"x",
|
|
3329
3289
|
"y",
|
|
3330
3290
|
"width",
|
|
3331
3291
|
"height"
|
|
3332
|
-
],
|
|
3292
|
+
], Oi = {
|
|
3333
3293
|
key: 4,
|
|
3334
3294
|
class: "waveform-chart__legend-layer"
|
|
3335
|
-
},
|
|
3295
|
+
}, ki = [
|
|
3336
3296
|
"data-legend-track-index",
|
|
3337
3297
|
"data-legend-track-id",
|
|
3338
3298
|
"transform"
|
|
3339
|
-
],
|
|
3299
|
+
], Ai = ["x", "y"], ji = ["x", "y"], Mi = /* @__PURE__ */ c({
|
|
3340
3300
|
__name: "WaveformChartView",
|
|
3341
3301
|
props: { controller: {} },
|
|
3342
3302
|
setup(t) {
|
|
3343
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, pointerInsideChart: b, handleNativeContextMenu: x, titleAreaReserved: T, titleAreaStyle: E, titleVisible: D, titleMeasureStyle: O, resolvedTitleText: k, titleVisualStyle: A, titleTextStyle: j, titleLayout: M, chartWidth: N, drawingHeight: P, hasWaveformData: F, requestViewportReset: I, trackLayouts: L, clipPathId: R, chartTopMargin: z, gridCells: B, hasVisibleWaveformData: V, zoomable: H, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: ie, finishViewportDrag: U, cancelViewportDrag:
|
|
3303
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, pointerInsideChart: b, handleNativeContextMenu: x, titleAreaReserved: T, titleAreaStyle: E, titleVisible: D, titleMeasureStyle: O, resolvedTitleText: k, titleVisualStyle: A, titleTextStyle: j, titleLayout: M, chartWidth: N, drawingHeight: P, hasWaveformData: F, requestViewportReset: I, trackLayouts: L, clipPathId: R, chartTopMargin: z, gridCells: B, hasVisibleWaveformData: V, zoomable: H, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: ie, finishViewportDrag: U, cancelViewportDrag: ae, handlePointerLeave: W, handleAnnotationClick: se, handleAnnotationContextMenu: ce, resolveFrameNumber: le, frameStyle: ue, axes: de, resolvedZeroLine: fe, timeUnit: G, yLabel: pe, handleIndependentPointerMove: me, beginViewportDrag: he, hoverState: ge, showTooltip: _e, selectionBox: K, renderedAnnotations: ve, annotationsVisible: ye, handleExistingAnnotationContextMenu: be, beginAnnotationDrag: q, handleAnnotationMove: J, endAnnotationDrag: xe, resolveLegendPosition: Y, resolveLegendOrientation: Se, legendBackgroundColor: Ce, legendInteractive: we, resolvedHiddenSeriesIds: Te, toggleSeriesVisibility: Ee, resolvedXLabel: De, xAxisTitleY: Oe, hasChartArea: ke, gridOptions: Ae, pageCount: je, currentPage: Me, getPageSize: X, chartTracks: Fe, goToPage: Z, annotationInteraction: Ie, editorDraft: Le, contextMenu: Q, editorSeries: Re, editorSeriesOptions: ze, confirmAnnotation: Be, cancelAnnotation: Ve, changeDraftSeries: He, editContextAnnotation: Ue, deleteContextAnnotation: We, chartHeight: Ge, setContainer: $, setSvgElement: Ke, setTitleMeasureElement: qe, setSharedOverlayElement: Je } = C(t.controller);
|
|
3344
3304
|
return (t, C) => (g(), i("div", {
|
|
3345
3305
|
ref: w($),
|
|
3346
3306
|
class: f(["waveform-chart", [
|
|
@@ -3384,7 +3344,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3384
3344
|
style: p(w(j)),
|
|
3385
3345
|
"data-title-scale": w(M).scale,
|
|
3386
3346
|
"data-title-wrapped": w(M).wrapped || void 0
|
|
3387
|
-
}, S(w(k)), 13,
|
|
3347
|
+
}, S(w(k)), 13, vi)], 4)) : r("", !0)], 12, _i)) : r("", !0),
|
|
3388
3348
|
(g(), i("svg", {
|
|
3389
3349
|
ref: w(Ke),
|
|
3390
3350
|
class: "waveform-chart__svg",
|
|
@@ -3401,9 +3361,9 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3401
3361
|
}, [a("rect", {
|
|
3402
3362
|
width: e.width,
|
|
3403
3363
|
height: e.height
|
|
3404
|
-
}, null, 8,
|
|
3364
|
+
}, null, 8, xi)], 8, bi))), 128))]),
|
|
3405
3365
|
a("g", { transform: `translate(${w(_)}, ${w(z)})` }, [
|
|
3406
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g",
|
|
3366
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", Ci, [(g(!0), i(e, null, y(w(B), (e) => (g(), i("g", {
|
|
3407
3367
|
key: `grid-slot-${e.slotIndex}`,
|
|
3408
3368
|
transform: `translate(${e.left}, ${e.top})`
|
|
3409
3369
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3411,7 +3371,7 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3411
3371
|
class: "waveform-chart__grid-slot-placeholder",
|
|
3412
3372
|
width: e.width,
|
|
3413
3373
|
height: e.cellHeight
|
|
3414
|
-
}, null, 8,
|
|
3374
|
+
}, null, 8, Ti))], 8, wi))), 128))])) : r("", !0),
|
|
3415
3375
|
w(o) !== "independent" && w(L).length && w(V) ? (g(), i("rect", {
|
|
3416
3376
|
key: 1,
|
|
3417
3377
|
ref: w(Je),
|
|
@@ -3424,12 +3384,12 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3424
3384
|
onPointermove: C[0] ||= (...e) => w(re) && w(re)(...e),
|
|
3425
3385
|
onPointerdown: C[1] ||= (...e) => w(ie) && w(ie)(...e),
|
|
3426
3386
|
onPointerup: C[2] ||= (...e) => w(U) && w(U)(...e),
|
|
3427
|
-
onPointercancel: C[3] ||= (...e) => w(
|
|
3428
|
-
onPointerleave: C[4] ||= (...e) => w(
|
|
3429
|
-
onClick: C[5] ||= (...e) => w(
|
|
3430
|
-
onContextmenu: C[6] ||= (...e) => w(
|
|
3431
|
-
}, null, 42,
|
|
3432
|
-
(g(!0), i(e, null, y(w(L), (e) => (g(), n(w(
|
|
3387
|
+
onPointercancel: C[3] ||= (...e) => w(ae) && w(ae)(...e),
|
|
3388
|
+
onPointerleave: C[4] ||= (...e) => w(W) && w(W)(...e),
|
|
3389
|
+
onClick: C[5] ||= (...e) => w(se) && w(se)(...e),
|
|
3390
|
+
onContextmenu: C[6] ||= (...e) => w(ce) && w(ce)(...e)
|
|
3391
|
+
}, null, 42, Ei)) : r("", !0),
|
|
3392
|
+
(g(!0), i(e, null, y(w(L), (e) => (g(), n(w(ri), {
|
|
3433
3393
|
key: `${e.index}-${e.series.name}`,
|
|
3434
3394
|
track: e,
|
|
3435
3395
|
"clip-path-id": w(R),
|
|
@@ -3438,20 +3398,20 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3438
3398
|
interactive: !w(u),
|
|
3439
3399
|
"display-mode": w(o),
|
|
3440
3400
|
"interaction-mode": w(c),
|
|
3441
|
-
"frame-number": w(
|
|
3442
|
-
"frame-style": w(
|
|
3443
|
-
axes: w(
|
|
3401
|
+
"frame-number": w(le)(e.index),
|
|
3402
|
+
"frame-style": w(ue),
|
|
3403
|
+
axes: w(de),
|
|
3444
3404
|
"clean-view": w(l),
|
|
3445
|
-
"zero-line": w(
|
|
3446
|
-
"time-unit": w(
|
|
3447
|
-
"y-label": w(
|
|
3448
|
-
onPointerMove: (t) => w(
|
|
3449
|
-
onPointerDown: (t) => w(
|
|
3405
|
+
"zero-line": w(fe),
|
|
3406
|
+
"time-unit": w(G),
|
|
3407
|
+
"y-label": w(pe),
|
|
3408
|
+
onPointerMove: (t) => w(me)(t, e.index),
|
|
3409
|
+
onPointerDown: (t) => w(he)(t, e.index, !0),
|
|
3450
3410
|
onPointerUp: w(U),
|
|
3451
|
-
onPointerCancel: w(
|
|
3452
|
-
onPointerLeave: w(
|
|
3453
|
-
onClick: (t) => w(
|
|
3454
|
-
onContextmenu: (t) => w(
|
|
3411
|
+
onPointerCancel: w(ae),
|
|
3412
|
+
onPointerLeave: w(W),
|
|
3413
|
+
onClick: (t) => w(se)(t, e.index),
|
|
3414
|
+
onContextmenu: (t) => w(ce)(t, e.index)
|
|
3455
3415
|
}, null, 8, [
|
|
3456
3416
|
"track",
|
|
3457
3417
|
"clip-path-id",
|
|
@@ -3475,35 +3435,35 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3475
3435
|
"onClick",
|
|
3476
3436
|
"onContextmenu"
|
|
3477
3437
|
]))), 128)),
|
|
3478
|
-
s(w(
|
|
3479
|
-
state: w(
|
|
3438
|
+
s(w(hi), {
|
|
3439
|
+
state: w(ge),
|
|
3480
3440
|
tracks: w(L),
|
|
3481
3441
|
"clip-path-id": w(R),
|
|
3482
|
-
visible: w(
|
|
3442
|
+
visible: w(_e) && !w(u)
|
|
3483
3443
|
}, null, 8, [
|
|
3484
3444
|
"state",
|
|
3485
3445
|
"tracks",
|
|
3486
3446
|
"clip-path-id",
|
|
3487
3447
|
"visible"
|
|
3488
3448
|
]),
|
|
3489
|
-
w(
|
|
3449
|
+
w(K) && w(d)?.mode === "box" ? (g(), i("rect", {
|
|
3490
3450
|
key: 2,
|
|
3491
3451
|
class: "waveform-chart__zoom-selection",
|
|
3492
|
-
x: w(
|
|
3493
|
-
y: w(
|
|
3494
|
-
width: w(
|
|
3495
|
-
height: w(
|
|
3452
|
+
x: w(K).x,
|
|
3453
|
+
y: w(K).y,
|
|
3454
|
+
width: w(K).width,
|
|
3455
|
+
height: w(K).height,
|
|
3496
3456
|
"aria-hidden": "true"
|
|
3497
|
-
}, null, 8,
|
|
3498
|
-
w(l) ? r("", !0) : (g(), n(w(
|
|
3457
|
+
}, null, 8, Di)) : r("", !0),
|
|
3458
|
+
w(l) ? r("", !0) : (g(), n(w(Ne), {
|
|
3499
3459
|
key: 3,
|
|
3500
|
-
annotations: w(
|
|
3501
|
-
visible: w(
|
|
3460
|
+
annotations: w(ve),
|
|
3461
|
+
visible: w(ye),
|
|
3502
3462
|
interactive: !w(u),
|
|
3503
|
-
onContextmenu: w(
|
|
3504
|
-
onDragStart: w(
|
|
3505
|
-
onMove: w(
|
|
3506
|
-
onDragEnd: w(
|
|
3463
|
+
onContextmenu: w(be),
|
|
3464
|
+
onDragStart: w(q),
|
|
3465
|
+
onMove: w(J),
|
|
3466
|
+
onDragEnd: w(xe)
|
|
3507
3467
|
}, null, 8, [
|
|
3508
3468
|
"annotations",
|
|
3509
3469
|
"visible",
|
|
@@ -3513,23 +3473,23 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3513
3473
|
"onMove",
|
|
3514
3474
|
"onDragEnd"
|
|
3515
3475
|
])),
|
|
3516
|
-
w(l) ? r("", !0) : (g(), i("g",
|
|
3476
|
+
w(l) ? r("", !0) : (g(), i("g", Oi, [(g(!0), i(e, null, y(w(L), (e) => (g(), i("g", {
|
|
3517
3477
|
key: `legend-${e.index}-${e.series.name}`,
|
|
3518
3478
|
class: "waveform-chart__legend-track",
|
|
3519
3479
|
"data-legend-track-index": e.index,
|
|
3520
3480
|
"data-legend-track-id": e.id,
|
|
3521
3481
|
transform: `translate(${e.left}, ${e.top})`
|
|
3522
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(
|
|
3482
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(di), {
|
|
3523
3483
|
key: 0,
|
|
3524
3484
|
series: e.legendSeries,
|
|
3525
|
-
position: w(
|
|
3526
|
-
orientation: w(
|
|
3527
|
-
"background-color": w(
|
|
3528
|
-
interactive: w(
|
|
3529
|
-
"hidden-series-ids": w(
|
|
3485
|
+
position: w(Y)(e.id),
|
|
3486
|
+
orientation: w(Se)(w(Y)(e.id)),
|
|
3487
|
+
"background-color": w(Ce),
|
|
3488
|
+
interactive: w(we),
|
|
3489
|
+
"hidden-series-ids": w(Te),
|
|
3530
3490
|
width: e.width ?? w(te),
|
|
3531
3491
|
height: e.height,
|
|
3532
|
-
onToggle: w(
|
|
3492
|
+
onToggle: w(Ee)
|
|
3533
3493
|
}, null, 8, [
|
|
3534
3494
|
"series",
|
|
3535
3495
|
"position",
|
|
@@ -3540,46 +3500,46 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3540
3500
|
"width",
|
|
3541
3501
|
"height",
|
|
3542
3502
|
"onToggle"
|
|
3543
|
-
])) : r("", !0)], 8,
|
|
3544
|
-
w(
|
|
3503
|
+
])) : r("", !0)], 8, ki))), 128))])),
|
|
3504
|
+
w(De) && !w(l) ? (g(), i("text", {
|
|
3545
3505
|
key: 5,
|
|
3546
3506
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
3547
3507
|
x: w(te) / 2,
|
|
3548
|
-
y: w(
|
|
3508
|
+
y: w(Oe),
|
|
3549
3509
|
"text-anchor": "middle"
|
|
3550
|
-
}, S(w(
|
|
3551
|
-
], 8,
|
|
3552
|
-
w(
|
|
3510
|
+
}, S(w(De)), 9, Ai)) : r("", !0)
|
|
3511
|
+
], 8, Si),
|
|
3512
|
+
w(ke) && !w(F) ? (g(), i("text", {
|
|
3553
3513
|
key: 0,
|
|
3554
3514
|
class: "waveform-chart__empty",
|
|
3555
3515
|
x: w(N) / 2,
|
|
3556
3516
|
y: w(P) / 2,
|
|
3557
3517
|
"text-anchor": "middle"
|
|
3558
|
-
}, " 暂无有效波形数据 ", 8,
|
|
3559
|
-
], 40,
|
|
3560
|
-
w(
|
|
3518
|
+
}, " 暂无有效波形数据 ", 8, ji)) : r("", !0)
|
|
3519
|
+
], 40, yi)),
|
|
3520
|
+
w(Ae).showPagination && w(je) > 1 && !w(l) ? (g(), n(w(oe), {
|
|
3561
3521
|
key: 1,
|
|
3562
3522
|
class: "waveform-chart__pagination",
|
|
3563
3523
|
"aria-label": "波形分页",
|
|
3564
|
-
current: w(
|
|
3565
|
-
"page-size": w(
|
|
3566
|
-
total: w(
|
|
3524
|
+
current: w(Me),
|
|
3525
|
+
"page-size": w(X)(w(Ae)),
|
|
3526
|
+
total: w(Fe).length,
|
|
3567
3527
|
"show-size-changer": !1,
|
|
3568
3528
|
"show-quick-jumper": !1,
|
|
3569
|
-
onChange: w(
|
|
3529
|
+
onChange: w(Z)
|
|
3570
3530
|
}, null, 8, [
|
|
3571
3531
|
"current",
|
|
3572
3532
|
"page-size",
|
|
3573
3533
|
"total",
|
|
3574
3534
|
"onChange"
|
|
3575
3535
|
])) : r("", !0),
|
|
3576
|
-
w(
|
|
3536
|
+
w(Le) && !w(l) && !w(u) ? (g(), n(er, {
|
|
3577
3537
|
key: 2,
|
|
3578
|
-
annotation: w(
|
|
3579
|
-
mode: w(
|
|
3538
|
+
annotation: w(Le).annotation,
|
|
3539
|
+
mode: w(Le).mode,
|
|
3580
3540
|
series: w(Re),
|
|
3581
3541
|
"series-options": w(ze),
|
|
3582
|
-
"time-unit": w(
|
|
3542
|
+
"time-unit": w(G),
|
|
3583
3543
|
onConfirm: w(Be),
|
|
3584
3544
|
onCancel: w(Ve),
|
|
3585
3545
|
onSeriesChange: w(He)
|
|
@@ -3593,15 +3553,15 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3593
3553
|
"onCancel",
|
|
3594
3554
|
"onSeriesChange"
|
|
3595
3555
|
])) : r("", !0),
|
|
3596
|
-
!w(l) && !w(u) ? (g(), n(w(
|
|
3556
|
+
!w(l) && !w(u) ? (g(), n(w(Pe), {
|
|
3597
3557
|
key: 3,
|
|
3598
|
-
visible: w(
|
|
3599
|
-
x: w(
|
|
3600
|
-
y: w(
|
|
3601
|
-
"can-edit": !!w(
|
|
3558
|
+
visible: w(Q) !== null,
|
|
3559
|
+
x: w(Q)?.x || 0,
|
|
3560
|
+
y: w(Q)?.y || 0,
|
|
3561
|
+
"can-edit": !!w(Q)?.annotationId,
|
|
3602
3562
|
onEdit: w(Ue),
|
|
3603
3563
|
onDelete: w(We),
|
|
3604
|
-
onClose: w(
|
|
3564
|
+
onClose: w(Ie).closeContextMenu
|
|
3605
3565
|
}, null, 8, [
|
|
3606
3566
|
"visible",
|
|
3607
3567
|
"x",
|
|
@@ -3611,10 +3571,10 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3611
3571
|
"onDelete",
|
|
3612
3572
|
"onClose"
|
|
3613
3573
|
])) : r("", !0),
|
|
3614
|
-
s(w(
|
|
3615
|
-
state: w(
|
|
3616
|
-
visible: w(
|
|
3617
|
-
"time-unit": w(
|
|
3574
|
+
s(w(lr), {
|
|
3575
|
+
state: w(ge),
|
|
3576
|
+
visible: w(_e) && !w(u),
|
|
3577
|
+
"time-unit": w(G),
|
|
3618
3578
|
"container-width": w(N),
|
|
3619
3579
|
"container-height": w(Ge)
|
|
3620
3580
|
}, null, 8, [
|
|
@@ -3624,9 +3584,9 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3624
3584
|
"container-width",
|
|
3625
3585
|
"container-height"
|
|
3626
3586
|
])
|
|
3627
|
-
], 46,
|
|
3587
|
+
], 46, gi));
|
|
3628
3588
|
}
|
|
3629
|
-
}),
|
|
3589
|
+
}), Ni = /* @__PURE__ */ c({
|
|
3630
3590
|
__name: "WaveformChart",
|
|
3631
3591
|
props: {
|
|
3632
3592
|
data: {},
|
|
@@ -3702,9 +3662,9 @@ var Sr = ["clip-path"], Cr = ["data-series-id", "data-series-name"], wr = [
|
|
|
3702
3662
|
"page-change"
|
|
3703
3663
|
],
|
|
3704
3664
|
setup(e, { expose: t, emit: r }) {
|
|
3705
|
-
let i =
|
|
3706
|
-
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(
|
|
3665
|
+
let i = Pn(e, r);
|
|
3666
|
+
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(Mi, { controller: w(i) }, null, 8, ["controller"]));
|
|
3707
3667
|
}
|
|
3708
3668
|
});
|
|
3709
3669
|
//#endregion
|
|
3710
|
-
export { Nt as DEFAULT_WAVEFORM_RENDERING_OPTIONS,
|
|
3670
|
+
export { Nt as DEFAULT_WAVEFORM_RENDERING_OPTIONS, Ni as WaveformChart, Ke as buildMinorTicks, ft as clamp, at as displayTime, ct as formatAxisTime, st as formatEndpointTime, lt as formatTooltipTime, jt as normalizeWaveformData, Mt as normalizeWaveformSeries, $ as paddedDomain, We as parseWaveformAnnotations, dt as resolveTrackGeometry, Pt as resolveWaveformRenderingOptions, Vt as selectRenderablePoints, Ue as serializeWaveformAnnotations };
|