@tradecanvas/chart 1.50.0 → 1.51.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 (100) hide show
  1. package/README.md +1 -1
  2. package/dist/Chart.d.ts +20 -5
  3. package/dist/Chart.d.ts.map +1 -1
  4. package/dist/LayoutSession-DuV9kpdQ.cjs +2 -0
  5. package/dist/LayoutSession-DuV9kpdQ.cjs.map +1 -0
  6. package/dist/{LayoutSession-Dcvn5KMK.js → LayoutSession-Qkx1huV-.js} +304 -275
  7. package/dist/LayoutSession-Qkx1huV-.js.map +1 -0
  8. package/dist/finance/performanceData.d.ts +17 -2
  9. package/dist/finance/performanceData.d.ts.map +1 -1
  10. package/dist/i18n-Bg_UJSNs.cjs +2 -0
  11. package/dist/i18n-Bg_UJSNs.cjs.map +1 -0
  12. package/dist/{i18n-DjzoHpMJ.js → i18n-DFTQ73Cz.js} +15 -1
  13. package/dist/i18n-DFTQ73Cz.js.map +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.js +116 -115
  17. package/dist/index.js.map +1 -1
  18. package/dist/layout/labelWidths.d.ts +16 -0
  19. package/dist/layout/labelWidths.d.ts.map +1 -0
  20. package/dist/widget/ChartWidget.d.ts +40 -6
  21. package/dist/widget/ChartWidget.d.ts.map +1 -1
  22. package/dist/widget/WatchlistStore.d.ts.map +1 -1
  23. package/dist/widget/WidgetContextMenu.d.ts +25 -3
  24. package/dist/widget/WidgetContextMenu.d.ts.map +1 -1
  25. package/dist/widget/WidgetHotkeySheet.d.ts.map +1 -1
  26. package/dist/widget/WidgetIndicatorLegend.d.ts +2 -0
  27. package/dist/widget/WidgetIndicatorLegend.d.ts.map +1 -1
  28. package/dist/widget/WidgetLayoutsUI.d.ts.map +1 -1
  29. package/dist/widget/WidgetStatusBar.d.ts +110 -3
  30. package/dist/widget/WidgetStatusBar.d.ts.map +1 -1
  31. package/dist/widget/WidgetSymbolSearch.d.ts +73 -20
  32. package/dist/widget/WidgetSymbolSearch.d.ts.map +1 -1
  33. package/dist/widget/WidgetToolbar.d.ts +65 -6
  34. package/dist/widget/WidgetToolbar.d.ts.map +1 -1
  35. package/dist/widget/WidgetTradeMenu.d.ts.map +1 -1
  36. package/dist/widget/hostButtons.d.ts +5 -2
  37. package/dist/widget/hostButtons.d.ts.map +1 -1
  38. package/dist/widget/index.cjs +459 -119
  39. package/dist/widget/index.cjs.map +1 -1
  40. package/dist/widget/index.js +2302 -1737
  41. package/dist/widget/index.js.map +1 -1
  42. package/dist/widget/locales/ar.d.ts.map +1 -1
  43. package/dist/widget/locales/cs.d.ts.map +1 -1
  44. package/dist/widget/locales/da.d.ts.map +1 -1
  45. package/dist/widget/locales/de.d.ts.map +1 -1
  46. package/dist/widget/locales/el.d.ts.map +1 -1
  47. package/dist/widget/locales/en.d.ts +7 -0
  48. package/dist/widget/locales/en.d.ts.map +1 -1
  49. package/dist/widget/locales/es.d.ts.map +1 -1
  50. package/dist/widget/locales/et.d.ts.map +1 -1
  51. package/dist/widget/locales/fa.d.ts.map +1 -1
  52. package/dist/widget/locales/fr.d.ts.map +1 -1
  53. package/dist/widget/locales/he.d.ts.map +1 -1
  54. package/dist/widget/locales/hu.d.ts.map +1 -1
  55. package/dist/widget/locales/id.d.ts.map +1 -1
  56. package/dist/widget/locales/index.cjs +1 -1
  57. package/dist/widget/locales/index.cjs.map +1 -1
  58. package/dist/widget/locales/index.js +197 -1
  59. package/dist/widget/locales/index.js.map +1 -1
  60. package/dist/widget/locales/it.d.ts.map +1 -1
  61. package/dist/widget/locales/ja.d.ts.map +1 -1
  62. package/dist/widget/locales/ko.d.ts.map +1 -1
  63. package/dist/widget/locales/ms.d.ts.map +1 -1
  64. package/dist/widget/locales/nb.d.ts.map +1 -1
  65. package/dist/widget/locales/nl.d.ts.map +1 -1
  66. package/dist/widget/locales/pl.d.ts.map +1 -1
  67. package/dist/widget/locales/pt.d.ts.map +1 -1
  68. package/dist/widget/locales/ro.d.ts.map +1 -1
  69. package/dist/widget/locales/ru.d.ts.map +1 -1
  70. package/dist/widget/locales/sk.d.ts.map +1 -1
  71. package/dist/widget/locales/sv.d.ts.map +1 -1
  72. package/dist/widget/locales/th.d.ts.map +1 -1
  73. package/dist/widget/locales/tr.d.ts.map +1 -1
  74. package/dist/widget/locales/vi.d.ts.map +1 -1
  75. package/dist/widget/locales/zh.d.ts.map +1 -1
  76. package/dist/widget/locales/zhHant.d.ts.map +1 -1
  77. package/dist/widget/selectMenu.d.ts.map +1 -1
  78. package/dist/widget/symbolBadge.d.ts +26 -0
  79. package/dist/widget/symbolBadge.d.ts.map +1 -0
  80. package/dist/widget/symbolCatalog.d.ts +62 -0
  81. package/dist/widget/symbolCatalog.d.ts.map +1 -0
  82. package/dist/widget/symbolCell.d.ts +8 -0
  83. package/dist/widget/symbolCell.d.ts.map +1 -0
  84. package/dist/widget/symbolInfoView.d.ts +3 -0
  85. package/dist/widget/symbolInfoView.d.ts.map +1 -1
  86. package/dist/widget/symbolMatch.d.ts +38 -0
  87. package/dist/widget/symbolMatch.d.ts.map +1 -0
  88. package/dist/widget/symbolSearchFilters.d.ts +52 -0
  89. package/dist/widget/symbolSearchFilters.d.ts.map +1 -0
  90. package/dist/widget/types.d.ts +28 -4
  91. package/dist/widget/types.d.ts.map +1 -1
  92. package/dist/widget/widgetUI.d.ts +2 -1
  93. package/dist/widget/widgetUI.d.ts.map +1 -1
  94. package/package.json +3 -3
  95. package/dist/LayoutSession-BBw0ke8V.cjs +0 -2
  96. package/dist/LayoutSession-BBw0ke8V.cjs.map +0 -1
  97. package/dist/LayoutSession-Dcvn5KMK.js.map +0 -1
  98. package/dist/i18n-DVeWlg64.cjs +0 -2
  99. package/dist/i18n-DVeWlg64.cjs.map +0 -1
  100. package/dist/i18n-DjzoHpMJ.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as ee, m as te, n as ne, o as re, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as d, x as ue, y as de } from "./LayoutSession-Dcvn5KMK.js";
