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.
Files changed (49) hide show
  1. package/dist/{ChartCore-DQ691eXH.js → ChartCore-BhQ4j7f5.js} +1299 -1102
  2. package/dist/ChartCore-BhQ4j7f5.js.map +1 -0
  3. package/dist/SciPlot-GJvw7GJo.js +463 -0
  4. package/dist/SciPlot-GJvw7GJo.js.map +1 -0
  5. package/dist/axisFormat-SPX-CD5s.js +200 -0
  6. package/dist/axisFormat-SPX-CD5s.js.map +1 -0
  7. package/dist/core/InteractionManager.d.ts +1 -0
  8. package/dist/core/OverlayRenderer.d.ts +11 -0
  9. package/dist/core/chart/ChartCore.d.ts +5 -0
  10. package/dist/core/chart/ChartRenderLoop.d.ts +5 -0
  11. package/dist/core/chart/ChartRenderer.d.ts +5 -0
  12. package/dist/core/chart/positionLines.d.ts +12 -0
  13. package/dist/core/chart/types.d.ts +2 -0
  14. package/dist/core/format/axisFormat.d.ts +2 -1
  15. package/dist/core/indicator/addIndicator.d.ts +1 -1
  16. package/dist/core/indicator/indicatorPresets.d.ts +10 -2
  17. package/dist/core/time/TimeScale.d.ts +2 -2
  18. package/dist/core/time/applyTimeScale.d.ts +10 -0
  19. package/dist/createStackedChart-DJSmqerD.js +706 -0
  20. package/dist/createStackedChart-DJSmqerD.js.map +1 -0
  21. package/dist/{index-DjeWClO9.js → index-CWipqOLP.js} +2 -2
  22. package/dist/{index-DjeWClO9.js.map → index-CWipqOLP.js.map} +1 -1
  23. package/dist/{index.core-BtGFYMOu.js → index.core-fpZ1dYN0.js} +3 -3
  24. package/dist/{index.core-BtGFYMOu.js.map → index.core-fpZ1dYN0.js.map} +1 -1
  25. package/dist/index.d.ts +5 -0
  26. package/dist/mockDatafeed-Cdg5hKEo.js +511 -0
  27. package/dist/mockDatafeed-Cdg5hKEo.js.map +1 -0
  28. package/dist/plugins/drawing-tools/index.d.ts +14 -1
  29. package/dist/plugins/drawing-tools/measure.d.ts +21 -0
  30. package/dist/plugins/drawing-tools/snapToCandle.d.ts +21 -0
  31. package/dist/plugins/tools.js +1 -1
  32. package/dist/react.js +5 -5
  33. package/dist/trading/datafeed.d.ts +48 -0
  34. package/dist/trading/index.d.ts +29 -0
  35. package/dist/trading/mockDatafeed.d.ts +9 -0
  36. package/dist/trading/ohlcvGenerator.d.ts +25 -0
  37. package/dist/trading.d.ts +1 -0
  38. package/dist/trading.js +95 -0
  39. package/dist/trading.js.map +1 -0
  40. package/dist/types.d.ts +1 -1
  41. package/dist/velo-plot.full.js +833 -1054
  42. package/dist/velo-plot.full.js.map +1 -1
  43. package/dist/velo-plot.js +13 -13
  44. package/package.json +13 -1
  45. package/dist/ChartCore-DQ691eXH.js.map +0 -1
  46. package/dist/axisFormat-B7o_uIEA.js +0 -127
  47. package/dist/axisFormat-B7o_uIEA.js.map +0 -1
  48. package/dist/createStackedChart-BPooTQ9z.js +0 -1164
  49. package/dist/createStackedChart-BPooTQ9z.js.map +0 -1
