@tradecanvas/chart 1.50.0 → 1.52.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 (141) hide show
  1. package/README.md +1 -1
  2. package/dist/Chart.d.ts +194 -11
  3. package/dist/Chart.d.ts.map +1 -1
  4. package/dist/DataManager.d.ts +24 -0
  5. package/dist/DataManager.d.ts.map +1 -1
  6. package/dist/{LayoutSession-Dcvn5KMK.js → LayoutSession-4SLt8-0u.js} +676 -386
  7. package/dist/LayoutSession-4SLt8-0u.js.map +1 -0
  8. package/dist/LayoutSession-BOtFzvMm.cjs +2 -0
  9. package/dist/LayoutSession-BOtFzvMm.cjs.map +1 -0
  10. package/dist/SeriesStore.d.ts +31 -0
  11. package/dist/SeriesStore.d.ts.map +1 -1
  12. package/dist/charts/ChartTypeStrategy.d.ts +32 -5
  13. package/dist/charts/ChartTypeStrategy.d.ts.map +1 -1
  14. package/dist/finance/performanceData.d.ts +17 -2
  15. package/dist/finance/performanceData.d.ts.map +1 -1
  16. package/dist/frameworks/feedBars.d.ts +22 -6
  17. package/dist/frameworks/feedBars.d.ts.map +1 -1
  18. package/dist/i18n-BjW5GVrO.cjs +2 -0
  19. package/dist/i18n-BjW5GVrO.cjs.map +1 -0
  20. package/dist/{i18n-DjzoHpMJ.js → i18n-C7b-2BJ5.js} +33 -1
  21. package/dist/i18n-C7b-2BJ5.js.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.ts +6 -6
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +122 -98
  27. package/dist/index.js.map +1 -1
  28. package/dist/io/resampleOHLCV.d.ts +10 -4
  29. package/dist/io/resampleOHLCV.d.ts.map +1 -1
  30. package/dist/layout/labelWidths.d.ts +16 -0
  31. package/dist/layout/labelWidths.d.ts.map +1 -0
  32. package/dist/widget/ChartWidget.d.ts +278 -15
  33. package/dist/widget/ChartWidget.d.ts.map +1 -1
  34. package/dist/widget/ChartWidgetGrid.d.ts.map +1 -1
  35. package/dist/widget/WatchlistStore.d.ts.map +1 -1
  36. package/dist/widget/WidgetContextMenu.d.ts +25 -3
  37. package/dist/widget/WidgetContextMenu.d.ts.map +1 -1
  38. package/dist/widget/WidgetDataWindow.d.ts +7 -0
  39. package/dist/widget/WidgetDataWindow.d.ts.map +1 -1
  40. package/dist/widget/WidgetHotkeySheet.d.ts.map +1 -1
  41. package/dist/widget/WidgetIndicatorLegend.d.ts +23 -3
  42. package/dist/widget/WidgetIndicatorLegend.d.ts.map +1 -1
  43. package/dist/widget/WidgetIndicatorSettings.d.ts.map +1 -1
  44. package/dist/widget/WidgetLayoutsUI.d.ts.map +1 -1
  45. package/dist/widget/WidgetObjectTree.d.ts +7 -1
  46. package/dist/widget/WidgetObjectTree.d.ts.map +1 -1
  47. package/dist/widget/WidgetSettings.d.ts +11 -3
  48. package/dist/widget/WidgetSettings.d.ts.map +1 -1
  49. package/dist/widget/WidgetStatusBar.d.ts +110 -3
  50. package/dist/widget/WidgetStatusBar.d.ts.map +1 -1
  51. package/dist/widget/WidgetSymbolSearch.d.ts +73 -20
  52. package/dist/widget/WidgetSymbolSearch.d.ts.map +1 -1
  53. package/dist/widget/WidgetToolbar.d.ts +65 -6
  54. package/dist/widget/WidgetToolbar.d.ts.map +1 -1
  55. package/dist/widget/WidgetTradeMenu.d.ts.map +1 -1
  56. package/dist/widget/chartSettingsStore.d.ts +76 -0
  57. package/dist/widget/chartSettingsStore.d.ts.map +1 -0
  58. package/dist/widget/chartTemplates.d.ts.map +1 -1
  59. package/dist/widget/compareLegend.d.ts +20 -0
  60. package/dist/widget/compareLegend.d.ts.map +1 -0
  61. package/dist/widget/hostButtons.d.ts +5 -2
  62. package/dist/widget/hostButtons.d.ts.map +1 -1
  63. package/dist/widget/index.cjs +542 -127
  64. package/dist/widget/index.cjs.map +1 -1
  65. package/dist/widget/index.d.ts +1 -1
  66. package/dist/widget/index.d.ts.map +1 -1
  67. package/dist/widget/index.js +2909 -1750
  68. package/dist/widget/index.js.map +1 -1
  69. package/dist/widget/indicatorInputWords.d.ts +19 -0
  70. package/dist/widget/indicatorInputWords.d.ts.map +1 -0
  71. package/dist/widget/locales/ar.d.ts.map +1 -1
  72. package/dist/widget/locales/cs.d.ts.map +1 -1
  73. package/dist/widget/locales/da.d.ts.map +1 -1
  74. package/dist/widget/locales/de.d.ts.map +1 -1
  75. package/dist/widget/locales/el.d.ts.map +1 -1
  76. package/dist/widget/locales/en.d.ts +16 -0
  77. package/dist/widget/locales/en.d.ts.map +1 -1
  78. package/dist/widget/locales/es.d.ts.map +1 -1
  79. package/dist/widget/locales/et.d.ts.map +1 -1
  80. package/dist/widget/locales/fa.d.ts.map +1 -1
  81. package/dist/widget/locales/fr.d.ts.map +1 -1
  82. package/dist/widget/locales/he.d.ts.map +1 -1
  83. package/dist/widget/locales/hu.d.ts.map +1 -1
  84. package/dist/widget/locales/id.d.ts.map +1 -1
  85. package/dist/widget/locales/index.cjs +1 -1
  86. package/dist/widget/locales/index.cjs.map +1 -1
  87. package/dist/widget/locales/index.js +449 -1
  88. package/dist/widget/locales/index.js.map +1 -1
  89. package/dist/widget/locales/it.d.ts.map +1 -1
  90. package/dist/widget/locales/ja.d.ts.map +1 -1
  91. package/dist/widget/locales/ko.d.ts.map +1 -1
  92. package/dist/widget/locales/ms.d.ts.map +1 -1
  93. package/dist/widget/locales/nb.d.ts.map +1 -1
  94. package/dist/widget/locales/nl.d.ts.map +1 -1
  95. package/dist/widget/locales/pl.d.ts.map +1 -1
  96. package/dist/widget/locales/pt.d.ts.map +1 -1
  97. package/dist/widget/locales/ro.d.ts.map +1 -1
  98. package/dist/widget/locales/ru.d.ts.map +1 -1
  99. package/dist/widget/locales/sk.d.ts.map +1 -1
  100. package/dist/widget/locales/sv.d.ts.map +1 -1
  101. package/dist/widget/locales/th.d.ts.map +1 -1
  102. package/dist/widget/locales/tr.d.ts.map +1 -1
  103. package/dist/widget/locales/vi.d.ts.map +1 -1
  104. package/dist/widget/locales/zh.d.ts.map +1 -1
  105. package/dist/widget/locales/zhHant.d.ts.map +1 -1
  106. package/dist/widget/selectMenu.d.ts.map +1 -1
  107. package/dist/widget/settingsRows.d.ts +12 -3
  108. package/dist/widget/settingsRows.d.ts.map +1 -1
  109. package/dist/widget/symbolBadge.d.ts +26 -0
  110. package/dist/widget/symbolBadge.d.ts.map +1 -0
  111. package/dist/widget/symbolCatalog.d.ts +62 -0
  112. package/dist/widget/symbolCatalog.d.ts.map +1 -0
  113. package/dist/widget/symbolCell.d.ts +8 -0
  114. package/dist/widget/symbolCell.d.ts.map +1 -0
  115. package/dist/widget/symbolInfoView.d.ts +3 -0
  116. package/dist/widget/symbolInfoView.d.ts.map +1 -1
  117. package/dist/widget/symbolMatch.d.ts +38 -0
  118. package/dist/widget/symbolMatch.d.ts.map +1 -0
  119. package/dist/widget/symbolSearchFilters.d.ts +52 -0
  120. package/dist/widget/symbolSearchFilters.d.ts.map +1 -0
  121. package/dist/widget/types.d.ts +88 -11
  122. package/dist/widget/types.d.ts.map +1 -1
  123. package/dist/widget/widgetCompare.d.ts +18 -0
  124. package/dist/widget/widgetCompare.d.ts.map +1 -1
  125. package/dist/widget/widgetLayout.d.ts +13 -1
  126. package/dist/widget/widgetLayout.d.ts.map +1 -1
  127. package/dist/widget/widgetSettingsLook.d.ts +3 -1
  128. package/dist/widget/widgetSettingsLook.d.ts.map +1 -1
  129. package/dist/widget/widgetShareState.d.ts +8 -0
  130. package/dist/widget/widgetShareState.d.ts.map +1 -1
  131. package/dist/widget/widgetTimezones.d.ts +4 -1
  132. package/dist/widget/widgetTimezones.d.ts.map +1 -1
  133. package/dist/widget/widgetUI.d.ts +2 -1
  134. package/dist/widget/widgetUI.d.ts.map +1 -1
  135. package/package.json +3 -3
  136. package/dist/LayoutSession-BBw0ke8V.cjs +0 -2
  137. package/dist/LayoutSession-BBw0ke8V.cjs.map +0 -1
  138. package/dist/LayoutSession-Dcvn5KMK.js.map +0 -1
  139. package/dist/i18n-DVeWlg64.cjs +0 -2
  140. package/dist/i18n-DVeWlg64.cjs.map +0 -1
  141. 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, T as n, _ as r, a as i, b as a, c as o, d as s, f as c, g as l, h as u, i as ee, l as te, m as ne, n as re, o as ie, p as ae, r as oe, s as se, t as ce, u as le, v as ue, w as d, x as de, y as fe } from "./LayoutSession-4SLt8-0u.js";