2
- import { CHART_STYLE_KEYS as fe, DARK_TERMINAL as pe, DARK_THEME as me, DARK_THEME as he, DEFAULT_DRAWING_STYLE as ge, DEFAULT_FONT_FAMILY as _e, DEFAULT_RECONNECT as ve, DEFAULT_SIGNAL_STYLE as ye, DEFAULT_STREAM_CONFIG as be, DEFAULT_TIMEFRAME_FAVORITES as xe, DEFAULT_TRADE_ZONE_STYLE as Se, DEFAULT_TRADING_CONFIG as Ce, HNX_SESSIONS as we, HOSE_SESSIONS as Te, LIGHT_THEME as Ee, LIGHT_THEME as f, MARKET_CRYPTO as p, MARKET_HNX as m, MARKET_HOSE as h, MARKET_HOSE_ETF as g, MARKET_NYSE as _, MARKET_UPCOM as v, MARKET_VN30F as y, MS_TIME_THRESHOLD as b, PRICE_SOURCES as x, SANS_FONT_FAMILY as S, TC_PALETTE as C, TC_SERIES_COLORS as w, TIMEFRAMES_CRYPTO as T, TIMEFRAMES_FOREX as E, TIMEFRAMES_STOCK as D, UPCOM_SESSIONS as De, VN30F_SESSIONS as Oe, VN_COLORS as ke, VOLUME_ALPHA as Ae, barTimeUnit as je, barsAreDaily as Me, computePriceLimits as Ne, createVNTheme as Pe, formatFraction as Fe, formatNumber as Ie, formatVND as Le, formatVolumeLoc as Re, fractionTick as ze, getCurrentSession as Be, getLocale as Ve, indicatorSource as He, isPriceSource as Ue, isTimeFrame as We, isValidTimeZone as Ge, marketStatus as Ke, normalizeBar as qe, normalizeBarTime as Je, offsetAt as Ye, parseIndicatorSource as Xe, parseTimeframe as Ze, pickBaseTimeframe as Qe, priceFormatterFor as $e, priceStepAt as et, rankSymbols as tt, readNews as nt, readQuote as rt, registerLocale as it, resampleBars as at, roundToPriceStep as ot, scaleMarketPrices as st, setLocale as ct, sourcePrice as lt, stepDecimals as ut, symbolTimeZone as dt, t as ft, tickBarCount as pt, timeframeBucketStart as mt, timeframeToMs as ht, vn30fContracts as gt, vn30fLastTradingDay as _t, volumeColor as vt, wallToUtc as yt, zoneOffsetMinutes as bt } from "@tradecanvas/commons";
3
- import { AlertManager as xt, Animator as St, BarCountdown as Ct, BaseFinanceChart as O, BinanceAdapter as wt, BybitAdapter as Tt, CANDLE_PATTERNS as Et, ChartLegend as Dt, ChartStateManager as Ot, CoinbaseAdapter as kt, CompareRenderer as At, CrosshairTooltip as jt, CurrentPriceLine as Mt, DEFAULT_LEGEND_CONFIG as Nt, DEFAULT_MAX_WEBGL_CHARTS as Pt, DEFAULT_SESSION_HOURS as Ft, DataExporter as It, DrawingBase as Lt, Easing as Rt, FinanceCrosshair as k, GROUP_HEADER as zt, INDICATOR_CATEGORIES as Bt, IndicatorBase as Vt, IndicatorValueMap as Ht, KeyboardHandler as Ut, KrakenAdapter as Wt, MAX_ALERT_BARS as Gt, MIN_ALERT_BARS as Kt, MockAdapter as qt, PaperExecutionAdapter as Jt, PollingAdapter as Yt, RANGE_PRESETS as Xt, ReplayManager as Zt, ResamplingAdapter as Qt, Screenshot as $t, SessionBreaks as en, SessionShading as tn, SignalMarkerManager as nn, StreamManager as rn, TickAggregator as an, TickBarAdapter as on, TickBarBuilder as A, TradeZoneManager as sn, UndoRedoManager as cn, VolumeRenderer as ln, Watermark as un, WebSocketAdapter as dn, barIndexToTime as fn, barIndexToX as pn, barIndexToX as j, canvasMeasure as mn, computeBarLayout as hn, computeCalendarLayout as gn, computeCounterClockLayout as _n, computeDonutLayout as vn, computeHistogramLayout as yn, computeMatrixLayout as bn, computeScatterLayout as xn, correlationMatrix as Sn, counterClockPhase as Cn, counterClockPhase as wn, counterClockPoints as Tn, counterClockPoints as En, detectCandlePatterns as Dn, formatTooltipTime as On, histogramBins as kn, hitBar as M, hitDay as N, hitMatrixCell as P, hitSlice as F, indicatorCategory as An, isPriceLevelAlert as jn, layoutGroupedTreemap as Mn, layoutSquarifiedTreemap as Nn, layoutUniformGrid as Pn, lttbDownsample as Fn, lttbVisibleIndices as In, nearestCounterClockPoint as I, nearestPoint as L, niceScale as Ln, priceToY as Rn, priceToYMapper as zn, priceToYMapper as Bn, rangePresetStart as Vn, renderBarChart as Hn, renderCalendar as Un, renderCounterClock as Wn, renderDepthChart as Gn, renderDonut as Kn, renderEquityCurve as qn, renderGauge as Jn, renderHeatmap as Yn, renderHistogram as Xn, renderMatrix as Zn, renderScatter as Qn, renderSparkline as $n, renderWaterfall as er, servesTimeframe as tr, setMaxWebGLCharts as nr, shownCount as rr, timeToX as ir, timestampToBarIndex as ar, timestampToBarIndex as or, toHeikinAshi as sr, toKagi as cr, toLineBreak as lr, toPointAndFigure as ur, toRangeBars as dr, toRenko as fr, withResampling as pr, withTickBars as mr, xToBarIndex as hr, xToBarIndex as R, xToTime as gr, yToPrice as _r, yToPrice as vr } from "@tradecanvas/core";
1
+ import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as ee, m as te, n as ne, o as re, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as d, x as ue, y as de } from "./LayoutSession-Qkx1huV-.js";
2
+ import { CHART_STYLE_KEYS as fe, DARK_TERMINAL as pe, DARK_THEME as me, DARK_THEME as he, DEFAULT_DRAWING_STYLE as ge, DEFAULT_FONT_FAMILY as _e, DEFAULT_RECONNECT as ve, DEFAULT_SIGNAL_STYLE as ye, DEFAULT_STREAM_CONFIG as be, DEFAULT_TIMEFRAME_FAVORITES as xe, DEFAULT_TRADE_ZONE_STYLE as Se, DEFAULT_TRADING_CONFIG as Ce, HNX_SESSIONS as we, HOSE_SESSIONS as Te, LIGHT_THEME as Ee, LIGHT_THEME as De, MARKET_CRYPTO as f, MARKET_HNX as p, MARKET_HOSE as m, MARKET_HOSE_ETF as h, MARKET_NYSE as g, MARKET_UPCOM as _, MARKET_VN30F as v, MS_TIME_THRESHOLD as y, PRICE_SOURCES as b, SANS_FONT_FAMILY as x, TC_PALETTE as S, TC_SERIES_COLORS as C, TIMEFRAMES_CRYPTO as w, TIMEFRAMES_FOREX as T, TIMEFRAMES_STOCK as E, UPCOM_SESSIONS as Oe, VN30F_SESSIONS as ke, VN_COLORS as Ae, VOLUME_ALPHA as je, barTimeUnit as Me, barsAreDaily as Ne, computePriceLimits as Pe, createVNTheme as Fe, formatFraction as Ie, formatNumber as Le, formatVND as Re, formatVolumeLoc as ze, fractionTick as Be, getCurrentSession as Ve, getLocale as He, indicatorSource as Ue, isPriceSource as We, isTimeFrame as Ge, isValidTimeZone as Ke, marketStatus as qe, normalizeBar as Je, normalizeBarTime as Ye, offsetAt as Xe, parseIndicatorSource as Ze, parseTimeframe as Qe, pickBaseTimeframe as $e, priceFormatterFor as et, priceStepAt as tt, rankSymbols as nt, readNews as rt, readQuote as it, registerLocale as at, resampleBars as ot, roundToPriceStep as st, scaleMarketPrices as ct, setLocale as lt, sourcePrice as ut, stepDecimals as dt, symbolTimeZone as ft, t as pt, tickBarCount as mt, timeframeBucketStart as ht, timeframeToMs as gt, vn30fContracts as _t, vn30fLastTradingDay as vt, volumeColor as yt, wallToUtc as bt, zoneOffsetMinutes as xt } from "@tradecanvas/commons";
3
+ import { AlertManager as St, Animator as Ct, BarCountdown as wt, BaseFinanceChart as D, BinanceAdapter as Tt, BybitAdapter as Et, CANDLE_PATTERNS as Dt, ChartLegend as Ot, ChartStateManager as kt, CoinbaseAdapter as At, CompareRenderer as jt, CrosshairTooltip as Mt, CurrentPriceLine as Nt, DEFAULT_LEGEND_CONFIG as Pt, DEFAULT_MAX_WEBGL_CHARTS as Ft, DEFAULT_SESSION_HOURS as It, DataExporter as Lt, DrawingBase as Rt, Easing as zt, FinanceCrosshair as O, GROUP_HEADER as Bt, INDICATOR_CATEGORIES as Vt, IndicatorBase as Ht, IndicatorValueMap as Ut, KeyboardHandler as Wt, KrakenAdapter as Gt, MAX_ALERT_BARS as Kt, MIN_ALERT_BARS as qt, MockAdapter as Jt, PaperExecutionAdapter as Yt, PollingAdapter as Xt, RANGE_PRESETS as Zt, ReplayManager as Qt, ResamplingAdapter as $t, Screenshot as en, SessionBreaks as tn, SessionShading as nn, SignalMarkerManager as rn, StreamManager as an, TickAggregator as on, TickBarAdapter as sn, TickBarBuilder as k, TradeZoneManager as cn, UndoRedoManager as ln, VolumeRenderer as un, Watermark as dn, WebSocketAdapter as fn, barIndexToTime as pn, barIndexToX as mn, barIndexToX as A, canvasMeasure as hn, computeBarLayout as gn, computeCalendarLayout as _n, computeCounterClockLayout as vn, computeDonutLayout as yn, computeHistogramLayout as bn, computeMatrixLayout as xn, computeScatterLayout as Sn, correlationMatrix as Cn, counterClockPhase as wn, counterClockPhase as Tn, counterClockPoints as En, counterClockPoints as Dn, detectCandlePatterns as On, formatTooltipTime as kn, histogramBins as An, hitBar as j, hitDay as M, hitMatrixCell as N, hitSlice as P, indicatorCategory as jn, isPriceLevelAlert as Mn, layoutGroupedTreemap as Nn, layoutSquarifiedTreemap as Pn, layoutUniformGrid as Fn, lttbDownsample as In, lttbVisibleIndices as Ln, nearestCounterClockPoint as F, nearestPoint as I, niceScale as Rn, priceToY as zn, priceToYMapper as Bn, priceToYMapper as Vn, rangePresetStart as Hn, renderBarChart as Un, renderCalendar as Wn, renderCounterClock as Gn, renderDepthChart as Kn, renderDonut as qn, renderEquityCurve as Jn, renderGauge as Yn, renderHeatmap as Xn, renderHistogram as Zn, renderMatrix as Qn, renderScatter as $n, renderSparkline as er, renderWaterfall as tr, servesTimeframe as nr, setMaxWebGLCharts as rr, shownCount as ir, timeToX as ar, timestampToBarIndex as or, timestampToBarIndex as sr, toHeikinAshi as cr, toKagi as lr, toLineBreak as ur, toPointAndFigure as dr, toRangeBars as fr, toRenko as pr, withResampling as mr, withTickBars as hr, xToBarIndex as gr, xToBarIndex as L, xToTime as _r, yToPrice as vr, yToPrice as yr } from "@tradecanvas/core";
4
4
  //#region src/frameworks/syncIndicators.ts
