velo-plot 1.19.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChartCore-DQ691eXH.js → ChartCore-BhQ4j7f5.js} +1299 -1102
- package/dist/ChartCore-BhQ4j7f5.js.map +1 -0
- package/dist/SciPlot-GJvw7GJo.js +463 -0
- package/dist/SciPlot-GJvw7GJo.js.map +1 -0
- package/dist/axisFormat-SPX-CD5s.js +200 -0
- package/dist/axisFormat-SPX-CD5s.js.map +1 -0
- package/dist/core/InteractionManager.d.ts +1 -0
- package/dist/core/OverlayRenderer.d.ts +11 -0
- package/dist/core/chart/ChartCore.d.ts +5 -0
- package/dist/core/chart/ChartRenderLoop.d.ts +5 -0
- package/dist/core/chart/ChartRenderer.d.ts +5 -0
- package/dist/core/chart/positionLines.d.ts +12 -0
- package/dist/core/chart/types.d.ts +2 -0
- package/dist/core/format/axisFormat.d.ts +2 -1
- package/dist/core/indicator/addIndicator.d.ts +1 -1
- package/dist/core/indicator/indicatorPresets.d.ts +10 -2
- package/dist/core/time/TimeScale.d.ts +2 -2
- package/dist/core/time/applyTimeScale.d.ts +10 -0
- package/dist/createStackedChart-DJSmqerD.js +706 -0
- package/dist/createStackedChart-DJSmqerD.js.map +1 -0
- package/dist/{index-DjeWClO9.js → index-CWipqOLP.js} +2 -2
- package/dist/{index-DjeWClO9.js.map → index-CWipqOLP.js.map} +1 -1
- package/dist/{index.core-BtGFYMOu.js → index.core-fpZ1dYN0.js} +3 -3
- package/dist/{index.core-BtGFYMOu.js.map → index.core-fpZ1dYN0.js.map} +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/mockDatafeed-Cdg5hKEo.js +511 -0
- package/dist/mockDatafeed-Cdg5hKEo.js.map +1 -0
- package/dist/plugins/drawing-tools/index.d.ts +14 -1
- package/dist/plugins/drawing-tools/measure.d.ts +21 -0
- package/dist/plugins/drawing-tools/snapToCandle.d.ts +21 -0
- package/dist/plugins/tools.js +1 -1
- package/dist/react.js +5 -5
- package/dist/trading/datafeed.d.ts +48 -0
- package/dist/trading/index.d.ts +29 -0
- package/dist/trading/mockDatafeed.d.ts +9 -0
- package/dist/trading/ohlcvGenerator.d.ts +25 -0
- package/dist/trading.d.ts +1 -0
- package/dist/trading.js +95 -0
- package/dist/trading.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/velo-plot.full.js +833 -1054
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +13 -13
- package/package.json +13 -1
- package/dist/ChartCore-DQ691eXH.js.map +0 -1
- package/dist/axisFormat-B7o_uIEA.js +0 -127
- package/dist/axisFormat-B7o_uIEA.js.map +0 -1
- package/dist/createStackedChart-BPooTQ9z.js +0 -1164
- package/dist/createStackedChart-BPooTQ9z.js.map +0 -1
package/dist/velo-plot.full.js
CHANGED
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { D as ee,
|
|
5
|
-
import { A as
|
|
6
|
-
import { E as
|
|
7
|
-
import { AnnotationManager as
|
|
8
|
-
import { d as
|
|
9
|
-
import { e as
|
|
10
|
-
import { G as
|
|
11
|
-
import { P as
|
|
12
|
-
import { P as
|
|
13
|
-
import { W as
|
|
14
|
-
import { PluginAnalysis as
|
|
15
|
-
import { B as
|
|
16
|
-
import {
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var ve = (n, e, t) => e in n ? xe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Y = (n, e, t) => ve(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { D as ee, j as O, s as te, O as Pe } from "./ChartCore-BhQ4j7f5.js";
|
|
5
|
+
import { A as St, C as Tt, l as bt, G as At, f as Mt, E as Ct, L as Ft, u as Dt, z as Et, N as It, a5 as Lt, H as kt, S as Rt, U as Xt, a as Yt, Z as Bt, a0 as _t, b as Gt, g as Wt, a3 as zt, K as Ut, e as $t, d as Ot, a1 as Ht, c as qt, $ as Nt, N as Vt, a4 as Kt, v as jt, B as Jt, J as Qt, P as Zt, _ as en, a2 as tn, k as nn, X as an, I as on, p as rn, o as sn, F as ln, x as cn, Y as dn, n as un, m as fn, y as gn, q as pn, t as hn, V as mn, W as yn, Q as xn, R as vn, T as Pn, w as wn } from "./ChartCore-BhQ4j7f5.js";
|
|
6
|
+
import { E as Tn, c as bn, b as An, f as Mn, i as Cn, a as Fn, m as Dn } from "./axisFormat-SPX-CD5s.js";
|
|
7
|
+
import { AnnotationManager as In, PluginAnnotations as Ln } from "./plugins/annotations.js";
|
|
8
|
+
import { d as G } from "./index.core-fpZ1dYN0.js";
|
|
9
|
+
import { e as Rn, h as Xn, f as Yn, c as Bn, a as _n, g as Gn, b as Wn, l as zn, r as Un, v as $n } from "./index.core-fpZ1dYN0.js";
|
|
10
|
+
import { G as Hn, S as qn, a as Nn, W as Vn, c as Kn, p as jn } from "./gpuRenderer-BpaMYz-k.js";
|
|
11
|
+
import { P as Qn, a as Zn, T as ea, g as ta } from "./index-CWipqOLP.js";
|
|
12
|
+
import { P as aa, c as oa, e as ra, d as ia, g as sa, a as la, l as ca, m as da, b as ua, o as fa, s as ga, u as pa } from "./index-D7dTq6VB.js";
|
|
13
|
+
import { W as ma, n as ya } from "./pool-15HMCNv8.js";
|
|
14
|
+
import { PluginAnalysis as va, analyzeComplexSpectrum as Pa, analyzeSpectrum as wa, arraysToComplex as Sa, autoCorrelation as Ta, bandPassFilter as ba, bandStopFilter as Aa, blackmanWindow as Ma, butterworth as Ca, complexToArrays as Fa, crossCorrelation as Da, detectAnomalies as Ea, dominantFrequency as Ia, exponentialMovingAverage as La, fft as ka, fftFromComplexInput as Ra, gaussianSmooth as Xa, getPositiveFrequencies as Ya, hammingWindow as Ba, hanningWindow as _a, highPassFilter as Ga, ifft as Wa, ifftComplex as za, ifftFromArrays as Ua, lowPassFilter as $a, medianFilter as Oa, nextPowerOf2 as Ha, powerSpectrum as qa, savitzkyGolay as Na, simpsonsIntegration as Va, singleFrequencyFilter as Ka, tTest as ja, trapezoidalIntegration as Ja } from "./plugins/analysis.js";
|
|
15
|
+
import { B as Za, C as eo, P as to, a as no, e as ao, g as oo, b as ro, d as io, f as so, c as lo } from "./index-BMiZoKmm.js";
|
|
16
|
+
import { S as uo, u as fo } from "./SciPlot-GJvw7GJo.js";
|
|
17
17
|
import "react";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
|
|
18
|
+
import { a as po, S as ho, c as mo } from "./createStackedChart-DJSmqerD.js";
|
|
19
|
+
import { BaseBufferStore as xo, BaseTextureStore as vo, GpuBenchmark as Po, GpuCompute as wo, PipelineCache as So, PluginGpu as To } from "./plugins/gpu.js";
|
|
20
|
+
import { b as Ao, L as Mo, a as Co, c as Fo, f as Do, d as Eo, e as Io, i as Lo, g as ko, h as Ro, r as Xo, s as Yo } from "./index-x4stH3jD.js";
|
|
21
|
+
import { D as _o, K as Go, P as Wo, c as zo, p as Uo } from "./index-DoYxf1cV.js";
|
|
22
|
+
import { ClipboardManager as Oo, PluginClipboard as Ho, copyToClipboard as qo, formatData as No, getClipboardManager as Vo } from "./plugins/clipboard.js";
|
|
23
|
+
import { DebugOverlay as jo, PluginDebug as Jo, createDebugOverlay as Qo, enableDebugMode as Zo } from "./plugins/debug.js";
|
|
24
|
+
import { L as tr, P as nr, c as ar, s as or, a as rr } from "./index-qhscKTDy.js";
|
|
25
|
+
import { C as sr, c as lr, a as cr, l as dr } from "./index-CUGS98p4.js";
|
|
26
|
+
import { P as fr, a as gr, b as pr, c as hr } from "./mockDatafeed-Cdg5hKEo.js";
|
|
27
|
+
import { P as yr, b as xr, T as vr, c as Pr, a as wr, g as Sr } from "./index-Dag88bW4.js";
|
|
28
|
+
import { c as br, a as Ar, b as Mr, d as Cr, h as Fr, e as Dr, f as Er, g as Ir, i as Lr, m as kr, s as Rr, v as Xr } from "./utils-BK5UUXxj.js";
|
|
29
|
+
import { a as Br, c as _r, d as Gr, i as Wr, s as zr } from "./math-Ddm2EZjj.js";
|
|
30
|
+
import { i as $r, j as Or, g as Hr, f as qr, k as Nr, d as Vr, e as Kr, m as jr, c as Jr, n as Qr, o as Zr, p as ei, b as ti, r as ni, s as ai, h as oi, a as ri, t as ii, v as si, w as li } from "./indicators--eJGmVox.js";
|
|
31
|
+
import { Plugin3D as di } from "./plugins/3d.js";
|
|
32
|
+
import { PluginI18n as fi } from "./plugins/i18n.js";
|
|
33
|
+
import { PluginSync as pi } from "./plugins/sync.js";
|
|
34
|
+
import { PluginDataExport as mi } from "./plugins/data-export.js";
|
|
35
|
+
import { PluginContextMenu as xi } from "./plugins/context-menu.js";
|
|
36
|
+
import { PluginAnomalyDetection as Pi } from "./plugins/anomaly-detection.js";
|
|
37
|
+
import { PluginMLIntegration as Si } from "./plugins/ml-integration.js";
|
|
38
|
+
import { PluginPatternRecognition as bi } from "./plugins/pattern-recognition.js";
|
|
39
|
+
import { PluginRegression as Mi } from "./plugins/regression.js";
|
|
40
|
+
import { PluginRadar as Fi } from "./plugins/radar.js";
|
|
41
|
+
import { PluginSnapshot as Ei } from "./plugins/snapshot.js";
|
|
42
|
+
import { PluginDataTransform as Li } from "./plugins/data-transform.js";
|
|
43
|
+
import { PluginLaTeX as Ri } from "./plugins/latex.js";
|
|
44
|
+
import { PluginCaching as Yi } from "./plugins/caching.js";
|
|
45
|
+
import { PluginLazyLoad as _i } from "./plugins/lazy-load.js";
|
|
46
|
+
import { PluginBrokenAxis as Wi } from "./plugins/broken-axis.js";
|
|
47
|
+
import { PluginVideoRecorder as Ui } from "./plugins/video-recorder.js";
|
|
48
|
+
import { PluginOffscreen as Oi } from "./plugins/offscreen.js";
|
|
49
|
+
import { PluginROI as qi } from "./plugins/roi.js";
|
|
50
|
+
import { PluginForecasting as Vi } from "./plugins/forecasting.js";
|
|
51
|
+
class ae {
|
|
50
52
|
constructor(e, t = {}) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.canvas = e, this.available =
|
|
53
|
+
Y(this, "available");
|
|
54
|
+
Y(this, "canvas");
|
|
55
|
+
Y(this, "adapter");
|
|
56
|
+
Y(this, "device");
|
|
57
|
+
Y(this, "context");
|
|
58
|
+
this.canvas = e, this.available = ae.isSupported();
|
|
57
59
|
}
|
|
58
60
|
static isSupported() {
|
|
59
61
|
return typeof globalThis.navigator < "u" && typeof globalThis.navigator.gpu < "u";
|
|
@@ -67,14 +69,14 @@ class re {
|
|
|
67
69
|
}), !this.adapter)
|
|
68
70
|
throw new Error("[SciPlot] Failed to request WebGPU adapter");
|
|
69
71
|
this.device = await this.adapter.requestDevice();
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
72
|
+
const o = this.canvas.getContext("webgpu");
|
|
73
|
+
if (!o)
|
|
72
74
|
throw new Error("[SciPlot] Failed to get WebGPU context");
|
|
73
|
-
this.context =
|
|
74
|
-
const
|
|
75
|
+
this.context = o;
|
|
76
|
+
const r = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
|
|
75
77
|
this.context.configure({
|
|
76
78
|
device: this.device,
|
|
77
|
-
format:
|
|
79
|
+
format: r,
|
|
78
80
|
alphaMode: "premultiplied"
|
|
79
81
|
});
|
|
80
82
|
}
|
|
@@ -82,128 +84,128 @@ class re {
|
|
|
82
84
|
this.device = void 0, this.adapter = void 0, this.context = void 0;
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
|
-
const
|
|
87
|
+
const we = {
|
|
86
88
|
name: "crosshair",
|
|
87
89
|
version: "1.0.0",
|
|
88
90
|
description: "Interactive crosshair that follows mouse cursor",
|
|
89
91
|
provides: ["interaction", "visualization"],
|
|
90
92
|
tags: ["cursor", "crosshair", "tooltip"]
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
+
}, Se = G(
|
|
94
|
+
we,
|
|
93
95
|
(n = {}) => {
|
|
94
96
|
const {
|
|
95
97
|
showVertical: e = !0,
|
|
96
98
|
showHorizontal: t = !0,
|
|
97
|
-
color:
|
|
98
|
-
lineStyle:
|
|
99
|
-
lineWidth:
|
|
100
|
-
snapToData:
|
|
101
|
-
valueFormat:
|
|
99
|
+
color: o,
|
|
100
|
+
lineStyle: r = "dashed",
|
|
101
|
+
lineWidth: a = 1,
|
|
102
|
+
snapToData: d = !1,
|
|
103
|
+
valueFormat: c = { xPrecision: 4, yPrecision: 4 }
|
|
102
104
|
} = n;
|
|
103
105
|
let i = n.valueDisplayMode ?? "disabled";
|
|
104
106
|
n.showAxisLabels !== void 0 && n.valueDisplayMode === void 0 && (i = n.showAxisLabels ? "floating" : "disabled");
|
|
105
107
|
const s = n.cornerPosition ?? "top-left";
|
|
106
|
-
let
|
|
108
|
+
let u = -1, h = -1, S, v = null, p = null;
|
|
107
109
|
return {
|
|
108
|
-
onInit(
|
|
109
|
-
|
|
110
|
-
const
|
|
110
|
+
onInit(f) {
|
|
111
|
+
S = "crosshair-overlay";
|
|
112
|
+
const l = f.ui.createOverlay(S, {
|
|
111
113
|
zIndex: 500,
|
|
112
114
|
position: { top: "0", left: "0", right: "0", bottom: "0" }
|
|
113
115
|
});
|
|
114
|
-
v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;",
|
|
116
|
+
v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;", l.appendChild(v), p = v.getContext("2d"), w(f);
|
|
115
117
|
},
|
|
116
|
-
onDestroy(
|
|
117
|
-
|
|
118
|
+
onDestroy(f) {
|
|
119
|
+
f.ui.removeOverlay(S), v = null, p = null;
|
|
118
120
|
},
|
|
119
|
-
onResize(
|
|
120
|
-
|
|
121
|
+
onResize(f) {
|
|
122
|
+
w(f);
|
|
121
123
|
},
|
|
122
|
-
onInteraction(
|
|
123
|
-
if (
|
|
124
|
-
if (
|
|
125
|
-
const P =
|
|
126
|
-
P && (
|
|
124
|
+
onInteraction(f, l) {
|
|
125
|
+
if (l.type === "mousemove") {
|
|
126
|
+
if (u = l.pixelX, h = l.pixelY, d && l.inPlotArea) {
|
|
127
|
+
const P = f.coords.pickPoint(u, h);
|
|
128
|
+
P && (u = P.pixelX, h = P.pixelY);
|
|
127
129
|
}
|
|
128
|
-
b(
|
|
130
|
+
b(f);
|
|
129
131
|
}
|
|
130
132
|
},
|
|
131
133
|
onViewChange() {
|
|
132
134
|
}
|
|
133
135
|
};
|
|
134
|
-
function
|
|
136
|
+
function w(f) {
|
|
135
137
|
if (!v || !p) return;
|
|
136
|
-
const
|
|
137
|
-
v.width =
|
|
138
|
+
const l = f.render.canvasSize, P = f.render.pixelRatio;
|
|
139
|
+
v.width = l.width * P, v.height = l.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
|
|
138
140
|
}
|
|
139
|
-
function b(
|
|
140
|
-
var
|
|
141
|
+
function b(f) {
|
|
142
|
+
var C;
|
|
141
143
|
if (!p || !v) return;
|
|
142
|
-
const { width:
|
|
143
|
-
if (p.clearRect(0, 0,
|
|
144
|
-
const x =
|
|
145
|
-
if (
|
|
144
|
+
const { width: l, height: P } = f.render.canvasSize;
|
|
145
|
+
if (p.clearRect(0, 0, l, P), u < 0 || h < 0) return;
|
|
146
|
+
const x = f.render.plotArea;
|
|
147
|
+
if (u < x.x || u > x.x + x.width || h < x.y || h > x.y + x.height)
|
|
146
148
|
return;
|
|
147
|
-
const
|
|
148
|
-
p.save(), p.strokeStyle =
|
|
149
|
+
const D = o || ((C = f.ui.theme.cursor) == null ? void 0 : C.color) || "#888888";
|
|
150
|
+
p.save(), p.strokeStyle = D, p.lineWidth = a, r === "dashed" ? p.setLineDash([6, 4]) : r === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(u, x.y), p.lineTo(u, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, h), p.lineTo(x.x + x.width, h), p.stroke()), p.restore(), i === "floating" ? g(f, p, u, h, D) : i === "corner" && y(f, p, u, h, D);
|
|
149
151
|
}
|
|
150
|
-
function g(
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const _ =
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
152
|
+
function g(f, l, P, x, D) {
|
|
153
|
+
const C = f.coords.pixelToDataX(P), B = f.coords.pixelToDataY(x), M = f.render.plotArea;
|
|
154
|
+
l.save(), l.font = "11px system-ui, sans-serif", l.textAlign = "center", l.textBaseline = "top";
|
|
155
|
+
const _ = C.toPrecision(c.xPrecision), A = l.measureText(_).width + 8, T = 18, I = P - A / 2, F = M.y + M.height + 2;
|
|
156
|
+
l.fillStyle = D, l.fillRect(I, F, A, T), l.fillStyle = "#ffffff", l.fillText(_, P, F + 3), l.textAlign = "right", l.textBaseline = "middle";
|
|
157
|
+
const k = B.toPrecision(c.yPrecision), X = l.measureText(k).width + 8, L = 18, R = M.x - X - 2, U = x - L / 2;
|
|
158
|
+
l.fillStyle = D, l.fillRect(R, U, X, L), l.fillStyle = "#ffffff", l.fillText(k, M.x - 6, x), l.restore();
|
|
157
159
|
}
|
|
158
|
-
function y(
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
const _ = `X: ${
|
|
162
|
-
let
|
|
160
|
+
function y(f, l, P, x, D) {
|
|
161
|
+
const C = f.coords.pixelToDataX(P), B = f.coords.pixelToDataY(x), M = f.render.plotArea;
|
|
162
|
+
l.save(), l.font = "11px system-ui, sans-serif";
|
|
163
|
+
const _ = `X: ${C.toPrecision(c.xPrecision)}`, m = `Y: ${B.toPrecision(c.yPrecision)}`, A = l.measureText(_), T = l.measureText(m), I = Math.max(A.width, T.width), F = 6, k = 16, E = I + F * 2, X = k * 2 + F * 2;
|
|
164
|
+
let L, R;
|
|
163
165
|
switch (s) {
|
|
164
166
|
case "top-left":
|
|
165
|
-
|
|
167
|
+
L = M.x + 8, R = M.y + 8;
|
|
166
168
|
break;
|
|
167
169
|
case "top-right":
|
|
168
|
-
|
|
170
|
+
L = M.x + M.width - E - 8, R = M.y + 8;
|
|
169
171
|
break;
|
|
170
172
|
case "bottom-left":
|
|
171
|
-
|
|
173
|
+
L = M.x + 8, R = M.y + M.height - X - 8;
|
|
172
174
|
break;
|
|
173
175
|
case "bottom-right":
|
|
174
|
-
|
|
176
|
+
L = M.x + M.width - E - 8, R = M.y + M.height - X - 8;
|
|
175
177
|
break;
|
|
176
178
|
default:
|
|
177
|
-
|
|
179
|
+
L = M.x + 8, R = M.y + 8;
|
|
178
180
|
}
|
|
179
|
-
|
|
181
|
+
l.fillStyle = D, l.globalAlpha = 0.85, l.fillRect(L, R, E, X), l.globalAlpha = 1, l.strokeStyle = "rgba(255,255,255,0.3)", l.lineWidth = 1, l.strokeRect(L, R, E, X), l.fillStyle = "#ffffff", l.textAlign = "left", l.textBaseline = "top", l.fillText(_, L + F, R + F), l.fillText(m, L + F, R + F + k), l.restore();
|
|
180
182
|
}
|
|
181
183
|
}
|
|
182
|
-
),
|
|
184
|
+
), Te = {
|
|
183
185
|
name: "statistics-overlay",
|
|
184
186
|
version: "1.0.0",
|
|
185
187
|
description: "Displays real-time statistics for chart data",
|
|
186
188
|
provides: ["visualization", "analysis"],
|
|
187
189
|
tags: ["statistics", "overlay", "analytics"]
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
+
}, be = G(
|
|
191
|
+
Te,
|
|
190
192
|
(n = {}) => {
|
|
191
193
|
const {
|
|
192
194
|
position: e = "top-right",
|
|
193
195
|
show: t = ["count", "mean", "min", "max"],
|
|
194
|
-
seriesId:
|
|
195
|
-
autoUpdate:
|
|
196
|
+
seriesId: o,
|
|
197
|
+
autoUpdate: r = !0
|
|
196
198
|
} = n;
|
|
197
|
-
let
|
|
199
|
+
let a, d = null;
|
|
198
200
|
return {
|
|
199
201
|
onInit(s) {
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
e.includes("top") && (
|
|
202
|
+
a = "stats-overlay";
|
|
203
|
+
const u = {};
|
|
204
|
+
e.includes("top") && (u.top = "10px"), e.includes("bottom") && (u.bottom = "10px"), e.includes("left") && (u.left = "10px"), e.includes("right") && (u.right = "10px"), d = s.ui.createOverlay(a, {
|
|
203
205
|
zIndex: 800,
|
|
204
|
-
position:
|
|
206
|
+
position: u,
|
|
205
207
|
pointerEvents: !1
|
|
206
|
-
}),
|
|
208
|
+
}), d.innerHTML = `
|
|
207
209
|
<div style="
|
|
208
210
|
background: rgba(0, 0, 0, 0.85);
|
|
209
211
|
color: #fff;
|
|
@@ -217,94 +219,94 @@ const Se = {
|
|
|
217
219
|
<div style="font-weight: bold; margin-bottom: 4px; color: #4ade80;">📊 Statistics</div>
|
|
218
220
|
<div class="stats-content"></div>
|
|
219
221
|
</div>
|
|
220
|
-
`,
|
|
222
|
+
`, c(s);
|
|
221
223
|
},
|
|
222
224
|
onDestroy(s) {
|
|
223
|
-
s.ui.removeOverlay(
|
|
225
|
+
s.ui.removeOverlay(a), d = null;
|
|
224
226
|
},
|
|
225
227
|
onDataUpdate(s) {
|
|
226
|
-
|
|
228
|
+
r && c(s);
|
|
227
229
|
},
|
|
228
230
|
onSeriesAdd(s) {
|
|
229
|
-
|
|
231
|
+
c(s);
|
|
230
232
|
},
|
|
231
233
|
onSeriesRemove(s) {
|
|
232
|
-
|
|
234
|
+
c(s);
|
|
233
235
|
},
|
|
234
236
|
api: {
|
|
235
237
|
refresh(s) {
|
|
236
|
-
|
|
238
|
+
c(s);
|
|
237
239
|
}
|
|
238
240
|
}
|
|
239
241
|
};
|
|
240
|
-
function
|
|
241
|
-
if (!
|
|
242
|
-
const
|
|
243
|
-
if (!
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
246
|
-
|
|
242
|
+
function c(s) {
|
|
243
|
+
if (!d) return;
|
|
244
|
+
const u = d.querySelector(".stats-content");
|
|
245
|
+
if (!u) return;
|
|
246
|
+
const h = s.data.getAllSeries(), S = o ? h.filter((b) => b.getId() === o) : h;
|
|
247
|
+
if (S.length === 0) {
|
|
248
|
+
u.innerHTML = "<div style='color: #888'>No data</div>";
|
|
247
249
|
return;
|
|
248
250
|
}
|
|
249
251
|
let v = [];
|
|
250
|
-
if (
|
|
252
|
+
if (S.forEach((b) => {
|
|
251
253
|
const g = b.getData();
|
|
252
254
|
g != null && g.y && (v = v.concat(Array.from(g.y)));
|
|
253
255
|
}), v.length === 0) {
|
|
254
|
-
|
|
256
|
+
u.innerHTML = "<div style='color: #888'>No data</div>";
|
|
255
257
|
return;
|
|
256
258
|
}
|
|
257
|
-
const p = i(v),
|
|
258
|
-
t.includes("count") &&
|
|
259
|
+
const p = i(v), w = [];
|
|
260
|
+
t.includes("count") && w.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && w.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && w.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && w.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && w.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && w.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), u.innerHTML = w.join("");
|
|
259
261
|
}
|
|
260
262
|
function i(s) {
|
|
261
|
-
const
|
|
262
|
-
let
|
|
263
|
+
const u = s.length;
|
|
264
|
+
let h = 0, S = 1 / 0, v = -1 / 0;
|
|
263
265
|
for (const g of s)
|
|
264
|
-
|
|
265
|
-
const p =
|
|
266
|
-
let
|
|
266
|
+
h += g, g < S && (S = g), g > v && (v = g);
|
|
267
|
+
const p = h / u;
|
|
268
|
+
let w = 0;
|
|
267
269
|
for (const g of s)
|
|
268
|
-
|
|
269
|
-
const b = Math.sqrt(
|
|
270
|
+
w += (g - p) ** 2;
|
|
271
|
+
const b = Math.sqrt(w / u);
|
|
270
272
|
return {
|
|
271
|
-
count:
|
|
273
|
+
count: u,
|
|
272
274
|
mean: p,
|
|
273
|
-
min:
|
|
275
|
+
min: S,
|
|
274
276
|
max: v,
|
|
275
277
|
std: b,
|
|
276
|
-
range: v -
|
|
278
|
+
range: v - S
|
|
277
279
|
};
|
|
278
280
|
}
|
|
279
281
|
}
|
|
280
|
-
),
|
|
282
|
+
), Ae = {
|
|
281
283
|
name: "watermark",
|
|
282
284
|
version: "1.0.0",
|
|
283
285
|
description: "Adds a customizable watermark to the chart",
|
|
284
286
|
provides: ["visualization"],
|
|
285
287
|
tags: ["watermark", "branding", "overlay"]
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
+
}, Me = G(
|
|
289
|
+
Ae,
|
|
288
290
|
(n) => {
|
|
289
291
|
if (!(n != null && n.text))
|
|
290
292
|
throw new Error("WatermarkPlugin requires 'text' configuration");
|
|
291
293
|
const {
|
|
292
294
|
text: e,
|
|
293
295
|
fontSize: t = 48,
|
|
294
|
-
fontFamily:
|
|
295
|
-
color:
|
|
296
|
-
position:
|
|
297
|
-
rotation:
|
|
296
|
+
fontFamily: o = "system-ui, sans-serif",
|
|
297
|
+
color: r = "rgba(128, 128, 128, 0.15)",
|
|
298
|
+
position: a = "center",
|
|
299
|
+
rotation: d = a === "center" ? -30 : 0
|
|
298
300
|
} = n;
|
|
299
301
|
return {
|
|
300
|
-
onRenderOverlay(
|
|
301
|
-
const i =
|
|
302
|
+
onRenderOverlay(c) {
|
|
303
|
+
const i = c.render.ctx2d;
|
|
302
304
|
if (!i) return;
|
|
303
|
-
|
|
304
|
-
const s =
|
|
305
|
-
i.save(), i.font = `${t}px ${
|
|
306
|
-
let
|
|
307
|
-
|
|
305
|
+
c.render.canvasSize;
|
|
306
|
+
const s = c.render.plotArea;
|
|
307
|
+
i.save(), i.font = `${t}px ${o}`, i.fillStyle = r, i.textAlign = "center", i.textBaseline = "middle";
|
|
308
|
+
let u, h;
|
|
309
|
+
a === "center" ? (u = s.x + s.width / 2, h = s.y + s.height / 2) : a === "bottom-right" ? (u = s.x + s.width - t, h = s.y + s.height - t / 2) : (u = s.x + t, h = s.y + s.height - t / 2), i.translate(u, h), i.rotate(d * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
|
|
308
310
|
}
|
|
309
311
|
};
|
|
310
312
|
}
|
|
@@ -314,35 +316,35 @@ const Se = {
|
|
|
314
316
|
description: "Highlights specific regions of the chart grid",
|
|
315
317
|
provides: ["visualization"],
|
|
316
318
|
tags: ["grid", "highlight", "regions"]
|
|
317
|
-
},
|
|
319
|
+
}, Fe = G(
|
|
318
320
|
Ce,
|
|
319
321
|
(n = {}) => {
|
|
320
|
-
const { xIntervals: e = [], yIntervals: t = [], opacity:
|
|
322
|
+
const { xIntervals: e = [], yIntervals: t = [], opacity: o = 0.1 } = n;
|
|
321
323
|
return {
|
|
322
|
-
onRenderOverlay(
|
|
323
|
-
const
|
|
324
|
-
if (!
|
|
325
|
-
const
|
|
326
|
-
|
|
324
|
+
onRenderOverlay(r, a) {
|
|
325
|
+
const d = r.render.ctx2d;
|
|
326
|
+
if (!d) return;
|
|
327
|
+
const c = r.render.plotArea;
|
|
328
|
+
r.data.getViewBounds(), d.save(), d.beginPath(), d.rect(c.x, c.y, c.width, c.height), d.clip(), d.globalAlpha = o;
|
|
327
329
|
for (const i of e) {
|
|
328
|
-
const s =
|
|
329
|
-
|
|
330
|
-
Math.min(s,
|
|
331
|
-
|
|
332
|
-
Math.abs(
|
|
333
|
-
|
|
330
|
+
const s = r.coords.dataToPixelX(i.start), u = r.coords.dataToPixelX(i.end);
|
|
331
|
+
d.fillStyle = i.color, d.fillRect(
|
|
332
|
+
Math.min(s, u),
|
|
333
|
+
c.y,
|
|
334
|
+
Math.abs(u - s),
|
|
335
|
+
c.height
|
|
334
336
|
);
|
|
335
337
|
}
|
|
336
338
|
for (const i of t) {
|
|
337
|
-
const s =
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
Math.min(s,
|
|
341
|
-
|
|
342
|
-
Math.abs(
|
|
339
|
+
const s = r.coords.dataToPixelY(i.start), u = r.coords.dataToPixelY(i.end);
|
|
340
|
+
d.fillStyle = i.color, d.fillRect(
|
|
341
|
+
c.x,
|
|
342
|
+
Math.min(s, u),
|
|
343
|
+
c.width,
|
|
344
|
+
Math.abs(u - s)
|
|
343
345
|
);
|
|
344
346
|
}
|
|
345
|
-
|
|
347
|
+
d.restore();
|
|
346
348
|
}
|
|
347
349
|
};
|
|
348
350
|
}
|
|
@@ -352,88 +354,88 @@ const Se = {
|
|
|
352
354
|
description: "Logs chart events for debugging and analysis",
|
|
353
355
|
provides: ["analysis"],
|
|
354
356
|
tags: ["debug", "logging", "events"]
|
|
355
|
-
},
|
|
357
|
+
}, Ee = G(
|
|
356
358
|
De,
|
|
357
359
|
(n = {}) => {
|
|
358
360
|
const {
|
|
359
361
|
logDataUpdates: e = !0,
|
|
360
362
|
logViewChanges: t = !0,
|
|
361
|
-
logInteractions:
|
|
362
|
-
maxEntries:
|
|
363
|
-
} = n,
|
|
364
|
-
function
|
|
365
|
-
|
|
363
|
+
logInteractions: o = !1,
|
|
364
|
+
maxEntries: r = 100
|
|
365
|
+
} = n, a = [];
|
|
366
|
+
function d(c, i) {
|
|
367
|
+
a.push({
|
|
366
368
|
timestamp: Date.now(),
|
|
367
|
-
type:
|
|
369
|
+
type: c,
|
|
368
370
|
data: i
|
|
369
|
-
}),
|
|
371
|
+
}), a.length > r && a.shift();
|
|
370
372
|
}
|
|
371
373
|
return {
|
|
372
|
-
onInit(
|
|
373
|
-
|
|
374
|
+
onInit(c) {
|
|
375
|
+
c.log.info("Data logger initialized");
|
|
374
376
|
},
|
|
375
|
-
onDataUpdate(
|
|
376
|
-
e && (
|
|
377
|
+
onDataUpdate(c, i) {
|
|
378
|
+
e && (d("dataUpdate", {
|
|
377
379
|
seriesId: i.seriesId,
|
|
378
380
|
mode: i.mode,
|
|
379
381
|
pointCount: i.pointCount
|
|
380
|
-
}),
|
|
382
|
+
}), c.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
|
|
381
383
|
},
|
|
382
|
-
onViewChange(
|
|
383
|
-
t && (
|
|
384
|
+
onViewChange(c, i) {
|
|
385
|
+
t && (d("viewChange", {
|
|
384
386
|
trigger: i.trigger,
|
|
385
387
|
bounds: i.current
|
|
386
|
-
}),
|
|
388
|
+
}), c.log.debug(`View change: ${i.trigger}`));
|
|
387
389
|
},
|
|
388
|
-
onInteraction(
|
|
389
|
-
|
|
390
|
+
onInteraction(c, i) {
|
|
391
|
+
o && d("interaction", {
|
|
390
392
|
type: i.type,
|
|
391
393
|
pixelX: i.pixelX,
|
|
392
394
|
pixelY: i.pixelY,
|
|
393
395
|
inPlotArea: i.inPlotArea
|
|
394
396
|
});
|
|
395
397
|
},
|
|
396
|
-
onSerialize(
|
|
397
|
-
return { entries:
|
|
398
|
+
onSerialize(c) {
|
|
399
|
+
return { entries: a };
|
|
398
400
|
},
|
|
399
|
-
onDeserialize(
|
|
401
|
+
onDeserialize(c, i) {
|
|
400
402
|
const s = i;
|
|
401
|
-
s != null && s.entries && (
|
|
403
|
+
s != null && s.entries && (a.length = 0, a.push(...s.entries));
|
|
402
404
|
},
|
|
403
405
|
api: {
|
|
404
406
|
getEntries() {
|
|
405
|
-
return [...
|
|
407
|
+
return [...a];
|
|
406
408
|
},
|
|
407
409
|
clear() {
|
|
408
|
-
|
|
410
|
+
a.length = 0;
|
|
409
411
|
},
|
|
410
412
|
export() {
|
|
411
|
-
return JSON.stringify(
|
|
413
|
+
return JSON.stringify(a, null, 2);
|
|
412
414
|
}
|
|
413
415
|
}
|
|
414
416
|
};
|
|
415
417
|
}
|
|
416
|
-
),
|
|
418
|
+
), Ie = {
|
|
417
419
|
name: "direction-indicator",
|
|
418
420
|
version: "1.0.0",
|
|
419
421
|
description: "Shows an arrow indicating the direction and trend of streaming data",
|
|
420
422
|
provides: ["visualization", "analysis"],
|
|
421
423
|
tags: ["streaming", "direction", "trend", "arrow"]
|
|
422
|
-
}, Le =
|
|
423
|
-
|
|
424
|
+
}, Le = G(
|
|
425
|
+
Ie,
|
|
424
426
|
(n = {}) => {
|
|
425
427
|
const {
|
|
426
428
|
seriesId: e,
|
|
427
429
|
sampleSize: t = 20,
|
|
428
|
-
color:
|
|
429
|
-
size:
|
|
430
|
-
minVelocity:
|
|
431
|
-
historySize:
|
|
432
|
-
idleTimeout:
|
|
430
|
+
color: o,
|
|
431
|
+
size: r = 40,
|
|
432
|
+
minVelocity: a = 0.01,
|
|
433
|
+
historySize: d = 20,
|
|
434
|
+
idleTimeout: c
|
|
433
435
|
} = n;
|
|
434
|
-
let i, s = null,
|
|
435
|
-
const v = [], p = [],
|
|
436
|
-
let b =
|
|
436
|
+
let i, s = null, u = null, h = null, S = null;
|
|
437
|
+
const v = [], p = [], w = [];
|
|
438
|
+
let b = d, g = null, y = Date.now(), f = -1 / 0, l = -1 / 0, P = c;
|
|
437
439
|
return {
|
|
438
440
|
onInit(m) {
|
|
439
441
|
i = "direction-indicator-overlay";
|
|
@@ -442,21 +444,21 @@ const Se = {
|
|
|
442
444
|
position: { top: "0", left: "0", right: "0", bottom: "0" },
|
|
443
445
|
pointerEvents: !1
|
|
444
446
|
});
|
|
445
|
-
if (s = document.createElement("canvas"), s.style.cssText = "width: 100%; height: 100%; pointer-events: none;", A.appendChild(s),
|
|
446
|
-
|
|
447
|
+
if (s = document.createElement("canvas"), s.style.cssText = "width: 100%; height: 100%; pointer-events: none;", A.appendChild(s), u = s.getContext("2d"), x(m), e)
|
|
448
|
+
S = e;
|
|
447
449
|
else {
|
|
448
450
|
const T = m.data.getAllSeries();
|
|
449
|
-
T.length > 0 && (
|
|
451
|
+
T.length > 0 && (S = T[0].getId());
|
|
450
452
|
}
|
|
451
453
|
},
|
|
452
454
|
onDestroy(m) {
|
|
453
|
-
m.ui.removeOverlay(i), g && clearTimeout(g), s = null,
|
|
455
|
+
m.ui.removeOverlay(i), g && clearTimeout(g), s = null, u = null, h = null;
|
|
454
456
|
},
|
|
455
457
|
onResize(m) {
|
|
456
458
|
x(m);
|
|
457
459
|
},
|
|
458
460
|
onAfterRender(m) {
|
|
459
|
-
if (
|
|
461
|
+
if (D(m), M(m), P) {
|
|
460
462
|
g && clearTimeout(g);
|
|
461
463
|
const A = Date.now() - y;
|
|
462
464
|
A < P && (g = setTimeout(() => {
|
|
@@ -468,73 +470,73 @@ const Se = {
|
|
|
468
470
|
if (A.historySize !== void 0) {
|
|
469
471
|
for (b = A.historySize; v.length > b; ) v.shift();
|
|
470
472
|
for (; p.length > b; ) p.shift();
|
|
471
|
-
for (;
|
|
473
|
+
for (; w.length > b; ) w.shift();
|
|
472
474
|
}
|
|
473
475
|
A.idleTimeout !== void 0 && (P = A.idleTimeout);
|
|
474
476
|
}
|
|
475
477
|
};
|
|
476
478
|
function x(m) {
|
|
477
|
-
if (!s || !
|
|
479
|
+
if (!s || !u) return;
|
|
478
480
|
const A = m.render.canvasSize, T = m.render.pixelRatio;
|
|
479
|
-
s.width = A.width * T, s.height = A.height * T,
|
|
481
|
+
s.width = A.width * T, s.height = A.height * T, u.setTransform(1, 0, 0, 1, 0, 0), u.scale(T, T);
|
|
480
482
|
}
|
|
481
|
-
function
|
|
482
|
-
if (!
|
|
483
|
-
const T = m.data.getSeriesData(
|
|
483
|
+
function D(m) {
|
|
484
|
+
if (!S || !m.data.getSeries(S)) return;
|
|
485
|
+
const T = m.data.getSeriesData(S);
|
|
484
486
|
if (!T || !T.x || !T.y) return;
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
const
|
|
488
|
-
(
|
|
489
|
-
const
|
|
490
|
-
let
|
|
491
|
-
for (let W =
|
|
492
|
-
const
|
|
493
|
-
|
|
487
|
+
const I = T.x.length;
|
|
488
|
+
if (I < 2) return;
|
|
489
|
+
const F = T.x[I - 1], k = T.y[I - 1];
|
|
490
|
+
(F !== f || k !== l) && (f = F, l = k, y = Date.now());
|
|
491
|
+
const E = Math.min(t, I), X = I - E;
|
|
492
|
+
let L = 0, R = 0, U = 0, K = 0, j = 0, J = 0;
|
|
493
|
+
for (let W = X; W < I; W++) {
|
|
494
|
+
const z = W - X, me = T.x[W], ye = T.y[W], Q = m.coords.dataToPixelX(me), Z = m.coords.dataToPixelY(ye);
|
|
495
|
+
L += z, R += Q, U += Z, K += z * Q, j += z * Z, J += z * z;
|
|
494
496
|
}
|
|
495
|
-
const $ =
|
|
497
|
+
const $ = L / E, se = R / E, le = U / E, H = J - E * $ * $;
|
|
496
498
|
if (Math.abs(H) < 1e-10) return;
|
|
497
|
-
const
|
|
498
|
-
v.push(
|
|
499
|
-
const
|
|
500
|
-
|
|
499
|
+
const q = (K - E * $ * se) / H, N = (j - E * $ * le) / H, ce = Math.atan2(N, q), de = m.coords.dataToPixelX(F), ue = m.coords.dataToPixelY(k);
|
|
500
|
+
v.push(de), p.push(ue), v.length > b && (v.shift(), p.shift()), w.push(ce), w.length > b && w.shift();
|
|
501
|
+
const fe = C(v), ge = C(p), pe = B(w), he = Math.sqrt(q * q + N * N);
|
|
502
|
+
h = { angle: pe, magnitude: he, lastX: F, lastY: k, smoothX: fe, smoothY: ge };
|
|
501
503
|
}
|
|
502
|
-
function
|
|
504
|
+
function C(m) {
|
|
503
505
|
return m.length === 0 ? 0 : m.reduce((A, T) => A + T, 0) / m.length;
|
|
504
506
|
}
|
|
505
507
|
function B(m) {
|
|
506
508
|
if (m.length === 0) return 0;
|
|
507
509
|
let A = 0, T = 0;
|
|
508
|
-
for (const
|
|
509
|
-
A += Math.cos(
|
|
510
|
+
for (const I of m)
|
|
511
|
+
A += Math.cos(I), T += Math.sin(I);
|
|
510
512
|
return Math.atan2(T / m.length, A / m.length);
|
|
511
513
|
}
|
|
512
514
|
function M(m) {
|
|
513
|
-
if (!
|
|
515
|
+
if (!u || !s || !h) return;
|
|
514
516
|
const { width: A, height: T } = m.render.canvasSize;
|
|
515
|
-
if (
|
|
516
|
-
const
|
|
517
|
-
|
|
517
|
+
if (u.clearRect(0, 0, A, T), P !== void 0 && Date.now() - y > P || h.magnitude < a) return;
|
|
518
|
+
const I = h.smoothX, F = h.smoothY, k = o || "#FF9800";
|
|
519
|
+
u.save(), _(u, I, F, h.angle, r, k), u.restore();
|
|
518
520
|
}
|
|
519
|
-
function _(m, A, T,
|
|
520
|
-
const
|
|
521
|
-
m.save(), m.translate(A, T), m.rotate(
|
|
521
|
+
function _(m, A, T, I, F, k) {
|
|
522
|
+
const E = F * 0.6, X = F * 0.4;
|
|
523
|
+
m.save(), m.translate(A, T), m.rotate(I), m.fillStyle = k, m.beginPath(), m.moveTo(E / 2, 0), m.lineTo(-E / 2, -X / 2), m.lineTo(-E / 2, X / 2), m.closePath(), m.fill(), m.restore();
|
|
522
524
|
}
|
|
523
525
|
}
|
|
524
|
-
),
|
|
525
|
-
Crosshair:
|
|
526
|
-
Statistics:
|
|
527
|
-
Watermark:
|
|
528
|
-
GridHighlight:
|
|
529
|
-
DataLogger:
|
|
526
|
+
), tt = {
|
|
527
|
+
Crosshair: Se,
|
|
528
|
+
Statistics: be,
|
|
529
|
+
Watermark: Me,
|
|
530
|
+
GridHighlight: Fe,
|
|
531
|
+
DataLogger: Ee,
|
|
530
532
|
DirectionIndicator: Le
|
|
531
|
-
},
|
|
533
|
+
}, ke = {
|
|
532
534
|
name: "velo-plot-drag-edit",
|
|
533
535
|
version: "1.0.0",
|
|
534
536
|
description: "Interactive drag & drop editing of data points",
|
|
535
537
|
provides: ["drag-edit", "point-editing"],
|
|
536
538
|
tags: ["interaction", "editing", "ux"]
|
|
537
|
-
},
|
|
539
|
+
}, Re = {
|
|
538
540
|
enabled: !0,
|
|
539
541
|
constraint: "both",
|
|
540
542
|
snapToGrid: !1,
|
|
@@ -559,19 +561,19 @@ const Se = {
|
|
|
559
561
|
opacity: 0.5
|
|
560
562
|
}
|
|
561
563
|
};
|
|
562
|
-
function
|
|
563
|
-
const e = { ...
|
|
564
|
-
let t = null,
|
|
564
|
+
function nt(n = {}) {
|
|
565
|
+
const e = { ...Re, ...n };
|
|
566
|
+
let t = null, o = !1, r = null, a = 0, d = 0, c = !1;
|
|
565
567
|
function i(g, y) {
|
|
566
568
|
if (!t) return null;
|
|
567
|
-
const
|
|
568
|
-
return !
|
|
569
|
-
seriesId:
|
|
570
|
-
index:
|
|
571
|
-
originalX:
|
|
572
|
-
originalY:
|
|
573
|
-
currentX:
|
|
574
|
-
currentY:
|
|
569
|
+
const f = t.coords.pickPoint(g, y, e.hitRadius);
|
|
570
|
+
return !f || e.editableSeries.length > 0 && !e.editableSeries.includes(f.seriesId) ? null : {
|
|
571
|
+
seriesId: f.seriesId,
|
|
572
|
+
index: f.index,
|
|
573
|
+
originalX: f.x,
|
|
574
|
+
originalY: f.y,
|
|
575
|
+
currentX: f.x,
|
|
576
|
+
currentY: f.y
|
|
575
577
|
};
|
|
576
578
|
}
|
|
577
579
|
function s(g, y) {
|
|
@@ -580,68 +582,68 @@ function st(n = {}) {
|
|
|
580
582
|
y: t.coords.pixelToDataY(y)
|
|
581
583
|
} : { x: 0, y: 0 };
|
|
582
584
|
}
|
|
583
|
-
function
|
|
585
|
+
function u(g, y) {
|
|
584
586
|
return Math.round(g / y) * y;
|
|
585
587
|
}
|
|
586
|
-
function
|
|
587
|
-
if (!
|
|
588
|
-
switch (
|
|
588
|
+
function h(g, y, f) {
|
|
589
|
+
if (!r) return { x: g, y };
|
|
590
|
+
switch (f) {
|
|
589
591
|
case "x":
|
|
590
|
-
return { x: g, y:
|
|
592
|
+
return { x: g, y: r.originalY };
|
|
591
593
|
case "y":
|
|
592
|
-
return { x:
|
|
594
|
+
return { x: r.originalX, y };
|
|
593
595
|
case "none":
|
|
594
|
-
return { x:
|
|
596
|
+
return { x: r.originalX, y: r.originalY };
|
|
595
597
|
default:
|
|
596
598
|
return { x: g, y };
|
|
597
599
|
}
|
|
598
600
|
}
|
|
599
|
-
function
|
|
600
|
-
let
|
|
601
|
-
if (e.snapToGrid && (
|
|
602
|
-
const P = { ...
|
|
601
|
+
function S(g, y) {
|
|
602
|
+
let f = g, l = y;
|
|
603
|
+
if (e.snapToGrid && (f = u(g, e.snapIntervalX), l = u(y, e.snapIntervalY)), r && e.validator) {
|
|
604
|
+
const P = { ...r, currentX: f, currentY: l }, x = e.validator(P);
|
|
603
605
|
if (typeof x == "boolean")
|
|
604
|
-
return { x:
|
|
606
|
+
return { x: f, y: l, valid: x };
|
|
605
607
|
if (!x.valid)
|
|
606
|
-
return { x:
|
|
607
|
-
x.snapX !== void 0 && (
|
|
608
|
+
return { x: f, y: l, valid: !1 };
|
|
609
|
+
x.snapX !== void 0 && (f = x.snapX), x.snapY !== void 0 && (l = x.snapY);
|
|
608
610
|
}
|
|
609
|
-
return { x:
|
|
611
|
+
return { x: f, y: l, valid: !0 };
|
|
610
612
|
}
|
|
611
|
-
function v(g, y,
|
|
612
|
-
var
|
|
613
|
+
function v(g, y, f, l) {
|
|
614
|
+
var D, C, B;
|
|
613
615
|
if (!t) return;
|
|
614
|
-
const P = (
|
|
616
|
+
const P = (C = (D = t.chart).getSeries) == null ? void 0 : C.call(D, g);
|
|
615
617
|
if (!P) return;
|
|
616
618
|
const x = P.getData();
|
|
617
|
-
!x || !x.x || !x.y || (x.x[y] =
|
|
619
|
+
!x || !x.x || !x.y || (x.x[y] = f, x.y[y] = l, (B = P.invalidateBuffers) == null || B.call(P), t.requestRender());
|
|
618
620
|
}
|
|
619
621
|
function p() {
|
|
620
|
-
return
|
|
621
|
-
seriesId:
|
|
622
|
-
index:
|
|
623
|
-
oldX:
|
|
624
|
-
oldY:
|
|
625
|
-
newX:
|
|
626
|
-
newY:
|
|
627
|
-
deltaX:
|
|
628
|
-
deltaY:
|
|
622
|
+
return r ? {
|
|
623
|
+
seriesId: r.seriesId,
|
|
624
|
+
index: r.index,
|
|
625
|
+
oldX: r.originalX,
|
|
626
|
+
oldY: r.originalY,
|
|
627
|
+
newX: r.currentX,
|
|
628
|
+
newY: r.currentY,
|
|
629
|
+
deltaX: r.currentX - r.originalX,
|
|
630
|
+
deltaY: r.currentY - r.originalY
|
|
629
631
|
} : null;
|
|
630
632
|
}
|
|
631
|
-
function
|
|
632
|
-
if (!
|
|
633
|
-
const { render: y, coords:
|
|
634
|
-
if (!
|
|
635
|
-
|
|
636
|
-
const P =
|
|
637
|
-
|
|
633
|
+
function w(g) {
|
|
634
|
+
if (!o || !r || !e.showPreview) return;
|
|
635
|
+
const { render: y, coords: f } = g, { ctx2d: l } = y;
|
|
636
|
+
if (!l) return;
|
|
637
|
+
l.save();
|
|
638
|
+
const P = f.dataToPixelX(r.originalX), x = f.dataToPixelY(r.originalY), D = f.dataToPixelX(r.currentX), C = f.dataToPixelY(r.currentY);
|
|
639
|
+
l.strokeStyle = e.previewStyle.color || "#ffffff", l.lineWidth = e.previewStyle.width || 2, l.globalAlpha = e.previewStyle.opacity || 0.5, l.setLineDash(e.previewStyle.dash || [5, 5]), l.beginPath(), l.moveTo(P, x), l.lineTo(D, C), l.stroke(), l.globalAlpha = 1, l.fillStyle = e.highlightColor, l.setLineDash([]), l.beginPath(), l.arc(D, C, 6, 0, Math.PI * 2), l.fill(), l.strokeStyle = "#000000", l.lineWidth = 1, l.stroke(), l.restore();
|
|
638
640
|
}
|
|
639
641
|
const b = {
|
|
640
642
|
enable() {
|
|
641
643
|
e.enabled = !0;
|
|
642
644
|
},
|
|
643
645
|
disable() {
|
|
644
|
-
e.enabled = !1,
|
|
646
|
+
e.enabled = !1, o && (r = null, o = !1, c = !1, t == null || t.requestRender());
|
|
645
647
|
},
|
|
646
648
|
isEnabled() {
|
|
647
649
|
return e.enabled;
|
|
@@ -650,17 +652,17 @@ function st(n = {}) {
|
|
|
650
652
|
e.editableSeries = g;
|
|
651
653
|
},
|
|
652
654
|
getDraggedPoint() {
|
|
653
|
-
return
|
|
655
|
+
return r;
|
|
654
656
|
},
|
|
655
657
|
cancelDrag() {
|
|
656
|
-
|
|
658
|
+
o && r && (r = null, o = !1, c = !1, t == null || t.requestRender());
|
|
657
659
|
},
|
|
658
660
|
updateConfig(g) {
|
|
659
661
|
Object.assign(e, g);
|
|
660
662
|
}
|
|
661
663
|
};
|
|
662
664
|
return {
|
|
663
|
-
manifest:
|
|
665
|
+
manifest: ke,
|
|
664
666
|
onInit(g) {
|
|
665
667
|
t = g, t.chart.dragEdit = b;
|
|
666
668
|
},
|
|
@@ -670,240 +672,58 @@ function st(n = {}) {
|
|
|
670
672
|
onInteraction(g, y) {
|
|
671
673
|
if (e.enabled) {
|
|
672
674
|
if (y.type === "mousedown") {
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
+
const f = i(y.pixelX, y.pixelY);
|
|
676
|
+
f && (r = f, a = y.pixelX, d = y.pixelY, c = !1, o = !1, y.preventDefault());
|
|
675
677
|
} else if (y.type === "mousemove") {
|
|
676
|
-
if (!
|
|
677
|
-
if (!
|
|
678
|
-
const
|
|
679
|
-
if (Math.sqrt(
|
|
680
|
-
|
|
678
|
+
if (!r) return;
|
|
679
|
+
if (!o) {
|
|
680
|
+
const C = y.pixelX - a, B = y.pixelY - d;
|
|
681
|
+
if (Math.sqrt(C * C + B * B) > e.dragThreshold) {
|
|
682
|
+
o = !0, c = !0;
|
|
681
683
|
const _ = p();
|
|
682
684
|
_ && e.onDragStart(_);
|
|
683
685
|
} else
|
|
684
686
|
return;
|
|
685
687
|
}
|
|
686
|
-
|
|
687
|
-
let { x:
|
|
688
|
-
({ x:
|
|
689
|
-
const { x: P, y: x, valid:
|
|
690
|
-
if (
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
|
|
688
|
+
o && y.preventDefault();
|
|
689
|
+
let { x: f, y: l } = s(y.pixelX, y.pixelY);
|
|
690
|
+
({ x: f, y: l } = h(f, l, e.constraint));
|
|
691
|
+
const { x: P, y: x, valid: D } = S(f, l);
|
|
692
|
+
if (D) {
|
|
693
|
+
r.currentX = P, r.currentY = x;
|
|
694
|
+
const C = p();
|
|
695
|
+
C && e.onDrag(C), t == null || t.requestRender();
|
|
694
696
|
}
|
|
695
697
|
} else if (y.type === "mouseup") {
|
|
696
|
-
if (!
|
|
697
|
-
if (
|
|
698
|
+
if (!r) return;
|
|
699
|
+
if (o && c) {
|
|
698
700
|
v(
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
701
|
+
r.seriesId,
|
|
702
|
+
r.index,
|
|
703
|
+
r.currentX,
|
|
704
|
+
r.currentY
|
|
703
705
|
);
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
+
const f = p();
|
|
707
|
+
f && e.onDragEnd(f), y.preventDefault();
|
|
706
708
|
}
|
|
707
|
-
|
|
709
|
+
r = null, o = !1, c = !1, t == null || t.requestRender();
|
|
708
710
|
}
|
|
709
711
|
}
|
|
710
712
|
},
|
|
711
713
|
onRenderOverlay(g) {
|
|
712
|
-
|
|
714
|
+
w(g);
|
|
713
715
|
},
|
|
714
716
|
api: b
|
|
715
717
|
};
|
|
716
718
|
}
|
|
717
|
-
const Xe =
|
|
718
|
-
name: "velo-plot-drawing-tools",
|
|
719
|
-
version: "1.0.0",
|
|
720
|
-
description: "Interactive trendline, horizontal, vertical, and rectangle drawing",
|
|
721
|
-
provides: ["drawing"],
|
|
722
|
-
tags: ["drawing", "annotations", "trading"]
|
|
723
|
-
};
|
|
724
|
-
function lt(n = {}) {
|
|
725
|
-
let e = null, t = {
|
|
726
|
-
mode: "none",
|
|
727
|
-
pending: null,
|
|
728
|
-
undoStack: [],
|
|
729
|
-
redoStack: []
|
|
730
|
-
}, r = null;
|
|
731
|
-
const a = n.color ?? "#38bdf8";
|
|
732
|
-
function o() {
|
|
733
|
-
var i, s;
|
|
734
|
-
return ((s = e == null ? void 0 : (i = e.chart).getAnnotations) == null ? void 0 : s.call(i)) ?? [];
|
|
735
|
-
}
|
|
736
|
-
function l() {
|
|
737
|
-
t.undoStack.push(o()), t.redoStack = [];
|
|
738
|
-
}
|
|
739
|
-
return {
|
|
740
|
-
manifest: Xe,
|
|
741
|
-
api: {
|
|
742
|
-
setMode(i) {
|
|
743
|
-
t.mode = i, t.pending = null;
|
|
744
|
-
},
|
|
745
|
-
getMode() {
|
|
746
|
-
return t.mode;
|
|
747
|
-
},
|
|
748
|
-
undo() {
|
|
749
|
-
if (!e || t.undoStack.length === 0) return !1;
|
|
750
|
-
t.redoStack.push(o());
|
|
751
|
-
const i = t.undoStack.pop(), s = o();
|
|
752
|
-
for (const c of s) e.chart.removeAnnotation(c.id);
|
|
753
|
-
for (const c of i) e.chart.addAnnotation(c);
|
|
754
|
-
return !0;
|
|
755
|
-
},
|
|
756
|
-
redo() {
|
|
757
|
-
if (!e || t.redoStack.length === 0) return !1;
|
|
758
|
-
t.undoStack.push(o());
|
|
759
|
-
const i = t.redoStack.pop(), s = o();
|
|
760
|
-
for (const c of s) e.chart.removeAnnotation(c.id);
|
|
761
|
-
for (const c of i) e.chart.addAnnotation(c);
|
|
762
|
-
return !0;
|
|
763
|
-
},
|
|
764
|
-
clear() {
|
|
765
|
-
if (e) {
|
|
766
|
-
l();
|
|
767
|
-
for (const i of o()) e.chart.removeAnnotation(i.id);
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
},
|
|
771
|
-
onInit(i) {
|
|
772
|
-
e = i, r = (s) => {
|
|
773
|
-
if (!e || t.mode === "none" || t.mode === "pan") return;
|
|
774
|
-
const { x: c, y: f } = s.point;
|
|
775
|
-
if (t.mode === "horizontal") {
|
|
776
|
-
l(), e.chart.addAnnotation({
|
|
777
|
-
type: "horizontal-line",
|
|
778
|
-
y: f,
|
|
779
|
-
color: a,
|
|
780
|
-
interactive: !0
|
|
781
|
-
});
|
|
782
|
-
return;
|
|
783
|
-
}
|
|
784
|
-
if (t.mode === "vertical") {
|
|
785
|
-
l(), e.chart.addAnnotation({
|
|
786
|
-
type: "vertical-line",
|
|
787
|
-
x: c,
|
|
788
|
-
color: a,
|
|
789
|
-
interactive: !0
|
|
790
|
-
});
|
|
791
|
-
return;
|
|
792
|
-
}
|
|
793
|
-
if (!t.pending) {
|
|
794
|
-
t.pending = { x: c, y: f };
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
const w = t.pending;
|
|
798
|
-
t.pending = null, l(), t.mode === "trendline" ? e.chart.addAnnotation({
|
|
799
|
-
type: "arrow",
|
|
800
|
-
x1: w.x,
|
|
801
|
-
y1: w.y,
|
|
802
|
-
x2: c,
|
|
803
|
-
y2: f,
|
|
804
|
-
color: a,
|
|
805
|
-
interactive: !0
|
|
806
|
-
}) : t.mode === "rectangle" && e.chart.addAnnotation({
|
|
807
|
-
type: "rectangle",
|
|
808
|
-
xMin: Math.min(w.x, c),
|
|
809
|
-
xMax: Math.max(w.x, c),
|
|
810
|
-
yMin: Math.min(w.y, f),
|
|
811
|
-
yMax: Math.max(w.y, f),
|
|
812
|
-
strokeColor: a,
|
|
813
|
-
fillColor: a + "22",
|
|
814
|
-
interactive: !0
|
|
815
|
-
});
|
|
816
|
-
}, e.chart.on("click", r);
|
|
817
|
-
},
|
|
818
|
-
onDestroy(i) {
|
|
819
|
-
r && i.chart.off("click", r), e = null, r = null;
|
|
820
|
-
}
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
const Be = {
|
|
824
|
-
name: "velo-plot-replay",
|
|
825
|
-
version: "1.0.0",
|
|
826
|
-
description: "Bar-by-bar chart replay with speed control",
|
|
827
|
-
provides: ["replay"],
|
|
828
|
-
tags: ["replay", "trading"]
|
|
829
|
-
};
|
|
830
|
-
function ct(n) {
|
|
831
|
-
let e = null, t = null, r = 0, a = null, o = 1;
|
|
832
|
-
const l = n.frameMs ?? 250;
|
|
833
|
-
function d(s) {
|
|
834
|
-
if (!e || !t) return;
|
|
835
|
-
const c = Math.min(s + 1, t.x.length), f = (w) => w ? w.subarray(0, c) : void 0;
|
|
836
|
-
e.chart.updateSeries(n.seriesId, {
|
|
837
|
-
x: f(t.x),
|
|
838
|
-
y: f(t.y),
|
|
839
|
-
open: f(t.open),
|
|
840
|
-
high: f(t.high),
|
|
841
|
-
low: f(t.low),
|
|
842
|
-
close: f(t.close)
|
|
843
|
-
});
|
|
844
|
-
}
|
|
845
|
-
const i = {
|
|
846
|
-
play(s = 1) {
|
|
847
|
-
t && (o = Math.max(0.1, s), a && clearInterval(a), a = setInterval(() => {
|
|
848
|
-
if (r >= t.x.length - 1) {
|
|
849
|
-
i.pause();
|
|
850
|
-
return;
|
|
851
|
-
}
|
|
852
|
-
r++, d(r);
|
|
853
|
-
}, l / o));
|
|
854
|
-
},
|
|
855
|
-
pause() {
|
|
856
|
-
a && (clearInterval(a), a = null);
|
|
857
|
-
},
|
|
858
|
-
step(s = 1) {
|
|
859
|
-
t && (r = Math.min(t.x.length - 1, r + s), d(r));
|
|
860
|
-
},
|
|
861
|
-
seek(s) {
|
|
862
|
-
t && (r = Math.max(0, Math.min(t.x.length - 1, s)), d(r));
|
|
863
|
-
},
|
|
864
|
-
getIndex() {
|
|
865
|
-
return r;
|
|
866
|
-
},
|
|
867
|
-
getLength() {
|
|
868
|
-
return (t == null ? void 0 : t.x.length) ?? 0;
|
|
869
|
-
},
|
|
870
|
-
isPlaying() {
|
|
871
|
-
return a != null;
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
return {
|
|
875
|
-
manifest: Be,
|
|
876
|
-
api: i,
|
|
877
|
-
onInit(s) {
|
|
878
|
-
e = s;
|
|
879
|
-
const c = e.chart.getSeries(n.seriesId);
|
|
880
|
-
if (!c) {
|
|
881
|
-
console.warn(`[PluginReplay] Series "${n.seriesId}" not found`);
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
|
-
const f = c.getData();
|
|
885
|
-
t = {
|
|
886
|
-
x: Float32Array.from(f.x),
|
|
887
|
-
y: f.y ? Float32Array.from(f.y) : void 0,
|
|
888
|
-
open: f.open ? Float32Array.from(f.open) : void 0,
|
|
889
|
-
high: f.high ? Float32Array.from(f.high) : void 0,
|
|
890
|
-
low: f.low ? Float32Array.from(f.low) : void 0,
|
|
891
|
-
close: f.close ? Float32Array.from(f.close) : void 0
|
|
892
|
-
}, r = Math.max(0, t.x.length - 1);
|
|
893
|
-
},
|
|
894
|
-
onDestroy() {
|
|
895
|
-
i.pause(), e = null, t = null;
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
const _e = `
|
|
719
|
+
const Xe = `
|
|
900
720
|
attribute vec2 aPosition;
|
|
901
721
|
uniform vec2 uResolution;
|
|
902
722
|
void main() {
|
|
903
723
|
vec2 clip = (aPosition / uResolution) * 2.0 - 1.0;
|
|
904
724
|
gl_Position = vec4(clip.x, -clip.y, 0.0, 1.0);
|
|
905
725
|
}
|
|
906
|
-
`,
|
|
726
|
+
`, Ye = `
|
|
907
727
|
precision mediump float;
|
|
908
728
|
uniform vec4 uColor;
|
|
909
729
|
void main() {
|
|
@@ -911,60 +731,60 @@ const _e = `
|
|
|
911
731
|
}
|
|
912
732
|
`;
|
|
913
733
|
function ne(n, e, t) {
|
|
914
|
-
const
|
|
915
|
-
if (!
|
|
916
|
-
if (n.shaderSource(
|
|
917
|
-
throw new Error(n.getShaderInfoLog(
|
|
918
|
-
return
|
|
734
|
+
const o = n.createShader(e);
|
|
735
|
+
if (!o) throw new Error("createShader failed");
|
|
736
|
+
if (n.shaderSource(o, t), n.compileShader(o), !n.getShaderParameter(o, n.COMPILE_STATUS))
|
|
737
|
+
throw new Error(n.getShaderInfoLog(o) ?? "shader compile failed");
|
|
738
|
+
return o;
|
|
919
739
|
}
|
|
920
|
-
function
|
|
921
|
-
const e = ne(n, n.VERTEX_SHADER,
|
|
922
|
-
if (!
|
|
923
|
-
if (n.attachShader(
|
|
924
|
-
throw new Error(n.getProgramInfoLog(
|
|
925
|
-
return n.deleteShader(e), n.deleteShader(t),
|
|
740
|
+
function Be(n) {
|
|
741
|
+
const e = ne(n, n.VERTEX_SHADER, Xe), t = ne(n, n.FRAGMENT_SHADER, Ye), o = n.createProgram();
|
|
742
|
+
if (!o) throw new Error("createProgram failed");
|
|
743
|
+
if (n.attachShader(o, e), n.attachShader(o, t), n.linkProgram(o), !n.getProgramParameter(o, n.LINK_STATUS))
|
|
744
|
+
throw new Error(n.getProgramInfoLog(o) ?? "program link failed");
|
|
745
|
+
return n.deleteShader(e), n.deleteShader(t), o;
|
|
926
746
|
}
|
|
927
|
-
function
|
|
928
|
-
const { plotArea: e, xLines: t, yLines:
|
|
929
|
-
let
|
|
930
|
-
for (const
|
|
931
|
-
s[
|
|
932
|
-
for (const
|
|
933
|
-
s[
|
|
747
|
+
function _e(n) {
|
|
748
|
+
const { plotArea: e, xLines: t, yLines: o } = n, r = e.y, a = e.y + e.height, d = e.x, c = e.x + e.width, i = (t.length + o.length) * 2, s = new Float32Array(i * 2);
|
|
749
|
+
let u = 0;
|
|
750
|
+
for (const h of t)
|
|
751
|
+
s[u++] = h, s[u++] = r, s[u++] = h, s[u++] = a;
|
|
752
|
+
for (const h of o)
|
|
753
|
+
s[u++] = d, s[u++] = h, s[u++] = c, s[u++] = h;
|
|
934
754
|
return s;
|
|
935
755
|
}
|
|
936
|
-
class
|
|
756
|
+
class Ge {
|
|
937
757
|
constructor(e) {
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
758
|
+
Y(this, "gl");
|
|
759
|
+
Y(this, "program");
|
|
760
|
+
Y(this, "buffer");
|
|
761
|
+
Y(this, "aPosition");
|
|
762
|
+
Y(this, "uResolution");
|
|
763
|
+
Y(this, "uColor");
|
|
944
764
|
const t = e.getContext("webgl", {
|
|
945
765
|
alpha: !0,
|
|
946
766
|
antialias: !1,
|
|
947
767
|
preserveDrawingBuffer: !0
|
|
948
768
|
});
|
|
949
769
|
if (!t) throw new Error("WebGL not available for grid spike");
|
|
950
|
-
this.gl = t, this.program =
|
|
951
|
-
const
|
|
952
|
-
if (!
|
|
953
|
-
this.buffer =
|
|
770
|
+
this.gl = t, this.program = Be(t), this.aPosition = t.getAttribLocation(this.program, "aPosition"), this.uResolution = t.getUniformLocation(this.program, "uResolution"), this.uColor = t.getUniformLocation(this.program, "uColor");
|
|
771
|
+
const o = t.createBuffer();
|
|
772
|
+
if (!o) throw new Error("createBuffer failed");
|
|
773
|
+
this.buffer = o;
|
|
954
774
|
}
|
|
955
775
|
/** Upload vertices and draw grid lines */
|
|
956
776
|
draw(e) {
|
|
957
|
-
const t = this.gl,
|
|
958
|
-
t.viewport(0, 0, e.width, e.height), t.clearColor(0.04, 0.05, 0.08, 1), t.clear(t.COLOR_BUFFER_BIT), t.useProgram(this.program), t.bindBuffer(t.ARRAY_BUFFER, this.buffer), t.bufferData(t.ARRAY_BUFFER,
|
|
959
|
-
const
|
|
960
|
-
return t.uniform4f(this.uColor,
|
|
777
|
+
const t = this.gl, o = _e(e), r = o.length / 4;
|
|
778
|
+
t.viewport(0, 0, e.width, e.height), t.clearColor(0.04, 0.05, 0.08, 1), t.clear(t.COLOR_BUFFER_BIT), t.useProgram(this.program), t.bindBuffer(t.ARRAY_BUFFER, this.buffer), t.bufferData(t.ARRAY_BUFFER, o, t.DYNAMIC_DRAW), t.enableVertexAttribArray(this.aPosition), t.vertexAttribPointer(this.aPosition, 2, t.FLOAT, !1, 0, 0), t.uniform2f(this.uResolution, e.width, e.height);
|
|
779
|
+
const a = e.color ?? [0.2, 0.22, 0.3, 0.6];
|
|
780
|
+
return t.uniform4f(this.uColor, a[0], a[1], a[2], a[3]), t.lineWidth(e.lineWidth ?? 1), t.drawArrays(t.LINES, 0, o.length / 2), r;
|
|
961
781
|
}
|
|
962
782
|
destroy() {
|
|
963
783
|
const e = this.gl;
|
|
964
784
|
e.deleteBuffer(this.buffer), e.deleteProgram(this.program);
|
|
965
785
|
}
|
|
966
786
|
}
|
|
967
|
-
function
|
|
787
|
+
function We(n) {
|
|
968
788
|
const e = () => {
|
|
969
789
|
};
|
|
970
790
|
return {
|
|
@@ -991,11 +811,11 @@ function $e(n) {
|
|
|
991
811
|
measureText: (t) => ({ width: t.length * 7 })
|
|
992
812
|
};
|
|
993
813
|
}
|
|
994
|
-
function
|
|
814
|
+
function ze(n, e) {
|
|
995
815
|
const t = document.createElement("canvas");
|
|
996
|
-
return t.width = n, t.height = e, t.getContext("2d") ??
|
|
816
|
+
return t.width = n, t.height = e, t.getContext("2d") ?? We(t);
|
|
997
817
|
}
|
|
998
|
-
function
|
|
818
|
+
function oe(n, e) {
|
|
999
819
|
const t = { top: 40, right: 40, bottom: 50, left: 60 };
|
|
1000
820
|
return {
|
|
1001
821
|
x: t.left,
|
|
@@ -1004,93 +824,93 @@ function ae(n, e) {
|
|
|
1004
824
|
height: e - t.top - t.bottom
|
|
1005
825
|
};
|
|
1006
826
|
}
|
|
1007
|
-
function
|
|
1008
|
-
const
|
|
1009
|
-
return { xLines:
|
|
827
|
+
function re(n, e, t, o, r) {
|
|
828
|
+
const a = e.ticks(o).map((c) => te(e.transform(c))), d = t.ticks(r).map((c) => te(t.transform(c)));
|
|
829
|
+
return { xLines: a, yLines: d };
|
|
1010
830
|
}
|
|
1011
|
-
function
|
|
831
|
+
function ie(n, e) {
|
|
1012
832
|
const t = [];
|
|
1013
|
-
for (let
|
|
1014
|
-
const
|
|
1015
|
-
n(), t.push((performance.now() -
|
|
833
|
+
for (let a = 0; a < e; a++) {
|
|
834
|
+
const d = performance.now();
|
|
835
|
+
n(), t.push((performance.now() - d) * 1e3);
|
|
1016
836
|
}
|
|
1017
|
-
t.sort((
|
|
1018
|
-
const
|
|
1019
|
-
return { avg:
|
|
837
|
+
t.sort((a, d) => a - d);
|
|
838
|
+
const o = t.reduce((a, d) => a + d, 0) / t.length, r = t[Math.floor(t.length * 0.95)] ?? o;
|
|
839
|
+
return { avg: o, p95: r };
|
|
1020
840
|
}
|
|
1021
|
-
function
|
|
1022
|
-
const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)),
|
|
841
|
+
function Ue(n = {}) {
|
|
842
|
+
const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), o = n.xTickCount ?? 24, r = n.yTickCount ?? 16, a = n.frames ?? 120, d = ze(e, t), c = {
|
|
1023
843
|
...ee,
|
|
1024
844
|
grid: {
|
|
1025
845
|
...ee.grid,
|
|
1026
846
|
visible: !0,
|
|
1027
847
|
showMinor: n.showMinor ?? !0
|
|
1028
848
|
}
|
|
1029
|
-
}, i =
|
|
1030
|
-
s.setDomain(0, 1e6),
|
|
1031
|
-
const
|
|
1032
|
-
|
|
1033
|
-
},
|
|
849
|
+
}, i = oe(e, t), s = new O(), u = new O();
|
|
850
|
+
s.setDomain(0, 1e6), u.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), u.setRange(i.y + i.height, i.y);
|
|
851
|
+
const h = new Pe(d, c), { avg: S, p95: v } = ie(() => {
|
|
852
|
+
d.clearRect(0, 0, e, t), h.drawGrid(i, s, u, { tickCount: o }, { tickCount: r });
|
|
853
|
+
}, a), { xLines: p, yLines: w } = re(i, s, u, o, r);
|
|
1034
854
|
return {
|
|
1035
855
|
backend: "canvas2d",
|
|
1036
856
|
dpr: n.dpr ?? 1,
|
|
1037
857
|
width: e,
|
|
1038
858
|
height: t,
|
|
1039
|
-
xTicks:
|
|
1040
|
-
yTicks:
|
|
1041
|
-
lineSegments: p.length +
|
|
1042
|
-
avgFrameUs: Math.round(
|
|
859
|
+
xTicks: o,
|
|
860
|
+
yTicks: r,
|
|
861
|
+
lineSegments: p.length + w.length,
|
|
862
|
+
avgFrameUs: Math.round(S),
|
|
1043
863
|
p95FrameUs: Math.round(v),
|
|
1044
|
-
frames:
|
|
864
|
+
frames: a
|
|
1045
865
|
};
|
|
1046
866
|
}
|
|
1047
|
-
function
|
|
1048
|
-
const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)),
|
|
1049
|
-
|
|
1050
|
-
let
|
|
867
|
+
function $e(n = {}) {
|
|
868
|
+
const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), o = n.xTickCount ?? 24, r = n.yTickCount ?? 16, a = n.frames ?? 120, d = document.createElement("canvas");
|
|
869
|
+
d.width = e, d.height = t;
|
|
870
|
+
let c;
|
|
1051
871
|
try {
|
|
1052
|
-
|
|
872
|
+
c = new Ge(d);
|
|
1053
873
|
} catch {
|
|
1054
874
|
return null;
|
|
1055
875
|
}
|
|
1056
|
-
const i =
|
|
1057
|
-
s.setDomain(0, 1e6),
|
|
1058
|
-
const { xLines:
|
|
876
|
+
const i = oe(e, t), s = new O(), u = new O();
|
|
877
|
+
s.setDomain(0, 1e6), u.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), u.setRange(i.y + i.height, i.y);
|
|
878
|
+
const { xLines: h, yLines: S } = re(i, s, u, o, r), v = { plotArea: i, xLines: h, yLines: S, width: e, height: t };
|
|
1059
879
|
let p = 0;
|
|
1060
|
-
const { avg:
|
|
1061
|
-
p =
|
|
1062
|
-
},
|
|
1063
|
-
return
|
|
880
|
+
const { avg: w, p95: b } = ie(() => {
|
|
881
|
+
p = c.draw(v);
|
|
882
|
+
}, a);
|
|
883
|
+
return c.destroy(), {
|
|
1064
884
|
backend: "webgl",
|
|
1065
885
|
dpr: n.dpr ?? 1,
|
|
1066
886
|
width: e,
|
|
1067
887
|
height: t,
|
|
1068
|
-
xTicks:
|
|
1069
|
-
yTicks:
|
|
888
|
+
xTicks: o,
|
|
889
|
+
yTicks: r,
|
|
1070
890
|
lineSegments: p,
|
|
1071
|
-
avgFrameUs: Math.round(
|
|
891
|
+
avgFrameUs: Math.round(w),
|
|
1072
892
|
p95FrameUs: Math.round(b),
|
|
1073
|
-
frames:
|
|
893
|
+
frames: a
|
|
1074
894
|
};
|
|
1075
895
|
}
|
|
1076
|
-
function
|
|
1077
|
-
const e = (n == null ? void 0 : n.dpr) ?? 2, t = (n == null ? void 0 : n.frames) ?? 120,
|
|
1078
|
-
if (!
|
|
896
|
+
function at(n) {
|
|
897
|
+
const e = (n == null ? void 0 : n.dpr) ?? 2, t = (n == null ? void 0 : n.frames) ?? 120, o = Ue({ dpr: e, frames: t, showMinor: !0 }), r = $e({ dpr: e, frames: t });
|
|
898
|
+
if (!r)
|
|
1079
899
|
return {
|
|
1080
|
-
canvas2d:
|
|
900
|
+
canvas2d: o,
|
|
1081
901
|
webgl: null,
|
|
1082
902
|
gainPercent: 0,
|
|
1083
903
|
recommendation: "defer"
|
|
1084
904
|
};
|
|
1085
|
-
const
|
|
905
|
+
const a = (o.avgFrameUs - r.avgFrameUs) / o.avgFrameUs * 100;
|
|
1086
906
|
return {
|
|
1087
|
-
canvas2d:
|
|
1088
|
-
webgl:
|
|
1089
|
-
gainPercent: Math.round(
|
|
1090
|
-
recommendation:
|
|
907
|
+
canvas2d: o,
|
|
908
|
+
webgl: r,
|
|
909
|
+
gainPercent: Math.round(a * 10) / 10,
|
|
910
|
+
recommendation: a >= 20 ? "implement" : "defer"
|
|
1091
911
|
};
|
|
1092
912
|
}
|
|
1093
|
-
const
|
|
913
|
+
const Oe = "1.17.0", He = "2026-07-05", qe = "Stage 1 baselines. Headless CI uses effective FPS (render throughput when rAF throttled) via scripts/benchmark-scenario-eval.mjs smoke floors.", Ne = 0.1, Ve = 0.95, Ke = {
|
|
1094
914
|
"line-1m-pan": {
|
|
1095
915
|
minAvgFps: 50,
|
|
1096
916
|
maxAvgFrameTimeMs: 20,
|
|
@@ -1131,42 +951,42 @@ const qe = "1.17.0", Ve = "2026-07-05", Ke = "Stage 1 baselines. Headless CI use
|
|
|
1131
951
|
description: "WebGL grid spike lines only @2x"
|
|
1132
952
|
}
|
|
1133
953
|
}, V = {
|
|
1134
|
-
version:
|
|
1135
|
-
recordedAt:
|
|
1136
|
-
notes:
|
|
1137
|
-
regressionThreshold:
|
|
1138
|
-
webgpuMinFpsRatio:
|
|
1139
|
-
scenarios:
|
|
954
|
+
version: Oe,
|
|
955
|
+
recordedAt: He,
|
|
956
|
+
notes: qe,
|
|
957
|
+
regressionThreshold: Ne,
|
|
958
|
+
webgpuMinFpsRatio: Ve,
|
|
959
|
+
scenarios: Ke
|
|
1140
960
|
};
|
|
1141
|
-
function
|
|
961
|
+
function ot() {
|
|
1142
962
|
return V;
|
|
1143
963
|
}
|
|
1144
|
-
function
|
|
964
|
+
function rt(n, e) {
|
|
1145
965
|
const t = V.scenarios[n];
|
|
1146
966
|
if (!t)
|
|
1147
967
|
return { passed: !0, failures: [] };
|
|
1148
|
-
const
|
|
968
|
+
const o = [], r = V.regressionThreshold ?? 0.1;
|
|
1149
969
|
if ("avgFps" in e && t.minAvgFps !== void 0) {
|
|
1150
|
-
const
|
|
1151
|
-
e.avgFps <
|
|
1152
|
-
`FPS ${e.avgFps} < baseline min ${t.minAvgFps} (allowed ${
|
|
970
|
+
const a = t.minAvgFps * (1 - r);
|
|
971
|
+
e.avgFps < a && o.push(
|
|
972
|
+
`FPS ${e.avgFps} < baseline min ${t.minAvgFps} (allowed ${a.toFixed(1)} with ${r * 100}% slack)`
|
|
1153
973
|
);
|
|
1154
974
|
}
|
|
1155
975
|
if ("avgFrameTime" in e && t.maxAvgFrameTimeMs !== void 0) {
|
|
1156
|
-
const
|
|
1157
|
-
e.avgFrameTime >
|
|
976
|
+
const a = t.maxAvgFrameTimeMs * (1 + r);
|
|
977
|
+
e.avgFrameTime > a && o.push(
|
|
1158
978
|
`Frame time ${e.avgFrameTime}ms > baseline max ${t.maxAvgFrameTimeMs}ms`
|
|
1159
979
|
);
|
|
1160
980
|
}
|
|
1161
981
|
if ("avgFrameUs" in e && t.maxAvgFrameUs !== void 0) {
|
|
1162
|
-
const
|
|
1163
|
-
e.avgFrameUs >
|
|
982
|
+
const a = t.maxAvgFrameUs * (1 + r);
|
|
983
|
+
e.avgFrameUs > a && o.push(
|
|
1164
984
|
`Grid frame ${e.avgFrameUs}µs > baseline max ${t.maxAvgFrameUs}µs`
|
|
1165
985
|
);
|
|
1166
986
|
}
|
|
1167
|
-
return { passed:
|
|
987
|
+
return { passed: o.length === 0, failures: o };
|
|
1168
988
|
}
|
|
1169
|
-
function
|
|
989
|
+
function it(n, e, t, o = 0.95) {
|
|
1170
990
|
if (!t || !e)
|
|
1171
991
|
return {
|
|
1172
992
|
webgl: n,
|
|
@@ -1176,19 +996,19 @@ function ht(n, e, t, r = 0.95) {
|
|
|
1176
996
|
meetsTarget: !1,
|
|
1177
997
|
recommendation: "webgpu-unavailable"
|
|
1178
998
|
};
|
|
1179
|
-
const
|
|
999
|
+
const r = n.avgFps > 0 ? e.avgFps / n.avgFps : 0, a = r >= o;
|
|
1180
1000
|
return {
|
|
1181
1001
|
webgl: n,
|
|
1182
1002
|
webgpu: e,
|
|
1183
1003
|
webgpuActive: !0,
|
|
1184
|
-
fpsRatio:
|
|
1185
|
-
meetsTarget:
|
|
1186
|
-
recommendation:
|
|
1004
|
+
fpsRatio: r,
|
|
1005
|
+
meetsTarget: a,
|
|
1006
|
+
recommendation: a ? "webgpu-ready" : "webgl-faster"
|
|
1187
1007
|
};
|
|
1188
1008
|
}
|
|
1189
|
-
class
|
|
1009
|
+
class je {
|
|
1190
1010
|
constructor(e) {
|
|
1191
|
-
|
|
1011
|
+
Y(this, "seed");
|
|
1192
1012
|
this.seed = e;
|
|
1193
1013
|
}
|
|
1194
1014
|
next() {
|
|
@@ -1199,7 +1019,7 @@ class Ze {
|
|
|
1199
1019
|
return e + this.next() * (t - e);
|
|
1200
1020
|
}
|
|
1201
1021
|
}
|
|
1202
|
-
function
|
|
1022
|
+
function st(n) {
|
|
1203
1023
|
const e = {
|
|
1204
1024
|
pointCount: 1e3,
|
|
1205
1025
|
amplitude: 1,
|
|
@@ -1210,15 +1030,15 @@ function gt(n) {
|
|
|
1210
1030
|
xEnd: 10,
|
|
1211
1031
|
offset: 0,
|
|
1212
1032
|
...n
|
|
1213
|
-
}, t = new Float32Array(e.pointCount),
|
|
1214
|
-
for (let
|
|
1215
|
-
t[
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1033
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1034
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1035
|
+
t[a] = e.xStart + a * r;
|
|
1036
|
+
const d = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[a] + e.phase), c = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1037
|
+
o[a] = d + c + e.offset;
|
|
1218
1038
|
}
|
|
1219
|
-
return { x: t, y:
|
|
1039
|
+
return { x: t, y: o };
|
|
1220
1040
|
}
|
|
1221
|
-
function
|
|
1041
|
+
function lt(n) {
|
|
1222
1042
|
const e = {
|
|
1223
1043
|
pointCount: 1e3,
|
|
1224
1044
|
amplitude: 1,
|
|
@@ -1229,15 +1049,15 @@ function pt(n) {
|
|
|
1229
1049
|
xEnd: 10,
|
|
1230
1050
|
offset: 0,
|
|
1231
1051
|
...n
|
|
1232
|
-
}, t = new Float32Array(e.pointCount),
|
|
1233
|
-
for (let
|
|
1234
|
-
t[
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1052
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1053
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1054
|
+
t[a] = e.xStart + a * r;
|
|
1055
|
+
const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = Math.sign(Math.sin(2 * Math.PI * d)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1056
|
+
o[a] = c + i + e.offset;
|
|
1237
1057
|
}
|
|
1238
|
-
return { x: t, y:
|
|
1058
|
+
return { x: t, y: o };
|
|
1239
1059
|
}
|
|
1240
|
-
function
|
|
1060
|
+
function ct(n) {
|
|
1241
1061
|
const e = {
|
|
1242
1062
|
pointCount: 1e3,
|
|
1243
1063
|
amplitude: 1,
|
|
@@ -1248,15 +1068,15 @@ function mt(n) {
|
|
|
1248
1068
|
xEnd: 10,
|
|
1249
1069
|
offset: 0,
|
|
1250
1070
|
...n
|
|
1251
|
-
}, t = new Float32Array(e.pointCount),
|
|
1252
|
-
for (let
|
|
1253
|
-
t[
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1071
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1072
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1073
|
+
t[a] = e.xStart + a * r;
|
|
1074
|
+
const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * (d - Math.floor(d + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1075
|
+
o[a] = c + i + e.offset;
|
|
1256
1076
|
}
|
|
1257
|
-
return { x: t, y:
|
|
1077
|
+
return { x: t, y: o };
|
|
1258
1078
|
}
|
|
1259
|
-
function
|
|
1079
|
+
function dt(n) {
|
|
1260
1080
|
const e = {
|
|
1261
1081
|
pointCount: 1e3,
|
|
1262
1082
|
amplitude: 1,
|
|
@@ -1267,15 +1087,15 @@ function yt(n) {
|
|
|
1267
1087
|
xEnd: 10,
|
|
1268
1088
|
offset: 0,
|
|
1269
1089
|
...n
|
|
1270
|
-
}, t = new Float32Array(e.pointCount),
|
|
1271
|
-
for (let
|
|
1272
|
-
t[
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1090
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
|
|
1091
|
+
for (let a = 0; a < e.pointCount; a++) {
|
|
1092
|
+
t[a] = e.xStart + a * r;
|
|
1093
|
+
const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * Math.abs(2 * (d - Math.floor(d + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
|
|
1094
|
+
o[a] = c + i + e.offset;
|
|
1275
1095
|
}
|
|
1276
|
-
return { x: t, y:
|
|
1096
|
+
return { x: t, y: o };
|
|
1277
1097
|
}
|
|
1278
|
-
function
|
|
1098
|
+
function ut(n) {
|
|
1279
1099
|
const e = {
|
|
1280
1100
|
pointCount: 1e3,
|
|
1281
1101
|
xRange: [0, 100],
|
|
@@ -1283,20 +1103,20 @@ function xt(n) {
|
|
|
1283
1103
|
sorted: !0,
|
|
1284
1104
|
seed: Date.now(),
|
|
1285
1105
|
...n
|
|
1286
|
-
}, t = new
|
|
1287
|
-
for (let
|
|
1288
|
-
|
|
1106
|
+
}, t = new je(e.seed), o = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount);
|
|
1107
|
+
for (let a = 0; a < e.pointCount; a++)
|
|
1108
|
+
o[a] = t.nextRange(e.xRange[0], e.xRange[1]), r[a] = t.nextRange(e.yRange[0], e.yRange[1]);
|
|
1289
1109
|
if (e.sorted) {
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1110
|
+
const a = Array.from({ length: e.pointCount }, (i, s) => s);
|
|
1111
|
+
a.sort((i, s) => o[i] - o[s]);
|
|
1112
|
+
const d = new Float32Array(e.pointCount), c = new Float32Array(e.pointCount);
|
|
1293
1113
|
for (let i = 0; i < e.pointCount; i++)
|
|
1294
|
-
|
|
1295
|
-
return { x:
|
|
1114
|
+
d[i] = o[a[i]], c[i] = r[a[i]];
|
|
1115
|
+
return { x: d, y: c };
|
|
1296
1116
|
}
|
|
1297
|
-
return { x:
|
|
1117
|
+
return { x: o, y: r };
|
|
1298
1118
|
}
|
|
1299
|
-
function
|
|
1119
|
+
function ft(n) {
|
|
1300
1120
|
const e = {
|
|
1301
1121
|
pointCount: 2e3,
|
|
1302
1122
|
vMin: -0.5,
|
|
@@ -1306,17 +1126,17 @@ function vt(n) {
|
|
|
1306
1126
|
// 10 µA
|
|
1307
1127
|
noise: 0.02,
|
|
1308
1128
|
...n
|
|
1309
|
-
}, t = e.pointCount * e.cycles,
|
|
1310
|
-
for (let
|
|
1311
|
-
for (let i = 0; i <
|
|
1312
|
-
const s =
|
|
1313
|
-
i <
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1129
|
+
}, t = e.pointCount * e.cycles, o = new Float32Array(t), r = new Float32Array(t), a = e.pointCount, d = a / 2;
|
|
1130
|
+
for (let c = 0; c < e.cycles; c++)
|
|
1131
|
+
for (let i = 0; i < a; i++) {
|
|
1132
|
+
const s = c * a + i;
|
|
1133
|
+
i < d ? o[s] = e.vMin + (e.vMax - e.vMin) * (i / d) : o[s] = e.vMax - (e.vMax - e.vMin) * ((i - d) / d);
|
|
1134
|
+
const u = o[s], h = 0, S = i < d ? 1 : -1, v = 0.1, p = -Math.pow(u - h, 2) / (2 * v * v), w = e.peakCurrent * Math.exp(p), b = S * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
|
|
1135
|
+
r[s] = S * w + b + g;
|
|
1316
1136
|
}
|
|
1317
|
-
return { x:
|
|
1137
|
+
return { x: o, y: r };
|
|
1318
1138
|
}
|
|
1319
|
-
function
|
|
1139
|
+
function gt(n) {
|
|
1320
1140
|
const e = {
|
|
1321
1141
|
pointCount: 50,
|
|
1322
1142
|
rSolution: 100,
|
|
@@ -1325,437 +1145,396 @@ function wt(n) {
|
|
|
1325
1145
|
// Ohms
|
|
1326
1146
|
frequency: [1e5, 0.01],
|
|
1327
1147
|
...n
|
|
1328
|
-
}, t = new Float32Array(e.pointCount),
|
|
1329
|
-
for (let
|
|
1330
|
-
const
|
|
1331
|
-
t[
|
|
1148
|
+
}, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = Math.log10(e.frequency[1]), a = Math.log10(e.frequency[0]);
|
|
1149
|
+
for (let d = 0; d < e.pointCount; d++) {
|
|
1150
|
+
const c = a - (a - r) * (d / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, c), s = e.rCharge * 1e-5, u = e.rSolution + e.rCharge / (1 + Math.pow(i * s, 2)), h = i * s * e.rCharge / (1 + Math.pow(i * s, 2));
|
|
1151
|
+
t[d] = u, o[d] = -h;
|
|
1332
1152
|
}
|
|
1333
|
-
return { x: t, y:
|
|
1153
|
+
return { x: t, y: o };
|
|
1334
1154
|
}
|
|
1335
|
-
async function
|
|
1155
|
+
async function pt(n, e) {
|
|
1336
1156
|
const t = {
|
|
1337
1157
|
duration: 5e3,
|
|
1338
1158
|
warmup: 1e3,
|
|
1339
1159
|
...e
|
|
1340
|
-
},
|
|
1341
|
-
let
|
|
1342
|
-
const
|
|
1343
|
-
return new Promise((
|
|
1160
|
+
}, o = [], r = [];
|
|
1161
|
+
let a = 0;
|
|
1162
|
+
const d = n.getAllSeries().reduce((c, i) => c + i.getPointCount(), 0);
|
|
1163
|
+
return new Promise((c) => {
|
|
1344
1164
|
const i = performance.now() + t.warmup + t.duration, s = performance.now() + t.warmup;
|
|
1345
|
-
let
|
|
1346
|
-
function
|
|
1165
|
+
let u = !1, h = 0;
|
|
1166
|
+
function S() {
|
|
1347
1167
|
const v = performance.now();
|
|
1348
1168
|
if (v >= i) {
|
|
1349
|
-
const b =
|
|
1169
|
+
const b = r.length > 0 ? r.reduce((P, x) => P + x, 0) / r.length : 0, g = h > 0 ? v - h : t.duration, y = a > 0 && g > 0 ? a / g * 1e3 : 0, f = o.length > 0 ? o.reduce((P, x) => P + x, 0) / o.length : b > 0 ? 1e3 / b : 0, l = {
|
|
1350
1170
|
avgFps: Math.round(y * 100) / 100,
|
|
1351
|
-
minFps: Math.round((
|
|
1352
|
-
maxFps: Math.round((
|
|
1171
|
+
minFps: Math.round((o.length > 0 ? Math.min(...o) : y) * 100) / 100,
|
|
1172
|
+
maxFps: Math.round((o.length > 0 ? Math.max(...o) : y) * 100) / 100,
|
|
1353
1173
|
avgFrameTime: Math.round(b * 1e3) / 1e3,
|
|
1354
|
-
frameCount:
|
|
1174
|
+
frameCount: a,
|
|
1355
1175
|
duration: t.duration,
|
|
1356
|
-
pointsRendered:
|
|
1357
|
-
throughput: Math.round(
|
|
1176
|
+
pointsRendered: d,
|
|
1177
|
+
throughput: Math.round(d * y / 1e3) * 1e3,
|
|
1358
1178
|
/** @internal render-only FPS (not wall clock) */
|
|
1359
|
-
...
|
|
1179
|
+
...f > 0 ? { renderFps: Math.round(f * 100) / 100 } : {}
|
|
1360
1180
|
};
|
|
1361
|
-
|
|
1181
|
+
c(l);
|
|
1362
1182
|
return;
|
|
1363
1183
|
}
|
|
1364
|
-
v >= s && !
|
|
1184
|
+
v >= s && !u && (u = !0, h = v, a = 0, r.length = 0, o.length = 0);
|
|
1365
1185
|
const p = performance.now();
|
|
1366
1186
|
n.render();
|
|
1367
|
-
const
|
|
1368
|
-
if (
|
|
1369
|
-
const b =
|
|
1370
|
-
|
|
1371
|
-
const g =
|
|
1187
|
+
const w = performance.now();
|
|
1188
|
+
if (u) {
|
|
1189
|
+
const b = w - p;
|
|
1190
|
+
r.push(b), a++;
|
|
1191
|
+
const g = r.slice(-30);
|
|
1372
1192
|
if (g.length > 0) {
|
|
1373
|
-
const y = g.reduce((
|
|
1374
|
-
y > 0 &&
|
|
1193
|
+
const y = g.reduce((f, l) => f + l, 0) / g.length;
|
|
1194
|
+
y > 0 && o.push(1e3 / y);
|
|
1375
1195
|
}
|
|
1376
1196
|
}
|
|
1377
|
-
requestAnimationFrame(
|
|
1197
|
+
requestAnimationFrame(S);
|
|
1378
1198
|
}
|
|
1379
|
-
requestAnimationFrame(
|
|
1199
|
+
requestAnimationFrame(S);
|
|
1380
1200
|
});
|
|
1381
1201
|
}
|
|
1382
|
-
function
|
|
1202
|
+
function ht(n, e) {
|
|
1383
1203
|
const t = {
|
|
1384
1204
|
format: "json",
|
|
1385
1205
|
includeStyles: !0,
|
|
1386
1206
|
...e
|
|
1387
|
-
},
|
|
1388
|
-
id:
|
|
1389
|
-
type:
|
|
1390
|
-
pointCount:
|
|
1391
|
-
...t.includeStyles ? { style:
|
|
1392
|
-
})),
|
|
1207
|
+
}, o = n.getAllSeries().map((a) => ({
|
|
1208
|
+
id: a.getId(),
|
|
1209
|
+
type: a.getType(),
|
|
1210
|
+
pointCount: a.getPointCount(),
|
|
1211
|
+
...t.includeStyles ? { style: a.getStyle() } : {}
|
|
1212
|
+
})), r = {
|
|
1393
1213
|
timestamp: Date.now(),
|
|
1394
1214
|
config: {},
|
|
1395
|
-
series:
|
|
1215
|
+
series: o,
|
|
1396
1216
|
bounds: n.getViewBounds()
|
|
1397
1217
|
};
|
|
1398
|
-
return t.format === "png" && n.exportImage && (
|
|
1218
|
+
return t.format === "png" && n.exportImage && (r.image = n.exportImage()), r;
|
|
1399
1219
|
}
|
|
1400
|
-
function
|
|
1401
|
-
const
|
|
1402
|
-
n.series.length !== e.series.length &&
|
|
1403
|
-
for (let
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1220
|
+
function mt(n, e, t = 1e-6) {
|
|
1221
|
+
const o = [];
|
|
1222
|
+
n.series.length !== e.series.length && o.push(`Series count: ${n.series.length} vs ${e.series.length}`);
|
|
1223
|
+
for (let a = 0; a < Math.min(n.series.length, e.series.length); a++) {
|
|
1224
|
+
const d = n.series[a], c = e.series[a];
|
|
1225
|
+
d.id !== c.id && o.push(`Series[${a}] id: "${d.id}" vs "${c.id}"`), d.type !== c.type && o.push(`Series[${a}] type: "${d.type}" vs "${c.type}"`), d.pointCount !== c.pointCount && o.push(`Series[${a}] pointCount: ${d.pointCount} vs ${c.pointCount}`);
|
|
1406
1226
|
}
|
|
1407
|
-
const
|
|
1408
|
-
for (const
|
|
1409
|
-
Math.abs(n.bounds[
|
|
1227
|
+
const r = ["xMin", "xMax", "yMin", "yMax"];
|
|
1228
|
+
for (const a of r)
|
|
1229
|
+
Math.abs(n.bounds[a] - e.bounds[a]) > t && o.push(`Bounds.${a}: ${n.bounds[a]} vs ${e.bounds[a]}`);
|
|
1410
1230
|
return {
|
|
1411
|
-
equal:
|
|
1412
|
-
differences:
|
|
1231
|
+
equal: o.length === 0,
|
|
1232
|
+
differences: o
|
|
1413
1233
|
};
|
|
1414
1234
|
}
|
|
1415
|
-
function
|
|
1235
|
+
function yt(n, e) {
|
|
1416
1236
|
const t = [];
|
|
1417
1237
|
return e.minFps && n.avgFps < e.minFps && t.push(`FPS ${n.avgFps} < required ${e.minFps}`), e.maxFrameTime && n.avgFrameTime > e.maxFrameTime && t.push(`Frame time ${n.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && n.throughput < e.minThroughput && t.push(`Throughput ${n.throughput} < required ${e.minThroughput}`), {
|
|
1418
1238
|
passed: t.length === 0,
|
|
1419
1239
|
failures: t
|
|
1420
1240
|
};
|
|
1421
1241
|
}
|
|
1422
|
-
function
|
|
1242
|
+
function xt(n = 1) {
|
|
1423
1243
|
return new Promise((e) => {
|
|
1424
1244
|
let t = n;
|
|
1425
|
-
function
|
|
1426
|
-
t--, t <= 0 ? e() : requestAnimationFrame(
|
|
1245
|
+
function o() {
|
|
1246
|
+
t--, t <= 0 ? e() : requestAnimationFrame(o);
|
|
1427
1247
|
}
|
|
1428
|
-
requestAnimationFrame(
|
|
1248
|
+
requestAnimationFrame(o);
|
|
1429
1249
|
});
|
|
1430
1250
|
}
|
|
1431
|
-
function
|
|
1251
|
+
function vt(n) {
|
|
1432
1252
|
return new Promise((e) => setTimeout(e, n));
|
|
1433
1253
|
}
|
|
1434
|
-
const oe = 864e5;
|
|
1435
|
-
function et(n) {
|
|
1436
|
-
return new Date(n).getUTCDay();
|
|
1437
|
-
}
|
|
1438
|
-
function tt(n, e = {}) {
|
|
1439
|
-
const t = et(n);
|
|
1440
|
-
return t !== 0 && t !== 6;
|
|
1441
|
-
}
|
|
1442
|
-
function Ft(n, e = {}) {
|
|
1443
|
-
const t = e.calendar ?? "business-day", r = n.length, a = new Float32Array(r), o = new Int32Array(r);
|
|
1444
|
-
if (o.fill(-1), t === "continuous") {
|
|
1445
|
-
for (let i = 0; i < r; i++)
|
|
1446
|
-
a[i] = n[i], o[i] = i;
|
|
1447
|
-
return {
|
|
1448
|
-
scaledX: a,
|
|
1449
|
-
timeByIndex: n instanceof Float32Array ? n : Float32Array.from(n),
|
|
1450
|
-
sourceToScaled: o
|
|
1451
|
-
};
|
|
1452
|
-
}
|
|
1453
|
-
const l = [];
|
|
1454
|
-
let d = 0;
|
|
1455
|
-
for (let i = 0; i < r; i++) {
|
|
1456
|
-
const s = n[i];
|
|
1457
|
-
if (!Number.isFinite(s) || !tt(s, e)) {
|
|
1458
|
-
a[i] = Number.NaN;
|
|
1459
|
-
continue;
|
|
1460
|
-
}
|
|
1461
|
-
a[i] = d, l[d] = s, o[i] = d, d++;
|
|
1462
|
-
}
|
|
1463
|
-
return {
|
|
1464
|
-
scaledX: a,
|
|
1465
|
-
timeByIndex: Float32Array.from(l),
|
|
1466
|
-
sourceToScaled: o
|
|
1467
|
-
};
|
|
1468
|
-
}
|
|
1469
|
-
function Ct(n, e, t) {
|
|
1470
|
-
const r = Math.max(0, Math.floor(e)), a = Math.min(n.timeByIndex.length - 1, Math.ceil(t)), o = n.timeByIndex[r], l = n.timeByIndex[a];
|
|
1471
|
-
return o == null || l == null ? oe : Math.abs(l - o) || oe;
|
|
1472
|
-
}
|
|
1473
|
-
function It(n) {
|
|
1474
|
-
const e = n.close.length, t = new Float32Array(e), r = new Float32Array(e), a = new Float32Array(e), o = new Float32Array(e);
|
|
1475
|
-
for (let l = 0; l < e; l++) {
|
|
1476
|
-
const d = n.open[l], i = n.high[l], s = n.low[l], c = n.close[l];
|
|
1477
|
-
o[l] = (d + i + s + c) / 4, t[l] = l === 0 ? (d + c) / 2 : (t[l - 1] + o[l - 1]) / 2, r[l] = Math.max(i, t[l], o[l]), a[l] = Math.min(s, t[l], o[l]);
|
|
1478
|
-
}
|
|
1479
|
-
return { open: t, high: r, low: a, close: o };
|
|
1480
|
-
}
|
|
1481
1254
|
export {
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1255
|
+
St as AnimationEngine,
|
|
1256
|
+
In as AnnotationManager,
|
|
1257
|
+
Za as BackpressureManager,
|
|
1258
|
+
xo as BaseBufferStore,
|
|
1259
|
+
vo as BaseTextureStore,
|
|
1260
|
+
tt as BuiltinPlugins,
|
|
1261
|
+
sr as ChartGroup,
|
|
1262
|
+
Tt as ChartInitQueue,
|
|
1263
|
+
eo as CircularBuffer,
|
|
1264
|
+
Oo as ClipboardManager,
|
|
1265
|
+
Se as CrosshairPlugin,
|
|
1493
1266
|
ee as DARK_THEME,
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1267
|
+
bt as DEFAULT_ANIMATION_CONFIG,
|
|
1268
|
+
_o as DEFAULT_KEY_BINDINGS,
|
|
1269
|
+
At as DEFAULT_LAYOUT,
|
|
1270
|
+
Mt as DEFAULT_THEME,
|
|
1271
|
+
Ee as DataLoggerPlugin,
|
|
1272
|
+
jo as DebugOverlay,
|
|
1500
1273
|
Le as DirectionIndicatorPlugin,
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1274
|
+
Ct as ELECTROCHEM_THEME,
|
|
1275
|
+
Tn as EventEmitter,
|
|
1276
|
+
Po as GpuBenchmark,
|
|
1277
|
+
wo as GpuCompute,
|
|
1278
|
+
Hn as GpuRenderer,
|
|
1279
|
+
Fe as GridHighlightPlugin,
|
|
1280
|
+
Go as KeyBindingManager,
|
|
1281
|
+
Ft as LIGHT_THEME,
|
|
1282
|
+
Ao as LOCALE_DE_DE,
|
|
1283
|
+
Mo as LOCALE_EN_US,
|
|
1284
|
+
Co as LOCALE_ES_ES,
|
|
1285
|
+
Fo as LOCALE_FR_FR,
|
|
1286
|
+
Do as LOCALE_JA_JP,
|
|
1287
|
+
Eo as LOCALE_PT_BR,
|
|
1288
|
+
Io as LOCALE_ZH_CN,
|
|
1516
1289
|
O as LinearScale,
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1290
|
+
tr as LoadingIndicator,
|
|
1291
|
+
Dt as LogScale,
|
|
1292
|
+
Et as MIDNIGHT_THEME,
|
|
1293
|
+
It as NativeWebGLRenderer,
|
|
1521
1294
|
Pe as OverlayRenderer,
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
ut as
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1295
|
+
So as PipelineCache,
|
|
1296
|
+
di as Plugin3D,
|
|
1297
|
+
va as PluginAnalysis,
|
|
1298
|
+
Ln as PluginAnnotations,
|
|
1299
|
+
Pi as PluginAnomalyDetection,
|
|
1300
|
+
Wi as PluginBrokenAxis,
|
|
1301
|
+
Yi as PluginCaching,
|
|
1302
|
+
Ho as PluginClipboard,
|
|
1303
|
+
xi as PluginContextMenu,
|
|
1304
|
+
mi as PluginDataExport,
|
|
1305
|
+
Li as PluginDataTransform,
|
|
1306
|
+
Jo as PluginDebug,
|
|
1307
|
+
nt as PluginDragEdit,
|
|
1308
|
+
fr as PluginDrawingTools,
|
|
1309
|
+
Vi as PluginForecasting,
|
|
1310
|
+
To as PluginGpu,
|
|
1311
|
+
fi as PluginI18n,
|
|
1312
|
+
Wo as PluginKeyboard,
|
|
1313
|
+
Ri as PluginLaTeX,
|
|
1314
|
+
_i as PluginLazyLoad,
|
|
1315
|
+
nr as PluginLoading,
|
|
1316
|
+
Si as PluginMLIntegration,
|
|
1317
|
+
Lt as PluginManagerImpl,
|
|
1318
|
+
Oi as PluginOffscreen,
|
|
1319
|
+
bi as PluginPatternRecognition,
|
|
1320
|
+
qi as PluginROI,
|
|
1321
|
+
Fi as PluginRadar,
|
|
1322
|
+
Mi as PluginRegression,
|
|
1323
|
+
gr as PluginReplay,
|
|
1324
|
+
Ei as PluginSnapshot,
|
|
1325
|
+
to as PluginStreaming,
|
|
1326
|
+
pi as PluginSync,
|
|
1327
|
+
yr as PluginThemeEditor,
|
|
1328
|
+
Qn as PluginTools,
|
|
1329
|
+
Ui as PluginVideoRecorder,
|
|
1330
|
+
aa as PluginVirtualization,
|
|
1331
|
+
kt as SERIALIZATION_VERSION,
|
|
1332
|
+
po as STACKED_DEFAULT_MIN_PANE_RATIO,
|
|
1333
|
+
ho as STACKED_MAX_PANES,
|
|
1334
|
+
uo as SciPlot,
|
|
1335
|
+
Rt as Series,
|
|
1336
|
+
qn as SeriesAdapter,
|
|
1337
|
+
Xt as StateHistory,
|
|
1338
|
+
be as StatsPlugin,
|
|
1339
|
+
xr as THEME_PRESETS,
|
|
1340
|
+
Zn as TOOLTIP_THEMES,
|
|
1341
|
+
vr as ThemeEditor,
|
|
1342
|
+
ea as TooltipManager,
|
|
1343
|
+
Me as WatermarkPlugin,
|
|
1344
|
+
Nn as WebGLBackend,
|
|
1345
|
+
Vn as WebGPUBackend,
|
|
1346
|
+
ae as WebGPURenderer,
|
|
1347
|
+
ma as WorkerPool,
|
|
1348
|
+
Yt as addIndicatorToChart,
|
|
1349
|
+
$r as adx,
|
|
1350
|
+
Pa as analyzeComplexSpectrum,
|
|
1351
|
+
wa as analyzeSpectrum,
|
|
1352
|
+
bn as applyBusinessDayX,
|
|
1353
|
+
Or as aroon,
|
|
1354
|
+
Sa as arraysToComplex,
|
|
1355
|
+
yt as assertPerformance,
|
|
1356
|
+
Hr as atr,
|
|
1357
|
+
Ta as autoCorrelation,
|
|
1358
|
+
ba as bandPassFilter,
|
|
1359
|
+
Aa as bandStopFilter,
|
|
1360
|
+
pr as barsToOhlc,
|
|
1361
|
+
Ue as benchmarkCanvasGrid,
|
|
1362
|
+
pt as benchmarkRender,
|
|
1363
|
+
$e as benchmarkWebGLGrid,
|
|
1364
|
+
Ma as blackmanWindow,
|
|
1365
|
+
qr as bollingerBands,
|
|
1366
|
+
Bt as bollingerBandsAsync,
|
|
1367
|
+
_t as buildIndicatorPane,
|
|
1368
|
+
Gt as buildIndicatorPaneFromPreset,
|
|
1369
|
+
Wt as buildIndicatorSeries,
|
|
1370
|
+
zt as buildPositionLineAnnotation,
|
|
1371
|
+
An as businessDaySpanMs,
|
|
1372
|
+
Ca as butterworth,
|
|
1373
|
+
Br as calculateR2,
|
|
1374
|
+
br as calculateStats,
|
|
1375
|
+
oa as calculateTargetPoints,
|
|
1376
|
+
Rn as checkPluginCompatibility,
|
|
1377
|
+
at as compareGridBackends,
|
|
1378
|
+
rt as compareScenarioToBaseline,
|
|
1379
|
+
mt as compareSnapshots,
|
|
1380
|
+
Fa as complexToArrays,
|
|
1381
|
+
Ut as compressString,
|
|
1382
|
+
$t as computeHeikinAshi,
|
|
1383
|
+
Ot as computeIndicatorFromSeries,
|
|
1384
|
+
Ht as computeIndicatorPreset,
|
|
1385
|
+
no as connectStreamToChart,
|
|
1386
|
+
qo as copyToClipboard,
|
|
1387
|
+
ao as createBackpressureManager,
|
|
1388
|
+
qt as createChart,
|
|
1389
|
+
lr as createChartGroup,
|
|
1390
|
+
Xn as createConfigurablePlugin,
|
|
1391
|
+
Qo as createDebugOverlay,
|
|
1392
|
+
Kn as createGpuRenderer,
|
|
1393
|
+
Nt as createIndicatorSeries,
|
|
1394
|
+
zo as createKeyBinding,
|
|
1395
|
+
ar as createLoadingIndicator,
|
|
1396
|
+
Lo as createLocaleFormatter,
|
|
1397
|
+
oo as createLosslessBackpressure,
|
|
1398
|
+
cr as createMasterSlave,
|
|
1399
|
+
ro as createMessageParser,
|
|
1400
|
+
hr as createMockDatafeed,
|
|
1401
|
+
io as createMockStream,
|
|
1402
|
+
Vt as createNativeRenderer,
|
|
1403
|
+
Yn as createPlugin,
|
|
1404
|
+
Kt as createPluginContext,
|
|
1405
|
+
so as createRealtimeBackpressure,
|
|
1406
|
+
Bn as createRenderer,
|
|
1407
|
+
jt as createScale,
|
|
1408
|
+
ht as createSnapshot,
|
|
1409
|
+
mo as createStackedChart,
|
|
1410
|
+
Jt as createTheme,
|
|
1411
|
+
Pr as createThemeEditor,
|
|
1412
|
+
lo as createWebSocketStream,
|
|
1413
|
+
Da as crossCorrelation,
|
|
1414
|
+
Nr as cumsum,
|
|
1415
|
+
_r as cumulativeIntegral,
|
|
1416
|
+
Qt as decodeFloat32Array,
|
|
1417
|
+
Zt as decompressString,
|
|
1418
|
+
_n as defineAndRegister,
|
|
1419
|
+
G as definePlugin,
|
|
1420
|
+
Vr as dema,
|
|
1421
|
+
Gr as derivative,
|
|
1422
|
+
ra as destroyDownsamplePool,
|
|
1423
|
+
en as destroyIndicatorPool,
|
|
1424
|
+
Ea as detectAnomalies,
|
|
1425
|
+
Ar as detectCycles,
|
|
1426
|
+
tn as detectIndicatorMarkers,
|
|
1427
|
+
Mr as detectPeaks,
|
|
1428
|
+
Ia as dominantFrequency,
|
|
1429
|
+
ia as downsampleAsync,
|
|
1430
|
+
Cr as downsampleLTTB,
|
|
1431
|
+
nn as easings,
|
|
1432
|
+
Kr as ema,
|
|
1433
|
+
an as emaAsync,
|
|
1434
|
+
Zo as enableDebugMode,
|
|
1435
|
+
on as encodeFloat32Array,
|
|
1436
|
+
it as evaluateRendererCompare,
|
|
1437
|
+
La as exponentialMovingAverage,
|
|
1438
|
+
ka as fft,
|
|
1439
|
+
Ra as fftFromComplexInput,
|
|
1440
|
+
Mn as formatBusinessDayTick,
|
|
1441
|
+
No as formatData,
|
|
1442
|
+
Fr as formatScientific,
|
|
1443
|
+
Dr as formatValue,
|
|
1444
|
+
Er as formatWithPrefix,
|
|
1445
|
+
Xa as gaussianSmooth,
|
|
1446
|
+
ft as generateCVData,
|
|
1447
|
+
Ir as generateCycleColors,
|
|
1448
|
+
gt as generateNyquistData,
|
|
1449
|
+
ut as generateRandomData,
|
|
1450
|
+
ct as generateSawtoothWave,
|
|
1451
|
+
st as generateSineWave,
|
|
1452
|
+
lt as generateSquareWave,
|
|
1453
|
+
dt as generateTriangleWave,
|
|
1454
|
+
ot as getBaseline,
|
|
1455
|
+
Lr as getBestPrefix,
|
|
1456
|
+
rn as getChartInitQueue,
|
|
1457
|
+
Vo as getClipboardManager,
|
|
1458
|
+
sa as getDownsamplePoolSize,
|
|
1459
|
+
ko as getGlobalLocale,
|
|
1460
|
+
Ro as getLocale,
|
|
1683
1461
|
Gn as getPluginRegistry,
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1462
|
+
Ya as getPositiveFrequencies,
|
|
1463
|
+
wr as getPresetNames,
|
|
1464
|
+
Sr as getPresetTheme,
|
|
1465
|
+
sn as getSharedAnimationEngine,
|
|
1466
|
+
ln as getThemeByName,
|
|
1467
|
+
ta as getTooltipThemeForChartTheme,
|
|
1468
|
+
Ba as hammingWindow,
|
|
1469
|
+
_a as hanningWindow,
|
|
1470
|
+
Ga as highPassFilter,
|
|
1471
|
+
Wa as ifft,
|
|
1472
|
+
za as ifftComplex,
|
|
1473
|
+
Ua as ifftFromArrays,
|
|
1474
|
+
Wr as integrate,
|
|
1475
|
+
cn as interleaveData,
|
|
1476
|
+
Cn as isBusinessDay,
|
|
1477
|
+
Fn as isBusinessDayScaleActive,
|
|
1478
|
+
dr as linkCharts,
|
|
1479
|
+
Wn as listPluginsByCategory,
|
|
1480
|
+
zn as loadPlugin,
|
|
1481
|
+
$a as lowPassFilter,
|
|
1482
|
+
la as lowerBoundX,
|
|
1483
|
+
ca as lttbDownsample,
|
|
1484
|
+
jr as macd,
|
|
1485
|
+
dn as macdAsync,
|
|
1486
|
+
Dn as mapToBusinessDayScale,
|
|
1487
|
+
Oa as medianFilter,
|
|
1488
|
+
un as mergeAnimationConfig,
|
|
1489
|
+
fn as mergeLayoutOptions,
|
|
1490
|
+
da as minMaxDownsample,
|
|
1491
|
+
Jr as momentum,
|
|
1492
|
+
kr as movingAverage,
|
|
1493
|
+
Ha as nextPowerOf2,
|
|
1494
|
+
ya as nextTaskId,
|
|
1495
|
+
Qr as normalize,
|
|
1496
|
+
Zr as obv,
|
|
1497
|
+
ua as ohlcDownsampleAsync,
|
|
1498
|
+
fa as ohlcMinMaxDownsample,
|
|
1499
|
+
gn as parseColor,
|
|
1500
|
+
jn as parseColorToRGBA,
|
|
1501
|
+
Uo as parseShortcut,
|
|
1502
|
+
ei as percentChange,
|
|
1503
|
+
qa as powerSpectrum,
|
|
1504
|
+
pn as queueChartInit,
|
|
1505
|
+
Xo as registerLocale,
|
|
1506
|
+
Un as registerPlugin,
|
|
1507
|
+
hn as resetChartQueue,
|
|
1508
|
+
ti as roc,
|
|
1509
|
+
ni as rsi,
|
|
1510
|
+
mn as rsiAsync,
|
|
1511
|
+
Na as savitzkyGolay,
|
|
1512
|
+
Yo as setGlobalLocale,
|
|
1513
|
+
or as showLoading,
|
|
1514
|
+
rr as showProgress,
|
|
1515
|
+
Va as simpsonsIntegration,
|
|
1516
|
+
Ka as singleFrequencyFilter,
|
|
1517
|
+
ga as sliceSeriesToViewport,
|
|
1518
|
+
ai as sma,
|
|
1519
|
+
yn as smaAsync,
|
|
1520
|
+
zr as solveLinearSystem,
|
|
1521
|
+
oi as standardDeviation,
|
|
1522
|
+
xn as stateToUrlHash,
|
|
1523
|
+
ri as stochastic,
|
|
1524
|
+
Rr as subtractBaseline,
|
|
1525
|
+
ja as tTest,
|
|
1526
|
+
ii as tema,
|
|
1527
|
+
Ja as trapezoidalIntegration,
|
|
1528
|
+
pa as upperBoundX,
|
|
1529
|
+
vn as urlHashToState,
|
|
1530
|
+
fo as useSciPlot,
|
|
1531
|
+
Pn as validateChartState,
|
|
1532
|
+
Xr as validateData,
|
|
1533
|
+
$n as validateManifest,
|
|
1534
|
+
si as vwap,
|
|
1535
|
+
vt as waitFor,
|
|
1536
|
+
wn as waitForAnimations,
|
|
1537
|
+
xt as waitForFrames,
|
|
1538
|
+
li as wma
|
|
1760
1539
|
};
|
|
1761
1540
|
//# sourceMappingURL=velo-plot.full.js.map
|