2
+ import { CHART_STYLE_KEYS as pe, DARK_TERMINAL as me, DARK_THEME as he, DARK_THEME as ge, DEFAULT_DRAWING_STYLE as _e, DEFAULT_FONT_FAMILY as ve, DEFAULT_RECONNECT as ye, DEFAULT_SIGNAL_STYLE as be, DEFAULT_STREAM_CONFIG as xe, DEFAULT_TIMEFRAME_FAVORITES as Se, DEFAULT_TRADE_ZONE_STYLE as Ce, DEFAULT_TRADING_CONFIG as we, HNX_SESSIONS as Te, HOSE_SESSIONS as Ee, LIGHT_THEME as f, LIGHT_THEME as p, MARKET_CRYPTO as m, MARKET_HNX as h, MARKET_HOSE as g, MARKET_HOSE_ETF as _, MARKET_NYSE as v, MARKET_UPCOM as y, MARKET_VN30F as b, MS_TIME_THRESHOLD as x, PRICE_SOURCES as S, SANS_FONT_FAMILY as C, TC_PALETTE as w, TC_SERIES_COLORS as T, TIMEFRAMES_CRYPTO as E, TIMEFRAMES_FOREX as D, TIMEFRAMES_STOCK as De, 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, timeframeBucketStart as gt, timeframeToMs as _t, vn30fContracts as vt, vn30fLastTradingDay as yt, volumeColor as bt, wallToUtc as xt, zoneOffsetMinutes as St } from "@tradecanvas/commons";
3
+ import { AlertManager as Ct, Animator as wt, BarCountdown as Tt, BaseFinanceChart as O, BinanceAdapter as Et, BybitAdapter as Dt, CANDLE_PATTERNS as Ot, ChartLegend as kt, ChartStateManager as At, CoinbaseAdapter as jt, CompareRenderer as Mt, CrosshairTooltip as Nt, CurrentPriceLine as Pt, DEFAULT_LEGEND_CONFIG as Ft, DEFAULT_MAX_WEBGL_CHARTS as It, DEFAULT_SESSION_HOURS as Lt, DataExporter as Rt, DrawingBase as zt, Easing as Bt, FinanceCrosshair as k, GROUP_HEADER as Vt, INDICATOR_CATEGORIES as Ht, IndicatorBase as Ut, IndicatorValueMap as Wt, KEPT_BUCKETS as Gt, KeyboardHandler as Kt, KrakenAdapter as qt, MAX_ALERT_BARS as Jt, MIN_ALERT_BARS as Yt, MockAdapter as Xt, PaperExecutionAdapter as Zt, PollingAdapter as Qt, RANGE_PRESETS as $t, ReplayManager as en, ResamplingAdapter as tn, ReshapeMemo as nn, Screenshot as rn, SessionBreaks as an, SessionShading as on, SignalMarkerManager as sn, StreamManager as cn, TickAggregator as ln, TickBarAdapter as un, TickBarBuilder as A, TradeZoneManager as dn, UndoRedoManager as fn, VolumeRenderer as pn, Watermark as mn, WebSocketAdapter as hn, barIndexToTime as gn, barIndexToX as _n, barIndexToX as j, canvasMeasure as vn, computeBarLayout as yn, computeCalendarLayout as bn, computeCounterClockLayout as xn, computeDonutLayout as Sn, computeHistogramLayout as Cn, computeMatrixLayout as wn, computeScatterLayout as Tn, correlationMatrix as En, counterClockPhase as Dn, counterClockPhase as On, counterClockPoints as kn, counterClockPoints as An, detectCandlePatterns as jn, formatTooltipTime as Mn, histogramBins as Nn, hitBar as M, hitDay as N, hitMatrixCell as P, hitSlice as F, indicatorCategory as Pn, isPriceLevelAlert as Fn, layoutGroupedTreemap as In, layoutSquarifiedTreemap as Ln, layoutUniformGrid as Rn, lttbDownsample as zn, lttbVisibleIndices as Bn, nearestCounterClockPoint as I, nearestPoint as L, niceScale as Vn, priceToY as Hn, priceToYMapper as Un, priceToYMapper as Wn, rangePresetStart as Gn, renderBarChart as Kn, renderCalendar as qn, renderCounterClock as Jn, renderDepthChart as Yn, renderDonut as Xn, renderEquityCurve as Zn, renderGauge as Qn, renderHeatmap as $n, renderHistogram as er, renderMatrix as tr, renderScatter as nr, renderSparkline as rr, renderWaterfall as ir, servesTimeframe as ar, setMaxWebGLCharts as or, shownCount as sr, timeToX as cr, timestampToBarIndex as lr, timestampToBarIndex as ur, toHeikinAshi as dr, toKagi as fr, toLineBreak as pr, toPointAndFigure as mr, toRangeBars as hr, toRenko as gr, withResampling as _r, withTickBars as vr, xToBarIndex as yr, xToBarIndex as R, xToTime as br, yToPrice as xr, yToPrice as Sr } from "@tradecanvas/core";
4
4
  //#region src/frameworks/syncIndicators.ts
