@tradecanvas/commons 1.4.0 → 1.7.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 (61) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +67 -67
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.js +617 -122
  6. package/dist/index.js.map +1 -1
  7. package/dist/types/a11y.d.ts +18 -0
  8. package/dist/types/a11y.d.ts.map +1 -0
  9. package/dist/types/chart.d.ts +103 -2
  10. package/dist/types/chart.d.ts.map +1 -1
  11. package/dist/types/drawing.d.ts +85 -1
  12. package/dist/types/drawing.d.ts.map +1 -1
  13. package/dist/types/events.d.ts +139 -1
  14. package/dist/types/events.d.ts.map +1 -1
  15. package/dist/types/execution.d.ts +20 -1
  16. package/dist/types/execution.d.ts.map +1 -1
  17. package/dist/types/index.d.ts +4 -0
  18. package/dist/types/index.d.ts.map +1 -1
  19. package/dist/types/indicator.d.ts +81 -0
  20. package/dist/types/indicator.d.ts.map +1 -1
  21. package/dist/types/layout.d.ts +8 -0
  22. package/dist/types/layout.d.ts.map +1 -1
  23. package/dist/types/news.d.ts +18 -0
  24. package/dist/types/news.d.ts.map +1 -0
  25. package/dist/types/ohlc.d.ts +11 -1
  26. package/dist/types/ohlc.d.ts.map +1 -1
  27. package/dist/types/quote.d.ts +40 -0
  28. package/dist/types/quote.d.ts.map +1 -0
  29. package/dist/types/realtime.d.ts +50 -0
  30. package/dist/types/realtime.d.ts.map +1 -1
  31. package/dist/types/rendering.d.ts +11 -0
  32. package/dist/types/rendering.d.ts.map +1 -1
  33. package/dist/types/symbol.d.ts +42 -0
  34. package/dist/types/symbol.d.ts.map +1 -0
  35. package/dist/types/theme.d.ts +6 -0
  36. package/dist/types/theme.d.ts.map +1 -1
  37. package/dist/types/trading.d.ts +33 -2
  38. package/dist/types/trading.d.ts.map +1 -1
  39. package/dist/utils/chartTypeOptions.d.ts +9 -0
  40. package/dist/utils/chartTypeOptions.d.ts.map +1 -0
  41. package/dist/utils/drawingOptions.d.ts +8 -0
  42. package/dist/utils/drawingOptions.d.ts.map +1 -0
  43. package/dist/utils/drawingStyle.d.ts +9 -0
  44. package/dist/utils/drawingStyle.d.ts.map +1 -0
  45. package/dist/utils/index.d.ts +8 -0
  46. package/dist/utils/index.d.ts.map +1 -1
  47. package/dist/utils/marketStatus.d.ts +16 -0
  48. package/dist/utils/marketStatus.d.ts.map +1 -0
  49. package/dist/utils/precision.d.ts +18 -0
  50. package/dist/utils/precision.d.ts.map +1 -1
  51. package/dist/utils/priceSource.d.ts +15 -0
  52. package/dist/utils/priceSource.d.ts.map +1 -0
  53. package/dist/utils/resample.d.ts +13 -0
  54. package/dist/utils/resample.d.ts.map +1 -0
  55. package/dist/utils/symbols.d.ts +13 -0
  56. package/dist/utils/symbols.d.ts.map +1 -0
  57. package/dist/utils/time.d.ts +17 -6
  58. package/dist/utils/time.d.ts.map +1 -1
  59. package/dist/utils/timezone.d.ts +28 -0
  60. package/dist/utils/timezone.d.ts.map +1 -0
  61. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 TradeCanvas Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TradeCanvas Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,67 +1,67 @@
