waveform-analysis 0.1.32 → 0.1.36
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 +28 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +426 -411
- package/dist/style.css +1 -1
- package/dist/types/components/WaveformChart.vue.d.ts +1 -0
- package/dist/types/components/core/trackLayoutBuilder.d.ts +2 -1
- package/dist/types/components/core/types.d.ts +2 -0
- package/dist/types/components/core/useWaveformChartController.d.ts +1 -0
- package/dist/types/components/core/waveformChartTypes.d.ts +3 -2
- package/dist/types/components/core/xDomain.d.ts +3 -0
- package/dist/types/components/data/types.d.ts +1 -1
- package/dist/types/components/interaction/WaveformTooltip.vue.d.ts +1 -0
- package/dist/types/components/waveform.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/chart.d.ts +10 -0
- package/dist/types/types/data.d.ts +3 -0
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/WaveformChart.vue +1 -0
- package/src/components/core/trackLayoutBuilder.ts +19 -7
- package/src/components/core/types.ts +2 -0
- package/src/components/core/useWaveformChartLifecycle.ts +1 -0
- package/src/components/core/useWaveformLayout.ts +19 -6
- package/src/components/core/waveformChartTypes.ts +3 -0
- package/src/components/core/xDomain.test.ts +28 -0
- package/src/components/core/xDomain.ts +25 -0
- package/src/components/data/types.ts +1 -0
- package/src/components/interaction/WaveformTooltip.test.ts +17 -9
- package/src/components/interaction/WaveformTooltip.vue +41 -45
- package/src/components/interaction/useWaveformHover.ts +1 -0
- package/src/components/waveform.ts +1 -0
- package/src/components/waveformChartCases/compactAndSharedHover.test.ts +4 -4
- package/src/components/waveformChartCases/dataAndHoverPerformance.test.ts +2 -2
- package/src/components/waveformChartCases/viewportReset.test.ts +35 -0
- package/src/components/waveformChartCases/xDomainStrategy.test.ts +96 -0
- package/src/core/data.test.ts +22 -0
- package/src/core/data.ts +1 -0
- package/src/data/simulatedWaveforms.test.ts +1 -0
- package/src/data/simulatedWaveforms.ts +7 -1
- package/src/index.ts +1 -0
- package/src/types/chart.ts +11 -0
- package/src/types/data.ts +3 -0
- package/src/types/index.ts +1 -0
- package/src/views/FixedYDomainDemo.vue +2 -0
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 U, symbolDiamond as ee, symbolSquare 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 U, symbolDiamond as ee, symbolSquare as te, symbolTriangle as ne, zoom as W, zoomIdentity as G, zoomTransform as re } from "d3";
|
|
3
|
+
import { Pagination as ie } from "ant-design-vue";
|
|
4
|
+
import { ColorPicker as K } from "vue3-colorpicker";
|
|
5
5
|
import "vue3-colorpicker/style.css";
|
|
6
6
|
//#region src/utils/waveformId.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var ae = 0;
|
|
8
|
+
function oe(e = "waveform") {
|
|
9
9
|
let t = l();
|
|
10
|
-
return `${e}-${t ? `v${t.uid}` : `f${++
|
|
10
|
+
return `${e}-${t ? `v${t.uid}` : `f${++ae}`}`;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/components/annotation/annotationLayout.ts
|
|
14
|
-
function
|
|
14
|
+
function se(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 ce(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 se(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 le(e, t, n, r, i, a, o) {
|
|
28
|
+
let s = fe(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 ue(e, t, n, r, i, a) {
|
|
32
32
|
for (let o of [
|
|
33
33
|
"top",
|
|
34
34
|
"bottom",
|
|
@@ -38,10 +38,10 @@ function le(e, t, n, r, i, a) {
|
|
|
38
38
|
"top-left",
|
|
39
39
|
"bottom-right",
|
|
40
40
|
"bottom-left"
|
|
41
|
-
]) if (
|
|
41
|
+
]) if (le(e, t, n, r, o, i, a)) return o;
|
|
42
42
|
return "top";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function de(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 ue(e, t, n) {
|
|
|
56
56
|
y: s
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function fe(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 de(e, t, n, r, i) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function q(e, t, n) {
|
|
97
97
|
return {
|
|
98
98
|
width: Math.min(t, Math.max(16, Math.min(240, Math.ceil(Math.max(...e.map(be), 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 pe(e, t, n, r, i, a, o = 0, s = 0) {
|
|
103
|
+
let { width: c, height: l } = q(n, r, i), u = fe(e, t, c, l, a), d = ce({
|
|
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 = de(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 me(e, t, n, r) {
|
|
118
118
|
let i = [];
|
|
119
119
|
return e.forEach((e) => {
|
|
120
120
|
if (!xe(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 = Se(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 } =
|
|
124
|
+
if (!se(e.x, o) || !se(e.y, s)) return;
|
|
125
|
+
let c = Se(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 } = q(c, u, m), y = g ? "top" : ue(d, h, _, v, u, m), b = pe(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,
|
|
@@ -143,14 +143,14 @@ function pe(e, t, n, r) {
|
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
145
|
//#region src/components/annotation/markup.ts
|
|
146
|
-
var
|
|
146
|
+
var J = {
|
|
147
147
|
borderColor: "#1677ff",
|
|
148
148
|
textColor: "#333333",
|
|
149
149
|
backgroundColor: "rgba(255, 255, 255, 0.92)"
|
|
150
|
-
},
|
|
150
|
+
}, he = "12px Arial, sans-serif", Y = N((e) => e.x);
|
|
151
151
|
function ge(e, t) {
|
|
152
152
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
153
|
-
let n =
|
|
153
|
+
let n = Y.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
156
|
function _e(e, t, n = "linear") {
|
|
@@ -158,7 +158,7 @@ function _e(e, t, n = "linear") {
|
|
|
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 = Y.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
|
|
@@ -199,7 +199,7 @@ function ve(e, t, n, r) {
|
|
|
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 || J.borderColor,
|
|
203
203
|
unit: e.series.unit,
|
|
204
204
|
point: a,
|
|
205
205
|
screenX: c,
|
|
@@ -213,13 +213,13 @@ function ye(e) {
|
|
|
213
213
|
return Array.from(e).reduce((e, t) => e + (t.codePointAt(0) > 255 ? 12 : 6.7), 0);
|
|
214
214
|
}
|
|
215
215
|
function be(e) {
|
|
216
|
-
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font =
|
|
216
|
+
return X === void 0 && (X = null, typeof document < "u" && typeof CanvasRenderingContext2D < "u" && (X = document.createElement("canvas").getContext("2d"), X && (X.font = he))), X?.measureText(e).width ?? ye(e);
|
|
217
217
|
}
|
|
218
218
|
function Z(e) {
|
|
219
219
|
return {
|
|
220
|
-
borderColor: e?.borderColor ||
|
|
221
|
-
textColor: e?.textColor ||
|
|
222
|
-
backgroundColor: e?.backgroundColor ||
|
|
220
|
+
borderColor: e?.borderColor || J.borderColor,
|
|
221
|
+
textColor: e?.textColor || J.textColor,
|
|
222
|
+
backgroundColor: e?.backgroundColor || J.backgroundColor
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
function xe(e) {
|
|
@@ -425,7 +425,7 @@ var Ce = [
|
|
|
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(he) }),
|
|
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", {
|
|
@@ -821,6 +821,7 @@ function Mt(e) {
|
|
|
821
821
|
let o = e.lineType ?? "linear", s = Dt(e.lineStyle), c = e.pointType ?? "none", l = e.errorBar?.visible === !0, u = o === "none" && c === "none" && !l ? "linear" : o, d = Number(e.errorBar?.width), f = Number(e.errorBar?.capWidth);
|
|
822
822
|
return {
|
|
823
823
|
id: i,
|
|
824
|
+
shotNo: e.shotNo?.trim() || void 0,
|
|
824
825
|
trackId: e.trackId?.trim() || void 0,
|
|
825
826
|
name: e.name,
|
|
826
827
|
unit: e.unit,
|
|
@@ -1073,8 +1074,23 @@ function nn(e, t) {
|
|
|
1073
1074
|
return n;
|
|
1074
1075
|
}
|
|
1075
1076
|
//#endregion
|
|
1077
|
+
//#region src/components/core/xDomain.ts
|
|
1078
|
+
var rn = 10;
|
|
1079
|
+
function an(e) {
|
|
1080
|
+
return !Number.isFinite(e) || (e ?? 0) < 1 ? rn : Math.max(1, Math.trunc(e));
|
|
1081
|
+
}
|
|
1082
|
+
function on(e, t, n = !1) {
|
|
1083
|
+
if (t.type !== "nice" || n && !t.includeExplicit) return [...e];
|
|
1084
|
+
let r = B().domain(e).nice(an(t.tickCount)).domain();
|
|
1085
|
+
return t.bounds === "end" ? [e[0], r[1]] : r;
|
|
1086
|
+
}
|
|
1087
|
+
//#endregion
|
|
1076
1088
|
//#region src/components/core/trackLayoutBuilder.ts
|
|
1077
|
-
function
|
|
1089
|
+
function sn(e, t, n) {
|
|
1090
|
+
let r = n.xDomainStrategy ?? { type: "data" }, i = n.initialXDomains?.[e.id] ?? n.initialXDomains?.[t] ?? n.initialXDomain;
|
|
1091
|
+
return i ? on(i, r, !0) : on(e.xDomain, r);
|
|
1092
|
+
}
|
|
1093
|
+
function cn(e) {
|
|
1078
1094
|
let t = e.cells.map((e) => ({
|
|
1079
1095
|
...e,
|
|
1080
1096
|
hasSeries: !!e.series
|
|
@@ -1104,7 +1120,7 @@ function rn(e) {
|
|
|
1104
1120
|
visibleSeries: [a],
|
|
1105
1121
|
xDomain: a.xDomain,
|
|
1106
1122
|
yDomain: a.yDomain
|
|
1107
|
-
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(
|
|
1123
|
+
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? B(sn(o, c.id, e), [0, t.width]) : B(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? G : G).rescaleX(l), d = e.yDomains?.[o.id], f = _n(o, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && d ? {
|
|
1108
1124
|
...e,
|
|
1109
1125
|
domain: d
|
|
1110
1126
|
} : e), p = {
|
|
@@ -1117,7 +1133,7 @@ function rn(e) {
|
|
|
1117
1133
|
a,
|
|
1118
1134
|
...c,
|
|
1119
1135
|
...s ? [o] : []
|
|
1120
|
-
])), { tickTextWidth: u } =
|
|
1136
|
+
])), { tickTextWidth: u } = vn(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);
|
|
1121
1137
|
return p[n.side] += d, {
|
|
1122
1138
|
index: n.index,
|
|
1123
1139
|
side: n.side,
|
|
@@ -1188,8 +1204,8 @@ function rn(e) {
|
|
|
1188
1204
|
}
|
|
1189
1205
|
//#endregion
|
|
1190
1206
|
//#region src/components/core/layout.ts
|
|
1191
|
-
var
|
|
1192
|
-
function
|
|
1207
|
+
var ln = 7, un = 7, dn = 4, fn = 6, pn = 24;
|
|
1208
|
+
function mn(e) {
|
|
1193
1209
|
return e >= 4 ? [
|
|
1194
1210
|
"left",
|
|
1195
1211
|
"left",
|
|
@@ -1201,13 +1217,13 @@ function un(e) {
|
|
|
1201
1217
|
"right"
|
|
1202
1218
|
] : e === 2 ? ["left", "right"] : ["left"];
|
|
1203
1219
|
}
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
let n =
|
|
1207
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
1220
|
+
var hn = /* @__PURE__ */ new WeakMap();
|
|
1221
|
+
function gn(e, t) {
|
|
1222
|
+
let n = hn.get(e);
|
|
1223
|
+
n || (n = /* @__PURE__ */ new Map(), hn.set(e, n));
|
|
1208
1224
|
let r = n.get(t);
|
|
1209
1225
|
if (r) return r;
|
|
1210
|
-
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a =
|
|
1226
|
+
let i = t === "multi-axis" ? Math.min(e.visibleSeries.length, 4) : Math.min(e.visibleSeries.length, 1), a = mn(i), o = Array.from({ length: i }, (e, t) => ({
|
|
1211
1227
|
index: t,
|
|
1212
1228
|
side: a[t],
|
|
1213
1229
|
seriesList: [],
|
|
@@ -1224,9 +1240,9 @@ function fn(e, t) {
|
|
|
1224
1240
|
}
|
|
1225
1241
|
}), n.set(t, o), o;
|
|
1226
1242
|
}
|
|
1227
|
-
function
|
|
1243
|
+
function _n(e, t, n, r) {
|
|
1228
1244
|
let i = xt(e, r);
|
|
1229
|
-
return
|
|
1245
|
+
return gn(e, t).map((e) => {
|
|
1230
1246
|
if (i) return {
|
|
1231
1247
|
...e,
|
|
1232
1248
|
domain: i,
|
|
@@ -1240,7 +1256,7 @@ function pn(e, t, n, r) {
|
|
|
1240
1256
|
} : e;
|
|
1241
1257
|
});
|
|
1242
1258
|
}
|
|
1243
|
-
function
|
|
1259
|
+
function vn(e, t = !0, n) {
|
|
1244
1260
|
let r = B(e, [1, 0]);
|
|
1245
1261
|
t && r.nice();
|
|
1246
1262
|
let [i, a] = r.domain(), o = n ?? Array.from(/* @__PURE__ */ new Set([
|
|
@@ -1252,21 +1268,21 @@ function mn(e, t = !0, n) {
|
|
|
1252
1268
|
axisMin: i,
|
|
1253
1269
|
axisMax: a,
|
|
1254
1270
|
topTickValue: s
|
|
1255
|
-
}).length)) *
|
|
1271
|
+
}).length)) * ln };
|
|
1256
1272
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1273
|
+
function yn(e) {
|
|
1274
|
+
return vn(e.domain, !e.fixed).tickTextWidth + un + fn + pn + dn;
|
|
1259
1275
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1276
|
+
function bn(e) {
|
|
1277
|
+
return vn(e.domain, !e.fixed).tickTextWidth + un + dn;
|
|
1262
1278
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1279
|
+
function xn(e, t, n, r) {
|
|
1280
|
+
return _n(e, t, n, r).reduce((n, r) => (n[r.side] += t === "multi-axis" || e.visibleSeries.length === 1 ? yn(r) : bn(r), n), {
|
|
1265
1281
|
left: 0,
|
|
1266
1282
|
right: 0
|
|
1267
1283
|
});
|
|
1268
1284
|
}
|
|
1269
|
-
function
|
|
1285
|
+
function Sn(e, t, n) {
|
|
1270
1286
|
let r = (e) => {
|
|
1271
1287
|
let r = t < e.left ? e.left - t : t > e.left + e.width ? t - e.left - e.width : 0;
|
|
1272
1288
|
return n < e.top ? e.top - n : n > e.top + e.height ? n - (e.top + e.height) : r;
|
|
@@ -1285,11 +1301,11 @@ function vn(e, t, n) {
|
|
|
1285
1301
|
}
|
|
1286
1302
|
//#endregion
|
|
1287
1303
|
//#region src/components/annotation/useWaveformChartAnnotations.ts
|
|
1288
|
-
var
|
|
1289
|
-
function
|
|
1290
|
-
return
|
|
1304
|
+
var Cn = 0;
|
|
1305
|
+
function wn() {
|
|
1306
|
+
return Cn += 1, typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `annotation-${Date.now()}-${Cn}`;
|
|
1291
1307
|
}
|
|
1292
|
-
function
|
|
1308
|
+
function Tn(e) {
|
|
1293
1309
|
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;
|
|
1294
1310
|
function b(e) {
|
|
1295
1311
|
if (!i.value.some((t) => t.id === e)) return;
|
|
@@ -1322,7 +1338,7 @@ function xn(e) {
|
|
|
1322
1338
|
};
|
|
1323
1339
|
}
|
|
1324
1340
|
function C(e, t, n) {
|
|
1325
|
-
s.openCreate(e,
|
|
1341
|
+
s.openCreate(e, wn, t), c.value = n;
|
|
1326
1342
|
let r = s.editorDraft.value, i = l.value.find((t) => t.index === e.trackIndex)?.seriesList.find((t) => t.id === e.seriesId);
|
|
1327
1343
|
r?.mode === "add" && (r.annotation.style = {
|
|
1328
1344
|
borderColor: i?.color || "#1677ff",
|
|
@@ -1351,7 +1367,7 @@ function xn(e) {
|
|
|
1351
1367
|
let e = l.value[n];
|
|
1352
1368
|
return e?.hasVisibleSeries ? e : void 0;
|
|
1353
1369
|
}
|
|
1354
|
-
return
|
|
1370
|
+
return Sn(l.value.filter((e) => e.hasVisibleSeries), e, t);
|
|
1355
1371
|
}
|
|
1356
1372
|
function D(e, t) {
|
|
1357
1373
|
let n = e.currentTarget;
|
|
@@ -1439,8 +1455,8 @@ function xn(e) {
|
|
|
1439
1455
|
}
|
|
1440
1456
|
//#endregion
|
|
1441
1457
|
//#region src/components/interaction/useWaveformHover.ts
|
|
1442
|
-
var
|
|
1443
|
-
function
|
|
1458
|
+
var En = N((e) => e.x);
|
|
1459
|
+
function Dn(e) {
|
|
1444
1460
|
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) => {
|
|
1445
1461
|
let r = n.points[t];
|
|
1446
1462
|
return r?.id === e.id && r.trackIndex === e.trackIndex && r.point === e.point;
|
|
@@ -1452,6 +1468,7 @@ function Cn(e) {
|
|
|
1452
1468
|
f.value || y();
|
|
1453
1469
|
}, x = (e, t, n) => ({
|
|
1454
1470
|
id: e.id,
|
|
1471
|
+
shotNo: e.shotNo,
|
|
1455
1472
|
name: e.name,
|
|
1456
1473
|
color: e.color,
|
|
1457
1474
|
unit: e.unit,
|
|
@@ -1461,7 +1478,7 @@ function Cn(e) {
|
|
|
1461
1478
|
r.value = !0, y();
|
|
1462
1479
|
}, C = (e = !1) => {
|
|
1463
1480
|
r.value = !e, y();
|
|
1464
|
-
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[
|
|
1481
|
+
}, w = () => r.value ? (r.value = !1, y(), !0) : !1, T = (e, t) => e.points[En.center(e.points, t)];
|
|
1465
1482
|
return {
|
|
1466
1483
|
cancelPendingHover: h,
|
|
1467
1484
|
clearHover: y,
|
|
@@ -1516,14 +1533,14 @@ function Cn(e) {
|
|
|
1516
1533
|
}
|
|
1517
1534
|
//#endregion
|
|
1518
1535
|
//#region src/components/interaction/pointerCapture.ts
|
|
1519
|
-
function
|
|
1536
|
+
function On(e, t) {
|
|
1520
1537
|
try {
|
|
1521
1538
|
e?.releasePointerCapture?.(t);
|
|
1522
1539
|
} catch {}
|
|
1523
1540
|
}
|
|
1524
1541
|
//#endregion
|
|
1525
1542
|
//#region src/components/interaction/viewportInteractionState.ts
|
|
1526
|
-
function
|
|
1543
|
+
function kn(e) {
|
|
1527
1544
|
return {
|
|
1528
1545
|
...e,
|
|
1529
1546
|
currentX: e.startX,
|
|
@@ -1532,37 +1549,37 @@ function Tn(e) {
|
|
|
1532
1549
|
yDomains: Object.fromEntries(Object.entries(e.yDomains).map(([e, t]) => [e, [...t]]))
|
|
1533
1550
|
};
|
|
1534
1551
|
}
|
|
1535
|
-
function
|
|
1552
|
+
function An(e, t) {
|
|
1536
1553
|
return {
|
|
1537
1554
|
...e,
|
|
1538
1555
|
...t
|
|
1539
1556
|
};
|
|
1540
1557
|
}
|
|
1541
|
-
function
|
|
1558
|
+
function jn(e) {
|
|
1542
1559
|
return {
|
|
1543
1560
|
state: e,
|
|
1544
1561
|
accepted: !1,
|
|
1545
1562
|
completed: null
|
|
1546
1563
|
};
|
|
1547
1564
|
}
|
|
1548
|
-
function
|
|
1565
|
+
function Mn(e, t) {
|
|
1549
1566
|
switch (t.type) {
|
|
1550
|
-
case "begin": return e ?
|
|
1551
|
-
state:
|
|
1567
|
+
case "begin": return e ? jn(e) : {
|
|
1568
|
+
state: kn(t.gesture),
|
|
1552
1569
|
accepted: !0,
|
|
1553
1570
|
completed: null
|
|
1554
1571
|
};
|
|
1555
|
-
case "move": return !e || e.pointerId !== t.pointerId ?
|
|
1556
|
-
state:
|
|
1572
|
+
case "move": return !e || e.pointerId !== t.pointerId ? jn(e) : {
|
|
1573
|
+
state: An(e, t.position),
|
|
1557
1574
|
accepted: !0,
|
|
1558
1575
|
completed: null
|
|
1559
1576
|
};
|
|
1560
|
-
case "finish": return !e || e.pointerId !== t.pointerId ?
|
|
1577
|
+
case "finish": return !e || e.pointerId !== t.pointerId ? jn(e) : {
|
|
1561
1578
|
state: null,
|
|
1562
1579
|
accepted: !0,
|
|
1563
|
-
completed:
|
|
1580
|
+
completed: An(e, t.position)
|
|
1564
1581
|
};
|
|
1565
|
-
case "cancel": return !e || t.pointerId !== void 0 && e.pointerId !== t.pointerId ?
|
|
1582
|
+
case "cancel": return !e || t.pointerId !== void 0 && e.pointerId !== t.pointerId ? jn(e) : {
|
|
1566
1583
|
state: null,
|
|
1567
1584
|
accepted: !0,
|
|
1568
1585
|
completed: null
|
|
@@ -1576,26 +1593,26 @@ function On(e, t) {
|
|
|
1576
1593
|
}
|
|
1577
1594
|
//#endregion
|
|
1578
1595
|
//#region src/components/interaction/zoomConstraints.ts
|
|
1579
|
-
var
|
|
1580
|
-
function
|
|
1596
|
+
var Nn = /* @__PURE__ */ new WeakMap();
|
|
1597
|
+
function Pn(e) {
|
|
1581
1598
|
return e[0] <= e[1] ? [...e] : [e[1], e[0]];
|
|
1582
1599
|
}
|
|
1583
|
-
function
|
|
1600
|
+
function Fn(e) {
|
|
1584
1601
|
return Number.isFinite(e) && (e ?? 0) > 0 ? Math.ceil(e) : 0;
|
|
1585
1602
|
}
|
|
1586
|
-
function
|
|
1587
|
-
let n = `${t[0]}\u0000${t[1]}`, r =
|
|
1603
|
+
function In(e, t) {
|
|
1604
|
+
let n = `${t[0]}\u0000${t[1]}`, r = Nn.get(e)?.get(n);
|
|
1588
1605
|
if (r) return r;
|
|
1589
1606
|
let i = /* @__PURE__ */ new Set();
|
|
1590
1607
|
for (let n of e) for (let e of n.points) e.x >= t[0] && e.x <= t[1] && i.add(e.x);
|
|
1591
|
-
let a = Array.from(i).sort((e, t) => e - t), o =
|
|
1592
|
-
return o.set(n, a),
|
|
1608
|
+
let a = Array.from(i).sort((e, t) => e - t), o = Nn.get(e) ?? /* @__PURE__ */ new Map();
|
|
1609
|
+
return o.set(n, a), Nn.set(e, o), a;
|
|
1593
1610
|
}
|
|
1594
|
-
function
|
|
1611
|
+
function Ln(e, t, n) {
|
|
1595
1612
|
if (n <= 1) return 0;
|
|
1596
1613
|
let r = 0;
|
|
1597
1614
|
for (let i of e) {
|
|
1598
|
-
let e =
|
|
1615
|
+
let e = In(i, t);
|
|
1599
1616
|
if (e.length < n) return t[1] - t[0];
|
|
1600
1617
|
let a = Infinity;
|
|
1601
1618
|
for (let t = 0; t + n <= e.length; t += 1) a = Math.min(a, e[t + n - 1] - e[t]);
|
|
@@ -1604,17 +1621,17 @@ function Nn(e, t, n) {
|
|
|
1604
1621
|
}
|
|
1605
1622
|
return r;
|
|
1606
1623
|
}
|
|
1607
|
-
function
|
|
1608
|
-
let r =
|
|
1624
|
+
function Rn(e, t, n) {
|
|
1625
|
+
let r = Pn(e), i = r[1] - r[0];
|
|
1609
1626
|
if (!Number.isFinite(i) || i <= 0) return 0;
|
|
1610
|
-
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o =
|
|
1627
|
+
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o = Fn(n.minVisiblePoints), s = Ln(t, r, o);
|
|
1611
1628
|
return a > 0 || o > 0 ? Math.max(a, s) : i / mt.DEFAULT_MAX_SCALE;
|
|
1612
1629
|
}
|
|
1613
|
-
function
|
|
1630
|
+
function zn(e, t, n, r) {
|
|
1614
1631
|
if (r <= 0) return e;
|
|
1615
1632
|
let i = 2 ** -52 * Math.max(1, Math.abs(t[0]), Math.abs(t[1])) * 16, a = e;
|
|
1616
1633
|
for (let e of n) {
|
|
1617
|
-
let n =
|
|
1634
|
+
let n = In(e, t);
|
|
1618
1635
|
if (n.length < r) return [...t];
|
|
1619
1636
|
if (n.filter((e) => e >= a[0] && e <= a[1]).length >= r) continue;
|
|
1620
1637
|
let o, s = Infinity, c = Infinity, l = (a[0] + a[1]) / 2;
|
|
@@ -1626,27 +1643,27 @@ function Fn(e, t, n, r) {
|
|
|
1626
1643
|
}
|
|
1627
1644
|
return a;
|
|
1628
1645
|
}
|
|
1629
|
-
function
|
|
1630
|
-
let i =
|
|
1646
|
+
function Bn(e, t, n, r) {
|
|
1647
|
+
let i = Pn(t), a = i[1] - i[0];
|
|
1631
1648
|
if (!Number.isFinite(a) || a <= 0 || Math.abs(e[1] - e[0]) >= a * .999999999999) return i;
|
|
1632
|
-
let o =
|
|
1649
|
+
let o = zn([Math.max(i[0], Math.min(e[0], e[1])), Math.min(i[1], Math.max(e[0], e[1]))], i, n, Fn(r.minVisiblePoints)), s = Rn(i, n, r), c = Math.max(s, Math.min(a, o[1] - o[0])), l = (o[0] + o[1]) / 2, u = Math.max(i[0], Math.min(l - c / 2, i[1] - c));
|
|
1633
1650
|
return [u, u + c];
|
|
1634
1651
|
}
|
|
1635
|
-
function
|
|
1652
|
+
function Vn(e, t, n) {
|
|
1636
1653
|
let r = t[1] - t[0], i = e[1] - e[0];
|
|
1637
|
-
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return
|
|
1654
|
+
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return G;
|
|
1638
1655
|
let a = r / i, o = B(t, [0, n]);
|
|
1639
|
-
return
|
|
1656
|
+
return G.translate(-a * o(e[0]), 0).scale(a);
|
|
1640
1657
|
}
|
|
1641
1658
|
//#endregion
|
|
1642
1659
|
//#region src/components/interaction/useWaveformViewport.ts
|
|
1643
|
-
function
|
|
1660
|
+
function Hn(e) {
|
|
1644
1661
|
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: S, canZoomSharedTracks: C, configureZoom: w, cancelPendingZoom: T, clearHover: E, resolveTrackAtPointer: D } = e, O = x(), k = (e, t) => {
|
|
1645
1662
|
let n = O.value, r = t?.currentTarget;
|
|
1646
|
-
|
|
1663
|
+
On(n, e), r && r !== n && On(r, e);
|
|
1647
1664
|
}, A = (e, t) => {
|
|
1648
1665
|
let n = i.value;
|
|
1649
|
-
!n || n.pointerId !== e || (k(e, t), i.value =
|
|
1666
|
+
!n || n.pointerId !== e || (k(e, t), i.value = Mn(i.value, {
|
|
1650
1667
|
type: "cancel",
|
|
1651
1668
|
pointerId: e
|
|
1652
1669
|
}).state, O.value = void 0);
|
|
@@ -1669,7 +1686,7 @@ function Rn(e) {
|
|
|
1669
1686
|
if (!n.zoomable && !s || !_.value || e.button !== 0) return;
|
|
1670
1687
|
let c = e.currentTarget, d = o.value.find((e) => e.index === t);
|
|
1671
1688
|
if (!d) return;
|
|
1672
|
-
let [f, p] = z(e, c), m = Math.max(0, Math.min(r ? d.width : l.value, f)), h = Math.max(0, Math.min(r ? d.height : u.value, p)), g =
|
|
1689
|
+
let [f, p] = z(e, c), m = Math.max(0, Math.min(r ? d.width : l.value, f)), h = Math.max(0, Math.min(r ? d.height : u.value, p)), g = Mn(i.value, {
|
|
1673
1690
|
type: "begin",
|
|
1674
1691
|
gesture: {
|
|
1675
1692
|
trackIndex: t,
|
|
@@ -1691,8 +1708,8 @@ function Rn(e) {
|
|
|
1691
1708
|
let i = t.width || 1, a = t.height || 1, u = e.currentX - e.startX, d = e.currentY - e.startY, f = e.xDomain[1] - e.xDomain[0], _ = e.independent ? b(t) : c.value, v = M([e.xDomain[0] - u / i * f, e.xDomain[1] - u / i * f], _);
|
|
1692
1709
|
if (e.independent) {
|
|
1693
1710
|
let e = [...m.value];
|
|
1694
|
-
e[t.index] =
|
|
1695
|
-
} else p.value =
|
|
1711
|
+
e[t.index] = Vn(v, _, i), m.value = e;
|
|
1712
|
+
} else p.value = Vn(v, _, l.value);
|
|
1696
1713
|
let y = e.independent ? [t] : o.value, x = { ...g.value }, S = { ...h.value };
|
|
1697
1714
|
y.forEach((t) => {
|
|
1698
1715
|
let r = s.value.find((e) => e.id === t.id);
|
|
@@ -1706,7 +1723,7 @@ function Rn(e) {
|
|
|
1706
1723
|
if (!t || !n || e.pointerId !== t.pointerId) return;
|
|
1707
1724
|
let r = o.value.find((e) => e.index === t.trackIndex);
|
|
1708
1725
|
if (!r) return;
|
|
1709
|
-
let [a, s] = z(e, n), c = Math.max(0, Math.min(t.independent ? r.width : l.value, a)), d = Math.max(0, Math.min(t.independent ? r.height : u.value, s)), f =
|
|
1726
|
+
let [a, s] = z(e, n), c = Math.max(0, Math.min(t.independent ? r.width : l.value, a)), d = Math.max(0, Math.min(t.independent ? r.height : u.value, s)), f = Mn(i.value, {
|
|
1710
1727
|
type: "move",
|
|
1711
1728
|
pointerId: e.pointerId,
|
|
1712
1729
|
position: {
|
|
@@ -1725,11 +1742,11 @@ function Rn(e) {
|
|
|
1725
1742
|
if (!t || (e.independent ? !S(t) : !C())) return;
|
|
1726
1743
|
let i = e.independent ? 0 : t.left, a = Math.max(0, Math.min(t.width, Math.min(e.startX, e.currentX) - i)), s = Math.max(0, Math.min(t.width, Math.max(e.startX, e.currentX) - i));
|
|
1727
1744
|
if (s - a < 6) return;
|
|
1728
|
-
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h =
|
|
1745
|
+
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h = Bn([t.xScale.invert(a), t.xScale.invert(s)], u, f, n);
|
|
1729
1746
|
if (e.independent) {
|
|
1730
1747
|
let e = [...m.value];
|
|
1731
|
-
e[t.index] =
|
|
1732
|
-
} else p.value =
|
|
1748
|
+
e[t.index] = Vn(h, u, t.width), m.value = e;
|
|
1749
|
+
} else p.value = Vn(h, u, l.value);
|
|
1733
1750
|
let g = e.independent ? [t] : o.value, _ = Object.fromEntries(g.map((e) => [e.series.trackId ?? e.series.id, e.yScale.domain()]));
|
|
1734
1751
|
if (r("zoom-change", h), e.independent) {
|
|
1735
1752
|
let e = _[t.series.trackId ?? t.series.id];
|
|
@@ -1770,7 +1787,7 @@ function Rn(e) {
|
|
|
1770
1787
|
A(t.pointerId, e);
|
|
1771
1788
|
return;
|
|
1772
1789
|
}
|
|
1773
|
-
let [a, s] = z(e, r), c = Math.max(0, Math.min(t.independent ? n.width : l.value, a)), f = Math.max(0, Math.min(t.independent ? n.height : u.value, s)), p =
|
|
1790
|
+
let [a, s] = z(e, r), c = Math.max(0, Math.min(t.independent ? n.width : l.value, a)), f = Math.max(0, Math.min(t.independent ? n.height : u.value, s)), p = Mn(i.value, {
|
|
1774
1791
|
type: "finish",
|
|
1775
1792
|
pointerId: e.pointerId,
|
|
1776
1793
|
position: {
|
|
@@ -1788,10 +1805,10 @@ function Rn(e) {
|
|
|
1788
1805
|
}, H = (e) => {
|
|
1789
1806
|
if (T(), R(), n.displayMode === "independent" && e !== void 0) {
|
|
1790
1807
|
let t = [...m.value];
|
|
1791
|
-
t[e] =
|
|
1808
|
+
t[e] = G, m.value = t;
|
|
1792
1809
|
let n = { ...g.value };
|
|
1793
1810
|
delete n[e], g.value = n;
|
|
1794
|
-
} else p.value =
|
|
1811
|
+
} else p.value = G, m.value = s.value.map(() => G), h.value = {}, g.value = {};
|
|
1795
1812
|
E(), y.value = [], d(w);
|
|
1796
1813
|
};
|
|
1797
1814
|
return {
|
|
@@ -1820,7 +1837,7 @@ function Rn(e) {
|
|
|
1820
1837
|
}
|
|
1821
1838
|
//#endregion
|
|
1822
1839
|
//#region src/components/utils/useAnimationFrameThrottle.ts
|
|
1823
|
-
function
|
|
1840
|
+
function Un() {
|
|
1824
1841
|
let e = null, t = null;
|
|
1825
1842
|
function n(n) {
|
|
1826
1843
|
t = n, e === null && (e = requestAnimationFrame(() => {
|
|
@@ -1849,8 +1866,8 @@ function zn() {
|
|
|
1849
1866
|
}
|
|
1850
1867
|
//#endregion
|
|
1851
1868
|
//#region src/components/interaction/useWaveformZoom.ts
|
|
1852
|
-
function
|
|
1853
|
-
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 =
|
|
1869
|
+
function Wn(e) {
|
|
1870
|
+
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 = Un(), 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) => {
|
|
1854
1871
|
y || m.value || (g(), b = e.transform, x = "wheel", O(), P());
|
|
1855
1872
|
}, A = (e, t) => {
|
|
1856
1873
|
y || m.value || (g(), C.set(t, e.transform), w.set(t, "wheel"), O(), P());
|
|
@@ -1938,9 +1955,9 @@ function Bn(e) {
|
|
|
1938
1955
|
}, L = (e, n) => {
|
|
1939
1956
|
let r = Math.abs(e[1] - e[0]);
|
|
1940
1957
|
if (!Number.isFinite(r) || r <= 0) return mt.MIN_SCALE;
|
|
1941
|
-
let i =
|
|
1958
|
+
let i = Rn(e, n, t);
|
|
1942
1959
|
return Math.max(mt.MIN_SCALE, i > 0 ? r / i : mt.DEFAULT_MAX_SCALE);
|
|
1943
|
-
}, R = (e, n, r, i) =>
|
|
1960
|
+
}, R = (e, n, r, i) => Vn(Bn(e.rescaleX(B(n, [0, r])).domain(), n, i, t), n, r), z = (e) => {
|
|
1944
1961
|
let n = Number(t.minVisiblePoints);
|
|
1945
1962
|
return Ut(e.seriesList, e.xScale.domain(), Number.isFinite(n) && n > 0 ? Math.ceil(n) + 1 : n);
|
|
1946
1963
|
}, H = () => {
|
|
@@ -1949,7 +1966,7 @@ function Bn(e) {
|
|
|
1949
1966
|
}, U = (e, t) => {
|
|
1950
1967
|
if (e.type !== "wheel") return !1;
|
|
1951
1968
|
let n = e.deltaY;
|
|
1952
|
-
return n < 0 ? t : n > 0 &&
|
|
1969
|
+
return n < 0 ? t : n > 0 && re(e.currentTarget).k > mt.MIN_SCALE;
|
|
1953
1970
|
};
|
|
1954
1971
|
return {
|
|
1955
1972
|
cancelPendingZoom: F,
|
|
@@ -1962,13 +1979,13 @@ function Bn(e) {
|
|
|
1962
1979
|
s.value.forEach((e) => {
|
|
1963
1980
|
let t = r.value?.querySelector(`[data-independent-overlay-index="${e.index}"]`);
|
|
1964
1981
|
if (!t) return;
|
|
1965
|
-
let n = h(e), i = [e.seriesList], a =
|
|
1982
|
+
let n = h(e), i = [e.seriesList], a = W().filter((t) => {
|
|
1966
1983
|
let n = s.value.find((t) => t.index === e.index) ?? e;
|
|
1967
1984
|
return U(t, z(n));
|
|
1968
1985
|
}).scaleExtent([1, L(n, i)]).constrain((t) => R(t, n, e.width, i)).extent([[0, 0], [e.width, e.height]]).translateExtent([[0, 0], [e.width, e.height]]).on("zoom", (t) => A(t, e.index)).on("end", N);
|
|
1969
1986
|
_.set(e.index, a), y = !0;
|
|
1970
1987
|
try {
|
|
1971
|
-
V(t).call(a).on("dblclick.zoom", null).call(a.transform, o.value[e.index] ??
|
|
1988
|
+
V(t).call(a).on("dblclick.zoom", null).call(a.transform, o.value[e.index] ?? G);
|
|
1972
1989
|
} finally {
|
|
1973
1990
|
y = !1;
|
|
1974
1991
|
}
|
|
@@ -1977,7 +1994,7 @@ function Bn(e) {
|
|
|
1977
1994
|
}
|
|
1978
1995
|
let e = i.value;
|
|
1979
1996
|
if (!e) return;
|
|
1980
|
-
let n = s.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), l =
|
|
1997
|
+
let n = s.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), l = W().filter((e) => U(e, H())).scaleExtent([1, L(c.value, n)]).constrain((e) => R(e, c.value, u.value, n)).extent([[0, 0], [u.value, d.value]]).translateExtent([[0, 0], [u.value, d.value]]).on("zoom", k).on("end", N);
|
|
1981
1998
|
_.set("shared", l), y = !0;
|
|
1982
1999
|
try {
|
|
1983
2000
|
V(e).call(l).on("dblclick.zoom", null).call(l.transform, a.value);
|
|
@@ -1989,45 +2006,45 @@ function Bn(e) {
|
|
|
1989
2006
|
}
|
|
1990
2007
|
//#endregion
|
|
1991
2008
|
//#region src/components/core/useWaveformChartLifecycle.ts
|
|
1992
|
-
function
|
|
2009
|
+
function Gn(e) {
|
|
1993
2010
|
return e instanceof Element && !!e.closest("button, input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
1994
2011
|
}
|
|
1995
|
-
function
|
|
2012
|
+
function Kn(e) {
|
|
1996
2013
|
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, trackLayouts: w, innerWidth: T, innerHeight: D, activeInteractionMode: O, hiddenSeriesIdSet: k, internalHiddenSeriesIds: A, independentTransforms: j, independentYDomains: M, resolveInitialTrackDomain: N, annotationInteraction: P, editorSeriesOptions: F, isPresentationMode: I, clearHover: L, cancelAnnotation: R, configureZoom: z, resetViewport: B, cancelViewportDrag: V, cancelPendingHover: H, clearZoomBindings: U } = e;
|
|
1997
2014
|
function ee(e) {
|
|
1998
|
-
I.value || e.code !== "Space" || !t.pannable || !_.value ||
|
|
2015
|
+
I.value || e.code !== "Space" || !t.pannable || !_.value || Gn(e.target) || (g.value = !0, e.preventDefault());
|
|
1999
2016
|
}
|
|
2000
|
-
function
|
|
2017
|
+
function te(e) {
|
|
2001
2018
|
e.code === "Space" && (g.value = !1);
|
|
2002
2019
|
}
|
|
2003
|
-
function
|
|
2020
|
+
function ne(e) {
|
|
2004
2021
|
let r = Math.min(y.value, Math.max(1, Math.floor(e)));
|
|
2005
|
-
r !== v.value && (v.value = r, L(), P.closeContextMenu(), R(), t.displayMode === "independent" && (j.value = b.value.map(() =>
|
|
2022
|
+
r !== v.value && (v.value = r, L(), P.closeContextMenu(), R(), t.displayMode === "independent" && (j.value = b.value.map(() => G), M.value = {}), d(z), n("page-change", r, y.value));
|
|
2006
2023
|
}
|
|
2007
|
-
let
|
|
2008
|
-
function
|
|
2009
|
-
t.displayMode === "independent" && (
|
|
2024
|
+
let W;
|
|
2025
|
+
function re() {
|
|
2026
|
+
t.displayMode === "independent" && (W = w.value.map((e) => {
|
|
2010
2027
|
let n = t.initialXDomains?.[e.series.trackId ?? e.series.id] ?? t.initialXDomains?.[e.series.id] ?? t.initialXDomain;
|
|
2011
2028
|
if (!(!n || !Number.isFinite(n[0]) || !Number.isFinite(n[1]) || n[0] === n[1])) return e.xScale.domain();
|
|
2012
2029
|
}));
|
|
2013
2030
|
}
|
|
2014
|
-
function
|
|
2031
|
+
function ie() {
|
|
2015
2032
|
if (t.displayMode === "independent") {
|
|
2016
2033
|
let e = j.value;
|
|
2017
|
-
j.value = C.value.map((t, n) => e[n] ??
|
|
2034
|
+
j.value = C.value.map((t, n) => e[n] ?? G);
|
|
2018
2035
|
}
|
|
2019
2036
|
L(), F.value = [], d(() => {
|
|
2020
|
-
if (t.displayMode === "independent" &&
|
|
2021
|
-
let e = C.value.map(() =>
|
|
2037
|
+
if (t.displayMode === "independent" && W) {
|
|
2038
|
+
let e = C.value.map(() => G);
|
|
2022
2039
|
w.value.forEach((n) => {
|
|
2023
|
-
let r =
|
|
2040
|
+
let r = W?.[n.index];
|
|
2024
2041
|
if (!r) return;
|
|
2025
|
-
let i = N(n), a =
|
|
2026
|
-
e[n.index] =
|
|
2027
|
-
}), j.value = e,
|
|
2042
|
+
let i = N(n), a = Bn(r, i, [n.seriesList], t);
|
|
2043
|
+
e[n.index] = Vn(a, i, n.width);
|
|
2044
|
+
}), j.value = e, W = void 0, d(z);
|
|
2028
2045
|
return;
|
|
2029
2046
|
}
|
|
2030
|
-
|
|
2047
|
+
W = void 0, z();
|
|
2031
2048
|
});
|
|
2032
2049
|
}
|
|
2033
2050
|
E([
|
|
@@ -2039,6 +2056,7 @@ function Hn(e) {
|
|
|
2039
2056
|
() => t.minVisiblePoints,
|
|
2040
2057
|
() => t.initialXDomain,
|
|
2041
2058
|
() => t.initialXDomains,
|
|
2059
|
+
() => t.xDomainStrategy,
|
|
2042
2060
|
() => t.displayMode,
|
|
2043
2061
|
() => C.value.length,
|
|
2044
2062
|
v,
|
|
@@ -2079,7 +2097,7 @@ function Hn(e) {
|
|
|
2079
2097
|
let n = P.editorDraft.value;
|
|
2080
2098
|
n?.mode === "edit" && !e.some((e) => e.id === n.annotation.id) && P.closeEditor();
|
|
2081
2099
|
}, { deep: !0 });
|
|
2082
|
-
function
|
|
2100
|
+
function K() {
|
|
2083
2101
|
if (!f.value || !i.value) {
|
|
2084
2102
|
c.value = 0, l.value = 0;
|
|
2085
2103
|
return;
|
|
@@ -2092,22 +2110,22 @@ function Hn(e) {
|
|
|
2092
2110
|
f,
|
|
2093
2111
|
p
|
|
2094
2112
|
], async () => {
|
|
2095
|
-
c.value = 0, l.value = 0, await d(),
|
|
2113
|
+
c.value = 0, l.value = 0, await d(), K();
|
|
2096
2114
|
}, { immediate: !0 }), h(() => {
|
|
2097
|
-
window.addEventListener("keydown", ee), window.addEventListener("keyup",
|
|
2098
|
-
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(
|
|
2115
|
+
window.addEventListener("keydown", ee), window.addEventListener("keyup", te), r.value && (a.value = new ResizeObserver(([e]) => {
|
|
2116
|
+
o.value = Math.max(0, e?.contentRect.width ?? 0), s.value = Math.max(0, e?.contentRect.height ?? 0), d(K);
|
|
2099
2117
|
}), a.value.observe(r.value));
|
|
2100
2118
|
}), m(() => {
|
|
2101
|
-
window.removeEventListener("keydown", ee), window.removeEventListener("keyup",
|
|
2119
|
+
window.removeEventListener("keydown", ee), window.removeEventListener("keyup", te), H(), a.value?.disconnect(), U(), F.value = [];
|
|
2102
2120
|
}), {
|
|
2103
|
-
goToPage:
|
|
2104
|
-
handleBeforeDataReferenceChange:
|
|
2105
|
-
handleDataReferenceChange:
|
|
2121
|
+
goToPage: ne,
|
|
2122
|
+
handleBeforeDataReferenceChange: re,
|
|
2123
|
+
handleDataReferenceChange: ie
|
|
2106
2124
|
};
|
|
2107
2125
|
}
|
|
2108
2126
|
//#endregion
|
|
2109
2127
|
//#region src/components/core/useWaveformData.ts
|
|
2110
|
-
function
|
|
2128
|
+
function qn(e, t = !1) {
|
|
2111
2129
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = !1;
|
|
2112
2130
|
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) {
|
|
2113
2131
|
let e = At(s);
|
|
@@ -2119,24 +2137,24 @@ function Un(e, t = !1) {
|
|
|
2119
2137
|
hasErrorPoints: o
|
|
2120
2138
|
};
|
|
2121
2139
|
}
|
|
2122
|
-
function
|
|
2140
|
+
function Jn(e) {
|
|
2123
2141
|
return Mt(e).map((e) => {
|
|
2124
|
-
let t =
|
|
2142
|
+
let t = qn(e.points, e.errorBar.visible);
|
|
2125
2143
|
return {
|
|
2126
2144
|
...e,
|
|
2127
2145
|
...t
|
|
2128
2146
|
};
|
|
2129
2147
|
});
|
|
2130
2148
|
}
|
|
2131
|
-
function
|
|
2132
|
-
let r = x(
|
|
2149
|
+
function Yn(e, t, n) {
|
|
2150
|
+
let r = x(Jn(e()));
|
|
2133
2151
|
return E(e, (e) => {
|
|
2134
|
-
t(), r.value =
|
|
2152
|
+
t(), r.value = Jn(e), n();
|
|
2135
2153
|
}), r;
|
|
2136
2154
|
}
|
|
2137
2155
|
//#endregion
|
|
2138
2156
|
//#region src/components/core/useWaveformLayout.ts
|
|
2139
|
-
function
|
|
2157
|
+
function Xn(e) {
|
|
2140
2158
|
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) => ({
|
|
2141
2159
|
...e,
|
|
2142
2160
|
color: e.color ?? (t === 0 ? n.lineColor : _t[t % _t.length])
|
|
@@ -2158,14 +2176,14 @@ function Kn(e) {
|
|
|
2158
2176
|
};
|
|
2159
2177
|
});
|
|
2160
2178
|
}), g = t(() => Xt(n.grid)), _ = t(() => zt(n.rendering)), v = t(() => Qt(h.value.length, g.value)), y = t(() => $t(h.value, i.value, g.value)), b = t(() => {
|
|
2161
|
-
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) =>
|
|
2179
|
+
let e = h.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => _n(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => vn(e.domain, !e.fixed).tickTextWidth), t = Math.max(7, ...e), r = t + 7 + 4, i = -(7 + t + 6 + 24 / 2);
|
|
2162
2180
|
return {
|
|
2163
2181
|
tickClearance: r,
|
|
2164
2182
|
fullClearance: t + 7 + 6 + 24 + 4,
|
|
2165
2183
|
labelCenterX: i
|
|
2166
2184
|
};
|
|
2167
2185
|
}), 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) => {
|
|
2168
|
-
let r =
|
|
2186
|
+
let r = xn(t, n.overlayMode, n.yDomain, n.yDomains);
|
|
2169
2187
|
return {
|
|
2170
2188
|
left: Math.max(e.left, r.left),
|
|
2171
2189
|
right: Math.max(e.right, r.right)
|
|
@@ -2186,14 +2204,14 @@ function Kn(e) {
|
|
|
2186
2204
|
}), $(e);
|
|
2187
2205
|
}), F = t(() => {
|
|
2188
2206
|
let e = n.initialXDomain;
|
|
2189
|
-
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? e[0] < e[1] ? e : [e[1], e[0]] : P.value;
|
|
2207
|
+
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? on(e[0] < e[1] ? e : [e[1], e[0]], n.xDomainStrategy, !0) : on(P.value, n.xDomainStrategy);
|
|
2190
2208
|
}), I = (e) => {
|
|
2191
2209
|
let t = n.initialXDomains?.[e.series.trackId ?? e.series.id] ?? n.initialXDomains?.[e.series.id] ?? n.initialXDomain;
|
|
2192
|
-
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? t[0] < t[1] ? t : [t[1], t[0]] : $(e.seriesList.flatMap((e) => e.xDomain));
|
|
2210
|
+
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? on(t[0] < t[1] ? t : [t[1], t[0]], n.xDomainStrategy, !0) : on($(e.seriesList.flatMap((e) => e.xDomain)), n.xDomainStrategy);
|
|
2193
2211
|
}, L = t(() => l.value.rescaleX(B(F.value, [0, D.value])).domain()), R = t(() => tn(D.value, s.value, g.value, n.displayMode, y.value.map(Boolean), O.value.horizontalGap).map((e, t) => ({
|
|
2194
2212
|
...e,
|
|
2195
2213
|
series: y.value[t]
|
|
2196
|
-
}))), z = t(() =>
|
|
2214
|
+
}))), z = t(() => cn({
|
|
2197
2215
|
cells: R.value,
|
|
2198
2216
|
grid: g.value,
|
|
2199
2217
|
displayMode: n.displayMode,
|
|
@@ -2202,6 +2220,7 @@ function Kn(e) {
|
|
|
2202
2220
|
sharedZoomDomain: L.value,
|
|
2203
2221
|
initialXDomain: n.initialXDomain ? F.value : void 0,
|
|
2204
2222
|
initialXDomains: n.initialXDomains,
|
|
2223
|
+
xDomainStrategy: n.xDomainStrategy,
|
|
2205
2224
|
fixedYDomain: n.yDomain,
|
|
2206
2225
|
fixedYDomains: n.yDomains,
|
|
2207
2226
|
yDomains: n.displayMode === "independent" ? Object.fromEntries(h.value.flatMap((e, t) => {
|
|
@@ -2241,7 +2260,7 @@ function Kn(e) {
|
|
|
2241
2260
|
annotationLayoutsForTrack: V,
|
|
2242
2261
|
resolveSeriesYScale: H,
|
|
2243
2262
|
annotationTrackLayouts: U,
|
|
2244
|
-
renderedAnnotations: t(() => n.annotationsVisible ?
|
|
2263
|
+
renderedAnnotations: t(() => n.annotationsVisible ? me(n.annotations, U.value, D.value, s.value) : []),
|
|
2245
2264
|
editorSeries: t(() => {
|
|
2246
2265
|
let e = p.editorDraft.value?.annotation.seriesId, t = m.value.find((t) => t.id === e);
|
|
2247
2266
|
return t ? {
|
|
@@ -2256,13 +2275,13 @@ function Kn(e) {
|
|
|
2256
2275
|
}
|
|
2257
2276
|
};
|
|
2258
2277
|
}
|
|
2259
|
-
var
|
|
2260
|
-
function
|
|
2278
|
+
var Zn = 1e-6;
|
|
2279
|
+
function Qn(e) {
|
|
2261
2280
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2262
2281
|
}
|
|
2263
|
-
function
|
|
2264
|
-
let i =
|
|
2265
|
-
if (!(d >
|
|
2282
|
+
function $n({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2283
|
+
let i = Qn(e), a = Qn(t), o = Qn(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;
|
|
2284
|
+
if (!(d > Zn && Math.abs(d - 360) > Zn)) {
|
|
2266
2285
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2267
2286
|
return {
|
|
2268
2287
|
textWidth: t,
|
|
@@ -2287,7 +2306,7 @@ function Yn({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2287
2306
|
}
|
|
2288
2307
|
//#endregion
|
|
2289
2308
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2290
|
-
function
|
|
2309
|
+
function er(e) {
|
|
2291
2310
|
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(() => ({
|
|
2292
2311
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2293
2312
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -2332,7 +2351,7 @@ function Xn(e) {
|
|
|
2332
2351
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
2333
2352
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
2334
2353
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
2335
|
-
})), N = t(() =>
|
|
2354
|
+
})), N = t(() => $n({
|
|
2336
2355
|
naturalWidth: a.value || A.value,
|
|
2337
2356
|
naturalHeight: o.value || E.value * 1.2,
|
|
2338
2357
|
availableWidth: j.value,
|
|
@@ -2388,22 +2407,22 @@ function Xn(e) {
|
|
|
2388
2407
|
}
|
|
2389
2408
|
//#endregion
|
|
2390
2409
|
//#region src/components/core/useWaveformChartController.ts
|
|
2391
|
-
function
|
|
2410
|
+
function tr(e, t) {
|
|
2392
2411
|
e.value = t instanceof Element ? t : void 0;
|
|
2393
2412
|
}
|
|
2394
|
-
function
|
|
2395
|
-
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(
|
|
2413
|
+
function nr(e, t) {
|
|
2414
|
+
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(G), p = x([]), m = v({}), h = v({}), g = b({
|
|
2396
2415
|
points: [],
|
|
2397
2416
|
trackIndex: null,
|
|
2398
2417
|
position: {
|
|
2399
2418
|
x: 0,
|
|
2400
2419
|
y: 0
|
|
2401
2420
|
}
|
|
2402
|
-
}), y = v(!1), S = v(1), w = x(), T =
|
|
2421
|
+
}), y = v(!1), S = v(1), w = x(), T = oe("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ge(), A = v([]), j = Un();
|
|
2403
2422
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2404
2423
|
m.value = {}, h.value = {};
|
|
2405
2424
|
}, { deep: !0 });
|
|
2406
|
-
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L =
|
|
2425
|
+
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L = Yn(() => e.data, () => F(), () => I()), R = er({
|
|
2407
2426
|
props: e,
|
|
2408
2427
|
observedWidth: o,
|
|
2409
2428
|
observedHeight: s,
|
|
@@ -2411,76 +2430,76 @@ function Qn(e, t) {
|
|
|
2411
2430
|
measuredTitleHeight: l,
|
|
2412
2431
|
internalHiddenSeriesIds: O,
|
|
2413
2432
|
paginationBandHeight: d
|
|
2414
|
-
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved:
|
|
2433
|
+
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: W, chartTopMargin: re, innerHeight: ie } = R, K = Xn({
|
|
2415
2434
|
props: e,
|
|
2416
2435
|
preparedSeries: L,
|
|
2417
2436
|
currentPage: S,
|
|
2418
2437
|
hiddenSeriesIdSet: U,
|
|
2419
2438
|
chartWidth: z,
|
|
2420
|
-
innerHeight:
|
|
2439
|
+
innerHeight: ie,
|
|
2421
2440
|
isCleanView: V,
|
|
2422
2441
|
sharedTransform: f,
|
|
2423
2442
|
independentTransforms: p,
|
|
2424
2443
|
sharedYDomains: m,
|
|
2425
2444
|
independentYDomains: h,
|
|
2426
2445
|
annotationInteraction: u(k)
|
|
2427
|
-
}), { chartSeries:
|
|
2446
|
+
}), { chartSeries: ae, chartTracks: se, trackLayouts: ce, gridOptions: le, pageCount: ue, pagedTracks: de, resolvedChartLeftMargin: fe, innerWidth: q, hasChartArea: pe, activeInteractionMode: me, isZoomMode: J, initialXDomain: he, sharedZoomDomain: Y, resolveInitialTrackDomain: ge, annotationLayoutsForTrack: _e, resolveSeriesYScale: ve } = K;
|
|
2428
2447
|
D(() => {
|
|
2429
|
-
d.value =
|
|
2448
|
+
d.value = le.value.showPagination && ue.value > 1 && z.value <= 520 ? 40 : 0;
|
|
2430
2449
|
});
|
|
2431
|
-
let X =
|
|
2450
|
+
let X = Wn({
|
|
2432
2451
|
props: e,
|
|
2433
2452
|
emit: t,
|
|
2434
2453
|
svgElement: r,
|
|
2435
2454
|
sharedOverlayElement: a,
|
|
2436
2455
|
sharedTransform: f,
|
|
2437
2456
|
independentTransforms: p,
|
|
2438
|
-
trackLayouts:
|
|
2439
|
-
initialXDomain:
|
|
2440
|
-
sharedZoomDomain:
|
|
2441
|
-
innerWidth:
|
|
2442
|
-
innerHeight:
|
|
2443
|
-
hasChartArea:
|
|
2444
|
-
isZoomMode:
|
|
2457
|
+
trackLayouts: ce,
|
|
2458
|
+
initialXDomain: he,
|
|
2459
|
+
sharedZoomDomain: Y,
|
|
2460
|
+
innerWidth: q,
|
|
2461
|
+
innerHeight: ie,
|
|
2462
|
+
hasChartArea: pe,
|
|
2463
|
+
isZoomMode: J,
|
|
2445
2464
|
isPresentationMode: H,
|
|
2446
2465
|
resolveInitialTrackDomain: ge,
|
|
2447
2466
|
cancelPendingHover: () => Z.cancelPendingHover()
|
|
2448
|
-
}), ye =
|
|
2467
|
+
}), ye = Tn({
|
|
2449
2468
|
props: e,
|
|
2450
2469
|
emit: t,
|
|
2451
2470
|
container: n,
|
|
2452
|
-
chartSeries:
|
|
2471
|
+
chartSeries: ae,
|
|
2453
2472
|
hiddenSeriesIdSet: U,
|
|
2454
2473
|
internalHiddenSeriesIds: O,
|
|
2455
2474
|
annotationInteraction: k,
|
|
2456
2475
|
editorSeriesOptions: A,
|
|
2457
|
-
trackLayouts:
|
|
2476
|
+
trackLayouts: ce,
|
|
2458
2477
|
annotationLayoutsForTrack: _e,
|
|
2459
2478
|
resolveSeriesYScale: ve,
|
|
2460
2479
|
chartWidth: z,
|
|
2461
2480
|
chartHeight: B,
|
|
2462
|
-
innerWidth:
|
|
2463
|
-
resolvedChartLeftMargin:
|
|
2464
|
-
titleAreaHeight:
|
|
2465
|
-
chartTopMargin:
|
|
2466
|
-
activeInteractionMode:
|
|
2481
|
+
innerWidth: q,
|
|
2482
|
+
resolvedChartLeftMargin: fe,
|
|
2483
|
+
titleAreaHeight: W,
|
|
2484
|
+
chartTopMargin: re,
|
|
2485
|
+
activeInteractionMode: me,
|
|
2467
2486
|
isPresentationMode: H
|
|
2468
|
-
}), be =
|
|
2487
|
+
}), be = Hn({
|
|
2469
2488
|
props: e,
|
|
2470
2489
|
emit: t,
|
|
2471
2490
|
selection: M,
|
|
2472
2491
|
spacePressed: N,
|
|
2473
|
-
trackLayouts:
|
|
2474
|
-
chartTracks:
|
|
2475
|
-
initialXDomain:
|
|
2476
|
-
innerWidth:
|
|
2477
|
-
innerHeight:
|
|
2492
|
+
trackLayouts: ce,
|
|
2493
|
+
chartTracks: se,
|
|
2494
|
+
initialXDomain: he,
|
|
2495
|
+
innerWidth: q,
|
|
2496
|
+
innerHeight: ie,
|
|
2478
2497
|
sharedOverlayElement: a,
|
|
2479
2498
|
sharedTransform: f,
|
|
2480
2499
|
independentTransforms: p,
|
|
2481
2500
|
sharedYDomains: m,
|
|
2482
2501
|
independentYDomains: h,
|
|
2483
|
-
isZoomMode:
|
|
2502
|
+
isZoomMode: J,
|
|
2484
2503
|
isPresentationMode: H,
|
|
2485
2504
|
editorSeriesOptions: A,
|
|
2486
2505
|
resolveInitialTrackDomain: ge,
|
|
@@ -2490,22 +2509,22 @@ function Qn(e, t) {
|
|
|
2490
2509
|
cancelPendingZoom: X.cancelPendingZoom,
|
|
2491
2510
|
clearHover: () => Z.clearHover(),
|
|
2492
2511
|
resolveTrackAtPointer: ye.resolveTrackAtPointer
|
|
2493
|
-
}), Z =
|
|
2512
|
+
}), Z = Dn({
|
|
2494
2513
|
emit: t,
|
|
2495
2514
|
hoverState: g,
|
|
2496
2515
|
suppressHoverUntilMove: y,
|
|
2497
2516
|
hoverThrottle: j,
|
|
2498
2517
|
selection: M,
|
|
2499
|
-
trackLayouts:
|
|
2500
|
-
innerWidth:
|
|
2501
|
-
resolvedChartLeftMargin:
|
|
2502
|
-
titleAreaHeight:
|
|
2503
|
-
chartTopMargin:
|
|
2518
|
+
trackLayouts: ce,
|
|
2519
|
+
innerWidth: q,
|
|
2520
|
+
resolvedChartLeftMargin: fe,
|
|
2521
|
+
titleAreaHeight: W,
|
|
2522
|
+
chartTopMargin: re,
|
|
2504
2523
|
sharedOverlayElement: a,
|
|
2505
2524
|
isPresentationMode: H,
|
|
2506
2525
|
updateViewportDrag: be.updateViewportDrag,
|
|
2507
2526
|
resolveTrackAtPointer: ye.resolveTrackAtPointer
|
|
2508
|
-
}), xe =
|
|
2527
|
+
}), xe = Kn({
|
|
2509
2528
|
props: e,
|
|
2510
2529
|
emit: t,
|
|
2511
2530
|
container: n,
|
|
@@ -2516,20 +2535,20 @@ function Qn(e, t) {
|
|
|
2516
2535
|
measuredTitleWidth: c,
|
|
2517
2536
|
measuredTitleHeight: l,
|
|
2518
2537
|
resolvedTitleText: ee,
|
|
2519
|
-
titleAreaReserved:
|
|
2520
|
-
titleMeasureStyle:
|
|
2538
|
+
titleAreaReserved: te,
|
|
2539
|
+
titleMeasureStyle: ne,
|
|
2521
2540
|
spacePressed: N,
|
|
2522
2541
|
pointerInsideChart: P,
|
|
2523
2542
|
currentPage: S,
|
|
2524
|
-
pageCount:
|
|
2525
|
-
pagedTracks:
|
|
2526
|
-
gridOptions:
|
|
2527
|
-
chartSeries:
|
|
2528
|
-
chartTracks:
|
|
2529
|
-
trackLayouts:
|
|
2530
|
-
innerWidth:
|
|
2531
|
-
innerHeight:
|
|
2532
|
-
activeInteractionMode:
|
|
2543
|
+
pageCount: ue,
|
|
2544
|
+
pagedTracks: de,
|
|
2545
|
+
gridOptions: le,
|
|
2546
|
+
chartSeries: ae,
|
|
2547
|
+
chartTracks: se,
|
|
2548
|
+
trackLayouts: ce,
|
|
2549
|
+
innerWidth: q,
|
|
2550
|
+
innerHeight: ie,
|
|
2551
|
+
activeInteractionMode: me,
|
|
2533
2552
|
hiddenSeriesIdSet: U,
|
|
2534
2553
|
internalHiddenSeriesIds: O,
|
|
2535
2554
|
independentTransforms: p,
|
|
@@ -2549,7 +2568,7 @@ function Qn(e, t) {
|
|
|
2549
2568
|
return F = xe.handleBeforeDataReferenceChange, I = xe.handleDataReferenceChange, _({
|
|
2550
2569
|
...C(e),
|
|
2551
2570
|
...R,
|
|
2552
|
-
...
|
|
2571
|
+
...K,
|
|
2553
2572
|
...ye,
|
|
2554
2573
|
...be,
|
|
2555
2574
|
...Z,
|
|
@@ -2565,31 +2584,31 @@ function Qn(e, t) {
|
|
|
2565
2584
|
editorSeriesOptions: A,
|
|
2566
2585
|
clipPathId: T,
|
|
2567
2586
|
goToPage: xe.goToPage,
|
|
2568
|
-
setContainer: (e) =>
|
|
2569
|
-
setSvgElement: (e) =>
|
|
2570
|
-
setTitleMeasureElement: (e) =>
|
|
2571
|
-
setSharedOverlayElement: (e) =>
|
|
2587
|
+
setContainer: (e) => tr(n, e),
|
|
2588
|
+
setSvgElement: (e) => tr(r, e),
|
|
2589
|
+
setTitleMeasureElement: (e) => tr(i, e),
|
|
2590
|
+
setSharedOverlayElement: (e) => tr(a, e)
|
|
2572
2591
|
});
|
|
2573
2592
|
}
|
|
2574
2593
|
//#endregion
|
|
2575
2594
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
2576
|
-
var
|
|
2595
|
+
var rr = ["aria-labelledby"], ir = { class: "waveform-annotation-editor__panel" }, ar = { class: "waveform-annotation-editor__header" }, or = ["id"], sr = {
|
|
2577
2596
|
class: "waveform-annotation-editor__coordinates",
|
|
2578
2597
|
"aria-label": "标注坐标"
|
|
2579
|
-
},
|
|
2598
|
+
}, cr = {
|
|
2580
2599
|
key: 0,
|
|
2581
2600
|
class: "waveform-annotation-editor__series",
|
|
2582
2601
|
"aria-label": "标注所属波形"
|
|
2583
|
-
},
|
|
2602
|
+
}, lr = { class: "waveform-annotation-editor__series-label" }, ur = ["value"], dr = ["value"], fr = { key: 1 }, pr = { class: "waveform-annotation-editor__field" }, mr = { class: "waveform-annotation-editor__label-row" }, hr = ["maxlength"], gr = { class: "waveform-annotation-editor__colors" }, _r = {
|
|
2584
2603
|
class: "waveform-annotation-editor__color-field",
|
|
2585
2604
|
title: "调整标注边框色和透明度"
|
|
2586
|
-
},
|
|
2605
|
+
}, vr = {
|
|
2587
2606
|
class: "waveform-annotation-editor__color-field",
|
|
2588
2607
|
title: "调整标注文字色和透明度"
|
|
2589
|
-
},
|
|
2608
|
+
}, yr = {
|
|
2590
2609
|
class: "waveform-annotation-editor__color-field",
|
|
2591
2610
|
title: "调整标注背景色和透明度"
|
|
2592
|
-
},
|
|
2611
|
+
}, br = { class: "waveform-annotation-editor__actions" }, xr = ["disabled"], Sr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2593
2612
|
__name: "WaveformAnnotationEditor",
|
|
2594
2613
|
props: {
|
|
2595
2614
|
annotation: {},
|
|
@@ -2604,7 +2623,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2604
2623
|
"series-change"
|
|
2605
2624
|
],
|
|
2606
2625
|
setup(n, { emit: o }) {
|
|
2607
|
-
let c = n, l = o, u = v(), f =
|
|
2626
|
+
let c = n, l = o, u = v(), f = oe("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(() => {
|
|
2608
2627
|
let e = c.seriesOptions?.find((e) => e.seriesId === c.annotation.seriesId);
|
|
2609
2628
|
return e ? {
|
|
2610
2629
|
id: e.seriesId,
|
|
@@ -2642,21 +2661,21 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2642
2661
|
"aria-modal": "true",
|
|
2643
2662
|
"aria-labelledby": w(f),
|
|
2644
2663
|
onClick: n[6] ||= k((e) => l("cancel"), ["self"])
|
|
2645
|
-
}, [a("section",
|
|
2646
|
-
a("header",
|
|
2664
|
+
}, [a("section", ir, [
|
|
2665
|
+
a("header", ar, [a("div", null, [a("h2", { id: w(f) }, S(c.mode === "add" ? "添加标注" : "编辑标注"), 9, or)]), a("button", {
|
|
2647
2666
|
type: "button",
|
|
2648
2667
|
class: "waveform-annotation-editor__close",
|
|
2649
2668
|
"aria-label": "关闭标注编辑器",
|
|
2650
2669
|
title: "关闭",
|
|
2651
2670
|
onClick: n[0] ||= (e) => l("cancel")
|
|
2652
2671
|
}, " × ")]),
|
|
2653
|
-
a("div",
|
|
2654
|
-
D.value ? (g(), i("label",
|
|
2672
|
+
a("div", sr, [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)])]),
|
|
2673
|
+
D.value ? (g(), i("label", cr, [
|
|
2655
2674
|
a("i", {
|
|
2656
2675
|
style: p({ backgroundColor: D.value.color }),
|
|
2657
2676
|
"aria-hidden": "true"
|
|
2658
2677
|
}, null, 4),
|
|
2659
|
-
a("span",
|
|
2678
|
+
a("span", lr, [n[8] ||= a("small", null, "标注波形", -1), a("b", null, S(D.value.name), 1)]),
|
|
2660
2679
|
c.seriesOptions?.length ? (g(), i("select", {
|
|
2661
2680
|
key: 0,
|
|
2662
2681
|
value: c.annotation.seriesId,
|
|
@@ -2665,9 +2684,9 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2665
2684
|
}, [(g(!0), i(e, null, y(c.seriesOptions, (e) => (g(), i("option", {
|
|
2666
2685
|
key: e.seriesId,
|
|
2667
2686
|
value: e.seriesId
|
|
2668
|
-
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9,
|
|
2687
|
+
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9, dr))), 128))], 40, ur)) : D.value.unit ? (g(), i("code", fr, S(D.value.unit), 1)) : r("", !0)
|
|
2669
2688
|
])) : r("", !0),
|
|
2670
|
-
a("label",
|
|
2689
|
+
a("label", pr, [a("span", mr, [n[9] ||= a("b", null, "标注文本", -1), a("small", null, S(C.value) + "/" + S(w(40)), 1)]), O(a("textarea", {
|
|
2671
2690
|
ref_key: "textarea",
|
|
2672
2691
|
ref: u,
|
|
2673
2692
|
"onUpdate:modelValue": n[1] ||= (e) => m.value = e,
|
|
@@ -2676,10 +2695,10 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2676
2695
|
"aria-label": "标注文本",
|
|
2677
2696
|
placeholder: "输入这处波形的说明",
|
|
2678
2697
|
onKeydown: M
|
|
2679
|
-
}, null, 40,
|
|
2680
|
-
a("fieldset",
|
|
2698
|
+
}, null, 40, hr), [[T, m.value]])]),
|
|
2699
|
+
a("fieldset", gr, [
|
|
2681
2700
|
n[13] ||= a("legend", null, "颜色与透明度", -1),
|
|
2682
|
-
a("label",
|
|
2701
|
+
a("label", _r, [n[10] ||= a("span", null, "边框色", -1), s(w(K), {
|
|
2683
2702
|
"pure-color": h.value,
|
|
2684
2703
|
"onUpdate:pureColor": n[2] ||= (e) => h.value = e,
|
|
2685
2704
|
"aria-label": "标注边框色",
|
|
@@ -2689,7 +2708,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2689
2708
|
"disable-alpha": !1,
|
|
2690
2709
|
"blur-close": !0
|
|
2691
2710
|
}, null, 8, ["pure-color"])]),
|
|
2692
|
-
a("label",
|
|
2711
|
+
a("label", vr, [n[11] ||= a("span", null, "文字色", -1), s(w(K), {
|
|
2693
2712
|
"pure-color": _.value,
|
|
2694
2713
|
"onUpdate:pureColor": n[3] ||= (e) => _.value = e,
|
|
2695
2714
|
"aria-label": "标注文字色",
|
|
@@ -2699,7 +2718,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2699
2718
|
"disable-alpha": !1,
|
|
2700
2719
|
"blur-close": !0
|
|
2701
2720
|
}, null, 8, ["pure-color"])]),
|
|
2702
|
-
a("label",
|
|
2721
|
+
a("label", yr, [n[12] ||= a("span", null, "背景色", -1), s(w(K), {
|
|
2703
2722
|
"pure-color": b.value,
|
|
2704
2723
|
"onUpdate:pureColor": n[4] ||= (e) => b.value = e,
|
|
2705
2724
|
"aria-label": "标注背景色",
|
|
@@ -2710,7 +2729,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2710
2729
|
"blur-close": !0
|
|
2711
2730
|
}, null, 8, ["pure-color"])])
|
|
2712
2731
|
]),
|
|
2713
|
-
a("footer",
|
|
2732
|
+
a("footer", br, [a("button", {
|
|
2714
2733
|
type: "button",
|
|
2715
2734
|
onClick: n[5] ||= (e) => l("cancel")
|
|
2716
2735
|
}, "取消"), a("button", {
|
|
@@ -2718,10 +2737,10 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2718
2737
|
class: "is-primary",
|
|
2719
2738
|
disabled: !x.value,
|
|
2720
2739
|
onClick: j
|
|
2721
|
-
}, " 保存标注 ", 8,
|
|
2722
|
-
])], 8,
|
|
2740
|
+
}, " 保存标注 ", 8, xr)])
|
|
2741
|
+
])], 8, rr));
|
|
2723
2742
|
}
|
|
2724
|
-
}), [["__scopeId", "data-v-52818b45"]]),
|
|
2743
|
+
}), [["__scopeId", "data-v-52818b45"]]), Cr = { class: "waveform-tooltip__series-content" }, wr = { class: "waveform-tooltip__series-label" }, Tr = { class: "waveform-tooltip__value" }, Er = 12, Dr = 8, Or = 238, kr = 560, Ar = 20, jr = 20, Mr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2725
2744
|
__name: "WaveformTooltip",
|
|
2726
2745
|
props: {
|
|
2727
2746
|
visible: { type: Boolean },
|
|
@@ -2735,48 +2754,43 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2735
2754
|
setup(n) {
|
|
2736
2755
|
let s = n;
|
|
2737
2756
|
function c(e, t) {
|
|
2738
|
-
let n = Math.max(1, t -
|
|
2757
|
+
let n = Math.max(1, t - Ar - 14), r = Math.max(1, Math.floor(n / 7.2));
|
|
2739
2758
|
return Math.max(1, Math.ceil([...e].length / r));
|
|
2740
2759
|
}
|
|
2741
2760
|
function l(e) {
|
|
2742
|
-
let t =
|
|
2743
|
-
return `${e.
|
|
2761
|
+
let t = lt(s.hoveredPoint?.x ?? e.point.x, s.timeUnit);
|
|
2762
|
+
return `${e.shotNo?.trim() || "未配置炮号"}: ${e.name}${e.unit ? `(${e.unit})` : ""} (x:${t} y:${rt(e.point.y)})`;
|
|
2744
2763
|
}
|
|
2745
|
-
function u(e
|
|
2746
|
-
|
|
2747
|
-
return 16 + kr * (c(t, e) + n) + 5;
|
|
2764
|
+
function u(e) {
|
|
2765
|
+
return 16 + jr * s.seriesPoints.reduce((t, n) => t + c(l(n), e), 0) + 5;
|
|
2748
2766
|
}
|
|
2749
2767
|
let d = t(() => {
|
|
2750
2768
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
2751
|
-
let e = s.position.x +
|
|
2769
|
+
let e = s.position.x + Er, t = s.position.x - Er - Or, n = s.containerWidth - Dr - e, r = s.position.x - Er - Dr, i = Math.max(1, Math.min(kr, s.containerWidth - Dr * 2)), a = e + Or <= s.containerWidth - Dr ? {
|
|
2752
2770
|
left: `${e}px`,
|
|
2753
|
-
maxWidth: `${Math.min(
|
|
2754
|
-
} : t >=
|
|
2755
|
-
right: `${s.containerWidth - s.position.x +
|
|
2756
|
-
maxWidth: `${Math.min(
|
|
2771
|
+
maxWidth: `${Math.min(kr, n)}px`
|
|
2772
|
+
} : t >= Dr ? {
|
|
2773
|
+
right: `${s.containerWidth - s.position.x + Er}px`,
|
|
2774
|
+
maxWidth: `${Math.min(kr, r)}px`
|
|
2757
2775
|
} : {
|
|
2758
|
-
left: `${
|
|
2776
|
+
left: `${Dr}px`,
|
|
2759
2777
|
maxWidth: `${i}px`
|
|
2760
|
-
}, o = Number.parseFloat(a.maxWidth)
|
|
2778
|
+
}, o = Number.parseFloat(a.maxWidth);
|
|
2761
2779
|
return {
|
|
2762
2780
|
...a,
|
|
2763
|
-
top: `${Math.max(8, Math.min(s.position.y - 18, s.containerHeight - u(o
|
|
2781
|
+
top: `${Math.max(8, Math.min(s.position.y - 18, s.containerHeight - u(o) - 8))}px`
|
|
2764
2782
|
};
|
|
2765
2783
|
});
|
|
2766
|
-
function f(e) {
|
|
2767
|
-
let { lower: t, upper: n } = At(e);
|
|
2768
|
-
return t === 0 && n === 0 ? null : `(+${rt(n)} / -${rt(t)})`;
|
|
2769
|
-
}
|
|
2770
2784
|
return (t, s) => n.visible && n.hoveredPoint ? (g(), i("div", {
|
|
2771
2785
|
key: 0,
|
|
2772
2786
|
class: "waveform-tooltip waveform-chart__tooltip",
|
|
2773
2787
|
style: p(d.value)
|
|
2774
|
-
}, [
|
|
2775
|
-
key: `${
|
|
2788
|
+
}, [(g(!0), i(e, null, y(n.seriesPoints, (t) => (g(), i("span", {
|
|
2789
|
+
key: `${t.trackIndex}-${t.name}`,
|
|
2776
2790
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
2777
|
-
}, [a("i", { style: p({ backgroundColor:
|
|
2791
|
+
}, [a("i", { style: p({ backgroundColor: t.color }) }, null, 4), a("span", Cr, [a("span", wr, [o(S(t.shotNo?.trim() || "未配置炮号") + ": " + S(t.name), 1), t.unit ? (g(), i(e, { key: 0 }, [o("(" + S(t.unit) + ")", 1)], 64)) : r("", !0)]), a("span", Tr, "(x:" + S(w(lt)(n.hoveredPoint.x, n.timeUnit)) + " y:" + S(w(rt)(t.point.y)) + ")", 1)])]))), 128))], 4)) : r("", !0);
|
|
2778
2792
|
}
|
|
2779
|
-
}), [["__scopeId", "data-v-
|
|
2793
|
+
}), [["__scopeId", "data-v-1f55d6c8"]]), Nr = /* @__PURE__ */ c({
|
|
2780
2794
|
__name: "WaveformHoverHost",
|
|
2781
2795
|
props: {
|
|
2782
2796
|
state: {},
|
|
@@ -2787,7 +2801,7 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2787
2801
|
},
|
|
2788
2802
|
setup(e) {
|
|
2789
2803
|
let r = e, i = t(() => r.state.points[0]?.point ?? null);
|
|
2790
|
-
return (t, r) => (g(), n(
|
|
2804
|
+
return (t, r) => (g(), n(Mr, {
|
|
2791
2805
|
visible: e.visible && i.value !== null,
|
|
2792
2806
|
position: e.state.position,
|
|
2793
2807
|
"time-unit": e.timeUnit,
|
|
@@ -2805,16 +2819,16 @@ var $n = ["aria-labelledby"], er = { class: "waveform-annotation-editor__panel"
|
|
|
2805
2819
|
"container-height"
|
|
2806
2820
|
]));
|
|
2807
2821
|
}
|
|
2808
|
-
}),
|
|
2822
|
+
}), Pr = 13, Fr = 2, Ir = 14, Lr = 8, Rr = 24, zr = {
|
|
2809
2823
|
circle: U,
|
|
2810
|
-
square:
|
|
2811
|
-
triangle:
|
|
2824
|
+
square: te,
|
|
2825
|
+
triangle: ne,
|
|
2812
2826
|
diamond: ee
|
|
2813
2827
|
};
|
|
2814
|
-
function
|
|
2815
|
-
return e === "none" ? null : H().type(
|
|
2828
|
+
function Br(e, t = 48) {
|
|
2829
|
+
return e === "none" ? null : H().type(zr[e]).size(t)() ?? null;
|
|
2816
2830
|
}
|
|
2817
|
-
function
|
|
2831
|
+
function Vr(e, t, n = 48) {
|
|
2818
2832
|
if (e === "none" || t.length === 0) return null;
|
|
2819
2833
|
if (e === "circle") {
|
|
2820
2834
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -2831,24 +2845,24 @@ function zr(e, t, n = 48) {
|
|
|
2831
2845
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
2832
2846
|
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("");
|
|
2833
2847
|
}
|
|
2834
|
-
function
|
|
2848
|
+
function Hr(e) {
|
|
2835
2849
|
return e === "none" ? null : "M1 8H25";
|
|
2836
2850
|
}
|
|
2837
|
-
function
|
|
2851
|
+
function Ur(e) {
|
|
2838
2852
|
if (e === "dashed") return "8 5";
|
|
2839
2853
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
2840
2854
|
}
|
|
2841
|
-
function
|
|
2842
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
2855
|
+
function Wr(e) {
|
|
2856
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, Rr) : Lr) / 2, n = Pr - t, r = Pr + t;
|
|
2843
2857
|
return [
|
|
2844
|
-
`M${n} ${
|
|
2845
|
-
`M${
|
|
2846
|
-
`M${n} ${
|
|
2858
|
+
`M${n} ${Fr}H${r}`,
|
|
2859
|
+
`M${Pr} ${Fr}V${Ir}`,
|
|
2860
|
+
`M${n} ${Ir}H${r}`
|
|
2847
2861
|
].join("");
|
|
2848
2862
|
}
|
|
2849
2863
|
//#endregion
|
|
2850
2864
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
2851
|
-
var
|
|
2865
|
+
var Gr = ["clip-path"], Kr = ["data-series-id", "data-series-name"], qr = [
|
|
2852
2866
|
"data-series-id",
|
|
2853
2867
|
"data-series-name",
|
|
2854
2868
|
"data-y-axis-index",
|
|
@@ -2857,11 +2871,11 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2857
2871
|
"d",
|
|
2858
2872
|
"stroke",
|
|
2859
2873
|
"stroke-dasharray"
|
|
2860
|
-
],
|
|
2874
|
+
], Jr = ["data-series-id"], Yr = [
|
|
2861
2875
|
"d",
|
|
2862
2876
|
"stroke",
|
|
2863
2877
|
"stroke-width"
|
|
2864
|
-
],
|
|
2878
|
+
], Xr = ["data-series-id", "data-point-type"], Zr = ["d", "fill"], Qr = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
2865
2879
|
__name: "WaveformSeriesLayer",
|
|
2866
2880
|
props: {
|
|
2867
2881
|
track: {},
|
|
@@ -2869,7 +2883,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2869
2883
|
},
|
|
2870
2884
|
setup(n) {
|
|
2871
2885
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
2872
|
-
let t =
|
|
2886
|
+
let t = Vr(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
2873
2887
|
x: a.track.xScale(t.x),
|
|
2874
2888
|
y: e.yScale(t.y)
|
|
2875
2889
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
@@ -2906,8 +2920,8 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2906
2920
|
"data-line-style": e.series.lineStyle,
|
|
2907
2921
|
d: e.path,
|
|
2908
2922
|
stroke: e.series.color,
|
|
2909
|
-
"stroke-dasharray": w(
|
|
2910
|
-
}, null, 8,
|
|
2923
|
+
"stroke-dasharray": w(Ur)(e.series.lineStyle)
|
|
2924
|
+
}, null, 8, qr)) : r("", !0),
|
|
2911
2925
|
e.series.errorBar.visible ? (g(), i("g", {
|
|
2912
2926
|
key: 1,
|
|
2913
2927
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -2918,7 +2932,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2918
2932
|
d: e.errorBarPath,
|
|
2919
2933
|
stroke: e.series.errorBar.color || e.series.color,
|
|
2920
2934
|
"stroke-width": e.series.errorBar.width
|
|
2921
|
-
}, null, 8,
|
|
2935
|
+
}, null, 8, Yr)) : r("", !0)], 8, Jr)) : r("", !0),
|
|
2922
2936
|
e.series.pointType === "none" ? r("", !0) : (g(), i("g", {
|
|
2923
2937
|
key: 2,
|
|
2924
2938
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -2929,20 +2943,20 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
2929
2943
|
class: "waveform-track__point waveform-chart__point",
|
|
2930
2944
|
d: e.pointPath,
|
|
2931
2945
|
fill: e.series.color
|
|
2932
|
-
}, null, 8,
|
|
2933
|
-
], 8,
|
|
2946
|
+
}, null, 8, Zr)) : r("", !0)], 8, Xr))
|
|
2947
|
+
], 8, Kr))), 128))], 8, Gr)) : r("", !0);
|
|
2934
2948
|
}
|
|
2935
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
2949
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), $r = ["transform"], ei = ["transform"], ti = {
|
|
2936
2950
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
2937
2951
|
x: "0",
|
|
2938
2952
|
y: "7",
|
|
2939
2953
|
dy: "0.71em",
|
|
2940
2954
|
"text-anchor": "start"
|
|
2941
|
-
},
|
|
2955
|
+
}, ni = ["x"], ri = [
|
|
2942
2956
|
"data-y-axis-index",
|
|
2943
2957
|
"data-y-axis-side",
|
|
2944
2958
|
"transform"
|
|
2945
|
-
],
|
|
2959
|
+
], ii = { key: 2 }, ai = ["x", "y"], oi = ["fill", "transform"], si = ["data-y-axis-title-index"], ci = ["x", "y"], li = ["fill", "transform"], ui = /* @__PURE__ */ c({
|
|
2946
2960
|
__name: "WaveformTrackAxes",
|
|
2947
2961
|
props: {
|
|
2948
2962
|
track: {},
|
|
@@ -3001,7 +3015,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3001
3015
|
ref: o,
|
|
3002
3016
|
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 }]),
|
|
3003
3017
|
transform: `translate(0, ${t.track.height})`
|
|
3004
|
-
}, null, 10,
|
|
3018
|
+
}, null, 10, $r)) : r("", !0),
|
|
3005
3019
|
t.track.showXAxis ? (g(), i("g", {
|
|
3006
3020
|
key: 1,
|
|
3007
3021
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -3009,13 +3023,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3009
3023
|
"font-family": "sans-serif",
|
|
3010
3024
|
"font-size": "10",
|
|
3011
3025
|
"aria-hidden": "true"
|
|
3012
|
-
}, [a("text",
|
|
3026
|
+
}, [a("text", ti, S(t.track.endpointLabels.start), 1), a("text", {
|
|
3013
3027
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
3014
3028
|
x: t.track.width ?? t.innerWidth,
|
|
3015
3029
|
y: "7",
|
|
3016
3030
|
dy: "0.71em",
|
|
3017
3031
|
"text-anchor": "end"
|
|
3018
|
-
}, S(t.track.endpointLabels.end), 9,
|
|
3032
|
+
}, S(t.track.endpointLabels.end), 9, ni)], 8, ei)) : r("", !0),
|
|
3019
3033
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes, (e) => (g(), i("g", {
|
|
3020
3034
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
3021
3035
|
ref_for: !0,
|
|
@@ -3024,21 +3038,21 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3024
3038
|
"data-y-axis-index": e.index,
|
|
3025
3039
|
"data-y-axis-side": e.side,
|
|
3026
3040
|
transform: `translate(${e.x}, 0)`
|
|
3027
|
-
}, null, 10,
|
|
3028
|
-
!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",
|
|
3041
|
+
}, null, 10, ri))), 128)),
|
|
3042
|
+
!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", ii, [a("rect", {
|
|
3029
3043
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
3030
3044
|
x: t.track.yAxisLabelX - 12,
|
|
3031
3045
|
y: t.track.height / 2 - 40,
|
|
3032
3046
|
width: "24",
|
|
3033
3047
|
height: "80",
|
|
3034
3048
|
rx: "2"
|
|
3035
|
-
}, null, 8,
|
|
3049
|
+
}, null, 8, ai), a("text", {
|
|
3036
3050
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3037
3051
|
fill: t.track.series.color,
|
|
3038
3052
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3039
3053
|
"text-anchor": "middle",
|
|
3040
3054
|
"dominant-baseline": "central"
|
|
3041
|
-
}, S(c(t.track.series)), 9,
|
|
3055
|
+
}, S(c(t.track.series)), 9, oi)])) : r("", !0),
|
|
3042
3056
|
(g(!0), i(e, null, y(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (g(), i("g", {
|
|
3043
3057
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
3044
3058
|
class: "waveform-track__multi-axis-title",
|
|
@@ -3050,40 +3064,40 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3050
3064
|
width: "24",
|
|
3051
3065
|
height: "80",
|
|
3052
3066
|
rx: "2"
|
|
3053
|
-
}, null, 8,
|
|
3067
|
+
}, null, 8, ci), a("text", {
|
|
3054
3068
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3055
3069
|
fill: e.seriesList[0].color,
|
|
3056
3070
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3057
3071
|
"text-anchor": "middle",
|
|
3058
3072
|
"dominant-baseline": "central"
|
|
3059
|
-
}, S(c(e.seriesList[0])), 9,
|
|
3073
|
+
}, S(c(e.seriesList[0])), 9, li)], 8, si))), 128))
|
|
3060
3074
|
], 64));
|
|
3061
3075
|
}
|
|
3062
|
-
}),
|
|
3076
|
+
}), di = [
|
|
3063
3077
|
"width",
|
|
3064
3078
|
"height",
|
|
3065
3079
|
"fill"
|
|
3066
|
-
],
|
|
3080
|
+
], fi = ["clip-path"], pi = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, mi = [
|
|
3067
3081
|
"stroke",
|
|
3068
3082
|
"x1",
|
|
3069
3083
|
"x2",
|
|
3070
3084
|
"y2"
|
|
3071
|
-
],
|
|
3085
|
+
], hi = [
|
|
3072
3086
|
"stroke",
|
|
3073
3087
|
"x2",
|
|
3074
3088
|
"y1",
|
|
3075
3089
|
"y2"
|
|
3076
|
-
],
|
|
3090
|
+
], gi = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, _i = [
|
|
3077
3091
|
"stroke",
|
|
3078
3092
|
"x1",
|
|
3079
3093
|
"x2",
|
|
3080
3094
|
"y2"
|
|
3081
|
-
],
|
|
3095
|
+
], vi = [
|
|
3082
3096
|
"stroke",
|
|
3083
3097
|
"x2",
|
|
3084
3098
|
"y1",
|
|
3085
3099
|
"y2"
|
|
3086
|
-
],
|
|
3100
|
+
], yi = ["clip-path"], bi = [
|
|
3087
3101
|
"data-y-axis-index",
|
|
3088
3102
|
"x2",
|
|
3089
3103
|
"y1",
|
|
@@ -3091,7 +3105,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3091
3105
|
"stroke",
|
|
3092
3106
|
"stroke-width",
|
|
3093
3107
|
"stroke-dasharray"
|
|
3094
|
-
],
|
|
3108
|
+
], xi = ["x", "y"], Si = /* @__PURE__ */ c({
|
|
3095
3109
|
__name: "WaveformTrackBackdrop",
|
|
3096
3110
|
props: {
|
|
3097
3111
|
track: {},
|
|
@@ -3116,12 +3130,12 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3116
3130
|
height: t.track.height,
|
|
3117
3131
|
fill: t.frameStyle.backgroundColor,
|
|
3118
3132
|
"aria-hidden": "true"
|
|
3119
|
-
}, null, 8,
|
|
3133
|
+
}, null, 8, di)) : r("", !0),
|
|
3120
3134
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (g(), i("g", {
|
|
3121
3135
|
key: 1,
|
|
3122
3136
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
3123
3137
|
"aria-hidden": "true"
|
|
3124
|
-
}, [a("g",
|
|
3138
|
+
}, [a("g", pi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMinorTicks, (e) => (g(), i("line", {
|
|
3125
3139
|
key: `x-minor-${t.track.index}-${e}`,
|
|
3126
3140
|
"data-grid-direction": "vertical",
|
|
3127
3141
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3129,7 +3143,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3129
3143
|
x2: t.track.xScale(e),
|
|
3130
3144
|
y1: "0",
|
|
3131
3145
|
y2: t.track.height
|
|
3132
|
-
}, null, 8,
|
|
3146
|
+
}, null, 8, mi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMinorTicks, (e) => (g(), i("line", {
|
|
3133
3147
|
key: `y-minor-${t.track.index}-${e}`,
|
|
3134
3148
|
"data-grid-direction": "horizontal",
|
|
3135
3149
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3137,7 +3151,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3137
3151
|
x2: t.track.width ?? t.innerWidth,
|
|
3138
3152
|
y1: t.track.yScale(e),
|
|
3139
3153
|
y2: t.track.yScale(e)
|
|
3140
|
-
}, null, 8,
|
|
3154
|
+
}, null, 8, hi))), 128)) : r("", !0)]), a("g", gi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMajorTicks, (e) => (g(), i("line", {
|
|
3141
3155
|
key: `x-major-${t.track.index}-${e}`,
|
|
3142
3156
|
"data-grid-direction": "vertical",
|
|
3143
3157
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3145,7 +3159,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3145
3159
|
x2: t.track.xScale(e),
|
|
3146
3160
|
y1: "0",
|
|
3147
3161
|
y2: t.track.height
|
|
3148
|
-
}, null, 8,
|
|
3162
|
+
}, null, 8, _i))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMajorTicks, (e) => (g(), i("line", {
|
|
3149
3163
|
key: `y-major-${t.track.index}-${e}`,
|
|
3150
3164
|
"data-grid-direction": "horizontal",
|
|
3151
3165
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3153,7 +3167,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3153
3167
|
x2: t.track.width ?? t.innerWidth,
|
|
3154
3168
|
y1: t.track.yScale(e),
|
|
3155
3169
|
y2: t.track.yScale(e)
|
|
3156
|
-
}, null, 8,
|
|
3170
|
+
}, null, 8, vi))), 128)) : r("", !0)])], 8, fi)) : r("", !0),
|
|
3157
3171
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (g(), i("g", {
|
|
3158
3172
|
key: 2,
|
|
3159
3173
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -3170,7 +3184,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3170
3184
|
stroke: t.zeroLine.color,
|
|
3171
3185
|
"stroke-width": t.zeroLine.width,
|
|
3172
3186
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
3173
|
-
}, null, 8,
|
|
3187
|
+
}, null, 8, bi))], 64))), 128))], 8, yi)) : r("", !0),
|
|
3174
3188
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (g(), i("text", {
|
|
3175
3189
|
key: 3,
|
|
3176
3190
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -3180,10 +3194,10 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3180
3194
|
"text-anchor": "middle",
|
|
3181
3195
|
"dominant-baseline": "central",
|
|
3182
3196
|
"aria-hidden": "true"
|
|
3183
|
-
}, S(t.frameNumber), 13,
|
|
3197
|
+
}, S(t.frameNumber), 13, xi)) : r("", !0)
|
|
3184
3198
|
], 64));
|
|
3185
3199
|
}
|
|
3186
|
-
}),
|
|
3200
|
+
}), Ci = [
|
|
3187
3201
|
"data-track-index",
|
|
3188
3202
|
"data-track-empty",
|
|
3189
3203
|
"data-track-left",
|
|
@@ -3192,19 +3206,19 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3192
3206
|
"data-track-top",
|
|
3193
3207
|
"data-track-height",
|
|
3194
3208
|
"transform"
|
|
3195
|
-
],
|
|
3209
|
+
], wi = [
|
|
3196
3210
|
"width",
|
|
3197
3211
|
"height",
|
|
3198
3212
|
"stroke",
|
|
3199
3213
|
"stroke-width",
|
|
3200
3214
|
"stroke-dasharray",
|
|
3201
3215
|
"stroke-linecap"
|
|
3202
|
-
],
|
|
3216
|
+
], Ti = [
|
|
3203
3217
|
"data-interactive",
|
|
3204
3218
|
"data-independent-overlay-index",
|
|
3205
3219
|
"width",
|
|
3206
3220
|
"height"
|
|
3207
|
-
],
|
|
3221
|
+
], Ei = ["x", "y"], Di = /* @__PURE__ */ c({
|
|
3208
3222
|
__name: "WaveformTrack",
|
|
3209
3223
|
props: {
|
|
3210
3224
|
track: {},
|
|
@@ -3263,7 +3277,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3263
3277
|
"data-track-height": e.track.height,
|
|
3264
3278
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
3265
3279
|
}, [
|
|
3266
|
-
s(
|
|
3280
|
+
s(Si, {
|
|
3267
3281
|
track: e.track,
|
|
3268
3282
|
"clip-path-id": e.clipPathId,
|
|
3269
3283
|
"inner-width": e.innerWidth,
|
|
@@ -3280,7 +3294,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3280
3294
|
"frame-style",
|
|
3281
3295
|
"zero-line"
|
|
3282
3296
|
]),
|
|
3283
|
-
s(
|
|
3297
|
+
s(ui, {
|
|
3284
3298
|
track: e.track,
|
|
3285
3299
|
"inner-width": e.innerWidth,
|
|
3286
3300
|
"clean-view": e.cleanView,
|
|
@@ -3306,8 +3320,8 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3306
3320
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
3307
3321
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
3308
3322
|
"aria-hidden": "true"
|
|
3309
|
-
}, null, 8,
|
|
3310
|
-
s(
|
|
3323
|
+
}, null, 8, wi)),
|
|
3324
|
+
s(Qr, {
|
|
3311
3325
|
track: e.track,
|
|
3312
3326
|
"clip-path-id": e.clipPathId
|
|
3313
3327
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -3329,7 +3343,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3329
3343
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
3330
3344
|
onClick: n[5] ||= (e) => o("click", e),
|
|
3331
3345
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
3332
|
-
}, null, 42,
|
|
3346
|
+
}, null, 42, Ti)) : r("", !0),
|
|
3333
3347
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (g(), i("text", {
|
|
3334
3348
|
key: 2,
|
|
3335
3349
|
class: "waveform-track__no-visible-series",
|
|
@@ -3337,33 +3351,33 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3337
3351
|
y: e.track.height / 2,
|
|
3338
3352
|
"text-anchor": "middle",
|
|
3339
3353
|
"dominant-baseline": "central"
|
|
3340
|
-
}, " 暂无可见曲线 ", 8,
|
|
3341
|
-
], 10,
|
|
3354
|
+
}, " 暂无可见曲线 ", 8, Ei)) : r("", !0)
|
|
3355
|
+
], 10, Ci));
|
|
3342
3356
|
}
|
|
3343
|
-
}),
|
|
3357
|
+
}), Oi = [
|
|
3344
3358
|
"width",
|
|
3345
3359
|
"height",
|
|
3346
3360
|
"data-position",
|
|
3347
3361
|
"data-orientation"
|
|
3348
|
-
],
|
|
3362
|
+
], ki = [
|
|
3349
3363
|
"disabled",
|
|
3350
3364
|
"aria-pressed",
|
|
3351
3365
|
"aria-label",
|
|
3352
3366
|
"onClick"
|
|
3353
|
-
],
|
|
3367
|
+
], Ai = [
|
|
3354
3368
|
"data-line-type",
|
|
3355
3369
|
"data-line-style",
|
|
3356
3370
|
"data-point-type",
|
|
3357
3371
|
"data-error-bar-visible"
|
|
3358
|
-
],
|
|
3372
|
+
], ji = [
|
|
3359
3373
|
"d",
|
|
3360
3374
|
"stroke",
|
|
3361
3375
|
"stroke-dasharray"
|
|
3362
|
-
],
|
|
3376
|
+
], Mi = [
|
|
3363
3377
|
"d",
|
|
3364
3378
|
"stroke",
|
|
3365
3379
|
"stroke-width"
|
|
3366
|
-
],
|
|
3380
|
+
], Ni = ["d", "fill"], Pi = ["title"], Fi = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
3367
3381
|
__name: "WaveformLegend",
|
|
3368
3382
|
props: {
|
|
3369
3383
|
series: {},
|
|
@@ -3421,45 +3435,45 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3421
3435
|
"data-point-type": e.pointType,
|
|
3422
3436
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
3423
3437
|
}, [
|
|
3424
|
-
w(
|
|
3438
|
+
w(Hr)(e.lineType) ? (g(), i("path", {
|
|
3425
3439
|
key: 0,
|
|
3426
3440
|
class: "waveform-legend__line",
|
|
3427
|
-
d: w(
|
|
3441
|
+
d: w(Hr)(e.lineType) ?? void 0,
|
|
3428
3442
|
stroke: e.color,
|
|
3429
|
-
"stroke-dasharray": w(
|
|
3443
|
+
"stroke-dasharray": w(Ur)(e.lineStyle),
|
|
3430
3444
|
"stroke-width": "1.5",
|
|
3431
3445
|
fill: "none"
|
|
3432
|
-
}, null, 8,
|
|
3446
|
+
}, null, 8, ji)) : r("", !0),
|
|
3433
3447
|
e.errorBar.visible ? (g(), i("path", {
|
|
3434
3448
|
key: 1,
|
|
3435
3449
|
class: "waveform-legend__error-bar",
|
|
3436
|
-
d: w(
|
|
3450
|
+
d: w(Wr)(e.errorBar.capWidth),
|
|
3437
3451
|
stroke: e.errorBar.color || e.color,
|
|
3438
3452
|
"stroke-width": e.errorBar.width,
|
|
3439
3453
|
"stroke-linecap": "butt",
|
|
3440
3454
|
fill: "none"
|
|
3441
|
-
}, null, 8,
|
|
3455
|
+
}, null, 8, Mi)) : r("", !0),
|
|
3442
3456
|
e.pointType === "none" ? r("", !0) : (g(), i("path", {
|
|
3443
3457
|
key: 2,
|
|
3444
3458
|
class: "waveform-legend__point",
|
|
3445
|
-
d: w(
|
|
3459
|
+
d: w(Br)(e.pointType, 30) ?? void 0,
|
|
3446
3460
|
fill: e.color,
|
|
3447
3461
|
transform: "translate(13 8)"
|
|
3448
|
-
}, null, 8,
|
|
3449
|
-
], 8,
|
|
3462
|
+
}, null, 8, Ni))
|
|
3463
|
+
], 8, Ai)), a("span", {
|
|
3450
3464
|
class: "waveform-legend__label",
|
|
3451
3465
|
title: e.name
|
|
3452
|
-
}, S(e.name), 9,
|
|
3466
|
+
}, S(e.name), 9, Pi)], 10, ki))), 128))], 6)], 2)], 8, Oi));
|
|
3453
3467
|
}
|
|
3454
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
3468
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), Ii = {
|
|
3455
3469
|
class: "waveform-chart__hover-layer",
|
|
3456
3470
|
"pointer-events": "none",
|
|
3457
3471
|
"aria-hidden": "true"
|
|
3458
|
-
},
|
|
3472
|
+
}, Li = ["clip-path", "transform"], Ri = [
|
|
3459
3473
|
"x1",
|
|
3460
3474
|
"x2",
|
|
3461
3475
|
"y2"
|
|
3462
|
-
],
|
|
3476
|
+
], zi = /*#__PURE__*/ je(/* @__PURE__ */ c({
|
|
3463
3477
|
__name: "WaveformHoverLayer",
|
|
3464
3478
|
props: {
|
|
3465
3479
|
state: {},
|
|
@@ -3482,7 +3496,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3482
3496
|
}] : [];
|
|
3483
3497
|
});
|
|
3484
3498
|
});
|
|
3485
|
-
return (t, r) => (g(), i("g",
|
|
3499
|
+
return (t, r) => (g(), i("g", Ii, [(g(!0), i(e, null, y(o.value, (e) => (g(), i("g", {
|
|
3486
3500
|
key: e.track.index,
|
|
3487
3501
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
3488
3502
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -3492,9 +3506,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3492
3506
|
x2: e.x,
|
|
3493
3507
|
y1: "0",
|
|
3494
3508
|
y2: e.track.height
|
|
3495
|
-
}, null, 8,
|
|
3509
|
+
}, null, 8, Ri)], 8, Li))), 128))]));
|
|
3496
3510
|
}
|
|
3497
|
-
}), [["__scopeId", "data-v-a6f82099"]]),
|
|
3511
|
+
}), [["__scopeId", "data-v-a6f82099"]]), Bi = [
|
|
3498
3512
|
"data-display-mode",
|
|
3499
3513
|
"data-interaction-mode",
|
|
3500
3514
|
"data-presentation-mode",
|
|
@@ -3503,35 +3517,35 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3503
3517
|
"data-plot-margin-top",
|
|
3504
3518
|
"data-plot-margin-bottom",
|
|
3505
3519
|
"data-title-area-height"
|
|
3506
|
-
],
|
|
3520
|
+
], Vi = [
|
|
3507
3521
|
"role",
|
|
3508
3522
|
"aria-level",
|
|
3509
3523
|
"aria-hidden"
|
|
3510
|
-
],
|
|
3524
|
+
], Hi = ["data-title-scale", "data-title-wrapped"], Ui = [
|
|
3511
3525
|
"width",
|
|
3512
3526
|
"height",
|
|
3513
3527
|
"aria-label"
|
|
3514
|
-
],
|
|
3528
|
+
], Wi = ["id"], Gi = ["width", "height"], Ki = ["transform"], qi = {
|
|
3515
3529
|
key: 0,
|
|
3516
3530
|
class: "waveform-chart__grid-slots",
|
|
3517
3531
|
"aria-hidden": "true"
|
|
3518
|
-
},
|
|
3532
|
+
}, Ji = ["transform"], Yi = ["width", "height"], Xi = ["width", "height"], Zi = [
|
|
3519
3533
|
"x",
|
|
3520
3534
|
"y",
|
|
3521
3535
|
"width",
|
|
3522
3536
|
"height"
|
|
3523
|
-
],
|
|
3537
|
+
], Qi = {
|
|
3524
3538
|
key: 4,
|
|
3525
3539
|
class: "waveform-chart__legend-layer"
|
|
3526
|
-
},
|
|
3540
|
+
}, $i = [
|
|
3527
3541
|
"data-legend-track-index",
|
|
3528
3542
|
"data-legend-track-id",
|
|
3529
3543
|
"transform"
|
|
3530
|
-
],
|
|
3544
|
+
], ea = ["x", "y"], ta = ["x", "y"], na = /* @__PURE__ */ c({
|
|
3531
3545
|
__name: "WaveformChartView",
|
|
3532
3546
|
props: { controller: {} },
|
|
3533
3547
|
setup(t) {
|
|
3534
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth:
|
|
3548
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: W, beginSharedViewportDrag: G, finishViewportDrag: re, cancelViewportDrag: K, handlePointerLeave: ae, handleAnnotationClick: oe, handleAnnotationContextMenu: se, resolveFrameNumber: ce, frameStyle: le, axes: ue, resolvedZeroLine: de, timeUnit: fe, yLabel: q, handleIndependentPointerMove: pe, beginViewportDrag: me, hoverState: J, showTooltip: he, selectionBox: Y, renderedAnnotations: ge, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: X, handleAnnotationMove: ye, endAnnotationDrag: be, resolveLegendPosition: Z, resolveLegendOrientation: xe, legendBackgroundColor: Se, legendInteractive: Ce, resolvedHiddenSeriesIds: we, toggleSeriesVisibility: Te, resolvedXLabel: Ee, xAxisTitleY: De, hasChartArea: Oe, gridOptions: ke, pageCount: Ae, currentPage: je, getPageSize: Pe, chartTracks: Q, goToPage: Fe, annotationInteraction: Ie, editorDraft: Le, contextMenu: Re, editorSeries: ze, editorSeriesOptions: Be, confirmAnnotation: Ve, cancelAnnotation: He, changeDraftSeries: Ue, editContextAnnotation: We, deleteContextAnnotation: Ge, chartHeight: $, setContainer: Ke, setSvgElement: qe, setTitleMeasureElement: Je, setSharedOverlayElement: Ye } = C(t.controller);
|
|
3535
3549
|
return (t, C) => (g(), i("div", {
|
|
3536
3550
|
ref: w(Ke),
|
|
3537
3551
|
class: f(["waveform-chart", [
|
|
@@ -3577,7 +3591,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3577
3591
|
style: p(w(M)),
|
|
3578
3592
|
"data-title-scale": w(N).scale,
|
|
3579
3593
|
"data-title-wrapped": w(N).wrapped || void 0
|
|
3580
|
-
}, S(w(A)), 13,
|
|
3594
|
+
}, S(w(A)), 13, Hi)], 4)) : r("", !0)], 12, Vi)) : r("", !0),
|
|
3581
3595
|
(g(), i("svg", {
|
|
3582
3596
|
ref: w(qe),
|
|
3583
3597
|
class: "waveform-chart__svg",
|
|
@@ -3594,9 +3608,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3594
3608
|
}, [a("rect", {
|
|
3595
3609
|
width: e.width,
|
|
3596
3610
|
height: e.height
|
|
3597
|
-
}, null, 8,
|
|
3611
|
+
}, null, 8, Gi)], 8, Wi))), 128))]),
|
|
3598
3612
|
a("g", { transform: `translate(${w(_)}, ${w(B)})` }, [
|
|
3599
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g",
|
|
3613
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", qi, [(g(!0), i(e, null, y(w(V), (e) => (g(), i("g", {
|
|
3600
3614
|
key: `grid-slot-${e.slotIndex}`,
|
|
3601
3615
|
transform: `translate(${e.left}, ${e.top})`
|
|
3602
3616
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3604,7 +3618,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3604
3618
|
class: "waveform-chart__grid-slot-placeholder",
|
|
3605
3619
|
width: e.width,
|
|
3606
3620
|
height: e.cellHeight
|
|
3607
|
-
}, null, 8,
|
|
3621
|
+
}, null, 8, Yi))], 8, Ji))), 128))])) : r("", !0),
|
|
3608
3622
|
w(o) !== "independent" && w(R).length && w(H) ? (g(), i("rect", {
|
|
3609
3623
|
key: 1,
|
|
3610
3624
|
ref: w(Ye),
|
|
@@ -3612,39 +3626,39 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3612
3626
|
"is-zoomable": !w(u) && w(U) && w(ee),
|
|
3613
3627
|
"is-annotating": !w(u) && w(c) === "annotation"
|
|
3614
3628
|
}]),
|
|
3615
|
-
width: w(
|
|
3616
|
-
height: w(
|
|
3617
|
-
onPointermove: C[0] ||= (...e) => w(
|
|
3618
|
-
onPointerdown: C[1] ||= (...e) => w(
|
|
3619
|
-
onPointerup: C[2] ||= (...e) => w(
|
|
3620
|
-
onPointercancel: C[3] ||= (...e) => w(
|
|
3621
|
-
onPointerleave: C[4] ||= (...e) => w(
|
|
3622
|
-
onClick: C[5] ||= (...e) => w(
|
|
3623
|
-
onContextmenu: C[6] ||= (...e) => w(
|
|
3624
|
-
}, null, 42,
|
|
3625
|
-
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(
|
|
3629
|
+
width: w(te),
|
|
3630
|
+
height: w(ne),
|
|
3631
|
+
onPointermove: C[0] ||= (...e) => w(W) && w(W)(...e),
|
|
3632
|
+
onPointerdown: C[1] ||= (...e) => w(G) && w(G)(...e),
|
|
3633
|
+
onPointerup: C[2] ||= (...e) => w(re) && w(re)(...e),
|
|
3634
|
+
onPointercancel: C[3] ||= (...e) => w(K) && w(K)(...e),
|
|
3635
|
+
onPointerleave: C[4] ||= (...e) => w(ae) && w(ae)(...e),
|
|
3636
|
+
onClick: C[5] ||= (...e) => w(oe) && w(oe)(...e),
|
|
3637
|
+
onContextmenu: C[6] ||= (...e) => w(se) && w(se)(...e)
|
|
3638
|
+
}, null, 42, Xi)) : r("", !0),
|
|
3639
|
+
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(Di), {
|
|
3626
3640
|
key: `${e.index}-${e.series.name}`,
|
|
3627
3641
|
track: e,
|
|
3628
3642
|
"clip-path-id": w(z),
|
|
3629
|
-
"inner-width": w(
|
|
3643
|
+
"inner-width": w(te),
|
|
3630
3644
|
zoomable: w(U),
|
|
3631
3645
|
interactive: !w(u),
|
|
3632
3646
|
"display-mode": w(o),
|
|
3633
3647
|
"interaction-mode": w(c),
|
|
3634
|
-
"frame-number": w(
|
|
3635
|
-
"frame-style": w(
|
|
3636
|
-
axes: w(
|
|
3648
|
+
"frame-number": w(ce)(e.index),
|
|
3649
|
+
"frame-style": w(le),
|
|
3650
|
+
axes: w(ue),
|
|
3637
3651
|
"clean-view": w(l),
|
|
3638
|
-
"zero-line": w(
|
|
3639
|
-
"time-unit": w(
|
|
3640
|
-
"y-label": w(
|
|
3641
|
-
onPointerMove: (t) => w(
|
|
3642
|
-
onPointerDown: (t) => w(
|
|
3643
|
-
onPointerUp: w(
|
|
3644
|
-
onPointerCancel: w(
|
|
3645
|
-
onPointerLeave: w(
|
|
3646
|
-
onClick: (t) => w(
|
|
3647
|
-
onContextmenu: (t) => w(
|
|
3652
|
+
"zero-line": w(de),
|
|
3653
|
+
"time-unit": w(fe),
|
|
3654
|
+
"y-label": w(q),
|
|
3655
|
+
onPointerMove: (t) => w(pe)(t, e.index),
|
|
3656
|
+
onPointerDown: (t) => w(me)(t, e.index, !0),
|
|
3657
|
+
onPointerUp: w(re),
|
|
3658
|
+
onPointerCancel: w(K),
|
|
3659
|
+
onPointerLeave: w(ae),
|
|
3660
|
+
onClick: (t) => w(oe)(t, e.index),
|
|
3661
|
+
onContextmenu: (t) => w(se)(t, e.index)
|
|
3648
3662
|
}, null, 8, [
|
|
3649
3663
|
"track",
|
|
3650
3664
|
"clip-path-id",
|
|
@@ -3668,26 +3682,26 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3668
3682
|
"onClick",
|
|
3669
3683
|
"onContextmenu"
|
|
3670
3684
|
]))), 128)),
|
|
3671
|
-
s(w(
|
|
3672
|
-
state: w(
|
|
3685
|
+
s(w(zi), {
|
|
3686
|
+
state: w(J),
|
|
3673
3687
|
tracks: w(R),
|
|
3674
3688
|
"clip-path-id": w(z),
|
|
3675
|
-
visible: w(
|
|
3689
|
+
visible: w(he) && !w(u)
|
|
3676
3690
|
}, null, 8, [
|
|
3677
3691
|
"state",
|
|
3678
3692
|
"tracks",
|
|
3679
3693
|
"clip-path-id",
|
|
3680
3694
|
"visible"
|
|
3681
3695
|
]),
|
|
3682
|
-
w(
|
|
3696
|
+
w(Y) && w(d)?.kind === "box" ? (g(), i("rect", {
|
|
3683
3697
|
key: 2,
|
|
3684
3698
|
class: "waveform-chart__zoom-selection",
|
|
3685
|
-
x: w(
|
|
3686
|
-
y: w(
|
|
3687
|
-
width: w(
|
|
3688
|
-
height: w(
|
|
3699
|
+
x: w(Y).x,
|
|
3700
|
+
y: w(Y).y,
|
|
3701
|
+
width: w(Y).width,
|
|
3702
|
+
height: w(Y).height,
|
|
3689
3703
|
"aria-hidden": "true"
|
|
3690
|
-
}, null, 8,
|
|
3704
|
+
}, null, 8, Zi)) : r("", !0),
|
|
3691
3705
|
w(l) ? r("", !0) : (g(), n(w(Me), {
|
|
3692
3706
|
key: 3,
|
|
3693
3707
|
annotations: w(ge),
|
|
@@ -3706,13 +3720,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3706
3720
|
"onMove",
|
|
3707
3721
|
"onDragEnd"
|
|
3708
3722
|
])),
|
|
3709
|
-
w(l) ? r("", !0) : (g(), i("g",
|
|
3723
|
+
w(l) ? r("", !0) : (g(), i("g", Qi, [(g(!0), i(e, null, y(w(R), (e) => (g(), i("g", {
|
|
3710
3724
|
key: `legend-${e.index}-${e.series.name}`,
|
|
3711
3725
|
class: "waveform-chart__legend-track",
|
|
3712
3726
|
"data-legend-track-index": e.index,
|
|
3713
3727
|
"data-legend-track-id": e.id,
|
|
3714
3728
|
transform: `translate(${e.left}, ${e.top})`
|
|
3715
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(
|
|
3729
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(Fi), {
|
|
3716
3730
|
key: 0,
|
|
3717
3731
|
series: e.legendSeries,
|
|
3718
3732
|
position: w(Z)(e.id),
|
|
@@ -3720,7 +3734,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3720
3734
|
"background-color": w(Se),
|
|
3721
3735
|
interactive: w(Ce),
|
|
3722
3736
|
"hidden-series-ids": w(we),
|
|
3723
|
-
width: e.width ?? w(
|
|
3737
|
+
width: e.width ?? w(te),
|
|
3724
3738
|
height: e.height,
|
|
3725
3739
|
onToggle: w(Te)
|
|
3726
3740
|
}, null, 8, [
|
|
@@ -3733,24 +3747,24 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3733
3747
|
"width",
|
|
3734
3748
|
"height",
|
|
3735
3749
|
"onToggle"
|
|
3736
|
-
])) : r("", !0)], 8,
|
|
3737
|
-
], 8,
|
|
3750
|
+
])) : r("", !0)], 8, $i))), 128))]))
|
|
3751
|
+
], 8, Ki),
|
|
3738
3752
|
w(Ee) && !w(l) ? (g(), i("text", {
|
|
3739
3753
|
key: 0,
|
|
3740
3754
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
3741
|
-
x: w(_) + w(
|
|
3755
|
+
x: w(_) + w(te) / 2,
|
|
3742
3756
|
y: w(De),
|
|
3743
3757
|
"text-anchor": "middle"
|
|
3744
|
-
}, S(w(Ee)), 9,
|
|
3758
|
+
}, S(w(Ee)), 9, ea)) : r("", !0),
|
|
3745
3759
|
w(Oe) && !w(I) ? (g(), i("text", {
|
|
3746
3760
|
key: 1,
|
|
3747
3761
|
class: "waveform-chart__empty",
|
|
3748
3762
|
x: w(P) / 2,
|
|
3749
3763
|
y: w(F) / 2,
|
|
3750
3764
|
"text-anchor": "middle"
|
|
3751
|
-
}, " 暂无有效波形数据 ", 8,
|
|
3752
|
-
], 40,
|
|
3753
|
-
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(
|
|
3765
|
+
}, " 暂无有效波形数据 ", 8, ta)) : r("", !0)
|
|
3766
|
+
], 40, Ui)),
|
|
3767
|
+
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(ie), {
|
|
3754
3768
|
key: 1,
|
|
3755
3769
|
class: "waveform-chart__pagination",
|
|
3756
3770
|
"aria-label": "波形分页",
|
|
@@ -3766,13 +3780,13 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3766
3780
|
"total",
|
|
3767
3781
|
"onChange"
|
|
3768
3782
|
])) : r("", !0),
|
|
3769
|
-
w(Le) && !w(l) && !w(u) ? (g(), n(
|
|
3783
|
+
w(Le) && !w(l) && !w(u) ? (g(), n(Sr, {
|
|
3770
3784
|
key: 2,
|
|
3771
3785
|
annotation: w(Le).annotation,
|
|
3772
3786
|
mode: w(Le).mode,
|
|
3773
3787
|
series: w(ze),
|
|
3774
3788
|
"series-options": w(Be),
|
|
3775
|
-
"time-unit": w(
|
|
3789
|
+
"time-unit": w(fe),
|
|
3776
3790
|
onConfirm: w(Ve),
|
|
3777
3791
|
onCancel: w(He),
|
|
3778
3792
|
onSeriesChange: w(Ue)
|
|
@@ -3804,10 +3818,10 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3804
3818
|
"onDelete",
|
|
3805
3819
|
"onClose"
|
|
3806
3820
|
])) : r("", !0),
|
|
3807
|
-
s(w(
|
|
3808
|
-
state: w(
|
|
3809
|
-
visible: w(
|
|
3810
|
-
"time-unit": w(
|
|
3821
|
+
s(w(Nr), {
|
|
3822
|
+
state: w(J),
|
|
3823
|
+
visible: w(he) && !w(u),
|
|
3824
|
+
"time-unit": w(fe),
|
|
3811
3825
|
"container-width": w(P),
|
|
3812
3826
|
"container-height": w($)
|
|
3813
3827
|
}, null, 8, [
|
|
@@ -3817,9 +3831,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3817
3831
|
"container-width",
|
|
3818
3832
|
"container-height"
|
|
3819
3833
|
])
|
|
3820
|
-
], 46,
|
|
3834
|
+
], 46, Bi));
|
|
3821
3835
|
}
|
|
3822
|
-
}),
|
|
3836
|
+
}), ra = /* @__PURE__ */ c({
|
|
3823
3837
|
__name: "WaveformChart",
|
|
3824
3838
|
props: {
|
|
3825
3839
|
data: {},
|
|
@@ -3846,6 +3860,7 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3846
3860
|
minVisiblePoints: { default: 0 },
|
|
3847
3861
|
initialXDomain: {},
|
|
3848
3862
|
initialXDomains: {},
|
|
3863
|
+
xDomainStrategy: { default: () => ({ type: "data" }) },
|
|
3849
3864
|
yDomain: {},
|
|
3850
3865
|
yDomains: {},
|
|
3851
3866
|
timeUnit: { default: "ms" },
|
|
@@ -3896,9 +3911,9 @@ var Ur = ["clip-path"], Wr = ["data-series-id", "data-series-name"], Gr = [
|
|
|
3896
3911
|
"page-change"
|
|
3897
3912
|
],
|
|
3898
3913
|
setup(e, { expose: t, emit: r }) {
|
|
3899
|
-
let i =
|
|
3900
|
-
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(
|
|
3914
|
+
let i = nr(e, r);
|
|
3915
|
+
return t({ resetViewport: i.resetViewport }), (e, t) => (g(), n(na, { controller: w(i) }, null, 8, ["controller"]));
|
|
3901
3916
|
}
|
|
3902
3917
|
});
|
|
3903
3918
|
//#endregion
|
|
3904
|
-
export { Rt as DEFAULT_WAVEFORM_RENDERING_OPTIONS,
|
|
3919
|
+
export { Rt as DEFAULT_WAVEFORM_RENDERING_OPTIONS, ra 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, zt as resolveWaveformRenderingOptions, Gt as selectRenderablePoints, Ue as serializeWaveformAnnotations };
|