5
- function yr(e) {
5
+ function Cr(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 wr(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 = Cr(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,87 @@ 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 Tr = 3, 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 Er(e, t, r) {
39
+ for (let i = 0; i < r; i++) if (!n(e[i], t[i])) return !1;
40
40
  return !0;
41
41
  }
42
- function Sr(e, t) {
42
+ function Dr(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 Or(e, t, r) {
48
+ let i = [];
49
+ for (let a = 0; a < t.length; a++) {
50
+ let o = e[r + a];
51
+ if (!n(o, t[a])) {
52
+ if (o.time !== t[a].time || !d(o)) return null;
53
+ i.push(z(o));
54
+ }
55
+ }
56
+ return i;
57
+ }
58
+ function kr(e, t) {
59
+ if (t.length === 0) return !0;
60
+ if (!e.updateBar) return !1;
61
+ for (let n of t) if (!e.updateBar(n)) return !1;
62
+ return !0;
63
+ }
64
+ function Ar(e) {
65
+ return e.slice(Math.max(1, e.length - 1 - 3), -1).map(z);
66
+ }
67
+ function jr(e, t) {
48
68
  let n = [];
49
69
  for (let r = t; r < e.length; r++) {
50
70
  if (!d(e[r]) || !(e[r].time > e[r - 1].time)) return null;
51
- n.push(B(e[r]));
71
+ n.push(z(e[r]));
52
72
  }
53
73
  return n;
54
74
  }
55
- function wr(e, t, n) {
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;
58
- let i = t[r - 1];
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;
75
+ function Mr(e, t, r) {
76
+ let i = r.length;
77
+ if (i === 0 || !r.last || !d(r.last) || t.length < i || !Dr(e, r)) return !1;
78
+ let a = r.recent ?? [], o = i - 1 - a.length;
79
+ if (t !== r.source && (r.source.length !== i || !Er(r.source, t, o))) return !1;
80
+ let s = t[i - 1];
81
+ if (s.time !== r.last.time || !d(s)) return !1;
82
+ let c = Or(t, a, o), l = jr(t, i);
83
+ return !c || !l || !kr(e, c) ? !1 : (n(s, r.last) || e.updateLastBar(z(s)), l.length === 1 ? e.appendBar(l[0]) : l.length > 1 && e.appendBars(l), !0);
62
84
  }
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();
85
+ function Nr(e, t, n) {
86
+ (!n || !Mr(e, t, n)) && e.setData(t.map(z));
87
+ let r = t.length > 0 ? z(t[t.length - 1]) : null, i = e.isReplayActive();
66
88
  return {
67
89
  source: t,
68
90
  length: t.length,
69
91
  last: r,
70
- shownBar: i ? null : V(e.getData()),
92
+ recent: Ar(t),
93
+ shownBar: i ? null : B(e.getData()),
71
94
  inReplay: i
72
95
  };
73
96
  }
74
97
  //#endregion
75
98
  //#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;
99
+ function Pr(e) {
100
+ let { viewport: t, data: n } = e, r = Wn(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 ? ur(e, n) : e;
78
101
  return {
79
102
  timeToX: (e) => j(s(e), t),
80
103
  xToTime: (e) => {
81
104
  let r = R(e, t);
82
- return n.length > 0 ? fn(r, n) : r;
105
+ return n.length > 0 ? gn(r, n) : r;
83
106
  },
84
107
  indexToX: (e) => j(e, t),
85
108
  xToIndex: (e) => R(e, t),
86
109
  priceToY: r,
87
- yToPrice: (e) => vr(e, t),
110
+ yToPrice: (e) => Sr(e, t),
88
111
  barWidth: t.barWidth,
89
112
  visible: o < a ? {
90
113
  from: 0,
@@ -97,7 +120,7 @@ function Er(e) {
97
120
  }
98
121
  //#endregion
99
122
  //#region src/grid/ChartGrid.ts
100
- var H = {
123
+ var V = {
101
124
  "1x1": {
102
125
  cols: 1,
103
126
  rows: 1
@@ -130,7 +153,7 @@ var H = {
130
153
  cols: 2,
131
154
  rows: 3
132
155
  }
133
- }, Dr = class {
156
+ }, Fr = class {
134
157
  root;
135
158
  cells = [];
136
159
  layout;
@@ -141,17 +164,17 @@ var H = {
141
164
  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
165
  }
143
166
  applyLayout() {
144
- let { cols: e, rows: t } = H[this.layout], n = this.options.gap ?? 1;
167
+ let { cols: e, rows: t } = V[this.layout], n = this.options.gap ?? 1;
145
168
  this.root.style.gridTemplateColumns = `repeat(${e}, 1fr)`, this.root.style.gridTemplateRows = `repeat(${t}, 1fr)`, this.root.style.gap = `${n}px`;
146
169
  }
147
170
  createCells() {
148
- let { cols: e, rows: t } = H[this.layout], n = e * t;
171
+ let { cols: e, rows: t } = V[this.layout], n = e * t;
149
172
  for (let e = 0; e < n; e++) this.cells.push(this.createCell(e));
150
173
  }
151
174
  createCell(e) {
152
175
  let t = this.options.cells?.[e] ?? {}, n = document.createElement("div");
153
176
  n.style.cssText = "position:relative;overflow:hidden;min-width:0;min-height:0;", this.root.appendChild(n);
154
- let r = new a(n, {
177
+ let r = new o(n, {
155
178
  chartType: "candlestick",
156
179
  autoScale: !0,
157
180
  features: {
@@ -190,7 +213,7 @@ var H = {
190
213
  }
191
214
  setLayout(e) {
192
215
  if (e === this.layout) return;
193
- let t = this.cells.length, { cols: n, rows: r } = H[e], i = n * r;
216
+ let t = this.cells.length, { cols: n, rows: r } = V[e], i = n * r;
194
217
  if (i < t) for (let e = t - 1; e >= i; e--) {
195
218
  let t = this.cells[e];
196
219
  t.chart.destroy(), t.container.remove(), this.cells.pop();
@@ -237,13 +260,13 @@ var H = {
237
260
  this.cells = [], this.root.remove();
238
261
  }
239
262
  }
240
- }, Or = class extends O {
263
+ }, Ir = class extends O {
241
264
  options;
242
265
  constructor(e, t) {
243
266
  super(e, t.theme), this.options = t, this.requestRender();
244
267
  }
245
268
  renderChart(e, t, n, r) {
246
- $n(e, t, n, this.options, r);
269
+ rr(e, t, n, this.options, r);
247
270
  }
248
271
  update(e) {
249
272
  this.options = {
@@ -257,7 +280,7 @@ var H = {
257
280
  ...e
258
281
  }, this.requestRender();
259
282
  }
260
- }, kr = class extends O {
283
+ }, Lr = class extends O {
261
284
  options;
262
285
  crosshair = null;
263
286
  constructor(e, t) {
@@ -265,7 +288,7 @@ var H = {
265
288
  }
266
289
  renderChart(e, t, n, r) {
267
290
  let i = this.crosshair?.getPosition() ?? null;
268
- Gn(e, t, n, this.options, r, i);
291
+ Yn(e, t, n, this.options, r, i);
269
292
  }
270
293
  update(e) {
271
294
  this.options = {
@@ -282,7 +305,7 @@ var H = {
282
305
  destroy() {
283
306
  this.crosshair?.destroy(), super.destroy();
284
307
  }
285
- }, U = class extends O {
308
+ }, H = class extends O {
286
309
  options;
287
310
  crosshair = null;
288
311
  constructor(e, t) {
@@ -290,7 +313,7 @@ var H = {
290
313
  }
291
314
  renderChart(e, t, n, r) {
292
315
  let i = this.crosshair?.getPosition() ?? null;
293
- qn(e, t, n, this.options, r, i);
316
+ Zn(e, t, n, this.options, r, i);
294
317
  }
295
318
  update(e, t) {
296
319
  this.options = {
@@ -310,7 +333,7 @@ var H = {
310
333
  destroy() {
311
334
  this.crosshair?.destroy(), super.destroy();
312
335
  }
313
- }, W = class extends O {
336
+ }, U = class extends O {
314
337
  options;
315
338
  crosshair = null;
316
339
  cachedRects = [];
@@ -337,20 +360,20 @@ var H = {
337
360
  height: this.height
338
361
  }, t = this.options.cellPadding ?? 2;
339
362
  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) => ({
363
+ let { groups: n, cells: r } = In(this.currentData.map((e) => ({
341
364
  id: e.id,
342
365
  weight: e.weight ?? (Math.abs(e.value) || 1),
343
366
  group: e.group,
344
367
  value: e.value
345
- })), e, t, zt);
368
+ })), e, t, Vt);
346
369
  this.cachedRects = r, this.cachedGroups = n;
347
370
  } else if (this.options.weighted) {
348
371
  let n = this.currentData.map((e) => ({
349
372
  id: e.id,
350
373
  weight: e.weight ?? (Math.abs(e.value) || 1)
351
374
  }));
352
- this.cachedRects = Nn(n, e, t);
353
- } else this.cachedRects = Pn(this.currentData.map((e) => ({ id: e.id })), e, t);
375
+ this.cachedRects = Ln(n, e, t);
376
+ } else this.cachedRects = Rn(this.currentData.map((e) => ({ id: e.id })), e, t);
354
377
  }
355
378
  onCanvasClick(e, t) {
356
379
  if (this.options.onCellClick) for (let n of this.cachedRects) {
@@ -365,7 +388,7 @@ var H = {
365
388
  renderChart(e, t, n, r) {
366
389
  (t !== this.lastLayoutWidth || n !== this.lastLayoutHeight) && this.recomputeLayout();
367
390
  let i = this.crosshair?.getPosition() ?? null;
368
- Yn(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
391
+ $n(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
369
392
  }
370
393
  update(e) {
371
394
  this.currentData = e, this.options = {
@@ -382,7 +405,7 @@ var H = {
382
405
  destroy() {
383
406
  this.crosshair?.destroy(), this.handleClick && this.canvas.removeEventListener("click", this.handleClick), super.destroy();
384
407
  }
385
- }, Ar = class extends O {
408
+ }, Rr = class extends O {
386
409
  options;
387
410
  crosshair = null;
388
411
  constructor(e, t) {
@@ -390,7 +413,7 @@ var H = {
390
413
  }
391
414
  renderChart(e, t, n, r) {
392
415
  let i = this.crosshair?.getPosition() ?? null;
393
- er(e, t, n, this.options, r, i);
416
+ ir(e, t, n, this.options, r, i);
394
417
  }
395
418
  update(e) {
396
419
  this.options = {
@@ -407,12 +430,12 @@ var H = {
407
430
  destroy() {
408
431
  this.crosshair?.destroy(), super.destroy();
409
432
  }
410
- }, jr = 500;
411
- function Mr(e) {
433
+ }, zr = 500;
434
+ function Br(e) {
412
435
  let t = 1 - e;
413
436
  return 1 - t * t * t;
414
437
  }
415
- var Nr = class extends O {
438
+ var Vr = class extends O {
416
439
  options;
417
440
  currentValue;
418
441
  targetValue;
@@ -423,7 +446,7 @@ var Nr = class extends O {
423
446
  super(e, t.theme), this.options = t, this.currentValue = t.value, this.targetValue = t.value, this.requestRender();
424
447
  }
425
448
  renderChart(e, t, n, r) {
426
- Jn(e, t, n, this.options, r, this.currentValue);
449
+ Qn(e, t, n, this.options, r, this.currentValue);
427
450
  }
428
451
  setValue(e) {
429
452
  if (this.options.animate === !1) {
@@ -453,7 +476,7 @@ var Nr = class extends O {
453
476
  if (this.animationFrameId !== null) return;
454
477
  let e = () => {
455
478
  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);
479
+ let t = this.options.animationDuration ?? zr, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = Br(r);
457
480
  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
481
  };
459
482
  this.animationFrameId = requestAnimationFrame(e);
@@ -464,7 +487,7 @@ var Nr = class extends O {
464
487
  destroy() {
465
488
  this.cancelAnimation(), super.destroy();
466
489
  }
467
- }, G = class extends O {
490
+ }, W = class extends O {
468
491
  options;
469
492
  layout = null;
470
493
  layoutFor = null;
@@ -483,7 +506,7 @@ var Nr = class extends O {
483
506
  }
484
507
  renderChart(e, t, n, r) {
485
508
  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 = {
509
+ (!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, vn(e, r)), this.layoutFor = {
487
510
  options: this.options,
488
511
  width: t,
489
512
  height: n,
@@ -502,12 +525,12 @@ var Nr = class extends O {
502
525
  destroy() {
503
526
  this.crosshair.destroy(), this.canvas.removeEventListener("click", this.onClick), this.canvas.removeEventListener("pointermove", this.onMove), super.destroy();
504
527
  }
505
- }, Pr = class extends G {
528
+ }, Hr = class extends W {
506
529
  compute(e, t, n, r) {
507
- return hn(this.options, e, t, n, r);
530
+ return yn(this.options, e, t, n, r);
508
531
  }
509
532
  draw(e, t, n, r, i, a) {
510
- Hn(e, t, n, this.options, r, i, a);
533
+ Kn(e, t, n, this.options, r, i, a);
511
534
  }
512
535
  describe() {
513
536
  return `Bar chart of ${this.options.series.map((e) => e.name).join(", ")}, ${this.options.categories.length} categories`;
@@ -533,12 +556,12 @@ var Nr = class extends O {
533
556
  series: t
534
557
  });
535
558
  }
536
- }, Fr = class extends G {
559
+ }, Ur = class extends W {
537
560
  compute(e, t, n, r) {
538
- return vn(this.options, e, t, n, r);
561
+ return Sn(this.options, e, t, n, r);
539
562
  }
540
563
  draw(e, t, n, r, i, a) {
541
- Kn(e, t, n, this.options, r, i, a);
564
+ Xn(e, t, n, this.options, r, i, a);
542
565
  }
543
566
  describe() {
544
567
  let e = this.options.data.filter((e) => Number.isFinite(e.value) && e.value > 0).map((e) => e.label).join(", ");
@@ -557,12 +580,12 @@ var Nr = class extends O {
557
580
  update(e) {
558
581
  this.setOptions({ data: e });
559
582
  }
560
- }, Ir = class extends G {
583
+ }, Wr = class extends W {
561
584
  compute(e, t, n, r) {
562
- return xn(this.options, e, t, n, r);
585
+ return Tn(this.options, e, t, n, r);
563
586
  }
564
587
  draw(e, t, n, r, i, a) {
565
- Qn(e, t, n, this.options, r, i, a);
588
+ nr(e, t, n, this.options, r, i, a);
566
589
  }
567
590
  describe() {
568
591
  let e = this.options.series.reduce((e, t) => e + t.points.length, 0);
@@ -581,12 +604,12 @@ var Nr = class extends O {
581
604
  update(e) {
582
605
  this.setOptions({ series: e });
583
606
  }
584
- }, Lr = class extends G {
607
+ }, Gr = class extends W {
585
608
  compute(e, t, n, r) {
586
- return yn(this.options, e, t, n, r);
609
+ return Cn(this.options, e, t, n, r);
587
610
  }
588
611
  draw(e, t, n, r, i, a) {
589
- Xn(e, t, n, this.options, r, i, a);
612
+ er(e, t, n, this.options, r, i, a);
590
613
  }
591
614
  describe() {
592
615
  return `Histogram of ${this.options.values.length} values`;
@@ -601,12 +624,12 @@ var Nr = class extends O {
601
624
  update(e) {
602
625
  this.setOptions({ values: e });
603
626
  }
604
- }, Rr = class extends G {
627
+ }, Kr = class extends W {
605
628
  compute(e, t, n, r) {
606
- return gn(this.options, e, t, n, r);
629
+ return bn(this.options, e, t, n, r);
607
630
  }
608
631
  draw(e, t, n, r, i, a) {
609
- Un(e, t, n, this.options, r, i, a);
632
+ qn(e, t, n, this.options, r, i, a);
610
633
  }
611
634
  describe() {
612
635
  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];
@@ -625,16 +648,16 @@ var Nr = class extends O {
625
648
  update(e) {
626
649
  this.setOptions({ data: e });
627
650
  }
628
- }, K = 12, zr = class extends G {
651
+ }, G = 12, qr = class extends W {
629
652
  compute(e, t, n, r) {
630
- return bn(this.options, e, t, n, r);
653
+ return wn(this.options, e, t, n, r);
631
654
  }
632
655
  draw(e, t, n, r, i, a) {
633
- Zn(e, t, n, this.options, r, i, a);
656
+ tr(e, t, n, this.options, r, i, a);
634
657
  }
635
658
  describe() {
636
659
  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`;
660
+ 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
661
  }
639
662
  clickable() {
640
663
  return this.options.onCellClick !== void 0;
@@ -649,12 +672,12 @@ var Nr = class extends O {
649
672
  update(e) {
650
673
  this.setOptions({ values: e });
651
674
  }
652
- }, Br = class extends G {
675
+ }, Jr = class extends W {
653
676
  compute(e, t, n, r) {
654
- return _n(this.options, e, t, n, r);
677
+ return xn(this.options, e, t, n, r);
655
678
  }
656
679
  draw(e, t, n, r, i, a) {
657
- Wn(e, t, n, this.options, r, i, a);
680
+ Jn(e, t, n, this.options, r, i, a);
658
681
  }
659
682
  describe() {
660
683
  return `Counter-clock chart of price against volume, ${this.options.period ?? 25}-bar averages`;
@@ -670,12 +693,12 @@ var Nr = class extends O {
670
693
  r && this.options.onPointClick?.(r.point);
671
694
  }
672
695
  getPhase() {
673
- return wn(En(this.options.data, this.options.period ?? 25, rr(this.options)));
696
+ return On(An(this.options.data, this.options.period ?? 25, sr(this.options)));
674
697
  }
675
698
  update(e) {
676
699
  this.setOptions({ data: e });
677
700
  }
678
- }, Vr = [
701
+ }, Yr = [
679
702
  "Jan",
680
703
  "Feb",
681
704
  "Mar",
@@ -689,13 +712,13 @@ var Nr = class extends O {
689
712
  "Nov",
690
713
  "Dec"
691
714
  ];
692
- function q(e) {
715
+ function K(e) {
693
716
  return e.map((e) => ({
694
717
  time: e.time,
695
718
  value: e.equity
696
719
  }));
697
720
  }
698
- function J(e) {
721
+ function q(e) {
699
722
  let t = -Infinity;
700
723
  return e.map((e) => {
701
724
  e.equity > t && (t = e.equity);
@@ -706,11 +729,11 @@ function J(e) {
706
729
  };
707
730
  });
708
731
  }
709
- function Y(e) {
732
+ function J(e) {
710
733
  if (e.length === 0) return [];
711
734
  let t = [];
712
735
  for (let n of e) {
713
- let e = mt(n.time, "1M"), r = t[t.length - 1];
736
+ let e = gt(n.time, "1M"), r = t[t.length - 1];
714
737
  r && r.key === e ? r.close = n.equity : t.push({
715
738
  key: e,
716
739
  close: n.equity
@@ -723,13 +746,14 @@ function Y(e) {
723
746
  let a = new Date(e.key), o = a.getUTCFullYear(), s = a.getUTCMonth();
724
747
  r.push({
725
748
  id: `${o}-${String(s + 1).padStart(2, "0")}`,
726
- label: Vr[s],
749
+ label: Yr[s],
727
750
  group: String(o),
728
751
  value: i
729
752
  });
730
753
  }
731
754
  return r;
732
755
  }
756
+ var Y = 100;
733
757
  function X(e) {
734
758
  return `${e > 0 ? "+" : ""}${e.toFixed(2)}%`;
735
759
  }
@@ -740,12 +764,12 @@ function Q(e) {
740
764
  return [
741
765
  {
742
766
  label: "Total Return",
743
- value: X(e.totalReturnPct),
767
+ value: X(e.totalReturnPct * Y),
744
768
  tone: Z(e.totalReturnPct)
745
769
  },
746
770
  {
747
771
  label: "CAGR",
748
- value: X(e.cagr * 100),
772
+ value: X(e.cagr * Y),
749
773
  tone: Z(e.cagr)
750
774
  },
751
775
  {
@@ -760,12 +784,12 @@ function Q(e) {
760
784
  },
761
785
  {
762
786
  label: "Max Drawdown",
763
- value: X(e.maxDrawdownPct),
787
+ value: X(-Math.abs(e.maxDrawdownPct) * Y),
764
788
  tone: "negative"
765
789
  },
766
790
  {
767
791
  label: "Win Rate",
768
- value: `${(e.winRate * 100).toFixed(1)}%`,
792
+ value: `${(e.winRate * Y).toFixed(1)}%`,
769
793
  tone: "neutral"
770
794
  },
771
795
  {
@@ -783,9 +807,9 @@ function Q(e) {
783
807
  //#endregion
784
808
  //#region src/finance/PerformanceDashboard.ts
785
809
  function $(e) {
786
- return !e || e === "dark" ? he : e === "light" ? f : e;
810
+ return !e || e === "dark" ? ge : e === "light" ? p : e;
787
811
  }
788
- var Hr = class {
812
+ var Xr = class {
789
813
  options;
790
814
  theme;
791
815
  root;
@@ -828,24 +852,24 @@ var Hr = class {
828
852
  "gap:14px"
829
853
  ].join(";"), this.root.appendChild(o);
830
854
  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),
855
+ s.wrap.style.gridColumn = "1 / -1", o.appendChild(s.wrap), this.equityChart = new H(s.body, {
856
+ data: K(t.equityCurve),
833
857
  theme: e,
834
858
  lineColor: e.candleUp,
835
859
  fillArea: !0,
836
860
  crosshair: !0
837
861
  });
838
862
  let c = this.buildPanel("Drawdown", i, a);
839
- o.appendChild(c.wrap), this.drawdownChart = new U(c.body, {
840
- data: J(t.equityCurve),
863
+ o.appendChild(c.wrap), this.drawdownChart = new H(c.body, {
864
+ data: q(t.equityCurve),
841
865
  theme: e,
842
866
  lineColor: e.candleDown,
843
867
  fillArea: !0,
844
868
  crosshair: !0,
845
869
  valueFormat: (e) => `${e.toFixed(1)}%`
846
870
  });
847
- let l = Y(t.equityCurve), u = this.buildPanel("Monthly Returns", i, a);
848
- o.appendChild(u.wrap), this.heatmap = new W(u.body, {
871
+ let l = J(t.equityCurve), u = this.buildPanel("Monthly Returns", i, a);
872
+ o.appendChild(u.wrap), this.heatmap = new U(u.body, {
849
873
  data: l,
850
874
  theme: e,
851
875
  showValues: !0,
@@ -934,6 +958,6 @@ var Hr = class {
934
958
  }
935
959
  };
936
960
  //#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 };
961
+ export { Ct as AlertManager, wt as Animator, Hr as BarChart, Tt as BarCountdown, Et as BinanceAdapter, Dt as BybitAdapter, Ot as CANDLE_PATTERNS, pe as CHART_STYLE_KEYS, Tr as CORRECTABLE_BARS, Kr as CalendarChart, o as Chart, Fr as ChartGrid, kt as ChartLegend, At as ChartStateManager, jt as CoinbaseAdapter, Mt as CompareRenderer, Jr as CounterClockChart, Nt as CrosshairTooltip, Pt as CurrentPriceLine, me as DARK_TERMINAL, he as DARK_THEME, _e as DEFAULT_DRAWING_STYLE, ve as DEFAULT_FONT_FAMILY, de as DEFAULT_HISTORY_PAGE_SIZE, Ft as DEFAULT_LEGEND_CONFIG, It as DEFAULT_MAX_WEBGL_CHARTS, ye as DEFAULT_RECONNECT, Lt as DEFAULT_SESSION_HOURS, be as DEFAULT_SIGNAL_STYLE, xe as DEFAULT_STREAM_CONFIG, Se as DEFAULT_TIMEFRAME_FAVORITES, Ce as DEFAULT_TRADE_ZONE_STYLE, we as DEFAULT_TRADING_CONFIG, Rt as DataExporter, e as DataManager, Lr as DepthChart, Ur as DonutChart, ie as DragDropImporter, zt as DrawingBase, te as EXCHANGE_TIMEZONE, le as EXCHANGE_TIME_ZONE, Bt as Easing, H as EquityCurveChart, Vr as GaugeChart, t as HISTORY_RETRY_MS, Te as HNX_SESSIONS, Ee as HOSE_SESSIONS, U as HeatmapChart, Gr as HistogramChart, Ht as INDICATOR_CATEGORIES, Ut as IndicatorBase, Wt as IndicatorValueMap, Gt as KEPT_BUCKETS, Kt as KeyboardHandler, qt as KrakenAdapter, f as LIGHT_THEME, fe as LayoutManager, ce as LayoutSession, m as MARKET_CRYPTO, h as MARKET_HNX, g as MARKET_HOSE, _ as MARKET_HOSE_ETF, v as MARKET_NYSE, y as MARKET_UPCOM, b as MARKET_VN30F, Jt as MAX_ALERT_BARS, re as MAX_LAYOUT_NAME, Yt as MIN_ALERT_BARS, x as MS_TIME_THRESHOLD, qr as MatrixChart, Xt as MockAdapter, l as PLUGIN_API_VERSION, S as PRICE_SOURCES, Zt as PaperExecutionAdapter, Xr as PerformanceDashboard, s as PluginManager, Qt as PollingAdapter, $t as RANGE_PRESETS, en as ReplayManager, tn as ResamplingAdapter, nn as ReshapeMemo, C as SANS_FONT_FAMILY, Wr as ScatterChart, rn as Screenshot, an as SessionBreaks, on as SessionShading, sn as SignalMarkerManager, Ir as SparklineChart, cn as StreamManager, w as TC_PALETTE, T as TC_SERIES_COLORS, E as TIMEFRAMES_CRYPTO, D as TIMEFRAMES_FOREX, De as TIMEFRAMES_STOCK, a as ThemeManager, ln as TickAggregator, un as TickBarAdapter, A as TickBarBuilder, dn as TradeZoneManager, Oe as UPCOM_SESSIONS, fn as UndoRedoManager, ke as VN30F_SESSIONS, Ae as VN_COLORS, je as VOLUME_ALPHA, pn as VolumeRenderer, Rr as WaterfallChart, mn as Watermark, hn as WebSocketAdapter, _n as barIndexToX, Me as barTimeUnit, Ne as barsAreDaily, oe as cleanLayoutName, c as clearGlobalPlugins, q as computeDrawdownCurve, J as computeMonthlyReturns, Pe as computePriceLimits, En as correlationMatrix, Dn as counterClockPhase, kn as counterClockPoints, Fe as createVNTheme, jn as detectCandlePatterns, Nr as feedBars, Ie as formatFraction, Le as formatNumber, Mn as formatTooltipTime, Re as formatVND, ze as formatVolumeLoc, Be as fractionTick, Ve as getCurrentSession, ae as getGlobalPlugins, He as getLocale, Nn as histogramBins, Pn as indicatorCategory, Ue as indicatorSource, Fn as isPriceLevelAlert, We as isPriceSource, Ge as isTimeFrame, Ke as isValidTimeZone, ee as localStorageLayouts, zn as lttbDownsample, Bn as lttbVisibleIndices, qe as marketStatus, i as memoryLayouts, Vn as niceScale, Je as normalizeBar, Ye as normalizeBarTime, Xe as offsetAt, Pr as overlayScale, r as overlaysForLayer, Ze as parseIndicatorSource, se as parseOHLCV, Qe as parseTimeframe, $e as pickBaseTimeframe, ue as pluginKey, et as priceFormatterFor, tt as priceStepAt, Hn as priceToY, Un as priceToYMapper, Gn as rangePresetStart, nt as rankSymbols, rt as readNews, it as readQuote, at as registerLocale, ne as registerPlugin, ot as resampleBars, st as roundToPriceStep, ct as scaleMarketPrices, Q as selectKeyStats, ar as servesTimeframe, lt as setLocale, or as setMaxWebGLCharts, ut as sourcePrice, dt as stepDecimals, ft as symbolTimeZone, wr as syncIndicators, pt as t, mt as tickBarCount, cr as timeToX, ht as timeframeBucketStart, _t as timeframeToMs, lr as timestampToBarIndex, K as toEquityPoints, dr as toHeikinAshi, fr as toKagi, pr as toLineBreak, mr as toPointAndFigure, hr as toRangeBars, gr as toRenko, u as unregisterPlugin, vt as vn30fContracts, yt as vn30fLastTradingDay, bt as volumeColor, xt as wallToUtc, _r as withResampling, vr as withTickBars, yr as xToBarIndex, br as xToTime, xr as yToPrice, St as zoneOffsetMinutes };
938
962
 
939
963
  //# sourceMappingURL=index.js.map