@@ -1,59 +1,61 @@
1
- var ve = Object.defineProperty;
2
- var we = (n, e, t) => e in n ? ve(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var X = (n, e, t) => we(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { D as ee, L as O, s as te, O as Pe } from "./ChartCore-DQ691eXH.js";
5
- import { A as Et, C as Lt, h as Rt, B as Yt, x as Xt, E as Bt, u as _t, n as zt, v as Wt, N as Gt, a3 as Ut, F as $t, S as Ot, R as Ht, a as Nt, X as qt, _ as Vt, d as Kt, b as jt, I as Jt, $ as Qt, a0 as Zt, c as en, Z as tn, N as nn, a2 as on, o as rn, y as an, H as sn, J as ln, Y as cn, a1 as dn, f as un, V as fn, G as hn, k as gn, j as pn, z as mn, p as yn, W as xn, i as vn, m as wn, t as Pn, q as Sn, l as Tn, T as bn, U as An, K as Mn, P as Fn, Q as Cn, w as In } from "./ChartCore-DQ691eXH.js";
6
- import { E as kn } from "./axisFormat-B7o_uIEA.js";
7
- import { AnnotationManager as Ln, PluginAnnotations as Rn } from "./plugins/annotations.js";
8
- import { d as z } from "./index.core-BtGFYMOu.js";
9
- import { e as Xn, h as Bn, f as _n, c as zn, a as Wn, g as Gn, b as Un, l as $n, r as On, v as Hn } from "./index.core-BtGFYMOu.js";
10
- import { G as qn, S as Vn, a as Kn, W as jn, c as Jn, p as Qn } from "./gpuRenderer-BpaMYz-k.js";
11
- import { P as eo, a as to, T as no, g as oo } from "./index-DjeWClO9.js";
12
- import { P as ao, c as io, e as so, d as lo, g as co, a as uo, l as fo, m as ho, b as go, o as po, s as mo, u as yo } from "./index-D7dTq6VB.js";
13
- import { W as vo, n as wo } from "./pool-15HMCNv8.js";
14
- import { PluginAnalysis as So, analyzeComplexSpectrum as To, analyzeSpectrum as bo, arraysToComplex as Ao, autoCorrelation as Mo, bandPassFilter as Fo, bandStopFilter as Co, blackmanWindow as Io, butterworth as Do, complexToArrays as ko, crossCorrelation as Eo, detectAnomalies as Lo, dominantFrequency as Ro, exponentialMovingAverage as Yo, fft as Xo, fftFromComplexInput as Bo, gaussianSmooth as _o, getPositiveFrequencies as zo, hammingWindow as Wo, hanningWindow as Go, highPassFilter as Uo, ifft as $o, ifftComplex as Oo, ifftFromArrays as Ho, lowPassFilter as No, medianFilter as qo, nextPowerOf2 as Vo, powerSpectrum as Ko, savitzkyGolay as jo, simpsonsIntegration as Jo, singleFrequencyFilter as Qo, tTest as Zo, trapezoidalIntegration as er } from "./plugins/analysis.js";
15
- import { B as nr, C as or, P as rr, a as ar, e as ir, g as sr, b as lr, d as cr, f as dr, c as ur } from "./index-BMiZoKmm.js";
16
- import { b as hr, a as gr, S as pr, c as mr, u as yr } from "./createStackedChart-BPooTQ9z.js";
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 { BaseBufferStore as vr, BaseTextureStore as wr, GpuBenchmark as Pr, GpuCompute as Sr, PipelineCache as Tr, PluginGpu as br } from "./plugins/gpu.js";
19
- import { b as Mr, L as Fr, a as Cr, c as Ir, f as Dr, d as kr, e as Er, i as Lr, g as Rr, h as Yr, r as Xr, s as Br } from "./index-x4stH3jD.js";
20
- import { D as zr, K as Wr, P as Gr, c as Ur, p as $r } from "./index-DoYxf1cV.js";
21
- import { ClipboardManager as Hr, PluginClipboard as Nr, copyToClipboard as qr, formatData as Vr, getClipboardManager as Kr } from "./plugins/clipboard.js";
22
- import { DebugOverlay as Jr, PluginDebug as Qr, createDebugOverlay as Zr, enableDebugMode as ea } from "./plugins/debug.js";
23
- import { L as na, P as oa, c as ra, s as aa, a as ia } from "./index-qhscKTDy.js";
24
- import { C as la, c as ca, a as da, l as ua } from "./index-CUGS98p4.js";
25
- import { P as ha, b as ga, T as pa, c as ma, a as ya, g as xa } from "./index-Dag88bW4.js";
26
- import { c as wa, a as Pa, b as Sa, d as Ta, h as ba, e as Aa, f as Ma, g as Fa, i as Ca, m as Ia, s as Da, v as ka } from "./utils-BK5UUXxj.js";
27
- import { a as La, c as Ra, d as Ya, i as Xa, s as Ba } from "./math-Ddm2EZjj.js";
28
- import { i as za, j as Wa, g as Ga, f as Ua, k as $a, d as Oa, e as Ha, m as Na, c as qa, n as Va, o as Ka, p as ja, b as Ja, r as Qa, s as Za, h as ei, a as ti, t as ni, v as oi, w as ri } from "./indicators--eJGmVox.js";
29
- import { Plugin3D as ii } from "./plugins/3d.js";
30
- import { PluginI18n as li } from "./plugins/i18n.js";
31
- import { PluginSync as di } from "./plugins/sync.js";
32
- import { PluginDataExport as fi } from "./plugins/data-export.js";
33
- import { PluginContextMenu as gi } from "./plugins/context-menu.js";
34
- import { PluginAnomalyDetection as mi } from "./plugins/anomaly-detection.js";
35
- import { PluginMLIntegration as xi } from "./plugins/ml-integration.js";
36
- import { PluginPatternRecognition as wi } from "./plugins/pattern-recognition.js";
37
- import { PluginRegression as Si } from "./plugins/regression.js";
38
- import { PluginRadar as bi } from "./plugins/radar.js";
39
- import { PluginSnapshot as Mi } from "./plugins/snapshot.js";
40
- import { PluginDataTransform as Ci } from "./plugins/data-transform.js";
41
- import { PluginLaTeX as Di } from "./plugins/latex.js";
42
- import { PluginCaching as Ei } from "./plugins/caching.js";
43
- import { PluginLazyLoad as Ri } from "./plugins/lazy-load.js";
44
- import { PluginBrokenAxis as Xi } from "./plugins/broken-axis.js";
45
- import { PluginVideoRecorder as _i } from "./plugins/video-recorder.js";
46
- import { PluginOffscreen as Wi } from "./plugins/offscreen.js";
47
- import { PluginROI as Ui } from "./plugins/roi.js";
48
- import { PluginForecasting as Oi } from "./plugins/forecasting.js";
49
- class re {
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
- X(this, "available");
52
- X(this, "canvas");
53
- X(this, "adapter");
54
- X(this, "device");
55
- X(this, "context");
56
- this.canvas = e, this.available = re.isSupported();
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 r = this.canvas.getContext("webgpu");
71
- if (!r)
72
+ const o = this.canvas.getContext("webgpu");
73
+ if (!o)
72
74
  throw new Error("[SciPlot] Failed to get WebGPU context");
73
- this.context = r;
74
- const a = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
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: a,
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 Se = {
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
- }, Te = z(
92
- Se,
93
+ }, Se = G(
94
+ we,
93
95
  (n = {}) => {
94
96
  const {
95
97
  showVertical: e = !0,
96
98
  showHorizontal: t = !0,
97
- color: r,
98
- lineStyle: a = "dashed",
99
- lineWidth: o = 1,
100
- snapToData: l = !1,
101
- valueFormat: d = { xPrecision: 4, yPrecision: 4 }
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 c = -1, f = -1, w, v = null, p = null;
108
+ let u = -1, h = -1, S, v = null, p = null;
107
109
  return {
108
- onInit(h) {
109
- w = "crosshair-overlay";
110
- const u = h.ui.createOverlay(w, {
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%;", u.appendChild(v), p = v.getContext("2d"), S(h);
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(h) {
117
- h.ui.removeOverlay(w), v = null, p = null;
118
+ onDestroy(f) {
119
+ f.ui.removeOverlay(S), v = null, p = null;
118
120
  },
119
- onResize(h) {
120
- S(h);
121
+ onResize(f) {
122
+ w(f);
121
123
  },
122
- onInteraction(h, u) {
123
- if (u.type === "mousemove") {
124
- if (c = u.pixelX, f = u.pixelY, l && u.inPlotArea) {
125
- const P = h.coords.pickPoint(c, f);
126
- P && (c = P.pixelX, f = P.pixelY);
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(h);
130
+ b(f);
129
131
  }
130
132
  },
131
133
  onViewChange() {
132
134
  }
133
135
  };
134
- function S(h) {
136
+ function w(f) {
135
137
  if (!v || !p) return;
136
- const u = h.render.canvasSize, P = h.render.pixelRatio;
137
- v.width = u.width * P, v.height = u.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
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(h) {
140
- var F;
141
+ function b(f) {
142
+ var C;
141
143
  if (!p || !v) return;
142
- const { width: u, height: P } = h.render.canvasSize;
143
- if (p.clearRect(0, 0, u, P), c < 0 || f < 0) return;
144
- const x = h.render.plotArea;
145
- if (c < x.x || c > x.x + x.width || f < x.y || f > x.y + x.height)
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 I = r || ((F = h.ui.theme.cursor) == null ? void 0 : F.color) || "#888888";
148
- p.save(), p.strokeStyle = I, p.lineWidth = o, a === "dashed" ? p.setLineDash([6, 4]) : a === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(c, x.y), p.lineTo(c, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, f), p.lineTo(x.x + x.width, f), p.stroke()), p.restore(), i === "floating" ? g(h, p, c, f, I) : i === "corner" && y(h, p, c, f, I);
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(h, u, P, x, I) {
151
- const F = h.coords.pixelToDataX(P), B = h.coords.pixelToDataY(x), M = h.render.plotArea;
152
- u.save(), u.font = "11px system-ui, sans-serif", u.textAlign = "center", u.textBaseline = "top";
153
- const _ = F.toPrecision(d.xPrecision), A = u.measureText(_).width + 8, T = 18, k = P - A / 2, C = M.y + M.height + 2;
154
- u.fillStyle = I, u.fillRect(k, C, A, T), u.fillStyle = "#ffffff", u.fillText(_, P, C + 3), u.textAlign = "right", u.textBaseline = "middle";
155
- const L = B.toPrecision(d.yPrecision), Y = u.measureText(L).width + 8, E = 18, R = M.x - Y - 2, U = x - E / 2;
156
- u.fillStyle = I, u.fillRect(R, U, Y, E), u.fillStyle = "#ffffff", u.fillText(L, M.x - 6, x), u.restore();
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(h, u, P, x, I) {
159
- const F = h.coords.pixelToDataX(P), B = h.coords.pixelToDataY(x), M = h.render.plotArea;
160
- u.save(), u.font = "11px system-ui, sans-serif";
161
- const _ = `X: ${F.toPrecision(d.xPrecision)}`, m = `Y: ${B.toPrecision(d.yPrecision)}`, A = u.measureText(_), T = u.measureText(m), k = Math.max(A.width, T.width), C = 6, L = 16, D = k + C * 2, Y = L * 2 + C * 2;
162
- let E, R;
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
- E = M.x + 8, R = M.y + 8;
167
+ L = M.x + 8, R = M.y + 8;
166
168
  break;
167
169
  case "top-right":
168
- E = M.x + M.width - D - 8, R = M.y + 8;
170
+ L = M.x + M.width - E - 8, R = M.y + 8;
169
171
  break;
170
172
  case "bottom-left":
171
- E = M.x + 8, R = M.y + M.height - Y - 8;
173
+ L = M.x + 8, R = M.y + M.height - X - 8;
172
174
  break;
173
175
  case "bottom-right":
174
- E = M.x + M.width - D - 8, R = M.y + M.height - Y - 8;
176
+ L = M.x + M.width - E - 8, R = M.y + M.height - X - 8;
175
177
  break;
176
178
  default:
177
- E = M.x + 8, R = M.y + 8;
179
+ L = M.x + 8, R = M.y + 8;
178
180
  }
179
- u.fillStyle = I, u.globalAlpha = 0.85, u.fillRect(E, R, D, Y), u.globalAlpha = 1, u.strokeStyle = "rgba(255,255,255,0.3)", u.lineWidth = 1, u.strokeRect(E, R, D, Y), u.fillStyle = "#ffffff", u.textAlign = "left", u.textBaseline = "top", u.fillText(_, E + C, R + C), u.fillText(m, E + C, R + C + L), u.restore();
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
- ), be = {
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
- }, Ae = z(
189
- be,
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: r,
195
- autoUpdate: a = !0
196
+ seriesId: o,
197
+ autoUpdate: r = !0
196
198
  } = n;
197
- let o, l = null;
199
+ let a, d = null;
198
200
  return {
199
201
  onInit(s) {
200
- o = "stats-overlay";
201
- const c = {};
202
- e.includes("top") && (c.top = "10px"), e.includes("bottom") && (c.bottom = "10px"), e.includes("left") && (c.left = "10px"), e.includes("right") && (c.right = "10px"), l = s.ui.createOverlay(o, {
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: c,
206
+ position: u,
205
207
  pointerEvents: !1
206
- }), l.innerHTML = `
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
- `, d(s);
222
+ `, c(s);
221
223
  },
222
224
  onDestroy(s) {
223
- s.ui.removeOverlay(o), l = null;
225
+ s.ui.removeOverlay(a), d = null;
224
226
  },
225
227
  onDataUpdate(s) {
226
- a && d(s);
228
+ r && c(s);
227
229
  },
228
230
  onSeriesAdd(s) {
229
- d(s);
231
+ c(s);
230
232
  },
231
233
  onSeriesRemove(s) {
232
- d(s);
234
+ c(s);
233
235
  },
234
236
  api: {
235
237
  refresh(s) {
236
- d(s);
238
+ c(s);
237
239
  }
238
240
  }
239
241
  };
240
- function d(s) {
241
- if (!l) return;
242
- const c = l.querySelector(".stats-content");
243
- if (!c) return;
244
- const f = s.data.getAllSeries(), w = r ? f.filter((b) => b.getId() === r) : f;
245
- if (w.length === 0) {
246
- c.innerHTML = "<div style='color: #888'>No data</div>";
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 (w.forEach((b) => {
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
- c.innerHTML = "<div style='color: #888'>No data</div>";
256
+ u.innerHTML = "<div style='color: #888'>No data</div>";
255
257
  return;
256
258
  }
257
- const p = i(v), S = [];
258
- t.includes("count") && S.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && S.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && S.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && S.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && S.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && S.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), c.innerHTML = S.join("");
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 c = s.length;
262
- let f = 0, w = 1 / 0, v = -1 / 0;
263
+ const u = s.length;
264
+ let h = 0, S = 1 / 0, v = -1 / 0;
263
265
  for (const g of s)
264
- f += g, g < w && (w = g), g > v && (v = g);
265
- const p = f / c;
266
- let S = 0;
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
- S += (g - p) ** 2;
269
- const b = Math.sqrt(S / c);
270
+ w += (g - p) ** 2;
271
+ const b = Math.sqrt(w / u);
270
272
  return {
271
- count: c,
273
+ count: u,
272
274
  mean: p,
273
- min: w,
275
+ min: S,
274
276
  max: v,
275
277
  std: b,
276
- range: v - w
278
+ range: v - S
277
279
  };
278
280
  }
279
281
  }
280
- ), Me = {
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
- }, Fe = z(
287
- Me,
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: r = "system-ui, sans-serif",
295
- color: a = "rgba(128, 128, 128, 0.15)",
296
- position: o = "center",
297
- rotation: l = o === "center" ? -30 : 0
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(d) {
301
- const i = d.render.ctx2d;
302
+ onRenderOverlay(c) {
303
+ const i = c.render.ctx2d;
302
304
  if (!i) return;
303
- d.render.canvasSize;
304
- const s = d.render.plotArea;
305
- i.save(), i.font = `${t}px ${r}`, i.fillStyle = a, i.textAlign = "center", i.textBaseline = "middle";
306
- let c, f;
307
- o === "center" ? (c = s.x + s.width / 2, f = s.y + s.height / 2) : o === "bottom-right" ? (c = s.x + s.width - t, f = s.y + s.height - t / 2) : (c = s.x + t, f = s.y + s.height - t / 2), i.translate(c, f), i.rotate(l * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
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
- }, Ie = z(
319
+ }, Fe = G(
318
320
  Ce,
319
321
  (n = {}) => {
320
- const { xIntervals: e = [], yIntervals: t = [], opacity: r = 0.1 } = n;
322
+ const { xIntervals: e = [], yIntervals: t = [], opacity: o = 0.1 } = n;
321
323
  return {
322
- onRenderOverlay(a, o) {
323
- const l = a.render.ctx2d;
324
- if (!l) return;
325
- const d = a.render.plotArea;
326
- a.data.getViewBounds(), l.save(), l.beginPath(), l.rect(d.x, d.y, d.width, d.height), l.clip(), l.globalAlpha = r;
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 = a.coords.dataToPixelX(i.start), c = a.coords.dataToPixelX(i.end);
329
- l.fillStyle = i.color, l.fillRect(
330
- Math.min(s, c),
331
- d.y,
332
- Math.abs(c - s),
333
- d.height
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 = a.coords.dataToPixelY(i.start), c = a.coords.dataToPixelY(i.end);
338
- l.fillStyle = i.color, l.fillRect(
339
- d.x,
340
- Math.min(s, c),
341
- d.width,
342
- Math.abs(c - s)
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
- l.restore();
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
- }, ke = z(
357
+ }, Ee = G(
356
358
  De,
357
359
  (n = {}) => {
358
360
  const {
359
361
  logDataUpdates: e = !0,
360
362
  logViewChanges: t = !0,
361
- logInteractions: r = !1,
362
- maxEntries: a = 100
363
- } = n, o = [];
364
- function l(d, i) {
365
- o.push({
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: d,
369
+ type: c,
368
370
  data: i
369
- }), o.length > a && o.shift();
371
+ }), a.length > r && a.shift();
370
372
  }
371
373
  return {
372
- onInit(d) {
373
- d.log.info("Data logger initialized");
374
+ onInit(c) {
375
+ c.log.info("Data logger initialized");
374
376
  },
375
- onDataUpdate(d, i) {
376
- e && (l("dataUpdate", {
377
+ onDataUpdate(c, i) {
378
+ e && (d("dataUpdate", {
377
379
  seriesId: i.seriesId,
378
380
  mode: i.mode,
379
381
  pointCount: i.pointCount
380
- }), d.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
382
+ }), c.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
381
383
  },
382
- onViewChange(d, i) {
383
- t && (l("viewChange", {
384
+ onViewChange(c, i) {
385
+ t && (d("viewChange", {
384
386
  trigger: i.trigger,
385
387
  bounds: i.current
386
- }), d.log.debug(`View change: ${i.trigger}`));
388
+ }), c.log.debug(`View change: ${i.trigger}`));
387
389
  },
388
- onInteraction(d, i) {
389
- r && l("interaction", {
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(d) {
397
- return { entries: o };
398
+ onSerialize(c) {
399
+ return { entries: a };
398
400
  },
399
- onDeserialize(d, i) {
401
+ onDeserialize(c, i) {
400
402
  const s = i;
401
- s != null && s.entries && (o.length = 0, o.push(...s.entries));
403
+ s != null && s.entries && (a.length = 0, a.push(...s.entries));
402
404
  },
403
405
  api: {
404
406
  getEntries() {
405
- return [...o];
407
+ return [...a];
406
408
  },
407
409
  clear() {
408
- o.length = 0;
410
+ a.length = 0;
409
411
  },
410
412
  export() {
411
- return JSON.stringify(o, null, 2);
413
+ return JSON.stringify(a, null, 2);
412
414
  }
413
415
  }
414
416
  };
415
417
  }
416
- ), Ee = {
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 = z(
423
- Ee,
424
+ }, Le = G(
425
+ Ie,
424
426
  (n = {}) => {
425
427
  const {
426
428
  seriesId: e,
427
429
  sampleSize: t = 20,
428
- color: r,
429
- size: a = 40,
430
- minVelocity: o = 0.01,
431
- historySize: l = 20,
432
- idleTimeout: d
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, c = null, f = null, w = null;
435
- const v = [], p = [], S = [];
436
- let b = l, g = null, y = Date.now(), h = -1 / 0, u = -1 / 0, P = d;
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), c = s.getContext("2d"), x(m), e)
446
- w = e;
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 && (w = T[0].getId());
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, c = null, f = 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 (I(m), M(m), P) {
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 (; S.length > b; ) S.shift();
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 || !c) return;
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, c.setTransform(1, 0, 0, 1, 0, 0), c.scale(T, 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 I(m) {
482
- if (!w || !m.data.getSeries(w)) return;
483
- const T = m.data.getSeriesData(w);
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 k = T.x.length;
486
- if (k < 2) return;
487
- const C = T.x[k - 1], L = T.y[k - 1];
488
- (C !== h || L !== u) && (h = C, u = L, y = Date.now());
489
- const D = Math.min(t, k), Y = k - D;
490
- let E = 0, R = 0, U = 0, K = 0, j = 0, J = 0;
491
- for (let W = Y; W < k; W++) {
492
- const G = W - Y, ye = T.x[W], xe = T.y[W], Q = m.coords.dataToPixelX(ye), Z = m.coords.dataToPixelY(xe);
493
- E += G, R += Q, U += Z, K += G * Q, j += G * Z, J += G * G;
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 $ = E / D, le = R / D, ce = U / D, H = J - D * $ * $;
497
+ const $ = L / E, se = R / E, le = U / E, H = J - E * $ * $;
496
498
  if (Math.abs(H) < 1e-10) return;
497
- const N = (K - D * $ * le) / H, q = (j - D * $ * ce) / H, de = Math.atan2(q, N), ue = m.coords.dataToPixelX(C), fe = m.coords.dataToPixelY(L);
498
- v.push(ue), p.push(fe), v.length > b && (v.shift(), p.shift()), S.push(de), S.length > b && S.shift();
499
- const he = F(v), ge = F(p), pe = B(S), me = Math.sqrt(N * N + q * q);
500
- f = { angle: pe, magnitude: me, lastX: C, lastY: L, smoothX: he, smoothY: ge };
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 F(m) {
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 k of m)
509
- A += Math.cos(k), T += Math.sin(k);
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 (!c || !s || !f) return;
515
+ if (!u || !s || !h) return;
514
516
  const { width: A, height: T } = m.render.canvasSize;
515
- if (c.clearRect(0, 0, A, T), P !== void 0 && Date.now() - y > P || f.magnitude < o) return;
516
- const k = f.smoothX, C = f.smoothY, L = r || "#FF9800";
517
- c.save(), _(c, k, C, f.angle, a, L), c.restore();
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, k, C, L) {
520
- const D = C * 0.6, Y = C * 0.4;
521
- m.save(), m.translate(A, T), m.rotate(k), m.fillStyle = L, m.beginPath(), m.moveTo(D / 2, 0), m.lineTo(-D / 2, -Y / 2), m.lineTo(-D / 2, Y / 2), m.closePath(), m.fill(), m.restore();
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
- ), it = {
525
- Crosshair: Te,
526
- Statistics: Ae,
527
- Watermark: Fe,
528
- GridHighlight: Ie,
529
- DataLogger: ke,
526
+ ), tt = {
527
+ Crosshair: Se,
528
+ Statistics: be,
529
+ Watermark: Me,
530
+ GridHighlight: Fe,
531
+ DataLogger: Ee,
530
532
  DirectionIndicator: Le
531
- }, Re = {
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
- }, Ye = {
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 st(n = {}) {
563
- const e = { ...Ye, ...n };
564
- let t = null, r = !1, a = null, o = 0, l = 0, d = !1;
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 h = t.coords.pickPoint(g, y, e.hitRadius);
568
- return !h || e.editableSeries.length > 0 && !e.editableSeries.includes(h.seriesId) ? null : {
569
- seriesId: h.seriesId,
570
- index: h.index,
571
- originalX: h.x,
572
- originalY: h.y,
573
- currentX: h.x,
574
- currentY: h.y
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 c(g, y) {
585
+ function u(g, y) {
584
586
  return Math.round(g / y) * y;
585
587
  }
586
- function f(g, y, h) {
587
- if (!a) return { x: g, y };
588
- switch (h) {
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: a.originalY };
592
+ return { x: g, y: r.originalY };
591
593
  case "y":
592
- return { x: a.originalX, y };
594
+ return { x: r.originalX, y };
593
595
  case "none":
594
- return { x: a.originalX, y: a.originalY };
596
+ return { x: r.originalX, y: r.originalY };
595
597
  default:
596
598
  return { x: g, y };
597
599
  }
598
600
  }
599
- function w(g, y) {
600
- let h = g, u = y;
601
- if (e.snapToGrid && (h = c(g, e.snapIntervalX), u = c(y, e.snapIntervalY)), a && e.validator) {
602
- const P = { ...a, currentX: h, currentY: u }, x = e.validator(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: h, y: u, valid: x };
606
+ return { x: f, y: l, valid: x };
605
607
  if (!x.valid)
606
- return { x: h, y: u, valid: !1 };
607
- x.snapX !== void 0 && (h = x.snapX), x.snapY !== void 0 && (u = x.snapY);
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: h, y: u, valid: !0 };
611
+ return { x: f, y: l, valid: !0 };
610
612
  }
611
- function v(g, y, h, u) {
612
- var I, F, B;
613
+ function v(g, y, f, l) {
614
+ var D, C, B;
613
615
  if (!t) return;
614
- const P = (F = (I = t.chart).getSeries) == null ? void 0 : F.call(I, g);
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] = h, x.y[y] = u, (B = P.invalidateBuffers) == null || B.call(P), t.requestRender());
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 a ? {
621
- seriesId: a.seriesId,
622
- index: a.index,
623
- oldX: a.originalX,
624
- oldY: a.originalY,
625
- newX: a.currentX,
626
- newY: a.currentY,
627
- deltaX: a.currentX - a.originalX,
628
- deltaY: a.currentY - a.originalY
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 S(g) {
632
- if (!r || !a || !e.showPreview) return;
633
- const { render: y, coords: h } = g, { ctx2d: u } = y;
634
- if (!u) return;
635
- u.save();
636
- const P = h.dataToPixelX(a.originalX), x = h.dataToPixelY(a.originalY), I = h.dataToPixelX(a.currentX), F = h.dataToPixelY(a.currentY);
637
- u.strokeStyle = e.previewStyle.color || "#ffffff", u.lineWidth = e.previewStyle.width || 2, u.globalAlpha = e.previewStyle.opacity || 0.5, u.setLineDash(e.previewStyle.dash || [5, 5]), u.beginPath(), u.moveTo(P, x), u.lineTo(I, F), u.stroke(), u.globalAlpha = 1, u.fillStyle = e.highlightColor, u.setLineDash([]), u.beginPath(), u.arc(I, F, 6, 0, Math.PI * 2), u.fill(), u.strokeStyle = "#000000", u.lineWidth = 1, u.stroke(), u.restore();
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, r && (a = null, r = !1, d = !1, t == null || t.requestRender());
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 a;
655
+ return r;
654
656
  },
655
657
  cancelDrag() {
656
- r && a && (a = null, r = !1, d = !1, t == null || t.requestRender());
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: Re,
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 h = i(y.pixelX, y.pixelY);
674
- h && (a = h, o = y.pixelX, l = y.pixelY, d = !1, r = !1, y.preventDefault());
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 (!a) return;
677
- if (!r) {
678
- const F = y.pixelX - o, B = y.pixelY - l;
679
- if (Math.sqrt(F * F + B * B) > e.dragThreshold) {
680
- r = !0, d = !0;
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
- r && y.preventDefault();
687
- let { x: h, y: u } = s(y.pixelX, y.pixelY);
688
- ({ x: h, y: u } = f(h, u, e.constraint));
689
- const { x: P, y: x, valid: I } = w(h, u);
690
- if (I) {
691
- a.currentX = P, a.currentY = x;
692
- const F = p();
693
- F && e.onDrag(F), t == null || t.requestRender();
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 (!a) return;
697
- if (r && d) {
698
+ if (!r) return;
699
+ if (o && c) {
698
700
  v(
699
- a.seriesId,
700
- a.index,
701
- a.currentX,
702
- a.currentY
701
+ r.seriesId,
702
+ r.index,
703
+ r.currentX,
704
+ r.currentY
703
705
  );
704
- const h = p();
705
- h && e.onDragEnd(h), y.preventDefault();
706
+ const f = p();
707
+ f && e.onDragEnd(f), y.preventDefault();
706
708
  }
707
- a = null, r = !1, d = !1, t == null || t.requestRender();
709
+ r = null, o = !1, c = !1, t == null || t.requestRender();
708
710
  }
709
711
  }
710
712
  },
711
713
  onRenderOverlay(g) {
712
- S(g);
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
- `, ze = `
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 r = n.createShader(e);
915
- if (!r) throw new Error("createShader failed");
916
- if (n.shaderSource(r, t), n.compileShader(r), !n.getShaderParameter(r, n.COMPILE_STATUS))
917
- throw new Error(n.getShaderInfoLog(r) ?? "shader compile failed");
918
- return r;
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 We(n) {
921
- const e = ne(n, n.VERTEX_SHADER, _e), t = ne(n, n.FRAGMENT_SHADER, ze), r = n.createProgram();
922
- if (!r) throw new Error("createProgram failed");
923
- if (n.attachShader(r, e), n.attachShader(r, t), n.linkProgram(r), !n.getProgramParameter(r, n.LINK_STATUS))
924
- throw new Error(n.getProgramInfoLog(r) ?? "program link failed");
925
- return n.deleteShader(e), n.deleteShader(t), r;
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 Ge(n) {
928
- const { plotArea: e, xLines: t, yLines: r } = n, a = e.y, o = e.y + e.height, l = e.x, d = e.x + e.width, i = (t.length + r.length) * 2, s = new Float32Array(i * 2);
929
- let c = 0;
930
- for (const f of t)
931
- s[c++] = f, s[c++] = a, s[c++] = f, s[c++] = o;
932
- for (const f of r)
933
- s[c++] = l, s[c++] = f, s[c++] = d, s[c++] = f;
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 Ue {
756
+ class Ge {
937
757
  constructor(e) {
938
- X(this, "gl");
939
- X(this, "program");
940
- X(this, "buffer");
941
- X(this, "aPosition");
942
- X(this, "uResolution");
943
- X(this, "uColor");
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 = We(t), this.aPosition = t.getAttribLocation(this.program, "aPosition"), this.uResolution = t.getUniformLocation(this.program, "uResolution"), this.uColor = t.getUniformLocation(this.program, "uColor");
951
- const r = t.createBuffer();
952
- if (!r) throw new Error("createBuffer failed");
953
- this.buffer = r;
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, r = Ge(e), a = r.length / 4;
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, r, 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);
959
- const o = e.color ?? [0.2, 0.22, 0.3, 0.6];
960
- return t.uniform4f(this.uColor, o[0], o[1], o[2], o[3]), t.lineWidth(e.lineWidth ?? 1), t.drawArrays(t.LINES, 0, r.length / 2), a;
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 $e(n) {
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 Oe(n, e) {
814
+ function ze(n, e) {
995
815
  const t = document.createElement("canvas");
996
- return t.width = n, t.height = e, t.getContext("2d") ?? $e(t);
816
+ return t.width = n, t.height = e, t.getContext("2d") ?? We(t);
997
817
  }
998
- function ae(n, e) {
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 ie(n, e, t, r, a) {
1008
- const o = e.ticks(r).map((d) => te(e.transform(d))), l = t.ticks(a).map((d) => te(t.transform(d)));
1009
- return { xLines: o, yLines: l };
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 se(n, e) {
831
+ function ie(n, e) {
1012
832
  const t = [];
1013
- for (let o = 0; o < e; o++) {
1014
- const l = performance.now();
1015
- n(), t.push((performance.now() - l) * 1e3);
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((o, l) => o - l);
1018
- const r = t.reduce((o, l) => o + l, 0) / t.length, a = t[Math.floor(t.length * 0.95)] ?? r;
1019
- return { avg: r, p95: a };
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 He(n = {}) {
1022
- const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), r = n.xTickCount ?? 24, a = n.yTickCount ?? 16, o = n.frames ?? 120, l = Oe(e, t), d = {
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 = ae(e, t), s = new O(), c = new O();
1030
- s.setDomain(0, 1e6), c.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), c.setRange(i.y + i.height, i.y);
1031
- const f = new Pe(l, d), { avg: w, p95: v } = se(() => {
1032
- l.clearRect(0, 0, e, t), f.drawGrid(i, s, c, { tickCount: r }, { tickCount: a });
1033
- }, o), { xLines: p, yLines: S } = ie(i, s, c, r, a);
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: r,
1040
- yTicks: a,
1041
- lineSegments: p.length + S.length,
1042
- avgFrameUs: Math.round(w),
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: o
864
+ frames: a
1045
865
  };
1046
866
  }
1047
- function Ne(n = {}) {
1048
- const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), r = n.xTickCount ?? 24, a = n.yTickCount ?? 16, o = n.frames ?? 120, l = document.createElement("canvas");
1049
- l.width = e, l.height = t;
1050
- let d;
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
- d = new Ue(l);
872
+ c = new Ge(d);
1053
873
  } catch {
1054
874
  return null;
1055
875
  }
1056
- const i = ae(e, t), s = new O(), c = new O();
1057
- s.setDomain(0, 1e6), c.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), c.setRange(i.y + i.height, i.y);
1058
- const { xLines: f, yLines: w } = ie(i, s, c, r, a), v = { plotArea: i, xLines: f, yLines: w, width: e, height: t };
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: S, p95: b } = se(() => {
1061
- p = d.draw(v);
1062
- }, o);
1063
- return d.destroy(), {
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: r,
1069
- yTicks: a,
888
+ xTicks: o,
889
+ yTicks: r,
1070
890
  lineSegments: p,
1071
- avgFrameUs: Math.round(S),
891
+ avgFrameUs: Math.round(w),
1072
892
  p95FrameUs: Math.round(b),
1073
- frames: o
893
+ frames: a
1074
894
  };
1075
895
  }
1076
- function dt(n) {
1077
- const e = (n == null ? void 0 : n.dpr) ?? 2, t = (n == null ? void 0 : n.frames) ?? 120, r = He({ dpr: e, frames: t, showMinor: !0 }), a = Ne({ dpr: e, frames: t });
1078
- if (!a)
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: r,
900
+ canvas2d: o,
1081
901
  webgl: null,
1082
902
  gainPercent: 0,
1083
903
  recommendation: "defer"
1084
904
  };
1085
- const o = (r.avgFrameUs - a.avgFrameUs) / r.avgFrameUs * 100;
905
+ const a = (o.avgFrameUs - r.avgFrameUs) / o.avgFrameUs * 100;
1086
906
  return {
1087
- canvas2d: r,
1088
- webgl: a,
1089
- gainPercent: Math.round(o * 10) / 10,
1090
- recommendation: o >= 20 ? "implement" : "defer"
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 qe = "1.17.0", Ve = "2026-07-05", Ke = "Stage 1 baselines. Headless CI uses effective FPS (render throughput when rAF throttled) via scripts/benchmark-scenario-eval.mjs smoke floors.", je = 0.1, Je = 0.95, Qe = {
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: qe,
1135
- recordedAt: Ve,
1136
- notes: Ke,
1137
- regressionThreshold: je,
1138
- webgpuMinFpsRatio: Je,
1139
- scenarios: Qe
954
+ version: Oe,
955
+ recordedAt: He,
956
+ notes: qe,
957
+ regressionThreshold: Ne,
958
+ webgpuMinFpsRatio: Ve,
959
+ scenarios: Ke
1140
960
  };
1141
- function ut() {
961
+ function ot() {
1142
962
  return V;
1143
963
  }
1144
- function ft(n, e) {
964
+ function rt(n, e) {
1145
965
  const t = V.scenarios[n];
1146
966
  if (!t)
1147
967
  return { passed: !0, failures: [] };
1148
- const r = [], a = V.regressionThreshold ?? 0.1;
968
+ const o = [], r = V.regressionThreshold ?? 0.1;
1149
969
  if ("avgFps" in e && t.minAvgFps !== void 0) {
1150
- const o = t.minAvgFps * (1 - a);
1151
- e.avgFps < o && r.push(
1152
- `FPS ${e.avgFps} < baseline min ${t.minAvgFps} (allowed ${o.toFixed(1)} with ${a * 100}% slack)`
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 o = t.maxAvgFrameTimeMs * (1 + a);
1157
- e.avgFrameTime > o && r.push(
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 o = t.maxAvgFrameUs * (1 + a);
1163
- e.avgFrameUs > o && r.push(
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: r.length === 0, failures: r };
987
+ return { passed: o.length === 0, failures: o };
1168
988
  }
1169
- function ht(n, e, t, r = 0.95) {
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 a = n.avgFps > 0 ? e.avgFps / n.avgFps : 0, o = a >= r;
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: a,
1185
- meetsTarget: o,
1186
- recommendation: o ? "webgpu-ready" : "webgl-faster"
1004
+ fpsRatio: r,
1005
+ meetsTarget: a,
1006
+ recommendation: a ? "webgpu-ready" : "webgl-faster"
1187
1007
  };
1188
1008
  }
1189
- class Ze {
1009
+ class je {
1190
1010
  constructor(e) {
1191
- X(this, "seed");
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 gt(n) {
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), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1214
- for (let o = 0; o < e.pointCount; o++) {
1215
- t[o] = e.xStart + o * a;
1216
- const l = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[o] + e.phase), d = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1217
- r[o] = l + d + e.offset;
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: r };
1039
+ return { x: t, y: o };
1220
1040
  }
1221
- function pt(n) {
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), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1233
- for (let o = 0; o < e.pointCount; o++) {
1234
- t[o] = e.xStart + o * a;
1235
- const l = t[o] * e.frequency + e.phase / (2 * Math.PI), d = Math.sign(Math.sin(2 * Math.PI * l)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1236
- r[o] = d + i + e.offset;
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: r };
1058
+ return { x: t, y: o };
1239
1059
  }
1240
- function mt(n) {
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), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1252
- for (let o = 0; o < e.pointCount; o++) {
1253
- t[o] = e.xStart + o * a;
1254
- const l = t[o] * e.frequency + e.phase / (2 * Math.PI), d = e.amplitude * 2 * (l - Math.floor(l + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1255
- r[o] = d + i + e.offset;
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: r };
1077
+ return { x: t, y: o };
1258
1078
  }
1259
- function yt(n) {
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), r = new Float32Array(e.pointCount), a = (e.xEnd - e.xStart) / (e.pointCount - 1);
1271
- for (let o = 0; o < e.pointCount; o++) {
1272
- t[o] = e.xStart + o * a;
1273
- const l = t[o] * e.frequency + e.phase / (2 * Math.PI), d = e.amplitude * 2 * Math.abs(2 * (l - Math.floor(l + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1274
- r[o] = d + i + e.offset;
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: r };
1096
+ return { x: t, y: o };
1277
1097
  }
1278
- function xt(n) {
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 Ze(e.seed), r = new Float32Array(e.pointCount), a = new Float32Array(e.pointCount);
1287
- for (let o = 0; o < e.pointCount; o++)
1288
- r[o] = t.nextRange(e.xRange[0], e.xRange[1]), a[o] = t.nextRange(e.yRange[0], e.yRange[1]);
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 o = Array.from({ length: e.pointCount }, (i, s) => s);
1291
- o.sort((i, s) => r[i] - r[s]);
1292
- const l = new Float32Array(e.pointCount), d = new Float32Array(e.pointCount);
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
- l[i] = r[o[i]], d[i] = a[o[i]];
1295
- return { x: l, y: d };
1114
+ d[i] = o[a[i]], c[i] = r[a[i]];
1115
+ return { x: d, y: c };
1296
1116
  }
1297
- return { x: r, y: a };
1117
+ return { x: o, y: r };
1298
1118
  }
1299
- function vt(n) {
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, r = new Float32Array(t), a = new Float32Array(t), o = e.pointCount, l = o / 2;
1310
- for (let d = 0; d < e.cycles; d++)
1311
- for (let i = 0; i < o; i++) {
1312
- const s = d * o + i;
1313
- i < l ? r[s] = e.vMin + (e.vMax - e.vMin) * (i / l) : r[s] = e.vMax - (e.vMax - e.vMin) * ((i - l) / l);
1314
- const c = r[s], f = 0, w = i < l ? 1 : -1, v = 0.1, p = -Math.pow(c - f, 2) / (2 * v * v), S = e.peakCurrent * Math.exp(p), b = w * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
1315
- a[s] = w * S + b + g;
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: r, y: a };
1137
+ return { x: o, y: r };
1318
1138
  }
1319
- function wt(n) {
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), r = new Float32Array(e.pointCount), a = Math.log10(e.frequency[1]), o = Math.log10(e.frequency[0]);
1329
- for (let l = 0; l < e.pointCount; l++) {
1330
- const d = o - (o - a) * (l / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, d), s = e.rCharge * 1e-5, c = e.rSolution + e.rCharge / (1 + Math.pow(i * s, 2)), f = i * s * e.rCharge / (1 + Math.pow(i * s, 2));
1331
- t[l] = c, r[l] = -f;
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: r };
1153
+ return { x: t, y: o };
1334
1154
  }
1335
- async function Pt(n, e) {
1155
+ async function pt(n, e) {
1336
1156
  const t = {
1337
1157
  duration: 5e3,
1338
1158
  warmup: 1e3,
1339
1159
  ...e
1340
- }, r = [], a = [];
1341
- let o = 0;
1342
- const l = n.getAllSeries().reduce((d, i) => d + i.getPointCount(), 0);
1343
- return new Promise((d) => {
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 c = !1, f = 0;
1346
- function w() {
1165
+ let u = !1, h = 0;
1166
+ function S() {
1347
1167
  const v = performance.now();
1348
1168
  if (v >= i) {
1349
- const b = a.length > 0 ? a.reduce((P, x) => P + x, 0) / a.length : 0, g = f > 0 ? v - f : t.duration, y = o > 0 && g > 0 ? o / g * 1e3 : 0, h = r.length > 0 ? r.reduce((P, x) => P + x, 0) / r.length : b > 0 ? 1e3 / b : 0, u = {
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((r.length > 0 ? Math.min(...r) : y) * 100) / 100,
1352
- maxFps: Math.round((r.length > 0 ? Math.max(...r) : y) * 100) / 100,
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: o,
1174
+ frameCount: a,
1355
1175
  duration: t.duration,
1356
- pointsRendered: l,
1357
- throughput: Math.round(l * y / 1e3) * 1e3,
1176
+ pointsRendered: d,
1177
+ throughput: Math.round(d * y / 1e3) * 1e3,
1358
1178
  /** @internal render-only FPS (not wall clock) */
1359
- ...h > 0 ? { renderFps: Math.round(h * 100) / 100 } : {}
1179
+ ...f > 0 ? { renderFps: Math.round(f * 100) / 100 } : {}
1360
1180
  };
1361
- d(u);
1181
+ c(l);
1362
1182
  return;
1363
1183
  }
1364
- v >= s && !c && (c = !0, f = v, o = 0, a.length = 0, r.length = 0);
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 S = performance.now();
1368
- if (c) {
1369
- const b = S - p;
1370
- a.push(b), o++;
1371
- const g = a.slice(-30);
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((h, u) => h + u, 0) / g.length;
1374
- y > 0 && r.push(1e3 / y);
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(w);
1197
+ requestAnimationFrame(S);
1378
1198
  }
1379
- requestAnimationFrame(w);
1199
+ requestAnimationFrame(S);
1380
1200
  });
1381
1201
  }
1382
- function St(n, e) {
1202
+ function ht(n, e) {
1383
1203
  const t = {
1384
1204
  format: "json",
1385
1205
  includeStyles: !0,
1386
1206
  ...e
1387
- }, r = n.getAllSeries().map((o) => ({
1388
- id: o.getId(),
1389
- type: o.getType(),
1390
- pointCount: o.getPointCount(),
1391
- ...t.includeStyles ? { style: o.getStyle() } : {}
1392
- })), a = {
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: r,
1215
+ series: o,
1396
1216
  bounds: n.getViewBounds()
1397
1217
  };
1398
- return t.format === "png" && n.exportImage && (a.image = n.exportImage()), a;
1218
+ return t.format === "png" && n.exportImage && (r.image = n.exportImage()), r;
1399
1219
  }
1400
- function Tt(n, e, t = 1e-6) {
1401
- const r = [];
1402
- n.series.length !== e.series.length && r.push(`Series count: ${n.series.length} vs ${e.series.length}`);
1403
- for (let o = 0; o < Math.min(n.series.length, e.series.length); o++) {
1404
- const l = n.series[o], d = e.series[o];
1405
- l.id !== d.id && r.push(`Series[${o}] id: "${l.id}" vs "${d.id}"`), l.type !== d.type && r.push(`Series[${o}] type: "${l.type}" vs "${d.type}"`), l.pointCount !== d.pointCount && r.push(`Series[${o}] pointCount: ${l.pointCount} vs ${d.pointCount}`);
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 a = ["xMin", "xMax", "yMin", "yMax"];
1408
- for (const o of a)
1409
- Math.abs(n.bounds[o] - e.bounds[o]) > t && r.push(`Bounds.${o}: ${n.bounds[o]} vs ${e.bounds[o]}`);
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: r.length === 0,
1412
- differences: r
1231
+ equal: o.length === 0,
1232
+ differences: o
1413
1233
  };
1414
1234
  }
1415
- function bt(n, e) {
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 At(n = 1) {
1242
+ function xt(n = 1) {
1423
1243
  return new Promise((e) => {
1424
1244
  let t = n;
1425
- function r() {
1426
- t--, t <= 0 ? e() : requestAnimationFrame(r);
1245
+ function o() {
1246
+ t--, t <= 0 ? e() : requestAnimationFrame(o);
1427
1247
  }
1428
- requestAnimationFrame(r);
1248
+ requestAnimationFrame(o);
1429
1249
  });
1430
1250
  }
1431
- function Mt(n) {
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
- Et as AnimationEngine,
1483
- Ln as AnnotationManager,
1484
- nr as BackpressureManager,
1485
- vr as BaseBufferStore,
1486
- wr as BaseTextureStore,
1487
- it as BuiltinPlugins,
1488
- la as ChartGroup,
1489
- Lt as ChartInitQueue,
1490
- or as CircularBuffer,
1491
- Hr as ClipboardManager,
1492
- Te as CrosshairPlugin,
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
- Rt as DEFAULT_ANIMATION_CONFIG,
1495
- zr as DEFAULT_KEY_BINDINGS,
1496
- Yt as DEFAULT_LAYOUT,
1497
- Xt as DEFAULT_THEME,
1498
- ke as DataLoggerPlugin,
1499
- Jr as DebugOverlay,
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
- Bt as ELECTROCHEM_THEME,
1502
- kn as EventEmitter,
1503
- Pr as GpuBenchmark,
1504
- Sr as GpuCompute,
1505
- qn as GpuRenderer,
1506
- Ie as GridHighlightPlugin,
1507
- Wr as KeyBindingManager,
1508
- _t as LIGHT_THEME,
1509
- Mr as LOCALE_DE_DE,
1510
- Fr as LOCALE_EN_US,
1511
- Cr as LOCALE_ES_ES,
1512
- Ir as LOCALE_FR_FR,
1513
- Dr as LOCALE_JA_JP,
1514
- kr as LOCALE_PT_BR,
1515
- Er as LOCALE_ZH_CN,
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
- na as LoadingIndicator,
1518
- zt as LogScale,
1519
- Wt as MIDNIGHT_THEME,
1520
- Gt as NativeWebGLRenderer,
1290
+ tr as LoadingIndicator,
1291
+ Dt as LogScale,
1292
+ Et as MIDNIGHT_THEME,
1293
+ It as NativeWebGLRenderer,
1521
1294
  Pe as OverlayRenderer,
1522
- Tr as PipelineCache,
1523
- ii as Plugin3D,
1524
- So as PluginAnalysis,
1525
- Rn as PluginAnnotations,
1526
- mi as PluginAnomalyDetection,
1527
- Xi as PluginBrokenAxis,
1528
- Ei as PluginCaching,
1529
- Nr as PluginClipboard,
1530
- gi as PluginContextMenu,
1531
- fi as PluginDataExport,
1532
- Ci as PluginDataTransform,
1533
- Qr as PluginDebug,
1534
- st as PluginDragEdit,
1535
- lt as PluginDrawingTools,
1536
- Oi as PluginForecasting,
1537
- br as PluginGpu,
1538
- li as PluginI18n,
1539
- Gr as PluginKeyboard,
1540
- Di as PluginLaTeX,
1541
- Ri as PluginLazyLoad,
1542
- oa as PluginLoading,
1543
- xi as PluginMLIntegration,
1544
- Ut as PluginManagerImpl,
1545
- Wi as PluginOffscreen,
1546
- wi as PluginPatternRecognition,
1547
- Ui as PluginROI,
1548
- bi as PluginRadar,
1549
- Si as PluginRegression,
1550
- ct as PluginReplay,
1551
- Mi as PluginSnapshot,
1552
- rr as PluginStreaming,
1553
- di as PluginSync,
1554
- ha as PluginThemeEditor,
1555
- eo as PluginTools,
1556
- _i as PluginVideoRecorder,
1557
- ao as PluginVirtualization,
1558
- $t as SERIALIZATION_VERSION,
1559
- hr as STACKED_DEFAULT_MIN_PANE_RATIO,
1560
- gr as STACKED_MAX_PANES,
1561
- pr as SciPlot,
1562
- Ot as Series,
1563
- Vn as SeriesAdapter,
1564
- Ht as StateHistory,
1565
- Ae as StatsPlugin,
1566
- ga as THEME_PRESETS,
1567
- to as TOOLTIP_THEMES,
1568
- pa as ThemeEditor,
1569
- no as TooltipManager,
1570
- Fe as WatermarkPlugin,
1571
- Kn as WebGLBackend,
1572
- jn as WebGPUBackend,
1573
- re as WebGPURenderer,
1574
- vo as WorkerPool,
1575
- Nt as addIndicatorToChart,
1576
- za as adx,
1577
- To as analyzeComplexSpectrum,
1578
- bo as analyzeSpectrum,
1579
- Wa as aroon,
1580
- Ao as arraysToComplex,
1581
- bt as assertPerformance,
1582
- Ga as atr,
1583
- Mo as autoCorrelation,
1584
- Fo as bandPassFilter,
1585
- Co as bandStopFilter,
1586
- He as benchmarkCanvasGrid,
1587
- Pt as benchmarkRender,
1588
- Ne as benchmarkWebGLGrid,
1589
- Io as blackmanWindow,
1590
- Ua as bollingerBands,
1591
- qt as bollingerBandsAsync,
1592
- Vt as buildIndicatorPane,
1593
- Kt as buildIndicatorPaneFromPreset,
1594
- jt as buildIndicatorSeries,
1595
- Ct as businessDaySpanMs,
1596
- Do as butterworth,
1597
- La as calculateR2,
1598
- wa as calculateStats,
1599
- io as calculateTargetPoints,
1600
- Xn as checkPluginCompatibility,
1601
- dt as compareGridBackends,
1602
- ft as compareScenarioToBaseline,
1603
- Tt as compareSnapshots,
1604
- ko as complexToArrays,
1605
- Jt as compressString,
1606
- It as computeHeikinAshi,
1607
- Qt as computeIndicatorFromSeries,
1608
- Zt as computeIndicatorPreset,
1609
- ar as connectStreamToChart,
1610
- qr as copyToClipboard,
1611
- ir as createBackpressureManager,
1612
- en as createChart,
1613
- ca as createChartGroup,
1614
- Bn as createConfigurablePlugin,
1615
- Zr as createDebugOverlay,
1616
- Jn as createGpuRenderer,
1617
- tn as createIndicatorSeries,
1618
- Ur as createKeyBinding,
1619
- ra as createLoadingIndicator,
1620
- Lr as createLocaleFormatter,
1621
- sr as createLosslessBackpressure,
1622
- da as createMasterSlave,
1623
- lr as createMessageParser,
1624
- cr as createMockStream,
1625
- nn as createNativeRenderer,
1626
- _n as createPlugin,
1627
- on as createPluginContext,
1628
- dr as createRealtimeBackpressure,
1629
- zn as createRenderer,
1630
- rn as createScale,
1631
- St as createSnapshot,
1632
- mr as createStackedChart,
1633
- an as createTheme,
1634
- ma as createThemeEditor,
1635
- ur as createWebSocketStream,
1636
- Eo as crossCorrelation,
1637
- $a as cumsum,
1638
- Ra as cumulativeIntegral,
1639
- sn as decodeFloat32Array,
1640
- ln as decompressString,
1641
- Wn as defineAndRegister,
1642
- z as definePlugin,
1643
- Oa as dema,
1644
- Ya as derivative,
1645
- so as destroyDownsamplePool,
1646
- cn as destroyIndicatorPool,
1647
- Lo as detectAnomalies,
1648
- Pa as detectCycles,
1649
- dn as detectIndicatorMarkers,
1650
- Sa as detectPeaks,
1651
- Ro as dominantFrequency,
1652
- lo as downsampleAsync,
1653
- Ta as downsampleLTTB,
1654
- un as easings,
1655
- Ha as ema,
1656
- fn as emaAsync,
1657
- ea as enableDebugMode,
1658
- hn as encodeFloat32Array,
1659
- ht as evaluateRendererCompare,
1660
- Yo as exponentialMovingAverage,
1661
- Xo as fft,
1662
- Bo as fftFromComplexInput,
1663
- Vr as formatData,
1664
- ba as formatScientific,
1665
- Aa as formatValue,
1666
- Ma as formatWithPrefix,
1667
- _o as gaussianSmooth,
1668
- vt as generateCVData,
1669
- Fa as generateCycleColors,
1670
- wt as generateNyquistData,
1671
- xt as generateRandomData,
1672
- mt as generateSawtoothWave,
1673
- gt as generateSineWave,
1674
- pt as generateSquareWave,
1675
- yt as generateTriangleWave,
1676
- ut as getBaseline,
1677
- Ca as getBestPrefix,
1678
- gn as getChartInitQueue,
1679
- Kr as getClipboardManager,
1680
- co as getDownsamplePoolSize,
1681
- Rr as getGlobalLocale,
1682
- Yr as getLocale,
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
- zo as getPositiveFrequencies,
1685
- ya as getPresetNames,
1686
- xa as getPresetTheme,
1687
- pn as getSharedAnimationEngine,
1688
- mn as getThemeByName,
1689
- oo as getTooltipThemeForChartTheme,
1690
- Wo as hammingWindow,
1691
- Go as hanningWindow,
1692
- Uo as highPassFilter,
1693
- $o as ifft,
1694
- Oo as ifftComplex,
1695
- Ho as ifftFromArrays,
1696
- Xa as integrate,
1697
- yn as interleaveData,
1698
- tt as isBusinessDay,
1699
- ua as linkCharts,
1700
- Un as listPluginsByCategory,
1701
- $n as loadPlugin,
1702
- No as lowPassFilter,
1703
- uo as lowerBoundX,
1704
- fo as lttbDownsample,
1705
- Na as macd,
1706
- xn as macdAsync,
1707
- Ft as mapToBusinessDayScale,
1708
- qo as medianFilter,
1709
- vn as mergeAnimationConfig,
1710
- wn as mergeLayoutOptions,
1711
- ho as minMaxDownsample,
1712
- qa as momentum,
1713
- Ia as movingAverage,
1714
- Vo as nextPowerOf2,
1715
- wo as nextTaskId,
1716
- Va as normalize,
1717
- Ka as obv,
1718
- go as ohlcDownsampleAsync,
1719
- po as ohlcMinMaxDownsample,
1720
- Pn as parseColor,
1721
- Qn as parseColorToRGBA,
1722
- $r as parseShortcut,
1723
- ja as percentChange,
1724
- Ko as powerSpectrum,
1725
- Sn as queueChartInit,
1726
- Xr as registerLocale,
1727
- On as registerPlugin,
1728
- Tn as resetChartQueue,
1729
- Ja as roc,
1730
- Qa as rsi,
1731
- bn as rsiAsync,
1732
- jo as savitzkyGolay,
1733
- Br as setGlobalLocale,
1734
- aa as showLoading,
1735
- ia as showProgress,
1736
- Jo as simpsonsIntegration,
1737
- Qo as singleFrequencyFilter,
1738
- mo as sliceSeriesToViewport,
1739
- Za as sma,
1740
- An as smaAsync,
1741
- Ba as solveLinearSystem,
1742
- ei as standardDeviation,
1743
- Mn as stateToUrlHash,
1744
- ti as stochastic,
1745
- Da as subtractBaseline,
1746
- Zo as tTest,
1747
- ni as tema,
1748
- er as trapezoidalIntegration,
1749
- yo as upperBoundX,
1750
- Fn as urlHashToState,
1751
- yr as useSciPlot,
1752
- Cn as validateChartState,
1753
- ka as validateData,
1754
- Hn as validateManifest,
1755
- oi as vwap,
1756
- Mt as waitFor,
1757
- In as waitForAnimations,
1758
- At as waitForFrames,
1759
- ri as wma
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