5
- function yr(e) {
5
+ function br(e) {
6
6
  let { id: t, params: n = {}, position: r = null } = typeof e == "string" ? { id: e } : e;
7
7
  return JSON.stringify([
8
8
  t,
@@ -10,9 +10,9 @@ function yr(e) {
10
10
  r
11
11
  ]);
12
12
  }
13
- function br(e, t, n) {
13
+ function xr(e, t, n) {
14
14
  let r = /* @__PURE__ */ new Map(), i = t.map((e) => {
15
- let t = yr(e), n = r.get(t) ?? 0;
15
+ let t = br(e), n = r.get(t) ?? 0;
16
16
  return r.set(t, n + 1), {
17
17
  spec: e,
18
18
  key: `${t}#${n}`
@@ -27,64 +27,64 @@ function br(e, t, n) {
27
27
  }
28
28
  //#endregion
29
29
  //#region src/frameworks/feedBars.ts
30
- var z = (e, t) => e === t || e.time === t.time && e.open === t.open && e.high === t.high && e.low === t.low && e.close === t.close && e.volume === t.volume, B = (e) => ({
30
+ var R = (e, t) => e === t || e.time === t.time && e.open === t.open && e.high === t.high && e.low === t.low && e.close === t.close && e.volume === t.volume, z = (e) => ({
31
31
  time: e.time,
32
32
  open: e.open,
33
33
  high: e.high,
34
34
  low: e.low,
35
35
  close: e.close,
36
36
  volume: e.volume
37
- }), V = (e) => e.length > 0 ? e[e.length - 1] : null;
38
- function xr(e, t, n) {
39
- for (let r = 0; r < n; r++) if (!z(e[r], t[r])) return !1;
37
+ }), B = (e) => e.length > 0 ? e[e.length - 1] : null;
38
+ function Sr(e, t, n) {
39
+ for (let r = 0; r < n; r++) if (!R(e[r], t[r])) return !1;
40
40
  return !0;
41
41
  }
42
- function Sr(e, t) {
42
+ function Cr(e, t) {
43
43
  if (e.isReplayActive()) return !0;
44
- let n = V(e.getData());
44
+ let n = B(e.getData());
45
45
  return t.inReplay ? n?.time === t.last?.time : n === t.shownBar ? n?.time === t.last?.time || !e.isExtendedHoursVisible() : !1;
46
46
  }
47
- function Cr(e, t) {
47
+ function wr(e, t) {
48
48
  let n = [];
49
49
  for (let r = t; r < e.length; r++) {
50
50
  if (!d(e[r]) || !(e[r].time > e[r - 1].time)) return null;
51
- n.push(B(e[r]));
51
+ n.push(z(e[r]));
52
52
  }
53
53
  return n;
54
54
  }
55
- function wr(e, t, n) {
55
+ function Tr(e, t, n) {
56
56
  let r = n.length;
57
- if (r === 0 || !n.last || !d(n.last) || t.length < r || !Sr(e, n) || t !== n.source && (n.source.length !== r || !xr(n.source, t, r - 1))) return !1;
57
+ if (r === 0 || !n.last || !d(n.last) || t.length < r || !Cr(e, n) || t !== n.source && (n.source.length !== r || !Sr(n.source, t, r - 1))) return !1;
58
58
  let i = t[r - 1];
59
59
  if (i.time !== n.last.time || !d(i)) return !1;
60
- let a = Cr(t, r);
61
- return a ? (z(i, n.last) || e.updateLastBar(B(i)), a.length === 1 ? e.appendBar(a[0]) : a.length > 1 && e.appendBars(a), !0) : !1;
60
+ let a = wr(t, r);
61
+ return a ? (R(i, n.last) || e.updateLastBar(z(i)), a.length === 1 ? e.appendBar(a[0]) : a.length > 1 && e.appendBars(a), !0) : !1;
62
62
  }
63
- function Tr(e, t, n) {
64
- (!n || !wr(e, t, n)) && e.setData(t.map(B));
65
- let r = t.length > 0 ? B(t[t.length - 1]) : null, i = e.isReplayActive();
63
+ function Er(e, t, n) {
64
+ (!n || !Tr(e, t, n)) && e.setData(t.map(z));
65
+ let r = t.length > 0 ? z(t[t.length - 1]) : null, i = e.isReplayActive();
66
66
  return {
67
67
  source: t,
68
68
  length: t.length,
69
69
  last: r,
70
- shownBar: i ? null : V(e.getData()),
70
+ shownBar: i ? null : B(e.getData()),
71
71
  inReplay: i
72
72
  };
73
73
  }
74
74
  //#endregion
75
75
  //#region src/plugins/overlayScale.ts
76
- function Er(e) {
77
- let { viewport: t, data: n } = e, r = Bn(t), i = n.length - 1, a = Math.max(0, Math.floor(t.visibleRange.from)), o = Math.min(i, Math.ceil(t.visibleRange.to)), s = (e) => n.length > 0 ? or(e, n) : e;
76
+ function Dr(e) {
77
+ let { viewport: t, data: n } = e, r = Vn(t), i = n.length - 1, a = Math.max(0, Math.floor(t.visibleRange.from)), o = Math.min(i, Math.ceil(t.visibleRange.to)), s = (e) => n.length > 0 ? sr(e, n) : e;
78
78
  return {
79
- timeToX: (e) => j(s(e), t),
79
+ timeToX: (e) => A(s(e), t),
80
80
  xToTime: (e) => {
81
- let r = R(e, t);
82
- return n.length > 0 ? fn(r, n) : r;
81
+ let r = L(e, t);
82
+ return n.length > 0 ? pn(r, n) : r;
83
83
  },
84
- indexToX: (e) => j(e, t),
85
- xToIndex: (e) => R(e, t),
84
+ indexToX: (e) => A(e, t),
85
+ xToIndex: (e) => L(e, t),
86
86
  priceToY: r,
87
- yToPrice: (e) => vr(e, t),
87
+ yToPrice: (e) => yr(e, t),
88
88
  barWidth: t.barWidth,
89
89
  visible: o < a ? {
90
90
  from: 0,
@@ -97,7 +97,7 @@ function Er(e) {
97
97
  }
98
98
  //#endregion
99
99
  //#region src/grid/ChartGrid.ts
100
- var H = {
100
+ var V = {
101
101
  "1x1": {
102
102
  cols: 1,
103
103
  rows: 1
@@ -130,7 +130,7 @@ var H = {
130
130
  cols: 2,
131
131
  rows: 3
132
132
  }
133
- }, Dr = class {
133
+ }, Or = class {
134
134
  root;
135
135
  cells = [];
136
136
  layout;
@@ -141,11 +141,11 @@ var H = {
141
141
  this.options = t, this.layout = t.layout ?? "2x2", this.root = document.createElement("div"), this.root.style.cssText = "display:grid;width:100%;height:100%;overflow:hidden;", e.appendChild(this.root), this.applyLayout(), this.createCells();
142
142
  }
143
143
  applyLayout() {
144
- let { cols: e, rows: t } = H[this.layout], n = this.options.gap ?? 1;
144
+ let { cols: e, rows: t } = V[this.layout], n = this.options.gap ?? 1;
145
145
  this.root.style.gridTemplateColumns = `repeat(${e}, 1fr)`, this.root.style.gridTemplateRows = `repeat(${t}, 1fr)`, this.root.style.gap = `${n}px`;
146
146
  }
147
147
  createCells() {
148
- let { cols: e, rows: t } = H[this.layout], n = e * t;
148
+ let { cols: e, rows: t } = V[this.layout], n = e * t;
149
149
  for (let e = 0; e < n; e++) this.cells.push(this.createCell(e));
150
150
  }
151
151
  createCell(e) {
@@ -190,7 +190,7 @@ var H = {
190
190
  }
191
191
  setLayout(e) {
192
192
  if (e === this.layout) return;
193
- let t = this.cells.length, { cols: n, rows: r } = H[e], i = n * r;
193
+ let t = this.cells.length, { cols: n, rows: r } = V[e], i = n * r;
194
194
  if (i < t) for (let e = t - 1; e >= i; e--) {
195
195
  let t = this.cells[e];
196
196
  t.chart.destroy(), t.container.remove(), this.cells.pop();
@@ -237,13 +237,13 @@ var H = {
237
237
  this.cells = [], this.root.remove();
238
238
  }
239
239
  }
240
- }, Or = class extends O {
240
+ }, kr = class extends D {
241
241
  options;
242
242
  constructor(e, t) {
243
243
  super(e, t.theme), this.options = t, this.requestRender();
244
244
  }
245
245
  renderChart(e, t, n, r) {
246
- $n(e, t, n, this.options, r);
246
+ er(e, t, n, this.options, r);
247
247
  }
248
248
  update(e) {
249
249
  this.options = {
@@ -257,15 +257,15 @@ var H = {
257
257
  ...e
258
258
  }, this.requestRender();
259
259
  }
260
- }, kr = class extends O {
260
+ }, Ar = class extends D {
261
261
  options;
262
262
  crosshair = null;
263
263
  constructor(e, t) {
264
- super(e, t.theme), this.options = t, t.crosshair !== !1 && (this.crosshair = new k(this.canvas, () => this.requestRender())), this.requestRender();
264
+ super(e, t.theme), this.options = t, t.crosshair !== !1 && (this.crosshair = new O(this.canvas, () => this.requestRender())), this.requestRender();
265
265
  }
266
266
  renderChart(e, t, n, r) {
267
267
  let i = this.crosshair?.getPosition() ?? null;
268
- Gn(e, t, n, this.options, r, i);
268
+ Kn(e, t, n, this.options, r, i);
269
269
  }
270
270
  update(e) {
271
271
  this.options = {
@@ -282,15 +282,15 @@ var H = {
282
282
  destroy() {
283
283
  this.crosshair?.destroy(), super.destroy();
284
284
  }
285
- }, U = class extends O {
285
+ }, H = class extends D {
286
286
  options;
287
287
  crosshair = null;
288
288
  constructor(e, t) {
289
- super(e, t.theme), this.options = t, t.crosshair !== !1 && (this.crosshair = new k(this.canvas, () => this.requestRender())), this.requestRender();
289
+ super(e, t.theme), this.options = t, t.crosshair !== !1 && (this.crosshair = new O(this.canvas, () => this.requestRender())), this.requestRender();
290
290
  }
291
291
  renderChart(e, t, n, r) {
292
292
  let i = this.crosshair?.getPosition() ?? null;
293
- qn(e, t, n, this.options, r, i);
293
+ Jn(e, t, n, this.options, r, i);
294
294
  }
295
295
  update(e, t) {
296
296
  this.options = {
@@ -310,7 +310,7 @@ var H = {
310
310
  destroy() {
311
311
  this.crosshair?.destroy(), super.destroy();
312
312
  }
313
- }, W = class extends O {
313
+ }, U = class extends D {
314
314
  options;
315
315
  crosshair = null;
316
316
  cachedRects = [];
@@ -320,7 +320,7 @@ var H = {
320
320
  lastLayoutHeight = 0;
321
321
  handleClick = null;
322
322
  constructor(e, t) {
323
- super(e, t.theme), this.options = t, this.currentData = t.data ?? [], t.crosshair !== !1 && (this.crosshair = new k(this.canvas, () => this.requestRender())), t.onCellClick && (this.handleClick = (e) => {
323
+ super(e, t.theme), this.options = t, this.currentData = t.data ?? [], t.crosshair !== !1 && (this.crosshair = new O(this.canvas, () => this.requestRender())), t.onCellClick && (this.handleClick = (e) => {
324
324
  let t = this.canvas.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
325
325
  this.onCanvasClick(n, r);
326
326
  }, this.canvas.addEventListener("click", this.handleClick)), this.applyLabel(), this.recomputeLayout(), this.requestRender();
@@ -337,20 +337,20 @@ var H = {
337
337
  height: this.height
338
338
  }, t = this.options.cellPadding ?? 2;
339
339
  if (this.lastLayoutWidth = this.width, this.lastLayoutHeight = this.height, this.cachedGroups = [], this.options.grouped) {
340
- let { groups: n, cells: r } = Mn(this.currentData.map((e) => ({
340
+ let { groups: n, cells: r } = Nn(this.currentData.map((e) => ({
341
341
  id: e.id,
342
342
  weight: e.weight ?? (Math.abs(e.value) || 1),
343
343
  group: e.group,
344
344
  value: e.value
345
- })), e, t, zt);
345
+ })), e, t, Bt);
346
346
  this.cachedRects = r, this.cachedGroups = n;
347
347
  } else if (this.options.weighted) {
348
348
  let n = this.currentData.map((e) => ({
349
349
  id: e.id,
350
350
  weight: e.weight ?? (Math.abs(e.value) || 1)
351
351
  }));
352
- this.cachedRects = Nn(n, e, t);
353
- } else this.cachedRects = Pn(this.currentData.map((e) => ({ id: e.id })), e, t);
352
+ this.cachedRects = Pn(n, e, t);
353
+ } else this.cachedRects = Fn(this.currentData.map((e) => ({ id: e.id })), e, t);
354
354
  }
355
355
  onCanvasClick(e, t) {
356
356
  if (this.options.onCellClick) for (let n of this.cachedRects) {
@@ -365,7 +365,7 @@ var H = {
365
365
  renderChart(e, t, n, r) {
366
366
  (t !== this.lastLayoutWidth || n !== this.lastLayoutHeight) && this.recomputeLayout();
367
367
  let i = this.crosshair?.getPosition() ?? null;
368
- Yn(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
368
+ Xn(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
369
369
  }
370
370
  update(e) {
371
371
  this.currentData = e, this.options = {
@@ -382,15 +382,15 @@ var H = {
382
382
  destroy() {
383
383
  this.crosshair?.destroy(), this.handleClick && this.canvas.removeEventListener("click", this.handleClick), super.destroy();
384
384
  }
385
- }, Ar = class extends O {
385
+ }, jr = class extends D {
386
386
  options;
387
387
  crosshair = null;
388
388
  constructor(e, t) {
389
- super(e, t.theme), this.options = t, t.crosshair !== !1 && (this.crosshair = new k(this.canvas, () => this.requestRender())), this.requestRender();
389
+ super(e, t.theme), this.options = t, t.crosshair !== !1 && (this.crosshair = new O(this.canvas, () => this.requestRender())), this.requestRender();
390
390
  }
391
391
  renderChart(e, t, n, r) {
392
392
  let i = this.crosshair?.getPosition() ?? null;
393
- er(e, t, n, this.options, r, i);
393
+ tr(e, t, n, this.options, r, i);
394
394
  }
395
395
  update(e) {
396
396
  this.options = {
@@ -407,12 +407,12 @@ var H = {
407
407
  destroy() {
408
408
  this.crosshair?.destroy(), super.destroy();
409
409
  }
410
- }, jr = 500;
411
- function Mr(e) {
410
+ }, Mr = 500;
411
+ function Nr(e) {
412
412
  let t = 1 - e;
413
413
  return 1 - t * t * t;
414
414
  }
415
- var Nr = class extends O {
415
+ var Pr = class extends D {
416
416
  options;
417
417
  currentValue;
418
418
  targetValue;
@@ -423,7 +423,7 @@ var Nr = class extends O {
423
423
  super(e, t.theme), this.options = t, this.currentValue = t.value, this.targetValue = t.value, this.requestRender();
424
424
  }
425
425
  renderChart(e, t, n, r) {
426
- Jn(e, t, n, this.options, r, this.currentValue);
426
+ Yn(e, t, n, this.options, r, this.currentValue);
427
427
  }
428
428
  setValue(e) {
429
429
  if (this.options.animate === !1) {
@@ -453,7 +453,7 @@ var Nr = class extends O {
453
453
  if (this.animationFrameId !== null) return;
454
454
  let e = () => {
455
455
  if (this.animationFrameId = null, this.animationStart === null) return;
456
- let t = this.options.animationDuration ?? jr, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = Mr(r);
456
+ let t = this.options.animationDuration ?? Mr, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = Nr(r);
457
457
  this.currentValue = this.animationFrom + (this.targetValue - this.animationFrom) * i, this.requestRender(), r < 1 ? this.animationFrameId = requestAnimationFrame(e) : (this.currentValue = this.targetValue, this.animationStart = null);
458
458
  };
459
459
  this.animationFrameId = requestAnimationFrame(e);
@@ -464,7 +464,7 @@ var Nr = class extends O {
464
464
  destroy() {
465
465
  this.cancelAnimation(), super.destroy();
466
466
  }
467
- }, G = class extends O {
467
+ }, W = class extends D {
468
468
  options;
469
469
  layout = null;
470
470
  layoutFor = null;
@@ -479,11 +479,11 @@ var Nr = class extends O {
479
479
  this.canvas.style.cursor = this.hits(this.layout, e.clientX - t.left, e.clientY - t.top) ? "pointer" : "";
480
480
  };
481
481
  constructor(e, t) {
482
- super(e, t.theme), this.options = t, this.crosshair = new k(this.canvas, () => this.requestRender()), this.canvas.addEventListener("click", this.onClick), this.canvas.addEventListener("pointermove", this.onMove), this.applyLabel(), this.requestRender();
482
+ super(e, t.theme), this.options = t, this.crosshair = new O(this.canvas, () => this.requestRender()), this.canvas.addEventListener("click", this.onClick), this.canvas.addEventListener("pointermove", this.onMove), this.applyLabel(), this.requestRender();
483
483
  }
484
484
  renderChart(e, t, n, r) {
485
485
  let i = this.options.crosshair === !1 ? null : this.crosshair.getPosition(), a = this.layoutFor;
486
- (!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, mn(e, r)), this.layoutFor = {
486
+ (!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, hn(e, r)), this.layoutFor = {
487
487
  options: this.options,
488
488
  width: t,
489
489
  height: n,
@@ -502,12 +502,12 @@ var Nr = class extends O {
502
502
  destroy() {
503
503
  this.crosshair.destroy(), this.canvas.removeEventListener("click", this.onClick), this.canvas.removeEventListener("pointermove", this.onMove), super.destroy();
504
504
  }
505
- }, Pr = class extends G {
505
+ }, Fr = class extends W {
506
506
  compute(e, t, n, r) {
507
- return hn(this.options, e, t, n, r);
507
+ return gn(this.options, e, t, n, r);
508
508
  }
509
509
  draw(e, t, n, r, i, a) {
510
- Hn(e, t, n, this.options, r, i, a);
510
+ Un(e, t, n, this.options, r, i, a);
511
511
  }
512
512
  describe() {
513
513
  return `Bar chart of ${this.options.series.map((e) => e.name).join(", ")}, ${this.options.categories.length} categories`;
@@ -516,10 +516,10 @@ var Nr = class extends O {
516
516
  return this.options.onBarClick !== void 0;
517
517
  }
518
518
  hits(e, t, n) {
519
- return M(e, t, n) !== null;
519
+ return j(e, t, n) !== null;
520
520
  }
521
521
  clickAt(e, t, n) {
522
- let r = M(e, t, n);
522
+ let r = j(e, t, n);
523
523
  r && this.options.onBarClick?.({
524
524
  category: r.category,
525
525
  series: r.series,
@@ -533,12 +533,12 @@ var Nr = class extends O {
533
533
  series: t
534
534
  });
535
535
  }
536
- }, Fr = class extends G {
536
+ }, Ir = class extends W {
537
537
  compute(e, t, n, r) {
538
- return vn(this.options, e, t, n, r);
538
+ return yn(this.options, e, t, n, r);
539
539
  }
540
540
  draw(e, t, n, r, i, a) {
541
- Kn(e, t, n, this.options, r, i, a);
541
+ qn(e, t, n, this.options, r, i, a);
542
542
  }
543
543
  describe() {
544
544
  let e = this.options.data.filter((e) => Number.isFinite(e.value) && e.value > 0).map((e) => e.label).join(", ");
@@ -548,21 +548,21 @@ var Nr = class extends O {
548
548
  return this.options.onSliceClick !== void 0;
549
549
  }
550
550
  hits(e, t, n) {
551
- return F(e, t, n) !== null;
551
+ return P(e, t, n) !== null;
552
552
  }
553
553
  clickAt(e, t, n) {
554
- let r = F(e, t, n);
554
+ let r = P(e, t, n);
555
555
  r && this.options.onSliceClick?.(r.slice);
556
556
  }
557
557
  update(e) {
558
558
  this.setOptions({ data: e });
559
559
  }
560
- }, Ir = class extends G {
560
+ }, Lr = class extends W {
561
561
  compute(e, t, n, r) {
562
- return xn(this.options, e, t, n, r);
562
+ return Sn(this.options, e, t, n, r);
563
563
  }
564
564
  draw(e, t, n, r, i, a) {
565
- Qn(e, t, n, this.options, r, i, a);
565
+ $n(e, t, n, this.options, r, i, a);
566
566
  }
567
567
  describe() {
568
568
  let e = this.options.series.reduce((e, t) => e + t.points.length, 0);
@@ -572,21 +572,21 @@ var Nr = class extends O {
572
572
  return this.options.onPointClick !== void 0;
573
573
  }
574
574
  hits(e, t, n) {
575
- return L(e, t, n) !== null;
575
+ return I(e, t, n) !== null;
576
576
  }
577
577
  clickAt(e, t, n) {
578
- let r = L(e, t, n);
578
+ let r = I(e, t, n);
579
579
  r && this.options.onPointClick?.(r.point, r.series);
580
580
  }
581
581
  update(e) {
582
582
  this.setOptions({ series: e });
583
583
  }
584
- }, Lr = class extends G {
584
+ }, Rr = class extends W {
585
585
  compute(e, t, n, r) {
586
- return yn(this.options, e, t, n, r);
586
+ return bn(this.options, e, t, n, r);
587
587
  }
588
588
  draw(e, t, n, r, i, a) {
589
- Xn(e, t, n, this.options, r, i, a);
589
+ Zn(e, t, n, this.options, r, i, a);
590
590
  }
591
591
  describe() {
592
592
  return `Histogram of ${this.options.values.length} values`;
@@ -601,12 +601,12 @@ var Nr = class extends O {
601
601
  update(e) {
602
602
  this.setOptions({ values: e });
603
603
  }
604
- }, Rr = class extends G {
604
+ }, zr = class extends W {
605
605
  compute(e, t, n, r) {
606
- return gn(this.options, e, t, n, r);
606
+ return _n(this.options, e, t, n, r);
607
607
  }
608
608
  draw(e, t, n, r, i, a) {
609
- Un(e, t, n, this.options, r, i, a);
609
+ Wn(e, t, n, this.options, r, i, a);
610
610
  }
611
611
  describe() {
612
612
  let e = this.options.data.map((e) => e.date).filter((e) => /^\d{4}-\d{2}-\d{2}$/.test(e)).sort(), t = this.options.from ?? e[0], n = this.options.to ?? e[e.length - 1];
@@ -616,45 +616,45 @@ var Nr = class extends O {
616
616
  return this.options.onDayClick !== void 0;
617
617
  }
618
618
  hits(e, t, n) {
619
- return N(e, t, n)?.day !== void 0;
619
+ return M(e, t, n)?.day !== void 0;
620
620
  }
621
621
  clickAt(e, t, n) {
622
- let r = N(e, t, n)?.day;
622
+ let r = M(e, t, n)?.day;
623
623
  r && this.options.onDayClick?.(r);
624
624
  }
625
625
  update(e) {
626
626
  this.setOptions({ data: e });
627
627
  }
628
- }, K = 12, zr = class extends G {
628
+ }, G = 12, Br = class extends W {
629
629
  compute(e, t, n, r) {
630
- return bn(this.options, e, t, n, r);
630
+ return xn(this.options, e, t, n, r);
631
631
  }
632
632
  draw(e, t, n, r, i, a) {
633
- Zn(e, t, n, this.options, r, i, a);
633
+ Qn(e, t, n, this.options, r, i, a);
634
634
  }
635
635
  describe() {
636
636
  let { rows: e, columns: t } = this.options;
637
- return t ? e.length + t.length <= K ? `Matrix of ${e.join(", ")} by ${t.join(", ")}` : `Matrix of ${e.length} rows by ${t.length} columns` : e.length <= K ? `Matrix of ${e.join(", ")}` : `Matrix of ${e.length} rows`;
637
+ return t ? e.length + t.length <= G ? `Matrix of ${e.join(", ")} by ${t.join(", ")}` : `Matrix of ${e.length} rows by ${t.length} columns` : e.length <= G ? `Matrix of ${e.join(", ")}` : `Matrix of ${e.length} rows`;
638
638
  }
639
639
  clickable() {
640
640
  return this.options.onCellClick !== void 0;
641
641
  }
642
642
  hits(e, t, n) {
643
- return P(e, t, n) !== null;
643
+ return N(e, t, n) !== null;
644
644
  }
645
645
  clickAt(e, t, n) {
646
- let r = P(e, t, n);
646
+ let r = N(e, t, n);
647
647
  r && this.options.onCellClick?.(r.cell);
648
648
  }
649
649
  update(e) {
650
650
  this.setOptions({ values: e });
651
651
  }
652
- }, Br = class extends G {
652
+ }, Vr = class extends W {
653
653
  compute(e, t, n, r) {
654
- return _n(this.options, e, t, n, r);
654
+ return vn(this.options, e, t, n, r);
655
655
  }
656
656
  draw(e, t, n, r, i, a) {
657
- Wn(e, t, n, this.options, r, i, a);
657
+ Gn(e, t, n, this.options, r, i, a);
658
658
  }
659
659
  describe() {
660
660
  return `Counter-clock chart of price against volume, ${this.options.period ?? 25}-bar averages`;
@@ -663,19 +663,19 @@ var Nr = class extends O {
663
663
  return this.options.onPointClick !== void 0;
664
664
  }
665
665
  hits(e, t, n) {
666
- return I(e, t, n) !== null;
666
+ return F(e, t, n) !== null;
667
667
  }
668
668
  clickAt(e, t, n) {
669
- let r = I(e, t, n);
669
+ let r = F(e, t, n);
670
670
  r && this.options.onPointClick?.(r.point);
671
671
  }
672
672
  getPhase() {
673
- return wn(En(this.options.data, this.options.period ?? 25, rr(this.options)));
673
+ return Tn(Dn(this.options.data, this.options.period ?? 25, ir(this.options)));
674
674
  }
675
675
  update(e) {
676
676
  this.setOptions({ data: e });
677
677
  }
678
- }, Vr = [
678
+ }, Hr = [
679
679
  "Jan",
680
680
  "Feb",
681
681
  "Mar",
@@ -689,13 +689,13 @@ var Nr = class extends O {
689
689
  "Nov",
690
690
  "Dec"
691
691
  ];
692
- function q(e) {
692
+ function K(e) {
693
693
  return e.map((e) => ({
694
694
  time: e.time,
695
695
  value: e.equity
696
696
  }));
697
697
  }
698
- function J(e) {
698
+ function q(e) {
699
699
  let t = -Infinity;
700
700
  return e.map((e) => {
701
701
  e.equity > t && (t = e.equity);
@@ -706,11 +706,11 @@ function J(e) {
706
706
  };
707
707
  });
708
708
  }
709
- function Y(e) {
709
+ function J(e) {
710
710
  if (e.length === 0) return [];
711
711
  let t = [];
712
712
  for (let n of e) {
713
- let e = mt(n.time, "1M"), r = t[t.length - 1];
713
+ let e = ht(n.time, "1M"), r = t[t.length - 1];
714
714
  r && r.key === e ? r.close = n.equity : t.push({
715
715
  key: e,
716
716
  close: n.equity
@@ -723,13 +723,14 @@ function Y(e) {
723
723
  let a = new Date(e.key), o = a.getUTCFullYear(), s = a.getUTCMonth();
724
724
  r.push({
725
725
  id: `${o}-${String(s + 1).padStart(2, "0")}`,
726
- label: Vr[s],
726
+ label: Hr[s],
727
727
  group: String(o),
728
728
  value: i
729
729
  });
730
730
  }
731
731
  return r;
732
732
  }
733
+ var Y = 100;
733
734
  function X(e) {
734
735
  return `${e > 0 ? "+" : ""}${e.toFixed(2)}%`;
735
736
  }
@@ -740,12 +741,12 @@ function Q(e) {
740
741
  return [
741
742
  {
742
743
  label: "Total Return",
743
- value: X(e.totalReturnPct),
744
+ value: X(e.totalReturnPct * Y),
744
745
  tone: Z(e.totalReturnPct)
745
746
  },
746
747
  {
747
748
  label: "CAGR",
748
- value: X(e.cagr * 100),
749
+ value: X(e.cagr * Y),
749
750
  tone: Z(e.cagr)
750
751
  },
751
752
  {
@@ -760,12 +761,12 @@ function Q(e) {
760
761
  },
761
762
  {
762
763
  label: "Max Drawdown",
763
- value: X(e.maxDrawdownPct),
764
+ value: X(-Math.abs(e.maxDrawdownPct) * Y),
764
765
  tone: "negative"
765
766
  },
766
767
  {
767
768
  label: "Win Rate",
768
- value: `${(e.winRate * 100).toFixed(1)}%`,
769
+ value: `${(e.winRate * Y).toFixed(1)}%`,
769
770
  tone: "neutral"
770
771
  },
771
772
  {
@@ -783,9 +784,9 @@ function Q(e) {
783
784
  //#endregion
784
785
  //#region src/finance/PerformanceDashboard.ts
785
786
  function $(e) {
786
- return !e || e === "dark" ? he : e === "light" ? f : e;
787
+ return !e || e === "dark" ? he : e === "light" ? De : e;
787
788
  }
788
- var Hr = class {
789
+ var Ur = class {
789
790
  options;
790
791
  theme;
791
792
  root;
@@ -828,24 +829,24 @@ var Hr = class {
828
829
  "gap:14px"
829
830
  ].join(";"), this.root.appendChild(o);
830
831
  let s = this.buildPanel("Equity Curve", i, a);
831
- s.wrap.style.gridColumn = "1 / -1", o.appendChild(s.wrap), this.equityChart = new U(s.body, {
832
- data: q(t.equityCurve),
832
+ s.wrap.style.gridColumn = "1 / -1", o.appendChild(s.wrap), this.equityChart = new H(s.body, {
833
+ data: K(t.equityCurve),
833
834
  theme: e,
834
835
  lineColor: e.candleUp,
835
836
  fillArea: !0,
836
837
  crosshair: !0
837
838
  });
838
839
  let c = this.buildPanel("Drawdown", i, a);
839
- o.appendChild(c.wrap), this.drawdownChart = new U(c.body, {
840
- data: J(t.equityCurve),
840
+ o.appendChild(c.wrap), this.drawdownChart = new H(c.body, {
841
+ data: q(t.equityCurve),
841
842
  theme: e,
842
843
  lineColor: e.candleDown,
843
844
  fillArea: !0,
844
845
  crosshair: !0,
845
846
  valueFormat: (e) => `${e.toFixed(1)}%`
846
847
  });
847
- let l = Y(t.equityCurve), u = this.buildPanel("Monthly Returns", i, a);
848
- o.appendChild(u.wrap), this.heatmap = new W(u.body, {
848
+ let l = J(t.equityCurve), u = this.buildPanel("Monthly Returns", i, a);
849
+ o.appendChild(u.wrap), this.heatmap = new U(u.body, {
849
850
  data: l,
850
851
  theme: e,
851
852
  showValues: !0,
@@ -934,6 +935,6 @@ var Hr = class {
934
935
  }
935
936
  };
936
937
  //#endregion
937
- export { xt as AlertManager, St as Animator, Pr as BarChart, Ct as BarCountdown, wt as BinanceAdapter, Tt as BybitAdapter, Et as CANDLE_PATTERNS, fe as CHART_STYLE_KEYS, Rr as CalendarChart, a as Chart, Dr as ChartGrid, Dt as ChartLegend, Ot as ChartStateManager, kt as CoinbaseAdapter, At as CompareRenderer, Br as CounterClockChart, jt as CrosshairTooltip, Mt as CurrentPriceLine, pe as DARK_TERMINAL, me as DARK_THEME, ge as DEFAULT_DRAWING_STYLE, _e as DEFAULT_FONT_FAMILY, ue as DEFAULT_HISTORY_PAGE_SIZE, Nt as DEFAULT_LEGEND_CONFIG, Pt as DEFAULT_MAX_WEBGL_CHARTS, ve as DEFAULT_RECONNECT, Ft as DEFAULT_SESSION_HOURS, ye as DEFAULT_SIGNAL_STYLE, be as DEFAULT_STREAM_CONFIG, xe as DEFAULT_TIMEFRAME_FAVORITES, Se as DEFAULT_TRADE_ZONE_STYLE, Ce as DEFAULT_TRADING_CONFIG, It as DataExporter, e as DataManager, kr as DepthChart, Fr as DonutChart, re as DragDropImporter, Lt as DrawingBase, ee as EXCHANGE_TIMEZONE, ce as EXCHANGE_TIME_ZONE, Rt as Easing, U as EquityCurveChart, Nr as GaugeChart, t as HISTORY_RETRY_MS, we as HNX_SESSIONS, Te as HOSE_SESSIONS, W as HeatmapChart, Lr as HistogramChart, Bt as INDICATOR_CATEGORIES, Vt as IndicatorBase, Ht as IndicatorValueMap, Ut as KeyboardHandler, Wt as KrakenAdapter, Ee as LIGHT_THEME, de as LayoutManager, se as LayoutSession, p as MARKET_CRYPTO, m as MARKET_HNX, h as MARKET_HOSE, g as MARKET_HOSE_ETF, _ as MARKET_NYSE, v as MARKET_UPCOM, y as MARKET_VN30F, Gt as MAX_ALERT_BARS, ne as MAX_LAYOUT_NAME, Kt as MIN_ALERT_BARS, b as MS_TIME_THRESHOLD, zr as MatrixChart, qt as MockAdapter, c as PLUGIN_API_VERSION, x as PRICE_SOURCES, Jt as PaperExecutionAdapter, Hr as PerformanceDashboard, o as PluginManager, Yt as PollingAdapter, Xt as RANGE_PRESETS, Zt as ReplayManager, Qt as ResamplingAdapter, S as SANS_FONT_FAMILY, Ir as ScatterChart, $t as Screenshot, en as SessionBreaks, tn as SessionShading, nn as SignalMarkerManager, Or as SparklineChart, rn as StreamManager, C as TC_PALETTE, w as TC_SERIES_COLORS, T as TIMEFRAMES_CRYPTO, E as TIMEFRAMES_FOREX, D as TIMEFRAMES_STOCK, i as ThemeManager, an as TickAggregator, on as TickBarAdapter, A as TickBarBuilder, sn as TradeZoneManager, De as UPCOM_SESSIONS, cn as UndoRedoManager, Oe as VN30F_SESSIONS, ke as VN_COLORS, Ae as VOLUME_ALPHA, ln as VolumeRenderer, Ar as WaterfallChart, un as Watermark, dn as WebSocketAdapter, pn as barIndexToX, je as barTimeUnit, Me as barsAreDaily, ae as cleanLayoutName, s as clearGlobalPlugins, J as computeDrawdownCurve, Y as computeMonthlyReturns, Ne as computePriceLimits, Sn as correlationMatrix, Cn as counterClockPhase, Tn as counterClockPoints, Pe as createVNTheme, Dn as detectCandlePatterns, Tr as feedBars, Fe as formatFraction, Ie as formatNumber, On as formatTooltipTime, Le as formatVND, Re as formatVolumeLoc, ze as fractionTick, Be as getCurrentSession, ie as getGlobalPlugins, Ve as getLocale, kn as histogramBins, An as indicatorCategory, He as indicatorSource, jn as isPriceLevelAlert, Ue as isPriceSource, We as isTimeFrame, Ge as isValidTimeZone, u as localStorageLayouts, Fn as lttbDownsample, In as lttbVisibleIndices, Ke as marketStatus, r as memoryLayouts, Ln as niceScale, qe as normalizeBar, Je as normalizeBarTime, Ye as offsetAt, Er as overlayScale, n as overlaysForLayer, Xe as parseIndicatorSource, oe as parseOHLCV, Ze as parseTimeframe, Qe as pickBaseTimeframe, le as pluginKey, $e as priceFormatterFor, et as priceStepAt, Rn as priceToY, zn as priceToYMapper, Vn as rangePresetStart, tt as rankSymbols, nt as readNews, rt as readQuote, it as registerLocale, te as registerPlugin, at as resampleBars, ot as roundToPriceStep, st as scaleMarketPrices, Q as selectKeyStats, tr as servesTimeframe, ct as setLocale, nr as setMaxWebGLCharts, lt as sourcePrice, ut as stepDecimals, dt as symbolTimeZone, br as syncIndicators, ft as t, pt as tickBarCount, ir as timeToX, ht as timeframeToMs, ar as timestampToBarIndex, q as toEquityPoints, sr as toHeikinAshi, cr as toKagi, lr as toLineBreak, ur as toPointAndFigure, dr as toRangeBars, fr as toRenko, l as unregisterPlugin, gt as vn30fContracts, _t as vn30fLastTradingDay, vt as volumeColor, yt as wallToUtc, pr as withResampling, mr as withTickBars, hr as xToBarIndex, gr as xToTime, _r as yToPrice, bt as zoneOffsetMinutes };
938
+ export { St as AlertManager, Ct as Animator, Fr as BarChart, wt as BarCountdown, Tt as BinanceAdapter, Et as BybitAdapter, Dt as CANDLE_PATTERNS, fe as CHART_STYLE_KEYS, zr as CalendarChart, a as Chart, Or as ChartGrid, Ot as ChartLegend, kt as ChartStateManager, At as CoinbaseAdapter, jt as CompareRenderer, Vr as CounterClockChart, Mt as CrosshairTooltip, Nt as CurrentPriceLine, pe as DARK_TERMINAL, me as DARK_THEME, ge as DEFAULT_DRAWING_STYLE, _e as DEFAULT_FONT_FAMILY, ue as DEFAULT_HISTORY_PAGE_SIZE, Pt as DEFAULT_LEGEND_CONFIG, Ft as DEFAULT_MAX_WEBGL_CHARTS, ve as DEFAULT_RECONNECT, It as DEFAULT_SESSION_HOURS, ye as DEFAULT_SIGNAL_STYLE, be as DEFAULT_STREAM_CONFIG, xe as DEFAULT_TIMEFRAME_FAVORITES, Se as DEFAULT_TRADE_ZONE_STYLE, Ce as DEFAULT_TRADING_CONFIG, Lt as DataExporter, e as DataManager, Ar as DepthChart, Ir as DonutChart, re as DragDropImporter, Rt as DrawingBase, ee as EXCHANGE_TIMEZONE, ce as EXCHANGE_TIME_ZONE, zt as Easing, H as EquityCurveChart, Pr as GaugeChart, t as HISTORY_RETRY_MS, we as HNX_SESSIONS, Te as HOSE_SESSIONS, U as HeatmapChart, Rr as HistogramChart, Vt as INDICATOR_CATEGORIES, Ht as IndicatorBase, Ut as IndicatorValueMap, Wt as KeyboardHandler, Gt as KrakenAdapter, Ee as LIGHT_THEME, de as LayoutManager, se as LayoutSession, f as MARKET_CRYPTO, p as MARKET_HNX, m as MARKET_HOSE, h as MARKET_HOSE_ETF, g as MARKET_NYSE, _ as MARKET_UPCOM, v as MARKET_VN30F, Kt as MAX_ALERT_BARS, ne as MAX_LAYOUT_NAME, qt as MIN_ALERT_BARS, y as MS_TIME_THRESHOLD, Br as MatrixChart, Jt as MockAdapter, c as PLUGIN_API_VERSION, b as PRICE_SOURCES, Yt as PaperExecutionAdapter, Ur as PerformanceDashboard, o as PluginManager, Xt as PollingAdapter, Zt as RANGE_PRESETS, Qt as ReplayManager, $t as ResamplingAdapter, x as SANS_FONT_FAMILY, Lr as ScatterChart, en as Screenshot, tn as SessionBreaks, nn as SessionShading, rn as SignalMarkerManager, kr as SparklineChart, an as StreamManager, S as TC_PALETTE, C as TC_SERIES_COLORS, w as TIMEFRAMES_CRYPTO, T as TIMEFRAMES_FOREX, E as TIMEFRAMES_STOCK, i as ThemeManager, on as TickAggregator, sn as TickBarAdapter, k as TickBarBuilder, cn as TradeZoneManager, Oe as UPCOM_SESSIONS, ln as UndoRedoManager, ke as VN30F_SESSIONS, Ae as VN_COLORS, je as VOLUME_ALPHA, un as VolumeRenderer, jr as WaterfallChart, dn as Watermark, fn as WebSocketAdapter, mn as barIndexToX, Me as barTimeUnit, Ne as barsAreDaily, ae as cleanLayoutName, s as clearGlobalPlugins, q as computeDrawdownCurve, J as computeMonthlyReturns, Pe as computePriceLimits, Cn as correlationMatrix, wn as counterClockPhase, En as counterClockPoints, Fe as createVNTheme, On as detectCandlePatterns, Er as feedBars, Ie as formatFraction, Le as formatNumber, kn as formatTooltipTime, Re as formatVND, ze as formatVolumeLoc, Be as fractionTick, Ve as getCurrentSession, ie as getGlobalPlugins, He as getLocale, An as histogramBins, jn as indicatorCategory, Ue as indicatorSource, Mn as isPriceLevelAlert, We as isPriceSource, Ge as isTimeFrame, Ke as isValidTimeZone, u as localStorageLayouts, In as lttbDownsample, Ln as lttbVisibleIndices, qe as marketStatus, r as memoryLayouts, Rn as niceScale, Je as normalizeBar, Ye as normalizeBarTime, Xe as offsetAt, Dr as overlayScale, n as overlaysForLayer, Ze as parseIndicatorSource, oe as parseOHLCV, Qe as parseTimeframe, $e as pickBaseTimeframe, le as pluginKey, et as priceFormatterFor, tt as priceStepAt, zn as priceToY, Bn as priceToYMapper, Hn as rangePresetStart, nt as rankSymbols, rt as readNews, it as readQuote, at as registerLocale, te as registerPlugin, ot as resampleBars, st as roundToPriceStep, ct as scaleMarketPrices, Q as selectKeyStats, nr as servesTimeframe, lt as setLocale, rr as setMaxWebGLCharts, ut as sourcePrice, dt as stepDecimals, ft as symbolTimeZone, xr as syncIndicators, pt as t, mt as tickBarCount, ar as timeToX, gt as timeframeToMs, or as timestampToBarIndex, K as toEquityPoints, cr as toHeikinAshi, lr as toKagi, ur as toLineBreak, dr as toPointAndFigure, fr as toRangeBars, pr as toRenko, l as unregisterPlugin, _t as vn30fContracts, vt as vn30fLastTradingDay, yt as volumeColor, bt as wallToUtc, mr as withResampling, hr as withTickBars, gr as xToBarIndex, _r as xToTime, vr as yToPrice, xt as zoneOffsetMinutes };
938
939
 
939
940
  //# sourceMappingURL=index.js.map