1
- # @tradecanvas/commons
2
-
3
- Shared types, utilities, constants, themes, i18n, and market presets for the [@tradecanvas/chart](https://www.npmjs.com/package/@tradecanvas/chart) library.
4
-
5
- **[Live Demo](https://bonguynvan.github.io/tradecanvas/)** | **[GitHub](https://github.com/bonguynvan/tradecanvas)** | **[Documentation](https://bonguynvan.github.io/tradecanvas/docs/getting-started/)**
6
-
7
- ## Install
8
-
9
- You don't need to install this package directly. It's included as a dependency of `@tradecanvas/chart`.
10
-
11
- ```bash
12
- npm install @tradecanvas/chart
13
- ```
14
-
15
- ## What's Inside
16
-
17
- ### Types
18
-
19
- All TypeScript interfaces and types used across the library:
20
-
21
- - `OHLCBar`, `DataSeries`, `TimeFrame` -- data format
22
- - `ChartOptions`, `ChartType`, `FeaturesConfig` -- chart configuration
23
- - `Theme`, `ThemeName` -- theming
24
- - `IndicatorPlugin`, `IndicatorDescriptor`, `IndicatorConfig` -- indicators
25
- - `DrawingToolType`, `DrawingState`, `DrawingStyle` -- drawing tools
26
- - `TradingPosition`, `TradingOrder`, `TradingConfig` -- trading overlay
27
- - `DataAdapter`, `StreamConfig`, `ConnectionState` -- real-time streaming
28
- - `ChartEventType`, `ChartEvent` -- events
29
- - `MarketConfig`, `TradingSession` -- market configuration
30
-
31
- ### Themes
32
-
33
- ```typescript
34
- import { DARK_THEME, LIGHT_THEME } from '@tradecanvas/commons'
35
- ```
36
-
37
- 19 customizable properties: `background`, `text`, `candleUp`, `candleDown`, `grid`, `crosshair`, `volumeUp`, `volumeDown`, and more.
38
-
39
- ### Constants
40
-
41
- - Default chart options and feature flags
42
- - Market presets: `MARKET_HOSE`, `MARKET_HNX`, `MARKET_UPCOM`, `MARKET_CRYPTO`, `MARKET_NYSE`
43
- - Vietnamese stock market color schemes
44
-
45
- ### Utilities
46
-
47
- - `computePriceRange()` -- compute visible price range from OHLC data
48
- - `timeframeToMs()` -- convert timeframe string to milliseconds
49
- - `formatNumber()`, `formatVND()`, `formatVolumeLoc()` -- number formatting
50
- - Color, math, precision, and data manipulation helpers
51
-
52
- ### i18n
53
-
54
- Built-in locales: English (`en`), Vietnamese (`vi`). Extensible via `registerLocale()`.
55
-
56
- ## Direct Usage
57
-
58
- If you need just the types or utilities without the full chart:
59
-
60
- ```typescript
61
- import type { OHLCBar, TimeFrame, ChartType } from '@tradecanvas/commons'
62
- import { DARK_THEME, computePriceRange, timeframeToMs } from '@tradecanvas/commons'
63
- ```
64
-
65
- ## License
66
-
67
- [MIT](https://github.com/bonguynvan/tradecanvas/blob/main/LICENSE)
1
+ # @tradecanvas/commons
2
+
3
+ Shared types, utilities, constants, themes, i18n, and market presets for the [@tradecanvas/chart](https://www.npmjs.com/package/@tradecanvas/chart) library.
4
+
5
+ **[Live Demo](https://bonguynvan.github.io/tradecanvas/)** | **[GitHub](https://github.com/bonguynvan/tradecanvas)** | **[Documentation](https://bonguynvan.github.io/tradecanvas/docs/getting-started/)**
6
+
7
+ ## Install
8
+
9
+ You don't need to install this package directly. It's included as a dependency of `@tradecanvas/chart`.
10
+
11
+ ```bash
12
+ npm install @tradecanvas/chart
13
+ ```
14
+
15
+ ## What's Inside
16
+
17
+ ### Types
18
+
19
+ All TypeScript interfaces and types used across the library:
20
+
21
+ - `OHLCBar`, `DataSeries`, `TimeFrame` -- data format
22
+ - `ChartOptions`, `ChartType`, `FeaturesConfig` -- chart configuration
23
+ - `Theme`, `ThemeName` -- theming
24
+ - `IndicatorPlugin`, `IndicatorDescriptor`, `IndicatorConfig` -- indicators
25
+ - `DrawingToolType`, `DrawingState`, `DrawingStyle` -- drawing tools
26
+ - `TradingPosition`, `TradingOrder`, `TradingConfig` -- trading overlay
27
+ - `DataAdapter`, `StreamConfig`, `ConnectionState` -- real-time streaming
28
+ - `ChartEventType`, `ChartEvent` -- events
29
+ - `MarketConfig`, `TradingSession` -- market configuration
30
+
31
+ ### Themes
32
+
33
+ ```typescript
34
+ import { DARK_THEME, LIGHT_THEME } from '@tradecanvas/commons'
35
+ ```
36
+
37
+ 19 customizable properties: `background`, `text`, `candleUp`, `candleDown`, `grid`, `crosshair`, `volumeUp`, `volumeDown`, and more.
38
+
39
+ ### Constants
40
+
41
+ - Default chart options and feature flags
42
+ - Market presets: `MARKET_HOSE`, `MARKET_HNX`, `MARKET_UPCOM`, `MARKET_CRYPTO`, `MARKET_NYSE`
43
+ - Vietnamese stock market color schemes
44
+
45
+ ### Utilities
46
+
47
+ - `computePriceRange()` -- compute visible price range from OHLC data
48
+ - `timeframeToMs()` -- convert timeframe string to milliseconds
49
+ - `formatNumber()`, `formatVND()`, `formatVolumeLoc()` -- number formatting
50
+ - Color, math, precision, and data manipulation helpers
51
+
52
+ ### i18n
53
+
54
+ Built-in locales: English (`en`), Vietnamese (`vi`). Extensible via `registerLocale()`.
55
+
56
+ ## Direct Usage
57
+
58
+ If you need just the types or utilities without the full chart:
59
+
60
+ ```typescript
61
+ import type { OHLCBar, TimeFrame, ChartType } from '@tradecanvas/commons'
62
+ import { DARK_THEME, computePriceRange, timeframeToMs } from '@tradecanvas/commons'
63
+ ```
64
+
65
+ ## License
66
+
67
+ [MIT](https://github.com/bonguynvan/tradecanvas/blob/main/LICENSE)
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=function(e){return e[e.Background=0]=`Background`,e[e.Main=1]=`Main`,e[e.Panel=2]=`Panel`,e[e.Overlay=3]=`Overlay`,e[e.UI=4]=`UI`,e[e.Hover=5]=`Hover`,e}({}),t={color:`#4c8dff`,lineWidth:1,lineStyle:`solid`,fillColor:`rgba(76, 141, 255, 0.1)`,fillOpacity:.1,fontSize:12},n={enabled:!0,orderColors:{buy:`#1fa874`,sell:`#e8505b`},positionColors:{profit:`#1fa874`,loss:`#e8505b`,entry:`#4c8dff`},depthOverlay:{enabled:!1,bidColor:`rgba(31, 168, 116,0.15)`,askColor:`rgba(232, 80, 91,0.15)`,maxWidth:100},contextMenu:{enabled:!0},pricePrecision:2,dragThreshold:3},r={longColor:`#1fa874`,shortColor:`#e8505b`,neutralColor:`#9E9E9E`,arrowSize:12,showLabel:!0,showConfidence:!0},i={profitColor:`#1fa874`,lossColor:`#e8505b`,activeColor:`#4c8dff`,fillOpacity:.12,borderWidth:1,showLabel:!0,showPnl:!0},a={enabled:!0,maxRetries:1/0,baseDelay:1e3,maxDelay:3e4,backoffMultiplier:2},o={historyLimit:500,autoScroll:!0,showCurrentPriceLine:!0,aggregateTicks:!1};function s(e,t,n){return Math.max(t,Math.min(n,e))}function c(e,t,n){return e+(t-e)*n}function l(e,t,n){return e===t?0:(n-e)/(t-e)}function u(e,t){return Math.round(e/t)*t}function d(e,t){let n=Math.floor(Math.log10(e)),r=e/10**n,i;return i=t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10,i*10**n}function f(e,t,n){return d(d(t-e,!1)/(n-1),!0)}function p(e){return e>0xe8d4a51000?e:e*1e3}function m(e){return{time:p(e.time??e.t??0),open:e.open??e.o??0,high:e.high??e.h??0,low:e.low??e.l??0,close:e.close??e.c??0,volume:e.volume??e.v??0}}function ee(e,t,n){let r=Math.max(0,t),i=Math.min(e.length,n+1);return e.slice(r,i)}function te(e,t){let n=0,r=e.length-1;for(;n<=r;){let i=n+r>>>1;if(e[i].time<t)n=i+1;else if(e[i].time>t)r=i-1;else return i}return n}function h(e,t,n,r=.05){if(e.length===0)return{min:0,max:1};let i=Math.max(0,t),a=Math.min(e.length-1,n),o=1/0,s=-1/0;for(let t=i;t<=a;t++)e[t].low<o&&(o=e[t].low),e[t].high>s&&(s=e[t].high);if(o===1/0)return{min:0,max:1};let c=s-o||1;return{min:o-c*r,max:s+c*r}}function g(e,t){return{...e,high:Math.max(e.high,t.price),low:Math.min(e.low,t.price),close:t.price,volume:e.volume+(t.volume??0),time:t.time}}function _(e,t=1){return`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t})`}function v(e,t){if(e.startsWith(`#`))return _(e,t);let n=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return n?`rgba(${n[1]}, ${n[2]}, ${n[3]}, ${t})`:e}function ne(e,t,n){let r=e=>(e=e.replace(`#`,``),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}),i=r(e),a=r(t);return`rgb(${Math.round(i.r+(a.r-i.r)*n)},${Math.round(i.g+(a.g-i.g)*n)},${Math.round(i.b+(a.b-i.b)*n)})`}var y={"1s":1e3,"5s":5e3,"15s":15e3,"30s":3e4,"1m":6e4,"3m":18e4,"5m":3e5,"15m":9e5,"30m":18e5,"45m":27e5,"1h":36e5,"2h":72e5,"3h":108e5,"4h":144e5,"6h":216e5,"8h":288e5,"12h":432e5,"1d":864e5,"2d":1728e5,"3d":2592e5,"1w":6048e5,"2w":12096e5,"1M":2592e6,"3M":7776e6,"6M":15552e6,"12M":31536e6};function re(e){return y[e]}function ie(e,t){let n=new Date(e),r=y[t];return r>=864e5?n.toLocaleDateString(void 0,{month:`short`,day:`numeric`}):r>=36e5?n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function ae(e,t){let n=y[t];return Math.floor(e/n)*n}function oe(e,t){if(t===null){let t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:t.getHours(),minutes:t.getMinutes()}}let n=new Date(e+t*6e4);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hours:n.getUTCHours(),minutes:n.getUTCMinutes()}}function se(e){return e.hours===0&&e.minutes===0}function ce(e){let t=e===null?-new Date().getTimezoneOffset():e,n=t>=0?`+`:`-`,r=Math.abs(t),i=Math.floor(r/60),a=r%60;return a===0?`UTC${n}${i}`:`UTC${n}${i}:${String(a).padStart(2,`0`)}`}var b=Date.UTC(1970,0,5);function le(e){let t=/^(\d+)([smhdwM])$/.exec(e);return t?{count:parseInt(t[1],10),unit:t[2]}:{count:1,unit:`m`}}function ue(e,t,n=1){let{count:r,unit:i}=le(t);if(i===`s`||i===`m`||i===`h`||i===`d`){let n=y[t];return Math.floor(e/n)*n}let a=new Date(e);if(i===`w`){let e=y[`1d`],t=(a.getUTCDay()-n+7)%7,i=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()-t);if(r<=1)return i;let o=Math.floor((i-b)/(7*e));return b+Math.floor(o/r)*r*7*e}let o=a.getUTCFullYear()*12+a.getUTCMonth(),s=Math.floor(o/r)*r;return Date.UTC(Math.floor(s/12),s%12,1)}var x=64,S=new Map;function C(e,t){let n=`${e}|${t}`,r=S.get(n);return r||(S.size>=x&&S.clear(),r=new Intl.NumberFormat(e,{minimumFractionDigits:t,maximumFractionDigits:t}),S.set(n,r)),r}function w(e,t=2,n=`en-US`){return C(n,t).format(e)}function T(e,t){if(!(t>e)||!Number.isFinite(e)||!Number.isFinite(t))return 2;let n=f(e,t,8);return n>0&&n<1?Math.ceil(-Math.log10(n))+1:2}function E(e,t,n,r=2,i=`en-US`){if((t===`percentage`||t===`indexedTo100`)&&n&&n!==0){if(t===`percentage`){let t=(e/n-1)*100;return`${t>0?`+`:``}${t.toFixed(2)}%`}return w(e/n*100,2,i)}return w(e,r,i)}function D(e){return e>=1e9?(e/1e9).toFixed(2)+`B`:e>=1e6?(e/1e6).toFixed(2)+`M`:e>=1e3?(e/1e3).toFixed(2)+`K`:e.toFixed(0)}function O(e){let t=0;for(let n of e){let e=n.toString(),r=e.indexOf(`.`);r>=0&&(t=Math.max(t,e.length-r-1))}return Math.min(t,8)}var k={autoScale:!0,rightMargin:5,minBarSpacing:2,maxBarSpacing:30,grid:{visible:!0,hLineStyle:`solid`,vLineStyle:`solid`},crosshair:{mode:`magnet`}},A=[`1s`,`1m`,`3m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`6h`,`8h`,`12h`,`1d`,`3d`,`1w`,`1M`],j=[`1m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`1d`,`1w`,`1M`,`3M`,`6M`,`12M`],M=[`1m`,`5m`,`15m`,`30m`,`1h`,`4h`,`1d`,`1w`,`1M`],N=[`1m`,`5m`,`15m`,`1h`,`4h`,`1d`,`1w`],P=8,F=2,I=70,L=30,R=60,z=120,B={family:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,sizeSmall:10,sizeMedium:12,sizeLarge:14},V={amber:`#f2a93b`,up:`#1fa874`,down:`#e8505b`,ochre:`#c98316`,blue:`#4c8dff`,violet:`#a57cff`,cyan:`#1398a8`,rose:`#e25592`,neutral:`#7d8696`,ink:`#0c1016`},H=[V.blue,V.ochre,V.violet,V.cyan,V.rose],U={name:`dark`,background:V.ink,text:`#d9dde4`,textSecondary:`#7d8696`,grid:`#161b23`,crosshair:`#8a93a3`,candleUp:`#3ccf91`,candleDown:`#f0616d`,candleUpWick:`#3ccf91`,candleDownWick:`#f0616d`,lineColor:V.amber,areaTopColor:`rgba(242, 169, 59, 0.32)`,areaBottomColor:`rgba(242, 169, 59, 0.0)`,volumeUp:`rgba(60, 207, 145, 0.28)`,volumeDown:`rgba(240, 97, 109, 0.28)`,axisLine:`#1f2630`,axisLabel:`#c3c9d3`,axisLabelBackground:`#1f2630`,font:B},de={name:`light`,background:`#ffffff`,text:`#0f131a`,textSecondary:`#6b7380`,grid:`#eef0f3`,crosshair:`#8a93a3`,candleUp:`#16a36a`,candleDown:`#d9414f`,candleUpWick:`#16a36a`,candleDownWick:`#d9414f`,lineColor:`#c77a0a`,areaTopColor:`rgba(199, 122, 10, 0.24)`,areaBottomColor:`rgba(199, 122, 10, 0.0)`,volumeUp:`rgba(22, 163, 106, 0.25)`,volumeDown:`rgba(217, 65, 79, 0.25)`,axisLine:`#dde1e7`,axisLabel:`#3f4754`,axisLabelBackground:`#eef0f3`,font:B},fe={name:`terminal`,background:`#0E0E0E`,text:`#C0C0C0`,textSecondary:`#8A8A8A`,grid:`#1A1A1A`,crosshair:`#666666`,candleUp:`#00FF87`,candleDown:`#FF3B4D`,candleUpWick:`#00FF87`,candleDownWick:`#FF3B4D`,lineColor:`#3D8BFD`,areaTopColor:`rgba(61, 139, 253, 0.3)`,areaBottomColor:`rgba(61, 139, 253, 0.0)`,volumeUp:`rgba(0, 255, 135, 0.2)`,volumeDown:`rgba(255, 59, 77, 0.2)`,axisLine:`#1A1A1A`,axisLabel:`#8A8A8A`,axisLabelBackground:`#1A1A1A`,font:{family:`'Roboto Mono', 'JetBrains Mono', 'SF Mono', Consolas, monospace`,sizeSmall:10,sizeMedium:12,sizeLarge:14}},W={candlestick:`Candlestick`,line:`Line`,area:`Area`,bar:`OHLC Bar`,price:`Price`,volume:`Volume`,time:`Time`,open:`Open`,high:`High`,low:`Low`,close:`Close`,sma:`SMA`,ema:`EMA`,bollingerBands:`Bollinger Bands`,vwap:`VWAP`,ichimoku:`Ichimoku Cloud`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Keltner Channel`,donchianChannel:`Donchian Channel`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Std Dev`,volumeProfile:`Volume Profile`,accumulationDistribution:`A/D Line`,vroc:`VROC`,trendLine:`Trend Line`,horizontalLine:`Horizontal Line`,verticalLine:`Vertical Line`,ray:`Ray`,extendedLine:`Extended Line`,parallelChannel:`Parallel Channel`,regressionChannel:`Regression Channel`,fibRetracement:`Fibonacci Retracement`,fibExtension:`Fibonacci Extension`,rectangle:`Rectangle`,ellipse:`Ellipse`,triangle:`Triangle`,pitchfork:`Andrews' Pitchfork`,elliottWave:`Elliott Wave`,priceRange:`Price Range`,dateRange:`Date Range`,measure:`Measure`,textTool:`Text`,arrow:`Arrow`,clearAll:`Clear All`,buy:`Buy`,sell:`Sell`,buyLimit:`Buy Limit`,sellLimit:`Sell Limit`,buyStop:`Buy Stop`,sellStop:`Sell Stop`,stopLoss:`Stop Loss`,takeProfit:`Take Profit`,market:`Market`,limit:`Limit`,stop:`Stop`,cancel:`Cancel`,modify:`Modify`,quantity:`Qty`,pnl:`P&L`,activeOrders:`Active Orders`,positions:`Positions`,noOrders:`No active orders`,noPositions:`No open positions`,placeOrder:`Place Order`,rightClickToTrade:`Right-click chart to place orders`,ceiling:`Ceiling`,floor:`Floor`,reference:`Reference`,session:`Session`,preOpen:`Pre-Open`,continuous:`Continuous`,preClose:`Pre-Close`,closed:`Closed`,settings:`Settings`,theme:`Theme`,darkTheme:`Dark`,lightTheme:`Light`,tools:`Tools`,indicators:`Indicators`,overlays:`Overlays`,panels:`Panels`,orders:`Orders`,autoScale:`Auto Scale`,crosshair:`Crosshair`,grid:`Grid`,loading:`Loading...`,error:`Error`,numberDecimalSeparator:`.`,numberGroupSeparator:`,`},G={candlestick:`Nến`,line:`Đường`,area:`Vùng`,bar:`Thanh OHLC`,price:`Giá`,volume:`Khối lượng`,time:`Thời gian`,open:`Mở`,high:`Cao`,low:`Thấp`,close:`Đóng`,sma:`SMA`,ema:`EMA`,bollingerBands:`Dải Bollinger`,vwap:`VWAP`,ichimoku:`Mây Ichimoku`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Kênh Keltner`,donchianChannel:`Kênh Donchian`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Độ lệch chuẩn`,volumeProfile:`Phân bổ KL`,accumulationDistribution:`Tích lũy/Phân phối`,vroc:`VROC`,trendLine:`Đường xu hướng`,horizontalLine:`Đường ngang`,verticalLine:`Đường dọc`,ray:`Tia`,extendedLine:`Đường kéo dài`,parallelChannel:`Kênh song song`,regressionChannel:`Kênh hồi quy`,fibRetracement:`Fibonacci thoái lui`,fibExtension:`Fibonacci mở rộng`,rectangle:`Hình chữ nhật`,ellipse:`Hình elip`,triangle:`Tam giác`,pitchfork:`Chĩa ba Andrews`,elliottWave:`Sóng Elliott`,priceRange:`Khoảng giá`,dateRange:`Khoảng thời gian`,measure:`Đo lường`,textTool:`Chữ`,arrow:`Mũi tên`,clearAll:`Xóa tất cả`,buy:`Mua`,sell:`Bán`,buyLimit:`Mua giới hạn`,sellLimit:`Bán giới hạn`,buyStop:`Mua chặn`,sellStop:`Bán chặn`,stopLoss:`Cắt lỗ`,takeProfit:`Chốt lời`,market:`Thị trường`,limit:`Giới hạn`,stop:`Dừng`,cancel:`Hủy`,modify:`Sửa`,quantity:`KL`,pnl:`Lãi/Lỗ`,activeOrders:`Lệnh chờ`,positions:`Vị thế`,noOrders:`Không có lệnh chờ`,noPositions:`Không có vị thế mở`,placeOrder:`Đặt lệnh`,rightClickToTrade:`Nhấp chuột phải để đặt lệnh`,ceiling:`Trần`,floor:`Sàn`,reference:`Tham chiếu`,session:`Phiên`,preOpen:`Trước giờ mở`,continuous:`Liên tục`,preClose:`Trước giờ đóng`,closed:`Đóng cửa`,settings:`Cài đặt`,theme:`Giao diện`,darkTheme:`Tối`,lightTheme:`Sáng`,tools:`Công cụ`,indicators:`Chỉ báo`,overlays:`Phủ lên`,panels:`Bảng`,orders:`Lệnh`,autoScale:`Tự co giãn`,crosshair:`Chữ thập`,grid:`Lưới`,loading:`Đang tải...`,error:`Lỗi`,numberDecimalSeparator:`,`,numberGroupSeparator:`.`},K=new Map([[`en`,W],[`vi`,G]]),q=`en`,J=W;function pe(e){q=e,J=K.get(e)??W}function me(){return q}function he(e){return J[e]??W[e]??e}function ge(e,t){K.set(e,t)}function _e(e){return K.get(e??q)??W}function Y(e,t=2,n){let r=K.get(n??q)??W,i=r.numberDecimalSeparator,a=r.numberGroupSeparator,[o,s]=e.toFixed(t).split(`.`),c=o.startsWith(`-`),l=c?o.slice(1):o,u=``;for(let e=l.length-1,t=0;e>=0;e--,t++)t>0&&t%3==0&&(u=a+u),u=l[e]+u;return c&&(u=`-`+u),s?u+i+s:u}function ve(e){return Y(e,0,`vi`)}function ye(e,t){return e>=1e9?Y(e/1e9,2,t??q)+`B`:e>=1e6?Y(e/1e6,2,t??q)+`M`:e>=1e3?Y(e/1e3,2,t??q)+`K`:Y(e,0,t??q)}var X={up:`#FF0000`,down:`#0000FF`,unchanged:`#FFD700`,ceiling:`#FF00FF`,floor:`#00FFFF`,reference:`#FFD700`},Z=[{name:`ATO`,startTime:`09:00`,endTime:`09:15`,type:`preOpen`},{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],Q=[{name:`Phiên 1`,startTime:`09:00`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],be={type:`stock`,exchange:`HOSE`,currency:`VND`,pricePrecision:2,volumeUnit:10,priceStep:.05,priceLimits:{enabled:!0,ceilingPercent:7,floorPercent:7},sessions:Z,colorScheme:X},xe={type:`stock`,exchange:`HNX`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,priceLimits:{enabled:!0,ceilingPercent:10,floorPercent:10},sessions:Q,colorScheme:X},Se={type:`stock`,exchange:`UPCOM`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,priceLimits:{enabled:!0,ceilingPercent:15,floorPercent:15},sessions:Q,colorScheme:X},Ce={type:`crypto`,currency:`USDT`,pricePrecision:2,priceLimits:{enabled:!1}},$={type:`stock`,exchange:`NYSE`,currency:`USD`,pricePrecision:2,priceStep:.01,priceLimits:{enabled:!1},sessions:[{name:`Pre-Market`,startTime:`04:00`,endTime:`09:30`,type:`preOpen`},{name:`Regular`,startTime:`09:30`,endTime:`16:00`,type:`continuous`},{name:`After-Hours`,startTime:`16:00`,endTime:`20:00`,type:`preClose`}]};function we(e){return{...e,candleUp:X.up,candleDown:X.down,candleUpWick:X.up,candleDownWick:X.down,volumeUp:`rgba(255, 0, 0, 0.3)`,volumeDown:`rgba(0, 0, 255, 0.3)`}}function Te(e,t){if(!t.priceLimits?.enabled||!t.priceLimits.ceilingPercent)return null;let n=t.priceLimits.ceilingPercent/100,r=(t.priceLimits.floorPercent??t.priceLimits.ceilingPercent)/100;return{ceiling:e*(1+n),floor:e*(1-r),reference:e}}function Ee(e){let t=new Date,n=`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`;for(let t of e)if(n>=t.startTime&&n<t.endTime)return t;return null}exports.DARK_TERMINAL=fe,exports.DARK_THEME=U,exports.DEFAULT_BAR_SPACING=F,exports.DEFAULT_BAR_WIDTH=P,exports.DEFAULT_CHART_OPTIONS=k,exports.DEFAULT_DRAWING_STYLE=t,exports.DEFAULT_PANEL_HEIGHT=z,exports.DEFAULT_RECONNECT=a,exports.DEFAULT_SIGNAL_STYLE=r,exports.DEFAULT_STREAM_CONFIG=o,exports.DEFAULT_TIMEFRAME_FAVORITES=N,exports.DEFAULT_TRADE_ZONE_STYLE=i,exports.DEFAULT_TRADING_CONFIG=n,exports.HNX_SESSIONS=Q,exports.HOSE_SESSIONS=Z,exports.LIGHT_THEME=de,exports.LayerType=e,exports.MARKET_CRYPTO=Ce,exports.MARKET_HNX=xe,exports.MARKET_HOSE=be,exports.MARKET_NYSE=$,exports.MARKET_UPCOM=Se,exports.MIN_PANEL_HEIGHT=R,exports.PRICE_AXIS_WIDTH=I,exports.TC_PALETTE=V,exports.TC_SERIES_COLORS=H,exports.TIMEFRAMES_CRYPTO=A,exports.TIMEFRAMES_FOREX=M,exports.TIMEFRAMES_STOCK=j,exports.TIME_AXIS_HEIGHT=L,exports.VN_COLORS=X,exports.alignToTimeframe=ae,exports.autoPricePrecision=T,exports.clamp=s,exports.computePriceLimits=Te,exports.computePriceRange=h,exports.computeTickStep=f,exports.createVNTheme=we,exports.detectPrecision=O,exports.en=W,exports.findBarIndex=te,exports.formatNumber=Y,exports.formatPrice=w,exports.formatPriceScaleLabel=E,exports.formatTimestamp=ie,exports.formatVND=ve,exports.formatVolume=D,exports.formatVolumeLoc=ye,exports.getCurrentSession=Ee,exports.getLocale=me,exports.getLocaleStrings=_e,exports.hexToRgba=_,exports.inverseLerp=l,exports.isDateOnly=se,exports.lerp=c,exports.lerpColor=ne,exports.mergeBar=g,exports.niceNumber=d,exports.normalizeBar=m,exports.normalizeBarTime=p,exports.registerLocale=ge,exports.roundToStep=u,exports.setLocale=pe,exports.sliceVisibleData=ee,exports.t=he,exports.timeParts=oe,exports.timeframeBucketStart=ue,exports.timeframeToMs=re,exports.tzLabel=ce,exports.vi=G,exports.withAlpha=v;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=function(e){return e[e.Background=0]=`Background`,e[e.Main=1]=`Main`,e[e.Panel=2]=`Panel`,e[e.Overlay=3]=`Overlay`,e[e.UI=4]=`UI`,e[e.Hover=5]=`Hover`,e}({}),t={color:`#4c8dff`,lineWidth:1,lineStyle:`solid`,fillColor:`rgba(76, 141, 255, 0.1)`,fillOpacity:.1,fontSize:12},n={enabled:!0,orderColors:{buy:`#1fa874`,sell:`#e8505b`},positionColors:{profit:`#1fa874`,loss:`#e8505b`,entry:`#4c8dff`},depthOverlay:{enabled:!1,bidColor:`rgba(31, 168, 116,0.15)`,askColor:`rgba(232, 80, 91,0.15)`,maxWidth:100},contextMenu:{enabled:!0},lineButtons:{cancel:!0,close:!0,reverse:!0,removeStops:!0},fillMarks:!0,pricePrecision:2,dragThreshold:3},r={longColor:`#1fa874`,shortColor:`#e8505b`,neutralColor:`#9E9E9E`,arrowSize:12,showLabel:!0,showConfidence:!0},i={profitColor:`#1fa874`,lossColor:`#e8505b`,activeColor:`#4c8dff`,fillOpacity:.12,borderWidth:1,showLabel:!0,showPnl:!0},a={enabled:!0,maxRetries:1/0,baseDelay:1e3,maxDelay:3e4,backoffMultiplier:2},o={historyLimit:500,autoScroll:!0,showCurrentPriceLine:!0,aggregateTicks:!1},s=[`change`,`changePercent`,`open`,`high`,`low`,`prevClose`,`volume`,`bid`,`ask`,`time`];function c(e){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.symbol==`string`?t.symbol.trim():``;if(!n||n.length>64||!l(t.last))return null;let r={symbol:n,last:t.last};for(let e of s){let n=t[e];l(n)&&(r[e]=n)}let i=r.prevClose??r.open;if(r.change===void 0&&i!==void 0&&(r.change=r.last-i),r.changePercent===void 0&&r.change!==void 0){let e=r.last-r.change;e!==0&&(r.changePercent=r.change/e*100)}return r}function l(e){return typeof e==`number`&&Number.isFinite(e)}var u=300,d=1e3,f=(e,t)=>{if(typeof e!=`string`)return;let n=e.trim();return n?n.slice(0,t):void 0},ee=e=>{if(typeof e==`string`)try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.href:void 0}catch{return}};function te(e,t=20){if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t,r=f(e.title,u);if(!r||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let i={title:r,time:e.time},a=ee(e.url);a&&(i.url=a);let o=f(e.source,u);o&&(i.source=o);let s=f(e.summary,d);s&&(i.summary=s);let c=f(e.id,u);c&&(i.id=c),n.push(i)}return n.sort((e,t)=>t.time-e.time).slice(0,Math.max(0,t))}function ne(e,t,n){return Math.max(t,Math.min(n,e))}function re(e,t,n){return e+(t-e)*n}function ie(e,t,n){return e===t?0:(n-e)/(t-e)}function ae(e,t){return Math.round(e/t)*t}function p(e,t){let n=Math.floor(Math.log10(e)),r=e/10**n,i;return i=t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10,i*10**n}function m(e,t,n){return p(p(t-e,!1)/(n-1),!0)}function h(e){return e>0xe8d4a51000?e:e*1e3}function oe(e){return{time:h(e.time??e.t??0),open:e.open??e.o??0,high:e.high??e.h??0,low:e.low??e.l??0,close:e.close??e.c??0,volume:e.volume??e.v??0}}function se(e,t,n){let r=Math.max(0,t),i=Math.min(e.length,n+1);return e.slice(r,i)}function ce(e,t){let n=0,r=e.length-1;for(;n<=r;){let i=n+r>>>1;if(e[i].time<t)n=i+1;else if(e[i].time>t)r=i-1;else return i}return n}function le(e,t,n,r=.05){if(e.length===0)return{min:0,max:1};let i=Math.max(0,t),a=Math.min(e.length-1,n),o=1/0,s=-1/0;for(let t=i;t<=a;t++)e[t].low<o&&(o=e[t].low),e[t].high>s&&(s=e[t].high);if(o===1/0)return{min:0,max:1};let c=s-o||1;return{min:o-c*r,max:s+c*r}}function ue(e,t){return{...e,high:Math.max(e.high,t.price),low:Math.min(e.low,t.price),close:t.price,volume:e.volume+(t.volume??0),time:t.time}}function g(e,t=1){return`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t})`}function de(e,t){if(e.startsWith(`#`))return g(e,t);let n=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return n?`rgba(${n[1]}, ${n[2]}, ${n[3]}, ${t})`:e}function fe(e,t,n){let r=e=>(e=e.replace(`#`,``),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}),i=r(e),a=r(t);return`rgb(${Math.round(i.r+(a.r-i.r)*n)},${Math.round(i.g+(a.g-i.g)*n)},${Math.round(i.b+(a.b-i.b)*n)})`}var _=6e4,v=1440*_,y=15*_,pe=8192,b=7*v,me=4096,he=new Set([`UTC`,`Etc/UTC`,`GMT`,`Etc/GMT`,`UCT`,`Etc/UCT`,`Universal`,`Etc/Universal`,`Zulu`,`Etc/Zulu`]),ge=new Map,x=new Map,_e=new Map;function ve(e){let t=ge.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),ge.set(e,t)),t}function ye(e){if(!e)return!1;try{return ve(e),!0}catch{return!1}}function S(e,t){if(!Number.isFinite(t)||he.has(e))return 0;let n=_e.get(e);n||(n=new Map,_e.set(e,n));let r=Math.floor(t/b),i=n.get(r);return i||(i=be(e,r*b),n.size>=me&&n.clear(),n.set(r,i)),t<i.change?i.before:i.after}function be(e,t){let n=C(e,t),r=t+b-y,i=C(e,r);if(i===n)return{before:n,change:1/0,after:i};let a=t;for(;r-a>y;){let t=a+Math.floor((r-a)/y/2)*y;C(e,t)===n?a=t:r=t}return{before:n,change:r,after:i}}function C(e,t){let n=Math.floor(t/y),r=`${e}|${n}`,i=x.get(r);if(i!==void 0)return i;let a=n*y,o=1970,s=1,c=1,l=0,u=0,d=0;for(let t of ve(e).formatToParts(new Date(a))){let e=Number(t.value);switch(t.type){case`year`:o=e;break;case`month`:s=e;break;case`day`:c=e;break;case`hour`:l=e%24;break;case`minute`:u=e;break;case`second`:d=e;break}}let f=Math.round((Date.UTC(o,s-1,c,l,u,d)-a)/_);return x.size>=pe&&x.clear(),x.set(r,f),f}function w(e,t){return e===null?-new Date(t).getTimezoneOffset():typeof e==`number`?e:S(e,t)}function xe(e,t){let n=e-w(t,e-v)*_;if(n+w(t,n)*_===e)return n;let r=e-w(t,e+v)*_;return r+w(t,r)*_===e?r:n}var T=new Map;function Se(e,t,n){let r=`${e}|${JSON.stringify(t)}|${n===null?`local`:typeof n==`number`?`fixed:${n}`:n}`,i=T.get(r);if(i)return i;let a=n===null?void 0:typeof n==`number`?`UTC`:n,o;try{o=new Intl.DateTimeFormat(e,{...t,timeZone:a})}catch{o=new Intl.DateTimeFormat(`en-US`,{...t,timeZone:a})}let s=typeof n==`number`?n*_:0;return i=e=>o.format(new Date(e+s)),T.set(r,i),i}var Ce={"1s":1e3,"5s":5e3,"15s":15e3,"30s":3e4,"1m":6e4,"3m":18e4,"5m":3e5,"15m":9e5,"30m":18e5,"45m":27e5,"1h":36e5,"2h":72e5,"3h":108e5,"4h":144e5,"6h":216e5,"8h":288e5,"12h":432e5,"1d":864e5,"2d":1728e5,"3d":2592e5,"1w":6048e5,"2w":12096e5,"1M":2592e6,"3M":7776e6,"6M":15552e6,"12M":31536e6},E={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:2592e6},we=/^([1-9]\d*)([smhdwM])$/;function D(e){let t=we.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)?{count:n,unit:t[2]}:null}var Te=1e6;function Ee(e){let t=/^([1-9]\d*)T$/.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)&&n<=Te?n:null}function De(e){return D(e)!==null}function O(e){let t=Ce[e];if(t!==void 0)return t;let n=D(e);return n?n.count*E[n.unit]:NaN}function Oe(e,t){let n=new Date(e),r=O(t);return r>=864e5?n.toLocaleDateString(void 0,{month:`short`,day:`numeric`}):r>=36e5?n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):n.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function ke(e,t){let n=O(t);return Math.floor(e/n)*n}function Ae(e,t){if(t===null){let t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:t.getHours(),minutes:t.getMinutes()}}let n=new Date(e+w(t,e)*6e4);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hours:n.getUTCHours(),minutes:n.getUTCMinutes()}}function je(e){return e.hours===0&&e.minutes===0}function Me(e,t=Date.now()){let n=w(e,t),r=n>=0?`+`:`-`,i=Math.abs(n),a=Math.floor(i/60),o=i%60;return o===0?`UTC${r}${a}`:`UTC${r}${a}:${String(o).padStart(2,`0`)}`}var k=Date.UTC(1970,0,5);function A(e,t,n=1){let{count:r,unit:i}=D(t)??{count:1,unit:`m`};if(i===`s`||i===`m`||i===`h`||i===`d`){let t=r*E[i];return Math.floor(e/t)*t}let a=new Date(e);if(i===`w`){let e=E.d,t=(a.getUTCDay()-n+7)%7,i=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()-t);if(r<=1)return i;let o=Math.floor((i-k)/(7*e));return k+Math.floor(o/r)*r*7*e}let o=a.getUTCFullYear()*12+a.getUTCMonth(),s=Math.floor(o/r)*r;return Date.UTC(Math.floor(s/12),s%12,1)}var Ne=64,j=new Map;function Pe(e,t){let n=`${e}|${t}`,r=j.get(n);return r||(j.size>=Ne&&j.clear(),r=new Intl.NumberFormat(e,{minimumFractionDigits:t,maximumFractionDigits:t}),j.set(n,r)),r}function M(e,t=2,n=`en-US`){return Pe(n,t).format(e)}function Fe(e,t){if(!(t>e)||!Number.isFinite(e)||!Number.isFinite(t))return 2;let n=m(e,t,8);return n>0&&n<1?Math.ceil(-Math.log10(n))+1:2}function Ie(e,t,n,r=2,i=`en-US`){if((t===`percentage`||t===`indexedTo100`)&&n&&n!==0){if(t===`percentage`){let t=(e/n-1)*100;return`${t>0?`+`:``}${t.toFixed(2)}%`}return M(e/n*100,2,i)}return M(e,r,i)}function N(e,t,n=1){let r=Number.isInteger(n)&&n>1?n:1;if(!Number.isFinite(e)||!Number.isInteger(t)||t<2)return String(e);let i=t*r,a=Math.round(Math.abs(e)*i),o=Math.floor(a/i),s=a-o*i,c=Math.floor(s/r),l=String(t-1).length,u=r>1?String(Math.floor((s-c*r)/r*10)):``;return`${e<0&&a>0?`-`:``}${o}'${String(c).padStart(l,`0`)}${u}`}function P(e){if(!Number.isInteger(e.denominator)||e.denominator<2)return null;let t=Number.isInteger(e.subDenominator)&&(e.subDenominator??0)>1?e.subDenominator:1;return 1/(e.denominator*t)}function Le(e){return e?typeof e==`function`?e:P(e)===null?null:t=>N(t,e.denominator,e.subDenominator):null}function Re(e){return e>=1e9?(e/1e9).toFixed(2)+`B`:e>=1e6?(e/1e6).toFixed(2)+`M`:e>=1e3?(e/1e3).toFixed(2)+`K`:e.toFixed(0)}function ze(e){let t=0;for(let n of e){let e=n.toString(),r=e.indexOf(`.`);r>=0&&(t=Math.max(t,e.length-r-1))}return Math.min(t,8)}var F=[`close`,`open`,`high`,`low`,`hl2`,`hlc3`,`ohlc4`,`hlcc4`];function Be(e){return typeof e==`string`&&F.includes(e)}function Ve(e,t){switch(t){case`open`:return e.open;case`high`:return e.high;case`low`:return e.low;case`hl2`:return(e.high+e.low)/2;case`hlc3`:return(e.high+e.low+e.close)/3;case`ohlc4`:return(e.open+e.high+e.low+e.close)/4;case`hlcc4`:return(e.high+e.low+2*e.close)/4;default:return e.close}}var He=/^ind:([^:]+):(.+)$/;function Ue(e,t){return`ind:${e}:${t}`}function We(e){if(typeof e!=`string`)return null;let t=He.exec(e);return t?{instanceId:t[1],key:t[2]}:null}var Ge=864e5;function Ke(e,t,n=1){let r=[],i=null;for(let a of e){let e=A(a.time,t,n);i===null||e!==i.time?(i={time:e,open:a.open,high:a.high,low:a.low,close:a.close,volume:a.volume},r.push(i)):(a.high>i.high&&(i.high=a.high),a.low<i.low&&(i.low=a.low),i.close=a.close,i.volume+=a.volume)}return r}var I=e=>e===`s`||e===`m`||e===`h`||e===`d`;function qe(e,t){let n=D(e),r=D(t);if(!n||!r)return!1;let i=O(e);return n.unit===`d`&&n.count>1?!1:I(r.unit)?I(n.unit)&&O(t)%i===0:n.unit===r.unit?r.count%n.count===0:I(n.unit)&&Ge%i===0}function Je(e,t){let n=null,r=0;for(let i of t){if(!qe(i,e))continue;let t=O(i);t>r&&(n=i,r=t)}return n}function L(e,t){if(!e)return 0;if(e===t)return 1e3;if(e.startsWith(t))return 600-Math.min(100,e.length-t.length);let n=e.indexOf(t);return n>=0?300-Math.min(100,n):0}function Ye(e,t,n=50,r){let i=t.trim().toUpperCase();if(!i)return e.slice(0,n);let a=[];for(let t of e){let e=Math.max(L(t.symbol.toUpperCase(),i),L((t.description??``).toUpperCase(),i)*.8);e>0&&a.push({info:t,score:e+(r?.(t)??0)})}return a.sort((e,t)=>t.score-e.score||e.info.symbol.localeCompare(t.info.symbol)),a.slice(0,n).map(e=>e.info)}function Xe(e){let t=typeof e==`number`?e:Number(e);if(!Number.isFinite(t)||t<=0)return 0;for(let e=0;e<=12;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9*Math.max(1,n))return e}return 12}function R(e){let t=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n===24&&r===0?1440:n<24&&r<60?n*60+r:null}var z=864e5,B=6e4,Ze=8;function Qe(e,t){let n=e?.timezone,r=(e?.sessions??[]).flatMap(e=>{let t=R(e.start),n=R(e.end);return t===null||n===null||t===n?[]:[{start:t,end:n,days:Array.isArray(e.days)?e.days:null}]});if(!n||!ye(n)||r.length===0||!Number.isFinite(t))return{state:`always`,next:null};let i=S(n,t)*B,a=Math.floor((t+i)/z)*z,o=e=>e-S(n,e-S(n,e-i)*B)*B,s=[];for(let e=-1;e<=Ze;e++){let t=a+e*z,n=(Math.floor(t/z)+4)%7;for(let e of r){if(e.days&&!e.days.includes(n))continue;let r=t+e.start*B,i=(e.end>e.start?t:t+z)+e.end*B;s.push([o(r),o(i)])}}s.sort((e,t)=>e[0]-t[0]);let c=[];for(let[e,t]of s){let n=c[c.length-1];n&&e<=n[1]?c[c.length-1]=[n[0],Math.max(n[1],t)]:c.push([e,t])}let l=c.find(([e,n])=>e<=t&&t<n);if(l)return{state:`open`,next:l[1]};let u=c.find(([e])=>e>t);return{state:`closed`,next:u?u[0]:null}}var $e=48,et=2e3,tt=1e4;function nt(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(t.length>=$e)break;if(typeof n!=`object`||!n)continue;let{value:e,visible:r,color:i}=n;if(typeof e!=`number`||!Number.isFinite(e)||Math.abs(e)>tt||r!==void 0&&typeof r!=`boolean`)continue;let a={value:e,visible:r??!0};typeof i==`string`&&i&&(a.color=i),t.push(a)}return t}function V(e,t){switch(e.kind){case`boolean`:return typeof t==`boolean`?t:void 0;case`number`:return typeof t!=`number`||!Number.isFinite(t)?void 0:Math.min(e.max??1/0,Math.max(e.min??-1/0,t));case`choice`:return typeof t==`string`&&e.choices.some(e=>e.value===t)?t:void 0;case`levels`:return nt(t);case`text`:return typeof t==`string`?t.slice(0,et):void 0}}function rt(e,t){if(!e||typeof t!=`object`||!t)return{};let n={};for(let[r,i]of Object.entries(t)){let t=e[r];if(!t)continue;let a=V(t,i);a!==void 0&&(n[r]=a)}return n}function it(e){return Array.isArray(e)?e.map(e=>({...e})):e}function at(e,t,n){let r=e?.[n];return r?it((t&&n in t?V(r,t[n]):void 0)??r.default):t?.[n]}function ot(e,t){let n={};for(let r of Object.keys(e??{}))n[r]=at(e,t,r);return n}var st=[`solid`,`dashed`,`dotted`],ct=64,lt=2e3,ut=20,dt=200;function H(e,t,n){return typeof e==`number`&&Number.isFinite(e)?Math.min(n,Math.max(t,e)):void 0}function ft(e){return typeof e==`string`&&e.length>0&&e.length<=ct?e:void 0}function pt(e){if(typeof e!=`object`||!e)return{};let t=e,n={},r=ft(t.color);r!==void 0&&(n.color=r);let i=H(t.lineWidth,.5,ut);i!==void 0&&(n.lineWidth=i),st.includes(t.lineStyle)&&(n.lineStyle=t.lineStyle);let a=ft(t.fillColor);a!==void 0&&(n.fillColor=a);let o=H(t.fillOpacity,0,1);o!==void 0&&(n.fillOpacity=o);let s=H(t.fontSize,6,dt);return s!==void 0&&(n.fontSize=s),typeof t.text==`string`&&(n.text=t.text.slice(0,lt)),n}var U=e=>typeof e==`number`&&Number.isFinite(e)&&e>0,W=(e,t,n)=>typeof e==`number`&&Number.isInteger(e)&&e>=t&&e<=n,G=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function mt(e){if(!G(e))return{};let t={};if(G(e.renko)){let{boxSize:n,atrPeriod:r}=e.renko;t.renko={...U(n)||n===`atr`?{boxSize:n}:{},...W(r,1,500)?{atrPeriod:r}:{}}}if(G(e.lineBreak)){let{lines:n}=e.lineBreak;t.lineBreak=W(n,1,10)?{lines:n}:{}}if(G(e.kagi)){let{reversal:n,reversalType:r}=e.kagi;t.kagi={...U(n)?{reversal:n}:{},...r===`percent`||r===`price`?{reversalType:r}:{}}}if(G(e.pointAndFigure)){let{boxSize:n,reversal:r}=e.pointAndFigure;t.pointAndFigure={...U(n)||n===`auto`?{boxSize:n}:{},...W(r,1,10)?{reversal:r}:{}}}if(G(e.rangeBars)){let{range:n}=e.rangeBars;t.rangeBars=U(n)||n===`auto`?{range:n}:{}}return t}var ht={autoScale:!0,rightMargin:5,minBarSpacing:2,maxBarSpacing:30,grid:{visible:!0,hLineStyle:`solid`,vLineStyle:`solid`},crosshair:{mode:`magnet`}},gt=[`1s`,`1m`,`3m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`6h`,`8h`,`12h`,`1d`,`3d`,`1w`,`1M`],_t=[`1m`,`5m`,`15m`,`30m`,`1h`,`2h`,`4h`,`1d`,`1w`,`1M`,`3M`,`6M`,`12M`],vt=[`1m`,`5m`,`15m`,`30m`,`1h`,`4h`,`1d`,`1w`,`1M`],yt=[`1m`,`5m`,`15m`,`1h`,`4h`,`1d`,`1w`],bt=8,xt=2,St=70,Ct=30,wt=60,Tt=120,Et={family:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,sizeSmall:10,sizeMedium:12,sizeLarge:14},K={amber:`#f2a93b`,up:`#1fa874`,down:`#e8505b`,ochre:`#c98316`,blue:`#4c8dff`,violet:`#a57cff`,cyan:`#1398a8`,rose:`#e25592`,neutral:`#7d8696`,ink:`#0c1016`},Dt=[K.blue,K.ochre,K.violet,K.cyan,K.rose],Ot={name:`dark`,background:K.ink,text:`#d9dde4`,textSecondary:`#7d8696`,grid:`#161b23`,crosshair:`#8a93a3`,candleUp:`#3ccf91`,candleDown:`#f0616d`,candleUpWick:`#3ccf91`,candleDownWick:`#f0616d`,lineColor:K.amber,areaTopColor:`rgba(242, 169, 59, 0.32)`,areaBottomColor:`rgba(242, 169, 59, 0.0)`,volumeUp:`rgba(60, 207, 145, 0.28)`,volumeDown:`rgba(240, 97, 109, 0.28)`,axisLine:`#1f2630`,axisLabel:`#c3c9d3`,axisLabelBackground:`#1f2630`,font:Et},kt={name:`light`,background:`#ffffff`,text:`#0f131a`,textSecondary:`#6b7380`,grid:`#eef0f3`,crosshair:`#8a93a3`,candleUp:`#16a36a`,candleDown:`#d9414f`,candleUpWick:`#16a36a`,candleDownWick:`#d9414f`,lineColor:`#c77a0a`,areaTopColor:`rgba(199, 122, 10, 0.24)`,areaBottomColor:`rgba(199, 122, 10, 0.0)`,volumeUp:`rgba(22, 163, 106, 0.25)`,volumeDown:`rgba(217, 65, 79, 0.25)`,axisLine:`#dde1e7`,axisLabel:`#3f4754`,axisLabelBackground:`#eef0f3`,font:Et},At={name:`terminal`,background:`#0E0E0E`,text:`#C0C0C0`,textSecondary:`#8A8A8A`,grid:`#1A1A1A`,crosshair:`#666666`,candleUp:`#00FF87`,candleDown:`#FF3B4D`,candleUpWick:`#00FF87`,candleDownWick:`#FF3B4D`,lineColor:`#3D8BFD`,areaTopColor:`rgba(61, 139, 253, 0.3)`,areaBottomColor:`rgba(61, 139, 253, 0.0)`,volumeUp:`rgba(0, 255, 135, 0.2)`,volumeDown:`rgba(255, 59, 77, 0.2)`,axisLine:`#1A1A1A`,axisLabel:`#8A8A8A`,axisLabelBackground:`#1A1A1A`,font:{family:`'Roboto Mono', 'JetBrains Mono', 'SF Mono', Consolas, monospace`,sizeSmall:10,sizeMedium:12,sizeLarge:14}},q={candlestick:`Candlestick`,line:`Line`,area:`Area`,bar:`OHLC Bar`,price:`Price`,volume:`Volume`,time:`Time`,open:`Open`,high:`High`,low:`Low`,close:`Close`,sma:`SMA`,ema:`EMA`,bollingerBands:`Bollinger Bands`,vwap:`VWAP`,ichimoku:`Ichimoku Cloud`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Keltner Channel`,donchianChannel:`Donchian Channel`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Std Dev`,volumeProfile:`Volume Profile`,accumulationDistribution:`A/D Line`,vroc:`VROC`,trendLine:`Trend Line`,horizontalLine:`Horizontal Line`,verticalLine:`Vertical Line`,ray:`Ray`,extendedLine:`Extended Line`,parallelChannel:`Parallel Channel`,regressionChannel:`Regression Channel`,fibRetracement:`Fibonacci Retracement`,fibExtension:`Fibonacci Extension`,rectangle:`Rectangle`,ellipse:`Ellipse`,triangle:`Triangle`,pitchfork:`Andrews' Pitchfork`,elliottWave:`Elliott Wave`,priceRange:`Price Range`,dateRange:`Date Range`,measure:`Measure`,textTool:`Text`,arrow:`Arrow`,clearAll:`Clear All`,buy:`Buy`,sell:`Sell`,buyLimit:`Buy Limit`,sellLimit:`Sell Limit`,buyStop:`Buy Stop`,sellStop:`Sell Stop`,stopLoss:`Stop Loss`,takeProfit:`Take Profit`,market:`Market`,limit:`Limit`,stop:`Stop`,cancel:`Cancel`,modify:`Modify`,quantity:`Qty`,pnl:`P&L`,activeOrders:`Active Orders`,positions:`Positions`,noOrders:`No active orders`,noPositions:`No open positions`,placeOrder:`Place Order`,rightClickToTrade:`Right-click chart to place orders`,ceiling:`Ceiling`,floor:`Floor`,reference:`Reference`,session:`Session`,preOpen:`Pre-Open`,continuous:`Continuous`,preClose:`Pre-Close`,closed:`Closed`,settings:`Settings`,theme:`Theme`,darkTheme:`Dark`,lightTheme:`Light`,tools:`Tools`,indicators:`Indicators`,overlays:`Overlays`,panels:`Panels`,orders:`Orders`,autoScale:`Auto Scale`,crosshair:`Crosshair`,grid:`Grid`,loading:`Loading...`,error:`Error`,numberDecimalSeparator:`.`,numberGroupSeparator:`,`},J={candlestick:`Nến`,line:`Đường`,area:`Vùng`,bar:`Thanh OHLC`,price:`Giá`,volume:`Khối lượng`,time:`Thời gian`,open:`Mở`,high:`Cao`,low:`Thấp`,close:`Đóng`,sma:`SMA`,ema:`EMA`,bollingerBands:`Dải Bollinger`,vwap:`VWAP`,ichimoku:`Mây Ichimoku`,parabolicSAR:`Parabolic SAR`,supertrend:`Supertrend`,keltnerChannel:`Kênh Keltner`,donchianChannel:`Kênh Donchian`,rsi:`RSI`,macd:`MACD`,stochastic:`Stochastic`,atr:`ATR`,adx:`ADX`,obv:`OBV`,williamsR:`Williams %R`,cci:`CCI`,mfi:`MFI`,aroon:`Aroon`,roc:`ROC`,tsi:`TSI`,cmf:`CMF`,stddev:`Độ lệch chuẩn`,volumeProfile:`Phân bổ KL`,accumulationDistribution:`Tích lũy/Phân phối`,vroc:`VROC`,trendLine:`Đường xu hướng`,horizontalLine:`Đường ngang`,verticalLine:`Đường dọc`,ray:`Tia`,extendedLine:`Đường kéo dài`,parallelChannel:`Kênh song song`,regressionChannel:`Kênh hồi quy`,fibRetracement:`Fibonacci thoái lui`,fibExtension:`Fibonacci mở rộng`,rectangle:`Hình chữ nhật`,ellipse:`Hình elip`,triangle:`Tam giác`,pitchfork:`Chĩa ba Andrews`,elliottWave:`Sóng Elliott`,priceRange:`Khoảng giá`,dateRange:`Khoảng thời gian`,measure:`Đo lường`,textTool:`Chữ`,arrow:`Mũi tên`,clearAll:`Xóa tất cả`,buy:`Mua`,sell:`Bán`,buyLimit:`Mua giới hạn`,sellLimit:`Bán giới hạn`,buyStop:`Mua chặn`,sellStop:`Bán chặn`,stopLoss:`Cắt lỗ`,takeProfit:`Chốt lời`,market:`Thị trường`,limit:`Giới hạn`,stop:`Dừng`,cancel:`Hủy`,modify:`Sửa`,quantity:`KL`,pnl:`Lãi/Lỗ`,activeOrders:`Lệnh chờ`,positions:`Vị thế`,noOrders:`Không có lệnh chờ`,noPositions:`Không có vị thế mở`,placeOrder:`Đặt lệnh`,rightClickToTrade:`Nhấp chuột phải để đặt lệnh`,ceiling:`Trần`,floor:`Sàn`,reference:`Tham chiếu`,session:`Phiên`,preOpen:`Trước giờ mở`,continuous:`Liên tục`,preClose:`Trước giờ đóng`,closed:`Đóng cửa`,settings:`Cài đặt`,theme:`Giao diện`,darkTheme:`Tối`,lightTheme:`Sáng`,tools:`Công cụ`,indicators:`Chỉ báo`,overlays:`Phủ lên`,panels:`Bảng`,orders:`Lệnh`,autoScale:`Tự co giãn`,crosshair:`Chữ thập`,grid:`Lưới`,loading:`Đang tải...`,error:`Lỗi`,numberDecimalSeparator:`,`,numberGroupSeparator:`.`},Y=new Map([[`en`,q],[`vi`,J]]),X=`en`,jt=q;function Mt(e){X=e,jt=Y.get(e)??q}function Nt(){return X}function Pt(e){return jt[e]??q[e]??e}function Ft(e,t){Y.set(e,t)}function It(e){return Y.get(e??X)??q}function Z(e,t=2,n){let r=Y.get(n??X)??q,i=r.numberDecimalSeparator,a=r.numberGroupSeparator,[o,s]=e.toFixed(t).split(`.`),c=o.startsWith(`-`),l=c?o.slice(1):o,u=``;for(let e=l.length-1,t=0;e>=0;e--,t++)t>0&&t%3==0&&(u=a+u),u=l[e]+u;return c&&(u=`-`+u),s?u+i+s:u}function Lt(e){return Z(e,0,`vi`)}function Rt(e,t){return e>=1e9?Z(e/1e9,2,t??X)+`B`:e>=1e6?Z(e/1e6,2,t??X)+`M`:e>=1e3?Z(e/1e3,2,t??X)+`K`:Z(e,0,t??X)}var Q={up:`#FF0000`,down:`#0000FF`,unchanged:`#FFD700`,ceiling:`#FF00FF`,floor:`#00FFFF`,reference:`#FFD700`},zt=[{name:`ATO`,startTime:`09:00`,endTime:`09:15`,type:`preOpen`},{name:`Phiên 1`,startTime:`09:15`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],$=[{name:`Phiên 1`,startTime:`09:00`,endTime:`11:30`,type:`continuous`},{name:`Nghỉ trưa`,startTime:`11:30`,endTime:`13:00`,type:`closed`},{name:`Phiên 2`,startTime:`13:00`,endTime:`14:30`,type:`continuous`},{name:`ATC`,startTime:`14:30`,endTime:`14:45`,type:`preClose`}],Bt={type:`stock`,exchange:`HOSE`,currency:`VND`,pricePrecision:2,volumeUnit:10,priceStep:.05,priceLimits:{enabled:!0,ceilingPercent:7,floorPercent:7},sessions:zt,colorScheme:Q},Vt={type:`stock`,exchange:`HNX`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,priceLimits:{enabled:!0,ceilingPercent:10,floorPercent:10},sessions:$,colorScheme:Q},Ht={type:`stock`,exchange:`UPCOM`,currency:`VND`,pricePrecision:1,volumeUnit:100,priceStep:.1,priceLimits:{enabled:!0,ceilingPercent:15,floorPercent:15},sessions:$,colorScheme:Q},Ut={type:`crypto`,currency:`USDT`,pricePrecision:2,priceLimits:{enabled:!1}},Wt={type:`stock`,exchange:`NYSE`,currency:`USD`,pricePrecision:2,priceStep:.01,priceLimits:{enabled:!1},sessions:[{name:`Pre-Market`,startTime:`04:00`,endTime:`09:30`,type:`preOpen`},{name:`Regular`,startTime:`09:30`,endTime:`16:00`,type:`continuous`},{name:`After-Hours`,startTime:`16:00`,endTime:`20:00`,type:`preClose`}]};function Gt(e){return{...e,candleUp:Q.up,candleDown:Q.down,candleUpWick:Q.up,candleDownWick:Q.down,volumeUp:`rgba(255, 0, 0, 0.3)`,volumeDown:`rgba(0, 0, 255, 0.3)`}}function Kt(e,t){if(!t.priceLimits?.enabled||!t.priceLimits.ceilingPercent)return null;let n=t.priceLimits.ceilingPercent/100,r=(t.priceLimits.floorPercent??t.priceLimits.ceilingPercent)/100;return{ceiling:e*(1+n),floor:e*(1-r),reference:e}}function qt(e){let t=new Date,n=`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`;for(let t of e)if(n>=t.startTime&&n<t.endTime)return t;return null}exports.DARK_TERMINAL=At,exports.DARK_THEME=Ot,exports.DEFAULT_BAR_SPACING=xt,exports.DEFAULT_BAR_WIDTH=bt,exports.DEFAULT_CHART_OPTIONS=ht,exports.DEFAULT_DRAWING_STYLE=t,exports.DEFAULT_PANEL_HEIGHT=Tt,exports.DEFAULT_RECONNECT=a,exports.DEFAULT_SIGNAL_STYLE=r,exports.DEFAULT_STREAM_CONFIG=o,exports.DEFAULT_TIMEFRAME_FAVORITES=yt,exports.DEFAULT_TRADE_ZONE_STYLE=i,exports.DEFAULT_TRADING_CONFIG=n,exports.HNX_SESSIONS=$,exports.HOSE_SESSIONS=zt,exports.LIGHT_THEME=kt,exports.LayerType=e,exports.MARKET_CRYPTO=Ut,exports.MARKET_HNX=Vt,exports.MARKET_HOSE=Bt,exports.MARKET_NYSE=Wt,exports.MARKET_UPCOM=Ht,exports.MIN_PANEL_HEIGHT=wt,exports.PRICE_AXIS_WIDTH=St,exports.PRICE_SOURCES=F,exports.TC_PALETTE=K,exports.TC_SERIES_COLORS=Dt,exports.TIMEFRAMES_CRYPTO=gt,exports.TIMEFRAMES_FOREX=vt,exports.TIMEFRAMES_STOCK=_t,exports.TIME_AXIS_HEIGHT=Ct,exports.VN_COLORS=Q,exports.alignToTimeframe=ke,exports.autoPricePrecision=Fe,exports.clamp=ne,exports.computePriceLimits=Kt,exports.computePriceRange=le,exports.computeTickStep=m,exports.createVNTheme=Gt,exports.detectPrecision=ze,exports.drawingOption=at,exports.en=q,exports.findBarIndex=ce,exports.formatFraction=N,exports.formatNumber=Z,exports.formatPrice=M,exports.formatPriceScaleLabel=Ie,exports.formatTimestamp=Oe,exports.formatVND=Lt,exports.formatVolume=Re,exports.formatVolumeLoc=Rt,exports.fractionTick=P,exports.getCurrentSession=qt,exports.getLocale=Nt,exports.getLocaleStrings=It,exports.hexToRgba=g,exports.indicatorSource=Ue,exports.inverseLerp=ie,exports.isDateOnly=je,exports.isPriceSource=Be,exports.isTimeFrame=De,exports.isValidTimeZone=ye,exports.lerp=re,exports.lerpColor=fe,exports.marketStatus=Qe,exports.mergeBar=ue,exports.niceNumber=p,exports.normalizeBar=oe,exports.normalizeBarTime=h,exports.offsetAt=w,exports.parseIndicatorSource=We,exports.parseTimeframe=D,exports.pickBaseTimeframe=Je,exports.priceFormatterFor=Le,exports.rankSymbols=Ye,exports.readChartTypeOptions=mt,exports.readNews=te,exports.readQuote=c,exports.registerLocale=Ft,exports.resampleBars=Ke,exports.resolveDrawingOptions=ot,exports.roundToStep=ae,exports.sanitizeDrawingOptions=rt,exports.sanitizeDrawingStyle=pt,exports.sessionMinute=R,exports.setLocale=Mt,exports.sliceVisibleData=se,exports.sourcePrice=Ve,exports.stepDecimals=Xe,exports.t=Pt,exports.tickBarCount=Ee,exports.timeParts=Ae,exports.timeframeBucketStart=A,exports.timeframeToMs=O,exports.tzLabel=Me,exports.vi=J,exports.wallToUtc=xe,exports.withAlpha=de,exports.zoneOffsetMinutes=S,exports.zonedDateFormatter=Se;
2
2
  //# sourceMappingURL=index.cjs.map